uawdijnntqw1x1x1
IP : 3.21.248.226
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
b24.axolotl.ru
/
public_html
/
rpa
/
.
/
..
/
bitrix
/
js
/
im
/
desktop.min.js
/
/
(function(e){if(e.BX.desktop)return;var t=e.BX;var o=function(){this.apiReady=typeof BXDesktopSystem!="undefined"||typeof BXDesktopWindow!="undefined";this.clientVersion=0;this.disableLogin=false;this.autorun=null;this.telemetry=null;this.lastSetIcon=null;this.currentIcon=null;this.showNotifyId={};this.htmlWrapperHead=null;this.topmostWindow=null;this.topmostWindowTimeout=null;this.path={};this.path.mainUserOptions="/desktop_app/options.ajax.php";this.path.pathToAjax="/desktop_app/im.ajax.php";this.path.pathToPull="/desktop_app/pull.ajax.php";this.tabItems={};this.tabRedrawTimeout=null;this.syncStatus=null;this.syncPauseBlock=false;this.inited=false;this.sizeInited=false;BXDesktopSystem.LogInfo=function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++){o[n]=arguments[n]}var s=t.Messenger.Lib.Logger;s.desktop.apply(s,o)};this.minWidth=515;this.minHeight=384;this.timeoutDelayOfLogout=null;this.eventHandlers={};this.addCustomEvent("bxImLogoutInit",t.delegate((function(e,t){this.logout(e,t,true)}),this));t.bind(e,"keydown",t.delegate((function(e){if(e.keyCode==82&&(e.ctrlKey==true||e.metaKey==true)){if(typeof BXIM==="undefined"||!BXIM.callController.hasActiveCall()){console.log("NOTICE: User use /windowReload");this.windowReload()}}else if(e.keyCode==68&&(e.ctrlKey==true||e.metaKey==true)&&e.shiftKey==true){this.openDeveloperTools();console.log("NOTICE: User use /openDeveloperTools")}else if(e.keyCode==76&&(e.ctrlKey==true||e.metaKey==true)&&e.shiftKey==true){this.openLogsFolder();console.log("NOTICE: User use /openLogsFolder")}}),this))};o.prototype.init=function(o){o=o||{};if(this.inited){return true}this.inited=true;if(this.ready()){console.log(t.message("BXD_DEFAULT_TITLE").replace("#VERSION#",this.getApiVersion(true)))}if(this.enableInVersion(45)){t.debugEnable(true)}else{if(!t.browser.IsMac()&&document.head)document.head.insertBefore(t.create("style",{attrs:{type:"text/css"},html:"@font-face { font-family: 'helvetica neue'; src: local('Arial'); } @font-face { font-family: 'Helvetica'; src: local('Arial'); }"}),document.head.firstChild);if(this.ready()){t.ready((function(){t.addClass(document.body,"bx-desktop")}))}else{t.ready((function(){t.addClass(document.body,"im-desktop-content")}))}this.setWindowResizable(true);this.setWindowMinSize({Width:t.MessengerWindow.minWidth,Height:t.MessengerWindow.minHeight})}t.addCustomEvent("onMessengerWindowInit",t.delegate((function(){this.userInfo=t.MessengerWindow.getUserInfo();this.contentMenu=t.MessengerWindow.contentMenu;this.content=t.MessengerWindow.content;if(!this.enableInVersion(45)){t.onCustomEvent(e,"onDesktopInit",[this]);t.desktop.onCustomEvent("onDesktopInit",[this])}}),this));t.addCustomEvent("onPullRevisionUp",(function(o,n){t.PULL.closeConfirm();console.log("NOTICE: Window reload, becouse PULL REVISION UP ("+n+" -> "+o+")");t.onCustomEvent(e,"onDesktopReload",[this]);location.reload()}));t.addCustomEvent("onPullError",t.delegate((function(e,t){if(e=="AUTHORIZE_ERROR"){this.setIconStatus("offline");this.login((function(){console.log("DESKTOP LOGIN: success after PullError")}))}else if(e=="RECONNECT"){this.setIconStatus("offline")}}),this));t.addCustomEvent("onImError",t.delegate((function(e,o){if(e=="AUTHORIZE_ERROR"||e=="SEND_ERROR"&&o=="AUTHORIZE_ERROR"){this.setIconStatus("offline");this.login(t.delegate((function(){this.setIconStatus("online");var e="DESKTOP LOGIN: success after ImError";console.log(e);if(typeof BXIM!="undefined"){t.desktop.log("phone."+BXIM.userEmail+".log",e);BXIM.messenger.connectionStatus("online",false)}}),this))}else if(e=="CONNECT_ERROR"){this.setIconStatus("offline")}}),this));this.addCustomEvent("BXChangeTab",t.delegate((function(e){this.changeTab(e)}),this));this.addCustomEvent("BXTrayConstructMenu",t.delegate((function(){this.onCustomEvent("main","BXTrayMenu",[]);setTimeout((function(){t.desktop.finalizeTrayMenu()}))}),this));this.addCustomEvent("BXFileStorageSyncPauseChanged",t.delegate(this.onSyncStatusChanged,this));if(this.ready()){if(!this.enableInVersion(45)){t.userOptions.setAjaxPath(this.path.mainUserOptions)}t.addCustomEvent("onPullStatus",t.delegate((function(e){if(e=="offline")this.setIconStatus("offline");else this.setIconStatus(BXIM&&BXIM.settings?BXIM.settings.status:"online")}),this));t.bind(e,"online",t.delegate((function(){this.setIconStatus(BXIM&&BXIM.settings?BXIM.settings.status:"online")}),this));t.bind(e,"offline",t.delegate((function(){this.setIconStatus("offline")}),this));this.addCustomEvent("BXWakeAction",t.delegate((function(){this.setIconStatus(BXIM&&BXIM.settings?BXIM.settings.status:"online")}),this));this.addCustomEvent("BXSleepAction",t.delegate((function(){this.setIconStatus("offline")}),this));this.addCustomEvent("BXExitApplication",t.delegate((function(){this.preventShutdown();this.logout(true,"exit_event")}),this));if(this.enableInVersion(45)){t.onCustomEvent(e,"onDesktopInit",[this]);t.desktop.onCustomEvent("onDesktopInit",[this])}}};o.prototype.notSupported=function(){this.setWindowMinSize({Width:864,Height:493});this.setWindowSize({Width:864,Height:493});this.setWindowTitle(t.message("BXD_DEFAULT_TITLE").replace("#VERSION#",this.getApiVersion(true)));var o=t.create("div",{props:{className:"bx-desktop-update-box"},children:[t.create("div",{props:{className:"bx-desktop-update-box-text"},html:t.message("BXD_NEED_UPDATE")}),t.create("div",{props:{className:"bx-desktop-update-box-btn"},events:{click:t.delegate((function(){this.checkUpdate(true)}),this)},html:t.message("BXD_NEED_UPDATE_BTN")})]});t.ready((function(){document.body.innerHTML="";document.body.appendChild(o);t.onCustomEvent(e,"onDesktopOutdated",[this])}))};o.prototype.withoutPushServer=function(){this.setWindowMinSize({Width:864,Height:493});this.setWindowSize({Width:864,Height:493});this.setWindowTitle(t.message("BXD_DEFAULT_TITLE").replace("#VERSION#",this.getApiVersion(true)));var o=t.create("div",{props:{className:"bx-desktop-update-box"},children:[t.create("div",{props:{className:"bx-desktop-update-box-text"},html:t.message("IM_M_PP_SERVER_ERROR")}),t.create("div",{props:{className:"bx-desktop-update-box-btn"},events:{click:t.delegate((function(){if(BXIM.bitrixIntranet){t.Helper.show("redirect=detail&code=12715116")}else{t.MessengerCommon.openLink(t.message("IM_M_PP_SERVER_ERROR_BUS_LINK"))}}),this)},html:t.message("IM_M_PP_SERVER_ERROR_MORE")})]});t.ready((function(){document.body.innerHTML="";document.body.appendChild(o);t.onCustomEvent(e,"onDesktopOutdated",[this])}))};o.prototype.hideLoader=function(){t.remove(t("bx-desktop-loader"))};o.prototype.getBackgroundImage=function(){if(!this.apiReady){return{id:"none",source:""}}var e=BXDesktopSystem.QuerySettings("bxd_camera_background","");if(e&&!e.startsWith("file://")){e="file://"+e}return{id:BXDesktopSystem.QuerySettings("bxd_camera_background_id")||"none",source:e}};o.prototype.setBackgroundImage=function(e,o){if(o==="none"||o===""){o=""}else if(o==="blur"){}else if(o==="gaussianBlur"){o="GaussianBlur"}else{try{var n=new URL(o,location.origin);o=n.href;if(o){if(o.startsWith("file:///")){o=o.substr(8)}else if(o.startsWith("file://")){o=o.substr(7)}}}catch(e){o=""}}var s=new t.Promise;setTimeout((function(){BXDesktopSystem.StoreSettings("bxd_camera_background_id",e);BXDesktopSystem.StoreSettings("bxd_camera_background",o);s.resolve()}),100);return s};o.prototype.getCurrentUrl=function(){return document.location.protocol+"//"+document.location.hostname+(document.location.port==""?"":":"+document.location.port)};o.prototype.ready=function(){return this.apiReady};o.prototype.diskReady=function(){return this.apiReady&&typeof BXFileStorage!="undefined"};o.prototype.login=function(e){if(this.disableLogin){console.log("DESKTOP LOGIN: command was disabled");return false}var o="DESKTOP LOGIN: try to login";console.log(o);if(typeof BXIM!="undefined"){t.desktop.log("phone."+BXIM.userEmail+".log",o)}if(!this.ready()){this.windowReload();return false}if(this.currentIcon==="offline"){this.setIconStatus(this.lastSetIcon)}var n={};if(typeof e=="function"){n.success=t.delegate((function(o){if(typeof o=="string"){t.message({bitrix_sessid:o})}e(o);this.onCustomEvent("main","BXLoginSuccess",[o])}),this)}else{n.success=t.delegate(this.loginSuccessCallback,this)}BXDesktopSystem.Login(n);return true};o.prototype.loginSuccessCallback=function(e){if(typeof e=="string"){t.message({bitrix_sessid:e})}if(!this.ready())return false;return true};o.prototype.showLoginForm=function(){BXDesktopSystem.Logout(1,"login_form")};o.prototype.windowReload=function(){t.onCustomEvent(e,"onDesktopReload",[this]);location.reload()};o.prototype.logout=function(e,o,n){e=e==true;this.apiReady=false;t.ajax({url:this.path.pathToAjax+"?DESKTOP_LOGOUT",method:"POST",dataType:"json",timeout:30,data:{IM_DESKTOP_LOGOUT:"Y",sessid:t.bitrix_sessid()},onsuccess:t.delegate((function(){if(o)console.log("Logout reason: "+o);if(e)BXDesktopSystem.Shutdown();else BXDesktopSystem.Logout(2)}),this),onfailure:t.delegate((function(){if(o)console.log("Logout reason (fail): "+o);if(e)BXDesktopSystem.Shutdown();else BXDesktopSystem.Logout(3)}),this)});return true};o.prototype.checkUpdate=function(e){if(typeof BXDesktopSystem=="undefined")return false;e=typeof e!="boolean"?false:e;if(!e&&this.enableInVersion(16))BXDesktopSystem.ExecuteCommand("update.check",{NotifyNoUpdates:true,ShowNotifications:true});else this.browse(t.browser.IsMac()?"http://dl.bitrix24.com/b24/bitrix24_desktop.dmg":"http://dl.bitrix24.com/b24/bitrix24_desktop.exe","desktopApp");return true};o.prototype.getApiVersion=function(e){if(typeof BXDesktopSystem=="undefined")return 0;if(!this.clientVersion)this.clientVersion=BXDesktopSystem.GetProperty("versionParts");return e?this.clientVersion.join("."):this.clientVersion[3]};o.prototype.enableInVersion=function(e){if(typeof BXDesktopSystem=="undefined")return false;return this.getApiVersion()>=parseInt(e)};o.prototype.addCustomEvent=function(t,o){if(!this.ready())return false;var n=function(t){var n=[];for(var s in t.detail)n.push(t.detail[s]);o.apply(e,n)};if(!this.eventHandlers[t])this.eventHandlers[t]=[];this.eventHandlers[t].push(n);e.addEventListener(t,n);return true};o.prototype.removeCustomEvents=function(t){if(!this.eventHandlers[t])return false;this.eventHandlers[t].forEach((function(o){e.removeEventListener(t,o)}));this.eventHandlers[t]=[]};o.prototype.onCustomEvent=function(e,t,o){if(!this.ready())return false;if(arguments.length==2){o=t;t=e;e="all"}else if(arguments.length<2){return false}var n={};for(var s=0;s<o.length;s++){n[s]=o[s]}if(e=="all"){try{var i=opener?opener:top;for(var s=0;s<i.BXWindows.length;s++){if(i.BXWindows[s]&&i.BXWindows[s].name!=""&&i.BXWindows[s].BXDesktopWindow&&i.BXWindows[s].BXDesktopWindow.DispatchCustomEvent){i.BXWindows[s].BXDesktopWindow.DispatchCustomEvent(t,n)}}}catch(e){console.warn(e)}try{i.BXDesktopWindow.DispatchCustomEvent(t,n)}catch(e){console.warn(e)}}try{if(typeof e==="object"&&e.hasOwnProperty("BXDesktopWindow")){e.BXDesktopWindow.DispatchCustomEvent(t,n)}else{if(e=this.findWindow(e))e.BXDesktopWindow.DispatchCustomEvent(t,n)}}catch(e){console.warn(e)}return true};o.prototype.findWindow=function(e){if(!this.ready())return null;if(typeof e=="undefined")e="main";var t=opener?opener:top;if(e=="main"){return t}else{for(var o=0;o<t.BXWindows.length;o++){if(t.BXWindows[o]&&t.BXWindows[o].name===e)return t.BXWindows[o]}}return null};o.prototype.windowIsFocused=function(){if(!this.ready())return false;return BXDesktopWindow.GetProperty("isForeground")};o.prototype.openNextTab=function(){if(!this.ready())return false;return BXDesktopSystem.NextTab()};o.prototype.setIconStatus=function(e){if(!this.ready())return false;if(this.currentIcon===e)return false;this.lastSetIcon=!this.lastSetIcon?"online":this.currentIcon;this.currentIcon=e;BXDesktopSystem.SetIconStatus(e);return true};o.prototype.setIconBadge=function(e,t){if(!this.ready())return false;t=t===true;BXDesktopSystem.SetIconBadge(e+"",t);BXDesktopSystem.SetTabBadge(this.getContextWindow(),e+"");return true};o.prototype.setIconTooltip=function(e){if(!this.ready())return false;return BXDesktopSystem.ExecuteCommand("tooltip.change",e)};o.prototype.setWindowResizable=function(e){if(!this.ready())return false;BXDesktopWindow.SetProperty("resizable",e!==false);return false};o.prototype.setWindowClosable=function(e){if(!this.ready())return false;BXDesktopWindow.SetProperty("closable",e!==false);return false};o.prototype.flashIcon=function(e){if(!this.ready())return false;BXDesktopSystem.FlashIcon(e==true);return true};o.prototype.getWorkArea=function(){if(!this.ready())return false;var e=BXDesktopSystem.GetWorkArea();return{top:e[0],left:e[1],right:e[2],bottom:e[3]}};o.prototype.showNotification=function(e,t,o){if(!this.ready()||t=="")return false;if(this.showNotifyId[e])return false;this.showNotifyId[e]=true;BXDesktopSystem.ExecuteCommand("notification.show.html",this.getHtmlPage(t,o,"desktop-notify-popup"));return true};o.prototype.adjustSize=function(e,o){return t.MessengerWindow.adjustSize(e,o)};o.prototype.resize=function(){if(!this.ready())return false;if(!BXIM.init){BXDesktopWindow.SetProperty("clientSize",{Width:document.body.offsetWidth,Height:document.body.offsetHeight})}return true};o.prototype.syncPause=function(o,n){if(!this.diskReady())return false;if(n){this.syncPauseBlock=o}if(!this.syncPauseBlock||this.syncPauseBlock&&n){this.syncStatus=!o;BXFileStorage.SyncPause(!this.syncStatus);t.onCustomEvent(e,"onDesktopSyncPause",[this.syncStatus])}return true};o.prototype.onSyncStatusChanged=function(e){this.syncPause(e,true)};o.prototype.getSyncStatus=function(){return this.syncStatus};o.prototype.windowCommand=function(o,n){if(!this.ready())return false;if(arguments.length==1){n=o;o=e}if(n=="show"&&o==e){t.desktop.setActiveWindow()}try{if(n=="show"||n=="hide"||n=="freeze"||n=="unfreeze"){o.BXDesktopWindow.ExecuteCommand(n)}else if(n=="focus"){o.BXDesktopWindow.ExecuteCommand("show.active")}else if(n=="close"){if(o.opener){if(o.name.indexOf("topmost")>=0||o.name.indexOf("notif")>=0){o.BXDesktopWindow.ExecuteCommand("close")}else{o.close()}}else{o.BXDesktopWindow.ExecuteCommand("hide")}}}catch(e){console.log("ExecuteCommand Error",n,o,e);console.trace()}return true};o.prototype.openTopmostWindow=function(e,t,o){if(!this.ready())return false;this.closeTopmostWindow();this.topmostWindow=BXDesktopSystem.ExecuteCommand("topmost.show.html",this.getHtmlPage(e,t,o));return true};o.prototype.closeTopmostWindow=function(){if(this.topmostWindow){this.windowCommand(this.topmostWindow,"close");this.topmostWindow=null}return true};o.prototype.isPopupPageLoaded=function(){if(!this.enableInVersion(45))return false;if("BXIM"in e&&!e.BXIM.isUtfMode)return false;if(!BXInternals)return false;if(!BXInternals.PopupTemplate)return false;if(BXInternals.PopupTemplate==="#PLACEHOLDER#")return false;return true};o.prototype.getHtmlPage=function(o,n,s,i){if(!this.ready())return;if("BXIM"in e){return e.BXIM.desktop.getHtmlPage(o,n,s,i)}o=o||"";n=n||"";i=i||"";if(o!=""&&t.type.isDomNode(o)){o=o.outerHTML}if(n!=""&&t.type.isDomNode(n)){n=n.outerHTML}if(n!=""){n='<script type="text/javascript">BX.ready(function(){'+n+"});<\/script>"}if(this.isPopupPageLoaded()){return'<div class="im-desktop im-desktop-popup '+i+'">'+o+n+"</div>"}else{if(this.htmlWrapperHead==null){this.htmlWrapperHead=document.head.outerHTML.replace(/BX\.PULL\.start\([^)]*\);/g,"")}return"<!DOCTYPE html><html>"+this.htmlWrapperHead+'<body class="im-desktop im-desktop-popup '+i+'">'+o+n+"</body></html>"}};o.prototype.openDeveloperTools=function(){if(typeof BXDesktopWindow=="undefined")return false;BXDesktopWindow.OpenDeveloperTools();return true};o.prototype.openLogsFolder=function(){if(!this.ready())return false;BXDesktopSystem.OpenLogsFolder();return true};o.prototype.browse=function(e){if(typeof BXDesktopSystem=="undefined")return false;BXDesktopSystem.ExecuteCommand("browse",e);return true};o.prototype.autorunStatus=function(e){if(!this.ready())return false;if(typeof e!="boolean"){if(this.autorun==null){this.autorun=BXDesktopSystem.GetProperty("autostart")}}else{this.autorun=e;BXDesktopSystem.SetProperty("autostart",this.autorun)}return this.autorun};o.prototype.telemetryStatus=function(e){if(!this.ready())return false;if(typeof e!="boolean"){return BXDesktopSystem.QuerySettings("bxd_telemetry","1")==="1"}else{BXDesktopSystem.StoreSettings("bxd_telemetry",e?"1":"0")}return true};o.prototype.cameraSmoothingStatus=function(e){if(!this.ready())return false;if(typeof e!="boolean"){return BXDesktopSystem.QuerySettings("bxd_camera_smoothing","0")==="1"}else{BXDesktopSystem.StoreSettings("bxd_camera_smoothing",e?"1":"0")}return true};o.prototype.cameraSmoothingLambda=function(e){if(!this.ready())return false;if(typeof e==="undefined"){return BXDesktopSystem.QuerySettings("bxd_camera_smoothing_lambda","36")}BXDesktopSystem.StoreSettings("bxd_camera_smoothing_lambda",e.toString());return true};o.prototype.diskAttachStatus=function(){if(!this.ready())return false;return BitrixDisk?BitrixDisk.enabled:false};o.prototype.clipboardSelected=function(o){expandToWholeWord=false;var n="";var s=0;var i=0;if(typeof o=="object"&&(o.tagName=="TEXTAREA"||o.tagName=="INPUT"||!o.tagName)){s=o.selectionStart;i=o.selectionEnd;n=o.value.substring(s,i);if(s==i){if(!(n&&n.indexOf(" ")>-1)){var r=o.value.substr(0,s).search(/([-'`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/\x20])(?!.*[-'`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/\x20])/)+1;var a=o.value.substr(r).search(/[-'`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/\x20]/);a=a>0?a:o.value.length;n=o.value.substr(r,a);s=r;i=r+a}}}else{if(!expandToWholeWord&&e.getSelection().toString().length>0){var u=e.getSelection().getRangeAt(0).cloneContents();var d=document.createElement("div");d.appendChild(u);var p=d.getElementsByClassName("bx-messenger-message");if(p.length>0){var l=[];for(var f in p){if(p.hasOwnProperty(f)){l.push(p[f].innerHTML)}}n=l.join("\n")}else{n=d.innerHTML}}}if(n.length>0){n=t.util.htmlspecialcharsback(n);n=n.split(" ").join("\t");n=n.replace(/<img.*?data-code="([^"]*)".*?>/gi,"$1");n=n.replace(/ /gi," ").replace(/©/,"(c)");n=n.replace(/<div class=\"bx-messenger-hr\"><\/div>/gi,"\n");n=n.replace(/<span class=\"bx-messenger-clear\"><\/span>/gi,"\n");n=n.replace(/<s>([^"]*)<\/s>/gi,"");n=n.replace(/<(\/*)([buis]+)>/gi,"[$1$2]");n=n.replace(/<a.*?href="([^"]*)".*?>.*?<\/a>/gi,"$1");n=n.replace(/------------------------------------------------------(.*?)------------------------------------------------------/gim,"["+t.message("BXD_QUOTE_BLOCK")+"]");n=n.replace(/<br( \/)?>/gi,"\n").replace(/<\/?[^>]+>/gi,"")}return{text:n,selectionStart:s,selectionEnd:i}};o.prototype.clipboardCopy=function(e,o){return t.MessengerCommon.clipboardCopy(e,o)};o.prototype.clipboardCut=function(){return t.MessengerCommon.clipboardCut()};o.prototype.clipboardPaste=function(){if(!this.ready())return false;document.execCommand("paste");return true};o.prototype.clipboardDelete=function(){if(!this.ready())return false;document.execCommand("delete");return true};o.prototype.clipboardUndo=function(){if(!this.ready())return false;document.execCommand("undo");return true};o.prototype.clipboardRedo=function(){if(!this.ready())return false;document.execCommand("redo");return true};o.prototype.clipboardReplaceText=function(e,t,o,n){if(!this.ready())return false;e.focus();e.selectionStart=t;e.selectionEnd=o;if(o-t<n.length){o=t+n.length}document.execCommand("insertText",false,n);e.selectionStart=o;e.selectionEnd=o;return true};o.prototype.selectAll=function(e){if(!this.ready())return false;e.selectionStart=0;return true};o.prototype.getLocalConfig=function(e,t){t=typeof t=="undefined"?null:t;if(!this.ready())return t;var o=BXDesktopSystem.QuerySettings(e,t+"");var n=t;if(typeof o=="string"&&o.length>0){try{n=JSON.parse(o)}catch(e){n=o}}return n};o.prototype.setLocalConfig=function(e,t){if(!this.ready())return false;if(typeof t=="object")t=JSON.stringify(t);else if(typeof t=="boolean")t=t?"true":"false";else if(typeof t=="undefined")t="";else if(typeof t!="string")t=t+"";BXDesktopSystem.StoreSettings(e,t);return true};o.prototype.removeLocalConfig=function(e){if(!this.ready())return false;BXDesktopSystem.StoreSettings(e,null);return true};o.prototype.log=function(e,t){if(!this.ready())return false;BXDesktopSystem.Log(e,t);return true};o.prototype.createWindow=function(e,o,n){n=typeof n==="boolean"?n:false;if(n){var s=t.desktop.findWindow(e);if(s){t.desktop.windowCommand(s,"show");return true}}BXDesktopSystem.GetWindow(e,o)};o.prototype.closeWindow=function(e){if(!Array.isArray(e)){e=[e]}e.forEach((function(e){var o=t.desktop.findWindow(e);if(!o){return true}t.desktop.windowCommand(o,"close")}));return true};o.prototype.getWindowTitle=function(e){if(!this.ready())return false;BXDesktopWindow.GetProperty("title");return true};o.prototype.setWindowTitle=function(e){if(!this.ready())return false;if(typeof e=="undefined")return false;e=t.util.trim(e);if(e.length<=0)return false;BXDesktopWindow.SetProperty("title",e);return true};o.prototype.setWindowPosition=function(e){if(!this.ready())return false;BXDesktopWindow.SetProperty("position",e);return true};o.prototype.setWindowName=function(e){if(!this.ready())return false;BXDesktopWindow.SetProperty("windowName",e.toString());return true};o.prototype.setWindowSize=function(e){if(!this.ready())return false;if(e.Width&&e.Height)t.MessengerWindow.adjustSize(e.Width,e.Height);return true};o.prototype.setWindowMinSize=function(e){if(!this.ready())return false;if(!e.Width||!e.Height)return false;t.MessengerWindow.minWidth=e.Width;t.MessengerWindow.minHeight=e.Height;BXDesktopWindow.SetProperty("minClientSize",e);return true};o.prototype.addTrayMenuItem=function(e){if(!this.ready())return false;BXDesktopWindow.AddTrayMenuItem(e);return true};o.prototype.finalizeTrayMenu=function(){if(!this.ready())return false;BXDesktopWindow.EndTrayMenuItem();return true};o.prototype.preventShutdown=function(){if(!this.ready())return false;BXDesktopSystem.PreventShutdown();return true};o.prototype.diskReportStorageNotification=function(e,t){if(!this.ready())return false;BXDesktopSystem.ReportStorageNotification(e,t);return true};o.prototype.diskOpenFolder=function(){if(!this.ready())return false;BXFileStorage.OpenFolder();return true};o.prototype.addSeparator=function(e){return t.MessengerWindow.addSeparator(e)};o.prototype.addTab=function(e){return t.MessengerWindow.addTab(e)};o.prototype.changeTab=function(e,o){return t.MessengerWindow.changeTab(e,o)};o.prototype.closeTab=function(e){return t.MessengerWindow.closeTab(e)};o.prototype.setTabBadge=function(e,o){return t.MessengerWindow.setTabBadge(e,o)};o.prototype.updateTabBadge=function(){if(!this.ready())return false;var e=0;for(var o in t.MessengerWindow.tabItems){if(t.MessengerWindow.tabItems[o].badge)e+=t.MessengerWindow.tabItems[o].badge}if(e<=0)e="";else if(e>50)e="50+";BXDesktopSystem.SetTabBadge(this.getContextWindow(),e+"")};o.prototype.setTabContent=function(e,o){return t.MessengerWindow.setTabContent(e,o)};o.prototype.isActiveWindow=function(){if(!this.ready())return false;return BXDesktopSystem.IsActiveTab()};o.prototype.getActiveWindow=function(){if(!this.ready())return 1;return BXDesktopSystem.ActiveTab()};o.prototype.getContextWindow=function(){if(!this.ready())return 1;if(this.isActiveWindow()){return this.getActiveWindow()}else{if(this.getActiveWindow()==TAB_CP){return TAB_B24NET}else{return TAB_CP}}};o.prototype.setActiveWindow=function(e){if(!this.ready())return false;if(typeof e!="undefined"){if(e==TAB_B24NET||e==TAB_CP){BXDesktopSystem.SetActiveTabI(e)}}else{BXDesktopSystem.SetActiveTab()}};o.prototype.getUserInfo=function(){return t.MessengerWindow.getUserInfo()};t.desktop=new o})(window); //# sourceMappingURL=desktop.map.js
/var/www/axolotl/data/www/b24.axolotl.ru/public_html/rpa/./../bitrix/js/im/desktop.min.js