Файловый менеджер - Редактировать - /var/www/html/plugins/system/jomsocialchatbar/assets/js/app.min.js
Ðазад
!function i(o,s,a){function c(e,t){if(!s[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(r)return r(e,!0);throw(n=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",n}n=s[e]={exports:{}},o[e][0].call(n.exports,function(t){return c(o[e][1][t]||t)},n,n.exports,i,o,s,a)}return s[e].exports}for(var r="function"==typeof require&&require,t=0;t<a.length;t++)c(a[t]);return c}({1:[function(s,t,e){!function(o){!function(){var t=s("./store");window.joms=window.joms||{},window.joms.store=t,window,joms.getData("is_chat_view")||joms_observer.add_action("chat_initialized",function(){var t=(typeof window!=="undefined"?window["joms"]:typeof o!=="undefined"?o["joms"]:null).Vue,e=s("./components/chatbar"),n,i,i=new t({store:(typeof window!=="undefined"?window["joms"]:typeof o!=="undefined"?o["joms"]:null).store,render:function(t){return t(e)},mounted:function(){var e=this.$store;e.dispatch("chats/fetch",joms.chat).then(function(){_.each(joms.chat.conversations,function(t){e.dispatch("chats/addSidebarItem",t.id)});e.dispatch("chats/syncState")})}}).$mount();document.body.appendChild(i.$el),jQuery("body").on("click",function(t){var e=jQuery(t.target).parents(".joms-chatbar");if(!e.length)joms.store.dispatch("chats/setActiveWindow",0)})},1,1)}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./components/chatbar":6,"./store":17}],2:[function(t,s,e){!function(o){!function(){var t=("undefined"!=typeof window?window.joms:void 0!==o?o.joms:null).Vue,n=("undefined"!=typeof window?window.joms:void 0!==o?o.joms:null).storage,e=window.joms_plg_jomsocialchatbar||{},i=e.configs||{},e=e.templates||{};s.exports=t.component("chatbar-sidebar",{template:e.chatbar_sidebar,data:function(){var t,e={expanded:!0,fetching:!1,fetchDone:!1};return+i.remember_last_state&&(t=n.get("chatbar")||{},_.extend(e,t.sidebar||{})),e},computed:{chats:function(){return this.$store.getters["chats/sidebar"]}},methods:{open:function(t){this.$store.dispatch("chats/open",t)},toggle:function(){var t=n.get("chatbar")||{},e=t.sidebar||{};this.expanded=!this.expanded,_.extend(e,{expanded:this.expanded}),_.extend(t,{sidebar:e}),n.set("chatbar",t)},fetch:function(t){this.fetching||this.fetchDone||(this.fetching=!0,this.fetchDebounced(t))},fetchDebounced:function(t){var e=this;this.$store.dispatch("chats/fetchMore",{list:t}).fail(function(){e.fetchDone=!0}).always(function(){e.fetching=!1})},handleScroll:function(t){var e=t.currentTarget,n=e.scrollTop,i=t.deltaY;if(0===n&&i<0)t.preventDefault(),t.stopPropagation();else{for(var o=e.querySelectorAll(".joms-chat__item"),s=[],a=0;a<o.length;a++)s.push(+o[a].getAttribute("data-id"));e=e.scrollHeight-e.clientHeight,Math.abs(n-e)<=1&&0<i&&(t.preventDefault(),t.stopPropagation(),this.fetchDone||this.fetch(s))}},setActiveWindow:function(t){this.$store.dispatch("chats/setActiveWindow",+t.id),this.$store.dispatch("chats/open",+t.id),0==+t.seen&&this.$store.dispatch("chats/seen",+t.id)}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(t,f,e){!function(u){!function(){var o,s,a,c="undefined"!=typeof window?window.jQuery:void 0!==u?u.jQuery:null,r="undefined"!=typeof window?window.joms:void 0!==u?u.joms:null,t=("undefined"!=typeof window?window.joms:void 0!==u?u.joms:null).autosize_textarea,e=("undefined"!=typeof window?window.joms:void 0!==u?u.joms:null).Vue,i=String(window.joms_my_id||""),n=(window.joms_plg_jomsocialchatbar||{}).templates||{};function d(n){return c.Deferred(function(t){a=t,c.Deferred(function(i){o?i.resolve(o,s):r.util.loadLib("plupload",function(){setTimeout(function(){var t="joms-js--jomsocialchatbar-uploader",e=r.getData("base_url")+"index.php?option=com_community",n=c('<div id="'+t+'" aria-hidden="true" />').css({width:1,height:1,overflow:"hidden"}).appendTo(document.body);c('<button id="'+t+'-button" />').appendTo(n);(o=new window.plupload.Uploader({url:e,container:t,browse_button:t+"-button",runtimes:"html5,html4",multi_selection:!1})).bind("FilesAdded",function(t){setTimeout(function(){t.start(),t.refresh()},1)}),o.bind("Error",function(t,e){window.alert(e&&e.message||"Undefined error.")}),o.bind("FileUploaded",function(t,e,n){var i;try{i=JSON.parse(n.response)}catch(t){}return(i=i||{}).error||i.msg?(window.alert(i.error||i.msg),void a.reject()):i.thumb_url&&i.photo_id||i.id?void a.resolve(e,i):(window.alert("Undefined error."),void a.reject())}),o.init(),s=n.find("input[type=file]"),i.resolve(o,s)})})}).done(function(t,e){t.refresh(),t.settings.url=n.url,t.settings.filters=n.filters,t.settings.max_file_size=n.max_file_size,t.refresh(),e.click()})})}f.exports=e.component("chatbar-window-input",{template:n.chatbar_window_input,props:["chat","active"],data:function(){return{attachment:!1,ta_original_height:""}},mounted:function(){this.active&&this.focus(),t(this.$el.querySelector("textarea")),this.ta_original_height=this.$el.querySelector("textarea").style.height},watch:{active:function(t){t&&this.focus()}},methods:{focus:function(){this.$el.querySelector("textarea").focus()},submit:function(t){var e=t.target,n=(new Date).getTime(),t=JSON.parse(JSON.stringify(this.attachment||{}));(e.value.trim()||this.attachment)&&(n={chat_id:this.chat.id,user_id:i,action:"sent",content:e.value,attachment:t,params:{attachment:t},created_at:Math.floor(n/1e3)},e.value="",this.attachment=!1,this.resetInputStyle(e),this.$emit("submit",n))},resetInputStyle:function(t){t.style.height=this.ta_original_height,t.style.overflow="hidden"},attachImage:function(t){var n=this;d({url:r.getData("base_url")+"index.php?option=com_community&view=photos&task=ajaxPreviewComment",filters:{mime_types:[{title:"Image files",extensions:"jpg,jpeg,png,gif"}]},max_file_size:void 0}).done(function(t,e){n.attachment={type:"image",id:e.photo_id,url:e.thumb_url}})},attachFile:function(t){var n=this;d({url:r.getData("base_url")+"index.php?option=com_community&view=files&task=multiUpload&type=chat&id"+this.chat.id,filters:{mime_types:[{title:"Document files",extensions:"bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,swf,txt,xcf,xls,BMP,CSV,DOC,GIF,ICO,JPG,JPEG,ODG,ODP,ODS,ODT,PDF,PNG,PPT,SWF,TXT,XCF,XLS"}]},max_file_size:void 0}).done(function(t,e){n.attachment={type:"file",id:e.id,url:e.path,name:t.name}})},removeAttachment:function(t){this.attachment=!1}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,i,e){!function(n){!function(){var t=("undefined"!=typeof window?window.joms:void 0!==n?n.joms:null).Vue,o=+(window.joms_my_id||""),e=(window.joms_plg_jomsocialchatbar||{}).templates||{};i.exports=t.component("chatbar-window-search",{template:e.chatbar_window_search,props:["participants"],data:function(){return{inputWidth:10,queryResults:[],selectedIds:[],selectedNames:[]}},computed:{selectedUsers:function(){return _.map(this.selectedIds,function(t,e){return{id:t,name:this.selectedNames[e]}},this)}},mounted:function(){this.$input=this.$el.querySelector(".joms-js-input")},methods:{reset:function(){this.selectedIds=[],this.selectedNames=[]},add:function(){var t=JSON.parse(JSON.stringify(this.selectedIds));this.$emit("done",t),_.each(t,function(t){this.participants.push(t)},this),this.reset()},cancel:function(){this.reset(),this.$emit("hide")},search:function(t){t=this.$store.getters["users/search"](t),t=this.filterSelected(t);this.queryResults=t},select:function(t){var e;-1===this.selectedIds.indexOf(t)&&(e=this.$store.getters["users/name"](t),this.selectedIds.push(t),this.selectedNames.push(e),this.queryResults=[],this.$input.value="",this.$input.focus())},removeSelected:function(t){t=this.selectedIds.indexOf(+t);-1!==t&&(this.selectedIds.splice(t,1),this.selectedNames.splice(t,1),this.queryResults=this.filterSelected(this.queryResults))},filterSelected:function(t){var n=this.participants,i=this.selectedIds;return _.filter(t,function(t){var e=+t.id,t=!0;return t=e==o||-1<n.indexOf(e)||-1<i.indexOf(e)?!1:t})},onInputClick:function(t){this.$el.querySelector(".joms-js-input").focus()},onInputKeyup:_.throttle(function(t){this.shadowInput||(this.shadowInput=this.$el.querySelector(".joms-input--shadow")),this.shadowInput.innerHTML=t.target.value,this.inputWidth=this.shadowInput.clientWidth+20,this.search(t.target.value.trim())},50),onSelect:function(t){this.select(+t)}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(r,d,t){!function(c){!function(){var i="undefined"!=typeof window?window.jQuery:void 0!==c?c.jQuery:null,t=("undefined"!=typeof window?window.joms:void 0!==c?c.joms:null).Vue,e=r("./chatbar-window-search"),n=r("./chatbar-window-input"),o=String(window.joms_my_id||""),s=(window.joms_plg_jomsocialchatbar||{}).templates||{},a=("undefined"!=typeof window?window.joms:void 0!==c?c.joms:null).moment;d.exports=t.component("chatbar-window",{template:s.chatbar_window,components:{ChatbarWindowSearch:e,ChatbarWindowInput:n},props:["chat"],data:function(){var t=JSON.parse(JSON.stringify(this.chat.users));return{setting:!1,adding:!1,loading:!1,myId:o,participants:t,scrollTop:0,currentHeight:0,initData:!1,fetchDone:!1,scrollPosition:"bottom"}},mounted:function(){this.initializeData()},computed:{active:function(){return this.$store.state.chats.active==this.chat.id},dgroups:function(){var t,e,n=this.$store.state.chats.info,i=this.chat.id,o=[];if(n[this.chat.id])for(var s=this.$store.state.chats.messages.filter(function(t){return+t.chat_id==+i}),a=0;a<s.length;a++){var c=s[a],r=new Date(1e3*c.created_at),d=r.toJSON().slice(0,10).replace(/-/g,""),u=String(c.user_id),f=this.formatDate(r.getTime()),r=this.formatTime(r.getTime());"seen"!==c.action&&("string"==typeof c.attachment&&(c.attachment=JSON.parse(c.attachment)),c.params=_.isObject(c.params)?c.params:c.params?JSON.parse(c.params):{},d!==t&&(e=void 0,o.push({date:t=d,dateFormatted:f,messages:[]})),f=o[o.length-1].messages,"sent"!==c.action?(e=void 0,f.push({info:c.action,messages:[]})):u!==e&&f.push({user:e=u,messages:[]}),(f=f[f.length-1].messages).push(_.extend({},c,{timeFormatted:r})))}return o},oldestMsg:function(){var e=this,t=this.$store.state.chats.messages.filter(function(t){return+t.id&&+t.chat_id==+e.chat.id}).map(function(t){return+t.id});return t.length?t.reduce(function(t,e){return Math.min(t,e)}):0},seenBy:function(){var e=this;if(e.chat.seenBy&&+joms.getData("chat_enablereadstatus")){var n=e.$store.state.users;return e.chat.seenBy.filter(function(t){return n[t]&&+t!=+e.myId}).map(function(t){return n[t].name})}return[]},seenUsers:function(){return this.seenBy.length?this.seenBy.join("<br>"):""},seenText:function(){return Joomla.JText._("PLG_JOMSOCIALCHATBAR_SEEN")}},beforeUpdate:function(){this.scrollHeightBeforeUpdate=this.$el.querySelector(".joms-js-scrollable").scrollHeight},updated:function(){var t,e=this.$el.querySelector(".joms-js-scrollable");return this.active||(this.setting=!1),this.initData?(e.scrollTop=e.scrollHeight,void(this.initData=!1)):this.scrollHeightBeforeUpdate!=e.scrollHeight&&"top"===this.scrollPosition?(t=Math.abs(e.scrollHeight-this.scrollHeightBeforeUpdate),e.scrollTop=t,void(this.scrollPosition="middle")):void("bottom"===this.scrollPosition&&(e.scrollTop=e.scrollHeight))},methods:{add:function(){this.setting=!1,this.adding=!0},leave:function(){this.setting=!1,confirm(Joomla.JText._("PLG_JOMSOCIALCHATBAR_ARE_YOU_SURE_TO_LEAVE_THIS_CONVERSATION"))&&this.$store.dispatch("chats/leave",this.chat.id)},toggle:function(){this.$store.dispatch("chats/toggle",this.chat.id),this.setActive(this.chat)},toggleSetting:function(t){this.setting="hide"!==t&&!this.setting},close:function(){this.$store.dispatch("chats/close",this.chat.id)},initializeData:function(t){var e=this,n=e.chat.id,i={id:this.chat.id,oldestMsg:this.oldestMsg};e.chat.initialized?e.initData=!0:(e.loading=!0,e.$store.dispatch("chats/messages/fetch",i).then(function(t){e.loading=!1,e.initData=!0,e.$store.dispatch("chats/initialized",{id:+n}),t.seen.length&&t.seen.forEach(function(t){e.$store.dispatch("chats/seenBy",{chatid:+t.chat_id,userid:+t.user_id})})}))},loadOlderMessages:function(){var e=this,t=(e.chat.id,e.$store),n={id:e.chat.id,oldestMsg:e.oldestMsg};e.loading||(e.loading=!0,t.dispatch("chats/messages/fetch",n).then(function(t){e.loading=!1,0===t.messages.length&&(e.fetchDone=!0)}))},handleScroll:function(t){var e=this.$el.querySelector(".joms-js-scrollable");e.scrollTop?e.scrollTop===e.scrollHeight-e.clientHeight?this.scrollPosition="bottom":this.scrollPosition="middle":this.scrollPosition="top","bottom"===this.scrollPosition&&this.active&&!this.chat.seen&&this.$store.dispatch("chats/seen",+this.chat.id)},handleWheel:function(t){var e=t.currentTarget,n=e.scrollTop,i=t.deltaY;if(0===n&&i<0){if(t.preventDefault(),this.fetchDone)return!1;this.loadOlderMessages()}else e=e.scrollHeight-e.clientHeight,Math.abs(n-e)<=1&&0<i&&(t.preventDefault(),t.stopPropagation())},replaceLink:function(t){return t.replace(/((http|https):\/\/.*?[^\s]+)/g,'<a target="_blank" style="text-decoration:underline" href="$1">$1</a>')},replaceNewline:function(t){return t.replace(/\\n/g,"<br />").replace(/\r?\n/g,"<br />")},getName:function(t){return this.$store.getters["users/name"](t)},replaceEmoticon:function(n){var t=joms.getData("joms_emo"),i=[],o=[];return _.each(t,function(t,e){i.unshift(t),o.unshift(e)}),_.each(i,function(t,e){_.each(t,function(t){n=n.replace(t,'<span class="joms-content-emo2 joms-emo2 joms-emo2-'+o[e]+'"></span>')})}),n},photoZoom:function(t){joms.api.photoZoom(t)},addUsers:function(t){this.adding=!1,t&&t.length&&(t={chatid:this.chat.id,userids:t},this.$store.dispatch("chats/addUsers",t))},submit:function(t){var e=this.$store,n=this.chat.id;this.scrollPosition="bottom",e.dispatch("chats/messages/submit",{id:n,data:t}).then(function(){e.dispatch("chats/setTopSidebar",n)}),e.dispatch("chats/clearSeen",{chatid:n})},mute:function(t){this.$store.dispatch(t?"chats/mute":"chats/unmute",{id:this.chat.id})},showTooltip:function(t){var e=i(t.currentTarget),n=e.attr("data-tooltip"),t=e.offset();this.$tooltip||(this.$tooltip=i('<div class="joms-tooltip joms-js-chat-tooltip" />').appendTo(document.body)),this.$tooltip.html(n).show(),e.hasClass("joms-chat__messages-seen_status")?this.$tooltip.addClass("joms_chat__seen-tooltip").css({left:t.left,top:t.top-5,transform:"translateY(-100%)"}):this.$tooltip.removeClass("joms_chat__seen-tooltip").css({left:t.left-this.$tooltip.outerWidth()-10,top:t.top+e.outerHeight()/2,transform:"translateY(-50%)"})},hideTooltip:function(t){this.$tooltip&&this.$tooltip.hide()},setActive:function(t){this.$store.dispatch("chats/setActiveWindow",+t.id),0==+t.seen&&"bottom"===this.scrollPosition&&this.$store.dispatch("chats/seen",+t.id)},formatDate:function(t){var e=a(),n=a(t),t="D MMM";return e.year()!==n.year()&&(t="D/MMM/YY"),n.format(t)},formatTime:function(t){var e=a(t),n=(n=joms.getData("chat_time_format")||"g:i A").replace(/[GH]/g,"H").replace(/[gh]/g,"h").replace(/i/gi,"mm").replace(/s/gi,"ss");return this.formatDate(t)+" "+e.format(n)},formatName:function(t){return t=1===(t=!_.isArray(t)?[t]:t).length?t[0]:1<t.length?(t=(t=(t=_.map(t,function(t,e){return 0<=t.indexOf("<")&&((e=document.createElement("span")).innerHTML=t,t=e.innerText),(t=t.split(" "))[0]})).sort()).join(", ")).replace(/,\s([^\s]*)$/," "+Joomla.JText._("PLG_JOMSOCIALCHATBAR_AND")+" $1"):""}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./chatbar-window-input":3,"./chatbar-window-search":4}],6:[function(a,c,t){!function(s){!function(){var t=("undefined"!=typeof window?window.joms:void 0!==s?s.joms:null).Vue,e=a("./chatbar-sidebar"),n=a("./chatbar-window"),i=window.joms_plg_jomsocialchatbar||{},o=i.configs||{},i=i.templates||{};c.exports=t.component("chatbar",{template:i.chatbar,components:{ChatbarSidebar:e,ChatbarWindow:n},data:function(){var t={position:"right",limitOpened:0};return o.chat_bar_position&&(t.position=o.chat_bar_position),t},mounted:function(){this.setLimitOpened(),window.addEventListener("resize",this.setLimitOpened)},computed:{openedChats:function(){var e=this.$store,t=e.getters["chats/opened"],n=t.opened,t=t.needClose;return _.each(t,function(t){e.dispatch("chats/close",t)}),n}},methods:{setLimitOpened:function(){this.$store.dispatch("chats/setLimitOpened")}}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./chatbar-sidebar":2,"./chatbar-window":5}],7:[function(t,e,n){function o(t){return t=1===(t=!_.isArray(t)?[t]:t).length?t[0]:1<t.length?(t=(t=(t=_.map(t,function(t,e){return 0<=t.indexOf("<")&&((e=document.createElement("span")).innerHTML=t,t=e.innerText),(t=t.split(" "))[0]})).sort()).join(", ")).replace(/,\s([^\s]*)$/," "+Joomla.JText._("PLG_JOMSOCIALCHATBAR_AND")+" $1"):""}e.exports={fetch:function(e,n){return jQuery.Deferred(function(t){_.each(n.buddies,function(t){e.commit("users/add",{data:t},{root:!0})}),_.each(n.conversations,function(t){t.id=String(t.chat_id),t.name=o(t.name),e.commit("add",t)}),_.each(n.opened,function(t){t.id=String(t.chat_id),t.name=o(t.name),e.commit("add",t)}),t.resolve()})},fetchMore:function(i,t){return jQuery.Deferred(function(n){joms.ajax({func:"chat,ajaxInitializeChatData",data:[JSON.stringify(t.list)],callback:function(t){var e=!0;_.each(t.buddies,function(t){i.commit("users/add",{data:t},{root:!0})}),_.each(t.list,function(t){t.id=String(t.chat_id),t.name=o(t.name),i.commit("add",t),i.commit("addSidebarItem",t.id),e=!1}),e?n.reject():n.resolve()}})})},initialized:function(t,e){t.commit("initialized",e)},check:function(t){var e=_.map(t.getters.opened,function(t){return t.id});return t.dispatch("messages/check",{ids:e})},open:function(t,e){t.state.info[e]&&(t.commit("open",e),t.commit("storeState"))},close:function(t,e){var n=t.state.info[e];n&&n.open&&(t.commit("close",e),t.commit("storeState"))},toggle:function(t,e){var n=t.state.info[e];n&&n.open&&(t.commit("toggle",e),t.commit("storeState"))},leave:function(t,e){joms.ajax({func:"chat,ajaxLeaveChat",data:[e],callback:function(){t.commit("delete",e)}})},addUsers:function(t,e){var n=e.chatid,i=e.userids,i=_.map(i,String);i=JSON.stringify(i),t.commit("addUsers",e),joms.ajax({func:"chat,ajaxAddPeople",data:[n,i],callback:function(){t.commit("addUsers",e)}})},mute:function(t,e){e=e.id;t.commit("mute",e),joms.ajax({func:"chat,ajaxMuteChat",data:[e,1]})},unmute:function(t,e){e=e.id;t.commit("unmute",e),joms.ajax({func:"chat,ajaxMuteChat",data:[e,0]})},seen:function(e,n){return jQuery.Deferred(function(t){joms.ajax({func:"chat,ajaxSeen",data:[n],callback:function(){e.commit("seen",n),t.resolve()}})})},seenBy:function(t,e){e.userid!=window.joms_my_id&&t.commit("seenBy",e)},clearSeen:function(t,e){t.commit("clearSeen",e)},unread:function(t,e){t.commit("unread",e)},syncState:function(t){t.commit("syncState")},setTopSidebar:function(t,e){t.commit("setTopSidebar",e)},addSidebarItem:function(t,e){t.commit("addSidebarItem",e)},setActiveWindow:function(t,e){t.commit("setActiveWindow",e)},setLimitOpened:function(t){var e=document.body.clientWidth,n=parseInt((e-220-20-60)/240);t.commit("setLimitOpened",n)},changeName:function(t,e){t.commit("changeName",e)}}},{}],8:[function(t,e,n){!function(t){!function(){("undefined"!=typeof window?window.joms:void 0!==t?t.joms:null).storage;e.exports={opened:function(e,t){var n,i=[],o=[],s=e.limitOpened,a=e.active;return s?((n=_.filter(e.opened,function(t){return e.info[t]})).length>s&&s&&(_.each(n.splice(s),function(t){t!=a&&o.push(t)}),s=n.indexOf(a),a&&-1===s&&(o.push(n.pop()),n.push(a))),_.each(n,function(t){e.info[t]&&i.push(e.info[t])})):o=e.opened,{opened:i,needClose:o}},sidebar:function(e,t){var n=[];return _.each(e.sidebar,function(t){e.info[t]&&n.push(e.info[t])}),n}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(t,e,n){e.exports={namespaced:!0,state:t("./state"),getters:t("./getters"),mutations:t("./mutations"),actions:t("./actions"),modules:{messages:t("./messages")}}},{"./actions":7,"./getters":8,"./messages":12,"./mutations":15,"./state":16}],10:[function(t,e,n){e.exports={fetch:function(i,o){return jQuery.Deferred(function(n){var t=o.id,e=o.oldestMsg;joms.ajax({func:"chat,ajaxGetLastChat",data:[t,e,0],callback:function(t){var e=[];_.isArray(t.messages)&&t.messages.length&&_.each(t.messages,function(t){e.push(t)}),_.isArray(t.seen)&&t.seen.length&&_.each(t.seen,function(t){e.push(t)}),e.sort(function(t,e){return+e.id-+t.id}),e.length&&i.commit("append",{messages:e}),n.resolve({messages:e,seen:t.seen})}})})},submit:function(s,a){return jQuery.Deferred(function(n){var t=a.id,e=(o=a.data).attachment||{},i="temp_"+(new Date).getTime(),o=_.extend({},o,{id:i});s.commit("prepend",{messages:[o]}),e=e.type&&e.id?{type:e.type,id:e.id}:{},joms.ajax({func:"chat,ajaxAddChat",data:[t,o.content,JSON.stringify(e)],callback:function(t){var e;t.reply_id?(e={tempid:i,id:t.reply_id,chatid:t.chat_id},s.commit("updateTemp",e),n.resolve()):(s.commit("error",{tempid:i}),t.error&&alert(t.error))}})})},check:function(i,n){return jQuery.Deferred(function(e){var t=n.ids;_.isArray(t)&&t.length?(t=_.map(t,function(t){var e,n=i.getters.sortedMessages(t);return[+t,(e=n&&n.length&&(e=(n=_.filter(n,function(t){return+t.id}))[n.length-1])&&+e.id?+e.id:e)||0]}),joms.ajax({func:"chat,ajaxGetLatestActivities",data:[JSON.stringify(t)],callback:function(t){t&&_.each(t,function(t,e){_.each(t,function(t){"string"==typeof t.attachment&&(t.attachment=JSON.parse(t.attachment)),i.commit("add",{id:e,message:t})})}),e.resolve()}})):e.resolve()})}}},{}],11:[function(t,e,n){e.exports={newestMessageID:function(i,t){return function(t){var e,n;return n=i[t]&&(e=_.chain(i[t]).keys().filter(function(t){return+t}).sortBy(function(t){return+t}).value()).length?e[e.length-1]:n}}}},{}],12:[function(t,e,n){e.exports={namespaced:!0,state:t("./state"),getters:t("./getters"),mutations:t("./mutations"),actions:t("./actions")}},{"./actions":10,"./getters":11,"./mutations":13,"./state":14}],13:[function(t,e,n){!function(t){!function(){var n=("undefined"!=typeof window?window.joms:void 0!==t?t.joms:null).Vue;e.exports={add:function(t,e){_.each(e.data,function(e){0===t.filter(function(t){return+t.id==+e.id}).length&&t.unshift(e)})},append:function(t,e){_.each(e.messages,function(e){0===t.filter(function(t){return+t.id==+e.id}).length&&t.unshift(e)})},prepend:function(t,e){_.each(e.messages,function(e){0===t.filter(function(t){return+t.id==+e.id}).length&&t.push(e)})},updateTemp:function(t,e){t=t.filter(function(t){return e.tempid===t.id});t.length&&_.each(t,function(t){n.set(t,"id",e.id)})},error:function(t,e){t=t.filter(function(t){return e.tempid===t.id});t.length&&_.each(t,function(t){n.set(t,"error",!0)})}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(t,e,n){e.exports=[]},{}],15:[function(t,e,n){!function(t){!function(){var o=("undefined"!=typeof window?window.joms:void 0!==t?t.joms:null).Vue,i=("undefined"!=typeof window?window.joms:void 0!==t?t.joms:null).storage;e.exports={add:function(t,e){t.info[e.id]&&_.extend(e,t.info[e.id]),o.set(t.info,e.id,e)},addSidebarItem:function(t,e){-1===t.sidebar.indexOf(+e)&&t.sidebar.push(+e)},addUsers:function(t,e){var n=e.chatid,e=e.userids,i=t.info[n];i&&e.forEach(function(t){i.users.indexOf(+t)<0&&(o.set(i,"participants",+i.participants+1),i.users.push(+t))})},initialized:function(t,e){e=t.info[e.id];e&&o.set(e,"initialized",!0)},update:function(t,e){var n=e.id,i=e.chat,e=t.info[n],i=_.extend({},e||{},i);o.set(t.info,n,i)},delete:function(t,e){t.info[e]&&o.delete(t.info,e),o.set(t,"active",0)},open:function(t,e){var n=t.info[e];-1===t.opened.indexOf(+e)&&t.opened.push(+e),n&&1!==n.open&&o.set(t.info[e],"open",1)},close:function(t,e){var n=t.opened.indexOf(+e);-1!=n&&t.opened.splice(n,1),t.info[e]&&(e=t.info[e],o.set(e,"open",0))},toggle:function(t,e){var n=t.info[e];n&&(n=2===n.open?1:2,o.set(t.info[e],"open",n))},mute:function(t,e){var n;_.each(t.info,function(t){t.id==e&&(n=t)}),n&&o.set(n,"mute",1)},unmute:function(t,e){var n;_.each(t.info,function(t){t.id==e&&(n=t)}),n&&o.set(n,"mute",0)},seen:function(t,e){e=t.info[e];e&&o.set(e,"seen",1)},seenBy:function(t,e){var n=e.userid,e=e.chatid,e=t.info[e];e&&(e.seenBy||o.set(e,"seenBy",[]),e.seenBy.push(n))},clearSeen:function(t,e){e=e.chatid,e=t.info[e];e&&e.seenBy&&e.seenBy.splice(0,e.seenBy.length)},unread:function(t,e){e=t.info[e];o.set(e,"seen",0)},storeState:function(t){var e=i.get("chatbar")||{},n=e.info||{};_.each(t.info,function(t){void 0!==t.open&&(n[t.id]={},n[t.id].open=t.open)}),e.info=n,e.opened=t.opened,i.set("chatbar",e)},syncState:function(n){var t=i.get("chatbar")||{},e=t.info||{},t=t.opened||[];_.each(e,function(t,e){n.info[e]&&o.set(n.info[e],"open",t.open)}),_.each(t,function(t){-1===n.opened.indexOf(+t)&&n.opened.push(t)})},setTopSidebar:function(t,e){var n=t.sidebar.indexOf(+e);-1!==n?(t.sidebar.splice(n,1),t.sidebar.unshift(+e)):t.info[e]&&t.sidebar.unshift(+e)},setActiveWindow:function(t,e){var n=t.info[e];n&&1===n.open?o.set(t,"active",+e):o.set(t,"active",0)},setLimitOpened:function(t,e){o.set(t,"limitOpened",+e)},changeName:function(t,e){t=t.info[e.chat_id];t&&o.set(t,"name",_.escape(e.groupname))}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],16:[function(t,e,n){e.exports={info:{},sidebar:[],opened:[],active:0,limitOpened:0}},{}],17:[function(n,i,t){!function(e){!function(){var t=("undefined"!=typeof window?window.joms:void 0!==e?e.joms:null).Vuex;i.exports=new t.Store({modules:{users:n("./users"),chats:n("./chats")}})}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./chats":9,"./users":20}],18:[function(t,e,n){e.exports={}},{}],19:[function(t,e,n){e.exports={name:function(n,t){return function(t){var e;return e=n[t]?n[t].name:e}},avatar:function(n,t){return function(t){var e;return e=n[t]?n[t].avatar:e}},search:function(t,e){return function(e){return e=(e||"").trim().toLowerCase(),_.filter(t,function(t){return e&&-1!==(t.name||"").toLowerCase().indexOf(e)})}}}},{}],20:[function(t,e,n){arguments[4][12][0].apply(n,arguments)},{"./actions":18,"./getters":19,"./mutations":21,"./state":22,dup:12}],21:[function(t,e,n){!function(t){!function(){var o=("undefined"!=typeof window?window.joms:void 0!==t?t.joms:null).Vue;e.exports={add:function(t,e){var n=e.data,e=n.id;o.set(t,e,n)},edit:function(t,e){var n=e.id,i=e.data,e=t[n];e&&(i=_.extend({},e,i),o.set(t,n,i))},delete:function(t,e){var n=e.id;e.messageId;t[n]&&delete t[n]}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(t,e,n){arguments[4][18][0].apply(n,arguments)},{dup:18}]},{},[1]);
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка