diff --git a/branding/info/ai/aiModelEdit.html b/branding/info/ai/aiModelEdit.html index 444854a5..fd99f2cf 100644 --- a/branding/info/ai/aiModelEdit.html +++ b/branding/info/ai/aiModelEdit.html @@ -20,14 +20,14 @@ Edit action - - + + - + diff --git a/branding/info/ai/aiModelsList.html b/branding/info/ai/aiModelsList.html index 859d4d00..03ad5b88 100644 --- a/branding/info/ai/aiModelsList.html +++ b/branding/info/ai/aiModelsList.html @@ -20,12 +20,12 @@ AI Models list - - + + - + diff --git a/branding/info/ai/settings.html b/branding/info/ai/settings.html index dc93ebf5..37f1c7a7 100644 --- a/branding/info/ai/settings.html +++ b/branding/info/ai/settings.html @@ -20,13 +20,13 @@ Settings - - + + - + diff --git a/branding/info/css/plugins.css b/branding/info/css/plugins.css new file mode 100644 index 00000000..d4397bd8 --- /dev/null +++ b/branding/info/css/plugins.css @@ -0,0 +1,666 @@ +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 11px; +} + +/* button */ + +.btn-text-default { + background: #fff; + border: 1px solid #cfcfcf; + border-radius: 2px; + color: #444444; + font-size: 11px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + height: 22px; + cursor: pointer; +} + +.btn-text-default::-moz-focus-inner { + border: 0; + padding: 0; +} + +.btn-text-default.submit { + font-weight: bold; + background-color: #d8dadc; + border: 1px solid transparent; +} + +.btn-text-default.submit.primary { + color: #fff; + background-color: #7d858c; +} + +.btn-text-default:focus { + outline: 0; + outline-offset: 0; +} + +.btn-text-default:hover { + background-color: #d8dadc; +} + +.btn-text-default.submit:hover { + background-color: #cbced1; +} + +.btn-text-default.primary:hover { + background-color: #666d73 !important; + color: #fff; +} + +.btn-text-default:active, +.btn-text-default.active { + background-color: #7d858c !important; + color: white; + -webkit-box-shadow: none; + box-shadow: none; + border: 1px solid transparent; +} + +.btn-text-default[disabled]:hover, +.btn-text-default.disabled:hover, +.btn-text-default[disabled]:active, +.btn-text-default[disabled].active, +.btn-text-default.disabled:active, +.btn-text-default.disabled.active { + background-color: #fff !important; + color: #444444; + cursor: default; +} + +.btn-text-default[disabled], +.btn-text-default.disabled { + opacity: 0.65; +} + +.btn-edit { + width: 13px; + height: 13px; + cursor: pointer; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGZSURBVHgBfZI/y4FRGMavx7+SRQaTTQab74CVlBKL/FukDGQhEgsDNh/Apiw+gcXm70DJoEikKMUk7vec8/Yi75O7Tj2d+/4913Wuc6Tz+UyQqev1itvtBr1e/6+nkgP2+z0qlYr4DgaDsNls36HtdotisYhoNAqLxYJyuSz230HFO7DZbISC0+lEp9OBRqNBLpdDq9XCeDx+DfIz8TWZTIhZodFoRMvlknw+H8XjcdrtdrRarYgpU6/XE7MC4oMc4OB8Pie/30/ZbJba7TYlk0k6HA4CDIVCxNyQYrFYoNFoIJ1OQ5Ik5PN5WK1WpFIprNdr8H61WhVn5X2VisXg8XhoNpvRYDAgt9tNbICOxyOVSiVyuVzU7/epXq9TIBAQtrkzxeVygclkQrfbhd1uRzgcRq1Ww3A4FKparRbspyJRo9H4G4TD4RD06XQS3pkt8nq9NJ1OiSVGsVjsqfC3nvekVCrxeDxgMBgQiUTEa2g2m8hkMi8FuXtSq9VIJBK43+8iHB7GJ8BL4vY+N3U6HQqFAsxmM+TqB5Je/SVNoN18AAAAAElFTkSuQmCC'); +} + +/* div button */ +div.btn-text-default { + height: fit-content !important; + min-height: 20px; +} + +/* input, textarea */ + +.form-control { + border: 1px solid #cfcfcf; + border-radius: 2px; + box-sizing: border-box; + color: #444444; + font-size: 11px; + height: 22px; + padding: 1px 3px; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.form-control:focus { + border-color: #848484; + outline: 0; + -webkit-box-shadow: none; + box-shadow: none; +} + +.form-control[readonly] { + background-color: #fff; + cursor: pointer; +} + +.form-control[disabled] { + background-color: #fff; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + opacity: 0.65; +} + +textarea.form-control { + resize: none; +} + +input[type='checkbox'].form-control { + height: auto; + margin: 0; +} + +@supports(-webkit-appearance: none) or (-moz-appearance: none) { + input[type='checkbox'].form-control { + -webkit-appearance: none; + -moz-appearance: none; + width: 14px; + height: 14px; + background: #fff; + border: 1px solid #cfcfcf; + border-radius: 2px; + padding: 0; + position: relative; + margin: 0; + } + + input[type='checkbox'].form-control:checked:after { + content: ''; + position: absolute; + border: solid #444444; + border-width: 0 2px 2px 0; + transform: rotate(45deg); + width: 3px; + height: 7px; + left: 4px; + } + + input[type='checkbox'].form-control:disabled { + opacity: .5; + } + + input[type='radio'].form-control { + appearance: none; + -webkit-appearance: none; + border: 2px solid #fff; + border-radius: 100%; + box-shadow: 0 0 0 1px #cfcfcf; + height: 12px; + width: 12px; + accent-color: #444; + margin: 0 0 1px; + background-color: #fff; + } + + input[type='radio'].form-control:checked { + background-color: #444; + } + + input[type='radio'].form-control:disabled { + opacity: .5; + } +} +/* label */ + +label.link { + border-bottom: 1px dotted #aaa; + cursor: pointer; +} + +label.for-combo { + height: 22px; + padding-top: 4px; +} + +label.header { + font-weight: bold; +} + +/* comments */ + +.user-comment-item { + padding: 5px 0; + width: 100%; +} + +.user-comment-item .main-actions{ + width: 100%; + display: flex; + padding-bottom: 8px; + font-size: 12px; +} + +.user-comment-item .form-control.user-check { + margin-right: 5px; + flex-grow: 0; + flex-shrink: 0; +} + +.user-comment-item .user-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-weight: bold; + max-width: 40%; +} + +.user-comment-item .user-message { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex-grow: 1; + margin-left: 2px; +} + +.user-comment-item .btn-edit { + width: 13px; + height: 13px; + margin-left: 5px; + flex-grow: 0; + flex-shrink: 0; + cursor: pointer; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGZSURBVHgBfZI/y4FRGMavx7+SRQaTTQab74CVlBKL/FukDGQhEgsDNh/Apiw+gcXm70DJoEikKMUk7vec8/Yi75O7Tj2d+/4913Wuc6Tz+UyQqev1itvtBr1e/6+nkgP2+z0qlYr4DgaDsNls36HtdotisYhoNAqLxYJyuSz230HFO7DZbISC0+lEp9OBRqNBLpdDq9XCeDx+DfIz8TWZTIhZodFoRMvlknw+H8XjcdrtdrRarYgpU6/XE7MC4oMc4OB8Pie/30/ZbJba7TYlk0k6HA4CDIVCxNyQYrFYoNFoIJ1OQ5Ik5PN5WK1WpFIprNdr8H61WhVn5X2VisXg8XhoNpvRYDAgt9tNbICOxyOVSiVyuVzU7/epXq9TIBAQtrkzxeVygclkQrfbhd1uRzgcRq1Ww3A4FKparRbspyJRo9H4G4TD4RD06XQS3pkt8nq9NJ1OiSVGsVjsqfC3nvekVCrxeDxgMBgQiUTEa2g2m8hkMi8FuXtSq9VIJBK43+8iHB7GJ8BL4vY+N3U6HQqFAsxmM+TqB5Je/SVNoN18AAAAAElFTkSuQmCC'); +} + +.user-comment-item .reply-actions, +.user-comment-item .comment-edit { + padding-left: 18px; + padding-bottom: 10px; +} + +.user-comment-item .reply-view { + padding-left: 18px; +} + +.user-comment-item .reply-view .comment-edit{ + padding-left: 0; +} + +.user-comment-item .msg-edit { + width: 100%; + height: 45px; + margin-bottom: 3px; +} + +.user-comment-item .reply-accept { + margin-bottom: 7px; +} + +.user-comment-item .reply-accept label, +.user-comment-item .reply-accept .user-check { + vertical-align: middle; +} + +/* common styles */ + +.hidden { + display: none; +} + +.separator.horizontal { + width: 100%; + height: 0; + border-left: none; + border-right: none; + border-top: 1px solid #cbcbcb; +} + +.defaultlable { + color: #444444; + cursor: default; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 11px; + font-weight: normal; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + + +.defaultcenterlable { + color: #444444; + cursor: default; + text-align: center; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 11px; + font-style: normal; + font-weight: normal; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + margin: 0px; + padding: 0px; + width: 100%; +} + + +.aboutlable { + color: #444444; + cursor: default; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-weight: normal; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +a.aboutlink { + color: #444444; + text-decoration: none; +} + +a.aboutlink:hover { + text-decoration: underline; +} +a.aboutlink:active { + text-decoration: underline; +} + +.noselect{ + -khtml-user-select: none; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; +} + +.select2-dropdown, +.select2-container--default .select2-selection--single { + border: 1px solid #cfcfcf !important; +} + +.select2-container--default.select2-container--open .select2-selection--single, +.select2-container--default.select2-container--focus:not(.select2-container--disabled) .select2-selection--single{ + border-color: #848484 !important; +} + +.select2-container .select2-selection--single .select2-selection__rendered, +.select2-results__options { + font-size: 11px !important; +} + +.select2-container--default .select2-selection--single .select2-selection__rendered { + line-height: 20px !important; +} + +.select2-container--default .select2-results__option[aria-selected=true] { + color: #ffffff; +} + +.select2-container--default .select2-selection--single .select2-selection__arrow b{ + width: 4px !important; + height: 4px !important; + margin: -1px 1px !important; + border: solid 1px #444 !important; + border-bottom: none !important; + border-right: none !important; + background-image: none; + box-sizing: border-box; + + transition: transform 0.2s ease; + transform: rotate(-135deg) translate(1px,1px); +} +.select2-container--default .select2-search .select2-selection__arrow b { + width: 4px !important; + height: 4px !important; + margin: -1px 1px !important; + border: solid 1px #404040 !important; + border-bottom: none !important; + border-right: none !important; + background-image: none; + box-sizing: border-box; + transition: transform 0.2s ease; + transform: rotate(-135deg) translate(1px,1px); + left: 50%; + position: absolute; + top: 50%; +} +.select2-search--dropdown { + padding: 0px !important; +} + +.select2-container--default.select2-container--open .select2-selection__arrow b{ + transform: rotate(45deg); +} + +.select2-container--default .select2-search--dropdown .select2-search__field { + outline: none; + border-color: #cfcfcf; + border-radius: 2px; + font-size: 11px; +} +.select2-search.select2-search--dropdown .select2-selection__arrow { + height: 20px; + position: absolute; + top: 1px; + right: 1px; + width: 20px; +} +.select2-container--default .select2-results__option--highlighted[aria-selected] { + background-color: #d8dadc !important; +} + +.select2-container--default .select2-results__option--highlighted[aria-selected=true] { + background-color: #7d858c !important; +} +.select2-search.select2-search--dropdown .select2-selection__arrow { + cursor: pointer !important +} +.select2-container { + max-height : 20px !important; +} +.select2-container--default.select2-container--disabled{ + opacity: 0.65 !important +} +/* + * Container style + */ +.ps { + overflow: hidden !important; + overflow-anchor: none; + -ms-overflow-style: none; + touch-action: auto; + -ms-touch-action: auto; +} + +/* + * Scrollbar rail styles + */ +.ps__rail-x { + display: none; + bottom: 2px; /* there must be 'right' for ps-scrollbar-y-rail */ + height: 9px; + margin: 0 2px 0 2px; + /* please don't change 'position' */ + position: absolute; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + transition: background-color .2s linear, opacity .2s linear; +} + +.ps__rail-y { + display: none; + right: 2px; /* there must be 'right' for ps-scrollbar-y-rail */ + width: 9px; + margin: 2px 0 2px 0; + /* please don't change 'position' */ + position: absolute; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + transition: background-color .2s linear, opacity .2s linear; +} + +.ps--active-x > .ps__rail-x, +.ps--active-y > .ps__rail-y { + display: block; + background-color: transparent; +} + +.ps .ps__rail-x:hover, +.ps .ps__rail-y:hover, +.ps .ps__rail-x:focus, +.ps .ps__rail-y:focus, +.ps .ps__rail-x.ps--clicking, +.ps .ps__rail-y.ps--clicking { + background-color: #EEEEEE; +} + +/* + * Scrollbar thumb styles + */ +.ps__thumb-x { + position: absolute; /* please don't change 'position' */ + bottom: 0; /* there must be 'bottom' for ps-scrollbar-x */ + height: 9px; + background-color: rgb(241, 241, 241); + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + visibility: visible; + display: block; + box-sizing: border-box; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAOCAYAAAD0f5bSAAAACXBIWXMAAB2HAAAdhwGP5fFlAAAALElEQVQokWNgoBs4f/78f1JpJnIsIkvTsAQfP378TypNxyD/+PEjyRrJsgkAKS81km7nDNQAAAAASUVORK5CYII=); + image-rendering: pixelated; + background-repeat: no-repeat; + background-position: center 0; + border: 1px solid #cfcfcf; +} + +.ps__thumb-y { + position: absolute; /* please don't change 'position' */ + right: 0; /* there must be 'right' for ps-scrollbar-y */ + width: 9px; + background-color: rgb(241, 241, 241); + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + visibility: visible; + display: block; + box-sizing: border-box; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAQAAAAz1Zf0AAAAIUlEQVR42mNgAILz/0GQAQo+/gdBBqLAqE5ydH5k+sgEANHgUH2JtDRHAAAAAElFTkSuQmCC); + image-rendering: pixelated; + background-repeat: no-repeat; + background-position: 0 center; + border: 1px solid #cfcfcf; +} + +.ps__rail-x:hover > .ps__thumb-x { + background-color: rgb(207, 207, 207); +} +.ps__thumb-x:hover { + background-position: center -7px; +} +.ps__rail-x:focus > .ps__thumb-x, +.ps__rail-x.ps--clicking .ps__thumb-x { + background-color: #adadad; + border-color: #adadad; + background-position: center -7px; +} + +.ps__rail-y:hover > .ps__thumb-y { + background-color: rgb(207, 207, 207); +} +.ps__thumb-y:hover { + background-position: -7px center; +} +.ps__rail-y:focus > .ps__thumb-y, +.ps__rail-y.ps--clicking .ps__thumb-y { + background-color: #adadad; + border-color: #adadad; + background-position: -7px center; +} + +/* MS supports */ +@supports (-ms-overflow-style: none) { + .ps { + overflow: auto !important; + } +} + +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .ps { + overflow: auto !important; + } +} + +/* loader */ +@keyframes rotation { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} +.asc-loader-container { + position: relative; +} +.asc-plugin-loader { + position: absolute; + left: 50%; + top: 50%; + margin-top: -10px; + z-index: 10000; + line-height: 20px; + background-image: none; + background-color: transparent; + color: #444444; + transform: translate(-50%, 0); +} +.asc-plugin-loader .asc-loader-image { + height: 20px; + width: 20px; + float: left; + margin-top: -1px; + + + animation-duration: .8s; + animation-name: rotation; + animation-iteration-count: infinite; + animation-timing-function: linear; +} +.asc-loader-image-light { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyOCAyOCI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iMTAuMjUiIHN0cm9rZS1kYXNoYXJyYXk9IjE2MCUsIDQwJSIgLz48L3N2Zz4=); +} +.asc-loader-image-dark { + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PGNpcmNsZSBjeD0iMTAiIGN5PSIxMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNDQ0IiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iNy4yNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTYwJSwgNDAlIiAvPjwvc3ZnPg==); +} + +.asc-plugin-loader .asc-loader-title { + font-size: 13px; + padding-left: 25px; + min-width: 100px; +} + +/* default scroll */ + +/* * { + scrollbar-width: thin; +} */ + +*::-webkit-scrollbar { + width: 9px; + height: 9px; +} + +*::-webkit-scrollbar-thumb { + border-radius: 2px; + border: 1px solid; + image-rendering: pixelated; + background-repeat: no-repeat; + cursor: default; +} + +*::-webkit-scrollbar-track { + cursor: default; +} + +*::-webkit-scrollbar-thumb:vertical { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAQAAAAz1Zf0AAAAIUlEQVR42mNgAILz/0GQAQo+/gdBBqLAqE5ydH5k+sgEANHgUH2JtDRHAAAAAElFTkSuQmCC); + background-position: 0px center; +} + +*::-webkit-scrollbar-thumb:horizontal { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAOCAYAAAD0f5bSAAAACXBIWXMAAB2HAAAdhwGP5fFlAAAALElEQVQokWNgoBs4f/78f1JpJnIsIkvTsAQfP378TypNxyD/+PEjyRrJsgkAKS81km7nDNQAAAAASUVORK5CYII=); + background-position: center 0px; +} + +*::-webkit-scrollbar-thumb:vertical:hover { + background-position: -7px center; +} +*::-webkit-scrollbar-thumb:horizontal:hover { + background-position: center -7px; +} \ No newline at end of file diff --git a/branding/info/js/ai-integration.js b/branding/info/js/ai-integration.js index 1fc36071..48cd3486 100644 --- a/branding/info/js/ai-integration.js +++ b/branding/info/js/ai-integration.js @@ -7,8 +7,6 @@ const AIIntegration = { // Current state currentView: 'settings', isCollapsed: true, - loadedIframes: 0, - totalIframes: 3, // Callback functions onSave: null, @@ -46,7 +44,7 @@ const AIIntegration = {
- + @@ -230,7 +228,6 @@ const AIIntegration = { * @param {string} view - The view to navigate to ('settings', 'aiModelEdit', 'aiModelsList') */ navigateToView(view) { - const previousView = this.currentView; this.currentView = view; this.loadCurrentView(); }, @@ -310,8 +307,5 @@ const AIIntegration = { // Initialize when DOM is ready document.addEventListener('DOMContentLoaded', () => { - // Wait a bit for the main page to load - setTimeout(() => { - AIIntegration.init(); - }, 500); + AIIntegration.init(); }); diff --git a/branding/info/js/plugins-ui.js b/branding/info/js/plugins-ui.js new file mode 100644 index 00000000..9490dfba --- /dev/null +++ b/branding/info/js/plugins-ui.js @@ -0,0 +1,54 @@ +/** + * + * (c) Copyright Ascensio System SIA 2021 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PerfectScrollbar=e()}(this,function(){"use strict";function t(t){return getComputedStyle(t)}function e(t,e){for(var i in e){var r=e[i];"number"==typeof r&&(r+="px"),t.style[i]=r}return t}function i(t){var e=document.createElement("div");return e.className=t,e}function r(t,e){if(!v)throw new Error("No element matching method supported");return v.call(t,e)}function l(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function n(t,e){return Array.prototype.filter.call(t.children,function(t){return r(t,e)})}function o(t,e){var i=t.element.classList,r=m.state.scrolling(e);i.contains(r)?clearTimeout(Y[e]):i.add(r)}function s(t,e){Y[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(m.state.scrolling(e))},t.settings.scrollingThreshold)}function a(t,e){o(t,e),s(t,e)}function c(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function h(t,e,i,r,l){var n=i[0],o=i[1],s=i[2],h=i[3],u=i[4],d=i[5];void 0===r&&(r=!0),void 0===l&&(l=!1);var f=t.element;t.reach[h]=null,f[s]<1&&(t.reach[h]="start"),f[s]>t[n]-t[o]-1&&(t.reach[h]="end"),e&&(f.dispatchEvent(c("ps-scroll-"+h)),e<0?f.dispatchEvent(c("ps-scroll-"+u)):e>0&&f.dispatchEvent(c("ps-scroll-"+d)),r&&a(t,h)),t.reach[h]&&(e||l)&&f.dispatchEvent(c("ps-"+h+"-reach-"+t.reach[h]))}function u(t){return parseInt(t,10)||0}function d(t){return r(t,"input,[contenteditable]")||r(t,"select,[contenteditable]")||r(t,"textarea,[contenteditable]")||r(t,"button,[contenteditable]")}function f(e){var i=t(e);return u(i.width)+u(i.paddingLeft)+u(i.paddingRight)+u(i.borderLeftWidth)+u(i.borderRightWidth)}function p(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function b(t,i){var r={width:i.railXWidth},l=Math.floor(t.scrollTop);i.isRtl?r.left=i.negativeScrollAdjustment+t.scrollLeft+i.containerWidth-i.contentWidth:r.left=t.scrollLeft,i.isScrollbarXUsingBottom?r.bottom=i.scrollbarXBottom-l:r.top=i.scrollbarXTop+l,e(i.scrollbarXRail,r);var n={top:l,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?n.right=i.contentWidth-(i.negativeScrollAdjustment+t.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth:n.right=i.scrollbarYRight-t.scrollLeft:i.isRtl?n.left=i.negativeScrollAdjustment+t.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:n.left=i.scrollbarYLeft+t.scrollLeft,e(i.scrollbarYRail,n),e(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),e(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}function g(t,e){function i(e){b[d]=g+Y*(e[a]-v),o(t,f),R(t),e.stopPropagation(),e.preventDefault()}function r(){s(t,f),t[p].classList.remove(m.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",i)}var l=e[0],n=e[1],a=e[2],c=e[3],h=e[4],u=e[5],d=e[6],f=e[7],p=e[8],b=t.element,g=null,v=null,Y=null;t.event.bind(t[h],"mousedown",function(e){g=b[d],v=e[a],Y=(t[n]-t[l])/(t[c]-t[u]),t.event.bind(t.ownerDocument,"mousemove",i),t.event.once(t.ownerDocument,"mouseup",r),t[p].classList.add(m.state.clicking),e.stopPropagation()/*,e.preventDefault()*/})}var v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),m={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},Y={x:null,y:null},X=function(t){this.element=t,this.handlers={}},w={isEmpty:{configurable:!0}};X.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},X.prototype.unbind=function(t,e){var i=this;this.handlers[t]=this.handlers[t].filter(function(r){return!(!e||r===e)||(i.element.removeEventListener(t,r,!1),!1)})},X.prototype.unbindAll=function(){var t=this;for(var e in t.handlers)t.unbind(e)},w.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(X.prototype,w);var y=function(){this.eventElements=[]};y.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new X(t),this.eventElements.push(e)),e},y.prototype.bind=function(t,e,i){this.eventElement(t).bind(e,i)},y.prototype.unbind=function(t,e,i){var r=this.eventElement(t);r.unbind(e,i),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},y.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},y.prototype.once=function(t,e,i){var r=this.eventElement(t),l=function(t){r.unbind(e,l),i(t)};r.bind(e,l)};var W=function(t,e,i,r,l){void 0===r&&(r=!0),void 0===l&&(l=!1);var n;if("top"===e)n=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");n=["contentWidth","containerWidth","scrollLeft","x","left","right"]}h(t,i,n,r,l)},L={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},R=function(t){var e=t.element,i=Math.floor(e.scrollTop);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(n(e,m.element.rail("x")).forEach(function(t){return l(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(n(e,m.element.rail("y")).forEach(function(t){return l(t)}),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),b(e,t),t.scrollbarXActive?e.classList.add(m.state.active("x")):(e.classList.remove(m.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),t.scrollbarYActive?e.classList.add(m.state.active("y")):(e.classList.remove(m.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)},T={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*t.containerHeight,R(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*t.containerWidth,R(t),e.stopPropagation()})},"drag-thumb":function(t){g(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),g(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){function e(e,r){var l=Math.floor(i.scrollTop);if(0===e){if(!t.scrollbarYActive)return!1;if(0===l&&r>0||l>=t.contentHeight-t.containerHeight&&r<0)return!t.settings.wheelPropagation}var n=i.scrollLeft;if(0===r){if(!t.scrollbarXActive)return!1;if(0===n&&e<0||n>=t.contentWidth-t.containerWidth&&e>0)return!t.settings.wheelPropagation}return!0}var i=t.element,l=function(){return r(i,":hover")},n=function(){return r(t.scrollbarX,":focus")||r(t.scrollbarY,":focus")};t.event.bind(t.ownerDocument,"keydown",function(r){if(!(r.isDefaultPrevented&&r.isDefaultPrevented()||r.defaultPrevented)&&(l()||n())){var o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(d(o))return}var s=0,a=0;switch(r.which){case 37:s=r.metaKey?-t.contentWidth:r.altKey?-t.containerWidth:-30;break;case 38:a=r.metaKey?t.contentHeight:r.altKey?t.containerHeight:30;break;case 39:s=r.metaKey?t.contentWidth:r.altKey?t.containerWidth:30;break;case 40:a=r.metaKey?-t.contentHeight:r.altKey?-t.containerHeight:-30;break;case 32:a=r.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==s||t.settings.suppressScrollY&&0!==a||(i.scrollTop-=a,i.scrollLeft+=s,R(t),e(s,a)&&r.preventDefault())}})},wheel:function(e){function i(t,i){var r=Math.floor(o.scrollTop),l=0===o.scrollTop,n=r+o.offsetHeight===o.scrollHeight,s=0===o.scrollLeft,a=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(i)>Math.abs(t)?l||n:s||a)||!e.settings.wheelPropagation}function r(t){var e=t.deltaX,i=-1*t.deltaY;return void 0!==e&&void 0!==i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!==e&&i!==i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}function l(e,i,r){if(!L.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(e))return!1;for(var l=e;l&&l!==o;){if(l.classList.contains(m.element.consuming))return!0;var n=t(l);if([n.overflow,n.overflowX,n.overflowY].join("").match(/(scroll|auto)/)){var s=l.scrollHeight-l.clientHeight;if(s>0&&!(0===l.scrollTop&&r>0||l.scrollTop===s&&r<0))return!0;var a=l.scrollWidth-l.clientWidth;if(a>0&&!(0===l.scrollLeft&&i<0||l.scrollLeft===a&&i>0))return!0}l=l.parentNode}return!1}function n(t){var n=r(t),s=n[0],a=n[1];if(!l(t.target,s,a)){var c=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(a?o.scrollTop-=a*e.settings.wheelSpeed:o.scrollTop+=s*e.settings.wheelSpeed,c=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?o.scrollLeft+=s*e.settings.wheelSpeed:o.scrollLeft-=a*e.settings.wheelSpeed,c=!0):(o.scrollTop-=a*e.settings.wheelSpeed,o.scrollLeft+=s*e.settings.wheelSpeed),R(e),(c=c||i(s,a))&&!t.ctrlKey&&(t.stopPropagation(),t.preventDefault())}}var o=e.element;void 0!==window.onwheel?e.event.bind(o,"wheel",n):void 0!==window.onmousewheel&&e.event.bind(o,"mousewheel",n)},touch:function(e){function i(t,i){var r=Math.floor(h.scrollTop),l=h.scrollLeft,n=Math.abs(t),o=Math.abs(i);if(o>n){if(i<0&&r===e.contentHeight-e.containerHeight||i>0&&0===r)return 0===window.scrollY&&i>0&&L.isChrome}else if(n>o&&(t<0&&l===e.contentWidth-e.containerWidth||t>0&&0===l))return!0;return!0}function r(t,i){h.scrollTop-=i,h.scrollLeft-=t,R(e)}function l(t){return t.targetTouches?t.targetTouches[0]:t}function n(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function o(t){if(n(t)){var e=l(t);u.pageX=e.pageX,u.pageY=e.pageY,d=(new Date).getTime(),null!==p&&clearInterval(p)}}function s(e,i,r){if(!h.contains(e))return!1;for(var l=e;l&&l!==h;){if(l.classList.contains(m.element.consuming))return!0;var n=t(l);if([n.overflow,n.overflowX,n.overflowY].join("").match(/(scroll|auto)/)){var o=l.scrollHeight-l.clientHeight;if(o>0&&!(0===l.scrollTop&&r>0||l.scrollTop===o&&r<0))return!0;var s=l.scrollLeft-l.clientWidth;if(s>0&&!(0===l.scrollLeft&&i<0||l.scrollLeft===s&&i>0))return!0}l=l.parentNode}return!1}function a(t){if(n(t)){var e=l(t),o={pageX:e.pageX,pageY:e.pageY},a=o.pageX-u.pageX,c=o.pageY-u.pageY;if(s(t.target,a,c))return;r(a,c),u=o;var h=(new Date).getTime(),p=h-d;p>0&&(f.x=a/p,f.y=c/p,d=h),i(a,c)&&t.preventDefault()}}function c(){e.settings.swipeEasing&&(clearInterval(p),p=setInterval(function(){e.isInitialized?clearInterval(p):f.x||f.y?Math.abs(f.x)<.01&&Math.abs(f.y)<.01?clearInterval(p):(r(30*f.x,30*f.y),f.x*=.8,f.y*=.8):clearInterval(p)},10))}if(L.supportsTouch||L.supportsIePointer){var h=e.element,u={},d=0,f={},p=null;L.supportsTouch?(e.event.bind(h,"touchstart",o),e.event.bind(h,"touchmove",a),e.event.bind(h,"touchend",c)):L.supportsIePointer&&(window.PointerEvent?(e.event.bind(h,"pointerdown",o),e.event.bind(h,"pointermove",a),e.event.bind(h,"pointerup",c)):window.MSPointerEvent&&(e.event.bind(h,"MSPointerDown",o),e.event.bind(h,"MSPointerMove",a),e.event.bind(h,"MSPointerUp",c)))}}},H=function(r,l){var n=this;if(void 0===l&&(l={}),"string"==typeof r&&(r=document.querySelector(r)),!r||!r.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=r,r.classList.add(m.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:0.35};for(var o in l)n.settings[o]=l[o];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var s=function(){return r.classList.add(m.state.focus)},a=function(){return r.classList.remove(m.state.focus)};this.isRtl="rtl"===t(r).direction,this.isNegativeScroll=function(){var t=r.scrollLeft,e=null;return r.scrollLeft=-1,e=r.scrollLeft<0,r.scrollLeft=t,e}(),this.negativeScrollAdjustment=this.isNegativeScroll?r.scrollWidth-r.clientWidth:0,this.event=new y,this.ownerDocument=r.ownerDocument||document,this.scrollbarXRail=i(m.element.rail("x")),r.appendChild(this.scrollbarXRail),this.scrollbarX=i(m.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",s),this.event.bind(this.scrollbarX,"blur",a),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var c=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(c.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=u(c.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=u(c.borderLeftWidth)+u(c.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=u(c.marginLeft)+u(c.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=i(m.element.rail("y")),r.appendChild(this.scrollbarYRail),this.scrollbarY=i(m.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",s),this.event.bind(this.scrollbarY,"blur",a),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var h=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(h.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=u(h.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?f(this.scrollbarY):null,this.railBorderYWidth=u(h.borderTopWidth)+u(h.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=u(h.marginTop)+u(h.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:r.scrollLeft<=0?"start":r.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:r.scrollTop<=0?"start":r.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return T[t](n)}),this.lastScrollTop=Math.floor(r.scrollTop),this.lastScrollLeft=r.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),R(this)};return H.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=u(t(this.scrollbarXRail).marginLeft)+u(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=u(t(this.scrollbarYRail).marginTop)+u(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),R(this),W(this,"top",0,!1,!0),W(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},H.prototype.onScroll=function(t){this.isAlive&&(R(this),W(this,"top",this.element.scrollTop-this.lastScrollTop),W(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},H.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},H.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},H}); +var Ps = null; +/** + * + * var loader = showLoader(document.getElementById("parent-id")) + * loader.remove() + * + * parent must have position: relative + */ +showLoader = function (parent, text) { + var themeType = window.Asc && window.Asc.plugin && window.Asc.plugin.theme && window.Asc.plugin.theme.type; + var loader = document.createElement('div'); + loader.className = 'asc-plugin-loader'; + loader.innerHTML = '
' + (text || "Loading") + '
'; + parent.append ? parent.append(loader) : parent.appendChild(loader); + return loader; +}; +// check css load +if (document.currentScript && document.currentScript.src) { + if (document.currentScript.getAttribute("loadCss") === "true") { + var scriptDirectory = document.currentScript.src; + var lastSlash = scriptDirectory.lastIndexOf("/"); + if (0 < lastSlash) scriptDirectory = scriptDirectory.substr(0, lastSlash); + + var link = document.createElement("link"); + link.rel = "stylesheet"; + link.type = "text/css"; + link.href = scriptDirectory + "/plugins.css"; + document.getElementsByTagName('HEAD')[0].appendChild(link); + } +} +// escape and unescape func +!function(e){function n(n){function t(e){return n[e]}var e="(?:"+Object.keys(n).join("|")+")",u=RegExp(e),c=RegExp(e,"g");return function(e){return e=null==e?"":""+e,u.test(e)?e.replace(c,t):e}}escape=n({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),unescape=n({"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"}),e.escape=escape,e.unescape=unescape}(window); + +// select2 fix search field +var select2_amd,select2_defaults;"undefined"!=typeof jQuery&&null!=$.fn.select2&&(select2_amd=$.fn.select2.amd,select2_defaults=$.fn.select2.defaults,$.fn.select2.amd.define("SearchableSingleSelection",["select2/utils","select2/selection/single","select2/selection/eventRelay","select2/dropdown/search"],function(e,t,n,l){var s=e.Decorate(t,l);(s=e.Decorate(s,n)).prototype.render=function(){var e=l.prototype.render.call(this,t.prototype.render);return this.$searchContainer.hide(),this.$element.siblings(".select2").find(".selection").prepend(this.$searchContainer),e};var c=s.prototype.bind;return s.prototype.bind=function(e){var t=this;c.apply(this,arguments),e.on("open",function(){t.$selection.hide(),t.$searchContainer.show()}),e.on("close",function(){t.$searchContainer.hide(),t.$selection.show()})},s}),$.fn.select2.amd.define("UnsearchableDropdown",["select2/utils","select2/dropdown","select2/dropdown/attachBody","select2/dropdown/closeOnSelect"],function(e,t,n,l){n=e.Decorate(t,n);return n=e.Decorate(n,l)}),select2_amd.define("jquery.select2_",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(s,e,c,t,o){var r;return null!=s.fn.select2&&(r=["open","close","destroy"],s.fn.select2=function(l){if((l=l||{}).selectionAdapter=!1!==l.selectionAdapter?select2_amd.require("SearchableSingleSelection"):void 0,l.dropdownAdapter=!1!==l.dropdownAdapter?select2_amd.require("UnsearchableDropdown"):void 0,"object"==typeof l)return this.each(function(){var e=s.extend(!0,{},l),t=new c(s(this),e),n=s(this).next().find(".select2-search.select2-search--dropdown"),e=s(this).next().find("span.selection").find(".select2-selection__arrow").clone();s(e).click(function(){t.close()}),e.appendTo(n)}),this;if("string"!=typeof l)throw new Error("Invalid arguments for Select2: "+l);var t,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+l+"') method was called on an element that is not using Select2."),t=e[l].apply(e,n)}),-1f&&(f=c.length),c.substring(a,f)):t}function l(){var a=m("windowID");a&&(b.Asc.plugin.windowID=a, +b.Asc.plugin.guid||(b.Asc.plugin.guid=decodeURIComponent(m("guid"))));return t!==a?!0:!1}function n(a){if(b.Asc&&b.Asc.plugin)if(b.plugin_onMessage)b.Asc.supportOrigins[a.origin]&&b.plugin_onMessage(a);else if(b.Asc.plugin._initInternal&&"string"==typeof a.data){var c={};try{c=JSON.parse(a.data)}catch(f){c={}}"plugin_init"==c.type&&(b.Asc.supportOrigins[a.origin]=!0,b.Asc.plugin.ie_channel_check(a),eval(c.data))}}b.Asc=b.Asc||{};b.Asc.plugin={};b.Asc.plugin.ie_channel=null;b.Asc.plugin.ie_channel_check= +function(a){var c=navigator.userAgent.toLowerCase();(-1