File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/messenger/model/users/messenger.model.users.bundle.min.js
Back
(function(e){"use strict";var t=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,[{key:"getStore",value:function t(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return{namespaced:true,state:{host:n.host||location.protocol+"//"+location.host,collection:{},index:{}},actions:{set:function t(n,o){if(o instanceof Array){o=o.map(function(t){return Object.assign({},e.getUserBlank(),e.validate(Object.assign({},t),{host:n.state.host}),{init:true})})}else{var i=[];i.push(Object.assign({},e.getUserBlank(),e.validate(Object.assign({},o),{host:n.state.host}),{init:true}));o=i}n.commit("set",o)},update:function t(n,o){if(typeof n.state.collection[o.id]==="undefined"||n.state.collection[o.id].init===false){return true}n.commit("update",{userId:o.id,fields:e.validate(Object.assign({},o.fields),{host:n.state.host})});return true},delete:function e(t,n){t.commit("delete",n.id);return true}},mutations:{set:function e(t,n){var o=true;var i=false;var a=undefined;try{for(var s=n[Symbol.iterator](),r;!(o=(r=s.next()).done);o=true){var f=r.value;if(typeof t.collection[f.id]==="undefined"){BX.Vue.set(t.collection,f.id,f)}t.collection[f.id]=f}}catch(e){i=true;a=e}finally{try{if(!o&&s.return!=null){s.return()}}finally{if(i){throw a}}}},update:function t(n,o){if(typeof n.collection[o.id]==="undefined"){BX.Vue.set(n.collection,o.id,e.getUserBlank())}n.collection[o.id]=Object.assign(n.collection[o.id],o.fields)},delete:function e(t,n){delete t.collection[n.id]}}}}}],[{key:"getInstance",value:function t(){return new e}},{key:"getName",value:function e(){return"messengerUsers"}},{key:"convertToArray",value:function e(t){var n=[];for(var o in t){if(t.hasOwnProperty(o)){n.push(t[o])}}return n}},{key:"getUserBlank",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=t.defaultName||"";return{id:0,name:n,firstName:n,lastName:"",workPosition:"",color:"#048bd0",avatar:"",gender:"M",birthday:false,extranet:false,network:false,bot:false,connector:false,externalAuthId:"default",status:"online",idle:false,lastActivityDate:false,mobileLastDate:false,departments:[],absent:false,phones:{workPhone:"",personalMobile:"",personalPhone:""},init:false}}},{key:"validate",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var o={};n.host=n.host||location.protocol+"//"+location.host;if(typeof t.id==="number"||typeof t.id==="string"){o.id=parseInt(t.id)}if(typeof t.first_name!=="undefined"){t.firstName=t.first_name}if(typeof t.last_name!=="undefined"){t.lastName=t.last_name}if(typeof t.name==="string"||typeof t.name==="number"){o.name=t.name.toString();if(typeof t.firstName!=="undefined"&&!t.firstName){var i=t.name.split(" ");if(i.length>1){delete i[i.length-1];t.firstName=i.join(" ").trim()}else{t.firstName=o.name}}if(typeof t.lastName!=="undefined"&&!t.lastName){var a=t.name.split(" ");if(a.length>1){t.lastName=a[a.length-1]}else{t.lastName=""}}}if(typeof t.firstName==="string"||typeof t.name==="number"){o.firstName=t.firstName.toString()}if(typeof t.lastName==="string"||typeof t.name==="number"){o.lastName=t.lastName.toString()}if(typeof t.work_position!=="undefined"){t.workPosition=t.work_position}if(typeof t.workPosition==="string"||typeof t.workPosition==="number"){o.workPosition=t.workPosition.toString()}if(typeof t.color==="string"){o.color=t.color}if(typeof t.avatar==="string"){if(!t.avatar||t.avatar.startsWith("http")){o.avatar=t.avatar}else{o.avatar=n.host+t.avatar}}if(typeof t.gender!=="undefined"){o.gender=t.gender==="F"?"F":"M"}if(typeof t.birthday==="string"){o.birthday=t.birthday}if(typeof t.extranet==="boolean"){o.extranet=t.extranet}if(typeof t.network==="boolean"){o.network=t.network}if(typeof t.bot==="boolean"){o.bot=t.bot}if(typeof t.connector==="boolean"){o.connector=t.connector}if(typeof t.external_auth_id!=="undefined"){t.externalAuthId=t.external_auth_id}if(typeof t.externalAuthId==="string"&&t.externalAuthId){o.externalAuthId=t.externalAuthId}if(typeof t.status==="string"){o.status=t.status}if(typeof t.idle!=="undefined"){if(t.idle instanceof Date){o.idle=t.idle}else if(typeof t.idle==="string"){o.idle=new Date(t.idle)}else{o.idle=false}}if(typeof t.last_activity_date!=="undefined"){t.lastActivityDate=t.last_activity_date}if(typeof t.lastActivityDate!=="undefined"){if(t.lastActivityDate instanceof Date){o.lastActivityDate=t.lastActivityDate}else if(typeof t.lastActivityDate==="string"){o.lastActivityDate=new Date(t.lastActivityDate)}else{o.lastActivityDate=false}}if(typeof t.mobile_last_date!=="undefined"){t.mobileLastDate=t.mobile_last_date}if(typeof t.mobileLastDate!=="undefined"){if(t.mobileLastDate instanceof Date){o.mobileLastDate=t.mobileLastDate}else if(typeof t.mobileLastDate==="string"){o.mobileLastDate=new Date(t.mobileLastDate)}else{o.mobileLastDate=false}}if(typeof t.departments!=="undefined"){o.departments=[];if(t.departments instanceof Array){t.departments.forEach(function(e){e=parseInt(e);if(e>0){o.departments.push(e)}})}}if(typeof t.absent!=="undefined"){if(t.absent instanceof Date){o.absent=t.absent}else if(typeof t.absent==="string"){o.absent=new Date(t.absent)}else{o.absent=false}}if(babelHelpers.typeof(t.phones)==="object"&&!t.phones){if(typeof t.phones.work_phone!=="undefined"){t.phones.workPhone=t.phones.work_phone}if(typeof t.phones.workPhone==="string"||typeof t.phones.workPhone==="number"){o.phones.workPhone=t.phones.workPhone.toString()}if(typeof t.phones.personal_mobile!=="undefined"){t.phones.personalMobile=t.phones.personal_mobile}if(typeof t.phones.personalMobile==="string"||typeof t.phones.personalMobile==="number"){o.phones.personalMobile=t.phones.personalMobile.toString()}if(typeof t.phones.personal_phone!=="undefined"){t.phones.personalPhone=t.phones.personal_phone}if(typeof t.phones.personalPhone==="string"||typeof t.phones.personalPhone==="number"){o.phones.personalPhone=t.phones.personalPhone.toString()}}return o}}]);return e}();if(!window.BX){window.BX={}}if(typeof window.BX.Messenger=="undefined"){window.BX.Messenger={}}if(typeof window.BX.Messenger.Model=="undefined"){window.BX.Messenger.Model={}}if(typeof window.BX.Messenger.Model.Users=="undefined"){BX.Messenger.Model.Users=t}})(this.window=this.window||{}); //# sourceMappingURL=messenger.model.users.bundle.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings