next-box 2.5.87 → 2.5.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/classes/api.d.ts +1 -3
- package/index.js +1 -1
- package/package.json +1 -1
package/app/classes/api.d.ts
CHANGED
|
@@ -9,9 +9,7 @@ export declare class Api {
|
|
|
9
9
|
delete: (path: string, params?: Record<string, any>, headers?: Record<string, string>) => Promise<any>;
|
|
10
10
|
};
|
|
11
11
|
changeState(state: AppState): void;
|
|
12
|
-
makeSearchParams(params?:
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}): string;
|
|
12
|
+
makeSearchParams(params?: Record<string, any>): string;
|
|
15
13
|
makeHeaders(headers?: Record<string, string>): Record<string, string>;
|
|
16
14
|
responseJSON(response: Response): Promise<any | Response>;
|
|
17
15
|
/**
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["next-box"]=e():t["next-box"]=e()}(globalThis,()=>(()=>{"use strict";var t={146:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},147:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionApi=void 0;var i=n(915),a="/static/extensions",s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.list=function(){return this.rest.get(a)},e.prototype.getByUniqKey=function(t){return this.rest.get("".concat(a,"/").concat(t))},e}(i.Api);e.ExtensionApi=s},475:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fileInfo=void 0;var r=n(7975).sep,o=n(748);e.fileInfo=function(t){var e={root:"",dir:"",base:"",ext:"",name:""};if(0===(t=(0,o.pathJoin)(r,t)).length)return e;var n,i=t.charCodeAt(0),a=47===i;a?(e.root=r,n=1):n=0;for(var s=-1,c=0,u=-1,p=!0,l=t.length-1,f=0;l>=n;--l)if(47!==(i=t.charCodeAt(l)))-1===u&&(p=!1,u=l+1),46===i?-1===s?s=l:1!==f&&(f=1):-1!==s&&(f=-1);else if(!p){c=l+1;break}return-1===s||-1===u||0===f||1===f&&s===u-1&&s===c+1?-1!==u&&(e.base=e.name=0===c&&a?t.slice(1,u):t.slice(c,u)):(0===c&&a?(e.name=t.slice(1,s),e.base=t.slice(1,u)):(e.name=t.slice(c,s),e.base=t.slice(c,u)),e.ext=t.slice(s,u)),c>0?e.dir=t.slice(0,c-1):a&&(e.dir=r),e}},735:(t,e)=>{var n,r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.UserAuthType=e.UserType=e.UserStatus=void 0,(o=e.UserStatus||(e.UserStatus={})).Registering="registering",o.Activated="activated",o.Blocked="blocked",o.BlockedByLicense="blocked_by_license",(r=e.UserType||(e.UserType={})).User="user",r.Guest="guest",(n=e.UserAuthType||(e.UserAuthType={})).Native="native",n.Ldap="ldap"},748:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pathJoin=void 0;var r=n(7975).sep;e.pathJoin=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=[],o=0,i=t.length;o<i;o++)n=n.concat(t[o].split(r));var a=[];for(o=0,i=n.length;o<i;o++){var s=n[o];s&&"."!==s&&(".."===s?a.pop():a.push(s))}return""===n[0]&&a.unshift(""),a.join(r)||(a.length?r:".")}},915:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(7179),e),o(n(1152),e),o(n(6860),e)},1152:function(t,e,n){var r,o,i,a=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FileEngine=void 0;var s=n(8843),c=n(6738),u=n(6371),p=n(7179),l=Symbol("VERSION"),f=Symbol("CONFIG"),d=Symbol("API"),h=Symbol("UPGRADE"),v=function(t){function e(e,n,r){void 0===r&&(r=(0,u.defaultState)());var a=t.call(this,r)||this;return a[o]=0,a[i]=new Map,a[l]=e,a[f]=n,a[d]=new s.StorageApi,a[d].changeState(r),a}return a(e,t),Object.defineProperty(e.prototype,"name",{get:function(){var t;return(null===(t=this[f])||void 0===t?void 0:t.name)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){var t;return(null===(t=this[f])||void 0===t?void 0:t.path)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullName",{get:function(){return(0,c.pathJoin)(this.path,this.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this[l]},enumerable:!1,configurable:!0}),e.prototype.changeState=function(e){var n;t.prototype.changeState.call(this,e),null===(n=this[d])||void 0===n||n.changeState(e)},e.prototype.migration=function(t,e){if(this[h].has(t))throw"Upgrader migration version ".concat(t," exist");this[h].set(t,e)},e.prototype.info=function(){return this[d].info(this.fullName)},e.prototype.download=function(){var t=this;return this[d].download().then(function(t){return parseInt(t.headers.get("content-length")||"")>0?t.json():""}).then(function(e){var n=null,r=-1;return(0,c.isObject)(e)&&(n=e.body||e||null,r=e.version||-1),t.runMigrate(r,n)})},e.prototype.create=function(t,e){var n=this;return this[d].create(this.name,this.path,"file",e).then(function(){return n.replace(t)})},e.prototype.delete=function(t){return this[d].delete(this.fullName,t)},e.prototype.replace=function(t){return this[d].replace({version:this.version,body:t})},e.prototype.liveReplace=function(t,e){return this[d].liveReplace(JSON.stringify({version:this.version,body:t}),this.path,e)},e.prototype.runMigrate=function(t,e){var n=this,r=Array.from(this[h].keys()).sort(),o=r[r.length-1]||0;return new Promise(function(i,a){var s=e;t<o&&r.forEach(function(e){if(e>t){var r=n[h].get(e);r&&(s=r(s))}}),i(s)})},e}(p.Api);e.FileEngine=v,o=l,i=h},1572:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OrderDirection=void 0,(n=e.OrderDirection||(e.OrderDirection={})).DEFAULT="",n.ASC="asc",n.DESC="desc"},1910:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dirname=void 0;var r=n(7975).sep,o=n(748);e.dirname=function(t){if(0===(t=(0,o.pathJoin)(r,t)).length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?n?r:".":n&&1===i?r+r:t.slice(0,i)}},2070:(t,e)=>{var n,r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.StorageElementContentType=e.StorageElementType=e.StorageRoot=void 0,(o=e.StorageRoot||(e.StorageRoot={})).my="my",o.fca="fca",o.divide="divide",o.share="share",o.favorite="favorite",o.trash="trash",(r=e.StorageElementType||(e.StorageElementType={})).Dir="dir",r.File="file",r.WorkDir="work_dir",(n=e.StorageElementContentType||(e.StorageElementContentType={})).Any="any",n.Dir="dir",n.Code="code",n.Image="image",n.Audio="audio",n.Video="video",n.Text="text",n.Doc="doc",n.Xls="xls",n.Ppt="ppt"},2137:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.defineNbFrameComponent=void 0;var a=n(915),s=n(6738),c=n(6555),u=n(6854),p=n(4582),l=Symbol("ROOT"),f=Symbol("FRAME"),d=Symbol("FRAME_CONFIG"),h=Symbol("TRANSPORT"),v=Symbol("EVENT_EMITTER");e.defineNbFrameComponent=function(){return customElements.define("nb-frame",y)};var y=function(t){function e(){var e=t.call(this)||this;return e.apiPrefix="/api/v1",e.origin=window.location.origin,e.version=1,e.view=p.ViewState.view,e.debug=!1,e.uuid=(0,c.uuid)(),e[n]=new a.EventEmitter,e[r]={transportParams:{version:1,uuid:e.uuid}},e}var n,r;return o(e,t),e.prototype.connectedCallback=function(){this[l]=this.attachShadow({mode:"open"})},e.prototype.disconnectedCallback=function(){var t;null===(t=this[h])||void 0===t||t.destroy()},e.prototype.send=function(t,e){var n;null===(n=this[h])||void 0===n||n.send(t,e)},e.prototype.listen=function(t){this[v].listen(t)},e.prototype.off=function(t,e){this[v].off(t,e)},e.prototype.on=function(t,e){this[v].on(t,e)},Object.defineProperty(e.prototype,"extensionModel",{set:function(t){var e=t.type,n=t.file,r=t.work_dir,o=t.app,i=t.devlocal,a=t.path,s="";e===p.ExtensionType.File&&(s=n.index),e===p.ExtensionType.WorkDir&&(s=r.index),e===p.ExtensionType.App&&(s=o.menu.index),this[d].ext=t,this[d].extSrc=i?s:"".concat(this.apiPrefix,"/extensions/static/").concat(a,"/").concat(s)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transportParams",{get:function(){return i(i({},(0,s.transportProps)()),this[d].transportParams)},set:function(t){this[d].transportParams=i(i({},this[d].transportParams),t),this.uuid=this[d].transportParams.uuid||this.uuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"routeData",{set:function(t){this[d].routeData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{set:function(t){this[d].user=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nvigationState",{set:function(t){this[d].navigationState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"framePath",{get:function(){var t=new URL(this[d].extSrc||"",location.origin);return this.transportParams.host&&(t.hostname=this.transportParams.host),this.transportParams.port&&(t.port=this.transportParams.port.toString()),t.toString()},enumerable:!1,configurable:!0}),e.prototype.run=function(){var t,e,n=this,r=document.createElement("iframe");r.setAttribute("allowfullscreen",""),r.name=JSON.stringify(this.transportParams),r.src=this.framePath;var o=this.resetTransport();return o.listen(function(t,e,r){t===p.TransportEvent.ExtInit&&n.send(p.TransportEvent.AppReady,n.state)}),this[f]=r,this[l]&&(this[l].innerHTML=""),null===(t=this[l])||void 0===t||t.appendChild(this.frameStyle),null===(e=this[l])||void 0===e||e.appendChild(this[f]),o},Object.defineProperty(e.prototype,"state",{get:function(){var t=this[d],e=t.ext,n=t.routeData,r=t.user,o=t.navigationState,i=(0,s.fileInfo)((null==n?void 0:n.path)||"");(null==e?void 0:e.type)===p.ExtensionType.WorkDir&&(i.dir=(0,s.pathJoin)(i.dir,i.base),i.base="",i.name="");var a={},c={};return(null==n?void 0:n.root)===p.StorageRoot.divide&&(a.divide_id=Number(n.rootId),i.dir=(0,s.pathJoin)("/",n.path||""),n.divideDir||(i.dir="/")),(null==n?void 0:n.root)===p.StorageRoot.fca&&(a.disk_id=Number(n.rootId)),(null==n?void 0:n.root)===p.StorageRoot.share&&(a.share_token=n.share_token,c.Authorization="Sharing ".concat(n.share_token),n.share_password&&(a.share_pass=n.share_password),c.SharePass=n.share_password),{debug:!!this.debug,view:this.view,extenstion:{id:(null==e?void 0:e.id)||0,name:(null==e?void 0:e.name)||{ru:""},type:(null==e?void 0:e.type)||p.ExtensionType.File},api:{host:this.origin,prefix:this.apiPrefix,headers:c,query:a},user:r,storage:{info:i,root:(null==n?void 0:n.root)||p.StorageRoot.my,rootID:(null==n?void 0:n.rootId)||0,path:(null==n?void 0:n.path)||""},initialNavigation:o,setting:null==e?void 0:e.settings}},enumerable:!1,configurable:!0}),e.prototype.resetTransport=function(){var t;null===(t=this[h])||void 0===t||t.destroy();var e=new u.NBTransport(this.transportParams);return this[h]=e,this[h].subscribe(),this[h]},Object.defineProperty(e.prototype,"frameStyle",{get:function(){var t=document.createElement("style");return t.textContent="\n iframe {\n display: block;\n width: inherit;\n height: inherit;\n border: none;\n background: none;\n }\n ",t},enumerable:!1,configurable:!0}),n=v,r=d,e.observedAttributes=["apiPrefix","origin","version","view","debug","uuid","navigationState","user"],e}(HTMLElement)},2392:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StaticApi=void 0;var a=n(7179),s=n(6418),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.upload=function(t,e,n){void 0===n&&(n="");var r=new FormData;return r.set("file",t,e),(0,s.sendRequest)(this.makeApiPath(n),{method:"POST",body:r}).then(function(t){return t.json()})},e.prototype.get=function(t){return(0,s.sendRequest)(this.makeApiPath(t),{method:"GET"})},e.prototype.delete=function(t){return(0,s.sendRequest)(this.makeApiPath(t),{method:"DELETE"}).catch(function(t){return t})},e.prototype.makeApiPath=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.makeApiPath.apply(this,i(["static/files"],e,!1))},e}(a.Api);e.StaticApi=c},2636:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2951:(t,e)=>{var n,r,o,i;Object.defineProperty(e,"__esModule",{value:!0}),e.TransportCallEvent=e.TransportNavigationTarget=e.CallNameEvent=e.TransportEvent=void 0,(i=e.TransportEvent||(e.TransportEvent={})).Call="call",i.CallResponse="call-response",i.ExtInit="ext-init",i.ExtChangeContent="ext-change-content",i.ExtOpenModalFilesSelect="ext-open-modal-files-select",i.ExtShowConfirm="ext-show-confirm",i.ExtShowAccessPanel="ext-show-access-panel",i.ExtNavigateTo="ext-navigate-to",i.ExtRequestError="ext-request-error",i.ExtToast="ext-toast",i.ExtSpinner="ext-spinner",i.ExtContext="ext-context",i.ExtTabs="ext-tabs",i.ExtSavedStart="ext-saved-start",i.ExtSavedEnd="ext-saved-end",i.ExtSavedError="ext-saved-error",i.ExtClose="ext-close",i.ExtRejectClose="ext-reject-close",i.ExtUserInteraction="ext-user-interaction",i.AppReload="ext-reload",i.AppReady="app-ready",i.AppChangeState="app-change-state",i.AppSaveAndClose="app-save-and-close",i.AppFilesSelected="app-files-selected",i.AppConfirmAccept="app-confirm-accept",i.AppConfirmReject="app-confirm-reject",i.AppContextAction="app-context-action",i.AppTabAction="app-tab-action",i.AppChangeTheme="app-change-theme",(o=e.CallNameEvent||(e.CallNameEvent={})).Update="update",o.ForceSave="force-save-version",(r=e.TransportNavigationTarget||(e.TransportNavigationTarget={})).Parent="_parent",r.Self="_self",r.Cache="_cache",(n=e.TransportCallEvent||(e.TransportCallEvent={})).Call="call",n.Resolve="resolve",n.Reject="reject"},3111:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=e.NBTransport=e.TransportParentHandlers=e.EngineType=void 0;var a,s=n(2951),c=n(6860),u=n(3440),p=n(7232),l=n(7333),f=n(9995),d=n(6064),h=n(6738),v=n(6555);!function(t){t.WebSocket="websocket",t.PostMessage="postmessage",t.Empty=""}(a=e.EngineType||(e.EngineType={}));var y=(0,d.transportProps)(),g=(0,p.getGlobal)();e.TransportParentHandlers={},g._nb_handlers=e.TransportParentHandlers;var b=function(t){function n(e){var n=t.call(this)||this;return n.instanceUid=(0,v.uuid)(),n.engineType=a.Empty,n._params=i(i({},y),e),n.engineType=n._params.engine||a.Empty,n.engine=new f.TransportEmpty,n.engineType===a.PostMessage&&(n.engine=new u.TransportPostMessage(n._params)),n.engineType===a.WebSocket&&(n.engine=new l.TransportWebsocket(n._params)),n}return o(n,t),n.prototype.call=function(t){for(var e,n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return((null===(e=this._params)||void 0===e?void 0:e.version)||0)<2?Promise.resolve([]):new Promise(function(e,o){var i=(0,v.uuid)(),a={id:i,name:t,params:r,event:s.TransportCallEvent.Call},c=function(r){r.id===i&&r.name===t&&(n.off(s.TransportEvent.CallResponse,c),r.event===s.TransportCallEvent.Reject?o(r.params):e(r.params))};n.send(s.TransportEvent.Call,a),n.on(s.TransportEvent.CallResponse,c)})},n.prototype.send=function(t,e,n){var r;(null===(r=this._params)||void 0===r?void 0:r.debug)&&console.log("transport.send",this._params,t,e,n),this.engine.send(t,e,n,this.instanceUid)},n.prototype.subscribe=function(){var t=this;this.engine.subscribe(function(e,n,r,o){var i,a,c;!e||o===t.instanceUid||((null===(i=t._params)||void 0===i?void 0:i.version)||0)>0&&r!==(null===(a=t._params)||void 0===a?void 0:a.uuid)||((null===(c=t._params)||void 0===c?void 0:c.debug)&&console.log("transport.message",t._params,r,e,n),e===s.TransportEvent.Call&&n.name===s.CallNameEvent.ForceSave&&t.forceSaveVersion(n),t.emit(e,n,r))})},n.prototype.destroy=function(){this.engine.destroy()},n.prototype.forceSaveVersion=function(t){var e=t.id,n=t.name;this.send(s.TransportEvent.CallResponse,{id:e,name:n,event:s.TransportCallEvent.Resolve})},n.prototype.changeContent=function(t){e.Transport.send(s.TransportEvent.ExtChangeContent,t)},n.prototype.navigate=function(t,n,r){void 0===r&&(r=s.TransportNavigationTarget.Cache);var o={path:t,queryParams:n,target:r};e.Transport.send(s.TransportEvent.ExtNavigateTo,o),r===s.TransportNavigationTarget.Self&&(0,h.browserNavigate)(o)},n.prototype.close=function(){e.Transport.send(s.TransportEvent.ExtClose)},n.prototype.rejectClose=function(){e.Transport.send(s.TransportEvent.ExtRejectClose)},n.prototype.showAccessPanel=function(){e.Transport.send(s.TransportEvent.ExtShowAccessPanel)},n.prototype.openModalFilesSelect=function(t){e.Transport.send(s.TransportEvent.ExtOpenModalFilesSelect,t)},n.prototype.openModalConfirm=function(t){e.Transport.send(s.TransportEvent.ExtShowConfirm,t)},n.prototype.toast=function(t){e.Transport.send(s.TransportEvent.ExtToast,t)},n.prototype.savedStart=function(t){e.Transport.send(s.TransportEvent.ExtSavedStart,t)},n.prototype.savedEnd=function(t){e.Transport.send(s.TransportEvent.ExtSavedEnd,t)},n.prototype.setSpinnerStatus=function(t){e.Transport.send(s.TransportEvent.ExtSpinner,t)},n.prototype.setContext=function(t){e.Transport.send(s.TransportEvent.ExtContext,t)},n.prototype.setTabs=function(t){e.Transport.send(s.TransportEvent.ExtTabs,t)},n}(c.EventEmitter);e.NBTransport=b,g._nb_transport instanceof b||(g._nb_transport=new b({}),g._nb_transport.subscribe()),e.Transport=g._nb_transport},3334:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SettingControlType=void 0,(n=e.SettingControlType||(e.SettingControlType={})).Text="text",n.String="string",n.Number="number",n.CheckBox="checkbox",n.Select="select",n.RadioList="radio_list",n.ConnectionChoose="connection_choose",n.MultiConnectionChoose="multi_connection_choose"},3440:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportPostMessage=void 0;var r=n(6738),o=function(){function t(t){var e=this;this.listenHandler=function(t){var n=t.data.event,o=t.data.uuid,i=t.data.instanceUid,a=(0,r.safeJson)(t.data.payload,t.data.payload);e.handler&&e.handler(n,a,o,i)},this._parems=t}return Object.defineProperty(t.prototype,"parent",{get:function(){var t,e;return(null===(t=this._parems)||void 0===t?void 0:t.parent)?null===(e=this._parems)||void 0===e?void 0:e.parent:parent||null},enumerable:!1,configurable:!0}),t.prototype.send=function(t,e,n,r){var o,i;null===(o=this.parent)||void 0===o||o.postMessage({event:t,uuid:n||(null===(i=this._parems)||void 0===i?void 0:i.uuid),instanceUid:r,payload:function(){try{return JSON.stringify(e)}catch(t){return e}}()},document.location.origin)},t.prototype.subscribe=function(t){var e;this.handler=t,null===(e=this.parent)||void 0===e||e.addEventListener("message",this.listenHandler)},t.prototype.destroy=function(){var t;null===(t=this.parent)||void 0===t||t.removeEventListener("message",this.listenHandler)},t}();e.TransportPostMessage=o},3470:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getConfigData=void 0;var r=n(4582);e.getConfigData=function(t){var e,n,o,i,a={name:t.name,type:t.type,icon:t.icon,pictogram:"",index:""};switch(t.type){case r.ExtensionType.File:a.index=(null===(e=t.file)||void 0===e?void 0:e.index)||"";break;case r.ExtensionType.WorkDir:a.index=(null===(n=t.work_dir)||void 0===n?void 0:n.index)||"";break;case r.ExtensionType.App:a.index=(null===(o=t.app)||void 0===o?void 0:o.menu.index)||"",a.pictogram=(null===(i=t.app)||void 0===i?void 0:i.menu.icon)||""}return a}},3807:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4080:()=>{!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){var t=HTMLElement;window.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}()},4223:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}c((r=r.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},c=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageApi=void 0;var u=n(748),p=n(7179),l=n(9035),f=n(6418),d=n(7860),h=n(4582),v=n(3111),y=n(6738),g=new Map,b=function(t,e,n){return function(r){return a(void 0,void 0,void 0,function(){var o,i;return s(this,function(a){switch(a.label){case 0:if(r instanceof Response&&r.ok)return v.Transport.send(t,{path:e,status:r.status,options:n}),[2];a.label=1;case 1:return a.trys.push([1,5,,6]),r instanceof Response?[4,r.json()]:[3,3];case 2:return i=a.sent(),[3,4];case 3:i=r,a.label=4;case 4:return o=i,v.Transport.send(t,{path:e,status:r.status,code:null==o?void 0:o.code,message:null==o?void 0:o.message,options:n}),[3,6];case 5:return a.sent(),v.Transport.send(t,{path:e,status:r.status,options:n}),[3,6];case 6:return[2]}})})}},_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.list=function(t){return t.path&&(t.path=this.relativePath(t.path)),this.rest.get("/storage",t)},e.prototype.info=function(t){return this.rest.get("/storage/element",{path:t})},e.prototype.create=function(t,e,n,r){var o=i(i({is_work_dir:this.state.extenstion.type===h.ExtensionType.WorkDir},r),{name:t,path:this.relativePath(e),type:n,divide_id:this.state.api.query.divide_id||null});return(0,f.sendRequest)(this.makeApiPath("/element"),{method:"POST",headers:this.makeHeaders({"Content-Type":"application/json"}),body:JSON.stringify(o)}).then(this.responseJSON)},e.prototype.delete=function(t,e){return(0,f.sendRequest)(this.makeApiPath("/element")+this.makeSearchParams({path:t,hard:e}),{method:"DELETE",headers:this.makeHeaders()})},e.prototype.makeDownloadPath=function(t,e){var n=i({},e),r={path:t,with_preview:!1};return n.cache||(r.t=Date.now()),n.imagePreview&&(r.with_preview=!0),this.makeApiPath("/files")+this.makeSearchParams(r)},e.prototype.makeImagePreview=function(t,e){return this.makeDownloadPath(t,i(i({},e),{imagePreview:!0}))},e.prototype.download=function(t){var e=this;return(0,f.sendRequest2)("GET",this.makeApiPath("/files")+this.makeSearchParams({path:this.relativePath(t,this.state.storage.path),t:Date.now()}),{headers:this.makeHeaders(),cache:"no-cache"}).then(function(t){return a(e,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:if(t.ok||403!==t.status)return[3,5];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.json()];case 2:case 3:return e.sent(),[3,4];case 4:return[2,Promise.reject(t)];case 5:return[2,t]}})})}).catch(function(t){throw t.status>=400&&(0,y.notificateRequestError)(t.status,t.message,t.code),t})},e.prototype.replace=function(t,e,n){var r=this,o=e||this.state.storage.path;return v.Transport.send(h.TransportEvent.ExtSavedStart,{path:o,options:n}),(0,f.sendRequest2)("PUT",this.makeApiPath("/files")+this.makeSearchParams({path:this.relativePath(e,this.state.storage.path)}),{cache:"no-cache",body:t,headers:this.makeHeaders()}).then(function(t){return b(h.TransportEvent.ExtSavedEnd,o,n)(t),r.responseJSON(t)}).catch(function(t){throw b(h.TransportEvent.ExtSavedError,o,n)(t),t})},e.prototype.liveReplace=function(t,e,n,r){var o=this,i=[this.state.storage.root,this.state.storage.rootID,this.relativePath(e,this.state.storage.path)].join("-"),a=g.get(i);a||(a={status:h.RequestStatus.Done,requests:[]},g.set(i,a)),a.requests.push({path:e,body:t});var s=function(){if(a&&a.status!==h.RequestStatus.Wait){var t=a.requests.pop();a.requests=[],t?(a.status=h.RequestStatus.Wait,o.replace(t.body,t.path,r).then(function(t){return a.status=h.RequestStatus.Done,s(),t}).catch(function(t){return a.status=h.RequestStatus.Reject,s(),t})):n&&n()}};s()},e.prototype.upload=function(t,e){var n=new FormData;return n.set("path",this.relativePath(t)),this.state.api.query.divide_id&&n.set("divide_id",this.state.api.query.divide_id),n.set("file",e),v.Transport.send(h.TransportEvent.ExtSavedStart,t),(0,f.sendRequest)(this.makeApiPath("/files"),{method:"POST",body:n,headers:this.makeHeaders()}).then(function(e){return b(h.TransportEvent.ExtSavedEnd,t)(e),e}).catch(function(e){throw b(h.TransportEvent.ExtSavedError,t)(e),e}).then(this.responseJSON,this.responseJSON)},e.prototype.uploadNet=function(t,e,n){return void 0===n&&(n=!1),v.Transport.send(h.TransportEvent.ExtSavedStart,t),(0,f.sendRequest)(this.makeApiPath("/files/net"),{method:"POST",headers:this.makeHeaders({"Content-Type":"application/json"}),body:JSON.stringify({url:e,overwrite:n,path:this.relativePath(t)})}).then(function(e){return b(h.TransportEvent.ExtSavedEnd,t)(e),e}).catch(function(e){throw b(h.TransportEvent.ExtSavedError,t)(e),e}).then(this.responseJSON,this.responseJSON)},e.prototype.createMeta=function(t,e,n){return this.create(t||this.metaName,e||"","file",n)},e.prototype.readMeta=function(t){return this.download(t||this.metaName)},e.prototype.saveMeta=function(t,e){return this.replace(t,e||this.metaName)},e.prototype.relativePath=function(t,e){return!t&&e?e||"":(0,u.pathJoin)(this.state.storage.info.dir||"",t||"")},e.prototype.makeApiPath=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r="storage";return"fca"===this.state.storage.root&&(r="disk/".concat(this.state.storage.rootID)),t.prototype.makeApiPath.apply(this,c([r],e,!1))},Object.defineProperty(e.prototype,"metaName",{get:function(){return"."+(0,d.translite)((0,l.getLang)(this.state.extenstion.name))},enumerable:!1,configurable:!0}),e}(p.Api);e.StorageApi=_},4339:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewState=void 0,(n=e.ViewState||(e.ViewState={})).view="view",n.edit="edit"},4444:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.browserNavigate=void 0;var r=n(7232),o=n(8161);e.browserNavigate=function(t){if((0,o.isBrowser)()){var e=(0,r.getGlobal)(),n=t.path,i=t.queryParams,a=new URL(n||"",window.origin),s=i||{};Object.keys(s).forEach(function(t){var e=s[t];e&&a.searchParams.append(t,e.toString())}),e.history.pushState({},"",a.toString())}}},4582:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(4981),e),o(n(4339),e),o(n(2070),e),o(n(2951),e),o(n(146),e),o(n(735),e),o(n(3334),e),o(n(3807),e)},4981:(t,e)=>{var n,r,o,i;Object.defineProperty(e,"__esModule",{value:!0}),e.RequestStatus=e.PermissionType=e.ExtensionFileMode=e.ExtensionType=void 0,(i=e.ExtensionType||(e.ExtensionType={})).App="app",i.File="file",i.WorkDir="work_dir",(o=e.ExtensionFileMode||(e.ExtensionFileMode={})).Read="read",o.Write="write",o.ReadAndWrite="read_and_write",(r=e.PermissionType||(e.PermissionType={})).CLOSE="",r.READ="r",r.WRITE="rw",(n=e.RequestStatus||(e.RequestStatus={}))[n.Wait=0]="Wait",n[n.Done=1]="Done",n[n.Reject=2]="Reject"},5673:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(2137),e)},5800:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)}},6032:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),n(4080)},6064:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.transportProps=void 0;var o=(0,n(7232).getGlobal)();e.transportProps=function(){return r(r({},o._nb_global_props),i())};var i=function(){try{return JSON.parse(window.name||"")}catch(t){return{}}}},6157:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserApi=void 0;var i=n(7179),a="/users",s="/users/me",c="".concat(s,"/avatars"),u="".concat(s,"/sessions"),p="".concat(s,"/tokens"),l="".concat(a,"/change-password"),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.logout=function(){return this.rest.get("/logout")},e.prototype.get=function(t){return this.rest.get("".concat(a,"/").concat(t))},e.prototype.list=function(t){return this.rest.get(a,t)},e.prototype.restore=function(t){return this.rest.post("".concat(a,"/").concat(t,"/restore"))},e.prototype.delete=function(t,e){return this.rest.delete("".concat(a,"/").concat(t),e)},e.prototype.update=function(t){return this.rest.put(a+"/".concat(t.id),JSON.stringify(t))},e.prototype.create=function(t){return this.rest.post(a,JSON.stringify(t))},e.prototype.createToken=function(t){return this.rest.post(p,JSON.stringify(t))},e.prototype.listToken=function(t){return this.rest.get(p,t)},e.prototype.deleteToken=function(t){return this.rest.delete("".concat(p,"/").concat(t))},e.prototype.changePassword=function(t){return this.rest.post(l,JSON.stringify(t))},e.prototype.me=function(){return this.rest.get(s)},e.prototype.meUploadAvatar=function(t,e){var n=new FormData;return n.append("file",t,e),this.rest.post(c,n)},e.prototype.meDeleteAvatar=function(){return this.rest.delete(c)},e.prototype.meListSession=function(t){return this.rest.get(u,t)},e.prototype.meDeleteSession=function(t){var e=u;return t&&(e+="/".concat(t)),this.rest.delete(e)},e}(i.Api);e.UserApi=f},6260:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.safeJson=void 0,e.safeJson=function(t,e){try{return JSON.parse(t)}catch(t){return e}}},6341:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.notificateRequestError=void 0;var r=n(6854),o=n(4582);e.notificateRequestError=function(t,e,n){r.Transport.send(o.TransportEvent.ExtRequestError,{status:t,message:e,code:n})}},6371:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultState=void 0;var r=n(4582);e.defaultState=function(){return{extenstion:{id:0,name:{},type:r.ExtensionType.File},api:{host:window.location.origin,prefix:"/api/v1",headers:{},query:{}},debug:!0,view:r.ViewState.view,storage:{root:r.StorageRoot.my,rootID:0,path:"",info:{base:"",dir:"",ext:"",name:"",root:""}}}}},6418:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}c((r=r.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendRequest2=e.sendRequest=void 0;var a=n(6854),s=n(4582),c=n(6341),u=n(748),p=null,l=function(){return p||(p=a.Transport.call(s.CallNameEvent.Update).catch(function(t){throw p=null,t}).then(function(t){return p=null,t})),p};e.sendRequest=function(t,e){var n=this;return l().then(function(){return fetch(t,e)}).then(function(t){return o(n,void 0,void 0,function(){var e,n;return i(this,function(r){switch(r.label){case 0:return t.status>=400?((0,c.notificateRequestError)(t.status,""),403!==t.status?[3,2]:[4,t.json()]):[3,2];case 1:if("resource locked"===(e=r.sent()).code)throw(n=new Error("Forbidden")).status=t.status,n.code=e.code,n.message=e.error.lock_owner_id,n;r.label=2;case 2:return[2,t]}})})}).catch(function(t){throw t.status>=400&&(0,c.notificateRequestError)(t.status,t.message,t.code),t})},e.sendRequest2=function(t,e,n){var o=r({},n.headers);n.params&&(e+="?"+f(n.params)),n.prefix&&(e=(0,u.pathJoin)(n.prefix,e));var i={method:t,cache:n.cache,headers:o,body:n.body};return l().then(function(){return fetch(new URL(decodeURI(e),n.host),i)}).catch(function(t){throw d(t.status,t.message,t.code),t})};var f=function(t){var e=new URLSearchParams;return Object.keys(t).forEach(function(n){Array.isArray(t[n])?t[n].forEach(function(t){e.append(n,t)}):e.append(n,t[n])}),e},d=function(t,e,n){t>=400&&(0,c.notificateRequestError)(t,e,n)}},6555:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uuid=void 0,e.uuid=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}},6662:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=void 0,e.isObject=function(t){return null!=t&&"Object"===t.constructor.name}},6738:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1910),e),o(n(475),e),o(n(9035),e),o(n(7096),e),o(n(748),e),o(n(6418),e),o(n(7860),e),o(n(7232),e),o(n(8161),e),o(n(6662),e),o(n(5800),e),o(n(6341),e),o(n(6260),e),o(n(3470),e),o(n(6064),e),o(n(4444),e),o(n(6371),e)},6854:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(8325),e),o(n(3111),e)},6860:function(t,e){var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.EventEmitter=void 0;var r=function(){function t(){this._handlers=new Map,this._globalHandlers=new Set}return t.prototype.listen=function(t){this._globalHandlers.add(t)},t.prototype.on=function(t,e){var n;this._handlers.has(t)||this._handlers.set(t,new Set),null===(n=this._handlers.get(t))||void 0===n||n.add(e)},t.prototype.off=function(t,e){var n;null===(n=this._handlers.get(t))||void 0===n||n.delete(e)},t.prototype.emit=function(t){for(var e,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];null===(e=this._handlers.get(t))||void 0===e||e.forEach(function(t){t&&t.apply(void 0,r)}),this._globalHandlers.forEach(function(e){e.apply(void 0,n([t],r,!1))})},t}();e.EventEmitter=r},7096:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parentURL=void 0,e.parentURL=function(){return new URL(window.location!=window.parent.location?document.referrer:document.location.href)}},7179:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Api=void 0;var i=n(6738),a=n(6371),s=function(){function t(t){void 0===t&&(t=(0,a.defaultState)());var e=this;this.rest={get:function(t,n,o){return(0,i.sendRequest2)("GET",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r(r({},e.state.api.query),n),cache:"no-cache"}).then(e.responseJSON)},post:function(t,n,o){return(0,i.sendRequest2)("POST",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r({},e.state.api.query),body:n}).then(e.responseJSON)},put:function(t,n,o){return(0,i.sendRequest2)("PUT",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r({},e.state.api.query),cache:"no-cache",body:n}).then(e.responseJSON)},delete:function(t,n,o){return(0,i.sendRequest2)("PUT",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r(r({},e.state.api.query),n)}).then(e.responseJSON)}},this.changeState(t)}return t.prototype.changeState=function(t){this.state=t},t.prototype.makeSearchParams=function(t){if(!t)return"";t=r(r({},this.state.api.query),t);var e=Object.fromEntries(Object.entries(t).map(function(t){var e=t[0],n=t[1];return[e,encodeURIComponent(n)]}));return"?"+new URLSearchParams(e).toString()},t.prototype.makeHeaders=function(t){return r(r({},t),this.state.api.headers)},t.prototype.responseJSON=function(t){return(t.headers.get("content-type")||"").includes("/json")?t.status>=200&&t.status<400?t.json():Promise.reject(t):(console.warn("Parse json error"),Promise.reject(t))},t.prototype.makeApiPath=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new URL(decodeURI(i.pathJoin.apply(void 0,o([this.state.api.prefix],t,!1))),this.state.api.host)},t}();e.Api=s},7232:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobal=void 0;var r=n(8161);e.getGlobal=function(){return(0,r.isBrowser)()?window:n.g}},7333:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportWebsocket=void 0;var n=Symbol("socket"),r=function(){function t(t){this._params=t,this[n]||this.init(t)}return t.prototype.init=function(t){var e=(null==t?void 0:t.host)||"localhost",r=(null==t?void 0:t.port)||8999,o=(null==t?void 0:t.path)||"";this[n]=new WebSocket("ws://".concat(e,":").concat(r).concat(o)),this[n].onopen=function(){},this[n].onclose=function(t){t.wasClean?console.log("Соединение закрыто"):console.log("Обрыв соединения"),console.log("Код: "+t.code+" причина: "+t.reason)},this[n].onerror=function(t){console.log("Ошибка подключения ws: "+t.message)}},t.prototype.send=function(t,e,r,o){var i,a=this;this[n]&&(this[n].readyState?this[n].send(JSON.stringify({event:t,payload:e,uuid:r||(null===(i=this._params)||void 0===i?void 0:i.uuid),instanceUid:o})):setTimeout(function(){a.send(t,e,r)},100))},t.prototype.subscribe=function(t){this[n]&&(this[n].onmessage=function(e){try{var n=JSON.parse(e.data),r=n.event,o=n.payload,i=n.uuid,a=n.instanceUid;t(r,o,i,a)}catch(t){}})},t.prototype.destroy=function(){this[n]&&(this[n].close(),this[n]=void 0)},t}();e.TransportWebsocket=r},7860:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.translite=void 0;var n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"cz",ш:"sh",щ:"scz",ы:"y",ь:"",э:"e",ю:"u",я:"ja"," ":"-"};e.translite=function(t){return(t=(t=(t=(t=(t=t.toLocaleLowerCase()).trim()).replace(/ -/gi,"-")).replace(/- /gi,"-")).replace(/\s{2,}/gi," ")).split("").map(function(t){return/[a-z0-9]/i.test(t)?t:n[t]||""}).join("")}},7916:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NextBox=void 0;var i=n(6860),a=n(6738),s=n(6371),c=n(3111),u=n(2951),p=["click","scroll","keydown","mousemove"],l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.userEventHandlers={},e}return o(e,t),e.prototype.init=function(t){var e=this,n=function(t){return e.state=t};if(!c.Transport.engineType){var r=(0,s.defaultState)();n(r),t&&t(r)}c.Transport.on(u.TransportEvent.AppReady,function(e){n(e),t&&t(e)}),c.Transport.on(u.TransportEvent.AppReload,function(){window.location.reload()}),c.Transport.on(u.TransportEvent.AppChangeState,n),c.Transport.send(u.TransportEvent.ExtInit),this.attachUserEvents()},e.prototype.destroy=function(){this.detachUserEvents()},e.prototype.prepareNavigate=function(){var t,e=null===(t=this.state)||void 0===t?void 0:t.initialNavigation;(null==e?void 0:e.target)&&[u.TransportNavigationTarget.Cache,u.TransportNavigationTarget.Self].includes(e.target)&&(0,a.browserNavigate)(e)},e.prototype.attachUserEvents=function(){for(var t=0,e=function(e){var r=function(){return function(e){var n=Date.now();n-t<300||(t=n,c.Transport.send(u.TransportEvent.ExtUserInteraction,{type:e,timestamp:n}))}(e)};n.userEventHandlers[e]=r,window.addEventListener(e,r,!0)},n=this,r=0,o=p;r<o.length;r++)e(o[r])},e.prototype.detachUserEvents=function(){for(var t=0,e=p;t<e.length;t++){var n=e[t],r=this.userEventHandlers[n];r&&(window.removeEventListener(n,r,!0),delete this.userEventHandlers[n])}},e}(i.EventEmitter);e.NextBox=l},7975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",o=0,i=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}e&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var t,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(r=a+"/"+r,o=47===a.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&o&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var o=arguments[n];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,u=a<c?a:c,p=-1,l=0;l<=u;++l){if(l===u){if(c>u){if(47===n.charCodeAt(s+l))return n.slice(s+l+1);if(0===l)return n.slice(s+l)}else a>u&&(47===t.charCodeAt(o+l)?p=l:0===l&&(p=0));break}var f=t.charCodeAt(o+l);if(f!==n.charCodeAt(s+l))break;47===f&&(p=l)}var d="";for(l=o+p+1;l<=i;++l)l!==i&&47!==t.charCodeAt(l)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(s+p):(s+=p,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(n=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":t.slice(0,o)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,o=0,i=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var u=t.charCodeAt(r);if(47===u){if(!a){o=r+1;break}}else-1===c&&(a=!1,c=r+1),s>=0&&(u===n.charCodeAt(s)?-1===--s&&(i=r):(s=-1,i=c))}return o===i?i=c:-1===i&&(i=t.length),t.slice(o,i)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!a){o=r+1;break}}else-1===i&&(a=!1,i=r+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var n=-1,r=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===o&&(i=!1,o=s+1),46===c?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!i){r=s+1;break}}return-1===n||-1===o||0===a||1===a&&n===o-1&&n===r+1?"":t.slice(n,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,o=t.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var a=-1,s=0,c=-1,u=!0,p=t.length-1,l=0;p>=r;--p)if(47!==(o=t.charCodeAt(p)))-1===c&&(u=!1,c=p+1),46===o?-1===a?a=p:1!==l&&(l=1):-1!==a&&(l=-1);else if(!u){s=p+1;break}return-1===a||-1===c||0===l||1===l&&a===c-1&&a===s+1?-1!==c&&(n.base=n.name=0===s&&i?t.slice(1,c):t.slice(s,c)):(0===s&&i?(n.name=t.slice(1,a),n.base=t.slice(1,c)):(n.name=t.slice(s,a),n.base=t.slice(s,c)),n.ext=t.slice(a,c)),s>0?n.dir=t.slice(0,s-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},8156:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),n(6032),n(2636),o(n(7916),e),o(n(4582),e),o(n(6854),e),o(n(6738),e),o(n(915),e),o(n(8843),e),o(n(5673),e)},8161:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=void 0,e.isBrowser=function(){return"undefined"!=typeof window}},8325:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},8843:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1572),e),o(n(2392),e),o(n(4223),e),o(n(6157),e),o(n(147),e)},9035:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getLang=void 0,e.getLang=function(t,e){if(void 0===e&&(e="ru"),t[e])return t[e];var n=Object.keys(t).pop();return n&&t[n]?t[n]:""}},9995:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportEmpty=void 0;var n=function(){function t(){}return t.prototype.send=function(t,e){},t.prototype.subscribe=function(t){},t.prototype.destroy=function(){},t}();e.TransportEmpty=n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n(8156)})());
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["next-box"]=e():t["next-box"]=e()}(globalThis,()=>(()=>{"use strict";var t={146:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},147:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionApi=void 0;var i=n(915),a="/static/extensions",s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.list=function(){return this.rest.get(a)},e.prototype.getByUniqKey=function(t){return this.rest.get("".concat(a,"/").concat(t))},e}(i.Api);e.ExtensionApi=s},475:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fileInfo=void 0;var r=n(7975).sep,o=n(748);e.fileInfo=function(t){var e={root:"",dir:"",base:"",ext:"",name:""};if(0===(t=(0,o.pathJoin)(r,t)).length)return e;var n,i=t.charCodeAt(0),a=47===i;a?(e.root=r,n=1):n=0;for(var s=-1,c=0,u=-1,p=!0,l=t.length-1,f=0;l>=n;--l)if(47!==(i=t.charCodeAt(l)))-1===u&&(p=!1,u=l+1),46===i?-1===s?s=l:1!==f&&(f=1):-1!==s&&(f=-1);else if(!p){c=l+1;break}return-1===s||-1===u||0===f||1===f&&s===u-1&&s===c+1?-1!==u&&(e.base=e.name=0===c&&a?t.slice(1,u):t.slice(c,u)):(0===c&&a?(e.name=t.slice(1,s),e.base=t.slice(1,u)):(e.name=t.slice(c,s),e.base=t.slice(c,u)),e.ext=t.slice(s,u)),c>0?e.dir=t.slice(0,c-1):a&&(e.dir=r),e}},735:(t,e)=>{var n,r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.UserAuthType=e.UserType=e.UserStatus=void 0,(o=e.UserStatus||(e.UserStatus={})).Registering="registering",o.Activated="activated",o.Blocked="blocked",o.BlockedByLicense="blocked_by_license",(r=e.UserType||(e.UserType={})).User="user",r.Guest="guest",(n=e.UserAuthType||(e.UserAuthType={})).Native="native",n.Ldap="ldap"},748:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pathJoin=void 0;var r=n(7975).sep;e.pathJoin=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=[],o=0,i=t.length;o<i;o++)n=n.concat(t[o].split(r));var a=[];for(o=0,i=n.length;o<i;o++){var s=n[o];s&&"."!==s&&(".."===s?a.pop():a.push(s))}return""===n[0]&&a.unshift(""),a.join(r)||(a.length?r:".")}},915:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(7179),e),o(n(1152),e),o(n(6860),e)},1152:function(t,e,n){var r,o,i,a=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FileEngine=void 0;var s=n(8843),c=n(6738),u=n(6371),p=n(7179),l=Symbol("VERSION"),f=Symbol("CONFIG"),d=Symbol("API"),h=Symbol("UPGRADE"),v=function(t){function e(e,n,r){void 0===r&&(r=(0,u.defaultState)());var a=t.call(this,r)||this;return a[o]=0,a[i]=new Map,a[l]=e,a[f]=n,a[d]=new s.StorageApi,a[d].changeState(r),a}return a(e,t),Object.defineProperty(e.prototype,"name",{get:function(){var t;return(null===(t=this[f])||void 0===t?void 0:t.name)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){var t;return(null===(t=this[f])||void 0===t?void 0:t.path)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullName",{get:function(){return(0,c.pathJoin)(this.path,this.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this[l]},enumerable:!1,configurable:!0}),e.prototype.changeState=function(e){var n;t.prototype.changeState.call(this,e),null===(n=this[d])||void 0===n||n.changeState(e)},e.prototype.migration=function(t,e){if(this[h].has(t))throw"Upgrader migration version ".concat(t," exist");this[h].set(t,e)},e.prototype.info=function(){return this[d].info(this.fullName)},e.prototype.download=function(){var t=this;return this[d].download().then(function(t){return parseInt(t.headers.get("content-length")||"")>0?t.json():""}).then(function(e){var n=null,r=-1;return(0,c.isObject)(e)&&(n=e.body||e||null,r=e.version||-1),t.runMigrate(r,n)})},e.prototype.create=function(t,e){var n=this;return this[d].create(this.name,this.path,"file",e).then(function(){return n.replace(t)})},e.prototype.delete=function(t){return this[d].delete(this.fullName,t)},e.prototype.replace=function(t){return this[d].replace({version:this.version,body:t})},e.prototype.liveReplace=function(t,e){return this[d].liveReplace(JSON.stringify({version:this.version,body:t}),this.path,e)},e.prototype.runMigrate=function(t,e){var n=this,r=Array.from(this[h].keys()).sort(),o=r[r.length-1]||0;return new Promise(function(i,a){var s=e;t<o&&r.forEach(function(e){if(e>t){var r=n[h].get(e);r&&(s=r(s))}}),i(s)})},e}(p.Api);e.FileEngine=v,o=l,i=h},1572:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OrderDirection=void 0,(n=e.OrderDirection||(e.OrderDirection={})).DEFAULT="",n.ASC="asc",n.DESC="desc"},1910:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dirname=void 0;var r=n(7975).sep,o=n(748);e.dirname=function(t){if(0===(t=(0,o.pathJoin)(r,t)).length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?n?r:".":n&&1===i?r+r:t.slice(0,i)}},2070:(t,e)=>{var n,r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.StorageElementContentType=e.StorageElementType=e.StorageRoot=void 0,(o=e.StorageRoot||(e.StorageRoot={})).my="my",o.fca="fca",o.divide="divide",o.share="share",o.favorite="favorite",o.trash="trash",(r=e.StorageElementType||(e.StorageElementType={})).Dir="dir",r.File="file",r.WorkDir="work_dir",(n=e.StorageElementContentType||(e.StorageElementContentType={})).Any="any",n.Dir="dir",n.Code="code",n.Image="image",n.Audio="audio",n.Video="video",n.Text="text",n.Doc="doc",n.Xls="xls",n.Ppt="ppt"},2137:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.defineNbFrameComponent=void 0;var a=n(915),s=n(6738),c=n(6555),u=n(6854),p=n(4582),l=Symbol("ROOT"),f=Symbol("FRAME"),d=Symbol("FRAME_CONFIG"),h=Symbol("TRANSPORT"),v=Symbol("EVENT_EMITTER");e.defineNbFrameComponent=function(){return customElements.define("nb-frame",y)};var y=function(t){function e(){var e=t.call(this)||this;return e.apiPrefix="/api/v1",e.origin=window.location.origin,e.version=1,e.view=p.ViewState.view,e.debug=!1,e.uuid=(0,c.uuid)(),e[n]=new a.EventEmitter,e[r]={transportParams:{version:1,uuid:e.uuid}},e}var n,r;return o(e,t),e.prototype.connectedCallback=function(){this[l]=this.attachShadow({mode:"open"})},e.prototype.disconnectedCallback=function(){var t;null===(t=this[h])||void 0===t||t.destroy()},e.prototype.send=function(t,e){var n;null===(n=this[h])||void 0===n||n.send(t,e)},e.prototype.listen=function(t){this[v].listen(t)},e.prototype.off=function(t,e){this[v].off(t,e)},e.prototype.on=function(t,e){this[v].on(t,e)},Object.defineProperty(e.prototype,"extensionModel",{set:function(t){var e=t.type,n=t.file,r=t.work_dir,o=t.app,i=t.devlocal,a=t.path,s="";e===p.ExtensionType.File&&(s=n.index),e===p.ExtensionType.WorkDir&&(s=r.index),e===p.ExtensionType.App&&(s=o.menu.index),this[d].ext=t,this[d].extSrc=i?s:"".concat(this.apiPrefix,"/extensions/static/").concat(a,"/").concat(s)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transportParams",{get:function(){return i(i({},(0,s.transportProps)()),this[d].transportParams)},set:function(t){this[d].transportParams=i(i({},this[d].transportParams),t),this.uuid=this[d].transportParams.uuid||this.uuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"routeData",{set:function(t){this[d].routeData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{set:function(t){this[d].user=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nvigationState",{set:function(t){this[d].navigationState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"framePath",{get:function(){var t=new URL(this[d].extSrc||"",location.origin);return this.transportParams.host&&(t.hostname=this.transportParams.host),this.transportParams.port&&(t.port=this.transportParams.port.toString()),t.toString()},enumerable:!1,configurable:!0}),e.prototype.run=function(){var t,e,n=this,r=document.createElement("iframe");r.setAttribute("allowfullscreen",""),r.name=JSON.stringify(this.transportParams),r.src=this.framePath;var o=this.resetTransport();return o.listen(function(t,e,r){t===p.TransportEvent.ExtInit&&n.send(p.TransportEvent.AppReady,n.state)}),this[f]=r,this[l]&&(this[l].innerHTML=""),null===(t=this[l])||void 0===t||t.appendChild(this.frameStyle),null===(e=this[l])||void 0===e||e.appendChild(this[f]),o},Object.defineProperty(e.prototype,"state",{get:function(){var t=this[d],e=t.ext,n=t.routeData,r=t.user,o=t.navigationState,i=(0,s.fileInfo)((null==n?void 0:n.path)||"");(null==e?void 0:e.type)===p.ExtensionType.WorkDir&&(i.dir=(0,s.pathJoin)(i.dir,i.base),i.base="",i.name="");var a={},c={};return(null==n?void 0:n.root)===p.StorageRoot.divide&&(a.divide_id=Number(n.rootId),i.dir=(0,s.pathJoin)("/",n.path||""),n.divideDir||(i.dir="/")),(null==n?void 0:n.root)===p.StorageRoot.fca&&(a.disk_id=Number(n.rootId)),(null==n?void 0:n.root)===p.StorageRoot.share&&(a.share_token=n.share_token,c.Authorization="Sharing ".concat(n.share_token),n.share_password&&(a.share_pass=n.share_password),c.SharePass=n.share_password),{debug:!!this.debug,view:this.view,extenstion:{id:(null==e?void 0:e.id)||0,name:(null==e?void 0:e.name)||{ru:""},type:(null==e?void 0:e.type)||p.ExtensionType.File},api:{host:this.origin,prefix:this.apiPrefix,headers:c,query:a},user:r,storage:{info:i,root:(null==n?void 0:n.root)||p.StorageRoot.my,rootID:(null==n?void 0:n.rootId)||0,path:(null==n?void 0:n.path)||""},initialNavigation:o,setting:null==e?void 0:e.settings}},enumerable:!1,configurable:!0}),e.prototype.resetTransport=function(){var t;null===(t=this[h])||void 0===t||t.destroy();var e=new u.NBTransport(this.transportParams);return this[h]=e,this[h].subscribe(),this[h]},Object.defineProperty(e.prototype,"frameStyle",{get:function(){var t=document.createElement("style");return t.textContent="\n iframe {\n display: block;\n width: inherit;\n height: inherit;\n border: none;\n background: none;\n }\n ",t},enumerable:!1,configurable:!0}),n=v,r=d,e.observedAttributes=["apiPrefix","origin","version","view","debug","uuid","navigationState","user"],e}(HTMLElement)},2392:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StaticApi=void 0;var a=n(7179),s=n(6418),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.upload=function(t,e,n){void 0===n&&(n="");var r=new FormData;return r.set("file",t,e),(0,s.sendRequest)(this.makeApiPath(n),{method:"POST",body:r}).then(function(t){return t.json()})},e.prototype.get=function(t){return(0,s.sendRequest)(this.makeApiPath(t),{method:"GET"})},e.prototype.delete=function(t){return(0,s.sendRequest)(this.makeApiPath(t),{method:"DELETE"}).catch(function(t){return t})},e.prototype.makeApiPath=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.makeApiPath.apply(this,i(["static/files"],e,!1))},e}(a.Api);e.StaticApi=c},2636:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2951:(t,e)=>{var n,r,o,i;Object.defineProperty(e,"__esModule",{value:!0}),e.TransportCallEvent=e.TransportNavigationTarget=e.CallNameEvent=e.TransportEvent=void 0,(i=e.TransportEvent||(e.TransportEvent={})).Call="call",i.CallResponse="call-response",i.ExtInit="ext-init",i.ExtChangeContent="ext-change-content",i.ExtOpenModalFilesSelect="ext-open-modal-files-select",i.ExtShowConfirm="ext-show-confirm",i.ExtShowAccessPanel="ext-show-access-panel",i.ExtNavigateTo="ext-navigate-to",i.ExtRequestError="ext-request-error",i.ExtToast="ext-toast",i.ExtSpinner="ext-spinner",i.ExtContext="ext-context",i.ExtTabs="ext-tabs",i.ExtSavedStart="ext-saved-start",i.ExtSavedEnd="ext-saved-end",i.ExtSavedError="ext-saved-error",i.ExtClose="ext-close",i.ExtRejectClose="ext-reject-close",i.ExtUserInteraction="ext-user-interaction",i.AppReload="ext-reload",i.AppReady="app-ready",i.AppChangeState="app-change-state",i.AppSaveAndClose="app-save-and-close",i.AppFilesSelected="app-files-selected",i.AppConfirmAccept="app-confirm-accept",i.AppConfirmReject="app-confirm-reject",i.AppContextAction="app-context-action",i.AppTabAction="app-tab-action",i.AppChangeTheme="app-change-theme",(o=e.CallNameEvent||(e.CallNameEvent={})).Update="update",o.ForceSave="force-save-version",(r=e.TransportNavigationTarget||(e.TransportNavigationTarget={})).Parent="_parent",r.Self="_self",r.Cache="_cache",(n=e.TransportCallEvent||(e.TransportCallEvent={})).Call="call",n.Resolve="resolve",n.Reject="reject"},3111:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=e.NBTransport=e.TransportParentHandlers=e.EngineType=void 0;var a,s=n(2951),c=n(6860),u=n(3440),p=n(7232),l=n(7333),f=n(9995),d=n(6064),h=n(6738),v=n(6555);!function(t){t.WebSocket="websocket",t.PostMessage="postmessage",t.Empty=""}(a=e.EngineType||(e.EngineType={}));var y=(0,d.transportProps)(),g=(0,p.getGlobal)();e.TransportParentHandlers={},g._nb_handlers=e.TransportParentHandlers;var b=function(t){function n(e){var n=t.call(this)||this;return n.instanceUid=(0,v.uuid)(),n.engineType=a.Empty,n._params=i(i({},y),e),n.engineType=n._params.engine||a.Empty,n.engine=new f.TransportEmpty,n.engineType===a.PostMessage&&(n.engine=new u.TransportPostMessage(n._params)),n.engineType===a.WebSocket&&(n.engine=new l.TransportWebsocket(n._params)),n}return o(n,t),n.prototype.call=function(t){for(var e,n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return((null===(e=this._params)||void 0===e?void 0:e.version)||0)<2?Promise.resolve([]):new Promise(function(e,o){var i=(0,v.uuid)(),a={id:i,name:t,params:r,event:s.TransportCallEvent.Call},c=function(r){r.id===i&&r.name===t&&(n.off(s.TransportEvent.CallResponse,c),r.event===s.TransportCallEvent.Reject?o(r.params):e(r.params))};n.send(s.TransportEvent.Call,a),n.on(s.TransportEvent.CallResponse,c)})},n.prototype.send=function(t,e,n){var r;(null===(r=this._params)||void 0===r?void 0:r.debug)&&console.log("transport.send",this._params,t,e,n),this.engine.send(t,e,n,this.instanceUid)},n.prototype.subscribe=function(){var t=this;this.engine.subscribe(function(e,n,r,o){var i,a,c;!e||o===t.instanceUid||((null===(i=t._params)||void 0===i?void 0:i.version)||0)>0&&r!==(null===(a=t._params)||void 0===a?void 0:a.uuid)||((null===(c=t._params)||void 0===c?void 0:c.debug)&&console.log("transport.message",t._params,r,e,n),e===s.TransportEvent.Call&&n.name===s.CallNameEvent.ForceSave&&t.forceSaveVersion(n),t.emit(e,n,r))})},n.prototype.destroy=function(){this.engine.destroy()},n.prototype.forceSaveVersion=function(t){var e=t.id,n=t.name;this.send(s.TransportEvent.CallResponse,{id:e,name:n,event:s.TransportCallEvent.Resolve})},n.prototype.changeContent=function(t){e.Transport.send(s.TransportEvent.ExtChangeContent,t)},n.prototype.navigate=function(t,n,r){void 0===r&&(r=s.TransportNavigationTarget.Cache);var o={path:t,queryParams:n,target:r};e.Transport.send(s.TransportEvent.ExtNavigateTo,o),r===s.TransportNavigationTarget.Self&&(0,h.browserNavigate)(o)},n.prototype.close=function(){e.Transport.send(s.TransportEvent.ExtClose)},n.prototype.rejectClose=function(){e.Transport.send(s.TransportEvent.ExtRejectClose)},n.prototype.showAccessPanel=function(){e.Transport.send(s.TransportEvent.ExtShowAccessPanel)},n.prototype.openModalFilesSelect=function(t){e.Transport.send(s.TransportEvent.ExtOpenModalFilesSelect,t)},n.prototype.openModalConfirm=function(t){e.Transport.send(s.TransportEvent.ExtShowConfirm,t)},n.prototype.toast=function(t){e.Transport.send(s.TransportEvent.ExtToast,t)},n.prototype.savedStart=function(t){e.Transport.send(s.TransportEvent.ExtSavedStart,t)},n.prototype.savedEnd=function(t){e.Transport.send(s.TransportEvent.ExtSavedEnd,t)},n.prototype.setSpinnerStatus=function(t){e.Transport.send(s.TransportEvent.ExtSpinner,t)},n.prototype.setContext=function(t){e.Transport.send(s.TransportEvent.ExtContext,t)},n.prototype.setTabs=function(t){e.Transport.send(s.TransportEvent.ExtTabs,t)},n}(c.EventEmitter);e.NBTransport=b,g._nb_transport instanceof b||(g._nb_transport=new b({}),g._nb_transport.subscribe()),e.Transport=g._nb_transport},3334:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SettingControlType=void 0,(n=e.SettingControlType||(e.SettingControlType={})).Text="text",n.String="string",n.Number="number",n.CheckBox="checkbox",n.Select="select",n.RadioList="radio_list",n.ConnectionChoose="connection_choose",n.MultiConnectionChoose="multi_connection_choose"},3440:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportPostMessage=void 0;var r=n(6738),o=function(){function t(t){var e=this;this.listenHandler=function(t){var n=t.data.event,o=t.data.uuid,i=t.data.instanceUid,a=(0,r.safeJson)(t.data.payload,t.data.payload);e.handler&&e.handler(n,a,o,i)},this._parems=t}return Object.defineProperty(t.prototype,"parent",{get:function(){var t,e;return(null===(t=this._parems)||void 0===t?void 0:t.parent)?null===(e=this._parems)||void 0===e?void 0:e.parent:parent||null},enumerable:!1,configurable:!0}),t.prototype.send=function(t,e,n,r){var o,i;null===(o=this.parent)||void 0===o||o.postMessage({event:t,uuid:n||(null===(i=this._parems)||void 0===i?void 0:i.uuid),instanceUid:r,payload:function(){try{return JSON.stringify(e)}catch(t){return e}}()},document.location.origin)},t.prototype.subscribe=function(t){var e;this.handler=t,null===(e=this.parent)||void 0===e||e.addEventListener("message",this.listenHandler)},t.prototype.destroy=function(){var t;null===(t=this.parent)||void 0===t||t.removeEventListener("message",this.listenHandler)},t}();e.TransportPostMessage=o},3470:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getConfigData=void 0;var r=n(4582);e.getConfigData=function(t){var e,n,o,i,a={name:t.name,type:t.type,icon:t.icon,pictogram:"",index:""};switch(t.type){case r.ExtensionType.File:a.index=(null===(e=t.file)||void 0===e?void 0:e.index)||"";break;case r.ExtensionType.WorkDir:a.index=(null===(n=t.work_dir)||void 0===n?void 0:n.index)||"";break;case r.ExtensionType.App:a.index=(null===(o=t.app)||void 0===o?void 0:o.menu.index)||"",a.pictogram=(null===(i=t.app)||void 0===i?void 0:i.menu.icon)||""}return a}},3807:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4080:()=>{!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){var t=HTMLElement;window.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}()},4223:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}c((r=r.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},c=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageApi=void 0;var u=n(748),p=n(7179),l=n(9035),f=n(6418),d=n(7860),h=n(4582),v=n(3111),y=n(6738),g=new Map,b=function(t,e,n){return function(r){return a(void 0,void 0,void 0,function(){var o,i;return s(this,function(a){switch(a.label){case 0:if(r instanceof Response&&r.ok)return v.Transport.send(t,{path:e,status:r.status,options:n}),[2];a.label=1;case 1:return a.trys.push([1,5,,6]),r instanceof Response?[4,r.json()]:[3,3];case 2:return i=a.sent(),[3,4];case 3:i=r,a.label=4;case 4:return o=i,v.Transport.send(t,{path:e,status:r.status,code:null==o?void 0:o.code,message:null==o?void 0:o.message,options:n}),[3,6];case 5:return a.sent(),v.Transport.send(t,{path:e,status:r.status,options:n}),[3,6];case 6:return[2]}})})}},_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.list=function(t){return t.path&&(t.path=this.relativePath(t.path)),this.rest.get("/storage",t)},e.prototype.info=function(t){return this.rest.get("/storage/element",{path:t})},e.prototype.create=function(t,e,n,r){var o=i(i({is_work_dir:this.state.extenstion.type===h.ExtensionType.WorkDir},r),{name:t,path:this.relativePath(e),type:n,divide_id:this.state.api.query.divide_id||null});return(0,f.sendRequest)(this.makeApiPath("/element"),{method:"POST",headers:this.makeHeaders({"Content-Type":"application/json"}),body:JSON.stringify(o)}).then(this.responseJSON)},e.prototype.delete=function(t,e){return(0,f.sendRequest)(this.makeApiPath("/element")+this.makeSearchParams({path:t,hard:e}),{method:"DELETE",headers:this.makeHeaders()})},e.prototype.makeDownloadPath=function(t,e){var n=i({},e),r={path:t,with_preview:!1};return n.cache||(r.t=Date.now()),n.imagePreview&&(r.with_preview=!0),this.makeApiPath("/files")+this.makeSearchParams(r)},e.prototype.makeImagePreview=function(t,e){return this.makeDownloadPath(t,i(i({},e),{imagePreview:!0}))},e.prototype.download=function(t){var e=this;return(0,f.sendRequest2)("GET",this.makeApiPath("/files")+this.makeSearchParams({path:this.relativePath(t,this.state.storage.path),t:Date.now()}),{headers:this.makeHeaders(),cache:"no-cache"}).then(function(t){return a(e,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:if(t.ok||403!==t.status)return[3,5];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.json()];case 2:case 3:return e.sent(),[3,4];case 4:return[2,Promise.reject(t)];case 5:return[2,t]}})})}).catch(function(t){throw t.status>=400&&(0,y.notificateRequestError)(t.status,t.message,t.code),t})},e.prototype.replace=function(t,e,n){var r=this,o=e||this.state.storage.path;return v.Transport.send(h.TransportEvent.ExtSavedStart,{path:o,options:n}),(0,f.sendRequest2)("PUT",this.makeApiPath("/files")+this.makeSearchParams({path:this.relativePath(e,this.state.storage.path)}),{cache:"no-cache",body:t,headers:this.makeHeaders()}).then(function(t){return b(h.TransportEvent.ExtSavedEnd,o,n)(t),r.responseJSON(t)}).catch(function(t){throw b(h.TransportEvent.ExtSavedError,o,n)(t),t})},e.prototype.liveReplace=function(t,e,n,r){var o=this,i=[this.state.storage.root,this.state.storage.rootID,this.relativePath(e,this.state.storage.path)].join("-"),a=g.get(i);a||(a={status:h.RequestStatus.Done,requests:[]},g.set(i,a)),a.requests.push({path:e,body:t});var s=function(){if(a&&a.status!==h.RequestStatus.Wait){var t=a.requests.pop();a.requests=[],t?(a.status=h.RequestStatus.Wait,o.replace(t.body,t.path,r).then(function(t){return a.status=h.RequestStatus.Done,s(),t}).catch(function(t){return a.status=h.RequestStatus.Reject,s(),t})):n&&n()}};s()},e.prototype.upload=function(t,e){var n=new FormData;return n.set("path",this.relativePath(t)),this.state.api.query.divide_id&&n.set("divide_id",this.state.api.query.divide_id),n.set("file",e),v.Transport.send(h.TransportEvent.ExtSavedStart,t),(0,f.sendRequest)(this.makeApiPath("/files"),{method:"POST",body:n,headers:this.makeHeaders()}).then(function(e){return b(h.TransportEvent.ExtSavedEnd,t)(e),e}).catch(function(e){throw b(h.TransportEvent.ExtSavedError,t)(e),e}).then(this.responseJSON,this.responseJSON)},e.prototype.uploadNet=function(t,e,n){return void 0===n&&(n=!1),v.Transport.send(h.TransportEvent.ExtSavedStart,t),(0,f.sendRequest)(this.makeApiPath("/files/net"),{method:"POST",headers:this.makeHeaders({"Content-Type":"application/json"}),body:JSON.stringify({url:e,overwrite:n,path:this.relativePath(t)})}).then(function(e){return b(h.TransportEvent.ExtSavedEnd,t)(e),e}).catch(function(e){throw b(h.TransportEvent.ExtSavedError,t)(e),e}).then(this.responseJSON,this.responseJSON)},e.prototype.createMeta=function(t,e,n){return this.create(t||this.metaName,e||"","file",n)},e.prototype.readMeta=function(t){return this.download(t||this.metaName)},e.prototype.saveMeta=function(t,e){return this.replace(t,e||this.metaName)},e.prototype.relativePath=function(t,e){return!t&&e?e||"":(0,u.pathJoin)(this.state.storage.info.dir||"",t||"")},e.prototype.makeApiPath=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r="storage";return"fca"===this.state.storage.root&&(r="disk/".concat(this.state.storage.rootID)),t.prototype.makeApiPath.apply(this,c([r],e,!1))},Object.defineProperty(e.prototype,"metaName",{get:function(){return"."+(0,d.translite)((0,l.getLang)(this.state.extenstion.name))},enumerable:!1,configurable:!0}),e}(p.Api);e.StorageApi=_},4339:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewState=void 0,(n=e.ViewState||(e.ViewState={})).view="view",n.edit="edit"},4444:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.browserNavigate=void 0;var r=n(7232),o=n(8161);e.browserNavigate=function(t){if((0,o.isBrowser)()){var e=(0,r.getGlobal)(),n=t.path,i=t.queryParams,a=new URL(n||"",window.origin),s=i||{};Object.keys(s).forEach(function(t){var e=s[t];e&&a.searchParams.append(t,e.toString())}),e.history.pushState({},"",a.toString())}}},4582:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(4981),e),o(n(4339),e),o(n(2070),e),o(n(2951),e),o(n(146),e),o(n(735),e),o(n(3334),e),o(n(3807),e)},4981:(t,e)=>{var n,r,o,i;Object.defineProperty(e,"__esModule",{value:!0}),e.RequestStatus=e.PermissionType=e.ExtensionFileMode=e.ExtensionType=void 0,(i=e.ExtensionType||(e.ExtensionType={})).App="app",i.File="file",i.WorkDir="work_dir",(o=e.ExtensionFileMode||(e.ExtensionFileMode={})).Read="read",o.Write="write",o.ReadAndWrite="read_and_write",(r=e.PermissionType||(e.PermissionType={})).CLOSE="",r.READ="r",r.WRITE="rw",(n=e.RequestStatus||(e.RequestStatus={}))[n.Wait=0]="Wait",n[n.Done=1]="Done",n[n.Reject=2]="Reject"},5673:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(2137),e)},5800:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)}},6032:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),n(4080)},6064:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.transportProps=void 0;var o=(0,n(7232).getGlobal)();e.transportProps=function(){return r(r({},o._nb_global_props),i())};var i=function(){try{return JSON.parse(window.name||"")}catch(t){return{}}}},6157:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserApi=void 0;var i=n(7179),a="/users",s="/users/me",c="".concat(s,"/avatars"),u="".concat(s,"/sessions"),p="".concat(s,"/tokens"),l="".concat(a,"/change-password"),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.logout=function(){return this.rest.get("/logout")},e.prototype.get=function(t){return this.rest.get("".concat(a,"/").concat(t))},e.prototype.list=function(t){return this.rest.get(a,t)},e.prototype.restore=function(t){return this.rest.post("".concat(a,"/").concat(t,"/restore"))},e.prototype.delete=function(t,e){return this.rest.delete("".concat(a,"/").concat(t),e)},e.prototype.update=function(t){return this.rest.put(a+"/".concat(t.id),JSON.stringify(t))},e.prototype.create=function(t){return this.rest.post(a,JSON.stringify(t))},e.prototype.createToken=function(t){return this.rest.post(p,JSON.stringify(t))},e.prototype.listToken=function(t){return this.rest.get(p,t)},e.prototype.deleteToken=function(t){return this.rest.delete("".concat(p,"/").concat(t))},e.prototype.changePassword=function(t){return this.rest.post(l,JSON.stringify(t))},e.prototype.me=function(){return this.rest.get(s)},e.prototype.meUploadAvatar=function(t,e){var n=new FormData;return n.append("file",t,e),this.rest.post(c,n)},e.prototype.meDeleteAvatar=function(){return this.rest.delete(c)},e.prototype.meListSession=function(t){return this.rest.get(u,t)},e.prototype.meDeleteSession=function(t){var e=u;return t&&(e+="/".concat(t)),this.rest.delete(e)},e}(i.Api);e.UserApi=f},6260:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.safeJson=void 0,e.safeJson=function(t,e){try{return JSON.parse(t)}catch(t){return e}}},6341:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.notificateRequestError=void 0;var r=n(6854),o=n(4582);e.notificateRequestError=function(t,e,n){r.Transport.send(o.TransportEvent.ExtRequestError,{status:t,message:e,code:n})}},6371:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultState=void 0;var r=n(4582);e.defaultState=function(){return{extenstion:{id:0,name:{},type:r.ExtensionType.File},api:{host:window.location.origin,prefix:"/api/v1",headers:{},query:{}},debug:!0,view:r.ViewState.view,storage:{root:r.StorageRoot.my,rootID:0,path:"",info:{base:"",dir:"",ext:"",name:"",root:""}}}}},6418:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}c((r=r.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendRequest2=e.sendRequest=void 0;var a=n(6854),s=n(4582),c=n(6341),u=n(748),p=null,l=function(){return p||(p=a.Transport.call(s.CallNameEvent.Update).catch(function(t){throw p=null,t}).then(function(t){return p=null,t})),p};e.sendRequest=function(t,e){var n=this;return l().then(function(){return fetch(t,e)}).then(function(t){return o(n,void 0,void 0,function(){var e,n;return i(this,function(r){switch(r.label){case 0:return t.status>=400?((0,c.notificateRequestError)(t.status,""),403!==t.status?[3,2]:[4,t.json()]):[3,2];case 1:if("resource locked"===(e=r.sent()).code)throw(n=new Error("Forbidden")).status=t.status,n.code=e.code,n.message=e.error.lock_owner_id,n;r.label=2;case 2:return[2,t]}})})}).catch(function(t){throw t.status>=400&&(0,c.notificateRequestError)(t.status,t.message,t.code),t})},e.sendRequest2=function(t,e,n){var o=r({},n.headers);n.params&&(e+="?"+f(n.params)),n.prefix&&(e=(0,u.pathJoin)(n.prefix,e));var i={method:t,cache:n.cache,headers:o,body:n.body};return l().then(function(){return fetch(new URL(e,n.host),i)}).catch(function(t){throw d(t.status,t.message,t.code),t})};var f=function(t){var e=new URLSearchParams;return Object.keys(t).forEach(function(n){Array.isArray(t[n])?t[n].forEach(function(t){e.append(n,t)}):e.append(n,t[n])}),e},d=function(t,e,n){t>=400&&(0,c.notificateRequestError)(t,e,n)}},6555:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uuid=void 0,e.uuid=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}},6662:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=void 0,e.isObject=function(t){return null!=t&&"Object"===t.constructor.name}},6738:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1910),e),o(n(475),e),o(n(9035),e),o(n(7096),e),o(n(748),e),o(n(6418),e),o(n(7860),e),o(n(7232),e),o(n(8161),e),o(n(6662),e),o(n(5800),e),o(n(6341),e),o(n(6260),e),o(n(3470),e),o(n(6064),e),o(n(4444),e),o(n(6371),e)},6854:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(8325),e),o(n(3111),e)},6860:function(t,e){var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.EventEmitter=void 0;var r=function(){function t(){this._handlers=new Map,this._globalHandlers=new Set}return t.prototype.listen=function(t){this._globalHandlers.add(t)},t.prototype.on=function(t,e){var n;this._handlers.has(t)||this._handlers.set(t,new Set),null===(n=this._handlers.get(t))||void 0===n||n.add(e)},t.prototype.off=function(t,e){var n;null===(n=this._handlers.get(t))||void 0===n||n.delete(e)},t.prototype.emit=function(t){for(var e,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];null===(e=this._handlers.get(t))||void 0===e||e.forEach(function(t){t&&t.apply(void 0,r)}),this._globalHandlers.forEach(function(e){e.apply(void 0,n([t],r,!1))})},t}();e.EventEmitter=r},7096:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parentURL=void 0,e.parentURL=function(){return new URL(window.location!=window.parent.location?document.referrer:document.location.href)}},7179:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Api=void 0;var i=n(6738),a=n(6371),s=function(){function t(t){void 0===t&&(t=(0,a.defaultState)());var e=this;this.rest={get:function(t,n,o){return(0,i.sendRequest2)("GET",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r(r({},e.state.api.query),n),cache:"no-cache"}).then(e.responseJSON)},post:function(t,n,o){return(0,i.sendRequest2)("POST",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r({},e.state.api.query),body:n}).then(e.responseJSON)},put:function(t,n,o){return(0,i.sendRequest2)("PUT",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r({},e.state.api.query),cache:"no-cache",body:n}).then(e.responseJSON)},delete:function(t,n,o){return(0,i.sendRequest2)("PUT",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r(r({},e.state.api.query),n)}).then(e.responseJSON)}},this.changeState(t)}return t.prototype.changeState=function(t){this.state=t},t.prototype.makeSearchParams=function(t){if(!t)return"";for(var e=[],n=function(t,n){if(null!==n){var r=encodeURIComponent(t),o=String(n);(function(t){try{return encodeURIComponent(decodeURIComponent(t))===t}catch(t){return!1}})(o)||(o=encodeURIComponent(o)),e.push("".concat(r,"=").concat(o))}},r=function(t,e){Array.isArray(e)?e.forEach(function(e){return n(t,e)}):n(t,e)},o=0,i=Object.entries(t);o<i.length;o++){var a=i[o];r(a[0],a[1])}return e.length?"?".concat(e.join("&")):""},t.prototype.makeHeaders=function(t){return r(r({},t),this.state.api.headers)},t.prototype.responseJSON=function(t){return(t.headers.get("content-type")||"").includes("/json")?t.status>=200&&t.status<400?t.json():Promise.reject(t):(console.warn("Parse json error"),Promise.reject(t))},t.prototype.makeApiPath=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new URL(decodeURI(i.pathJoin.apply(void 0,o([this.state.api.prefix],t,!1))),this.state.api.host)},t}();e.Api=s},7232:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobal=void 0;var r=n(8161);e.getGlobal=function(){return(0,r.isBrowser)()?window:n.g}},7333:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportWebsocket=void 0;var n=Symbol("socket"),r=function(){function t(t){this._params=t,this[n]||this.init(t)}return t.prototype.init=function(t){var e=(null==t?void 0:t.host)||"localhost",r=(null==t?void 0:t.port)||8999,o=(null==t?void 0:t.path)||"";this[n]=new WebSocket("ws://".concat(e,":").concat(r).concat(o)),this[n].onopen=function(){},this[n].onclose=function(t){t.wasClean?console.log("Соединение закрыто"):console.log("Обрыв соединения"),console.log("Код: "+t.code+" причина: "+t.reason)},this[n].onerror=function(t){console.log("Ошибка подключения ws: "+t.message)}},t.prototype.send=function(t,e,r,o){var i,a=this;this[n]&&(this[n].readyState?this[n].send(JSON.stringify({event:t,payload:e,uuid:r||(null===(i=this._params)||void 0===i?void 0:i.uuid),instanceUid:o})):setTimeout(function(){a.send(t,e,r)},100))},t.prototype.subscribe=function(t){this[n]&&(this[n].onmessage=function(e){try{var n=JSON.parse(e.data),r=n.event,o=n.payload,i=n.uuid,a=n.instanceUid;t(r,o,i,a)}catch(t){}})},t.prototype.destroy=function(){this[n]&&(this[n].close(),this[n]=void 0)},t}();e.TransportWebsocket=r},7860:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.translite=void 0;var n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"cz",ш:"sh",щ:"scz",ы:"y",ь:"",э:"e",ю:"u",я:"ja"," ":"-"};e.translite=function(t){return(t=(t=(t=(t=(t=t.toLocaleLowerCase()).trim()).replace(/ -/gi,"-")).replace(/- /gi,"-")).replace(/\s{2,}/gi," ")).split("").map(function(t){return/[a-z0-9]/i.test(t)?t:n[t]||""}).join("")}},7916:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NextBox=void 0;var i=n(6860),a=n(6738),s=n(6371),c=n(3111),u=n(2951),p=["click","scroll","keydown","mousemove"],l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.userEventHandlers={},e}return o(e,t),e.prototype.init=function(t){var e=this,n=function(t){return e.state=t};if(!c.Transport.engineType){var r=(0,s.defaultState)();n(r),t&&t(r)}c.Transport.on(u.TransportEvent.AppReady,function(e){n(e),t&&t(e)}),c.Transport.on(u.TransportEvent.AppReload,function(){window.location.reload()}),c.Transport.on(u.TransportEvent.AppChangeState,n),c.Transport.send(u.TransportEvent.ExtInit),this.attachUserEvents()},e.prototype.destroy=function(){this.detachUserEvents()},e.prototype.prepareNavigate=function(){var t,e=null===(t=this.state)||void 0===t?void 0:t.initialNavigation;(null==e?void 0:e.target)&&[u.TransportNavigationTarget.Cache,u.TransportNavigationTarget.Self].includes(e.target)&&(0,a.browserNavigate)(e)},e.prototype.attachUserEvents=function(){for(var t=0,e=function(e){var r=function(){return function(e){var n=Date.now();n-t<300||(t=n,c.Transport.send(u.TransportEvent.ExtUserInteraction,{type:e,timestamp:n}))}(e)};n.userEventHandlers[e]=r,window.addEventListener(e,r,!0)},n=this,r=0,o=p;r<o.length;r++)e(o[r])},e.prototype.detachUserEvents=function(){for(var t=0,e=p;t<e.length;t++){var n=e[t],r=this.userEventHandlers[n];r&&(window.removeEventListener(n,r,!0),delete this.userEventHandlers[n])}},e}(i.EventEmitter);e.NextBox=l},7975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",o=0,i=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}e&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var t,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(r=a+"/"+r,o=47===a.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&o&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var o=arguments[n];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,u=a<c?a:c,p=-1,l=0;l<=u;++l){if(l===u){if(c>u){if(47===n.charCodeAt(s+l))return n.slice(s+l+1);if(0===l)return n.slice(s+l)}else a>u&&(47===t.charCodeAt(o+l)?p=l:0===l&&(p=0));break}var f=t.charCodeAt(o+l);if(f!==n.charCodeAt(s+l))break;47===f&&(p=l)}var d="";for(l=o+p+1;l<=i;++l)l!==i&&47!==t.charCodeAt(l)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(s+p):(s+=p,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(n=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":t.slice(0,o)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,o=0,i=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var u=t.charCodeAt(r);if(47===u){if(!a){o=r+1;break}}else-1===c&&(a=!1,c=r+1),s>=0&&(u===n.charCodeAt(s)?-1===--s&&(i=r):(s=-1,i=c))}return o===i?i=c:-1===i&&(i=t.length),t.slice(o,i)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!a){o=r+1;break}}else-1===i&&(a=!1,i=r+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var n=-1,r=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===o&&(i=!1,o=s+1),46===c?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!i){r=s+1;break}}return-1===n||-1===o||0===a||1===a&&n===o-1&&n===r+1?"":t.slice(n,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,o=t.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var a=-1,s=0,c=-1,u=!0,p=t.length-1,l=0;p>=r;--p)if(47!==(o=t.charCodeAt(p)))-1===c&&(u=!1,c=p+1),46===o?-1===a?a=p:1!==l&&(l=1):-1!==a&&(l=-1);else if(!u){s=p+1;break}return-1===a||-1===c||0===l||1===l&&a===c-1&&a===s+1?-1!==c&&(n.base=n.name=0===s&&i?t.slice(1,c):t.slice(s,c)):(0===s&&i?(n.name=t.slice(1,a),n.base=t.slice(1,c)):(n.name=t.slice(s,a),n.base=t.slice(s,c)),n.ext=t.slice(a,c)),s>0?n.dir=t.slice(0,s-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},8156:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),n(6032),n(2636),o(n(7916),e),o(n(4582),e),o(n(6854),e),o(n(6738),e),o(n(915),e),o(n(8843),e),o(n(5673),e)},8161:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=void 0,e.isBrowser=function(){return"undefined"!=typeof window}},8325:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},8843:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1572),e),o(n(2392),e),o(n(4223),e),o(n(6157),e),o(n(147),e)},9035:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getLang=void 0,e.getLang=function(t,e){if(void 0===e&&(e="ru"),t[e])return t[e];var n=Object.keys(t).pop();return n&&t[n]?t[n]:""}},9995:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportEmpty=void 0;var n=function(){function t(){}return t.prototype.send=function(t,e){},t.prototype.subscribe=function(t){},t.prototype.destroy=function(){},t}();e.TransportEmpty=n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n(8156)})());
|