xframelib 1.1.0 → 1.1.2
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/README.md +181 -188
- package/README_zh.md +204 -0
- package/dist/assets/worker-iconv-KS7y7NCM.js +5405 -0
- package/dist/assets/worker-webcache-DX6bhBzy.js +956 -0
- package/dist/assets/worker-xmath-CbuRtVJ1.js +450 -0
- package/dist/index.css +1 -408
- package/dist/index.js +1 -12
- package/dist/{controls → src/controls}/ADivider.vue.d.ts +8 -12
- package/dist/src/controls/ScaleContainer/index.vue.d.ts +13 -0
- package/dist/src/controls/ScrollSnapContainer/index.vue.d.ts +25 -0
- package/dist/src/controls/index.d.ts +6 -0
- package/dist/{controls → src/controls}/layoutcontainer/LayoutManager.d.ts +9 -3
- package/dist/{controls → src/controls}/layoutcontainer/layout.vue.d.ts +22 -35
- package/dist/src/controls/popover/index.vue.d.ts +33 -0
- package/dist/src/controls/routertransition/RouterTransition.vue.d.ts +3 -0
- package/dist/src/controls/routertransition/RouterTransitionAnimate.vue.d.ts +10 -0
- package/dist/{controls → src/controls}/routertransition/SuspenseWithError.vue.d.ts +3 -2
- package/dist/{controls → src/controls}/splitpanes/pane.vue.d.ts +3 -2
- package/dist/{controls → src/controls}/splitpanes/splitpanes.vue.d.ts +3 -2
- package/dist/{controls → src/controls}/xwindow/XWindow.vue.d.ts +10 -19
- package/dist/{controls → src/controls}/xwindow/XWindowManager.d.ts +3 -3
- package/dist/src/controls/xwindow/index.d.ts +3 -0
- package/dist/src/directives/dbClickDirective.d.ts +5 -0
- package/dist/src/directives/index.d.ts +7 -0
- package/dist/src/directives/mediaDirective.d.ts +7 -0
- package/dist/{model → src/model}/Layout.d.ts +5 -0
- package/dist/src/utils/FetchHelper.d.ts +30 -0
- package/dist/{utils → src/utils}/H5Tool.d.ts +18 -7
- package/dist/{utils → src/utils}/IsTool.d.ts +4 -0
- package/dist/src/utils/Screen.d.ts +30 -0
- package/dist/{utils → src/utils}/WebCacheTool.d.ts +1 -1
- package/dist/{utils → src/utils}/index.d.ts +2 -0
- package/dist/src/workers/index.d.ts +13 -0
- package/package.json +25 -23
- package/dist/assets/worker-iconv-BsNle8M5.js +0 -22
- package/dist/assets/worker-webcache-Csuv6kAg.js +0 -6
- package/dist/assets/worker-xmath-AxRk6MsK.js +0 -6
- package/dist/controls/index.d.ts +0 -3
- package/dist/controls/routertransition/RouterTransition.vue.d.ts +0 -2
- package/dist/controls/routertransition/RouterTransitionAnimate.vue.d.ts +0 -9
- package/dist/controls/xwindow/index.d.ts +0 -3
- package/dist/directives/index.d.ts +0 -4
- package/dist/workers/index.d.ts +0 -19
- /package/dist/{api → src/api}/Token.d.ts +0 -0
- /package/dist/{api → src/api}/User.d.ts +0 -0
- /package/dist/{api → src/api}/index.d.ts +0 -0
- /package/dist/{controls → src/controls}/layoutcontainer/index.d.ts +0 -0
- /package/dist/{controls → src/controls}/routertransition/index.d.ts +0 -0
- /package/dist/{controls → src/controls}/splitpanes/index.d.ts +0 -0
- /package/dist/{core → src/core}/Global.d.ts +0 -0
- /package/dist/{core → src/core}/IModel.d.ts +0 -0
- /package/dist/{core → src/core}/Init.d.ts +0 -0
- /package/dist/{core → src/core}/MsgHelper.d.ts +0 -0
- /package/dist/{core → src/core}/SysEvents.d.ts +0 -0
- /package/dist/{core → src/core}/index.d.ts +0 -0
- /package/dist/{directives → src/directives}/dragDirective.d.ts +0 -0
- /package/dist/{directives/repeatClick.d.ts → src/directives/repeatClickDirective.d.ts} +0 -0
- /package/dist/{directives → src/directives}/wowDirective.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/HproseClient.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/HproseIO.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/ProxyClient.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/index.d.ts +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{mitt → src/mitt}/index.d.ts +0 -0
- /package/dist/{model → src/model}/Config.d.ts +0 -0
- /package/dist/{model → src/model}/Constants.d.ts +0 -0
- /package/dist/{model → src/model}/IModalModels.d.ts +0 -0
- /package/dist/{model → src/model}/IRole.d.ts +0 -0
- /package/dist/{model → src/model}/ITypes.d.ts +0 -0
- /package/dist/{model → src/model}/IUserModel.d.ts +0 -0
- /package/dist/{model → src/model}/IWidgetMenu.d.ts +0 -0
- /package/dist/{model → src/model}/index.d.ts +0 -0
- /package/dist/{permission → src/permission}/RoleSysRightHelper.d.ts +0 -0
- /package/dist/{permission → src/permission}/filter.d.ts +0 -0
- /package/dist/{permission → src/permission}/index.d.ts +0 -0
- /package/dist/{permission → src/permission}/register.d.ts +0 -0
- /package/dist/{permission → src/permission}/right.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/NavigatorPlugin.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/AutoUpdate.d.ts +0 -0
- /package/dist/{utils → src/utils}/AxiosHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/BigFileDownload.d.ts +0 -0
- /package/dist/{utils → src/utils}/CodeHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/Color.d.ts +0 -0
- /package/dist/{utils → src/utils}/CommonTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/DayjsTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/FileDownload.d.ts +0 -0
- /package/dist/{utils → src/utils}/FileUpload.d.ts +0 -0
- /package/dist/{utils → src/utils}/FileUpload_/346/227/247.d.ts" +0 -0
- /package/dist/{utils → src/utils}/FilenameUtils.d.ts +0 -0
- /package/dist/{utils → src/utils}/GzipTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/JQuery.d.ts +0 -0
- /package/dist/{utils → src/utils}/LocalForageHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/LockHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/RouterURLTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/SignalrClient.d.ts +0 -0
- /package/dist/{utils → src/utils}/Storage.d.ts +0 -0
- /package/dist/{utils → src/utils}/StringUtils.d.ts +0 -0
- /package/dist/{utils → src/utils}/Time.d.ts +0 -0
- /package/dist/{utils → src/utils}/TokenHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/ValidateTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/WarGridTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/WaterMark.d.ts +0 -0
- /package/dist/{utils → src/utils}/WidgetsTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/XXTEA.d.ts +0 -0
- /package/dist/{utils → src/utils}/ZipTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/uuid.d.ts +0 -0
- /package/dist/{workers → src/workers}/worker-iconv.d.ts +0 -0
- /package/dist/{workers → src/workers}/worker-webcache.d.ts +0 -0
- /package/dist/{workers → src/workers}/worker-xmath.d.ts +0 -0
- /package/dist/{workerservice → src/workerservice}/frontWorker.d.ts +0 -0
- /package/dist/{workerservice → src/workerservice}/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,onErrorCaptured as n,renderSlot as r,createBlock as i,createTextVNode as o,toDisplayString as s,openBlock as a,Suspense as l,withCtx as c,createElementVNode as u,resolveComponent as h,createVNode as d,createCommentVNode as f,KeepAlive as p,resolveDynamicComponent as g,markRaw as m,nextTick as v,reactive as y,watch as w,computed as b,onMounted as S,onUnmounted as C,createElementBlock as E,normalizeStyle as x,Fragment as k,renderList as T,normalizeClass as z,TransitionGroup as M,Transition as A,withDirectives as _,withModifiers as R,unref as L,vShow as I,useCssVars as D,h as N}from"vue";import P from"axios";import{Client as O,ClientContext as B}from"@hprose/rpc-core";import{ByteStream as F,Writer as W,Reader as U,ValueReader as j}from"@hprose/io";import{HttpTransport as $}from"@hprose/rpc-html5";import H from"iconv-lite";export{DecodeOptions,EncodeOptions,default as iconv}from"iconv-lite";import*as G from"@microsoft/signalr";import q from"qs";import{Icon as X}from"@iconify/vue";function V(e){return{all:e=e||new Map,on(t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])},off(t,n){const r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit(t,n){let r=e.get(t);r&&r.slice().map((e=>{e(n)})),r=e.get("*"),r&&r.slice().map((e=>{e(t,n)}))}}}const K=V();var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J,Q={exports:{}},ee=Q.exports,te=(J||(J=1,function(e){var t,n;t=ee,n=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function u(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?a:void 0!==console[r]?s(console,r):void 0!==console.log?s(console,"log"):e)}(r)||c.apply(this,arguments)}function h(e,n){var s,a,c,h=this,d="loglevel";function f(){var e;if(typeof window!==t&&d){try{e=window.localStorage[d]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(d),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===h.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==h.levels[t.toUpperCase()]&&(t=h.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=h.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?d+=":"+e:"symbol"==typeof e&&(d=void 0),h.name=e,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=n||u,h.getLevel=function(){return null!=c?c:null!=a?a:s},h.setLevel=function(e,n){return c=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&d){try{return void(window.localStorage[d]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(d)+"="+n+";"}catch(e){}}}(c),l.call(h)},h.setDefaultLevel=function(e){a=p(e),f()||h.setLevel(e,!1)},h.resetLevel=function(){c=null,function(){if(typeof window!==t&&d){try{window.localStorage.removeItem(d)}catch(e){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(h)},h.enableAll=function(e){h.setLevel(h.levels.TRACE,e)},h.disableAll=function(e){h.setLevel(h.levels.SILENT,e)},h.rebuild=function(){if(o!==h&&(s=p(o.getLevel())),l.call(h),o===h)for(var e in i)i[e].rebuild()},s=p(o?o.getLevel():"WARN");var g=f();null!=g&&(c=p(g)),l.call(h)}(o=new h).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new h(e,o.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=d),o},o.getLoggers=function(){return i},o.default=o,o},e.exports?e.exports=n():t.log=n()}(Q)),Q.exports);const ne={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetToUnloadEvent:"WidgetToUnloadEvent",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded",ModalContainerWidget_LoadModal:"ModalContainerWidget_LoadModal",ModalContainerWidget_CloseModal:"ModalContainerWidget_CloseModal",WidgetClosed:"WidgetClosed"};class re{message;eventBus;constructor(e,t=void 0){e&&(this.message=e),t&&(this.eventBus=t)}msg(e,t=3,n="success"){if(this.message)if("function"==typeof this.message)this.message({type:n,message:e,duration:t});else switch(n){case"info":this.message.info(e,t);break;case"success":this.message.success(e,t);break;case"warning":this.message.warn?this.message.warn(e,t):this.message.warning&&this.message.warning(e,t);break;case"error":this.message.error(e,t)}else{switch(n){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":n="dark",console.error(e)}this.eventBus&&this.eventBus.emit(ne.AlertInfoEvent,{type:n,info:e})}}info(e,t=3){this.msg(e,t,"info")}warn(e,t=3){this.msg(e,t,"warning")}err(e,t=3){this.msg(e,t,"error")}success(e,t=3){this.msg(e,t,"success")}}let ie=globalThis.SysConfig,oe=!1,se=!1;Function.prototype.promise=function(...e){const t=this;return function(){const n=e||[];return new Promise(((r,i)=>{n.push((function(e,t){e?i(e):r(t)})),t.apply(t,e)}))}()};const ae={Config:globalThis.SysConfig,EventBus:K,DefaultProxyClient:null,Axios:P,Message:new re(void 0,K),LayoutMap:new Map,getLayoutManager:e=>{if(!ce.WidgetConfigList||0===ce.WidgetConfigList.length)return;const t=ce.WidgetConfigList.find((t=>t.id===e));if(t){const e=t.layoutID;if(e&&ce.LayoutMap.has(e))return ce.LayoutMap.get(e)}},Logger:e=>{oe||(ie.UI.ProductLog?te.enableAll():te.setDefaultLevel("warn"),oe=!0);const t=e||"default";return te.getLogger(t)},Loading:(e="end")=>{if("end"===e)setTimeout((()=>{document.getElementById("apploading")?.remove()}),300),se=!0;else if(e)if(se){const t=`加载Widget:${e}……`;K.emit("statusmessage",t)}else{const t=document.getElementById("app-loading-info");t&&(t.innerHTML=`正在加载:${e}……`)}}},le="99,111,110,115,116,32,118,97,108,105,100,75,101,121,115,61,91,39,54,65,50,53,51,65,69,70,54,54,68,48,69,56,65,66,57,54,49,55,49,55,51,49,50,52,50,66,65,70,53,65,39,44,39,66,54,53,48,52,57,53,55,54,55,49,49,56,66,50,70,50,50,48,55,67,66,52,69,70,51,49,51,52,49,65,68,39,44,39,54,66,52,66,57,49,65,67,52,51,56,70,70,57,69,54,65,69,52,68,49,49,70,48,50,70,56,51,50,68,51,52,39,44,39,70,54,69,52,57,50,52,57,57,69,70,57,57,48,65,49,50,66,57,66,57,55,48,66,54,57,68,69,68,49,48,70,39,44,39,57,67,55,55,56,67,66,69,66,56,54,51,70,68,68,52,70,49,66,65,51,56,49,52,50,69,48,52,53,53,69,49,39,44,39,70,66,66,55,57,67,57,66,51,57,53,70,65,70,55,49,53,56,50,50,65,70,52,50,52,57,54,56,70,48,54,67,39,44,39,53,57,51,66,67,70,68,50,54,70,48,53,53,53,65,53,50,57,51,67,68,49,49,56,55,49,56,53,49,68,52,52,39,44,39,50,48,54,55,69,66,51,54,57,55,69,55,49,67,53,49,53,68,68,68,54,49,65,53,52,70,67,57,51,53,53,69,39,44,39,70,52,65,50,68,67,69,65,48,53,56,69,68,52,55,48,53,67,67,52,70,54,69,66,51,70,67,70,48,66,53,66,39,93,59,105,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,38,38,118,97,108,105,100,75,101,121,115,46,105,110,100,101,120,79,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,41,62,61,48,41,123,99,111,110,115,111,108,101,46,108,111,103,40,39,117,115,105,110,103,32,97,117,116,104,111,114,105,122,101,100,32,120,102,114,97,109,101,108,105,98,46,84,104,97,110,107,32,121,111,117,33,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,101,108,115,101,32,105,102,40,33,83,121,115,67,111,110,102,105,103,46,75,69,89,41,123,105,102,40,110,101,119,32,68,97,116,101,40,50,48,50,55,44,49,44,49,41,60,110,101,119,32,68,97,116,101,40,41,41,123,105,102,40,99,111,110,102,105,114,109,40,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,116,114,105,97,108,32,104,97,115,32,101,120,112,105,114,101,100,46,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,46,32,83,101,108,101,99,116,32,79,75,32,116,111,32,110,97,118,105,103,97,116,101,32,116,111,32,116,104,101,32,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,32,85,82,76,46,39,41,41,123,108,111,99,97,116,105,111,110,46,104,114,101,102,61,39,104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,39,125,101,108,115,101,123,116,104,114,111,119,39,84,104,101,32,116,114,105,97,108,32,112,101,114,105,111,100,32,104,97,115,32,101,120,112,105,114,101,100,33,39,59,125,125,101,108,115,101,123,99,111,110,115,111,108,101,46,108,111,103,40,39,84,104,101,32,116,114,105,97,108,32,100,101,97,100,108,105,110,101,32,102,111,114,32,116,104,105,115,32,120,102,114,97,109,101,108,105,98,32,108,105,98,114,97,114,121,32,105,115,32,74,97,110,117,97,114,121,32,49,44,32,50,48,50,55,46,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,125,116,104,114,111,119,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,75,69,89,32,105,115,32,105,110,118,97,108,105,100,33,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,32,33,39,59".split(",").map((e=>Number(e)));new Function("globObj","isdev",String.fromCharCode(...le));const ce=ae;var ue=(e=>(e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right",e))(ue||{});const he=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},de=he(e({name:"SuspenseWithError",setup(){const e=t(null);return n((t=>(e.value="当前页面存在问题,无法渲染……",console.error("onErrorCaptured",t),!0))),{error:e}}}),[["render",function(e,t,n,h,d,f){return e.error?r(e.$slots,"error",{key:0},(()=>[o(s(e.error),1)])):(a(),i(l,{key:1},{default:c((()=>[r(e.$slots,"default")])),fallback:c((()=>[r(e.$slots,"fallback",{},(()=>[t[0]||(t[0]=u("div",null,"加载中……",-1))]))])),_:3}))}]]),fe=e({name:"RouterTransition",__name:"RouterTransition",setup:e=>(e,t)=>{const n=h("router-view");return a(),i(de,null,{default:c((()=>[d(n,null,{default:c((({Component:e,route:t})=>[(a(),i(p,null,[t.meta.keepAlive?(a(),i(g(e),{key:t.name})):f("",!0)],1024)),t.meta.keepAlive?f("",!0):(a(),i(g(e),{key:t.name}))])),_:1})])),_:1})}}),pe=Object.prototype.toString;function ge(e,t){return pe.call(e)===`[object ${t}]`}function me(e){return ge(e,"Function")}const ve=e=>void 0!==e,ye=e=>!ve(e);function we(e){return null===e}function be(e){return ye(e)&&we(e)}function Se(e){return ye(e)||we(e)}const Ce=e=>null!=e&&null!==e&&ge(e,"Object");function Ee(e){return ge(e,"Date")}function xe(e){return ge(e,"Number")}function ke(e){return ge(e,"AsyncFunction")}function Te(e){return ge(e,"Promise")&&Ce(e)&&me(e.then)&&me(e.catch)}function ze(e){return ge(e,"String")}function Me(e){return!0===e||!1===e||ge(e,"Boolean")}function Ae(e){return e&&Array.isArray(e)}const _e=()=>"undefined"!=typeof window,Re=e=>"undefined"!=typeof window&&ge(e,"Window"),Le=e=>pe.call(e).startsWith("[object HTML")&&!!e.tagName,Ie="undefined"==typeof window;function De(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Ne(e){return null==e||(ze(e)||Ae(e)?0===e.length:!!Ce(e)&&"{}"===JSON.stringify(e))}function Pe(e){return ge(e,"Error")}function Oe(e){return ge(e,"WeakSet")}function Be(e){return ge(e,"WeakMap")}function Fe(e){return ge(e,"Symbol")}function We(e){return ge(e,"Map")}const Ue=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);function je(e){return/^\s*[{[]/.test(String(e))}function $e(e){return e.includes("<kml ")&&e.includes('xmlns="http://www.opengis.net/kml/')}class He{static isNullOrEmpty=e=>null===e||""===e||void 0===e||0===e.length;static isNotEmpty=e=>null!==e&&""!==e&&void 0!==e&&0!==e.length;static toHump(e){return e.replace(/[\-\/\_](\w)/g,((e,t)=>t.toUpperCase())).replace("views","")}static getFileName(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}static UpperFirst(e){return(e=e.toLowerCase()).replace(/\b\w|\s\w/g,(e=>e.toUpperCase()))}}class Ge{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!He.isNullOrEmpty(e)){if(Ge.httpTransport||(Ge.httpTransport=new $),this.client=new O(e),!this.client)throw Error("Hprose Client初始化错误");this.hproseURL=e,this.init()}}init(){this.client&&this.client.useServiceAsync().then((e=>{this.hproseProxy=e})).catch((e=>{String(e).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("旧版本不支持useServiceAsync")):K.emit(ne.HproseServiceErrorEvent,"初始化默认Hprose!")}))}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,t,n){if(this.client)return await this.client.invoke(e,t,n)}encode(e,t,n){return this.client?this.client.codec.encode(e,t,n):void 0}decode(e,t){return this.client?this.client.codec.decode(e,t):void 0}}class qe{constructor(e="",t=globalThis.localStorage){this.prefixKey=e,this.storage=t}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,t,n=604800){const r=JSON.stringify({value:t,expire:null!==n?(new Date).getTime()+1e3*n:null});this.storage.setItem(this.getKey(e),r)}get(e,t=null){const n=this.storage.getItem(this.getKey(e));if(n)try{const t=JSON.parse(n),{value:r,expire:i}=t;if(null===i||i>=Date.now())return r;this.remove(this.getKey(e))}catch(e){return t}return t}getJsonObject(e){const t=this.storage.getItem(this.getKey(e));if(t)try{const n=JSON.parse(t);if(null===n.expire||n.expire>=Date.now())return n;this.remove(this.getKey(e))}catch(e){return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,t,n=604800){document.cookie=`${this.getKey(e)}=${t}; Max-Age=${n}`}getCookie(e){const t=document.cookie.split("; ");for(let n=0,r=t.length;n<r;n++){const r=t[n].split("=");if(r[0]===this.getKey(e))return r[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let t=e.length;t--;)document.cookie=e[t]+"=0;expire="+new Date(0).toUTCString()}}const Xe=new qe("",globalThis.localStorage),Ve="access_token",Ke=new qe("user",globalThis.localStorage);function Ye(){return Ke.get(Ve)}function Ze(){Ke.remove(Ve)}function Je(){const e=Ye();return e?.refresh}class Qe{hproseClient;hpProxyObj;defaultContext=new B;constructor(e){this.hproseClient=new Ge(e),this.hpProxyObj=null}getClientContext(e,t){const n={};t&&(n.requestHeaders=t),n.httpRequestHeaders=e||{};const r=n.httpRequestHeaders,i=Ye();return i&&(r.token=i.token),ce.SystemID&&(r.sysid=ce.SystemID,ce.SystemGroup&&(r.sysgroup=ce.SystemGroup)),new B(n)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");if(!this.hpProxyObj){const e=await this.hproseClient.getProxy();this.hpProxyObj=e}return this.hpProxyObj||K.emit(ne.HproseServiceErrorEvent,"HproseProxy对象为空,无法调用Hprose方法!"),this.hpProxyObj}async hproseInvoke(e,t,n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");return await this.hproseClient.invoke(e,t,n)}async hproseInvokeContext(e,t,...n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");const r=Ye();return console.log(r,"userToken3"),r&&(t||(t=new B({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,n,t)}async hproseInvokeEncode(e){const t=new F(e).toBytes(),n=await(this.hproseClient.client?.request(t,this.defaultContext));return n?this.hproseClient.client?.codec.decode(n,this.defaultContext):n}encodeRequest(e,...t){const n=this.hproseClient.client?.codec,r=n?.encode(e,t,this.defaultContext);return F.toString(r)}}var et,tt={exports:{}},nt=(et||(et=1,tt.exports=function(){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var r,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(r=64;r<=c;r+=64)t(u,n(e.substring(r-64,r)));for(i=(e=e.substring(r-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0;r<i;r+=1)o[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(o[r>>2]|=128<<(r%4<<3),r>55)for(t(u,o),r=0;r<16;r+=1)o[r]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,t(u,o),u}function o(e){var n,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=c;n+=64)t(u,r(e.subarray(n-64,n)));for(i=(e=n-64<c?e.subarray(n-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=0;n<i;n+=1)o[n>>2]|=e[n]<<(n%4<<3);if(o[n>>2]|=128<<(n%4<<3),n>55)for(t(u,o),n=0;n<16;n+=1)o[n]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,t(u,o),u}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return a(i("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,n){var r,i,o,s,a=this.byteLength,l=e(t,a),c=a;return undefined!==n&&(c=e(n,a)),l>c?new ArrayBuffer(0):(r=c-l,i=new ArrayBuffer(r),o=new Uint8Array(i),s=new Uint8Array(this,l,r),o.set(s),i)}}(),u.prototype.append=function(e){return this.appendBinary(l(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var r,i=this._buff.length;for(r=64;r<=i;r+=64)t(this._hash,n(this._buff.substring(r-64,r)));return this._buff=this._buff.substring(r-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,n){var r,i,o,s=n;if(e[s>>2]|=128<<(s%4<<3),s>55)for(t(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,t(this._hash,e)},u.hash=function(e,t){return u.hashBinary(l(e),t)},u.hashBinary=function(e,t){var n=a(i(e));return t?c(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var n,i=function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e)),n.set(new Uint8Array(t),e.byteLength),n}(this._buff.buffer,e),o=i.length;for(this._length+=e.byteLength,n=64;n<=o;n+=64)t(this._hash,r(i.subarray(n-64,n)));return this._buff=n-64<o?new Uint8Array(i.buffer.slice(n-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e=u.prototype.getState.call(this);return e.buff=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}(e.buff),e},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var n=a(o(new Uint8Array(e)));return t?c(n):n},u}()),tt.exports);const rt=Z(nt),it=[];let ot;class st{static addHandler(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}static removeHandler(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]}static windowResizeHandler(e){st.addHandler(window,"resize",e)}static offWindowResizeHandler(e){st.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=globalThis.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const e=globalThis.document;let t=globalThis.document.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitCancelFullScreen;if(void 0!==t&&t)t.call(globalThis.document);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}else{let t=e;t||(t=globalThis.document.documentElement);let n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(void 0!==n&&n)n.call(t);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}}static requestFullScreen(e=globalThis.document.documentElement){let t=e;var n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new window.ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}}static exitFullScreen(){const e=globalThis.document;var t=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(t)t.call(document);else if(void 0!==window.ActiveXObject){var n=new window.ActiveXObject("WScript.Shell");null!==n&&n.SendKeys("{F11}")}}static fullScreenElement(){return globalThis.document.fullscreenElement||globalThis.document.webkitFullscreenElement||globalThis.document.mozFullscreenElement||globalThis.document.msFullscreenElement}static isFullScreen(){return!!st.fullScreenElement()}static onFullScreenChanged(e){let t;"onfullscreenchange"in globalThis.document?t="fullscreenchange":"onwebkitfullscreenchange"in globalThis.document?t="webkitfullscreenchange":"onmozfullscreenchange"in globalThis.document&&(t="mozfullscreenchange"),t?document.addEventListener(t,(function(){const t=st.isFullScreen();e(t)})):document.addEventListener("MSFullscreenChange",(function(){const t=st.isFullScreen();e(t)}))}static stringifyCircularHandler(e,t){if("object"==typeof t&&null!==t){if(-1!==it.indexOf(t))return;it.push(t)}return t}static jsonStringify(e){if(!e)return"";const t=JSON.stringify(e,st.stringifyCircularHandler);return it.length=0,t}static jsonParse(e){const t=st.jsonStringify(e);if(t.length>1)return JSON.parse(t)}static getObjectURL(e){let t;const n=window;return null!=n.createObjcectURL?t=n.createOjcectURL(e):null!=globalThis.URL?t=globalThis.URL.createObjectURL(e):null!=globalThis.webkitURL&&(t=globalThis.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=new rt.ArrayBuffer,s=new FileReader;s.onload=function(e){o.append(e.target?.result);const n=o.end(!1);t({isOK:!0,data:n})},s.onerror=function(){const e="计算文件简单摘要错误!";console.warn(e),t({isOK:!1,data:e})},function(){const e=2097152>=i.size?i.size:2097152;s.readAsArrayBuffer(r.call(i,0,e))}()}static getFileMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=2097152,s=Math.ceil(i.size/o);let a=0;const l=new rt.ArrayBuffer,c=new FileReader;function u(){const e=a*o,t=e+o>=i.size?i.size:e+o;c.readAsArrayBuffer(r.call(i,e,t))}c.onload=function(e){if(l.append(e.target?.result),a++,a<s)u();else{const e=l.end(!1);t({isOK:!0,data:e})}},c.onerror=function(){const e=`${i.name}:计算文件简单摘要错误!`;console.warn(e),t({isOK:!1,data:e})},u()}static MD5(e,t=!1){return rt.hash(e,t)}static copyTextByCommand(e){return new Promise(((t,n)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),t(!0)}))}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then((function(){return!0}),(function(e){return!1})):st.copyTextByCommand(e);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();n.rangeCount>0&&n.removeAllRanges(),n.addRange(t);try{return document.execCommand("copy"),n.removeRange(t),!0}catch(e){return n.removeRange(t),console.error("Command复制文本错误",e),!1}}static copyElementText(e){if(!navigator.clipboard)return st.copyElementTextByCommand(e);const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();return n.rangeCount>0&&n.removeAllRanges(),n.addRange(t),navigator.clipboard.writeText(n).then((function(){return n.removeRange(t),!0}),(function(e){return n.removeRange(t),console.error("Clipboard复制文本错误",e),!1}))}static setGrayMode(e){st.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,t,n){const r=n||document.body;let{className:i}=r;i=i.replace(t,""),r.className=e?`${i} ${t} `:i}static setCssVar(e,t,n=document.documentElement){n.style.setProperty(e,t)}static dispatchWindowResize(){const e=new Event("resize");globalThis.dispatchEvent(e)}static dispatchElementEvent(e,t="click",n){let r;if(r=ze(e)?document.getElementById(e):e,r){const e=new Event(t,{bubbles:!0,cancelable:!0});n&&r.addEventListener("ev",(e=>{n(e)}),!1),r.dispatchEvent(e)}}static getRandomNum(e,t){var n=t-e,r=Math.random();return e+Math.round(r*n)}static merge(e={},t={}){let n,r,i,o;for(e||(e={}),r=0,i=t.length;r<i;r++)for(n in o=t[r],o)e[n]=o[n];return e}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let n in t)e.options[n]=t[n];return e.options}static formatNum(e,t){let n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static splitWords(e){return this.trim(e).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(e,t){let n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}static throttle(e,t){let n=!0;return function(){if(!n)return!1;n=!1,setTimeout((()=>{e(),n=!0}),t)}}static dataURLtoBlob(e){let t=e.split(",");if(!t||0===t.length)return;let n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}static getElement(e){return"string"==typeof e?document.getElementById(e):e}static getStyle(e,t){let n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){let r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}static create(e,t,n){let r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}static removeElement(e){let t=e.parentNode;t&&t.removeChild(e)}static emptyElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(void 0!==e.classList)return e.classList.contains(t);let n=this.getClass(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}static addClass(e,t){if(void 0!==e.classList){let n=this.splitWords(t);for(let t=0,r=n.length;t<r;t++)e.classList.add(n[t])}else if(!this.hasClass(e,t)){let n=this.getClass(e);this.setClass(e,(n?n+" ":"")+t)}}static removeClass(e,t){void 0!==e.classList?e.classList.remove(t):this.setClass(e,this.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}static createSvgElement(e,t,n,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",e),i.setAttribute("height",t),i.setAttribute("viewBox",`0 0 ${e} ${t}`);let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",n),i.appendChild(o),r&&r.appendChild(i),i}static parseDom(e,t=!0,n=""){t=t??!1;let r=document.createElement("div");return r.className=n||"",r.innerHTML=e,t?r:r.childNodes}static createVideoHTML(e,t,n){let r=this.create("video",t,n),i=this.create("source","",r);i.setAttribute("src",e),i.setAttribute("type","video/map4");let o=this.create("source","",r);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),r}static readFilePromise(e,t="ArrayBuffer",n="UTF-8"){return new Promise(((r,i)=>{const o=new FileReader;switch(t){case"ArrayBuffer":o.readAsArrayBuffer(e);break;case"Text":o.readAsText(e,n);break;case"BinaryString":o.readAsBinaryString(e);break;case"DataURL":case"FileBytes":o.readAsDataURL(e)}o.onload=function(){if(o.result)if("FileBytes"===t){const e=o.result,t=e.indexOf("64,"),n=e.substring(t+3);r(n)}else r(o.result);else i(o)},o.onerror=function(){i(o)}}))}static readFileBytes(e){return this.readFilePromise(e,"FileBytes")}static promisify(e,...t){return function(){return new Promise(((n,r)=>{t.push((function(e,t){e?r(e):n(t)})),e.apply(this,t)}))}}static wait(e){return new Promise((t=>setTimeout(t,e)))}static blockEvent(e){e.preventDefault(),e.stopPropagation()}static bindDropFileHanlder(e,t){if(!e)throw Error("传入Element对象不能为空!");let n;if(ze(e)){let t=document.getElementById(e);if(t)n=t;else{const r=document.getElementsByClassName(e);if(!r||0==r.length)throw Error("未找到对应id或类名的HtmlElement对象!");t=r[0],n=t}}else{if(!Le(e))throw Error("ele参数只能为string 或 Element对象!");n=e}n&&(n.addEventListener("dragenter",this.blockEvent,!1),n.addEventListener("dragover",this.blockEvent,!1),n.addEventListener("drop",(function(e){st.blockEvent(e),t(e.dataTransfer.files)}),!1))}static getInputElement(){var e=document.activeElement;return!e||"INPUT"!=e.tagName&&"TEXTAREA"!=e.tagName&&"true"!=e.contentEditable?null:e}static guessPasteTextToFileName(e,t){let n,r=t;return ze(e)?r=(je(e)?"json":$e(e)&&"kml")||"text":(Ce(e)&&e.type||Ae(e))&&(r="json"),"text"==r?n="pasted.txt":"kml"==r?n="pasted.kml":"json"==r&&(n="pasted.json"),n}static pasteEventHanlder(e,t){const n=this;if(n.getInputElement())return;n.blockEvent(e);const r=e.clipboardData,i=Array.from(r.types||[]).join(","),o=Array.from(r.items||[]);let s;if(i.includes("text/plain")){const e=r.getData("text/plain");if(":"===e[1])return t(e);if(Ue(e))return t(e);const i=n.guessPasteTextToFileName(e);if(!i||"pasted.txt"===i)return t(e);{const t=new Blob([e]);s=[new File([t],i)]}}else s=o.map((function(e){return"file"==e.kind?e.getAsFile():null}));s=s.filter(Boolean),s.length?t(s):t(void 0)}static onPasteHandler(e,t=document){const n=this;ot=t=>{n.pasteEventHanlder(t,e)},st.addHandler(t,"paste",ot)}static offPasteHandler(e=document){ot&&st.removeHandler(e,"paste",ot)}static loadScript(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,document.head.appendChild(t)}static loadJsCode(e){var t=document.createElement("script");t.type="text/javascript";try{t.appendChild(document.createTextNode(e))}catch(n){t.text=e}document.body.appendChild(t)}static deepCopy(e){return structuredClone(e)}}const at=new Map,lt=function(e,t,n){ce.Config?.ServiceURL&&ce.Config?.ServiceURL.DefaultHproseAPI&&(ce.Config.DefaultHproseAPI=ce.Config?.ServiceURL.DefaultHproseAPI,ce.DefaultProxyClient=new Qe(ce.Config?.ServiceURL.DefaultHproseAPI));const r=ce.Config.UI.GrayMode;r&&st.setGrayMode(r);const i=new re(e,ce.EventBus);ce.Message=i,ce.SystemID=t,ce.SystemGroup=n,ce.EventBus.on(ne.HproseServiceErrorEvent,(e=>{const t=`当前后台业务服务不可用!${e}`;console.warn("Hprose请求错误",t)})),ce.EventBus.on(ne.WebAPIErrorEvent,(e=>{const t=`WebAPI后台服务不可用!${e}`;console.warn("WebAPI请求错误",t)})),ce.EventBus.on(ne.AxiosRequestErrorEvent,(e=>{const t=`Http请求'${e.code}'错误: ${e.message}`;console.warn("Http请求错误",t)})),ce.EventBus.on(ne.CommonWarnEvent,(e=>{i.warn(e)}))};function ct(e){if(e&&He.isNotEmpty(e)){if(at.has(e))return at.get(e);{const t=new Qe(e);return at.set(e,t),t}}}function ut(e){const t=ct(e);return t&&(ce.DefaultProxyClient=t),t}class ht{constructor(e,t,n,r){if(this.layoutState=e,this._LayoutID=t,this._mapItemRefs=r,ce.RightWidgetConfigMap){const e=ce.RightWidgetConfigMap.get(t);e&&e.forEach((e=>{if(this.widgetConfigDiction.set(e.id,e),e.afterid)if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}else{const e=ce.WidgetConfigList??n;e&&e.forEach((e=>{if(e.layoutID===t&&(this.widgetConfigDiction.set(e.id,e),e.afterid))if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}}layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfigDiction=new Map;_LayoutID;_mapItemRefs;getLayoutID(){return this._LayoutID}getWidgetConfigMap(){return this.widgetConfigDiction}preloadWidgets(){if(this.widgetConfigDiction.size>0)for(const[e,t]of this.widgetConfigDiction)t.preload&&!t.afterid&&this._loadWidget(t)}async loadWidget(e){if(!e)return;let t;if(Ce(e)?t=e:ze(e)&&(t=this.widgetConfigDiction.get(e)),t){if(t.afterid){if(this.isWidgetLoaded(t.afterid))return this._loadWidget(t);{let e=function(t){t.layoutID===n._LayoutID&&t.widgetID===r&&(n._loadWidget(i),ce.EventBus.off(ne.WidgetLoadedEvent,e))};const n=this,r=t.afterid,i=t;return ce.EventBus.on(ne.WidgetLoadedEvent,e),this.loadWidget(t.afterid)}}return this._loadWidget(t)}}loadOtherDependenceWidgets(e){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);t?.forEach((e=>{e.preload&&this._loadWidget(e)}))}}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component?e.component().then((t=>{if(t.default){const n=m(t.default);n.id=e.id,e.layout&&(n.style=e.layout),e.cssClass&&(n.cssClass=e.cssClass),e.layoutID&&(n.layoutID=e.layoutID),e.label&&(n.label=e.label),e.jsURL&&(n.jsURL=e.jsURL),e.cssURL&&(n.cssURL=e.cssURL),this.getContainerComponents(e.container).value.set(e.id,n),this.widgetsLoadedSet.add(e.id),v().then((()=>{ce.EventBus.emit(ne.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)}))}})).catch((t=>{ce.Logger().error("加载Widget失败!",e,t),ce.EventBus.emit(ne.WidgetLoadedErrorEvent,e)})):void 0;this.changeWidgetVisible(e.id,!0)}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const e of n)if(this.isWidgetLoaded(e.id)){t=!0;break}}return t}unloadWidget(e){if(!e)return;if(!this.isWidgetLoaded(e))return;const t=this.widgetConfigDiction.get(e);if(t){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);if(t)for(const e of t)this.unloadWidget(e.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&this._mapItemRefs.delete(e),ce.EventBus.emit(ne.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer.value,n=this.layoutState.centerBackContainer.value;e?(t&&(t.style.left="0",t.style.width="100%"),n&&(n.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),n&&(n.style.width="50%"))}getLayoutContainer(e){switch(e){case ue.top:return this.layoutState.topContainer.value;case ue.bottom:return this.layoutState.bottomContainer.value;case ue.left:return this.layoutState.leftContainer.value;case ue.right:return this.layoutState.rightContainer.value;case ue.centerBack:return this.layoutState.centerBackContainer.value;case ue.centerMain:return this.layoutState.centerMainContainer.value;case ue.centerFront:return this.layoutState.centerFrontContainer.value}}changeContainerVisible(e,t=!1){const n=this.getLayoutContainer(e);n&&(n.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const n=this.getWidgetComponent(e);n&&n.changeVisible&&n.changeVisible(t)}isWidgetVisible(e){const t=this.getWidgetComponent(e);return!!t&&(!t.isShow||t.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfigDiction.get(e)}getGroupWigetItems(e){const t=[];for(const[n,r]of this.widgetConfigDiction)r.group===e&&t.push(r);return t}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const n=t(new Map);return this.layoutMap.set(e,n),n}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach((t=>{e.push(t)})),e}unloadAllWidgets(e){const t=[];this.widgetsLoadedSet.forEach((n=>{e&&e.length>0?e.findIndex((e=>e===n))<0&&t.push(n):t.push(n)})),t.forEach((e=>this.unloadWidget(e)))}unloadWidgets(e){e&&e.length>0&&e.forEach((e=>{this.unloadWidget(e)}))}static getLayoutManager(e,t){if(t){const n=t.find((t=>t.id===e));if(n&&n.layoutID)return ce.LayoutMap.get(n.layoutID)}}dispose(){this.unloadAllWidgets(),this.widgetConfigDiction.clear(),this.widgetsLoadedSet.clear(),this._LayoutID?ce.LayoutMap.delete(this._LayoutID):(ce.LayoutMap.delete(""),ce.LayoutManager=void 0)}}const dt=["id"],ft=he(e({__name:"layout",props:{widgetConfig:{type:Array,required:!1,default:void 0},layoutID:{type:String,default:"layoutDefault"},layoutStyle:{type:Object},noLeft:{type:Boolean,default:!1},noRight:{type:Boolean,default:!1},noBottom:{type:Boolean,default:!1},noTop:{type:Boolean,default:!1},noFront:{type:Boolean,default:!1},noBack:{type:Boolean,default:!1},noMain:{type:Boolean,default:!1}},emits:["containerLoaded"],setup(e,{emit:n}){const o=e,s=n,l=o.layoutID,c=t(l),h=t(),p=t(),m=t(),v=t(),M=t(),A=t(),_=t(),R=y({top:!o.noTop,main:!o.noMain,back:!o.noBack,front:!o.noFront,left:!o.noLeft,right:!o.noRight,bottom:!o.noBottom});w((()=>o.noTop),(e=>{R.top=!e})),w((()=>o.noMain),(e=>{R.main=!e})),w((()=>o.noBack),(e=>{R.back=!e})),w((()=>o.noFront),(e=>{R.front=!e})),w((()=>o.noLeft),(e=>{R.left=!e})),w((()=>o.noRight),(e=>{R.right=!e})),w((()=>o.noBottom),(e=>{R.bottom=!e}));const L=new Map,I=(e,t)=>{e&&L.set(t,e)},D=new ht({topContainer:h,centerBackContainer:p,centerMainContainer:m,centerFrontContainer:v,bottomContainer:M,leftContainer:A,rightContainer:_},l,o.widgetConfig,L);function N(e){return D?.getContainerComponents(e).value}const P=void 0,O=b((()=>R.top?N(ue.top):P)),B=b((()=>R.back?N(ue.centerBack):P)),F=b((()=>R.front?N(ue.centerFront):P)),W=b((()=>R.left?N(ue.left):P)),U=b((()=>R.right?N(ue.right):P)),j=b((()=>R.bottom?N(ue.bottom):P)),$=b((()=>o.layoutStyle));return S((()=>{D&&(l?ce.LayoutMap.set(l,D):(ce.LayoutManager=D,ce.LayoutMap.set("",D)),s("containerLoaded",{layoutID:l,layoutManager:D}),ce.EventBus.emit(ne.LayoutContainerLoaded,{layoutID:l,layoutManager:D}),D.preloadWidgets())})),C((()=>{D&&D.dispose()})),(e,t)=>(a(),E("div",{id:c.value,class:"layoutContainer",style:x($.value)},[R.top?(a(),E("div",{key:0,ref_key:"topContainer",ref:h,class:"topContainer"},[r(e.$slots,"top",{},void 0,!0),(a(!0),E(k,null,T(O.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),u("div",null,[R.main?(a(),E("div",{key:0,ref_key:"centerMainContainer",ref:m,class:"centerdiv mainContainer"},[r(e.$slots,"main",{},(()=>[d(fe)]),!0)],512)):f("",!0),R.back?(a(),E("div",{key:1,ref_key:"centerBackContainer",ref:p,class:"centerdiv backContainer"},[r(e.$slots,"back",{},void 0,!0),(a(!0),E(k,null,T(B.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),R.front?(a(),E("div",{key:2,ref_key:"centerFrontContainer",ref:v,class:"centerdiv centerFrontContainer"},[r(e.$slots,"front",{},void 0,!0),(a(!0),E(k,null,T(F.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),R.left?(a(),E("div",{key:3,ref_key:"leftContainer",ref:A,class:"leftContainer"},[r(e.$slots,"left",{},void 0,!0),(a(!0),E(k,null,T(W.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),R.right?(a(),E("div",{key:4,ref_key:"rightContainer",ref:_,class:"rightContainer"},[r(e.$slots,"right",{},void 0,!0),(a(!0),E(k,null,T(U.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0)]),R.bottom?(a(),E("div",{key:1,ref_key:"bottomContainer",ref:M,class:"bottomContainer"},[r(e.$slots,"bottom",{},void 0,!0),(a(!0),E(k,null,T(j.value,(([e,t])=>(a(),i(g(t),{ref_for:!0,ref:t=>I(t,e),key:e,style:x(t.style),class:z(t.cssClass)},null,8,["style","class"])))),128))],512)):f("",!0),r(e.$slots,"default",{},void 0,!0)],12,dt))}}),[["__scopeId","data-v-982ca474"]]),pt=e({name:"RouterTransition",__name:"RouterTransitionAnimate",props:{enterActive:{default:"animated fadeIn"},leaveActive:{default:"animated fadeOut"}},setup:e=>(t,n)=>{const r=h("router-view");return a(),i(de,null,{default:c((()=>[d(r,null,{default:c((({Component:t,route:n})=>[d(M,{appear:"","enter-active-class":e.enterActive,"leave-active-class":e.leaveActive},{default:c((()=>[(a(),i(p,null,[n.meta.keepAlive?(a(),i(g(t),{key:n.name})):f("",!0)],1024)),n.meta.keepAlive?f("",!0):(a(),i(g(t),{key:n.name}))])),_:2},1032,["enter-active-class","leave-active-class"])])),_:1})])),_:1})}});function gt(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const r=3&Number(e[19])|8;return e[19]=t.substring(r,r+1),e[8]=e[13]=e[18]=e[23]="-",e.join("").toLowerCase()}function mt(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}var vt={},yt=Uint8Array,wt=Uint16Array,bt=Int32Array,St=new yt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ct=new yt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Et=new yt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xt=function(e,t){for(var n=new wt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new bt(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},kt=xt(St,2),Tt=kt.b,zt=kt.r;Tt[28]=258,zt[258]=28;for(var Mt=xt(Ct,0),At=Mt.b,_t=Mt.r,Rt=new wt(32768),Lt=0;Lt<32768;++Lt){var It=(43690&Lt)>>1|(21845&Lt)<<1;It=(61680&(It=(52428&It)>>2|(13107&It)<<2))>>4|(3855&It)<<4,Rt[Lt]=((65280&It)>>8|(255&It)<<8)>>1}var Dt=function(e,t,n){for(var r=e.length,i=0,o=new wt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new wt(t);for(i=1;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new wt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=a[e[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)s[Rt[h]>>l]=c}else for(s=new wt(r),i=0;i<r;++i)e[i]&&(s[i]=Rt[a[e[i]-1]++]>>15-e[i]);return s},Nt=new yt(288);for(Lt=0;Lt<144;++Lt)Nt[Lt]=8;for(Lt=144;Lt<256;++Lt)Nt[Lt]=9;for(Lt=256;Lt<280;++Lt)Nt[Lt]=7;for(Lt=280;Lt<288;++Lt)Nt[Lt]=8;var Pt=new yt(32);for(Lt=0;Lt<32;++Lt)Pt[Lt]=5;var Ot=Dt(Nt,9,0),Bt=Dt(Nt,9,1),Ft=Dt(Pt,5,0),Wt=Dt(Pt,5,1),Ut=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},jt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},$t=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Ht=function(e){return(e+7)/8|0},Gt=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new yt(e.subarray(t,n))},qt=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Xt=function(e,t,n){var r=new Error(t||qt[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Xt),!n)throw r;return r},Vt=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new yt(0);var s=!n,a=s||2!=t.i,l=t.i;s&&(n=new yt(3*i));var c=function(e){var t=n.length;if(e>t){var r=new yt(Math.max(2*t,e));r.set(n),n=r}},u=t.f||0,h=t.p||0,d=t.b||0,f=t.l,p=t.d,g=t.m,m=t.n,v=8*i;do{if(!f){u=jt(e,h,1);var y=jt(e,h+1,3);if(h+=3,!y){var w=e[(_=Ht(h)+4)-4]|e[_-3]<<8,b=_+w;if(b>i){l&&Xt(0);break}a&&c(d+w),n.set(e.subarray(_,b),d),t.b=d+=w,t.p=h=8*b,t.f=u;continue}if(1==y)f=Bt,p=Wt,g=9,m=5;else if(2==y){var S=jt(e,h,31)+257,C=jt(e,h+10,15)+4,E=S+jt(e,h+5,31)+1;h+=14;for(var x=new yt(E),k=new yt(19),T=0;T<C;++T)k[Et[T]]=jt(e,h+3*T,7);h+=3*C;var z=Ut(k),M=(1<<z)-1,A=Dt(k,z,1);for(T=0;T<E;){var _,R=A[jt(e,h,M)];if(h+=15&R,(_=R>>4)<16)x[T++]=_;else{var L=0,I=0;for(16==_?(I=3+jt(e,h,3),h+=2,L=x[T-1]):17==_?(I=3+jt(e,h,7),h+=3):18==_&&(I=11+jt(e,h,127),h+=7);I--;)x[T++]=L}}var D=x.subarray(0,S),N=x.subarray(S);g=Ut(D),m=Ut(N),f=Dt(D,g,1),p=Dt(N,m,1)}else Xt(1);if(h>v){l&&Xt(0);break}}a&&c(d+131072);for(var P=(1<<g)-1,O=(1<<m)-1,B=h;;B=h){var F=(L=f[$t(e,h)&P])>>4;if((h+=15&L)>v){l&&Xt(0);break}if(L||Xt(2),F<256)n[d++]=F;else{if(256==F){B=h,f=null;break}var W=F-254;if(F>264){var U=St[T=F-257];W=jt(e,h,(1<<U)-1)+Tt[T],h+=U}var j=p[$t(e,h)&O],$=j>>4;if(j||Xt(3),h+=15&j,N=At[$],$>3&&(U=Ct[$],N+=$t(e,h)&(1<<U)-1,h+=U),h>v){l&&Xt(0);break}a&&c(d+131072);var H=d+W;if(d<N){var G=o-N,q=Math.min(N,H);for(G+d<0&&Xt(3);d<q;++d)n[d]=r[G+d]}for(;d<H;++d)n[d]=n[d-N]}}t.l=f,t.p=B,t.b=d,t.f=u,f&&(u=1,t.m=g,t.d=p,t.n=m)}while(!u);return d!=n.length&&s?Gt(n,0,d):n.subarray(0,d)},Kt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Yt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},Zt=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:on,l:0};if(1==i){var s=new yt(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=i-1;)a=n[n[c].f<n[h].f?c++:h++],l=n[c!=u&&n[c].f<n[h].f?c++:h++],n[u++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var f=new wt(d+1),p=Jt(n[u-1],f,0);if(p>t){r=0;var g=0,m=p-t,v=1<<m;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(f[y]>t))break;g+=v-(1<<p-f[y]),f[y]=t}for(g>>=m;g>0;){var w=o[r].s;f[w]<t?g-=1<<t-f[w]++-1:++r}for(;r>=0&&g;--r){var b=o[r].s;f[b]==t&&(--f[b],++g)}p=t}return{t:new yt(f),l:p}},Jt=function(e,t,n){return-1==e.s?Math.max(Jt(e.l,t,n+1),Jt(e.r,t,n+1)):t[e.s]=n},Qt=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new wt(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},en=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},tn=function(e,t,n){var r=n.length,i=Ht(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},nn=function(e,t,n,r,i,o,s,a,l,c,u){Kt(t,u++,n),++i[256];for(var h=Zt(i,15),d=h.t,f=h.l,p=Zt(o,15),g=p.t,m=p.l,v=Qt(d),y=v.c,w=v.n,b=Qt(g),S=b.c,C=b.n,E=new wt(19),x=0;x<y.length;++x)++E[31&y[x]];for(x=0;x<S.length;++x)++E[31&S[x]];for(var k=Zt(E,7),T=k.t,z=k.l,M=19;M>4&&!T[Et[M-1]];--M);var A,_,R,L,I=c+5<<3,D=en(i,Nt)+en(o,Pt)+s,N=en(i,d)+en(o,g)+s+14+3*M+en(E,T)+2*E[16]+3*E[17]+7*E[18];if(l>=0&&I<=D&&I<=N)return tn(t,u,e.subarray(l,l+c));if(Kt(t,u,1+(N<D)),u+=2,N<D){A=Dt(d,f,0),_=d,R=Dt(g,m,0),L=g;var P=Dt(T,z,0);for(Kt(t,u,w-257),Kt(t,u+5,C-1),Kt(t,u+10,M-4),u+=14,x=0;x<M;++x)Kt(t,u+3*x,T[Et[x]]);u+=3*M;for(var O=[y,S],B=0;B<2;++B){var F=O[B];for(x=0;x<F.length;++x){var W=31&F[x];Kt(t,u,P[W]),u+=T[W],W>15&&(Kt(t,u,F[x]>>5&127),u+=F[x]>>12)}}}else A=Ot,_=Nt,R=Ft,L=Pt;for(x=0;x<a;++x){var U=r[x];if(U>255){Yt(t,u,A[257+(W=U>>18&31)]),u+=_[W+257],W>7&&(Kt(t,u,U>>23&31),u+=St[W]);var j=31&U;Yt(t,u,R[j]),u+=L[j],j>3&&(Yt(t,u,U>>5&8191),u+=Ct[j])}else Yt(t,u,A[U]),u+=_[U]}return Yt(t,u,A[256]),u+_[256]},rn=new bt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),on=new yt(0),sn=function(e,t,n,r,i,o){var s=o.z||e.length,a=new yt(r+s+5*(1+Math.ceil(s/7e3))+i),l=a.subarray(r,a.length-i),c=o.l,u=7&(o.r||0);if(t){u&&(l[0]=o.r>>3);for(var h=rn[t-1],d=h>>13,f=8191&h,p=(1<<n)-1,g=o.p||new wt(32768),m=o.h||new wt(p+1),v=Math.ceil(n/3),y=2*v,w=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&p},b=new bt(25e3),S=new wt(288),C=new wt(32),E=0,x=0,k=o.i||0,T=0,z=o.w||0,M=0;k+2<s;++k){var A=w(k),_=32767&k,R=m[A];if(g[_]=R,m[A]=_,z<=k){var L=s-k;if((E>7e3||T>24576)&&(L>423||!c)){u=nn(e,l,0,b,S,C,x,T,M,k-M,u),T=E=x=0,M=k;for(var I=0;I<286;++I)S[I]=0;for(I=0;I<30;++I)C[I]=0}var D=2,N=0,P=f,O=_-R&32767;if(L>2&&A==w(k-O))for(var B=Math.min(d,L)-1,F=Math.min(32767,k),W=Math.min(258,L);O<=F&&--P&&_!=R;){if(e[k+D]==e[k+D-O]){for(var U=0;U<W&&e[k+U]==e[k+U-O];++U);if(U>D){if(D=U,N=O,U>B)break;var j=Math.min(O,U-2),$=0;for(I=0;I<j;++I){var H=k-O+I&32767,G=H-g[H]&32767;G>$&&($=G,R=H)}}}O+=(_=R)-(R=g[_])&32767}if(N){b[T++]=268435456|zt[D]<<18|_t[N];var q=31&zt[D],X=31&_t[N];x+=St[q]+Ct[X],++S[257+q],++C[X],z=k+D,++E}else b[T++]=e[k],++S[e[k]]}}for(k=Math.max(k,z);k<s;++k)b[T++]=e[k],++S[e[k]];u=nn(e,l,c,b,S,C,x,T,M,k-M,u),c||(o.r=7&u|l[u/8|0]<<3,u-=7,o.h=m,o.p=g,o.i=k,o.w=z)}else{for(k=o.w||0;k<s+c;k+=65535){var V=k+65535;V>=s&&(l[u/8|0]=c,V=s),u=tn(l,u+1,e.subarray(k,V))}o.i=s}return Gt(a,0,r+Ht(u)+i)},an=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),ln=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=an[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},cn=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new yt(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return sn(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,i)},un=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},hn=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var c=a.toString();if(a.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var h in t+=c,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=c}else n[l]=a}return t},dn=[],fn=function(){return[yt,wt,bt,St,Ct,Et,Tt,At,Bt,Wt,Rt,qt,Dt,Ut,jt,$t,Ht,Gt,Xt,Vt,An,vn,yn]},pn=function(){return[yt,wt,bt,St,Ct,Et,zt,_t,Ot,Nt,Ft,Pt,Rt,rn,on,Dt,Kt,Yt,Zt,Jt,Qt,en,tn,nn,Ht,Gt,sn,cn,Mn,vn]},gn=function(){return[xn,zn,En,ln,an]},mn=function(){return[kn,Tn]},vn=function(e){return postMessage(e,[e.buffer])},yn=function(e){return e&&{out:e.size&&new yt(e.size),dictionary:e.dictionary}},wn=function(e,t,n,r,i,o){var s=function(e,t,n,r){if(!dn[n]){for(var i="",o={},s=e.length-1,a=0;a<s;++a)i=hn(e[a],i,o);dn[n]={c:hn(e[s],i,o),e:o}}var l=un({},dn[n].e);return function(e,t,n,r,i){var o=new Worker(vt[t]||(vt[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}(dn[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,l,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(l),r)}(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},bn=function(e,t){return e[t]|e[t+1]<<8},Sn=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Cn=function(e,t){return Sn(e,t)+4294967296*Sn(e,t+4)},En=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},xn=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&En(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},kn=function(e){31==e[0]&&139==e[1]&&8==e[2]||Xt(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},Tn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},zn=function(e){return 10+(e.filename?e.filename.length+1:0)};function Mn(e,t){return cn(e,t||{},0,0)}function An(e,t){return Vt(e,{i:2},t&&t.out,t&&t.dictionary)}function _n(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[pn,gn,function(){return[Rn]}],(function(e){return vn(Rn(e.data[0],e.data[1]))}),2,n)}function Rn(e,t){t||(t={});var n=ln(),r=e.length;n.p(e);var i=cn(e,t,zn(t),8),o=i.length;return xn(i,t),En(i,o-8,n.d()),En(i,o-4,r),i}function Ln(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[fn,mn,function(){return[In]}],(function(e){return vn(In(e.data[0],e.data[1]))}),3,n)}function In(e,t){var n=kn(e);return n+8>e.length&&Xt(6,"invalid gzip data"),Vt(e.subarray(n,-8),{i:2},t&&t.out||new yt(Tn(e)),t&&t.dictionary)}var Dn=function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=un(r,o[1]),o=o[0]),o instanceof yt?n[s]=[o,a]:(n[s+="/"]=[new yt(0),a],Dn(o,s,n,r))}},Nn="undefined"!=typeof TextEncoder&&new TextEncoder,Pn="undefined"!=typeof TextDecoder&&new TextDecoder;try{Pn.decode(on,{stream:!0})}catch(e){}function On(e,t){if(Nn)return Nn.encode(e);for(var n=e.length,r=new yt(e.length+(e.length>>1)),i=0,o=function(e){r[i++]=e},s=0;s<n;++s){if(i+5>r.length){var a=new yt(i+8+(n-s<<1));a.set(r),r=a}var l=e.charCodeAt(s);l<128||t?o(l):l<2048?(o(192|l>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++s))>>18),o(128|l>>12&63),o(128|l>>6&63),o(128|63&l)):(o(224|l>>12),o(128|l>>6&63),o(128|63&l))}return Gt(r,0,i)}function Bn(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(Pn)return Pn.decode(e);var i=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Gt(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),o=i.s;return(n=i.r).length&&Xt(8),o}var Fn=function(e,t){return t+30+bn(e,t+26)+bn(e,t+28)},Wn=function(e,t,n){var r=bn(e,t+28),i=Bn(e.subarray(t+46,t+46+r),!(2048&bn(e,t+8))),o=t+46+r,s=Sn(e,t+20),a=n&&4294967295==s?Un(e,o):[s,Sn(e,t+24),Sn(e,t+42)],l=a[0],c=a[1],u=a[2];return[bn(e,t+10),l,c,i,o+bn(e,t+30)+bn(e,t+32),u]},Un=function(e,t){for(;1!=bn(e,t);t+=4+bn(e,t+2));return[Cn(e,t+12),Cn(e,t+4),Cn(e,t+20)]},jn=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Xt(9),t+=r+4}return t},$n=function(e,t,n,r,i,o,s,a){var l=r.length,c=n.extra,u=a&&a.length,h=jn(c);En(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),f=d.getFullYear()-1980;if((f<0||f>119)&&Xt(10),En(e,t,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,-1!=o&&(En(e,t,n.crc),En(e,t+4,o<0?-o-2:o),En(e,t+8,n.size)),En(e,t+12,l),En(e,t+14,h),t+=16,null!=s&&(En(e,t,u),En(e,t+6,n.attrs),En(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var p in c){var g=c[p],m=g.length;En(e,t,+p),En(e,t+2,m),e.set(g,t+4),t+=4+m}return u&&(e.set(a,t),t+=u),t},Hn=function(e,t,n,r,i){En(e,t,101010256),En(e,t+8,n),En(e,t+10,n),En(e,t+12,r),En(e,t+16,i)};var Gn="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};function qn(e){var t={filename:"",directory:"",basename:"",extension:""},n=function(e){return-1==e.indexOf("/")&&-1!=e.indexOf("\\")?"\\":"/"}(e),r=e.split(n),i=r.pop(),o=/\.([a-z][a-z0-9]*)$/i,s=o.test(i)?o.exec(i)[0]:"";return s||i.includes("*")?(t.filename=i,t.extension=s?s.slice(1):"",t.basename=i.slice(0,i.length-s.length),t.directory=r.join(n)):t.directory=i?e:r.join(n),t}function Xn(e){return qn(e).basename}function Vn(e){return qn(e).extension}function Kn(e){var t=qn(e);return t.extension?e.slice(0,e.length-t.extension.length-1):e}function Yn(e,t){var n=Kn(e);return t?n+"."+t:n}function Zn(e){var t=Vn(e);return t?Kn(e)+"."+t.toLowerCase():e}function Jn(e){return e.reduce((function(e,t,n){return 0===n?Xn(t):Qn(e,t)}),"")}function Qn(e,t){var n;return e&&t&&(n=er(e,t).replace(/[-_]$/,"")),n||""}function er(e,t){for(var n=0,r=e.length;n<r&&e[n]===t[n];n++);return e.substr(0,n)}const tr=(e,t)=>{nr(e,t)};function nr(e,t){const n=globalThis.URL||globalThis.webkitURL||window,r=new Blob([e]),i=n.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),n.revokeObjectURL(i),setTimeout((function(){n.revokeObjectURL(i),document.body.removeChild(o)}),400)}const rr=(e,t)=>{const n=JSON.stringify(e,null,2);t?tr(n,t+".json"):K.emit(ne.CommonWarnEvent,"参数JsonID不能为空!")},ir=(e,t,n)=>{e.get(t,{responseType:"blob"}).then((function(e){tr(e.data,n)})).catch((e=>{console.warn(e),K.emit(ne.CommonWarnEvent,"下载文件报错!")}))};async function or(e,t,n){var r,i=function(e){var t=Vn(e).toLowerCase(),n={};return"kml"==t?n["application/vnd.google-earth.kml+xml"]=[".kml"]:"svg"===t?n["image/svg+xml"]=[".svg"]:"zip"===t?n["application/zip"]=[".zip"]:"txt"===t||"csv"===t||"tsv"===t||"tab"===t?n["text/csv"]=[".csv",".tsv",".tab",".txt"]:"json"===t||"geojson"===t||"topojson"===t?n["application/json"]=[".json",".geojson",".topojson"]:n["application/octet-stream"]=["."+t],{suggestedName:e,types:[{description:"Files",accept:n}]}}(e);try{if(globalThis.showSaveFilePicker){r=await globalThis.showSaveFilePicker(i);var o=await r.createWritable();await o.write(t),await o.close()}}catch(e){return void("SecurityError"==e.name?(console.warn(e.message),n(e.message)):"AbortError"==e.name?n():(console.error(e.name,e.message,e),n("Save failed for an unknown reason")))}n()}class sr{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==globalThis.document}static encodeGBK(e){const t=H.encode(e,"ISO-8859-1");return H.decode(t,"gbk")}static async saveZipFromFiles(e,t){const n=[];for(let r=0;r<t.length;r++){const e=t[r],i=e.name,o=await st.readFilePromise(e,"ArrayBuffer"),s=new Uint8Array(o);n.push({filename:i,content:s})}n.length>0&&sr.zipAsync(n,(function(t,n){if(t)throw t;nr(new Blob([n]),e)}))}static saveZipFile(e,t){sr.zipAsync(t,(function(t,n){if(t)throw t;nr(new Blob([n]),e)}))}static saveZipFileSync(e,t){const n=sr.zipSync(t);return!!n&&(nr(new Blob([n]),e),!0)}static unzipSync(e){let t;if(t=e instanceof ArrayBuffer?new Uint8Array(e):e,!sr.runningInBrowser())return;const n=function(e,t){for(var n={},r=e.length-22;101010256!=Sn(e,r);--r)(!r||e.length-r>65558)&&Xt(13);var i=bn(e,r+8);if(!i)return{};var o=Sn(e,r+16),s=4294967295==o||65535==i;if(s){var a=Sn(e,r-12);(s=101075792==Sn(e,a))&&(i=Sn(e,a+32),o=Sn(e,a+48))}for(var l=t&&t.filter,c=0;c<i;++c){var u=Wn(e,o,s),h=u[0],d=u[1],f=u[2],p=u[3],g=u[4],m=u[5],v=Fn(e,m);o=g,l&&!l({name:p,size:d,originalSize:f,compression:h})||(h?8==h?n[p]=An(e.subarray(v,v+d),{out:new yt(f)}):Xt(14,"unknown compression type "+h):n[p]=Gt(e,v,v+d))}return n}(t,{filter:sr.fflateFilter});return sr.fflatePostprocess(n)}static async readZipFromFile(e){const t={content:await st.readFilePromise(e,"ArrayBuffer"),name:e.name};return sr.readZipFile(t)}static async readZipFile(e){const t=await sr.unzipAsync.promise(e.content);return Object.keys(t).reduce((function(e,n){return e.push({filename:n,content:t[n]}),e}),[])}static unzipAsync(e,t){if(!sr.runningInBrowser())throw new Error("Async unzipping only supported in the browser");let n;n=e instanceof ArrayBuffer?new Uint8Array(e):e,function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Xt(7);var r=[],i=function(){for(var e=0;e<r.length;++e)r[e]()},o={},s=function(e,t){Gn((function(){n(e,t)}))};Gn((function(){s=n}));for(var a=e.length-22;101010256!=Sn(e,a);--a)if(!a||e.length-a>65558)return s(Xt(13,0,1),null),i;var l=bn(e,a+8);if(l){var c=l,u=Sn(e,a+16),h=4294967295==u||65535==c;if(h){var d=Sn(e,a-12);(h=101075792==Sn(e,d))&&(c=l=Sn(e,d+32),u=Sn(e,d+48))}for(var f=t&&t.filter,p=function(t){var n=Wn(e,u,h),a=n[0],c=n[1],d=n[2],p=n[3],g=n[4],m=n[5],v=Fn(e,m);u=g;var y=function(e,t){e?(i(),s(e,null)):(t&&(o[p]=t),--l||s(null,o))};if(!f||f({name:p,size:c,originalSize:d,compression:a}))if(a)if(8==a){var w=e.subarray(v,v+c);if(d<524288||c>.8*d)try{y(null,An(w,{out:new yt(d)}))}catch(e){y(e,null)}else r.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[fn],(function(e){return vn(An(e.data[0],yn(e.data[1])))}),1,n)}(w,{size:d},y))}else y(Xt(14,"unknown compression type "+a,1),null);else y(null,Gt(e,v,v+c));else y(null,null)},g=0;g<c;++g)p()}else s(null,{})}(n,{filter:sr.fflateFilter},(function(e,n){e&&t(e),t(null,sr.fflatePostprocess(n))}))}static zipSync(e){if(!sr.runningInBrowser())throw new Error("Async zipping only supported in the browser");return function(e,t){t||(t={});var n={},r=[];Dn(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],c=a[1],u=0==c.level?0:8,h=(E=On(s)).length,d=c.comment,f=d&&On(d),p=f&&f.length,g=jn(c.extra);h>65535&&Xt(11);var m=u?Mn(l,c):l,v=m.length,y=ln();y.p(l),r.push(un(c,{size:l.length,crc:y.d(),c:m,f:E,m:f,u:h!=s.length||f&&d.length!=p,o:i,compression:u})),i+=30+h+g+v,o+=76+2*(h+g)+(p||0)+v}for(var w=new yt(o+22),b=i,S=o-i,C=0;C<r.length;++C){var E=r[C];$n(w,E.o,E,E.f,E.u,E.c.length);var x=30+E.f.length+jn(E.extra);w.set(E.c,E.o+x),$n(w,i,E,E.f,E.u,E.c.length,E.o,E.m),i+=16+x+(E.m?E.m.length:0)}return Hn(w,i,r.length,S,b),w}(sr.fflatePreprocess(e))}static zipAsync(e,t){!function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Xt(7);var r={};Dn(e,"",r,t);var i=Object.keys(r),o=i.length,s=0,a=0,l=o,c=new Array(o),u=[],h=function(){for(var e=0;e<u.length;++e)u[e]()},d=function(e,t){Gn((function(){n(e,t)}))};Gn((function(){d=n}));var f=function(){var e=new yt(a+22),t=s,n=a-s;a=0;for(var r=0;r<l;++r){var i=c[r];try{var o=i.c.length;$n(e,a,i,i.f,i.u,o);var u=30+i.f.length+jn(i.extra),h=a+u;e.set(i.c,h),$n(e,s,i,i.f,i.u,o,a,i.m),s+=16+u+(i.m?i.m.length:0),a=h+o}catch(e){return d(e,null)}}Hn(e,s,c.length,n,t),d(null,e)};o||f();for(var p=function(e){var t=i[e],n=r[t],l=n[0],p=n[1],g=ln(),m=l.length;g.p(l);var v=On(t),y=v.length,w=p.comment,b=w&&On(w),S=b&&b.length,C=jn(p.extra),E=0==p.level?0:8,x=function(n,r){if(n)h(),d(n,null);else{var i=r.length;c[e]=un(p,{size:m,crc:g.d(),c:r,f:v,m:b,u:y!=t.length||b&&w.length!=S,compression:E}),s+=30+y+C+i,a+=76+2*(y+C)+(S||0)+i,--o||f()}};if(y>65535&&x(Xt(11,0,1),null),E)if(m<16e4)try{x(null,Mn(l,p))}catch(e){x(e,null)}else u.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Xt(7),wn(e,t,[pn],(function(e){return vn(Mn(e.data[0],e.data[1]))}),0,n)}(l,p,x));else x(null,l)},g=0;g<l;++g)p(g)}(sr.fflatePreprocess(e),{},t)}static fflateFilter(e){return sr.isImportableZipPath(e.name)}static fflatePostprocess(e){return Object.keys(e).reduce((function(t,n){const r=qn(n).filename,i=sr.encodeGBK(r),o=e[n];return t[i]=o,t}),{})}static isImportableZipPath(e){const t=qn(e),n=Vn(e).toLowerCase();return"gz"!=n&&"zip"!=n&&!/^__MACOSX/.test(e)&&"."!=t.filename[0]}static fflatePreprocess(e){const t={};return e.forEach((e=>{"string"==typeof e.content?e.content=On(e.content):e.content instanceof ArrayBuffer&&(e.content=new Uint8Array(e.content)),t[e.filename]=e.content})),t}}class ar{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==window.document}static isGzipped(e){return e.length>2&&e.buffer instanceof ArrayBuffer&&31==e[0]&&139==e[1]}static gzipSync(e,t){return"string"==typeof e&&(e=On(e)),ar.runningInBrowser()?Rn(e,t):void 0}static async gzipAsync(e,t){let n;if("string"==typeof e&&(n=On(e)),ar.runningInBrowser())return st.promisify(_n)(n,t)}static async readGzipFromFile(e){const t={content:await st.readFilePromise(e,"ArrayBuffer"),name:e.name};return ar.readGzipFile(t)}static readGzipFile(e){var t=e.name.replace(/\.gz$/,"");return[{name:t,content:ar.gunzipSync(e.content,t)}]}static async gunzipAsync(e,t){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),t=t||{},!ar.runningInBrowser())return;var n=st.promisify(Ln);let r=await n(e,t);return t.filename&&(r=Bn(r)),r}static gunzipSync(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e));let n=In(e);return t&&(n=Bn(n)),n}}class lr{static formatToDate(e,t="YYYY-MM-DD"){let n=new Date;if(e&&(ze(e)||xe(e)?n=new Date(e):Ce(e)&&(n=e),!n))throw"date对象为空";const r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return t.replace("YYYY",String(r)).replace("MM",i).replace("DD",o)}static formatToTime(e,t="HH:mm:ss"){let n=new Date;if(e&&(ze(e)||xe(e)?n=new Date(e):Ce(e)&&(n=e),!n))throw"date对象为空";const r=String(n.getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0");return t.replace("HH",r).replace("mm",i).replace("ss",o)}static formatToDateTime(e,t="YYYY-MM-DD HH:mm:ss"){let n=new Date;if(e&&(ze(e)||xe(e)?n=new Date(e):Ce(e)&&(n=e),!n))throw"date对象为空";return this.formatToDate(n,t.split(" ")[0])+" "+this.formatToTime(n,t.split(" ")[1])}static formatStringDateTime(e){let t=`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`;return 14===e.length&&(t=`${t} ${e.substring(8,10)}:${e.substring(10,12)}:${e.substring(12,14)}`),t}}let cr=!0;try{String.fromCharCode.apply(String,[1,2])}catch(e){cr=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var ur=2654435769;function hr(e,t){var n=e.length,r=n<<2;if(t){var i=e[n-1];if(i<(r-=4)-3||i>r)return null;r=i}for(var o=new Uint8Array(r),s=0;s<r;++s)o[s]=e[s>>2]>>((3&s)<<3);return o}function dr(e,t){var n,r=e.length,i=r>>2;3&r&&++i,t?(n=new Uint32Array(i+1))[i]=r:n=new Uint32Array(i);for(var o=0;o<r;++o)n[o>>2]|=e[o]<<((3&o)<<3);return n}function fr(e){return 4294967295&e}function pr(e,t,n,r,i,o){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(o[3&r^i]^n)}function gr(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function mr(e){for(var t=e.length,n=new Uint8Array(3*t),r=0,i=0;i<t;i++){var o=e.charCodeAt(i);if(o<128)n[r++]=o;else if(o<2048)n[r++]=192|o>>6,n[r++]=128|63&o;else{if(!(o<55296||o>57343)){if(i+1<t){var s=e.charCodeAt(i+1);if(o<56320&&56320<=s&&s<=57343){var a=65536+((1023&o)<<10|1023&s);n[r++]=240|a>>18,n[r++]=128|a>>12&63,n[r++]=128|a>>6&63,n[r++]=128|63&a,i++;continue}}throw new Error("Malformed string")}n[r++]=224|o>>12,n[r++]=128|o>>6&63,n[r++]=128|63&o}}return n.subarray(0,r)}function vr(e){var t=e.length;return 0===t?"":t<32767?function(e,t){for(var n=new Array(t),r=0,i=0,o=e.length;r<t&&i<o;r++){var s=e[i++];switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[r]=s;break;case 12:case 13:if(!(i<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(31&s)<<6|63&e[i++];break;case 14:if(!(i+1<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(15&s)<<12|(63&e[i++])<<6|63&e[i++];break;case 15:if(!(i+2<o))throw new Error("Unfinished UTF-8 octet sequence");var a=((7&s)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;if(!(0<=a&&a<=1048575))throw new Error("Character outside valid Unicode range: 0x"+a.toString(16));n[r++]=a>>10&1023|55296,n[r]=1023&a|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+s.toString(16))}}return r<t&&(n.length=r),String.fromCharCode.apply(String,n)}(e,t):function(e,t){for(var n=[],r=new Array(32768),i=0,o=0,s=e.length;i<t&&o<s;i++){var a=e[o++];switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=a;break;case 12:case 13:if(!(o<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&a)<<6|63&e[o++];break;case 14:if(!(o+1<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&a)<<12|(63&e[o++])<<6|63&e[o++];break;case 15:if(!(o+2<s))throw new Error("Unfinished UTF-8 octet sequence");var l=((7&a)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++])-65536;if(!(0<=l&&l<=1048575))throw new Error("Character outside valid Unicode range: 0x"+l.toString(16));r[i++]=l>>10&1023|55296,r[i]=1023&l|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}if(i>=32766){var c=i+1;r.length=c,n.push(String.fromCharCode.apply(String,r)),t-=c,i=-1}}return i>0&&(r.length=i,n.push(String.fromCharCode.apply(String,r))),n.join("")}(e,t)}function yr(e,t){return"string"==typeof e&&(e=mr(e)),"string"==typeof t&&(t=mr(t)),null==e||0===e.length?e:hr(function(e,t){var n,r,i,o,s,a,l=e.length,c=l-1;for(r=e[c],i=0,a=0|Math.floor(6+52/l);a>0;--a){for(o=(i=fr(i+ur))>>>2&3,s=0;s<c;++s)n=e[s+1],r=e[s]=fr(e[s]+pr(i,n,r,s,o,t));n=e[0],r=e[c]=fr(e[c]+pr(i,n,r,c,o,t))}return e}(dr(e,!0),dr(gr(t),!1)),!1)}function wr(e,t){return"string"==typeof e&&(e=function(e){for(var t=globalThis.atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}(e)),"string"==typeof t&&(t=mr(t)),null==e||0===e.length?e:hr(function(e,t){var n,r,i,o,s,a=e.length,l=a-1;for(n=e[0],i=fr(Math.floor(6+52/a)*ur);0!==i;i=fr(i-ur)){for(o=i>>>2&3,s=l;s>0;--s)r=e[s-1],n=e[s]=fr(e[s]-pr(i,n,r,s,o,t));r=e[l],n=e[0]=fr(e[0]-pr(i,n,r,0,o,t))}return e}(dr(e,!1),dr(gr(t),!1)),!0)}const br={toBytes:mr,toString:vr,encrypt:yr,encryptToString:function(e,t){return globalThis.btoa(function(e){var t=e.length;if(0===t)return"";var n=cr?e:function(e){for(var t=e.length,n=new Array(e.length),r=0;r<t;++r)n[r]=e[r];return n}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var r=32767&t,i=t>>15,o=new Array(r?i+1:i),s=0;s<i;++s)o[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return r&&(o[i]=String.fromCharCode.apply(String,n.subarray(i<<15,t))),o.join("")}(yr(e,t)))},decrypt:wr,decryptToString:function(e,t){return vr(wr(e,t))}},Sr=e=>{const t="1.23452384164.123412416";null!==document.getElementById(t)&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const r=n.getContext("2d");r.rotate(-20*Math.PI/180),r.font="12px Vedana",r.fillStyle="rgba(200, 200, 200, 0.30)",r.textBaseline="middle",r.fillText(e,n.width/10,n.height/2);const i=document.createElement("div");return i.id=t,i.style.pointerEvents="none",i.style.top="0px",i.style.left="0px",i.style.position="fixed",i.style.zIndex="10000000",i.style.width=`${document.documentElement.clientWidth}px`,i.style.height=`${document.documentElement.clientHeight}px`,i.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(i),t},Cr={set:e=>{let t=Sr(e);null===document.getElementById(t)&&(t=Sr(e))},del:()=>{let e="1.23452384164.123412416";null!==document.getElementById(e)&&document.body.removeChild(document.getElementById(e))}};let Er;function xr(e){if(!e){if(Er)return Er;throw new Error("首次构建,signalrURL参数不能为空!")}const t=(new G.HubConnectionBuilder).configureLogging(G.LogLevel.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then((()=>{ce.Logger().info("启动SignalR连接!")})),t.onclose((async()=>{ce.Logger().info("断开SignalR连接!")})),t.onreconnecting((()=>{ce.Logger().warn("SignalR服务已断线,重连中...!")})),t.onreconnected((()=>{ce.Logger().warn("SignalR重连成功!")})),Er||(Er=t),t}var kr,Tr,zr={exports:{}},Mr=zr.exports={};function Ar(){throw new Error("setTimeout has not been defined")}function _r(){throw new Error("clearTimeout has not been defined")}function Rr(e){if(kr===setTimeout)return setTimeout(e,0);if((kr===Ar||!kr)&&setTimeout)return kr=setTimeout,setTimeout(e,0);try{return kr(e,0)}catch(t){try{return kr.call(null,e,0)}catch(t){return kr.call(this,e,0)}}}!function(){try{kr="function"==typeof setTimeout?setTimeout:Ar}catch(e){kr=Ar}try{Tr="function"==typeof clearTimeout?clearTimeout:_r}catch(e){Tr=_r}}();var Lr,Ir=[],Dr=!1,Nr=-1;function Pr(){Dr&&Lr&&(Dr=!1,Lr.length?Ir=Lr.concat(Ir):Nr=-1,Ir.length&&Or())}function Or(){if(!Dr){var e=Rr(Pr);Dr=!0;for(var t=Ir.length;t;){for(Lr=Ir,Ir=[];++Nr<t;)Lr&&Lr[Nr].run();Nr=-1,t=Ir.length}Lr=null,Dr=!1,function(e){if(Tr===clearTimeout)return clearTimeout(e);if((Tr===_r||!Tr)&&clearTimeout)return Tr=clearTimeout,clearTimeout(e);try{return Tr(e)}catch(t){try{return Tr.call(null,e)}catch(t){return Tr.call(this,e)}}}(e)}}function Br(e,t){this.fun=e,this.array=t}function Fr(){}Mr.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ir.push(new Br(e,t)),1!==Ir.length||Dr||Rr(Or)},Br.prototype.run=function(){this.fun.apply(null,this.array)},Mr.title="browser",Mr.browser=!0,Mr.env={},Mr.argv=[],Mr.version="",Mr.versions={},Mr.on=Fr,Mr.addListener=Fr,Mr.once=Fr,Mr.off=Fr,Mr.removeListener=Fr,Mr.removeAllListeners=Fr,Mr.emit=Fr,Mr.prependListener=Fr,Mr.prependOnceListener=Fr,Mr.listeners=function(e){return[]},Mr.binding=function(e){throw new Error("process.binding is not supported")},Mr.cwd=function(){return"/"},Mr.chdir=function(e){throw new Error("process.chdir is not supported")},Mr.umask=function(){return 0};const Wr=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(zr.exports),Ur="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,jr=new Set,$r="object"==typeof Wr&&Wr?Wr:{},Hr=(e,t,n,r)=>{"function"==typeof $r.emitWarning?$r.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)};let Gr=globalThis.AbortController,qr=globalThis.AbortSignal;if(void 0===Gr){qr=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},Gr=class{constructor(){t()}signal=new qr;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==$r.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,Hr("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const Xr=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Vr=e=>Xr(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Kr:null:null;class Kr extends Array{constructor(e){super(e),this.fill(0)}}class Yr{heap;length;static#e=!1;static create(e){const t=Vr(e);if(!t)return[];Yr.#e=!0;const n=new Yr(e,t);return Yr.#e=!1,n}constructor(e,t){if(!Yr.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class Zr{#t;#n;#r;#i;#o;#s;#a;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#u;#h;#d;#f;#p;#g;#m;#v;#y;#w;#b;#S;#C;#E;#x;#k;#T;#z;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#C,autopurgeTimers:e.#E,sizes:e.#b,keyMap:e.#h,keyList:e.#d,valList:e.#f,next:e.#p,prev:e.#g,get head(){return e.#m},get tail(){return e.#v},free:e.#y,isBackgroundFetch:t=>e.#M(t),backgroundFetch:(t,n,r,i)=>e.#A(t,n,r,i),moveToTail:t=>e.#_(t),indexes:t=>e.#R(t),rindexes:t=>e.#L(t),isStale:t=>e.#I(t)}}get max(){return this.#t}get maxSize(){return this.#n}get calculatedSize(){return this.#u}get size(){return this.#c}get fetchMethod(){return this.#s}get memoMethod(){return this.#a}get dispose(){return this.#r}get onInsert(){return this.#i}get disposeAfter(){return this.#o}constructor(e){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:l,onInsert:c,disposeAfter:u,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:m,memoMethod:v,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:S,ignoreFetchAbort:C,perf:E}=e;if(void 0!==E&&"function"!=typeof E?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#l=E??Ur,0!==t&&!Xr(t))throw new TypeError("max option must be a nonnegative integer");const x=t?Vr(t):Array;if(!x)throw new Error("invalid max value: "+t);if(this.#t=t,this.#n=f,this.maxEntrySize=p||this.#n,this.sizeCalculation=g,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==v&&"function"!=typeof v)throw new TypeError("memoMethod must be a function if defined");if(this.#a=v,void 0!==m&&"function"!=typeof m)throw new TypeError("fetchMethod must be a function if specified");if(this.#s=m,this.#k=!!m,this.#h=new Map,this.#d=new Array(t).fill(void 0),this.#f=new Array(t).fill(void 0),this.#p=new x(t),this.#g=new x(t),this.#m=0,this.#v=0,this.#y=Yr.create(t),this.#c=0,this.#u=0,"function"==typeof l&&(this.#r=l),"function"==typeof c&&(this.#i=c),"function"==typeof u?(this.#o=u,this.#w=[]):(this.#o=void 0,this.#w=void 0),this.#x=!!this.#r,this.#z=!!this.#i,this.#T=!!this.#o,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!C,0!==this.maxEntrySize){if(0!==this.#n&&!Xr(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!Xr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#D()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=Xr(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!Xr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(0===this.#t&&0===this.ttl&&0===this.#n)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#n){const e="LRU_CACHE_UNBOUNDED";(e=>!jr.has(e))(e)&&(jr.add(e),Hr("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,Zr))}}getRemainingTTL(e){return this.#h.has(e)?1/0:0}#N(){const e=new Kr(this.#t),t=new Kr(this.#t);this.#C=e,this.#S=t;const n=this.ttlAutopurge?new Array(this.#t):void 0;this.#E=n,this.#P=(r,i,o=this.#l.now())=>{if(t[r]=0!==i?o:0,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),0!==i&&n){const e=setTimeout((()=>{this.#I(r)&&this.#O(this.#d[r],"expire")}),i+1);e.unref&&e.unref(),n[r]=e}},this.#B=n=>{t[n]=0!==e[n]?this.#l.now():0},this.#F=(n,o)=>{if(e[o]){const s=e[o],a=t[o];if(!s||!a)return;n.ttl=s,n.start=a,n.now=r||i();const l=n.now-a;n.remainingTTL=s-l}};let r=0;const i=()=>{const e=this.#l.now();if(this.ttlResolution>0){r=e;const t=setTimeout((()=>r=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{const o=this.#h.get(n);if(void 0===o)return 0;const s=e[o],a=t[o];return s&&a?s-((r||i())-a):1/0},this.#I=n=>{const o=t[n],s=e[n];return!!s&&!!o&&(r||i())-o>s}}#B=()=>{};#F=()=>{};#P=()=>{};#I=()=>!1;#D(){const e=new Kr(this.#t);this.#u=0,this.#b=e,this.#W=t=>{this.#u-=e[t],e[t]=0},this.#U=(e,t,n,r)=>{if(this.#M(t))return 0;if(!Xr(n)){if(!r)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!Xr(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#j=(t,n,r)=>{if(e[t]=n,this.#n){const n=this.#n-e[t];for(;this.#u>n;)this.#$(!0)}this.#u+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#u)}}#W=e=>{};#j=(e,t,n)=>{};#U=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#v;this.#H(t)&&(!e&&this.#I(t)||(yield t),t!==this.#m);)t=this.#g[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#m;this.#H(t)&&(!e&&this.#I(t)||(yield t),t!==this.#v);)t=this.#p[t]}#H(e){return void 0!==e&&this.#h.get(this.#d[e])===e}*entries(){for(const e of this.#R())void 0===this.#f[e]||void 0===this.#d[e]||this.#M(this.#f[e])||(yield[this.#d[e],this.#f[e]])}*rentries(){for(const e of this.#L())void 0===this.#f[e]||void 0===this.#d[e]||this.#M(this.#f[e])||(yield[this.#d[e],this.#f[e]])}*keys(){for(const e of this.#R()){const t=this.#d[e];void 0===t||this.#M(this.#f[e])||(yield t)}}*rkeys(){for(const e of this.#L()){const t=this.#d[e];void 0===t||this.#M(this.#f[e])||(yield t)}}*values(){for(const e of this.#R())void 0===this.#f[e]||this.#M(this.#f[e])||(yield this.#f[e])}*rvalues(){for(const e of this.#L())void 0===this.#f[e]||this.#M(this.#f[e])||(yield this.#f[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const n of this.#R()){const r=this.#f[n],i=this.#M(r)?r.__staleWhileFetching:r;if(void 0!==i&&e(i,this.#d[n],this))return this.get(this.#d[n],t)}}forEach(e,t=this){for(const n of this.#R()){const r=this.#f[n],i=this.#M(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#d[n],this)}}rforEach(e,t=this){for(const n of this.#L()){const r=this.#f[n],i=this.#M(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#d[n],this)}}purgeStale(){let e=!1;for(const t of this.#L({allowStale:!0}))this.#I(t)&&(this.#O(this.#d[t],"expire"),e=!0);return e}info(e){const t=this.#h.get(e);if(void 0===t)return;const n=this.#f[t],r=this.#M(n)?n.__staleWhileFetching:n;if(void 0===r)return;const i={value:r};if(this.#C&&this.#S){const e=this.#C[t],n=this.#S[t];if(e&&n){const t=e-(this.#l.now()-n);i.ttl=t,i.start=Date.now()}}return this.#b&&(i.size=this.#b[t]),i}dump(){const e=[];for(const t of this.#R({allowStale:!0})){const n=this.#d[t],r=this.#f[t],i=this.#M(r)?r.__staleWhileFetching:r;if(void 0===i||void 0===n)continue;const o={value:i};if(this.#C&&this.#S){o.ttl=this.#C[t];const e=this.#l.now()-this.#S[t];o.start=Math.floor(Date.now()-e)}this.#b&&(o.size=this.#b[t]),e.unshift([n,o])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=this.#l.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(void 0===t)return this.delete(e),this;const{ttl:r=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=n;let{noUpdateTTL:l=this.noUpdateTTL}=n;const c=this.#U(e,t,n.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(e,"set"),this;let u=0===this.#c?void 0:this.#h.get(e);if(void 0===u)u=0===this.#c?this.#v:0!==this.#y.length?this.#y.pop():this.#c===this.#t?this.#$(!1):this.#c,this.#d[u]=e,this.#f[u]=t,this.#h.set(e,u),this.#p[this.#v]=u,this.#g[u]=this.#v,this.#v=u,this.#c++,this.#j(u,c,a),a&&(a.set="add"),l=!1,this.#z&&this.#i?.(t,e,"add");else{this.#_(u);const n=this.#f[u];if(t!==n){if(this.#k&&this.#M(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=n;void 0===t||o||(this.#x&&this.#r?.(t,e,"set"),this.#T&&this.#w?.push([t,e,"set"]))}else o||(this.#x&&this.#r?.(n,e,"set"),this.#T&&this.#w?.push([n,e,"set"]));if(this.#W(u),this.#j(u,c,a),this.#f[u]=t,a){a.set="replace";const e=n&&this.#M(n)?n.__staleWhileFetching:n;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update");this.#z&&this.onInsert?.(t,e,t===n?"update":"replace")}if(0===r||this.#C||this.#N(),this.#C&&(l||this.#P(u,r,i),a&&this.#F(a,u)),!o&&this.#T&&this.#w){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}return this}pop(){try{for(;this.#c;){const e=this.#f[this.#m];if(this.#$(!0),this.#M(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#w){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}}}#$(e){const t=this.#m,n=this.#d[t],r=this.#f[t];return this.#k&&this.#M(r)?r.__abortController.abort(new Error("evicted")):(this.#x||this.#T)&&(this.#x&&this.#r?.(r,n,"evict"),this.#T&&this.#w?.push([r,n,"evict"])),this.#W(t),this.#E?.[t]&&(clearTimeout(this.#E[t]),this.#E[t]=void 0),e&&(this.#d[t]=void 0,this.#f[t]=void 0,this.#y.push(t)),1===this.#c?(this.#m=this.#v=0,this.#y.length=0):this.#m=this.#p[t],this.#h.delete(n),this.#c--,t}has(e,t={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#h.get(e);if(void 0!==i){const e=this.#f[i];if(this.#M(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#I(i))return n&&this.#B(i),r&&(r.has="hit",this.#F(r,i)),!0;r&&(r.has="stale",this.#F(r,i))}else r&&(r.has="miss");return!1}peek(e,t={}){const{allowStale:n=this.allowStale}=t,r=this.#h.get(e);if(void 0===r||!n&&this.#I(r))return;const i=this.#f[r];return this.#M(i)?i.__staleWhileFetching:i}#A(e,t,n,r){const i=void 0===t?void 0:this.#f[t];if(this.#M(i))return i;const o=new Gr,{signal:s}=n;s?.addEventListener("abort",(()=>o.abort(s.reason)),{signal:o.signal});const a={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{const{aborted:s}=o.signal,l=n.ignoreFetchAbort&&void 0!==r,h=n.ignoreFetchAbort||!(!n.allowStaleOnFetchAbort||void 0===r);if(n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!l&&!i)return c(o.signal.reason,h);const d=u,f=this.#f[t];return(f===u||l&&i&&void 0===f)&&(void 0===r?void 0!==d.__staleWhileFetching?this.#f[t]=d.__staleWhileFetching:this.#O(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,a.options))),r},c=(r,i)=>{const{aborted:s}=o.signal,a=s&&n.allowStaleOnFetchAbort,l=a||n.allowStaleOnFetchRejection,c=l||n.noDeleteOnFetchRejection,h=u;if(this.#f[t]===u&&(!c||!i&&void 0===h.__staleWhileFetching?this.#O(e,"fetch"):a||(this.#f[t]=h.__staleWhileFetching)),l)return n.status&&void 0!==h.__staleWhileFetching&&(n.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw r};n.status&&(n.status.fetchDispatched=!0);const u=new Promise(((t,r)=>{const s=this.#s?.(e,i,a);s&&s instanceof Promise&&s.then((e=>t(void 0===e?void 0:e)),r),o.signal.addEventListener("abort",(()=>{n.ignoreFetchAbort&&!n.allowStaleOnFetchAbort||(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}))})).then(l,(e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),c(e,!1)))),h=Object.assign(u,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...a.options,status:void 0}),t=this.#h.get(e)):this.#f[t]=h,h}#M(e){if(!this.#k)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Gr}async fetch(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=!1,status:m,signal:v}=t;if(!this.#k)return m&&(m.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:m});const y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:f,ignoreFetchAbort:d,status:m,signal:v};let w=this.#h.get(e);if(void 0===w){m&&(m.fetch="miss");const t=this.#A(e,w,y,p);return t.__returned=t}{const t=this.#f[w];if(this.#M(t)){const e=n&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#I(w);if(!g&&!i)return m&&(m.fetch="hit"),this.#_(w),r&&this.#B(w),m&&this.#F(m,w),t;const o=this.#A(e,w,y,p),s=void 0!==o.__staleWhileFetching&&n;return m&&(m.fetch=i?"stale":"refresh",s&&i&&(m.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}async forceFetch(e,t={}){const n=await this.fetch(e,t);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(e,t={}){const n=this.#a;if(!n)throw new Error("no memoMethod provided to constructor");const{context:r,forceRefresh:i,...o}=t,s=this.get(e,o);if(!i&&void 0!==s)return s;const a=n(e,s,{options:o,context:r});return this.set(e,a,o),a}get(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#h.get(e);if(void 0!==s){const t=this.#f[s],a=this.#M(t);return o&&this.#F(o,s),this.#I(s)?(o&&(o.get="stale"),a?(o&&n&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#O(e,"expire"),o&&n&&(o.returnedStale=!0),n?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#_(s),r&&this.#B(s),t))}o&&(o.get="miss")}#G(e,t){this.#g[t]=e,this.#p[e]=t}#_(e){e!==this.#v&&(e===this.#m?this.#m=this.#p[e]:this.#G(this.#g[e],this.#p[e]),this.#G(this.#v,e),this.#v=e)}delete(e){return this.#O(e,"delete")}#O(e,t){let n=!1;if(0!==this.#c){const r=this.#h.get(e);if(void 0!==r)if(this.#E?.[r]&&(clearTimeout(this.#E?.[r]),this.#E[r]=void 0),n=!0,1===this.#c)this.#q(t);else{this.#W(r);const n=this.#f[r];if(this.#M(n)?n.__abortController.abort(new Error("deleted")):(this.#x||this.#T)&&(this.#x&&this.#r?.(n,e,t),this.#T&&this.#w?.push([n,e,t])),this.#h.delete(e),this.#d[r]=void 0,this.#f[r]=void 0,r===this.#v)this.#v=this.#g[r];else if(r===this.#m)this.#m=this.#p[r];else{const e=this.#g[r];this.#p[e]=this.#p[r];const t=this.#p[r];this.#g[t]=this.#g[r]}this.#c--,this.#y.push(r)}}if(this.#T&&this.#w?.length){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}return n}clear(){return this.#q("delete")}#q(e){for(const t of this.#L({allowStale:!0})){const n=this.#f[t];if(this.#M(n))n.__abortController.abort(new Error("deleted"));else{const r=this.#d[t];this.#x&&this.#r?.(n,r,e),this.#T&&this.#w?.push([n,r,e])}}if(this.#h.clear(),this.#f.fill(void 0),this.#d.fill(void 0),this.#C&&this.#S){this.#C.fill(0),this.#S.fill(0);for(const e of this.#E??[])void 0!==e&&clearTimeout(e);this.#E?.fill(void 0)}if(this.#b&&this.#b.fill(0),this.#m=0,this.#v=0,this.#y.length=0,this.#u=0,this.#c=0,this.#T&&this.#w){const e=this.#w;let t;for(;t=e?.shift();)this.#o?.(...t)}}}class Jr{static defaultOptions={max:1e3,maxAge:18e5};static cache=new Zr(this.defaultOptions);static createCache(e=this.defaultOptions){return new Zr(e)}static set(e,t,n=this.cache){let r=n;r||(r=this.cache),r.set(e,t)}static get(e,t=this.cache){let n=t;return n||(n=this.cache),n.get(e)}static remove(e,t=this.cache){let n=t;return n||(n=this.cache),n.del(e)}static has(e,t=this.cache){let n=t;return n||(n=this.cache),n.has(e)}static count(e=this.cache){let t=e;return t||(t=this.cache),t.size}static maxSize(e=this.cache){let t=e;return t||(t=this.cache),t.max}static peek(e,t=this.cache){let n=t;return n||(n=this.cache),n.peek(e)}static keys(e=this.cache){let t=e;return t||(t=this.cache),t.keys()}static clear(e=this.cache){let t=e;t||(t=this.cache),t.clear()}}class Qr{static CharCodes=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"];static matrix2=[[3,4],[1,2]];static matrix3=[[7,8,9],[4,5,6],[1,2,3]];static matrix4=[["21","22","23","24","25"],["16","17","18","19","20"],["11","12","13","14","15"],["06","07","08","09","10"],["01","02","03","04","05"]];static matrix5=[["C","D"],["A","B"]];static dmsToDecimal(e){let t=1;if(e.direction)switch(e.direction){case"W":case"S":t=-1;break;default:t=1}return(Math.abs(e.degrees)+e.minutes/60+e.seconds/3600)*t}static xToDMS(e,t="E"){let n=t;e<0&&(n="W");const r=Math.abs(e);return this.decimalToDms(r,n)}static yToDMS(e,t="N"){let n=t;e<0&&(n="S");const r=Math.abs(e);return this.decimalToDms(r,n)}static decimalToDms(e,t){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degrees:n,minutes:i,seconds:60*(r-i),direction:t}}static prefixInteger(e,t){return(Array(t).join("0")+e).slice(-t)}static serializeGrid1(e,t){const n="W"===e.direction?-1:1,r=2*e.degrees+Math.floor(e.minutes/30+1),i=this.prefixInteger(r*n+360,3),o="S"===t.direction?1:-1,s=(2*t.degrees+Math.floor(t.minutes/30+1))*o+180;return`${i}${this.CharCodes[Math.floor(s/24)]+this.CharCodes[s%24]}`}static deserializeGrid1(e){const t=e.substring(0,3);let n=Number.parseInt(t)-360,r="E";n<0&&(r="W",n=Math.abs(n)),n-=1;const i=Math.floor(n/2),o={degrees:i,minutes:30*(n-2*i),seconds:0,direction:r},s=e.substring(3,4),a=e.substring(4,5);let l=24*this.CharCodes.indexOf(s)+this.CharCodes.indexOf(a)-180,c="S";l<0&&(c="N",l=Math.abs(l)),l-=1;const u=Math.floor(l/2);return[o,{degrees:u,minutes:30*(l-2*u),seconds:0,direction:c}]}static serializeGrid2(e,t){const n=e.minutes%30,r=Math.floor(n/15),i=t.minutes%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid2(e){return this.deserializeGrid6(e)}static serializeGrid3(e,t){const n=e.minutes%15,r=Math.floor(n/5),i=t.minutes%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid3(e){return this.deserializeGrid7(e)}static serializeGrid4(e,t){const n=e.minutes%5,r=t.minutes%5;return this.matrix4[r][n]}static deserializeGrid4(e){return this.deserializeGrid8(e)}static serializeGrid5(e,t){const n=Math.floor(e.seconds/30),r=Math.floor(t.seconds/30);return this.matrix5[r][n]}static deserializeGrid5(e){let t=0,n=0;switch(e){case"C":t=0,n=0;break;case"D":t=1,n=0;break;case"A":t=0,n=1;break;case"B":t=1,n=1}return[30*t,30*n]}static serializeGrid6(e,t){const n=e.seconds%30,r=Math.floor(n/15),i=t.seconds%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid6(e){let t=0,n=0;switch(e){case"3":t=0,n=0;break;case"4":t=1,n=0;break;case"1":t=0,n=1;break;case"2":t=1,n=1}return[15*t,15*n]}static serializeGrid7(e,t){const n=e.seconds%15,r=Math.floor(n/5),i=t.seconds%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid7(e){const t=Number.parseInt(e);let n=!1,r=0,i=0;for(let o=0;o<3;o++){for(let e=0;e<3;e++)if(this.matrix3[o][e]===t){r=o,i=e,n=!0;break}if(n)break}return[5*i,5*r]}static serializeGrid8(e,t){const n=Math.floor(e.seconds%5),r=Math.floor(t.seconds%5);return this.matrix4[r][n]}static deserializeGrid8(e){let t=!1,n=0,r=0;for(let i=0;i<5;i++){for(let o=0;o<5;o++)if(this.matrix4[i][o]===e){n=i,r=o,t=!0;break}if(t)break}return[r,n]}static serializeGrid9(e,t){const n=Math.floor(1e3*(e.seconds-Math.floor(e.seconds))),r=Math.floor(n/125),i=Math.floor(1e3*(t.seconds-Math.floor(t.seconds))),o=Math.floor(i/125);return this.prefixInteger(8*(7-o)+r+1,2)}static deserializeGrid9(e){const t=Number.parseInt(e)-1,n=7-Math.floor(t/8);return[.125*(t-8*(7-n)),.125*n]}static serializeWarGrid(e,t,n=1){let r=this.serializeGrid1(e,t);return n>=2&&(r+=this.serializeGrid2(e,t),n>=3&&(r+=this.serializeGrid3(e,t),n>=4&&(r+=this.serializeGrid4(e,t),n>=5&&(r+=this.serializeGrid5(e,t),n>=6&&(r+=this.serializeGrid6(e,t),n>=7&&(r+=this.serializeGrid7(e,t),n>=8&&(r+=this.serializeGrid8(e,t),n>=9&&(r+=this.serializeGrid9(e,t))))))))),r}static deserializeWarGrid(e){const t=e.length;if(t<5)throw new Error("编码长度不小于5个");const[n,r]=this.deserializeGrid1(e);let i=[0,0];return t>=6&&(i=this.deserializeGrid2(e.substring(5,6)),n.minutes+=i[0],r.minutes+=i[1],t>=7&&(i=this.deserializeGrid3(e.substring(6,7)),n.minutes+=i[0],r.minutes+=i[1],t>=9&&(i=this.deserializeGrid4(e.substring(7,9)),n.minutes+=i[0],r.minutes+=i[1],t>=10&&(i=this.deserializeGrid5(e.substring(9,10)),n.seconds+=i[0],r.seconds+=i[1],t>=11&&(i=this.deserializeGrid6(e.substring(10,11)),n.seconds+=i[0],r.seconds+=i[1],t>=12&&(i=this.deserializeGrid7(e.substring(11,12)),n.seconds+=i[0],r.seconds+=i[1],t>=14&&(i=this.deserializeGrid8(e.substring(12,14)),n.seconds+=i[0],r.seconds+=i[1],t>=16&&(i=this.deserializeGrid9(e.substring(14,16)),n.seconds+=i[0],r.seconds+=i[1])))))))),[n,r]}}function ei(e,t){const n={};return Object.keys(e).filter((e=>t.includes(e))).forEach((t=>{n[t]=e[t]})),n}function ti(e=100,t=0){return Math.floor(Math.random()*(e-t+1))+t}function ni(e){if(!e)return;const t=e.length;return 0!==t?e[Math.floor(Math.random()*t)]:void 0}function ri(e,t="image/png"){let n=t,r="";const i=e.split(",");if(2===i.length){const e=i[0]?.match(/:(.*?);/);n=e[1],r=atob(i[1])}else r=atob(i[0]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function ii(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)}))}function oi(e,t,n){return e.split(t).join(n)}function si(e,t=2){const n=Math.pow(10,t);return Math.round(e*n)/n}function ai(e,t=!0,n=!0){const r=n?e>0?"E":"W":e>0?"N":"S",i=Math.floor(e),o=60*(e-i),s=Math.floor(o),a=60*(o-s);return t?`${r}:${i}°${s}′${a.toFixed(3)}″`:{degree:i*(e>0?1:-1),minute:s,second:a}}function li(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return`${n} ${i} ${(60*(r-i)).toFixed(t)}`}function ci(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degree:n,minute:i,second:si(60*(r-i),t)}}function ui(e,t,n){return e+t/60+n/3600}function hi(e,t=-1){const n=e.split(" ");if(!n||3!=n.length)return-1;const r=Number(n[0]),i=Number(n[1]),o=Number(n[2]);return r===Number.NaN||i===Number.NaN||o===Number.NaN?-1:-1!=t?si(r+i/60+o/3600,t):r+i/60+o/3600}function di(e){const t=e.match(/^([EWNS]):?(\d+)[°ºd](\d+)[′'m](\d+\.?\d*)[″"s]?$/i);if(!t)return NaN;let n=parseFloat(t[2])+parseFloat(t[3])/60+parseFloat(t[4])/3600;return(e.toUpperCase().startsWith("W")||e.toUpperCase().startsWith("S"))&&(n=-n),n}function fi(e,t,n){if(e<=0||t<=0)throw new Error("行数或列数不能小于0!");const r=e,i=t,o=Math.floor(r/2),s=Math.floor(i/2),a=Math.max(o,r-1-o,s,i-1-s),l=Array(r).fill(!1).map((()=>Array(i).fill(!1))),c=[];for(let u=0;u<=a;u++){const e=Math.max(0,o-u),t=Math.min(r-1,o+u),a=Math.max(0,s-u),h=Math.min(i-1,s+u);for(let r=e;r<=t;r++)for(let e=a;e<=h;e++)l[r][e]||(n&&n(r,e),l[r][e]=!0,c.push([r,e]))}return c}const pi=Object.freeze(Object.defineProperty({__proto__:null,base64ToBlob:ri,blobToDataURL:ii,convertDecimalism:ai,convertDecimalismData:ci,convertDecimalismSpacing:li,convertToDecimalism:ui,convertToDecimalismByString:hi,convertToDecimalismByString2:di,filterObj:ei,getRandomInt:ti,getRandomItem:ni,replaceAll:oi,reserveDecimal:si,traverseXYArrayFromInsideOut:fi},Symbol.toStringTag,{value:"Module"}));function gi(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),r=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),o=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)}function mi(e){var t=e.toLowerCase();if(Ci(e)){if(4===t.length){for(var n="#",r=1;r<4;r+=1){const e=t.slice(r,r+1);n+=e.concat(e)}t=n}var i=[];for(r=1;r<7;r+=2)i.push(parseInt("0x"+t.slice(r,r+2)));return"rgb("+i.join(",")+")"}return t}function vi(e){const t=e;if(4===t.length){let e="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);e+=r.concat(r)}return e}return t}var yi=(e=>(e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla",e))(yi||{});function wi(e){if("object"==typeof e||!e)return;const t=e.toLowerCase().substring(0,1);return"#"===t?1:"r"===t||"("===t?0:"h"===t?2:0}function bi(e){if(e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t){var n,r,i,o=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),a=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===s)n=r=i=a;else{var l=a<=.5?a*(s+1):a+s-a*s,c=2*a-l;n=Si(c,l,o+1/3),r=Si(c,l,o),i=Si(c,l,o-1/3)}return`rgba(${n=Math.round(255*n)},${r=Math.round(255*r)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}}function Si(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ci(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function Ei(e,t,n){const r=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(r.length-7)).join("0")+r}function xi(e){let t=e.toLowerCase();if(Ci(e)){if(4===t.length){let e="#";for(let n=1;n<4;n+=1)e+=t.slice(n,n+1).concat(t.slice(n,n+1));t=e}const e=[];for(let n=1;n<7;n+=2)e.push(parseInt("0x"+t.slice(n,n+2)));return"RGB("+e.join(",")+")"}return t}function ki(e){if(!Ci(e))return;const[t,n,r]=xi(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)));return.299*t+.578*n+.114*r<192}function Ti(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ri(e.substring(0,2),t)}${Ri(e.substring(2,4),t)}${Ri(e.substring(4,6),t)}`}function zi(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Mi(e.substring(0,2),t)}${Mi(e.substring(2,4),t)}${Mi(e.substring(4,6),t)}`}function Mi(e,t){const n=parseInt(e,16)+t,r=n>255?255:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Ai(e,t,n){const r=[e,t,n].map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*r[0]+.7152*r[1]+.0722*r[2]}function _i(e){var t,n;return n=[0,0,0],(Ai(~~(t=xi(e.substring(1)).split(","))[0],~~t[1],~~t[2])+.05)/(Ai(n[0],n[1],n[2])+.05)>=12?"#000000":"#FFFFFF"}function Ri(e,t){const n=parseInt(e,16)-t,r=n<0?0:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Li(e){const t=(new Date).getTime();let n=(new Date).getTime();for(;n-t<e;)n=(new Date).getTime();console.log(`强制等待${Ii}毫秒`)}function Ii(e){return new Promise((t=>setTimeout(t,e)))}function Di(e,t,n,r="json",i){const o={baseURL:ce.Config?.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(e){return q.stringify(e,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Ye()?.token},responseType:r,cancelToken:i};if(n)for(let s in n)o.headers[s]=n[s];return ce.SystemID&&(o.headers.sysid=ce.SystemID,ce.SystemGroup&&(o.headers.sysgroup=ce.SystemGroup)),void 0!==t&&(o.baseURL=t),o}function Ni(e,t,n,r,i="json",o,s){const a=Di(n,t,r,i,o);return s&&s>=2e4&&(a.timeout=s),ce.Axios?.get(e,a).catch((function(t){Pi(t,a.baseURL,e,"Get")}))}function Pi(e,t,n,r="Get"){const i=`${t}${n}`;if(e&&e.response){let t=!1;const n=e.response.status;switch(n){case 400:e.message="错误请求";break;case 401:e.message="未授权,请重新登录";break;case 403:e.message="拒绝访问";break;case 404:e.message="请求错误,未找到该资源";break;case 405:e.message="请求方法未允许";break;case 408:e.message="请求超时";break;case 500:const n=e.response.data;if(n){const r=n.indexOf(":"),i=n.indexOf("\n");if(r>0&&i-r>2){const o=n.substring(r+2,i);o.indexOf("System.Exception")>0?e.message="后台服务内部出错!":(t=!0,e.message=o)}else t=!0,e.message=n}else e.message="服务器端出错";break;case 501:e.message="网络未实现";break;case 502:e.message="网络错误";break;case 503:e.message="服务不可用";break;case 504:e.message="网络超时";break;case 505:e.message="http版本不支持该请求";break;default:e.message=`连接错误${e.response.status}`}let r={address:i,code:n,isExceptionInfo:t,message:e.message,result:e.response.data};if(ce.EventBus.emit(ne.AxiosRequestErrorEvent,r),t)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http请求错误!")}}function Oi(e,t,n,r,i,o="json",s){const a=Di(r,t,i,o);s&&s>=2e4&&(a.timeout=s),a.headers["Content-Type"]="multipart/form-data";const l=function(e){let t=new FormData;return e&&Object.keys(e).forEach((n=>{if(!e)return;let r=e[n];null!=r&&(Ae(r)?r.forEach((e=>{t.append(n,ji(e))})):t.append(n,ji(r)))})),t}(n);return ce.Axios?.post(e,l,a).catch((function(e){Pi(e,t,a.baseURL,"Post")}))}function Bi(e,t,n,r,i,o="json",s){const a=Di(r,t,i,o);return s&&s>=2e4&&(a.timeout=s),ce.Axios?.post(e,n,a).catch((function(n){Pi(n,t,e,"Post")}))}function Fi(e,t,n=!1){return e.startsWith("http")?Ni("",e,t):n||t?Ni(e,void 0,t):Ni(e,"",void 0)}function Wi(e,t){return Oi(e,void 0,t)}function Ui(e,t){return ce.Axios?.get(e,{params:t}).catch((function(t){Pi(t,e,"","外部Get")}))}function ji(e){return e instanceof Blob?e:e.toString()}function $i(e,t,n){const r=t??He.getFileName(e);Ni("",e,n,void 0,"blob").then((e=>{e.data&&tr(e.data,r)}))}var Hi,Gi,qi,Xi,Vi,Ki,Yi,Zi,Ji,Qi={exports:{}};var eo=function(){if(Ji)return Qi.exports;Ji=1;var e=function(){return Gi?Hi:(Gi=1,e="undefined"!=typeof window?window:void 0!==Y?Y:"undefined"!=typeof self?self:{},Hi=e);var e}(),t=function(){if(Xi)return qi;Xi=1,qi=function(t){if(!t)return!1;var n=e.call(t);return"[object Function]"===n||"function"==typeof t&&"[object RegExp]"!==n||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var e=Object.prototype.toString;return qi}(),n=function(){if(Ki)return Vi;Ki=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")},t=function(e){return"[object Array]"===Object.prototype.toString.call(e)};return Vi=function(n){if(!n)return{};for(var r=Object.create(null),i=e(n).split("\n"),o=0;o<i.length;o++){var s=i[o],a=s.indexOf(":"),l=e(s.slice(0,a)).toLowerCase(),c=e(s.slice(a+1));void 0===r[l]?r[l]=c:t(r[l])?r[l].push(c):r[l]=[r[l],c]}return r},Vi}(),r=function(){if(Zi)return Yi;Zi=1,Yi=function(){for(var t={},n=0;n<arguments.length;n++){var r=arguments[n];for(var i in r)e.call(r,i)&&(t[i]=r[i])}return t};var e=Object.prototype.hasOwnProperty;return Yi}();function i(e,n,i){var o=e;return t(n)?(i=n,"string"==typeof e&&(o={uri:e})):o=r(n,{uri:e}),o.callback=i,o}function o(e,t,n){return s(t=i(e,t,n))}function s(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,r=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function i(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function s(e){return clearTimeout(h),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,y)}function a(){if(!c){var t;clearTimeout(h),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var o=y,s=null;return 0!==t?(o={body:i(),statusCode:t,method:f,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(o.headers=n(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),r(s,o,o.body)}}var l,c,u=e.xhr||null;u||(u=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var h,d=u.url=e.uri||e.url,f=u.method=e.method||"GET",p=e.body||e.data,g=u.headers=e.headers||{},m=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(a,0)},u.onload=a,u.onerror=s,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=s,u.open(f,d,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(h=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",s(e)}}),e.timeout)),u.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&u.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}return Qi.exports=o,Qi.exports.default=o,o.XMLHttpRequest=e.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:e.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){o["delete"===e?"del":e]=function(t,n,r){return(n=i(t,n,r)).method=e.toUpperCase(),s(n)}})),Qi.exports}();const to=Z(eo),no=[200,201,202,204,308],ro=[408,502,503,504];class io{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunkCount;chunkByteSize;cacheSize=3;currentMaxIndex=0;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;isResumed=!1;mapXhrRequest;okRecordList;eventTarget;fileName;constructor(e){this.endpoint=e.endpoint,this.file=e.file,this.fileName=encodeURI(this.file.name),this.headers=e.headers||{},this.method=e.method||"PUT",this.chunkSize=e.chunkSize||5120,this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.md5=e.md5||"",null!=e.threadNumber&&e.threadNumber>=2&&(this.cacheSize=e.threadNumber),this.maxFileBytes=1024*(e.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.mapXhrRequest=new Map,this.okRecordList=[],this.eventTarget=V(),this.validateOptions(),this.getEndpoint().then((()=>{for(let e=0;e<this.cacheSize;e++){const t=e;if(t<this.totalChunks){const e=100*t;e>0?Ii(e).then((e=>{this.sendChunks(t)})):this.sendChunks(t)}}})),"undefined"!=typeof window&&(window.addEventListener("online",(()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())})),window.addEventListener("offline",(()=>{this.offline=!0,this.dispatch("offline")})))}on(e,t){this.eventTarget.on(e,t)}abort(){this.pause(),this.mapXhrRequest.size>0&&(this.mapXhrRequest.forEach(((e,t)=>{e&&e.abort()})),this.mapXhrRequest.clear())}pause(){this.paused=!0}async resume(){this.paused=!1,this.isResumed=!0;for(let e=0;e<this.totalChunks;e++){if(this.mapXhrRequest.size>=this.cacheSize){const e=500*(this.mapXhrRequest.size-this.cacheSize+1);await Ii(e)}this.sendChunks(e)}}dispatch(e,t){this.eventTarget.emit(e,t)}validateOptions(){if(!this.endpoint||"function"!=typeof this.endpoint&&"string"!=typeof this.endpoint)throw new TypeError("endpoint必须为:文件上传URL字符串,或返回地址的函数!");if(!(this.file instanceof File))throw new TypeError("file必须为文件对象");if(this.headers&&"object"!=typeof this.headers)throw new TypeError("文件头必须为对象或空!");if(this.chunkSize&&("number"!=typeof this.chunkSize||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize必须大于0,并是256的整数倍");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`文件大小超过最大允许值:(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&("number"!=typeof this.attempts||this.attempts<=0))throw new TypeError("重试次数必须为正数!");if(this.delayBeforeAttempt&&("number"!=typeof this.delayBeforeAttempt||this.delayBeforeAttempt<0))throw new TypeError("延时重试时间必须为正数!默认为1")}getEndpoint(){return"string"==typeof this.endpoint?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then((e=>(this.endpointValue=e,this.endpointValue)))}getChunk(e=0){return new Promise((t=>{const n=1===this.totalChunks?this.file.size:this.chunkByteSize,r=n*e,i=new FileReader;i.onload=function(){if(null!==this.result){const n=new Blob([this.result],{type:"application/octet-stream"});t({chunkIndex:e,chunkContent:n})}else t(void 0)},i.readAsArrayBuffer(this.file.slice(r,r+n))}))}xhrPromise(e){return new Promise(((t,n)=>{const r=e.headers,i=Number(r.ChunkIndex),o=to({...e},((e,r)=>(this.mapXhrRequest.delete(i),e?n(e):t(r))));this.mapXhrRequest.set(i,o)}))}sendChunk(e,t){if(!t)return;const n=e*this.chunkByteSize,r=n+t.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,ChunkIndex:e.toString(),"Content-Type":this.file.type,"Content-Range":`bytes ${n}-${r}/${this.file.size}`};return this.dispatch("attempt",{chunkNumber:e,chunkSize:t.size}),this.endpointValue?this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:t}):(console.warn("文件上传endpointValue不能为空!"),void this.dispatch("error",{message:"文件上传endpointValue不能为空!取消上传!",chunk:e,attempts:this.attemptCount}))}sendChunks(e=0){this.paused||this.offline||this.success||this.okRecordList.indexOf(e)<0&&(this.currentMaxIndex<e&&(this.currentMaxIndex=e),this.getChunk(e).then((e=>{if(e){const{chunkIndex:t,chunkContent:n}=e;return this.sendChunk(t,n)}})).then((t=>{if(t)if(no.includes(t.statusCode)){const n=JSON.parse(t.body).RESULTVALUE;if(n.STATE){this.attemptCount=0,this.chunkCount=this.chunkCount+1;const e=Math.round(n.INDEX/this.chunkByteSize);this.mapXhrRequest.delete(e),this.dispatch("chunkSuccess",{chunkCount:this.chunkCount,attempts:this.attemptCount,chunkNumber:e}),this.okRecordList.push(e),this.chunkCount<this.totalChunks&&!this.isResumed&&this.currentMaxIndex<this.totalChunks-1&&(this.currentMaxIndex++,this.sendChunks(this.currentMaxIndex));const t=100*this.chunkCount/this.totalChunks;this.dispatch("progress",t),n.END&&(this.success=!0,this.dispatch("success",this.fileName),this.okRecordList.length=0)}else{const t=`服务器错误:${n.NAME},停止上传。`;console.log(t),this.dispatch("error",{message:t,chunkNumber:e,attempts:0}),this.mapXhrRequest.delete(e),Ii(1e3).then((t=>this.sendChunks(e)))}}else if(null!=t&&ro.includes(t.statusCode)){if(this.paused||this.offline)return}else{if(this.paused||this.offline)return;console.log(`服务器错误:${t?.statusCode},停止上传。`),this.dispatch("error",{message:`服务器错误:${t?.statusCode},停止上传。`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}else console.warn("上传失败的索引为:"+e)})).catch((e=>{!this.paused&&this.offline})))}}const oo=e=>new io(e),so=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():0}getViewportOffset(e){const t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,o=t.clientTop,s=globalThis.scrollX,a=globalThis.scrollY,l=this.getBoundingClientRect(e),{left:c,top:u,width:h,height:d}=l,f=c+s-((s||n)-(i||0)),p=u+a-((a||r)-(o||0)),g=globalThis.document.documentElement.clientWidth,m=globalThis.document.documentElement.clientHeight;return{left:f,top:p,right:g-h-f,bottom:m-d-p,rightIncludeBody:g-f,bottomIncludeBody:m-p}}hackCss(e,t){const n={};return["webkit","Moz","ms","OT"].forEach((r=>{n[`${r}${He.UpperFirst(e)}`]=t})),{...n,[e]:t}}on(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}off(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}once(e,t,n){const r=function(...i){n&&n.apply(this,i),this.off(e,t,r)};this.on(e,t,r)}},ao=y({isLock:!1,lockTime:0});function lo(e){ao.isLock=e,e&&(Ze(),console.log("锁屏了……"))}function co(){return ao.isLock}let uo;function ho(){clearInterval(uo),globalThis.location.href.indexOf("/login")>0||ao.isLock||(lo(!1),ao.lockTime=function(){let e=3600;return ce.Config.UI?.LockTime&&ce.Config.UI?.LockTime>=10&&(e=ce.Config.UI.LockTime),e}(),uo=setInterval((()=>{if(ao.lockTime--,ao.lockTime<=0)return lo(!0),clearInterval(uo)}),1e3))}function fo(){ho(),document.addEventListener("mousedown",ho),document.addEventListener("mousemove",ho)}function po(){document.removeEventListener("mousedown",ho),document.removeEventListener("mousemove",ho)}function go(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var mo,vo={exports:{}},yo=(mo||(mo=1,vo.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(!a&&go)return go(s);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=go,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var s=p((function(){t(i,r)}));"error"===s.status&&r(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(i);return this.state!==l?h(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)f(e,r);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==n||r||(r=!0,o.resolve(c,s))}),(function(e){r||(r=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=-1,a=new this(i);++s<n;)l(e[s]);return a;function l(e){t.resolve(e).then((function(e){r||(r=!0,o.resolve(a,e))}),(function(e){r||(r=!0,o.reject(a,e))}))}}},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function s(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function l(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function u(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function h(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",f=void 0,p={},g=Object.prototype.toString,m="readonly",v="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function w(e){return"boolean"==typeof f?a.resolve(f):function(e){return new a((function(t){var n=e.transaction(d,v),r=s([""]);n.objectStore(d).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return f=e}))}function b(e){var t=p[e.name],n={};n.promise=new a((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function S(e){var t=p[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function C(e,t){var n=p[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new a((function(n,r){if(p[e.name]=p[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);b(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var s=o.open.apply(o,i);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(d)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),r(s.error)},s.onsuccess=function(){var t=s.result;t.onversionchange=function(e){e.target.close()},n(t),S(e)}}))}function x(e){return E(e,!1)}function k(e){return E(e,!0)}function T(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function z(e){return s([y(atob(e.data))],{type:e.type})}function M(e){return e&&e.__local_forage_encoded_blob}function A(e){var t=this,n=t._initReady().then((function(){var e=p[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(n,e,e),n}function _(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),k(e)})).then((function(){return function(e){b(e);for(var t=p[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,x(e).then((function(t){return e.db=t,T(e)?k(e):t})).then((function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r})).catch((function(t){throw C(e,t),t}))}(e).then((function(){_(e,t,n,r-1)}))})).catch(n);n(i)}}var R={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=p[n.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},p[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=A);var o=[];function s(){return a.resolve()}for(var l=0;l<i.forages.length;l++){var c=i.forages[l];c!==t&&o.push(c._initReady().catch(s))}var u=i.forages.slice(0);return a.all(o).then((function(){return n.db=i.db,x(n)})).then((function(e){return n.db=e,T(n,t._defaultConfig.version)?k(n):e})).then((function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<u.length;r++){var o=u[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var r=n.value;M(r)&&(r=z(r));var i=e(r,n.key,a++);void 0!==i?t(i):n.continue()}else t()},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).get(e);s.onsuccess=function(){var e=s.result;void 0===e&&(e=null),M(e)&&(e=z(e)),t(e)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var i=new a((function(n,i){var o;r.ready().then((function(){return o=r._dbInfo,"[object Blob]"===g.call(t)?w(o.db).then((function(e){return e?t:function(e){return new a((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}(t)})):t})).then((function(t){_(r._dbInfo,v,(function(o,s){if(o)return i(o);try{var a=s.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);s.oncomplete=function(){void 0===t&&(t=null),n(t)},s.onabort=s.onerror=function(){var e=l.error?l.error:l.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return l(i,n),i},removeItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){_(n._dbInfo,v,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(s.error)},o.onabort=function(){var e=s.error?s.error:s.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},clear:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,v,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,r=new a((function(t,r){e<0?t(null):n.ready().then((function(){_(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(e){r(e)}}))})).catch(r)}));return l(r,t),r},keys:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){_(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var t=o.result;t?(s.push(t.key),t.continue()):e(s)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var i=e.name===r.name&&this._dbInfo.db?a.resolve(this._dbInfo.db):x(e).then((function(t){var n=p[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t}));n=e.storeName?i.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;b(e);var r=p[e.name],i=r.forages;t.close();for(var s=0;s<i.length;s++){var l=i[s];l._dbInfo.db=null,l._dbInfo.version=n}var c=new a((function(t,r){var i=o.open(e.name,n);i.onerror=function(e){i.result.close(),r(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}));return c.then((function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,S(n._dbInfo)}})).catch((function(t){throw(C(e,t)||a.resolve()).catch((function(){})),t}))}})):i.then((function(t){b(e);var n=p[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++)r[i]._dbInfo.db=null;var s=new a((function(t,n){var r=o.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}));return s.then((function(e){n.db=e;for(var t=0;t<r.length;t++)S(r[t]._dbInfo)})).catch((function(t){throw(C(e,t)||a.resolve()).catch((function(){})),t}))}))}else n=a.reject("Invalid arguments");return l(n,t),n}};var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=/^~~local_forage_type~([^~]+)~/,D="__lfsc__:",N="arbf",P="blob",O="si08",B="ui08",F="uic8",W="si16",U="si32",j="ur16",$="ui32",H="fl32",G="fl64",q=Object.prototype.toString;function X(e){var t,n,r,i,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=L.indexOf(e[t]),r=L.indexOf(e[t+1]),i=L.indexOf(e[t+2]),o=L.indexOf(e[t+3]),u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&o;return c}function V(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=L[n[t]>>2],r+=L[(3&n[t])<<4|n[t+1]>>4],r+=L[(15&n[t+1])<<2|n[t+2]>>6],r+=L[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var K={serialize:function(e,t){var n="";if(e&&(n=q.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===q.call(e.buffer))){var r,i=D;e instanceof ArrayBuffer?(r=e,i+=N):(r=e.buffer,"[object Int8Array]"===n?i+=O:"[object Uint8Array]"===n?i+=B:"[object Uint8ClampedArray]"===n?i+=F:"[object Int16Array]"===n?i+=W:"[object Uint16Array]"===n?i+=j:"[object Int32Array]"===n?i+=U:"[object Uint32Array]"===n?i+=$:"[object Float32Array]"===n?i+=H:"[object Float64Array]"===n?i+=G:t(new Error("Failed to get type for BinaryArray"))),t(i+V(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+V(this.result);t(D+P+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,9)!==D)return JSON.parse(e);var t,n=e.substring(13),r=e.substring(9,13);if(r===P&&I.test(n)){var i=n.match(I);t=i[1],n=n.substring(i[0].length)}var o=X(n);switch(r){case N:return o;case P:return s([o],{type:t});case O:return new Int8Array(o);case B:return new Uint8Array(o);case F:return new Uint8ClampedArray(o);case W:return new Int16Array(o);case j:return new Uint16Array(o);case U:return new Int32Array(o);case $:return new Uint32Array(o);case H:return new Float32Array(o);case G:return new Float64Array(o);default:throw new Error("Unkown type: "+r)}},stringToBuffer:X,bufferToString:V};function Y(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function Z(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):Y(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,s)}),o)}function J(e,t,n,r){var i=this;e=u(e);var o=new a((function(o,s){i.ready().then((function(){void 0===t&&(t=null);var a=t,l=i._dbInfo;l.serializer.serialize(t,(function(t,c){c?s(c):l.db.transaction((function(n){Z(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(J.apply(i,[e,a,n,r-1]));s(t)}}))}))})).catch(s)}));return l(o,n),o}var Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new a((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(i){Y(i,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=K,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT * FROM "+i.storeName,[],(function(n,r){for(var o=r.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),c=l.value;if(c&&(c=i.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},setItem:function(e,t,n){return J.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=u(e);var r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},clear:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},length:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},key:function(e,t){var n=this,r=new a((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return l(r,t),r},keys:function(e){var t=this,n=new a((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return l(n,e),n},dropInstance:function(e,t){t=h.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return r=e.name?new a((function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(function(e){return new a((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}(r))})).then((function(e){return new a((function(t,n){e.db.transaction((function(r){function i(e){return new a((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var o=[],s=0,l=e.storeNames.length;s<l;s++)o.push(i(e.storeNames[s]));a.all(o).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):a.reject("Invalid arguments"),l(r,t),r}};function ee(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function te(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0}var ne={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=ee(e,this._defaultConfig),te()?(this._dbInfo=t,t.serializer=K,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(r)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(i),s++)))return c}}}));return l(r,t),r},getItem:function(e,t){var n=this;e=u(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return l(r,t),r},setItem:function(e,t,n){var r=this;e=u(e);var i=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new a((function(i,o){var s=r._dbInfo;s.serializer.serialize(t,(function(t,r){if(r)o(r);else try{localStorage.setItem(s.keyPrefix+e,t),i(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return l(i,n),i},removeItem:function(e,t){var n=this;e=u(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return l(r,t),r},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return l(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return l(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return l(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r}));return l(n,e),n},dropInstance:function(e,t){if(t=h.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return r=e.name?new a((function(t){e.storeName?t(ee(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):a.reject("Invalid arguments"),l(r,t),r}},re=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},ie=function(e,t){for(var n=e.length,r=0;r<n;){if(re(e[r],t))return!0;r++}return!1},oe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},se={},ae={},le={INDEXEDDB:R,WEBSQL:Q,LOCALSTORAGE:ne},ce=[le.INDEXEDDB._driver,le.WEBSQL._driver,le.LOCALSTORAGE._driver],ue=["dropInstance"],he=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ue),de={description:"",driver:ce.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function fe(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function pe(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(oe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ge=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),le)if(le.hasOwnProperty(n)){var r=le[n],i=r._driver;this[n]=i,se[i]||this.defineDriver(r)}this._defaultConfig=pe({},de),this._config=pe({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new a((function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=he.concat("_initStorage"),s=0,c=o.length;s<c;s++){var u=o[s];if((!ie(ue,u)||e[u])&&"function"!=typeof e[u])return void n(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=a.reject(t);return l(n,arguments[arguments.length-1]),n}},n=0,r=ue.length;n<r;n++){var i=ue[n];e[i]||(e[i]=t(i))}}();var h=function(n){se[r]&&console.info("Redefining LocalForage driver: "+r),se[r]=e,ae[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(e){n(e)}}));return c(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=se[e]?a.resolve(se[e]):a.reject(new Error("Driver not found."));return c(r,t,n),r},e.prototype.getSerializer=function(e){var t=a.resolve(K);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;oe(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function s(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}var l=null!==this._driverSet?this._driverSet.catch((function(){return a.resolve()})):a.resolve();return this._driverSet=l.then((function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then((function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(s).catch(n)}o();var l=new Error("No available storage method found.");return r._driverSet=a.reject(l),r._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return r._driverSet=a.reject(e),r._driverSet})),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!ae[e]},e.prototype._extend=function(e){pe(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=he.length;e<t;e++)fe(this,he[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),me=new ge;t.exports=me},{3:3}]},{},[4])(4)),vo.exports);
|
|
2
|
-
/*!
|
|
3
|
-
localForage -- Offline Storage, Improved
|
|
4
|
-
Version 1.10.0
|
|
5
|
-
https://localforage.github.io/localForage
|
|
6
|
-
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
7
|
-
*/const wo=Z(yo);var bo,So={exports:{}};bo=()=>{const e=globalThis;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let t=null,n=!1;const r=e.WebStreamsPolyfill||{};let i=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const o={createWriteStream:function(e,r=null,a=null){let l={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},c=0,u=null,h=null;if(Number.isFinite(r)?([a,r]=[r,a],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):r&&r.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):l=r||{},!i){t||(t=s(o.mitm)),u=new MessageChannel,e=encodeURIComponent(e.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const r={transferringReadable:n,pathname:l.pathname||Math.random().toString().slice(-6)+"/"+e,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+e}};l.size&&(r.headers["Content-Length"]=l.size);const i=[r,"*",[u.port2]];if(n){const e=void 0;h=new o.TransformStream(e,l.writableStrategy,l.readableStrategy);const t=h.readable;u.port1.postMessage({readableStream:t},[t])}u.port1.onmessage=e=>{e.data.download?(t.isPopup&&(t.remove(),t=null,s(o.mitm)),s(e.data.download)):e.data.abort&&(d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},t.loaded?t.postMessage(...i):t.addEventListener("load",(()=>{t.postMessage(...i)}),{once:!0})}let d=[];return!i&&h&&h.writable||new o.WritableStream({write(e){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i?d.push(e):(u.port1.postMessage(e),c+=e.length)},close(){if(i){const t=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),n=document.createElement("a");n.href=URL.createObjectURL(t),n.download=e,n.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},l.writableStrategy)},WritableStream:e.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"./mitm.html"};function s(e){if(!e)throw new Error("meh");const t=document.createElement("iframe");return t.hidden=!0,t.src=e,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=(...e)=>t.contentWindow.postMessage(...e),t.addEventListener("load",(()=>{t.loaded=!0}),{once:!0}),document.body.appendChild(t),t}try{new Response(new ReadableStream),"serviceWorker"in navigator||(i=!0)}catch(e){i=!0}return(()=>{try{(()=>{const{readable:e}=new TransformStream,t=new MessageChannel;t.port1.postMessage(e,[e]),t.port1.close(),t.port2.close(),n=!0,Object.defineProperty(o,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})})()}catch(e){}})(),o},void 0!==So?So.exports=bo():"function"==typeof define&&"object"==typeof define.amd?define(bo):(void 0).streamSaver=bo();const Co=(null==So.exports?{}:So.exports).default||So.exports;class Eo{constructor(e,t,n=3,r=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=V(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("开始获取文件信息");const r=await Ni(t,e,n);let i=null;return r&&200===r.status&&(i=r.data),i}async getIFileMeta(){if(null===this.fileMetaData){const e=await(this.currentDB?.getItem("fileinfo"));this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=wo.createInstance({name:this.fileID,driver:wo.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(null!=this.fileMetaData){const e=this.fileMetaData.chunkSize;null!=e&&e>0&&(this.chunkByteSize=e)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("完成初始化文件信息,总分片:"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("已暂停下载任务")}restart(){this.dispatchInfo("正在重启下载任务"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),wo.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("已删除下载任务")}sleep(e){return new Promise((t=>setTimeout(t,e)))}async download(e,t,n){let r=e;if(!r&&this.downloadURL&&(r=this.downloadURL),!r)throw Error("下载URL不能为空!");this.currentDB||this.initIndexDB();const i=ce.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const o={key:this.fileMetaData?.downloadID},s=n??o;let a=0;const l=this.cacheSize;let c=0;for(let u=0;u<this.totalChunks;u++){if(this.keys){const e=this.keys?.indexOf(u.toString());if(e>=0){a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());continue}}const e=u*this.chunkByteSize;let n=e+this.chunkByteSize-1;this.fileMetaData&&n>this.fileMetaData.length&&(n=this.fileMetaData.length-1);const i={range:`bytes=${e}-${n}`};for(;c>=l;)await this.sleep(200);const o=u.toString();this.dispatchInfo(`开始下载分片${u+1}/${this.totalChunks}`),c++,Ni(r,t,s,i,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then((async e=>{const t=e.data;c--,await(this.currentDB?.setItem(o,t)),a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());const n=parseInt(o)+1;this.dispatchInfo(`完成下载分片${n}/${this.totalChunks}`),this.savefile()})).catch((e=>{c--;const t=parseInt(o)+1;this.dispatchError(`下载第${t})个分片内容失败!`)}))}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("下载错误:文件名为空!");this.dispatchInfo("开始保存下载文件:"+this.fileName);const e=Co.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const r=n.toString();let i=await(this.currentDB?.getItem(r));if(i||(i=await(this.currentDB?.getItem(r))),!i)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);let o=new Response(i).body;if(null===o)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);const s=o.getReader();for(;;){const{done:t,value:n}=await s.read();if(t)break;await e.write(n)}t++,this.outputProgress(t),this.dispatchInfo(`完成第${n+1}个分片输出`)}e.close(),wo.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("完成文件下载")}}}function xo(e,t){let n="",r="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),r=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,r}function ko(e={},t={}){let n;for(n in t)Ce(t[n])?e[n]=ko(e[n],t[n]):e[n]=t[n];return e}function To(e,t,n={name:void 0}){const r=e.resolve({path:t,query:n});globalThis.open(r.href,"_blank")}function zo(e){let t=e;if(e.endsWith("/")){if(e.endsWith("/#/"))return t;t=e+"#/"}else t=e+"/#/"}function Mo(e,t="/"){if(e)return e.startsWith("/")?e.startsWith(t)?e:`${t}${e}`:"/"===t?`${t}${e}`:`${t}/${e}`}function Ao(e,t){e.getRoutes().find((e=>"/"===e.path))||e.addRoute({name:"/",path:"/",redirect:t.path})}function _o(e){const t=[];let n=[];return Object.keys(e).forEach((t=>{const r=e[t];r&&n.push(...r)})),n=n.sort(((e,t)=>{let n=0,r=0;return e.meta&&(n=null!=e.meta.index?Number(e.meta.index):100),t.meta&&(r=null!=t.meta.index?Number(t.meta.index):100),n-r})),t.push(...n),n.length=0,t}function Ro(e,t=!1){let n=[];for(const r in e){const t=e[r];t&&t.length>0&&(n.push(...t),t.length=0),delete e[r]}return t&&(n=n.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n}function Lo(e,t=!1){const n=[];let r=[];return Object.keys(e).forEach((t=>{const n=e[t];n&&r.push(...n)})),t&&(r=r.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n.push(...r),r.length=0,n}const Io=new Map;function Do(e,t=!1){if(t&&Io.size>0)return Io;Io.clear();for(const n in e){const t=e[n];t&&t.length>0&&(t.forEach((e=>{let t;const n=e.layoutID;Io.has(n)&&(t=Io.get(n)),t||(t=new Array,Io.set(n,t)),t&&t.push(e)})),t.length=0),delete e[n]}return Io}function No(e,t="/"){let n=t;return e.redirect&&e.children?(n=e.path.startsWith(t)?e.path:t.endsWith("/")?t+e.path:t+"/"+e.path,No(e.children[0],n)):(n=e.path.startsWith(t)?e.path:`${t}/${e.path}`,{title:e.meta?.title,fullPath:n,path:e.path,icon:e.meta?.icon,keepAlive:e.meta?.keepAlive,name:e.name})}function Po(e){const t=function(e){if(!e)return;const t=e,n=[];if(t)for(let r of t){const e=Oo(r);e&&n.push(e)}return n}(e.bussinessRoutes),n=function(e){if(!e)return;const t=e;if(t&&t.length>0){const e=[];return t.forEach((t=>{const n=Bo(t);n&&e.push(n)})),e}}(e.widgetMenuConfig),r=function(e){if(e&&e.length>0){const t=[];return e.forEach((e=>{const n=function(e){if(e)return{id:e.id,label:e.label,layoutID:e.layoutID,container:e.container,preload:e.preload,afterid:e.afterid,bindid:e.bindid,group:e.group}}(e);n&&t.push(n)})),t}}(e.widgetConfig),i=(o=e.functionList)&&o.length>0?o:void 0;var o;const s=e.pkgObject.version,a=e.pkgObject.name,l=function(e,t){const n=`${e}_${t}`;return st.MD5(n)}(a,s);return{id:l,name:ce.Config.UI.SiteTitle,group:ce.Config.UI.Group,product:a,version:s,routes:t,widgetMenu:n,widgets:r,functions:i}}function Oo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const t=[];for(let n of e.children){const e=Oo(n);e&&t.push(e)}t.length>0&&(n.children=t)}return n}}function Bo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach((e=>{const n=Bo(e);n&&t.children?.push(n)}))),t}function Fo(e,t="IconifyList.ts"){let n="",r="const iconlist={\n",i=0;e.forEach((e=>{const t=e.split(":");if(t&&2===t.length){const o="icon"+i;n+=`import ${o} from '~icons/${t[0]}/${t[1]}'\n`,r+=`\t'${e}':${o},\n`,i++}})),i>0&&(r+="};\n",tr(n+r+"export default iconlist;","IconifyList.ts"))}function Wo(e,t){const n=Po(e);rr(n,t),ce.Message?.msg("导出系统功能权限文件成功!")}function Uo(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function jo(e){let t=$o(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function $o(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function Ho(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function Go(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function qo(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Xo(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Vo(e){let t=$o(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Ko(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Yo(e,t="仟佰拾亿仟佰拾万仟佰拾元角分",n=""){let r=(e+="00").indexOf(".");r>=0&&(e=e.substring(0,r)+e.substr(r+1,2)),t=t.substr(t.length-e.length);for(let i=0;i<e.length;i++)n+="零壹贰叁肆伍陆柒捌玖".substr(e.substr(i,1),1)+t.substr(i,1);return n.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元")}function Zo(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function Jo(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function Qo(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function es(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function ts(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function ns(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="强"),t}function rs(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function is(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function os(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function ss(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function as(e){return!!/^[1-9][0-9]{5}$/.test(e)}function ls(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function cs(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}function us(e){e&&ce.EventBus.emit(ne.ModalContainerWidget_LoadModal,e)}function hs(e){ce.EventBus.emit(ne.ModalContainerWidget_CloseModal,e)}let ds=[];const fs=()=>{setTimeout((async()=>{const e=await async function(){const e=await async function(e){const t=/<script.*src=["'](?<src>[^"']+)/gm,n=[];let r;for(;r=t.exec(e);)n.push(r.groups?.src??"");return n}(await fetch("/").then((e=>e.text())));if(!ds.length)return ds=e,!1;if(e.length!==ds.length)return ds=e,!0;for(let t=0;t<ds.length;t++)if(ds[t]!==e[t])return ds=e,!0;return!1}();e?confirm("页面有更新,点击确定刷新页面?")&&location.reload():fs()}),5e3)};function ps(e,t=wo.INDEXEDDB){return wo.createInstance({name:e,driver:t})}function gs(e){wo.dropInstance({name:e})}const ms=new Map,vs=t(new Map);class ys{static ZIndexMax=1;static addWindowPanel(e){ms.set(e.id,e)}static removeWindowPanel(e){ms.has(e)&&(ms.delete(e),vs.value.delete(e))}static minimizeWindowPanel(e){ms.has(e)&&vs.value.set(e,-1)}static openWindowPanel(e){ms.has(e)&&vs.value.set(e,1)}}const ws={width:1024,height:1024,body:'<path fill="currentColor" fill-rule="evenodd" d="M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926L224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512L166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"/>'},bs={width:1024,height:1024,body:'<path fill="currentColor" d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"/>'},Ss={width:1024,height:1024,body:'<path fill="currentColor" d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"/>'},Cs={width:1024,height:1024,body:'<path fill="currentColor" d="M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"/>'},Es=["src"],xs={key:1,class:"paneltitle"},ks={class:"dragPanelBar"},Ts={class:"dragPanelContent"},zs={class:"drag-pointer-group"},Ms=he(e({__name:"XWindow",props:{top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},nWidth:{type:[String,Number],default:"300px"},nHeight:{type:[String,Number],default:"400px"},icon:{type:String,default:""},title:{type:String,default:""},titleHeight:{type:[String,Number],default:"40px"},hasMin:{type:Boolean,default:!1},hasMax:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},pid:{type:String,default:""},tag:{type:[String,Array,Object,Number],default:""},right:{type:[String,Number],default:"unset"},bottom:{type:[String,Number],default:"unset"}},emits:["close","open","loaded","minimize"],setup(e,{expose:n,emit:o}){const l=gt(),h=e,d=o,p=t(),g=t(),m=b((()=>h.isDark)),v=t({x:0,y:0}),y=t({width:0,height:0}),k=e=>{p.value&&(p.value.style.left=`${e.x}px`,p.value.style.top=`${e.y}px`)};w((()=>v.value),(e=>{k(e)}));const T=e=>{p.value&&(p.value.style.width=`${e.width}px`,p.value.style.height=`${e.height}px`)};w((()=>y.value),(e=>{T(e)}));const M={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(M.refs).forEach((([e,t])=>{t.value&&t.value.addEventListener("mousedown",(t=>{M.mouseDown(t,e)}))}))},mouseDown:(e,t)=>{0==e.button&&(e.preventDefault(),M.startingEdges={left:v.value.x,top:v.value.y,right:v.value.x+y.value.width,bottom:v.value.y+y.value.height},M.newEdges={...M.startingEdges},M.clickStart={x:e.clientX,y:e.clientY},M.eventListenerController=new AbortController,document.addEventListener("mousemove",(e=>{M.mouseMove(e,t)}),{signal:M.eventListenerController.signal}),document.addEventListener("mouseup",(e=>{M.mouseUp(e,t)}),{signal:M.eventListenerController.signal}))},mouseMove:(e,t)=>{if(null!=M.startingEdges&&null!=M.newEdges&&null!=M.clickStart&&M.refs[t].value){if(e.preventDefault(),console.log("mouseMove",t),t.toLowerCase().includes("north")){M.newEdges.top=Math.max(M.startingEdges.top+e.clientY-M.clickStart.y,0);const t=M.newEdges.bottom-M.newEdges.top-100;t<0&&(M.newEdges.top+=t)}else t.toLowerCase().includes("south")&&(M.newEdges.bottom=Math.min(M.startingEdges.bottom+e.clientY-M.clickStart.y,document.body.clientHeight));if(t.toLowerCase().includes("west")){M.newEdges.left=Math.max(M.startingEdges.left+e.clientX-M.clickStart.x,0);const t=M.newEdges.right-M.newEdges.left-250;t<0&&(M.newEdges.left+=t)}else t.toLowerCase().includes("east")&&(M.newEdges.right=Math.min(M.startingEdges.right+e.clientX-M.clickStart.x,document.body.clientWidth));M.update()}},update:()=>{null!=M.newEdges&&null!=M.startingEdges&&(v.value={x:Math.max(M.newEdges.left,0),y:Math.max(M.newEdges.top,0)},y.value={width:Math.min(Math.max(M.newEdges.right-M.newEdges.left,250),document.body.clientWidth),height:Math.min(Math.max(M.newEdges.bottom-M.newEdges.top,100),document.body.clientHeight)})},mouseUp:(e,t)=>{0==e.button&&null!=M.startingEdges&&(console.log("mouseUp",t),e.preventDefault(),M.startingEdges=null,M.newEdges=null,M.clickStart=null,M.eventListenerController&&(M.eventListenerController.abort(),M.eventListenerController=null))},refs:{northWest:t(null),north:t(null),northEast:t(null),west:t(null),east:t(null),southWest:t(null),south:t(null),southEast:t(null)}},D={startingMouse:null,startingPosition:null,mouseDown:e=>{0==e.button&&(e.preventDefault(),console.log("mouseDown"),D.startingMouse={x:e.clientX,y:e.clientY},D.startingPosition=v.value,document.addEventListener("mousemove",D.mouseMove),document.addEventListener("mouseup",D.mouseUp))},mouseMove:e=>{D.startingMouse&&D.startingPosition&&(e.preventDefault(),v.value={x:Math.min(Math.max(D.startingPosition.x+e.clientX-D.startingMouse.x,0),document.body.clientWidth-y.value.width),y:Math.max(D.startingPosition.y+e.clientY-D.startingMouse.y,0)})},mouseUp:e=>{0==e.button&&D.startingMouse&&D.startingPosition&&(e.preventDefault(),D.startingMouse=null,D.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",D.mouseMove),document.removeEventListener("mouseup",D.mouseUp))}};function N(e){return{id:l,icon:h.icon,title:h.title,pid:h.pid,data:e??h.tag}}const P=t(1),O=b((()=>!(-1===vs.value.get(l)))),B=t(!1),F=t(!0),W=b((()=>"z-index:"+P.value));function U(){P.value<=ys.ZIndexMax&&(ys.ZIndexMax+=1,P.value=ys.ZIndexMax)}function j(){d("minimize",N()),ys.minimizeWindowPanel(l)}function $(){B.value=!B.value}function H(){d("close",N(!1)),ys.removeWindowPanel(l),F.value=!1}const G=b((()=>B.value?Cs:Ss)),q={id:l,isShow:O,close:H,open:function(){d("open",N(!0)),F.value=!0},showHidePanel:j,updatePosition:k};function V(e,t=document.body.clientWidth){if(xe(e))return e;{const n=Number(e);if(n==n)return n;if(e.endsWith("px")){const t=e.substring(0,e.length-2);return Number(t)}if(e.endsWith("%")){const n=e.substring(0,e.length-1);return Number(n)/100*t}return 300}}function K(e,t){if(!p.value)return void console.warn("dragPanelRef.value当前窗体html元素为空!");let n=e??document.body.clientWidth,r=t??document.body.clientHeight,i=V(h.left,n),o=V(h.top,r);"unset"==h.bottom&&"unset"==h.right||("unset"!=h.right&&(i=n-V(h.right,n)-y.value.width),"unset"!=h.bottom&&(o=r-V(h.bottom,r)-y.value.height)),v.value.x=i,v.value.y=o,k(v.value)}function Y(){if(Z&&("unset"!=h.bottom||"unset"!=h.right)){const e=Z.getBoundingClientRect();K(e.width,e.height)}}let Z;return n(q),S((()=>{!function(){let e=96;if(h.hasMin||(e-=32),h.hasMax||(e-=32),h.hasClose||(e-=32),st.setCssVar("--right-bar-width",e+"px",g.value),!g.value)return;const t=xe(h.titleHeight)?h.titleHeight+"px":h.titleHeight;g.value.style.height=t,g.value.style.lineHeight=t}(),function(){const e=N(q);ys.addWindowPanel(e),d("loaded",e)}();const{parentElement:e,clientWidth:t,clientHeight:n}=function(e){if(!(e instanceof HTMLElement))throw new Error("参数必须是有效的 DOM 元素");let t=e.parentElement;for(;t&&"static"===globalThis.getComputedStyle(t).position;)t=t.parentElement,t||(t=document.documentElement);const n=t?.clientWidth,r=t?.clientHeight;return{clientWidth:n,clientHeight:r,parentElement:t}}(p.value);Z=e,y.value={width:V(h.nWidth,t),height:V(h.nHeight,n)},T(y.value),K(t,n),M.mount(),st.windowResizeHandler(Y)})),C((()=>{st.offWindowResizeHandler(Y),ys.removeWindowPanel(l)})),(t,n)=>(a(),i(A,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:c((()=>[F.value?_((a(),E("div",{key:0,ref_key:"dragPanelRef",ref:p,class:z(["dragWindowPanel",{maxPanel:B.value,dragWindowPanel_dark:m.value}]),style:x(W.value)},[u("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:g,onMousedown:n[0]||(n[0]=(...e)=>D.mouseDown&&D.mouseDown(...e)),onClick:R(U,["stop"])},[r(t.$slots,"title",{},(()=>[h.icon?(a(),E("img",{key:0,src:h.icon,width:"24",height:"24"},null,8,Es)):f("",!0),h.title?(a(),E("span",xs,s(h.title),1)):f("",!0)]),!0),u("div",ks,[e.hasMin?(a(),i(L(X),{key:0,icon:L(bs),onClick:R(j,["stop"])},null,8,["icon"])):f("",!0),e.hasMax?(a(),i(L(X),{key:1,icon:G.value,onClick:R($,["stop"])},null,8,["icon"])):f("",!0),e.hasClose?(a(),i(L(X),{key:2,icon:L(ws),onClick:R(H,["stop"])},null,8,["icon"])):f("",!0)])],544),u("div",Ts,[r(t.$slots,"default",{},void 0,!0)]),u("div",zs,[u("div",{class:"cursor-nw-resize",ref:M.refs.northWest},null,512),u("div",{class:"cursor-n-resize",ref:M.refs.north},null,512),u("div",{class:"cursor-ne-resize",ref:M.refs.northEast},null,512),u("div",{class:"cursor-w-resize",ref:M.refs.west},null,512),n[1]||(n[1]=u("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1)),u("div",{class:"cursor-e-resize",ref:M.refs.east},null,512),u("div",{class:"cursor-sw-resize",ref:M.refs.southWest},null,512),u("div",{class:"cursor-s-resize",ref:M.refs.south},null,512),u("div",{class:"cursor-se-resize",ref:M.refs.southEast},null,512)])],6)),[[I,O.value]]):f("",!0)])),_:3}))}}),[["__scopeId","data-v-d0d67b92"]]),As={class:"adivider"},_s={class:"contentText"},Rs=he(e({__name:"ADivider",props:{align:{type:String,default:"left"},color:{type:String,default:"#888"}},setup(e){D((e=>({v1dc34ba7:n.value})));const t=e,n=b((()=>Ci(t.color)||wi(t.color)?t.color:"#888")),i=b((()=>"left"!=t.align?"flex:1;":"width:40px;")),o=b((()=>"right"!=t.align?"flex:1;":"width:40px;"));return(e,t)=>(a(),E("div",As,[u("div",{class:"line",style:x(i.value)},null,4),u("div",_s,[r(e.$slots,"default",{},void 0,!0)]),u("div",{class:"line",style:x(o.value)},null,4)]))}}),[["__scopeId","data-v-133ad44f"]]),Ls={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce(((e,t)=>(e[t.id]=t)&&e),{})}},methods:{updatePaneComponents(){this.panes.forEach((e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})}))},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))),this.touch.mouseDown=!1,setTimeout((()=>{this.touch.dragging=!1,this.unbindEvents()}),100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout((()=>{this.splitterTaps.splitter=null}),500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map(((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e))),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:r}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:r-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const r=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(e),i),r);let s=[t,t+1],a=this.panes[s[0]]||null,l=this.panes[s[1]]||null;const c=a.max<100&&o>=a.max+n.prevPanesSize,u=l.max<100&&o<=100-(l.max+this.sumNextPanesSize(t+1));if(c||u)c?(a.size=a.max,l.size=Math.max(100-a.max-n.prevPanesSize-n.nextPanesSize,0)):(a.size=Math.max(100-l.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),l.size=l.max);else{if(this.pushOtherPanes){const e=this.doPushOtherPanes(n,o);if(!e)return;({sums:n,panesToResize:s}=e),a=this.panes[s[0]]||null,l=this.panes[s[1]]||null}null!==a&&(a.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,a.min),a.max)),null!==l&&(l.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,r=[n,n+1];return t<e.prevPanesSize+this.panes[r[0]].min&&(r[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,r[0]<n&&this.panes.forEach(((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),e.prevPanesSize=this.sumPrevPanesSize(r[0]),void 0===r[0])?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach(((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),this.panes[r[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach(((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),e.nextPanesSize=this.sumNextPanesSize(r[1]-1),void 0===r[1])?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach(((t,r)=>{r<this.panesCount-1&&r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),this.panes[r[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:r}},sumPrevPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r<e?n.size:0)),0)},sumNextPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r>e+1?n.size:0)),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find((t=>t.index<e&&t.size>t.min))||{}},findNextExpandedPane(e){return this.panes.find((t=>t.index>e+1&&t.size>t.min))||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach((e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")}))},addSplitter(e,t,n=!1){const r=e-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=e=>this.onMouseDown(e,r),"undefined"!=typeof window&&"ontouchstart"in window&&(i.ontouchstart=e=>this.onMouseDown(e,r)),i.onclick=e=>this.onSplitterClick(e,r+1)),this.dblClickSplitter&&(i.ondblclick=e=>this.onSplitterDblClick(e,r+1)),t.parentNode.insertBefore(i,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach((e=>{e.className.includes("splitpanes__splitter")&&this.removeSplitter(e)}));let t=0;e.forEach((e=>{e.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,e,!0):t&&this.addSplitter(t,e),t++)}))},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach((([e,t])=>n[e]=t))},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some((n=>(n.className.includes("splitpanes__pane")&&t++,n===e.$el)));const n=parseFloat(e.minSize),r=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:null===e.size?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach(((e,t)=>e.index=t)),this.ready&&this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},onPaneRemove(e){const t=this.panes.findIndex((t=>t.id===e._.uid)),n=this.panes.splice(t,1)[0];this.panes.forEach(((e,t)=>e.index=t)),this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some((e=>null!==e.givenSize||e.min||e.max<100))?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map((e=>({min:e.min,max:e.max,size:e.size}))))},equalize(){const e=100/this.panesCount;let t=0;const n=[],r=[];this.panes.forEach((i=>{i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id)})),t>.1&&this.readjustSizes(t,n,r)},initialPanesSizing(){let e=100;const t=[],n=[];let r=0;this.panes.forEach((i=>{e-=i.size,null!==i.size&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)}));let i=100;e>.1&&(this.panes.forEach((t=>{null===t.size&&(t.size=Math.max(Math.min(e/(this.panesCount-r),t.max),t.min)),i-=t.size})),i>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const r=[],i=[];e&&null!==e.givenSize&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach((e=>{n-=e.size,e.size>=e.max&&r.push(e.id),e.size<=e.min&&i.push(e.id)})),Math.abs(n)<.1||(this.panes.forEach((o=>{e&&null!==e.givenSize&&e.id===o.id||(o.size=Math.max(Math.min(t,o.max),o.min)),n-=o.size,o.size>=o.max&&r.push(o.id),o.size<=o.min&&i.push(o.id)})),n>.1&&this.readjustSizes(n,r,i))},readjustSizes(e,t,n){let r;r=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach((i=>{if(e>0&&!t.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})})),Math.abs(e)>.1&&this.$nextTick((()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")}))}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach(((t,n)=>{t.ondblclick=e?e=>this.onSplitterDblClick(e,n):void 0}))}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return N("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Is={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||0===this.size?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}},Ds=he(Is,[["render",function(e,t,n,i,o,s){return a(),E("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=t=>s.onPaneClick(t,e._.uid)),style:x(e.style)},[r(e.$slots,"default")],4)}]]);function Ns(e){const t=new W(new F);return t.serialize(e),t.stream.toString()}function Ps(e){return null==e||""===e?e:new U(new F(e)).deserialize()}class Os{debug=!1;simple=!1;utc=!1;longType="number";dictType="object";nullType=void 0;static Instance=new Os;textEncoder=new TextEncoder;textDecoder=new TextDecoder;constructor(){}encodeResponse(e,t={}){var n=new F,r=new W(n,this.simple,this.utc),i=t;this.simple;var o=0;for(var s in i)o++;o>0&&(n.writeByte(72),r.serialize(i),r.reset()),e instanceof Error?(n.writeByte(69),r.serialize(this.debug&&e.stack?e.stack:e.message)):(n.writeByte(82),r.serialize(e)),n.writeByte(122);const a=n.takeBytes();return this.textDecoder.decode(a)}decodeRequest(e,t={}){const n=this.textEncoder.encode(e);if(0===n.length)return["~",[]];var r=new F(n),i=new U(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(console.log("tag",o),72===o){var s=i.deserialize(this.nullType);for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 67:return[i.deserialize(String),this.decodeArguments(i)];case 122:return["~",[]];default:throw new Error("Invalid request:\r\n"+r.toString())}}decodeArguments(e){var t=e.stream;let n=[];if(97===t.readByte()){e.reset();var r=j.readCount(t);const o=new Array(r).fill(this.nullType);n=new Array(r),e.addReference(n);for(var i=0;i<r;++i)n[i]=e.deserialize(o[i]);t.readByte()}return n}encodeRequest(e,t,n={}){var r=new F,i=new W(r,this.simple,this.utc),o=n;this.simple&&(o.simple=!0);var s=0;for(var a in o)s++;s>0&&(r.writeByte(72),i.serialize(o),i.reset()),r.writeByte(67),i.serialize(e),t.length>0&&(i.reset(),i.serialize(t)),r.writeByte(122);const l=r.takeBytes();return this.textDecoder.decode(l)}decodeResponse(e,t={}){const n=this.textEncoder.encode(e);var r=new F(n),i=new U(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(72===o){var s=i.deserialize();for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 82:return t.simple&&(i.simple=!0),console.log(o,"9999999999"),i.deserialize();case 69:throw new Error(i.deserialize(String));case 122:return;default:throw new Error("Invalid response:\r\n"+r.toString())}}}const Bs=new Map,Fs=new Map;let Ws;const Us={getDefaultClient(){if(Ws||(Ws=new Qe(SysConfig?.ServiceURL.DefaultHproseAPI)),!Ws)throw Error("HproseProxy对象为空");return Ws},registerHprose(e,t){const n=Fs.get(e);if(!n){const n=new Qe(t);Bs.set(e,n)}return n},getHprose:e=>Fs?.get(e),getProxyHprose:e=>Bs.get(e),unregisterHprose(e){Bs.get(e)&&(Fs.delete(e),Bs.delete(e))}},js=5e3,$s=36e5,Hs={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},Gs="access_token",qs=ce?.Config?.ServiceURL.LoginAuthURL;function Xs(){const e=Je();e&&Ni(Hs.RefreshToken,qs,{refreshToken:e}).then((e=>{Ks(e.data)}))}function Vs(){const e=Ke.getJsonObject(Gs);if(!e)return;const t=(new Date).getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=js?Xs():setTimeout(Xs,n-js))}function Ks(e){const t=(new Date).getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=$s?(n=18e5,console.warn("客户端时间与服务器不一致:过去时间!")):n<-6e5&&(n=18e5,console.warn("客户端时间与服务器不一致:未来时间!")),n>0){let t=Ye();t?(t.token=e.accessToken.tokenContent,t.expire=e.accessToken.expires,t.refresh=e.refreshToken.tokenContent):t={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},Ke.set(Gs,t,n/1e3),Vs()}else Ke.remove(Gs)}const Ys="Wm314243",Zs=ce?.Config?.ServiceURL.LoginAuthURL;async function Js(e){const t={username:e.username,pwd:br.encryptToString(e.pwd,Ys)},n=await Ni(Hs.Login,Zs,t),r=n?.data;return r&&(Ks(r.doubletoken),lo(!1)),r}function Qs(e){const t={oldpwd:br.encryptToString(e.oldpwd,Ys),newpwd:br.encryptToString(e.newpwd,Ys)};return Ni(Hs.ChangeMyPwd,Zs,t)}function ea(e){return br.encryptToString(e,Ys)}function ta(){const e=Ye();e&&(Bi(Hs.Logout,Zs,{token:e.token,reftoken:e.refresh}),Ze())}function na(e){return Ni(Hs.CheckToken,Zs,{token:e})}var ra=(e=>(e[e.Widget=0]="Widget",e[e.Route=1]="Route",e[e.URL=2]="URL",e[e.Action=3]="Action",e))(ra||{});const ia="ROLE_SYSTEM_RIGHT",oa=new qe("",globalThis.sessionStorage);function sa(){return oa.get(ia)}function aa(e){oa.set(ia,e)}function la(){oa.remove(ia)}function ca(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ca(n.children),0===n.children.length&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function ua(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&ua(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function ha(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&ha(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function da(e,t,n,r="name"){const i=e[n],o=t[n];i?o&&ha(i,o,r):o&&(e[n]=o)}function fa(e){if(e&&e.length>0){const t=e.length;let n,r=!1;if(t>0){r=Ce(e[0]);const i=r?e[0]:JSON.parse(e[0]);if(t>1)for(let t=1;t<e.length;t++){const n=e[t],o=r?n:JSON.parse(n);da(i,o,"routes","name"),da(i,o,"widgetMenu","name"),da(i,o,"widgets","id"),da(i,o,"functions","id")}n=i}return n&&(ca(n.routes),ca(n.widgetMenu),ca(n.widgets),ca(n.functions)),n}}const pa=[],ga=[],ma=[];function va(){return sa()}async function ya(e,t=!1){la();const n=Hs.GetSystemRights,r=ce?.Config?.ServiceURL.LoginAuthURL,i=await Ni(n,r,{systemid:e});if(!i||!i.data)return void ce.Message?.warn("无法获取功能授权列表!");const o=i.data;if(o&&o.length>0){if(t){const e=JSON.parse(o[0]);return aa(e),e}{const e=fa(o);return aa(e),e}}}function wa(e,t){const n={...e};return n.meta||(n.meta={}),null!=t.index&&(n.meta.index=t.index),null!=t.title&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.path===t.path));if(r){const e=wa(r,t);e&&n.children?.push(e)}}))),n}function ba(e,t=2){if(0===t)return e;const n=va();return n&&n.routes?(ma.length>0||e.forEach((e=>{const t=n.routes?.find((t=>t.name===e.name));if(t){const n=wa(e,t);n&&ma.push(n)}})),ma):void 0}function Sa(e,t){const n={...e};return null!=t.index&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.name===t.name));if(r){const e=Sa(r,t);e&&n.children?.push(e)}}))),n}function Ca(e,t=2){if(0===t)return e;const n=va();return n&&n.widgetMenu?(ga.length>0||e.forEach((e=>{const t=n.widgetMenu?.find((t=>t.name===e.name));if(t){const n=Sa(e,t);n&&ga.push(n)}})),ga):void 0}function Ea(e,t=2){if(0===t)return e;const n=va();return n&&n.widgets?(pa.length>0||e?.forEach((e=>{const t=n.widgets?.find((t=>t.id===e.id));t&&pa.push(e)})),pa):void 0}function xa(e,t=2){if(0===t&&(ce.RightWidgetConfigMap=e,ce.RightWidgetConfigMap&&ce.RightWidgetConfigMap.size>0))return ce.RightWidgetConfigMap;const n=va();if(n&&n.widgets){const t=new Map;if(n.widgets.forEach((e=>{const n=e.layoutID;if(n){let r;t.has(n)&&(r=t.get(n)),r||(r=new Array,t.set(n,r)),r&&r.push(e)}})),n.widgets.length=0,t.size>0){const n=new Map;for(const[r,i]of t){const t=e.get(r);if(t){const e=new Array;t.forEach((t=>{i.findIndex((e=>e.id===t.id))>=0&&e.push(t)})),e.length>0&&n.set(r,e),t.length=0}}return t.clear(),ce.RightWidgetConfigMap=n,n}}else;}function ka(e,t=2){if(0===t)return e;const n=va();return n?n.functions:void 0}const Ta={mounted(e,t){const n=t.value,r=n&&n.container&&document.querySelector(n.container)||document.querySelector("#map3dContainer")||document.body,i=n&&n.selector&&e.querySelector(n.selector)||e.querySelector(".drag-el")||e;i!==e&&i.classList.add("ls-draggable"),i.onmousedown=function(t){e.style.transition="none";const n=t.clientX-e.offsetLeft,i=t.clientY-e.offsetTop,o=r.offsetWidth,s=r.offsetHeight,a=e.offsetWidth,l=e.offsetHeight;"100"!==e.style.zIndex&&(e.style.zIndex=100),r.onmousemove=function(t){let r=t.clientX-n,c=t.clientY-i;r<0&&(r=0),c<0&&(c=0),r>o-a&&(r=o-a),c>s-l&&(c=s-l),e.style.left=r+"px",e.style.top=c+"px"},r.onmouseup=function(t){r.onmousemove=r.onmouseup=null,e.style.transition="all 0.3s"}}}};function za(e){e.directive("drag",Ta)}const Ma={beforeMount(e,t){let n=null,r=0;const i=()=>t?.value(),o=()=>{Date.now()-r<100&&i(),n&&clearInterval(n),n=null};so.on(e,"mousedown",(e=>{0===e.button&&(r=Date.now(),so.once(document,"mouseup",o),n&&clearInterval(n),n=setInterval(i,100))}))}};function Aa(e){e.directive("repeatClick",Ma)}const _a={mounted(e,t){const n=t.value;e.style.visibility="hidden",e.style["animation-name"]="none";const r=function(e,t){if(function(e){const t=globalThis.scrollY||globalThis.pageYOffset||document.documentElement.scrollTop||e.parentNode.scrollTop,n=t+(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?document.documentElement.scrollHeight>document.documentElement.clientHeight?globalThis.innerHeight:document.documentElement.clientHeight:Math.min(document.documentElement.clientHeight,globalThis.innerHeight)),r=function(e){let t;for(;void 0===e.offsetTop;)e=e.parentNode;for(t=e.offsetTop;e=e.offsetParent;)t+=e.offsetTop;return t}(e),i=r+e.clientHeight;return r<n&&i>=t}(e)){e.style.visibility="visible";for(const n in t)e.style[n]=t[n];"none"!=e.style["animation-name"]&&(e.style["animation-duration"]||(e.style["animation-duration"]="1s")),e.parentNode.removeEventListener("scroll",o)}};let i=Date.now();const o=function(){Date.now()-i>=100&&(r(e,n),i=Date.now())};setTimeout((function(){r(e,n)}),1),e.parentNode.addEventListener("scroll",o)}};function Ra(e){e.directive("wow",_a)}
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright 2019 Google LLC
|
|
11
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
12
|
-
*/const La=Symbol("Comlink.proxy"),Ia=Symbol("Comlink.endpoint"),Da=Symbol("Comlink.releaseProxy"),Na=Symbol("Comlink.finalizer"),Pa=Symbol("Comlink.thrown"),Oa=e=>"object"==typeof e&&null!==e||"function"==typeof e,Ba=new Map([["proxy",{canHandle:e=>Oa(e)&&e[La],serialize(e){const{port1:t,port2:n}=new MessageChannel;return Fa(e,t),[n,[n]]},deserialize:e=>(e.start(),Ua(e))}],["throw",{canHandle:e=>Oa(e)&&Pa in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function Fa(e,t=globalThis,n=["*"]){t.addEventListener("message",(function r(i){if(!i||!i.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:o,type:s,path:a}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(Ya);let c;try{const t=a.slice(0,-1).reduce(((e,t)=>e[t]),e),n=a.reduce(((e,t)=>e[t]),e);switch(s){case"GET":c=n;break;case"SET":t[a.slice(-1)[0]]=Ya(i.data.value),c=!0;break;case"APPLY":c=n.apply(t,l);break;case"CONSTRUCT":c=function(e){return Object.assign(e,{[La]:!0})}(new n(...l));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;Fa(e,n),c=function(e,t){return Va.set(e,t),e}(t,[t])}break;case"RELEASE":c=void 0;break;default:return}}catch(e){c={value:e,[Pa]:0}}Promise.resolve(c).catch((e=>({value:e,[Pa]:0}))).then((n=>{const[i,a]=Ka(n);t.postMessage(Object.assign(Object.assign({},i),{id:o}),a),"RELEASE"===s&&(t.removeEventListener("message",r),Wa(t),Na in e&&"function"==typeof e[Na]&&e[Na]())})).catch((e=>{const[n,r]=Ka({value:new TypeError("Unserializable return value"),[Pa]:0});t.postMessage(Object.assign(Object.assign({},n),{id:o}),r)}))})),t.start&&t.start()}function Wa(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function Ua(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}})),qa(e,n,[],t)}function ja(e){if(e)throw new Error("Proxy has been released and is not useable")}function $a(e){return Za(e,new Map,{type:"RELEASE"}).then((()=>{Wa(e)}))}const Ha=new WeakMap,Ga="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(Ha.get(e)||0)-1;Ha.set(e,t),0===t&&$a(e)}));function qa(e,t,n=[],r=function(){}){let i=!1;const o=new Proxy(r,{get(r,s){if(ja(i),s===Da)return()=>{!function(e){Ga&&Ga.unregister(e)}(o),$a(e),t.clear(),i=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=Za(e,t,{type:"GET",path:n.map((e=>e.toString()))}).then(Ya);return r.then.bind(r)}return qa(e,t,[...n,s])},set(r,o,s){ja(i);const[a,l]=Ka(s);return Za(e,t,{type:"SET",path:[...n,o].map((e=>e.toString())),value:a},l).then(Ya)},apply(r,o,s){ja(i);const a=n[n.length-1];if(a===Ia)return Za(e,t,{type:"ENDPOINT"}).then(Ya);if("bind"===a)return qa(e,t,n.slice(0,-1));const[l,c]=Xa(s);return Za(e,t,{type:"APPLY",path:n.map((e=>e.toString())),argumentList:l},c).then(Ya)},construct(r,o){ja(i);const[s,a]=Xa(o);return Za(e,t,{type:"CONSTRUCT",path:n.map((e=>e.toString())),argumentList:s},a).then(Ya)}});return function(e,t){const n=(Ha.get(t)||0)+1;Ha.set(t,n),Ga&&Ga.register(e,t,e)}(o,e),o}function Xa(e){const t=e.map(Ka);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const Va=new WeakMap;function Ka(e){for(const[t,n]of Ba)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},Va.get(e)||[]]}function Ya(e){switch(e.type){case"HANDLER":return Ba.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Za(e,t,n,r){return new Promise((i=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),r)}))}var Ja=Symbol("getEndpoint"),Qa=e=>{const t=Ua(e);return new Proxy(t,{get:(t,n,r)=>n===Ja?e:Reflect.get(t,n,r)})};const el=Qa(new Worker(new URL("/assets/worker-iconv-BsNle8M5.js",import.meta.url),{type:"module"})),tl=Qa(new Worker(new URL("/assets/worker-xmath-AxRk6MsK.js",import.meta.url),{type:"module"})),nl=Qa(new Worker(new URL("/assets/worker-webcache-Csuv6kAg.js",import.meta.url),{type:"module"})),rl=V();function il(e){e.addEventListener("message",(({data:e})=>{rl.emit(e.reqID,e)}))}async function ol(e,t,n){return new Promise(((r,i)=>{const o=String(Date.now())+String(Math.random());e.postMessage({reqID:o,op:t,args:n}),rl.on(o,(e=>{"ok"===e.status?r(e.result):i(e.result)}))}))}function sl(e,t){const n={};for(const r in e){const i=e[r];if(i)for(const e in i){const r=""+e;n[e]=(...e)=>ol(t,r,e)}}return n}class al{static batteryStatusCallback;static _battery;static batteryStatusChange(e){const t=this._battery;t&&(console.log("电量: "+100*t.level+"%"),console.log("充电状态: "+t.charging),this.batteryStatusCallback&&this.batteryStatusCallback(t))}static async OnBatteryStatusHandler(e){this.batteryStatusCallback=e;const t=navigator,n=await t.getBattery();n&&(this._battery=n,this.batteryStatusCallback&&this.batteryStatusCallback(n),n.onlevelchange=this.batteryStatusChange.bind(this),n.onchargingchange=this.batteryStatusChange.bind(this),n.ondischargingtimechange=this.batteryStatusChange.bind(this))}static OffBatteryStatusHandler(){this._battery=void 0}static onlineChangeCallback;static networkStatusChange(){const e=this.isOnline(),t=e?"设备已联网":"设备未联网";console.log(t),this.onlineChangeCallback&&this.onlineChangeCallback(e)}static isOnline(){return navigator.onLine}static OnNetworkHandle(e){this.onlineChangeCallback=e,this.networkStatusChange(),window.addEventListener("online",this.networkStatusChange.bind(this)),window.addEventListener("offline",this.networkStatusChange.bind(this))}static OffNetworkHandle(){window.removeEventListener("online",this.networkStatusChange.bind(this)),window.removeEventListener("offline",this.networkStatusChange.bind(this))}static downloadSpead(e){const t=navigator,n=t.connection||t.mozConnection||t.webkitConnection;return n?(console.log("下行带宽:",n.downlink+" Mbps"),n.addEventListener("change",(()=>{console.log("网络状态变化:",n.effectiveType),e&&e(n.downlink)})),n.downlink):-1}static async vibrate(e=300){const t=navigator,n=t.vibrate||t.webkitVibrate||t.mozVibrate||t.msVibrate;n&&n(e)}static defaultSpeakOption={text:"",lang:"zh-CN",rate:1,pitch:1,volume:.2,voice:0};static changeSpeakOptions(e=.2,t=1,n=1,r=0){e>=0&&e<=1&&(this.defaultSpeakOption.volume=e),t>=.1&&t<=2&&(this.defaultSpeakOption.rate=t),n>=0&&n<=2&&(this.defaultSpeakOption.pitch=n),this.defaultSpeakOption.voice=r}static getSupportedVoices(){return window.speechSynthesis.getVoices().map((e=>e.name))}static getSupportedLanguages(){return navigator.languages}static async speak(e,t="zh-CN"){if(!e)return;const n=window.speechSynthesis;n.speaking&&n.cancel();const r=new SpeechSynthesisUtterance;r.lang=t,r.text=e,r.rate=this.defaultSpeakOption.rate,r.pitch=this.defaultSpeakOption.pitch,r.volume=this.defaultSpeakOption.volume;const i=this.defaultSpeakOption.voice;if(i>0){const e=n.getVoices();i<e.length&&(r.voice=e[i])}n.speak(r)}static async speakEnglish(e){this.speak(e,"en-US")}static stopSpeak(){const e=window.speechSynthesis;e.speaking&&e.cancel()}static openNotification(e,t,n,r,i){"Notification"in window||console.log("浏览器不支持桌面通知!");let o=n;if(t)o=o??{},o.body=t;else if("granted"===Notification.permission){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}else"denied"!==Notification.permission&&Notification.requestPermission((t=>{if("granted"===t){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}}))}static isPageVisible(){return!document.hidden}static onPageVisibleChange(e){document.addEventListener("visibilitychange",(()=>{e&&e(!document.hidden)}))}static async copyText(e){return await navigator.clipboard.writeText(e)}static async readText(){return await navigator.clipboard.readText()}static viewTransition(e){if(e){if(!document.startViewTransition)return void e();document.startViewTransition((()=>e()))}}}export{Rs as ADivider,Eo as BigFileDownload,pi as CommonTool,lr as DayjsTool,tr as Download,yi as EnumColor,io as FileUpload,xr as GetSignalRClient,ce as Global,Us as GlobalHprose,K as GlobalMitt,ar as GzipTool,st as H5Tool,Ge as HproseClient,Os as HproseRPCCodec,ir as HttpDownload,rr as JsonDownload,ft as LayoutContainer,ue as LayoutContainerEnum,ht as LayoutManager,wo as LocalForage,ao as LockState,ra as MenuItemEnum,vs as MinWindowMap,al as NavigatorPlugin,xo as ObjToUrlParams,To as OpenRouterURL,Ds as Pane,Qe as ProxyClient,fe as RouterTransition,pt as RouterTransitionAnimate,nr as SaveAs,or as SaveToSelectedFile,Ls as Splitpanes,qe as Storage,He as StringUtils,de as SuspenseWithError,ne as SysEvents,js as TOKEN_REFRESH_TIME,$s as TOKEN_VALID_TIMESPAN,Hs as USER_TOKEN_API,Qr as WarGridTool,Cr as WaterMark,Jr as WebCacheTool,ms as WindowsMap,Ms as XWindow,ys as XWindowManager,br as XXTEA,sr as ZipTool,fs as autoRefresh,ri as base64ToBlob,ii as blobToDataURL,_i as calculateBestTextColor,Qs as changeMyPWD,Ao as checkAddDefaultRoute,Vs as checkDoRefreshToken,na as checkToken,Ze as clearLocalToken,la as clearRight,ki as colorIsDark,ai as convertDecimalism,ci as convertDecimalismData,li as convertDecimalismSpacing,ui as convertToDecimalism,hi as convertToDecimalismByString,di as convertToDecimalismByString2,ps as createDB,oo as createFileUpload,Ti as darken,ko as deepMerge,Ii as delay,gs as deleteDB,Ps as deserialize,hs as doCloseModal,us as doLoadModal,Xs as doRefreshToken,lo as doSetLock,Ta as dragDirective,Po as exportSystemRights,ei as filterObj,er as findStringPrefix,Fi as get,Jn as getCommonFileBase,va as getCurrentSystemRight,Ui as getData,$i as getDownload,ea as getEncryptPWD,Xn as getFileBase,Vn as getFileExtension,ka as getFunctions,gi as getHexColor,Ye as getLocalToken,co as getLockState,vi as getLongHexColor,Kn as getPathBase,ct as getProxyClient,mi as getRGBColor,bi as getRGBColorFromHSLA,ti as getRandomInt,ni as getRandomItem,Je as getRefreshToken,sa as getRight,Mo as getRouteURL,ba as getRoutes,ya as getSystemRoleRight,No as getTabRouteData,zo as getVueURL,Ea as getWidgetConfig,xa as getWidgetConfigMap,Ca as getWidgetMenus,Do as globFilterLayoutWidgetConfig,Ro as globFilterObjects,Lo as globFilterObjectsOld,ca as handleNodes,xi as hexToRGB,el as iconvWorker,lt as init,ut as initDefaultProxyClient,il as initWorker,ge as is,Ae as isArray,ke as isAsyncFunction,Me as isBoolean,_e as isClient,Ee as isDate,ve as isDef,Le as isElement,Ne as isEmpty,wi as isEnumColor,Pe as isError,me as isFunction,Ci as isHexColor,De as isImageDom,We as isMap,we as isNull,be as isNullAndUnDef,Se as isNullOrUnDef,xe as isNumber,Ce as isObjectX,Te as isPromise,Ie as isServer,ze as isString,je as isStringLikeJson,$e as isStringLikeKml,Fe as isSymbol,ye as isUnDef,Ue as isValidURL,Be as isWeakMap,Oe as isWeakSet,Re as isWindow,so as jquery,zi as lighten,Js as login,ta as logout,fa as mergeFilterRoleSysRight,Qn as mergeNames,ua as mergeNodes,da as mergeNodesAll,V as mitt,mt as newGuid,fo as onLockListener,qn as parseLocalPath,Wi as post,_o as recursiveRoutes,sl as registerWorkerSerivces,Ma as repeatDirective,oi as replaceAll,Yn as replaceFileExtension,Ni as requestGet,Oi as requestPost,Bi as requestPostBody,si as reserveDecimal,Ei as rgbToHex,Ns as serialize,Ks as setLocalToken,aa as setRight,za as setupDragDirective,Aa as setupRepeatDirective,Ra as setupWowDirective,Li as sleep,Xe as storage,Ke as storageHelper,Zn as toLowerCaseExtension,fi as traverseXYArrayFromInsideOut,po as unLockListener,gt as uuid,Ho as verifiyNumberInteger,Qo as verifyAccount,Xo as verifyAndSpace,cs as verifyCarNum,Go as verifyCnAndSpace,is as verifyEmail,qo as verifyEnAndSpace,ss as verifyFullName,rs as verifyIPAddress,os as verifyIdCard,Yo as verifyNumberCnUppercase,Vo as verifyNumberComma,$o as verifyNumberIntegerAndFloat,Uo as verifyNumberPercentage,jo as verifyNumberPercentageFloat,es as verifyPassword,ts as verifyPasswordPowerful,ns as verifyPasswordStrength,Zo as verifyPhone,as as verifyPostalCode,Jo as verifyTelPhone,Ko as verifyTextColor,ls as verifyUrl,nl as webCacheWorker,_a as wowDirective,Fo as writeIconifyList,Wo as writeSysRoleRight,tl as xmathWorker};
|
|
1
|
+
import{Fragment as e,KeepAlive as t,Suspense as n,Transition as r,TransitionGroup as i,computed as o,createBlock as s,createCommentVNode as a,createElementBlock as l,createElementVNode as c,createTextVNode as u,createVNode as h,defineComponent as d,h as f,markRaw as p,mergeProps as g,nextTick as m,normalizeClass as v,normalizeStyle as y,onErrorCaptured as w,onMounted as b,onUnmounted as S,openBlock as C,reactive as x,ref as E,renderList as k,renderSlot as M,resolveComponent as z,resolveDynamicComponent as T,toDisplayString as A,unref as L,useCssVars as _,vShow as R,watch as I,withCtx as D,withDirectives as P,withModifiers as O}from"vue";import N from"axios";import{Client as B,ClientContext as F}from"@hprose/rpc-core";import{ByteStream as W,Reader as U,ValueReader as j,Writer as $}from"@hprose/io";import{HttpTransport as H}from"@hprose/rpc-html5";import q,{default as G}from"iconv-lite";import*as X from"@microsoft/signalr";import V from"qs";import{Icon as K}from"@iconify/vue";var Z=Object.create,Y=Object.defineProperty,J=Object.getOwnPropertyDescriptor,Q=Object.getOwnPropertyNames,ee=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty,ne=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),re=(e,t,n)=>(n=null!=e?Z(ee(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=Q(t),s=0,a=o.length;s<a;s++)i=o[s],te.call(e,i)||undefined===i||Y(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=J(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?n:Y(n,"default",{value:e,enumerable:!0}),e)),ie=(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)((function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}));function oe(e){return{all:e=e||new Map,on(t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])},off(t,n){const r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit(t,n){let r=e.get(t);r&&r.slice().map((e=>{e(n)})),r=e.get("*"),r&&r.slice().map((e=>{e(t,n)}))}}}var se=oe(),ae=ne(((e,t)=>{var n,r;n=e,r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var o=r[i];this[o]=i<n?e:this.methodFactory(o,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function u(r,i,o){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?a:void 0!==console[r]?s(console,r):void 0!==console.log?s(console,"log"):e)}(r)||c.apply(this,arguments)}function h(e,n){var s,a,c,h=this,d="loglevel";function f(){var e;if(typeof window!==t&&d){try{e=window.localStorage[d]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(d),i=n.indexOf(r+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch(e){}return void 0===h.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==h.levels[t.toUpperCase()]&&(t=h.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=h.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?d+=":"+e:"symbol"==typeof e&&(d=void 0),h.name=e,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=n||u,h.getLevel=function(){return null!=c?c:null!=a?a:s},h.setLevel=function(e,n){return c=p(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&d){try{return void(window.localStorage[d]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(d)+"="+n+";"}catch(e){}}}(c),l.call(h)},h.setDefaultLevel=function(e){a=p(e),f()||h.setLevel(e,!1)},h.resetLevel=function(){c=null,function(){if(typeof window!==t&&d){try{window.localStorage.removeItem(d)}catch(e){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),l.call(h)},h.enableAll=function(e){h.setLevel(h.levels.TRACE,e)},h.disableAll=function(e){h.setLevel(h.levels.SILENT,e)},h.rebuild=function(){if(o!==h&&(s=p(o.getLevel())),l.call(h),o===h)for(var e in i)i[e].rebuild()},s=p(o?o.getLevel():"WARN");var g=f();null!=g&&(c=p(g)),l.call(h)}(o=new h).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new h(e,o.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=d),o},o.getLoggers=function(){return i},o.default=o,o},"function"==typeof define&&define.amd?define(r):"object"==typeof t&&t.exports?t.exports=r():n.log=r()})),le=re(ae(),1),ce={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetToUnloadEvent:"WidgetToUnloadEvent",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded",ModalContainerWidget_LoadModal:"ModalContainerWidget_LoadModal",ModalContainerWidget_CloseModal:"ModalContainerWidget_CloseModal",WidgetClosed:"WidgetClosed"},ue=class{message;eventBus;constructor(e,t=void 0){e&&(this.message=e),t&&(this.eventBus=t)}msg(e,t=3,n="success"){if(this.message)if("function"==typeof this.message)this.message({type:n,message:e,duration:t});else switch(n){case"info":this.message.info(e,t);break;case"success":this.message.success(e,t);break;case"warning":this.message.warn?this.message.warn(e,t):this.message.warning&&this.message.warning(e,t);break;case"error":this.message.error(e,t)}else{switch(n){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":n="dark",console.error(e)}this.eventBus&&this.eventBus.emit(ce.AlertInfoEvent,{type:n,info:e})}}info(e,t=3){this.msg(e,t,"info")}warn(e,t=3){this.msg(e,t,"warning")}err(e,t=3){this.msg(e,t,"error")}success(e,t=3){this.msg(e,t,"success")}},he=globalThis.SysConfig,de=!1,fe=!1;Function.prototype.promise=function(...e){const t=this;return function(){const n=e||[];return new Promise(((e,r)=>{n.push((function(t,n){t?r(t):e(n)})),t.apply(t,n)}))}()};var pe={Config:globalThis.SysConfig,EventBus:se,DefaultProxyClient:null,Axios:N,Message:new ue(void 0,se),LayoutMap:new Map,getLayoutManager:e=>{if(!ve.WidgetConfigList||0===ve.WidgetConfigList.length)return;const t=ve.WidgetConfigList.find((t=>t.id===e));if(t){const e=t.layoutID;if(e&&ve.LayoutMap.has(e))return ve.LayoutMap.get(e)}},Logger:e=>{de||(he.UI.ProductLog?le.enableAll():le.setDefaultLevel("warn"),de=!0);const t=e||"default";return le.getLogger(t)},Loading:(e="end")=>{if("end"===e)setTimeout((()=>{document.getElementById("apploading")?.remove()}),300),fe=!0;else if(e)if(fe){const t=`加载Widget:${e}……`;se.emit("statusmessage",t)}else{const t=document.getElementById("app-loading-info");t&&(t.innerHTML=`正在加载:${e}……`)}}},ge="99,111,110,115,116,32,118,97,108,105,100,75,101,121,115,61,91,39,54,65,50,53,51,65,69,70,54,54,68,48,69,56,65,66,57,54,49,55,49,55,51,49,50,52,50,66,65,70,53,65,39,44,39,66,54,53,48,52,57,53,55,54,55,49,49,56,66,50,70,50,50,48,55,67,66,52,69,70,51,49,51,52,49,65,68,39,44,39,54,66,52,66,57,49,65,67,52,51,56,70,70,57,69,54,65,69,52,68,49,49,70,48,50,70,56,51,50,68,51,52,39,44,39,70,54,69,52,57,50,52,57,57,69,70,57,57,48,65,49,50,66,57,66,57,55,48,66,54,57,68,69,68,49,48,70,39,44,39,57,67,55,55,56,67,66,69,66,56,54,51,70,68,68,52,70,49,66,65,51,56,49,52,50,69,48,52,53,53,69,49,39,44,39,70,66,66,55,57,67,57,66,51,57,53,70,65,70,55,49,53,56,50,50,65,70,52,50,52,57,54,56,70,48,54,67,39,44,39,53,57,51,66,67,70,68,50,54,70,48,53,53,53,65,53,50,57,51,67,68,49,49,56,55,49,56,53,49,68,52,52,39,44,39,50,48,54,55,69,66,51,54,57,55,69,55,49,67,53,49,53,68,68,68,54,49,65,53,52,70,67,57,51,53,53,69,39,44,39,70,52,65,50,68,67,69,65,48,53,56,69,68,52,55,48,53,67,67,52,70,54,69,66,51,70,67,70,48,66,53,66,39,93,59,105,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,38,38,118,97,108,105,100,75,101,121,115,46,105,110,100,101,120,79,102,40,83,121,115,67,111,110,102,105,103,46,75,69,89,41,62,61,48,41,123,99,111,110,115,111,108,101,46,108,111,103,40,39,117,115,105,110,103,32,97,117,116,104,111,114,105,122,101,100,32,120,102,114,97,109,101,108,105,98,46,84,104,97,110,107,32,121,111,117,33,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,101,108,115,101,32,105,102,40,33,83,121,115,67,111,110,102,105,103,46,75,69,89,41,123,105,102,40,110,101,119,32,68,97,116,101,40,50,48,50,55,44,49,44,49,41,60,110,101,119,32,68,97,116,101,40,41,41,123,105,102,40,99,111,110,102,105,114,109,40,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,116,114,105,97,108,32,104,97,115,32,101,120,112,105,114,101,100,46,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,46,32,83,101,108,101,99,116,32,79,75,32,116,111,32,110,97,118,105,103,97,116,101,32,116,111,32,116,104,101,32,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,32,85,82,76,46,39,41,41,123,108,111,99,97,116,105,111,110,46,104,114,101,102,61,39,104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,122,111,114,114,111,119,109,39,125,101,108,115,101,123,116,104,114,111,119,39,84,104,101,32,116,114,105,97,108,32,112,101,114,105,111,100,32,104,97,115,32,101,120,112,105,114,101,100,33,39,59,125,125,101,108,115,101,123,99,111,110,115,111,108,101,46,108,111,103,40,39,84,104,101,32,116,114,105,97,108,32,100,101,97,100,108,105,110,101,32,102,111,114,32,116,104,105,115,32,120,102,114,97,109,101,108,105,98,32,108,105,98,114,97,114,121,32,105,115,32,74,97,110,117,97,114,121,32,49,44,32,50,48,50,55,46,39,41,59,114,101,116,117,114,110,32,103,108,111,98,79,98,106,125,125,116,104,114,111,119,39,84,104,101,32,88,70,114,97,109,101,108,105,98,32,75,69,89,32,105,115,32,105,110,118,97,108,105,100,33,32,84,111,32,112,117,114,99,104,97,115,101,32,97,32,102,117,108,108,32,118,101,114,115,105,111,110,32,112,108,101,97,115,101,32,99,111,110,116,97,99,116,58,122,111,114,114,111,119,109,64,49,50,54,46,99,111,109,32,33,39,59".split(",").map((e=>Number(e)));new Function("globObj","isdev",String.fromCharCode(...ge));var me,ve=pe;!function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"}(me||(me={}));var ye=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},we=ye(d({name:"SuspenseWithError",setup(){const e=E(null);return w((t=>(e.value="当前页面存在问题,无法渲染……",console.error("onErrorCaptured",t),!0))),{error:e}}}),[["render",function(e,t,r,i,o,a){return e.error?M(e.$slots,"error",{key:0},(()=>[u(A(e.error),1)])):(C(),s(n,{key:1},{default:D((()=>[M(e.$slots,"default")])),fallback:D((()=>[M(e.$slots,"fallback",{},(()=>[t[0]||(t[0]=c("div",null,"加载中……",-1))]))])),_:3}))}]]),be=d({name:"RouterTransition",__name:"RouterTransition",setup:e=>(e,n)=>{const r=z("router-view");return C(),s(we,null,{default:D((()=>[h(r,null,{default:D((({Component:e,route:n})=>[(C(),s(t,null,[n.meta.keepAlive?(C(),s(T(e),{key:n.name})):a("",!0)],1024)),n.meta.keepAlive?a("",!0):(C(),s(T(e),{key:n.name}))])),_:1})])),_:1})}}),Se=class{static isNullOrEmpty=e=>null===e||""===e||void 0===e||0===e.length;static isNotEmpty=e=>null!==e&&""!==e&&void 0!==e&&0!==e.length;static toHump(e){return e.replace(/[\-\/\_](\w)/g,((e,t)=>t.toUpperCase())).replace("views","")}static getFileName(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}static UpperFirst(e){return(e=e.toLowerCase()).replace(/\b\w|\s\w/g,(e=>e.toUpperCase()))}},Ce=class e{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!Se.isNullOrEmpty(t)){if(e.httpTransport||(e.httpTransport=new H),this.client=new B(t),!this.client)throw Error("Hprose Client初始化错误");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then((e=>{this.hproseProxy=e})).catch((e=>{String(e).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("旧版本不支持useServiceAsync")):se.emit(ce.HproseServiceErrorEvent,"初始化默认Hprose!")}))}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,t,n){if(this.client)return await this.client.invoke(e,t,n)}encode(e,t,n){return this.client?this.client.codec.encode(e,t,n):void 0}decode(e,t){return this.client?this.client.codec.decode(e,t):void 0}},xe=class{prefixKey;storage;constructor(e="",t=globalThis.localStorage){this.prefixKey=e,this.storage=t}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,t,n=604800){const r=JSON.stringify({value:t,expire:null!==n?(new Date).getTime()+1e3*n:null});this.storage.setItem(this.getKey(e),r)}get(e,t=null){const n=this.storage.getItem(this.getKey(e));if(n)try{const{value:t,expire:r}=JSON.parse(n);if(null===r||r>=Date.now())return t;this.remove(this.getKey(e))}catch(e){return t}return t}getJsonObject(e){const t=this.storage.getItem(this.getKey(e));if(t)try{const n=JSON.parse(t);if(null===n.expire||n.expire>=Date.now())return n;this.remove(this.getKey(e))}catch(e){return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,t,n=604800){document.cookie=`${this.getKey(e)}=${t}; Max-Age=${n}`}getCookie(e){const t=document.cookie.split("; ");for(let n=0,r=t.length;n<r;n++){const r=t[n].split("=");if(r[0]===this.getKey(e))return r[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let t=e.length;t--;)document.cookie=e[t]+"=0;expire="+new Date(0).toUTCString()}},Ee=new xe("",globalThis.localStorage),ke="access_token",Me=new xe("user",globalThis.localStorage);function ze(){return Me.get(ke)}function Te(){Me.remove(ke)}function Ae(){return ze()?.refresh}var Le=class{hproseClient;hpProxyObj;defaultContext=new F;constructor(e){this.hproseClient=new Ce(e),this.hpProxyObj=null}getClientContext(e,t){const n={};t&&(n.requestHeaders=t),n.httpRequestHeaders=e||{};const r=n.httpRequestHeaders,i=ze();return i&&(r.token=i.token),ve.SystemID&&(r.sysid=ve.SystemID,ve.SystemGroup&&(r.sysgroup=ve.SystemGroup)),new F(n)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");if(!this.hpProxyObj){const e=await this.hproseClient.getProxy();this.hpProxyObj=e}return this.hpProxyObj||se.emit(ce.HproseServiceErrorEvent,"HproseProxy对象为空,无法调用Hprose方法!"),this.hpProxyObj}async hproseInvoke(e,t,n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");return await this.hproseClient.invoke(e,t,n)}async hproseInvokeContext(e,t,...n){if(!this.hproseClient)throw new Error("HproseClient对象为构建,无法调用Hprose方法");const r=ze();return console.log(r,"userToken3"),r&&(t||(t=new F({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,n,t)}async hproseInvokeEncode(e){const t=new W(e).toBytes(),n=await(this.hproseClient.client?.request(t,this.defaultContext));return n?this.hproseClient.client?.codec.decode(n,this.defaultContext):n}encodeRequest(e,...t){const n=(this.hproseClient.client?.codec)?.encode(e,t,this.defaultContext);return W.toString(n)}},_e=ne(((e,t)=>{!function(n){if("object"==typeof e)t.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var r;try{r=window}catch(e){r=self}r.SparkMD5=n()}}((function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(u,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,n(u,o),u}function s(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return a(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,l=this.byteLength,c=t(n,l),u=l;return r!==e&&(u=t(r,l)),c>u?new ArrayBuffer(0):(i=u-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),u.prototype.append=function(e){return this.appendBinary(l(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},u.hash=function(e,t){return u.hashBinary(l(e),t)},u.hashBinary=function(e,t){var n=a(o(e));return t?c(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,r,o,s,a=(r=this._buff.buffer,o=e,(s=new Uint8Array(r.byteLength+o.byteLength)).set(new Uint8Array(r)),s.set(new Uint8Array(o),r.byteLength),s),l=a.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)n(this._hash,i(a.subarray(t-64,t)));return this._buff=t-64<l?new Uint8Array(a.buffer.slice(t-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=c(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e,t=u.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e){var t,n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r);for(t=0;t<n;t+=1)i[t]=e.charCodeAt(t);return i}(e.buff),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var r=a(function(e){var t,r,o,s,a,l,c=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(u,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),l=parseInt(s[1],16)||0,o[14]=a,o[15]=l,n(u,o),u}(new Uint8Array(e)));return t?c(r):r},u}))})),Re=re(_e(),1),Ie=Object.prototype.toString;function De(e,t){return Ie.call(e)===`[object ${t}]`}function Pe(e){return De(e,"Function")}var Oe=e=>void 0!==e,Ne=e=>!Oe(e);function Be(e){return null===e}function Fe(e){return Ne(e)&&Be(e)}function We(e){return Ne(e)||Be(e)}var Ue=e=>null!=e&&null!==e&&De(e,"Object");function je(e){return De(e,"Date")}function $e(e){return De(e,"Number")}function He(e){return De(e,"AsyncFunction")}function qe(e){return De(e,"Promise")&&Ue(e)&&Pe(e.then)&&Pe(e.catch)}function Ge(e){return De(e,"String")}function Xe(e){return!0===e||!1===e||De(e,"Boolean")}function Ve(e){return e&&Array.isArray(e)}var Ke=()=>"undefined"!=typeof window,Ze=e=>"undefined"!=typeof window&&De(e,"Window"),Ye=e=>Ie.call(e).startsWith("[object HTML")&&!!e.tagName,Je="undefined"==typeof window;function Qe(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function et(e){return null==e||(Ge(e)||Ve(e)?0===e.length:!!Ue(e)&&"{}"===JSON.stringify(e))}function tt(e){return De(e,"Error")}function nt(e){return De(e,"WeakSet")}function rt(e){return De(e,"WeakMap")}function it(e){return De(e,"Symbol")}function ot(e){return De(e,"Map")}var st=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);function at(e){return/^\s*[{[]/.test(String(e))}function lt(e){return e.includes("<kml ")&&e.includes('xmlns="http://www.opengis.net/kml/')}function ct(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}var ut=[],ht=void 0,dt=class e{static addHandler(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}static removeHandler(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]}static windowResizeHandler(t){e.addHandler(window,"resize",t)}static offWindowResizeHandler(t){e.removeHandler(window,"resize",t)}static fullscreenEnabled(){const e=globalThis.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const e=globalThis.document;let t=globalThis.document.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitCancelFullScreen;if(void 0!==t&&t)t.call(globalThis.document);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}else{let t=e;t||(t=globalThis.document.documentElement);let n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(void 0!==n&&n)n.call(t);else if(void 0!==window.ActiveXObject){let e=new window.ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}}}static requestFullScreen(e=globalThis.document.documentElement){let t=e||globalThis.document.documentElement;var n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new window.ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}}static exitFullScreen(){const e=globalThis.document;var t=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(t)t.call(document);else if(void 0!==window.ActiveXObject){var n=new window.ActiveXObject("WScript.Shell");null!==n&&n.SendKeys("{F11}")}}static fullScreenElement(){return globalThis.document.fullscreenElement||globalThis.document.webkitFullscreenElement||globalThis.document.mozFullscreenElement||globalThis.document.msFullscreenElement}static isFullScreen(){return!!e.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in globalThis.document?n="fullscreenchange":"onwebkitfullscreenchange"in globalThis.document?n="webkitfullscreenchange":"onmozfullscreenchange"in globalThis.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,(function(){t(e.isFullScreen())})):document.addEventListener("MSFullscreenChange",(function(){t(e.isFullScreen())}))}static stringifyCircularHandler(e,t){if("object"==typeof t&&null!==t){if(-1!==ut.indexOf(t))return;ut.push(t)}return t}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,e.stringifyCircularHandler);return ut.length=0,n}static jsonParse(t){const n=e.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(e){let t;const n=window;return null!=n.createObjcectURL?t=n.createOjcectURL(e):null!=globalThis.URL?t=globalThis.URL.createObjectURL(e):null!=globalThis.webkitURL&&(t=globalThis.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=new Re.default.ArrayBuffer,s=new FileReader;s.onload=function(e){o.append(e.target?.result),t({isOK:!0,data:o.end(!1)})},s.onerror=function(){const e="计算文件简单摘要错误!";console.warn(e),t({isOK:!1,data:e})},function(){const e=2097152>=i.size?i.size:2097152;s.readAsArrayBuffer(r.call(i,0,e))}()}static getFileMD5(e,t){const n=File.prototype,r=n.slice||n.mozSlice||n.webkitSlice,i=e,o=2097152,s=Math.ceil(i.size/o);let a=0;const l=new Re.default.ArrayBuffer,c=new FileReader;function u(){const e=a*o,t=e+o>=i.size?i.size:e+o;c.readAsArrayBuffer(r.call(i,e,t))}c.onload=function(e){l.append(e.target?.result),a++,a<s?u():t({isOK:!0,data:l.end(!1)})},c.onerror=function(){const e=`${i.name}:计算文件简单摘要错误!`;console.warn(e),t({isOK:!1,data:e})},u()}static MD5(e,t=!1){return Re.default.hash(e,t)}static copyTextByCommand(e){return new Promise(((t,n)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),t(!0)}))}static copyText=t=>navigator.clipboard?navigator.clipboard.writeText(t).then((function(){return!0}),(function(e){return!1})):e.copyTextByCommand(t);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const n=globalThis.getSelection();n.rangeCount>0&&n.removeAllRanges(),n.addRange(t);try{return document.execCommand("copy"),n.removeRange(t),!0}catch(e){return n.removeRange(t),console.error("Command复制文本错误",e),!1}}static copyElementText(t){if(!navigator.clipboard)return e.copyElementTextByCommand(t);const n=document.createRange();n.selectNode(document.getElementById(t));const r=globalThis.getSelection();return r.rangeCount>0&&r.removeAllRanges(),r.addRange(n),navigator.clipboard.writeText(r).then((function(){return r.removeRange(n),!0}),(function(e){return r.removeRange(n),console.error("Clipboard复制文本错误",e),!1}))}static setGrayMode(t){e.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(e,t,n){const r=n||document.body;let{className:i}=r;i=i.replace(t,""),r.className=e?`${i} ${t} `:i}static setCssVar(e,t,n=document.documentElement){n.style.setProperty(e,t)}static dispatchWindowResize(){const e=new Event("resize");globalThis.dispatchEvent(e)}static dispatchElementEvent(e,t="click",n){let r;if(r=Ge(e)?document.getElementById(e):e,r){const e=new Event(t,{bubbles:!0,cancelable:!0});n&&r.addEventListener("ev",(e=>{n(e)}),!1),r.dispatchEvent(e)}}static getRandomNum(e,t){var n=t-e;return e+Math.round(Math.random()*n)}static merge(e={},t={}){let n,r,i,o;for(e||(e={}),r=0,i=t.length;r<i;r++)for(n in o=t[r],o)e[n]=o[n];return e}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let n in t)e.options[n]=t[n];return e.options}static formatNum(e,t){let n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static splitWords(e){return this.trim(e).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(e,t){let n=null;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}}static throttle(e,t){let n=0;return(...r)=>{const i=Date.now();i-n>=t&&(e.apply(this,r),n=i)}}static dataURLtoBlob(e){let t=e.split(",");if(!t||0===t.length)return;let n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}static getElement(e){return"string"==typeof e?document.getElementById(e):e}static getStyle(e,t){let n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){let r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}static create(e,t,n){let r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}static removeElement(e){let t=e.parentNode;t&&t.removeChild(e)}static emptyElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(void 0!==e.classList)return e.classList.contains(t);let n=this.getClass(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}static addClass(e,t){if(void 0!==e.classList){let n=this.splitWords(t);for(let t=0,r=n.length;t<r;t++)e.classList.add(n[t])}else if(!this.hasClass(e,t)){let n=this.getClass(e);this.setClass(e,(n?n+" ":"")+t)}}static removeClass(e,t){void 0!==e.classList?e.classList.remove(t):this.setClass(e,this.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}static createSvgElement(e,t,n,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",e),i.setAttribute("height",t),i.setAttribute("viewBox",`0 0 ${e} ${t}`);let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",n),i.appendChild(o),r&&r.appendChild(i),i}static parseDom(e,t=!0,n=""){t=t??!1;let r=document.createElement("div");return r.className=n||"",r.innerHTML=e,t?r:r.childNodes}static createVideoHTML(e,t,n){let r=this.create("video",t,n),i=this.create("source","",r);i.setAttribute("src",e),i.setAttribute("type","video/map4");let o=this.create("source","",r);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),r}static readFilePromise(e,t="ArrayBuffer",n="UTF-8"){return new Promise(((r,i)=>{const o=new FileReader;switch(t){case"ArrayBuffer":o.readAsArrayBuffer(e);break;case"Text":o.readAsText(e,n);break;case"BinaryString":o.readAsBinaryString(e);break;case"DataURL":case"FileBytes":o.readAsDataURL(e)}o.onload=function(){if(o.result)if("FileBytes"===t){const e=o.result,t=e.indexOf("64,");r(e.substring(t+3))}else r(o.result);else i(o)},o.onerror=function(){i(o)}}))}static readFileBytes(e){return this.readFilePromise(e,"FileBytes")}static promisify(e,...t){return function(){return new Promise(((n,r)=>{t.push((function(e,t){e?r(e):n(t)})),e.apply(this,t)}))}}static wait(e){return new Promise((t=>setTimeout(t,e)))}static blockEvent(e){e.preventDefault(),e.stopPropagation()}static bindDropFileHanlder(t,n){if(!t)throw Error("传入Element对象不能为空!");let r;if(Ge(t)){let e=document.getElementById(t);if(e)r=e;else{const n=document.getElementsByClassName(t);if(!n||0==n.length)throw Error("未找到对应id或类名的HtmlElement对象!");e=n[0],r=e}}else{if(!Ye(t))throw Error("ele参数只能为string 或 Element对象!");r=t}r&&(r.addEventListener("dragenter",this.blockEvent,!1),r.addEventListener("dragover",this.blockEvent,!1),r.addEventListener("drop",(function(t){e.blockEvent(t),n(t.dataTransfer.files)}),!1))}static getInputElement(){var e=document.activeElement;return!e||"INPUT"!=e.tagName&&"TEXTAREA"!=e.tagName&&"true"!=e.contentEditable?null:e}static guessPasteTextToFileName(e,t){let n,r=t;return Ge(e)?r=(at(e)?"json":lt(e)&&"kml")||"text":(Ue(e)&&e.type||Ve(e))&&(r="json"),"text"==r?n="pasted.txt":"kml"==r?n="pasted.kml":"json"==r&&(n="pasted.json"),n}static pasteEventHanlder(e,t){const n=this;if(n.getInputElement())return;n.blockEvent(e);const r=e.clipboardData,i=Array.from(r.types||[]).join(","),o=Array.from(r.items||[]);let s;if(i.includes("text/plain")){const e=r.getData("text/plain");if(":"===e[1])return t(e);if(st(e))return t(e);const i=n.guessPasteTextToFileName(e);if(!i||"pasted.txt"===i)return t(e);{const t=new Blob([e]);s=[new File([t],i)]}}else s=o.map((function(e){return"file"==e.kind?e.getAsFile():null}));s=s.filter(Boolean),s.length?t(s):t(void 0)}static onPasteHandler(t,n=document){const r=this;ht=e=>{r.pasteEventHanlder(e,t)},e.addHandler(n,"paste",ht)}static offPasteHandler(t=document){ht&&e.removeHandler(t,"paste",ht)}static loadScript(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,document.head.appendChild(t)}static loadJsCode(e){var t=document.createElement("script");t.type="text/javascript";try{t.appendChild(document.createTextNode(e))}catch(n){t.text=e}document.body.appendChild(t)}static deepCopy(e){return structuredClone(e)}static deepClone=this.deepCopy;static deepClone2(e,t=new WeakMap){if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};t.set(e,n);for(let r in e)n[r]=this.deepClone2(e[r],t);return n}},ft=new Map,pt=function(e,t,n){ve.Config?.ServiceURL&&ve.Config?.ServiceURL.DefaultHproseAPI&&(ve.Config.DefaultHproseAPI=ve.Config?.ServiceURL.DefaultHproseAPI,ve.DefaultProxyClient=new Le(ve.Config?.ServiceURL.DefaultHproseAPI));const r=ve.Config.UI.GrayMode;r&&dt.setGrayMode(r);const i=new ue(e,ve.EventBus);ve.Message=i,ve.SystemID=t,ve.SystemGroup=n,ve.EventBus.on(ce.HproseServiceErrorEvent,(e=>{const t=`当前后台业务服务不可用!${e}`;console.warn("Hprose请求错误",t)})),ve.EventBus.on(ce.WebAPIErrorEvent,(e=>{const t=`WebAPI后台服务不可用!${e}`;console.warn("WebAPI请求错误",t)})),ve.EventBus.on(ce.AxiosRequestErrorEvent,(e=>{const t=`Http请求'${e.code}'错误: ${e.message}`;console.warn("Http请求错误",t)})),ve.EventBus.on(ce.CommonWarnEvent,(e=>{i.warn(e)}))};function gt(e){if(e&&Se.isNotEmpty(e)){if(ft.has(e))return ft.get(e);{const t=new Le(e);return ft.set(e,t),t}}}function mt(e){const t=gt(e);return t&&(ve.DefaultProxyClient=t),t}var vt=class{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfigDiction=new Map;_LayoutID;_mapItemRefs;constructor(e,t,n,r){if(this.layoutState=e,this._LayoutID=t,this._mapItemRefs=r,ve.RightWidgetConfigMap){const e=ve.RightWidgetConfigMap.get(t);e&&e.forEach((e=>{if(this.widgetConfigDiction.set(e.id,e),e.afterid)if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}else{const e=ve.WidgetConfigList??n;e&&e.forEach((e=>{if(e.layoutID===t&&(this.widgetConfigDiction.set(e.id,e),e.afterid))if(this.preConditionMap.has(e.afterid))this.preConditionMap.get(e.afterid)?.add(e);else{const t=new Set;t.add(e),this.preConditionMap.set(e.afterid,t)}}))}}getLayoutID(){return this._LayoutID}getWidgetConfigMap(){return this.widgetConfigDiction}preloadWidgets(){if(this.widgetConfigDiction.size>0)for(const[e,t]of this.widgetConfigDiction)t.preload&&!t.afterid&&this._loadWidget(t)}async loadWidget(e){if(!e)return;let t;if(Ue(e)?t=e:Ge(e)&&(t=this.widgetConfigDiction.get(e)),t){if(t.afterid){if(this.isWidgetLoaded(t.afterid))return this._loadWidget(t);{const n=this,r=t.afterid,i=t;function o(e){e.layoutID===n._LayoutID&&e.widgetID===r&&(n._loadWidget(i),ve.EventBus.off(ce.WidgetLoadedEvent,o))}return ve.EventBus.on(ce.WidgetLoadedEvent,o),this.loadWidget(t.afterid)}}return this._loadWidget(t)}}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach((e=>{e.preload&&this._loadWidget(e)}))}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component?e.component().then((t=>{if(t.default){const n=p(t.default);n.id=e.id,e.layout&&(n.style=e.layout),e.cssClass&&(n.cssClass=e.cssClass),e.layoutID&&(n.layoutID=e.layoutID),e.label&&(n.label=e.label),e.jsURL&&(n.jsURL=e.jsURL),e.cssURL&&(n.cssURL=e.cssURL),n.componentProps=e.componentProps??{},n.componentProps.id||(n.componentProps.id=e.id),this.getContainerComponents(e.container).value.set(e.id,n),this.widgetsLoadedSet.add(e.id),m().then((()=>{ve.EventBus.emit(ce.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)}))}})).catch((t=>{ve.Logger().error("加载Widget失败!",e,t),ve.EventBus.emit(ce.WidgetLoadedErrorEvent,e)})):void 0;this.changeWidgetVisible(e.id,!0)}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const e of n)if(this.isWidgetLoaded(e.id)){t=!0;break}}return t}unloadWidget(e){if(!e)return;if(!this.isWidgetLoaded(e))return;const t=this.getWigetItem(e);if(t){if(this.preConditionMap.has(e)){const t=this.preConditionMap.get(e);if(t)for(const e of t)this.unloadWidget(e.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&(this.changeWidgetVisible(e,!1),this._mapItemRefs.delete(e)),ve.EventBus.emit(ce.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer.value,n=this.layoutState.centerBackContainer.value;e?(t&&(t.style.left="0",t.style.width="100%"),n&&(n.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),n&&(n.style.width="50%"))}getLayoutContainer(e){switch(e){case me.top:return this.layoutState.topContainer.value;case me.bottom:return this.layoutState.bottomContainer.value;case me.left:return this.layoutState.leftContainer.value;case me.right:return this.layoutState.rightContainer.value;case me.centerBack:return this.layoutState.centerBackContainer.value;case me.centerMain:return this.layoutState.centerMainContainer.value;case me.centerFront:return this.layoutState.centerFrontContainer.value}}changeContainerVisible(e,t=!1){const n=this.getLayoutContainer(e);n&&(n.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const n=this.getWidgetComponent(e);n&&n.changeVisible&&n.changeVisible(t)}isWidgetVisible(e){const t=this.getWidgetComponent(e);return!!t&&(!t.isShow||t.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfigDiction.get(e)}getIWigetConfig(e){return this.getWigetItem(e)}getGroupWigetItems(e){const t=[];for(const[n,r]of this.widgetConfigDiction)r.group===e&&t.push(r);return t}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=E(new Map);return this.layoutMap.set(e,t),t}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach((t=>{e.push(t)})),e}unloadAllWidgets(e){const t=[];this.widgetsLoadedSet.forEach((n=>{e&&e.length>0?e.findIndex((e=>e===n))<0&&t.push(n):t.push(n)})),t.forEach((e=>this.unloadWidget(e)))}unloadWidgets(e){e&&e.length>0&&e.forEach((e=>{this.unloadWidget(e)}))}static getLayoutManager(e,t){if(t){const n=t.find((t=>t.id===e));if(n&&n.layoutID)return ve.LayoutMap.get(n.layoutID)}}dispose(){this.unloadAllWidgets(),this.widgetConfigDiction.clear(),this.widgetsLoadedSet.clear(),this._LayoutID?ve.LayoutMap.delete(this._LayoutID):(ve.LayoutMap.delete(""),ve.LayoutManager=void 0)}},yt=["id"],wt=ye(d({__name:"layout",props:{widgetConfig:{type:Array,required:!1,default:void 0},layoutID:{type:String,default:"layoutDefault"},layoutStyle:{type:Object},noLeft:{type:Boolean,default:!1},noRight:{type:Boolean,default:!1},noBottom:{type:Boolean,default:!1},noTop:{type:Boolean,default:!1},noFront:{type:Boolean,default:!1},noBack:{type:Boolean,default:!1},noMain:{type:Boolean,default:!1}},emits:["containerLoaded"],setup(t,{emit:n}){const r=t,i=n,u=r.layoutID,d=E(u),f=E(),p=E(),m=E(),w=E(),z=E(),A=E(),L=E(),_=x({top:!r.noTop,main:!r.noMain,back:!r.noBack,front:!r.noFront,left:!r.noLeft,right:!r.noRight,bottom:!r.noBottom});I((()=>r.noTop),(e=>{_.top=!e})),I((()=>r.noMain),(e=>{_.main=!e})),I((()=>r.noBack),(e=>{_.back=!e})),I((()=>r.noFront),(e=>{_.front=!e})),I((()=>r.noLeft),(e=>{_.left=!e})),I((()=>r.noRight),(e=>{_.right=!e})),I((()=>r.noBottom),(e=>{_.bottom=!e}));const R=new Map,D=(e,t)=>{e&&R.set(t,e)},P=new vt({topContainer:f,centerBackContainer:p,centerMainContainer:m,centerFrontContainer:w,bottomContainer:z,leftContainer:A,rightContainer:L},u,r.widgetConfig,R);function O(e){return P?.getContainerComponents(e).value}const N=void 0,B=o((()=>_.top?O(me.top):N)),F=o((()=>_.back?O(me.centerBack):N)),W=o((()=>_.front?O(me.centerFront):N)),U=o((()=>_.left?O(me.left):N)),j=o((()=>_.right?O(me.right):N)),$=o((()=>_.bottom?O(me.bottom):N)),H=o((()=>r.layoutStyle));return b((()=>{P&&(u?ve.LayoutMap.set(u,P):(ve.LayoutManager=P,ve.LayoutMap.set("",P)),i("containerLoaded",{layoutID:u,layoutManager:P}),ve.EventBus.emit(ce.LayoutContainerLoaded,{layoutID:u,layoutManager:P}),P.preloadWidgets())})),S((()=>{P&&P.dispose()})),(t,n)=>(C(),l("div",{id:d.value,class:"layoutContainer",style:y(H.value)},[_.top?(C(),l("div",{key:0,ref_key:"topContainer",ref:f,class:"topContainer"},[M(t.$slots,"top",{},void 0,!0),(C(!0),l(e,null,k(B.value,(([e,t])=>(C(),s(T(t),{ref_for:!0,ref:t=>D(t,e),key:e,style:y(t.style),class:v(t.cssClass)},null,8,["style","class"])))),128))],512)):a("",!0),c("div",null,[_.main?(C(),l("div",{key:0,ref_key:"centerMainContainer",ref:m,class:"centerdiv mainContainer"},[M(t.$slots,"main",{},(()=>[h(be)]),!0)],512)):a("",!0),_.back?(C(),l("div",{key:1,ref_key:"centerBackContainer",ref:p,class:"centerdiv backContainer"},[M(t.$slots,"back",{},void 0,!0),(C(!0),l(e,null,k(F.value,(([e,t])=>(C(),s(T(t),g({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):a("",!0),_.front?(C(),l("div",{key:2,ref_key:"centerFrontContainer",ref:w,class:"centerdiv centerFrontContainer"},[M(t.$slots,"front",{},void 0,!0),(C(!0),l(e,null,k(W.value,(([e,t])=>(C(),s(T(t),g({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):a("",!0),_.left?(C(),l("div",{key:3,ref_key:"leftContainer",ref:A,class:"leftContainer"},[M(t.$slots,"left",{},void 0,!0),(C(!0),l(e,null,k(U.value,(([e,t])=>(C(),s(T(t),g({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):a("",!0),_.right?(C(),l("div",{key:4,ref_key:"rightContainer",ref:L,class:"rightContainer"},[M(t.$slots,"right",{},void 0,!0),(C(!0),l(e,null,k(j.value,(([e,t])=>(C(),s(T(t),g({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):a("",!0)]),_.bottom?(C(),l("div",{key:1,ref_key:"bottomContainer",ref:z,class:"bottomContainer"},[M(t.$slots,"bottom",{},void 0,!0),(C(!0),l(e,null,k($.value,(([e,t])=>(C(),s(T(t),g({ref_for:!0,ref:t=>D(t,e),key:e,style:t.style,class:t.cssClass},{ref_for:!0},t.componentProps),null,16,["style","class"])))),128))],512)):a("",!0),M(t.$slots,"default",{},void 0,!0)],12,yt))}}),[["__scopeId","data-v-fcfa8ef0"]]),bt=d({name:"RouterTransition",__name:"RouterTransitionAnimate",props:{enterActive:{default:"animated fadeIn"},leaveActive:{default:"animated fadeOut"}},setup:e=>(n,r)=>{const o=z("router-view");return C(),s(we,null,{default:D((()=>[h(o,null,{default:D((({Component:n,route:r})=>[h(i,{appear:"","enter-active-class":e.enterActive,"leave-active-class":e.leaveActive},{default:D((()=>[(C(),s(t,null,[r.meta.keepAlive?(C(),s(T(n),{key:r.name})):a("",!0)],1024)),r.meta.keepAlive?a("",!0):(C(),s(T(n),{key:r.name}))])),_:2},1032,["enter-active-class","leave-active-class"])])),_:1})])),_:1})}});function St(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const r=3&Number(e[19])|8;return e[19]=t.substring(r,r+1),e[8]=e[13]=e[18]=e[23]="-",e.join("").toLowerCase()}function Ct(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}var xt={},Et=Uint8Array,kt=Uint16Array,Mt=Int32Array,zt=new Et([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Tt=new Et([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),At=new Et([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Lt=function(e,t){for(var n=new kt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Mt(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return{b:n,r:i}},_t=Lt(zt,2),Rt=_t.b,It=_t.r;Rt[28]=258,It[258]=28;for(var Dt=Lt(Tt,0),Pt=Dt.b,Ot=Dt.r,Nt=new kt(32768),Bt=0;Bt<32768;++Bt){var Ft=(43690&Bt)>>1|(21845&Bt)<<1;Ft=(61680&(Ft=(52428&Ft)>>2|(13107&Ft)<<2))>>4|(3855&Ft)<<4,Nt[Bt]=((65280&Ft)>>8|(255&Ft)<<8)>>1}var Wt=function(e,t,n){for(var r=e.length,i=0,o=new kt(t);i<r;++i)e[i]&&++o[e[i]-1];var s,a=new kt(t);for(i=1;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new kt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=a[e[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)s[Nt[h]>>l]=c}else for(s=new kt(r),i=0;i<r;++i)e[i]&&(s[i]=Nt[a[e[i]-1]++]>>15-e[i]);return s},Ut=new Et(288);for(Bt=0;Bt<144;++Bt)Ut[Bt]=8;for(Bt=144;Bt<256;++Bt)Ut[Bt]=9;for(Bt=256;Bt<280;++Bt)Ut[Bt]=7;for(Bt=280;Bt<288;++Bt)Ut[Bt]=8;var jt=new Et(32);for(Bt=0;Bt<32;++Bt)jt[Bt]=5;var $t=Wt(Ut,9,0),Ht=Wt(Ut,9,1),qt=Wt(jt,5,0),Gt=Wt(jt,5,1),Xt=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Vt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},Kt=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Zt=function(e){return(e+7)/8|0},Yt=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new Et(e.subarray(t,n))},Jt=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Qt=function(e,t,n){var r=new Error(t||Jt[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Qt),!n)throw r;return r},en=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new Et(0);var s=!n,a=s||2!=t.i,l=t.i;s&&(n=new Et(3*i));var c=function(e){var t=n.length;if(e>t){var r=new Et(Math.max(2*t,e));r.set(n),n=r}},u=t.f||0,h=t.p||0,d=t.b||0,f=t.l,p=t.d,g=t.m,m=t.n,v=8*i;do{if(!f){u=Vt(e,h,1);var y=Vt(e,h+1,3);if(h+=3,!y){var w=e[(L=Zt(h)+4)-4]|e[L-3]<<8,b=L+w;if(b>i){l&&Qt(0);break}a&&c(d+w),n.set(e.subarray(L,b),d),t.b=d+=w,t.p=h=8*b,t.f=u;continue}if(1==y)f=Ht,p=Gt,g=9,m=5;else if(2==y){var S=Vt(e,h,31)+257,C=Vt(e,h+10,15)+4,x=S+Vt(e,h+5,31)+1;h+=14;for(var E=new Et(x),k=new Et(19),M=0;M<C;++M)k[At[M]]=Vt(e,h+3*M,7);h+=3*C;var z=Xt(k),T=(1<<z)-1,A=Wt(k,z,1);for(M=0;M<x;){var L,_=A[Vt(e,h,T)];if(h+=15&_,(L=_>>4)<16)E[M++]=L;else{var R=0,I=0;for(16==L?(I=3+Vt(e,h,3),h+=2,R=E[M-1]):17==L?(I=3+Vt(e,h,7),h+=3):18==L&&(I=11+Vt(e,h,127),h+=7);I--;)E[M++]=R}}var D=E.subarray(0,S),P=E.subarray(S);g=Xt(D),m=Xt(P),f=Wt(D,g,1),p=Wt(P,m,1)}else Qt(1);if(h>v){l&&Qt(0);break}}a&&c(d+131072);for(var O=(1<<g)-1,N=(1<<m)-1,B=h;;B=h){var F=(R=f[Kt(e,h)&O])>>4;if((h+=15&R)>v){l&&Qt(0);break}if(R||Qt(2),F<256)n[d++]=F;else{if(256==F){B=h,f=null;break}var W=F-254;if(F>264){var U=zt[M=F-257];W=Vt(e,h,(1<<U)-1)+Rt[M],h+=U}var j=p[Kt(e,h)&N],$=j>>4;if(j||Qt(3),h+=15&j,P=Pt[$],$>3&&(U=Tt[$],P+=Kt(e,h)&(1<<U)-1,h+=U),h>v){l&&Qt(0);break}a&&c(d+131072);var H=d+W;if(d<P){var q=o-P,G=Math.min(P,H);for(q+d<0&&Qt(3);d<G;++d)n[d]=r[q+d]}for(;d<H;++d)n[d]=n[d-P]}}t.l=f,t.p=B,t.b=d,t.f=u,f&&(u=1,t.m=g,t.d=p,t.n=m)}while(!u);return d!=n.length&&s?Yt(n,0,d):n.subarray(0,d)},tn=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},nn=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},rn=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return{t:hn,l:0};if(1==i){var s=new Et(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,u=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=i-1;)a=n[n[c].f<n[h].f?c++:h++],l=n[c!=u&&n[c].f<n[h].f?c++:h++],n[u++]={s:-1,f:a.f+l.f,l:a,r:l};var d=o[0].s;for(r=1;r<i;++r)o[r].s>d&&(d=o[r].s);var f=new kt(d+1),p=on(n[u-1],f,0);if(p>t){r=0;var g=0,m=p-t,v=1<<m;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(f[y]>t))break;g+=v-(1<<p-f[y]),f[y]=t}for(g>>=m;g>0;){var w=o[r].s;f[w]<t?g-=1<<t-f[w]++-1:++r}for(;r>=0&&g;--r){var b=o[r].s;f[b]==t&&(--f[b],++g)}p=t}return{t:new Et(f),l:p}},on=function(e,t,n){return-1==e.s?Math.max(on(e.l,t,n+1),on(e.r,t,n+1)):t[e.s]=n},sn=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new kt(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return{c:n.subarray(0,r),n:t}},an=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},ln=function(e,t,n){var r=n.length,i=Zt(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},cn=function(e,t,n,r,i,o,s,a,l,c,u){tn(t,u++,n),++i[256];for(var h=rn(i,15),d=h.t,f=h.l,p=rn(o,15),g=p.t,m=p.l,v=sn(d),y=v.c,w=v.n,b=sn(g),S=b.c,C=b.n,x=new kt(19),E=0;E<y.length;++E)++x[31&y[E]];for(E=0;E<S.length;++E)++x[31&S[E]];for(var k=rn(x,7),M=k.t,z=k.l,T=19;T>4&&!M[At[T-1]];--T);var A,L,_,R,I=c+5<<3,D=an(i,Ut)+an(o,jt)+s,P=an(i,d)+an(o,g)+s+14+3*T+an(x,M)+2*x[16]+3*x[17]+7*x[18];if(l>=0&&I<=D&&I<=P)return ln(t,u,e.subarray(l,l+c));if(tn(t,u,1+(P<D)),u+=2,P<D){A=Wt(d,f,0),L=d,_=Wt(g,m,0),R=g;var O=Wt(M,z,0);for(tn(t,u,w-257),tn(t,u+5,C-1),tn(t,u+10,T-4),u+=14,E=0;E<T;++E)tn(t,u+3*E,M[At[E]]);u+=3*T;for(var N=[y,S],B=0;B<2;++B){var F=N[B];for(E=0;E<F.length;++E){var W=31&F[E];tn(t,u,O[W]),u+=M[W],W>15&&(tn(t,u,F[E]>>5&127),u+=F[E]>>12)}}}else A=$t,L=Ut,_=qt,R=jt;for(E=0;E<a;++E){var U=r[E];if(U>255){nn(t,u,A[257+(W=U>>18&31)]),u+=L[W+257],W>7&&(tn(t,u,U>>23&31),u+=zt[W]);var j=31&U;nn(t,u,_[j]),u+=R[j],j>3&&(nn(t,u,U>>5&8191),u+=Tt[j])}else nn(t,u,A[U]),u+=L[U]}return nn(t,u,A[256]),u+L[256]},un=new Mt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),hn=new Et(0),dn=function(e,t,n,r,i,o){var s=o.z||e.length,a=new Et(r+s+5*(1+Math.ceil(s/7e3))+i),l=a.subarray(r,a.length-i),c=o.l,u=7&(o.r||0);if(t){u&&(l[0]=o.r>>3);for(var h=un[t-1],d=h>>13,f=8191&h,p=(1<<n)-1,g=o.p||new kt(32768),m=o.h||new kt(p+1),v=Math.ceil(n/3),y=2*v,w=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&p},b=new Mt(25e3),S=new kt(288),C=new kt(32),x=0,E=0,k=o.i||0,M=0,z=o.w||0,T=0;k+2<s;++k){var A=w(k),L=32767&k,_=m[A];if(g[L]=_,m[A]=L,z<=k){var R=s-k;if((x>7e3||M>24576)&&(R>423||!c)){u=cn(e,l,0,b,S,C,E,M,T,k-T,u),M=x=E=0,T=k;for(var I=0;I<286;++I)S[I]=0;for(I=0;I<30;++I)C[I]=0}var D=2,P=0,O=f,N=L-_&32767;if(R>2&&A==w(k-N))for(var B=Math.min(d,R)-1,F=Math.min(32767,k),W=Math.min(258,R);N<=F&&--O&&L!=_;){if(e[k+D]==e[k+D-N]){for(var U=0;U<W&&e[k+U]==e[k+U-N];++U);if(U>D){if(D=U,P=N,U>B)break;var j=Math.min(N,U-2),$=0;for(I=0;I<j;++I){var H=k-N+I&32767,q=H-g[H]&32767;q>$&&($=q,_=H)}}}N+=(L=_)-(_=g[L])&32767}if(P){b[M++]=268435456|It[D]<<18|Ot[P];var G=31&It[D],X=31&Ot[P];E+=zt[G]+Tt[X],++S[257+G],++C[X],z=k+D,++x}else b[M++]=e[k],++S[e[k]]}}for(k=Math.max(k,z);k<s;++k)b[M++]=e[k],++S[e[k]];u=cn(e,l,c,b,S,C,E,M,T,k-T,u),c||(o.r=7&u|l[u/8|0]<<3,u-=7,o.h=m,o.p=g,o.i=k,o.w=z)}else{for(k=o.w||0;k<s+c;k+=65535){var V=k+65535;V>=s&&(l[u/8|0]=c,V=s),u=ln(l,u+1,e.subarray(k,V))}o.i=s}return Yt(a,0,r+Zt(u)+i)},fn=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),pn=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=fn[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},gn=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),s=new Et(o.length+e.length);s.set(o),s.set(e,o.length),e=s,i.w=o.length}return dn(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,i)},mn=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},vn=function(e,t,n){for(var r=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<r.length;++s){var a=r[s],l=o[s];if("function"==typeof a){t+=";"+l+"=";var c=a.toString();if(a.prototype)if(-1!=c.indexOf("[native code]")){var u=c.indexOf(" ",8)+1;t+=c.slice(u,c.indexOf("(",u))}else for(var h in t+=c,a.prototype)t+=";"+l+".prototype."+h+"="+a.prototype[h].toString();else t+=c}else n[l]=a}return t},yn=[],wn=function(){return[Et,kt,Mt,zt,Tt,At,Rt,Pt,Ht,Gt,Nt,Jt,Wt,Xt,Vt,Kt,Zt,Yt,Qt,en,Pn,xn,En]},bn=function(){return[Et,kt,Mt,zt,Tt,At,It,Ot,$t,Ut,qt,jt,Nt,un,hn,Wt,tn,nn,rn,on,sn,an,ln,cn,Zt,Yt,dn,gn,Dn,xn]},Sn=function(){return[Ln,In,An,pn,fn]},Cn=function(){return[_n,Rn]},xn=function(e){return postMessage(e,[e.buffer])},En=function(e){return e&&{out:e.size&&new Et(e.size),dictionary:e.dictionary}},kn=function(e,t,n,r,i,o){var s=function(e,t,n,r){if(!yn[n]){for(var i="",o={},s=e.length-1,a=0;a<s;++a)i=vn(e[a],i,o);yn[n]={c:vn(e[s],i,o),e:o}}var l=mn({},yn[n].e);return function(e,t,n,r,i){var o=new Worker(xt[t]||(xt[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},o.postMessage(n,r),o}(yn[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,l,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(l),r)}(n,r,i,(function(e,t){s.terminate(),o(e,t)}));return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},Mn=function(e,t){return e[t]|e[t+1]<<8},zn=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Tn=function(e,t){return zn(e,t)+4294967296*zn(e,t+4)},An=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},Ln=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&An(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},_n=function(e){31==e[0]&&139==e[1]&&8==e[2]||Qt(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},Rn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},In=function(e){return 10+(e.filename?e.filename.length+1:0)};function Dn(e,t){return gn(e,t||{},0,0)}function Pn(e,t){return en(e,{i:2},t&&t.out,t&&t.dictionary)}function On(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Qt(7),kn(e,t,[bn,Sn,function(){return[Nn]}],(function(e){return xn(Nn(e.data[0],e.data[1]))}),2,n)}function Nn(e,t){t||(t={});var n=pn(),r=e.length;n.p(e);var i=gn(e,t,In(t),8),o=i.length;return Ln(i,t),An(i,o-8,n.d()),An(i,o-4,r),i}function Bn(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Qt(7),kn(e,t,[wn,Cn,function(){return[Fn]}],(function(e){return xn(Fn(e.data[0],e.data[1]))}),3,n)}function Fn(e,t){var n=_n(e);return n+8>e.length&&Qt(6,"invalid gzip data"),en(e.subarray(n,-8),{i:2},t&&t.out||new Et(Rn(e)),t&&t.dictionary)}var Wn=function(e,t,n,r){for(var i in e){var o=e[i],s=t+i,a=r;Array.isArray(o)&&(a=mn(r,o[1]),o=o[0]),o instanceof Et?n[s]=[o,a]:(n[s+="/"]=[new Et(0),a],Wn(o,s,n,r))}},Un="undefined"!=typeof TextEncoder&&new TextEncoder,jn="undefined"!=typeof TextDecoder&&new TextDecoder;try{jn.decode(hn,{stream:!0})}catch(e){}function $n(e,t){if(t){for(var n=new Et(e.length),r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}if(Un)return Un.encode(e);var i=e.length,o=new Et(e.length+(e.length>>1)),s=0,a=function(e){o[s++]=e};for(r=0;r<i;++r){if(s+5>o.length){var l=new Et(s+8+(i-r<<1));l.set(o),o=l}var c=e.charCodeAt(r);c<128||t?a(c):c<2048?(a(192|c>>6),a(128|63&c)):c>55295&&c<57344?(a(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++r))>>18),a(128|c>>12&63),a(128|c>>6&63),a(128|63&c)):(a(224|c>>12),a(128|c>>6&63),a(128|63&c))}return Yt(o,0,s)}function Hn(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(jn)return jn.decode(e);var i=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Yt(e,n-1)};i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}}(e),o=i.s;return(n=i.r).length&&Qt(8),o}var qn=function(e,t){return t+30+Mn(e,t+26)+Mn(e,t+28)},Gn=function(e,t,n){var r=Mn(e,t+28),i=Hn(e.subarray(t+46,t+46+r),!(2048&Mn(e,t+8))),o=t+46+r,s=zn(e,t+20),a=n&&4294967295==s?Xn(e,o):[s,zn(e,t+24),zn(e,t+42)],l=a[0],c=a[1],u=a[2];return[Mn(e,t+10),l,c,i,o+Mn(e,t+30)+Mn(e,t+32),u]},Xn=function(e,t){for(;1!=Mn(e,t);t+=4+Mn(e,t+2));return[Tn(e,t+12),Tn(e,t+4),Tn(e,t+20)]},Vn=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&Qt(9),t+=r+4}return t},Kn=function(e,t,n,r,i,o,s,a){var l=r.length,c=n.extra,u=a&&a.length,h=Vn(c);An(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),f=d.getFullYear()-1980;if((f<0||f>119)&&Qt(10),An(e,t,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,-1!=o&&(An(e,t,n.crc),An(e,t+4,o<0?-o-2:o),An(e,t+8,n.size)),An(e,t+12,l),An(e,t+14,h),t+=16,null!=s&&(An(e,t,u),An(e,t+6,n.attrs),An(e,t+10,s),t+=14),e.set(r,t),t+=l,h)for(var p in c){var g=c[p],m=g.length;An(e,t,+p),An(e,t+2,m),e.set(g,t+4),t+=4+m}return u&&(e.set(a,t),t+=u),t},Zn=function(e,t,n,r,i){An(e,t,101010256),An(e,t+8,n),An(e,t+10,n),An(e,t+12,r),An(e,t+16,i)};var Yn="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};function Jn(e){var t={filename:"",directory:"",basename:"",extension:""},n=function(e){return-1==e.indexOf("/")&&-1!=e.indexOf("\\")?"\\":"/"}(e),r=e.split(n),i=r.pop(),o=/\.([a-z][a-z0-9]*)$/i,s=o.test(i)?o.exec(i)[0]:"";return s||i.includes("*")?(t.filename=i,t.extension=s?s.slice(1):"",t.basename=i.slice(0,i.length-s.length),t.directory=r.join(n)):t.directory=i?e:r.join(n),t}function Qn(e){return Jn(e).basename}function er(e){return Jn(e).extension}function tr(e){var t=Jn(e);return t.extension?e.slice(0,e.length-t.extension.length-1):e}function nr(e,t){var n=tr(e);return t?n+"."+t:n}function rr(e){var t=er(e);return t?tr(e)+"."+t.toLowerCase():e}function ir(e){return e.reduce((function(e,t,n){return 0===n?Qn(t):or(e,t)}),"")}function or(e,t){var n;return e&&t&&(n=sr(e,t).replace(/[-_]$/,"")),n||""}function sr(e,t){for(var n=0,r=e.length;n<r&&e[n]===t[n];n++);return e.substring(0,n)}var ar=(e,t)=>{lr(e,t)};function lr(e,t){const n=globalThis.URL||globalThis.webkitURL||window,r=new Blob([e]),i=n.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),n.revokeObjectURL(i),setTimeout((function(){n.revokeObjectURL(i),document.body.removeChild(o)}),400)}var cr=(e,t)=>{const n=JSON.stringify(e,null,2);t?ar(n,t+".json"):se.emit(ce.CommonWarnEvent,"参数JsonID不能为空!")},ur=(e,t,n)=>{e.get(t,{responseType:"blob"}).then((function(e){ar(e.data,n)})).catch((e=>{console.warn(e),se.emit(ce.CommonWarnEvent,"下载文件报错!")}))};async function hr(e,t,n){var r,i=function(e){var t=er(e).toLowerCase(),n={};return"kml"==t?n["application/vnd.google-earth.kml+xml"]=[".kml"]:"svg"===t?n["image/svg+xml"]=[".svg"]:"zip"===t?n["application/zip"]=[".zip"]:"txt"===t||"csv"===t||"tsv"===t||"tab"===t?n["text/csv"]=[".csv",".tsv",".tab",".txt"]:"json"===t||"geojson"===t||"topojson"===t?n["application/json"]=[".json",".geojson",".topojson"]:n["application/octet-stream"]=["."+t],{suggestedName:e,types:[{description:"Files",accept:n}]}}(e);try{if(globalThis.showSaveFilePicker){r=await globalThis.showSaveFilePicker(i);var o=await r.createWritable();await o.write(t),await o.close()}}catch(e){return void("SecurityError"==e.name?(console.warn(e.message),n(e.message)):"AbortError"==e.name?n():(console.error(e.name,e.message,e),n("Save failed for an unknown reason")))}n()}var dr=class e{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==globalThis.document}static encodeGBK(e){const t=G.encode(e,"ISO-8859-1");return G.decode(t,"gbk")}static async saveZipFromFiles(t,n){const r=[];for(let e=0;e<n.length;e++){const t=n[e],i=t.name,o=await dt.readFilePromise(t,"ArrayBuffer"),s=new Uint8Array(o);r.push({filename:i,content:s})}r.length>0&&e.zipAsync(r,(function(e,n){if(e)throw e;lr(new Blob([n]),t)}))}static saveZipFile(t,n){e.zipAsync(n,(function(e,n){if(e)throw e;lr(new Blob([n]),t)}))}static saveZipFileSync(t,n){const r=e.zipSync(n);return!!r&&(lr(new Blob([r]),t),!0)}static unzipSync(t){let n;if(n=t instanceof ArrayBuffer?new Uint8Array(t):t,!e.runningInBrowser())return;const r=function(e,t){for(var n={},r=e.length-22;101010256!=zn(e,r);--r)(!r||e.length-r>65558)&&Qt(13);var i=Mn(e,r+8);if(!i)return{};var o=zn(e,r+16),s=4294967295==o||65535==i;if(s){var a=zn(e,r-12);(s=101075792==zn(e,a))&&(i=zn(e,a+32),o=zn(e,a+48))}for(var l=t&&t.filter,c=0;c<i;++c){var u=Gn(e,o,s),h=u[0],d=u[1],f=u[2],p=u[3],g=u[4],m=u[5],v=qn(e,m);o=g,l&&!l({name:p,size:d,originalSize:f,compression:h})||(h?8==h?n[p]=Pn(e.subarray(v,v+d),{out:new Et(f)}):Qt(14,"unknown compression type "+h):n[p]=Yt(e,v,v+d))}return n}(n,{filter:e.fflateFilter});return e.fflatePostprocess(r)}static async readZipFromFile(t){const n={content:await dt.readFilePromise(t,"ArrayBuffer"),name:t.name};return e.readZipFile(n)}static async readZipFile(t){const n=await e.unzipAsync.promise(t.content);return Object.keys(n).reduce((function(e,t){return e.push({filename:t,content:n[t]}),e}),[])}static unzipAsync(t,n){if(!e.runningInBrowser())throw new Error("Async unzipping only supported in the browser");let r;r=t instanceof ArrayBuffer?new Uint8Array(t):t,function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Qt(7);var r=[],i=function(){for(var e=0;e<r.length;++e)r[e]()},o={},s=function(e,t){Yn((function(){n(e,t)}))};Yn((function(){s=n}));for(var a=e.length-22;101010256!=zn(e,a);--a)if(!a||e.length-a>65558)return s(Qt(13,0,1),null),i;var l=Mn(e,a+8);if(l){var c=l,u=zn(e,a+16),h=4294967295==u||65535==c;if(h){var d=zn(e,a-12);(h=101075792==zn(e,d))&&(c=l=zn(e,d+32),u=zn(e,d+48))}for(var f=t&&t.filter,p=function(t){var n=Gn(e,u,h),a=n[0],c=n[1],d=n[2],p=n[3],g=n[4],m=n[5],v=qn(e,m);u=g;var y=function(e,t){e?(i(),s(e,null)):(t&&(o[p]=t),--l||s(null,o))};if(!f||f({name:p,size:c,originalSize:d,compression:a}))if(a)if(8==a){var w=e.subarray(v,v+c);if(d<524288||c>.8*d)try{y(null,Pn(w,{out:new Et(d)}))}catch(e){y(e,null)}else r.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Qt(7),kn(e,t,[wn],(function(e){return xn(Pn(e.data[0],En(e.data[1])))}),1,n)}(w,{size:d},y))}else y(Qt(14,"unknown compression type "+a,1),null);else y(null,Yt(e,v,v+c));else y(null,null)},g=0;g<c;++g)p()}else s(null,{})}(r,{filter:e.fflateFilter},(function(t,r){t&&n(t),n(null,e.fflatePostprocess(r))}))}static zipSync(t){if(!e.runningInBrowser())throw new Error("Async zipping only supported in the browser");return function(e,t){t||(t={});var n={},r=[];Wn(e,"",n,t);var i=0,o=0;for(var s in n){var a=n[s],l=a[0],c=a[1],u=0==c.level?0:8,h=(x=$n(s)).length,d=c.comment,f=d&&$n(d),p=f&&f.length,g=Vn(c.extra);h>65535&&Qt(11);var m=u?Dn(l,c):l,v=m.length,y=pn();y.p(l),r.push(mn(c,{size:l.length,crc:y.d(),c:m,f:x,m:f,u:h!=s.length||f&&d.length!=p,o:i,compression:u})),i+=30+h+g+v,o+=76+2*(h+g)+(p||0)+v}for(var w=new Et(o+22),b=i,S=o-i,C=0;C<r.length;++C){var x=r[C];Kn(w,x.o,x,x.f,x.u,x.c.length);var E=30+x.f.length+Vn(x.extra);w.set(x.c,x.o+E),Kn(w,i,x,x.f,x.u,x.c.length,x.o,x.m),i+=16+E+(x.m?x.m.length:0)}return Zn(w,i,r.length,S,b),w}(e.fflatePreprocess(t))}static zipAsync(t,n){!function(e,t,n){n||(n=t,t={}),"function"!=typeof n&&Qt(7);var r={};Wn(e,"",r,t);var i=Object.keys(r),o=i.length,s=0,a=0,l=o,c=new Array(o),u=[],h=function(){for(var e=0;e<u.length;++e)u[e]()},d=function(e,t){Yn((function(){n(e,t)}))};Yn((function(){d=n}));var f=function(){var e=new Et(a+22),t=s,n=a-s;a=0;for(var r=0;r<l;++r){var i=c[r];try{var o=i.c.length;Kn(e,a,i,i.f,i.u,o);var u=30+i.f.length+Vn(i.extra),h=a+u;e.set(i.c,h),Kn(e,s,i,i.f,i.u,o,a,i.m),s+=16+u+(i.m?i.m.length:0),a=h+o}catch(e){return d(e,null)}}Zn(e,s,c.length,n,t),d(null,e)};o||f();for(var p=function(e){var t=i[e],n=r[t],l=n[0],p=n[1],g=pn(),m=l.length;g.p(l);var v=$n(t),y=v.length,w=p.comment,b=w&&$n(w),S=b&&b.length,C=Vn(p.extra),x=0==p.level?0:8,E=function(n,r){if(n)h(),d(n,null);else{var i=r.length;c[e]=mn(p,{size:m,crc:g.d(),c:r,f:v,m:b,u:y!=t.length||b&&w.length!=S,compression:x}),s+=30+y+C+i,a+=76+2*(y+C)+(S||0)+i,--o||f()}};if(y>65535&&E(Qt(11,0,1),null),x)if(m<16e4)try{E(null,Dn(l,p))}catch(e){E(e,null)}else u.push(function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Qt(7),kn(e,t,[bn],(function(e){return xn(Dn(e.data[0],e.data[1]))}),0,n)}(l,p,E));else E(null,l)},g=0;g<l;++g)p(g)}(e.fflatePreprocess(t),{},n)}static fflateFilter(t){return e.isImportableZipPath(t.name)}static fflatePostprocess(t){return Object.keys(t).reduce((function(n,r){const i=Jn(r).filename;return n[e.encodeGBK(i)]=t[r],n}),{})}static isImportableZipPath(e){const t=Jn(e),n=er(e).toLowerCase();return"gz"!=n&&"zip"!=n&&!/^__MACOSX/.test(e)&&"."!=t.filename[0]}static fflatePreprocess(e){const t={};return e.forEach((e=>{"string"==typeof e.content?e.content=$n(e.content):e.content instanceof ArrayBuffer&&(e.content=new Uint8Array(e.content)),t[e.filename]=e.content})),t}},fr=class e{static runningInBrowser(){return"undefined"!=typeof window&&void 0!==window.document}static isGzipped(e){return e.length>2&&e.buffer instanceof ArrayBuffer&&31==e[0]&&139==e[1]}static gzipSync(t,n){return"string"==typeof t&&(t=$n(t)),e.runningInBrowser()?Nn(t,n):void 0}static async gzipAsync(t,n){let r;if("string"==typeof t&&(r=$n(t)),e.runningInBrowser())return dt.promisify(On)(r,n)}static async readGzipFromFile(t){const n={content:await dt.readFilePromise(t,"ArrayBuffer"),name:t.name};return e.readGzipFile(n)}static readGzipFile(t){var n=t.name.replace(/\.gz$/,"");return[{name:n,content:e.gunzipSync(t.content,n)}]}static async gunzipAsync(t,n){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),n=n||{},!e.runningInBrowser())return;let r=await dt.promisify(Bn)(t,n);return n.filename&&(r=Hn(r)),r}static gunzipSync(e,t){e instanceof ArrayBuffer&&(e=new Uint8Array(e));let n=Fn(e);return t&&(n=Hn(n)),n}},pr=class{static formatToDate(e,t="YYYY-MM-DD"){let n=new Date;if(e&&(Ge(e)||$e(e)?n=new Date(e):Ue(e)&&(n=e),!n))throw"date对象为空";const r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return t.replace("YYYY",String(r)).replace("MM",i).replace("DD",o)}static formatToTime(e,t="HH:mm:ss"){let n=new Date;if(e&&(Ge(e)||$e(e)?n=new Date(e):Ue(e)&&(n=e),!n))throw"date对象为空";const r=String(n.getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0"),o=String(n.getSeconds()).padStart(2,"0");return t.replace("HH",r).replace("mm",i).replace("ss",o)}static formatToDateTime(e,t="YYYY-MM-DD HH:mm:ss"){let n=new Date;if(e&&(Ge(e)||$e(e)?n=new Date(e):Ue(e)&&(n=e),!n))throw"date对象为空";return this.formatToDate(n,t.split(" ")[0])+" "+this.formatToTime(n,t.split(" ")[1])}static formatStringDateTime(e){let t=`${e.substring(0,4)}-${e.substring(4,6)}-${e.substring(6,8)}`;return 14===e.length&&(t=`${t} ${e.substring(8,10)}:${e.substring(10,12)}:${e.substring(12,14)}`),t}},gr=!0;try{String.fromCharCode.apply(String,[1,2])}catch(e){gr=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var mr=2654435769;function vr(e,t){var n=e.length,r=n<<2;if(t){var i=e[n-1];if(i<(r-=4)-3||i>r)return null;r=i}for(var o=new Uint8Array(r),s=0;s<r;++s)o[s]=e[s>>2]>>((3&s)<<3);return o}function yr(e,t){var n,r=e.length,i=r>>2;3&r&&++i,t?(n=new Uint32Array(i+1))[i]=r:n=new Uint32Array(i);for(var o=0;o<r;++o)n[o>>2]|=e[o]<<((3&o)<<3);return n}function wr(e){return 4294967295&e}function br(e,t,n,r,i,o){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(o[3&r^i]^n)}function Sr(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function Cr(e){for(var t=e.length,n=new Uint8Array(3*t),r=0,i=0;i<t;i++){var o=e.charCodeAt(i);if(o<128)n[r++]=o;else if(o<2048)n[r++]=192|o>>6,n[r++]=128|63&o;else{if(!(o<55296||o>57343)){if(i+1<t){var s=e.charCodeAt(i+1);if(o<56320&&56320<=s&&s<=57343){var a=65536+((1023&o)<<10|1023&s);n[r++]=240|a>>18,n[r++]=128|a>>12&63,n[r++]=128|a>>6&63,n[r++]=128|63&a,i++;continue}}throw new Error("Malformed string")}n[r++]=224|o>>12,n[r++]=128|o>>6&63,n[r++]=128|63&o}}return n.subarray(0,r)}function xr(e){var t=e.length;return 0===t?"":t<32767?function(e,t){for(var n=new Array(t),r=0,i=0,o=e.length;r<t&&i<o;r++){var s=e[i++];switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n[r]=s;break;case 12:case 13:if(!(i<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(31&s)<<6|63&e[i++];break;case 14:if(!(i+1<o))throw new Error("Unfinished UTF-8 octet sequence");n[r]=(15&s)<<12|(63&e[i++])<<6|63&e[i++];break;case 15:if(!(i+2<o))throw new Error("Unfinished UTF-8 octet sequence");var a=((7&s)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;if(!(0<=a&&a<=1048575))throw new Error("Character outside valid Unicode range: 0x"+a.toString(16));n[r++]=a>>10&1023|55296,n[r]=1023&a|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+s.toString(16))}}return r<t&&(n.length=r),String.fromCharCode.apply(String,n)}(e,t):function(e,t){for(var n=[],r=new Array(32768),i=0,o=0,s=e.length;i<t&&o<s;i++){var a=e[o++];switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=a;break;case 12:case 13:if(!(o<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&a)<<6|63&e[o++];break;case 14:if(!(o+1<s))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&a)<<12|(63&e[o++])<<6|63&e[o++];break;case 15:if(!(o+2<s))throw new Error("Unfinished UTF-8 octet sequence");var l=((7&a)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++])-65536;if(!(0<=l&&l<=1048575))throw new Error("Character outside valid Unicode range: 0x"+l.toString(16));r[i++]=l>>10&1023|55296,r[i]=1023&l|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+a.toString(16))}if(i>=32766){var c=i+1;r.length=c,n.push(String.fromCharCode.apply(String,r)),t-=c,i=-1}}return i>0&&(r.length=i,n.push(String.fromCharCode.apply(String,r))),n.join("")}(e,t)}function Er(e,t){return"string"==typeof e&&(e=Cr(e)),"string"==typeof t&&(t=Cr(t)),null==e||0===e.length?e:vr(function(e,t){var n,r,i,o,s=e.length,a=s-1,l=e[a],c=0;for(o=0|Math.floor(6+52/s);o>0;--o){for(r=(c=wr(c+mr))>>>2&3,i=0;i<a;++i)n=e[i+1],l=e[i]=wr(e[i]+br(c,n,l,i,r,t));n=e[0],l=e[a]=wr(e[a]+br(c,n,l,a,r,t))}return e}(yr(e,!0),yr(Sr(t),!1)),!1)}function kr(e,t){return"string"==typeof e&&(e=function(e){for(var t=globalThis.atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}(e)),"string"==typeof t&&(t=Cr(t)),null==e||0===e.length?e:vr(function(e,t){var n,r,i,o,s=e.length,a=s-1,l=e[0];for(r=wr(Math.floor(6+52/s)*mr);0!==r;r=wr(r-mr)){for(i=r>>>2&3,o=a;o>0;--o)n=e[o-1],l=e[o]=wr(e[o]-br(r,l,n,o,i,t));n=e[a],l=e[0]=wr(e[0]-br(r,l,n,0,i,t))}return e}(yr(e,!1),yr(Sr(t),!1)),!0)}var Mr,zr={toBytes:Cr,toString:xr,encrypt:Er,encryptToString:function(e,t){return globalThis.btoa(function(e){var t=e.length;if(0===t)return"";var n=gr?e:function(e){for(var t=e.length,n=new Array(e.length),r=0;r<t;++r)n[r]=e[r];return n}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var r=32767&t,i=t>>15,o=new Array(r?i+1:i),s=0;s<i;++s)o[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return r&&(o[i]=String.fromCharCode.apply(String,n.subarray(i<<15,t))),o.join("")}(Er(e,t)))},decrypt:kr,decryptToString:function(e,t){return xr(kr(e,t))}},Tr=e=>{const t="1.23452384164.123412416";null!==document.getElementById(t)&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const r=n.getContext("2d");r.rotate(-20*Math.PI/180),r.font="12px Vedana",r.fillStyle="rgba(200, 200, 200, 0.30)",r.textBaseline="middle",r.fillText(e,n.width/10,n.height/2);const i=document.createElement("div");return i.id=t,i.style.pointerEvents="none",i.style.top="0px",i.style.left="0px",i.style.position="fixed",i.style.zIndex="10000000",i.style.width=`${document.documentElement.clientWidth}px`,i.style.height=`${document.documentElement.clientHeight}px`,i.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(i),t},Ar={set:e=>{let t=Tr(e);null===document.getElementById(t)&&(t=Tr(e))},del:()=>{let e="1.23452384164.123412416";null!==document.getElementById(e)&&document.body.removeChild(document.getElementById(e))}};function Lr(e){if(!e){if(Mr)return Mr;throw new Error("首次构建,signalrURL参数不能为空!")}const t=(new X.HubConnectionBuilder).configureLogging(X.LogLevel.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then((()=>{ve.Logger().info("启动SignalR连接!")})),t.onclose((async()=>{ve.Logger().info("断开SignalR连接!")})),t.onreconnecting((()=>{ve.Logger().warn("SignalR服务已断线,重连中...!")})),t.onreconnected((()=>{ve.Logger().warn("SignalR重连成功!")})),Mr||(Mr=t),t}var _r,Rr,Ir={exports:{}},Dr=Ir.exports={};function Pr(){throw new Error("setTimeout has not been defined")}function Or(){throw new Error("clearTimeout has not been defined")}function Nr(e){if(_r===setTimeout)return setTimeout(e,0);if((_r===Pr||!_r)&&setTimeout)return _r=setTimeout,setTimeout(e,0);try{return _r(e,0)}catch(t){try{return _r.call(null,e,0)}catch(t){return _r.call(this,e,0)}}}!function(){try{_r="function"==typeof setTimeout?setTimeout:Pr}catch(e){_r=Pr}try{Rr="function"==typeof clearTimeout?clearTimeout:Or}catch(e){Rr=Or}}();var Br,Fr=[],Wr=!1,Ur=-1;function jr(){Wr&&Br&&(Wr=!1,Br.length?Fr=Br.concat(Fr):Ur=-1,Fr.length&&$r())}function $r(){if(!Wr){var e=Nr(jr);Wr=!0;for(var t=Fr.length;t;){for(Br=Fr,Fr=[];++Ur<t;)Br&&Br[Ur].run();Ur=-1,t=Fr.length}Br=null,Wr=!1,function(e){if(Rr===clearTimeout)return clearTimeout(e);if((Rr===Or||!Rr)&&clearTimeout)return Rr=clearTimeout,clearTimeout(e);try{return Rr(e)}catch(t){try{return Rr.call(null,e)}catch(t){return Rr.call(this,e)}}}(e)}}function Hr(e,t){this.fun=e,this.array=t}function qr(){}Dr.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Fr.push(new Hr(e,t)),1!==Fr.length||Wr||Nr($r)},Hr.prototype.run=function(){this.fun.apply(null,this.array)},Dr.title="browser",Dr.browser=!0,Dr.env={},Dr.argv=[],Dr.version="",Dr.versions={},Dr.on=qr,Dr.addListener=qr,Dr.once=qr,Dr.off=qr,Dr.removeListener=qr,Dr.removeAllListeners=qr,Dr.emit=qr,Dr.prependListener=qr,Dr.prependOnceListener=qr,Dr.listeners=function(e){return[]},Dr.binding=function(e){throw new Error("process.binding is not supported")},Dr.cwd=function(){return"/"},Dr.chdir=function(e){throw new Error("process.chdir is not supported")},Dr.umask=function(){return 0};var Gr,Xr,Vr=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Ir.exports),Kr={hasSubscribers:!1},Zr=Kr,Yr=Kr,Jr=()=>Zr.hasSubscribers||Yr.hasSubscribers,Qr="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,ei=new Set,ti="object"==typeof Vr&&Vr?Vr:{},ni=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),ri=e=>ni(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ii:null:null,ii=class extends Array{constructor(e){super(e),this.fill(0)}},oi=class e{heap;length;static#e=!1;static create(t){let n=ri(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},si=class e{#e;#t;#n;#r;#i;#o;#s;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#c;#u;#h;#d;#f;#p;#g;#m;#v;#y;#w;#b;#S;#C;#x;#E;#k;#M;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#S,autopurgeTimers:e.#C,sizes:e.#w,keyMap:e.#u,keyList:e.#h,valList:e.#d,next:e.#f,prev:e.#p,get head(){return e.#g},get tail(){return e.#m},free:e.#v,isBackgroundFetch:t=>e.#z(t),backgroundFetch:(t,n,r,i)=>e.#T(t,n,r,i),moveToTail:t=>e.#A(t),indexes:t=>e.#L(t),rindexes:t=>e.#_(t),isStale:t=>e.#R(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#l}get fetchMethod(){return this.#o}get memoMethod(){return this.#s}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:u,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:g=0,sizeCalculation:m,fetchMethod:v,memoMethod:y,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:C,ignoreFetchAbort:x,perf:E}=t;if(void 0!==E&&"function"!=typeof E?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#a=E??Qr,0!==n&&!ni(n))throw new TypeError("max option must be a nonnegative integer");let k=n?ri(n):Array;if(!k)throw new Error("invalid max value: "+n);if(this.#e=n,this.#t=p,this.maxEntrySize=g||this.#t,this.sizeCalculation=m,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==y&&"function"!=typeof y)throw new TypeError("memoMethod must be a function if defined");if(this.#s=y,void 0!==v&&"function"!=typeof v)throw new TypeError("fetchMethod must be a function if specified");if(this.#o=v,this.#E=!!v,this.#u=new Map,this.#h=Array.from({length:n}).fill(void 0),this.#d=Array.from({length:n}).fill(void 0),this.#f=new k(n),this.#p=new k(n),this.#g=0,this.#m=0,this.#v=oi.create(n),this.#l=0,this.#c=0,"function"==typeof c&&(this.#n=c),"function"==typeof u&&(this.#r=u),"function"==typeof h?(this.#i=h,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#x=!!this.#n,this.#M=!!this.#r,this.#k=!!this.#i,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#t&&!ni(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!ni(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=ni(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!ni(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D()}if(0===this.#e&&0===this.ttl&&0===this.#t)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t="LRU_CACHE_UNBOUNDED";(e=>!ei.has(e))(t)&&(ei.add(t),((e,t,n,r)=>{"function"==typeof ti.emitWarning?ti.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)})("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#D(){let e=new ii(this.#e),t=new ii(this.#e);this.#S=e,this.#b=t;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#C=n,this.#P=(n,i,o=this.#a.now())=>{t[n]=0!==i?o:0,e[n]=i,r(n,i)},this.#O=n=>{t[n]=0!==e[n]?this.#a.now():0,r(n,e[n])};let r=this.ttlAutopurge?(e,t)=>{if(n?.[e]&&(clearTimeout(n[e]),n[e]=void 0),t&&0!==t&&n){let r=setTimeout((()=>{this.#R(e)&&this.#N(this.#h[e],"expire")}),t+1);r.unref&&r.unref(),n[e]=r}}:()=>{};this.#B=(n,r)=>{if(e[r]){let s=e[r],a=t[r];if(!s||!a)return;n.ttl=s,n.start=a,n.now=i||o(),n.remainingTTL=s-(n.now-a)}};let i=0,o=()=>{let e=this.#a.now();if(this.ttlResolution>0){i=e;let t=setTimeout((()=>i=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let r=this.#u.get(n);if(void 0===r)return 0;let s=e[r],a=t[r];return s&&a?s-((i||o())-a):1/0},this.#R=n=>{let r=t[n],s=e[n];return!!s&&!!r&&(i||o())-r>s}}#O=()=>{};#B=()=>{};#P=()=>{};#R=()=>!1;#I(){let e=new ii(this.#e);this.#c=0,this.#w=e,this.#F=t=>{this.#c-=e[t],e[t]=0},this.#W=(e,t,n,r)=>{if(this.#z(t))return 0;if(!ni(n)){if(!r)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!ni(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#U=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#j(!0)}this.#c+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#c)}}#F=e=>{};#U=(e,t,n)=>{};#W=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#L({allowStale:e=this.allowStale}={}){if(this.#l)for(let t=this.#m;this.#$(t)&&((e||!this.#R(t))&&(yield t),t!==this.#g);)t=this.#p[t]}*#_({allowStale:e=this.allowStale}={}){if(this.#l)for(let t=this.#g;this.#$(t)&&((e||!this.#R(t))&&(yield t),t!==this.#m);)t=this.#f[t]}#$(e){return void 0!==e&&this.#u.get(this.#h[e])===e}*entries(){for(let e of this.#L())void 0!==this.#d[e]&&void 0!==this.#h[e]&&!this.#z(this.#d[e])&&(yield[this.#h[e],this.#d[e]])}*rentries(){for(let e of this.#_())void 0!==this.#d[e]&&void 0!==this.#h[e]&&!this.#z(this.#d[e])&&(yield[this.#h[e],this.#d[e]])}*keys(){for(let e of this.#L()){let t=this.#h[e];void 0!==t&&!this.#z(this.#d[e])&&(yield t)}}*rkeys(){for(let e of this.#_()){let t=this.#h[e];void 0!==t&&!this.#z(this.#d[e])&&(yield t)}}*values(){for(let e of this.#L())void 0!==this.#d[e]&&!this.#z(this.#d[e])&&(yield this.#d[e])}*rvalues(){for(let e of this.#_())void 0!==this.#d[e]&&!this.#z(this.#d[e])&&(yield this.#d[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#L()){let r=this.#d[n],i=this.#z(r)?r.__staleWhileFetching:r;if(void 0!==i&&e(i,this.#h[n],this))return this.#H(this.#h[n],t)}}forEach(e,t=this){for(let n of this.#L()){let r=this.#d[n],i=this.#z(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#h[n],this)}}rforEach(e,t=this){for(let n of this.#_()){let r=this.#d[n],i=this.#z(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#h[n],this)}}purgeStale(){let e=!1;for(let t of this.#_({allowStale:!0}))this.#R(t)&&(this.#N(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(void 0===t)return;let n=this.#d[t],r=this.#z(n)?n.__staleWhileFetching:n;if(void 0===r)return;let i={value:r};if(this.#S&&this.#b){let e=this.#S[t],n=this.#b[t];e&&n&&(i.ttl=e-(this.#a.now()-n),i.start=Date.now())}return this.#w&&(i.size=this.#w[t]),i}dump(){let e=[];for(let t of this.#L({allowStale:!0})){let n=this.#h[t],r=this.#d[t],i=this.#z(r)?r.__staleWhileFetching:r;if(void 0===i||void 0===n)continue;let o={value:i};if(this.#S&&this.#b){o.ttl=this.#S[t];let e=this.#a.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#w&&(o.size=this.#w[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#a.now()-e}this.#q(t,n.value,n)}}set(e,t,n={}){let{status:r=(Zr.hasSubscribers?{}:void 0)}=n;n.status=r,r&&(r.op="set",r.key=e,void 0!==t&&(r.value=t));let i=this.#q(e,t,n);return r&&Zr.hasSubscribers&&Zr.publish(r),i}#q(e,t,n={}){let{ttl:r=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=n;if(void 0===t)return a&&(a.set="deleted"),this.delete(e),this;let{noUpdateTTL:l=this.noUpdateTTL}=n;a&&!this.#z(t)&&(a.value=t);let c=this.#W(e,t,n.size||0,s,a);if(this.maxEntrySize&&c>this.maxEntrySize)return this.#N(e,"set"),a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this;let u=0===this.#l?void 0:this.#u.get(e);if(void 0===u)u=0===this.#l?this.#m:0!==this.#v.length?this.#v.pop():this.#l===this.#e?this.#j(!1):this.#l,this.#h[u]=e,this.#d[u]=t,this.#u.set(e,u),this.#f[this.#m]=u,this.#p[u]=this.#m,this.#m=u,this.#l++,this.#U(u,c,a),a&&(a.set="add"),l=!1,this.#M&&this.#r?.(t,e,"add");else{this.#A(u);let n=this.#d[u];if(t!==n){if(this.#E&&this.#z(n)){n.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:t}=n;void 0!==t&&!o&&(this.#x&&this.#n?.(t,e,"set"),this.#k&&this.#y?.push([t,e,"set"]))}else o||(this.#x&&this.#n?.(n,e,"set"),this.#k&&this.#y?.push([n,e,"set"]));if(this.#F(u),this.#U(u,c,a),this.#d[u]=t,a){a.set="replace";let e=n&&this.#z(n)?n.__staleWhileFetching:n;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update");this.#M&&this.onInsert?.(t,e,t===n?"update":"replace")}if(0!==r&&!this.#S&&this.#D(),this.#S&&(l||this.#P(u,r,i),a&&this.#B(a,u)),!o&&this.#k&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}return this}pop(){try{for(;this.#l;){let e=this.#d[this.#g];if(this.#j(!0),this.#z(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#k&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}}}#j(e){let t=this.#g,n=this.#h[t],r=this.#d[t];return this.#E&&this.#z(r)?r.__abortController.abort(new Error("evicted")):(this.#x||this.#k)&&(this.#x&&this.#n?.(r,n,"evict"),this.#k&&this.#y?.push([r,n,"evict"])),this.#F(t),this.#C?.[t]&&(clearTimeout(this.#C[t]),this.#C[t]=void 0),e&&(this.#h[t]=void 0,this.#d[t]=void 0,this.#v.push(t)),1===this.#l?(this.#g=this.#m=0,this.#v.length=0):this.#g=this.#f[t],this.#u.delete(n),this.#l--,t}has(e,t={}){let{status:n=(Zr.hasSubscribers?{}:void 0)}=t;t.status=n,n&&(n.op="has",n.key=e);let r=this.#G(e,t);return Zr.hasSubscribers&&Zr.publish(n),r}#G(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(void 0!==i){let e=this.#d[i];if(this.#z(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(i))return n&&this.#O(i),r&&(r.has="hit",this.#B(r,i)),!0;r&&(r.has="stale",this.#B(r,i))}else r&&(r.has="miss");return!1}peek(e,t={}){let{status:n=(Jr()?{}:void 0)}=t;n&&(n.op="peek",n.key=e),t.status=n;let r=this.#X(e,t);return Zr.hasSubscribers&&Zr.publish(n),r}#X(e,t){let{status:n,allowStale:r=this.allowStale}=t,i=this.#u.get(e);if(void 0===i||!r&&this.#R(i))return void(n&&(n.peek=void 0===i?"miss":"stale"));let o=this.#d[i],s=this.#z(o)?o.__staleWhileFetching:o;return n&&(void 0!==s?(n.peek="hit",n.value=s):n.peek="miss"),s}#T(e,t,n,r){let i=void 0===t?void 0:this.#d[t];if(this.#z(i))return i;let o=new AbortController,{signal:s}=n;s?.addEventListener("abort",(()=>o.abort(s.reason)),{signal:o.signal});let a={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:s}=o.signal,l=n.ignoreFetchAbort&&void 0!==r,h=n.ignoreFetchAbort||!(!n.allowStaleOnFetchAbort||void 0===r);if(n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!l&&!i)return c(o.signal.reason,h);let d=u,f=this.#d[t];return(f===u||void 0===f&&l&&i)&&(void 0===r?void 0!==d.__staleWhileFetching?this.#d[t]=d.__staleWhileFetching:this.#N(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#q(e,r,a.options))),r},c=(r,i)=>{let{aborted:s}=o.signal,a=s&&n.allowStaleOnFetchAbort,l=a||n.allowStaleOnFetchRejection,c=l||n.noDeleteOnFetchRejection,h=u;if(this.#d[t]===u&&(!c||!i&&void 0===h.__staleWhileFetching?this.#N(e,"fetch"):a||(this.#d[t]=h.__staleWhileFetching)),l)return n.status&&void 0!==h.__staleWhileFetching&&(n.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw r};n.status&&(n.status.fetchDispatched=!0);let u=new Promise(((t,r)=>{let s=this.#o?.(e,i,a);s&&s instanceof Promise&&s.then((e=>t(void 0===e?void 0:e)),r),o.signal.addEventListener("abort",(()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}))})).then(l,(e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),c(e,!1)))),h=Object.assign(u,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.#q(e,h,{...a.options,status:void 0}),t=this.#u.get(e)):this.#d[t]=h,h}#z(e){if(!this.#E)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=Yr.hasSubscribers,{status:r=(Jr()?{}:void 0)}=t;t.status=r,r&&t.context&&(r.context=t.context);let i=this.#V(e,t);return r&&Jr()&&n&&(r.trace=!0,Yr.tracePromise((()=>i),r).catch((()=>{}))),i}async#V(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=!1,status:m,signal:v}=t;if(m&&(m.op="fetch",m.key=e,g&&(m.forceRefresh=!0)),!this.#E)return m&&(m.fetch="get"),this.#H(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:m});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:f,ignoreFetchAbort:d,status:m,signal:v},w=this.#u.get(e);if(void 0===w){m&&(m.fetch="miss");let t=this.#T(e,w,y,p);return t.__returned=t}{let t=this.#d[w];if(this.#z(t)){let e=n&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#R(w);if(!g&&!i)return m&&(m.fetch="hit"),this.#A(w),r&&this.#O(w),m&&this.#B(m,w),t;let o=this.#T(e,w,y,p),s=void 0!==o.__staleWhileFetching&&n;return m&&(m.fetch=i?"stale":"refresh",s&&i&&(m.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}forceFetch(e,t={}){let n=Yr.hasSubscribers,{status:r=(Jr()?{}:void 0)}=t;t.status=r,r&&t.context&&(r.context=t.context);let i=this.#K(e,t);return r&&Jr()&&n&&(r.trace=!0,Yr.tracePromise((()=>i),r).catch((()=>{}))),i}async#K(e,t={}){let n=await this.#V(e,t);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=(Zr.hasSubscribers?{}:void 0)}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context));let r=this.#Z(e,t);return n&&(n.value=r),Zr.hasSubscribers&&Zr.publish(n),r}#Z(e,t={}){let n=this.#s;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,status:i,forceRefresh:o,...s}=t;i&&o&&(i.forceRefresh=!0);let a=this.#H(e,s),l=o||void 0===a;if(i&&(i.memo=l?"miss":"hit",l||(i.value=a)),!l)return a;let c=n(e,a,{options:s,context:r});return i&&(i.value=c),this.#q(e,c,s),c}get(e,t={}){let{status:n=(Zr.hasSubscribers?{}:void 0)}=t;t.status=n,n&&(n.op="get",n.key=e);let r=this.#H(e,t);return n&&(void 0!==r&&(n.value=r),Zr.hasSubscribers&&Zr.publish(n)),r}#H(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#u.get(e);if(void 0===s)return void(o&&(o.get="miss"));let a=this.#d[s],l=this.#z(a);return o&&this.#B(o,s),this.#R(s)?l?(o&&(o.get="stale-fetching"),n&&void 0!==a.__staleWhileFetching?(o&&(o.returnedStale=!0),a.__staleWhileFetching):void 0):(i||this.#N(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),a):void 0):(o&&(o.get=l?"fetching":"hit"),this.#A(s),r&&this.#O(s),l?a.__staleWhileFetching:a)}#Y(e,t){this.#p[t]=e,this.#f[e]=t}#A(e){e!==this.#m&&(e===this.#g?this.#g=this.#f[e]:this.#Y(this.#p[e],this.#f[e]),this.#Y(this.#m,e),this.#m=e)}delete(e){return this.#N(e,"delete")}#N(e,t){Zr.hasSubscribers&&Zr.publish({op:"delete",delete:t,key:e});let n=!1;if(0!==this.#l){let r=this.#u.get(e);if(void 0!==r)if(this.#C?.[r]&&(clearTimeout(this.#C?.[r]),this.#C[r]=void 0),n=!0,1===this.#l)this.#J(t);else{this.#F(r);let n=this.#d[r];if(this.#z(n)?n.__abortController.abort(new Error("deleted")):(this.#x||this.#k)&&(this.#x&&this.#n?.(n,e,t),this.#k&&this.#y?.push([n,e,t])),this.#u.delete(e),this.#h[r]=void 0,this.#d[r]=void 0,r===this.#m)this.#m=this.#p[r];else if(r===this.#g)this.#g=this.#f[r];else{let e=this.#p[r];this.#f[e]=this.#f[r];let t=this.#f[r];this.#p[t]=this.#p[r]}this.#l--,this.#v.push(r)}}if(this.#k&&this.#y?.length){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}return n}clear(){return this.#J("delete")}#J(e){for(let t of this.#_({allowStale:!0})){let n=this.#d[t];if(this.#z(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#h[t];this.#x&&this.#n?.(n,r,e),this.#k&&this.#y?.push([n,r,e])}}if(this.#u.clear(),this.#d.fill(void 0),this.#h.fill(void 0),this.#S&&this.#b){this.#S.fill(0),this.#b.fill(0);for(let e of this.#C??[])void 0!==e&&clearTimeout(e);this.#C?.fill(void 0)}if(this.#w&&this.#w.fill(0),this.#g=0,this.#m=0,this.#v.length=0,this.#c=0,this.#l=0,this.#k&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}}},ai=class{static defaultOptions={max:1e3,ttl:18e5};static cache=new si(this.defaultOptions);static createCache(e=this.defaultOptions){return new si(e)}static set(e,t,n=this.cache){let r=n;r||(r=this.cache),r.set(e,t)}static get(e,t=this.cache){let n=t;return n||(n=this.cache),n.get(e)}static remove(e,t=this.cache){let n=t;return n||(n=this.cache),n.del(e)}static has(e,t=this.cache){let n=t;return n||(n=this.cache),n.has(e)}static count(e=this.cache){let t=e;return t||(t=this.cache),t.size}static maxSize(e=this.cache){let t=e;return t||(t=this.cache),t.max}static peek(e,t=this.cache){let n=t;return n||(n=this.cache),n.peek(e)}static keys(e=this.cache){let t=e;return t||(t=this.cache),t.keys()}static clear(e=this.cache){let t=e;t||(t=this.cache),t.clear()}},li=class{static CharCodes=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"];static matrix2=[[3,4],[1,2]];static matrix3=[[7,8,9],[4,5,6],[1,2,3]];static matrix4=[["21","22","23","24","25"],["16","17","18","19","20"],["11","12","13","14","15"],["06","07","08","09","10"],["01","02","03","04","05"]];static matrix5=[["C","D"],["A","B"]];static dmsToDecimal(e){let t=1;if(e.direction)switch(e.direction){case"W":case"S":t=-1;break;default:t=1}return(Math.abs(e.degrees)+e.minutes/60+e.seconds/3600)*t}static xToDMS(e,t="E"){let n=t;e<0&&(n="W");const r=Math.abs(e);return this.decimalToDms(r,n)}static yToDMS(e,t="N"){let n=t;e<0&&(n="S");const r=Math.abs(e);return this.decimalToDms(r,n)}static decimalToDms(e,t){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degrees:n,minutes:i,seconds:60*(r-i),direction:t}}static prefixInteger(e,t){return(Array(t).join("0")+e).slice(-t)}static serializeGrid1(e,t){const n="W"===e.direction?-1:1,r=2*e.degrees+Math.floor(e.minutes/30+1),i=this.prefixInteger(r*n+360,3),o="S"===t.direction?1:-1,s=(2*t.degrees+Math.floor(t.minutes/30+1))*o+180;return`${i}${this.CharCodes[Math.floor(s/24)]+this.CharCodes[s%24]}`}static deserializeGrid1(e){const t=e.substring(0,3);let n=Number.parseInt(t)-360,r="E";n<0&&(r="W",n=Math.abs(n)),n-=1;const i=Math.floor(n/2),o={degrees:i,minutes:30*(n-2*i),seconds:0,direction:r},s=e.substring(3,4),a=e.substring(4,5);let l=24*this.CharCodes.indexOf(s)+this.CharCodes.indexOf(a)-180,c="S";l<0&&(c="N",l=Math.abs(l)),l-=1;const u=Math.floor(l/2);return[o,{degrees:u,minutes:30*(l-2*u),seconds:0,direction:c}]}static serializeGrid2(e,t){const n=e.minutes%30,r=Math.floor(n/15),i=t.minutes%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid2(e){return this.deserializeGrid6(e)}static serializeGrid3(e,t){const n=e.minutes%15,r=Math.floor(n/5),i=t.minutes%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid3(e){return this.deserializeGrid7(e)}static serializeGrid4(e,t){const n=e.minutes%5,r=t.minutes%5;return this.matrix4[r][n]}static deserializeGrid4(e){return this.deserializeGrid8(e)}static serializeGrid5(e,t){const n=Math.floor(e.seconds/30),r=Math.floor(t.seconds/30);return this.matrix5[r][n]}static deserializeGrid5(e){let t=0,n=0;switch(e){case"C":t=0,n=0;break;case"D":t=1,n=0;break;case"A":t=0,n=1;break;case"B":t=1,n=1}return[30*t,30*n]}static serializeGrid6(e,t){const n=e.seconds%30,r=Math.floor(n/15),i=t.seconds%30,o=Math.floor(i/15);return this.matrix2[o][r]}static deserializeGrid6(e){let t=0,n=0;switch(e){case"3":t=0,n=0;break;case"4":t=1,n=0;break;case"1":t=0,n=1;break;case"2":t=1,n=1}return[15*t,15*n]}static serializeGrid7(e,t){const n=e.seconds%15,r=Math.floor(n/5),i=t.seconds%15,o=Math.floor(i/5);return this.matrix3[o][r]}static deserializeGrid7(e){const t=Number.parseInt(e);let n=!1,r=0,i=0;for(let o=0;o<3;o++){for(let e=0;e<3;e++)if(this.matrix3[o][e]===t){r=o,i=e,n=!0;break}if(n)break}return[5*i,5*r]}static serializeGrid8(e,t){const n=Math.floor(e.seconds%5),r=Math.floor(t.seconds%5);return this.matrix4[r][n]}static deserializeGrid8(e){let t=!1,n=0,r=0;for(let i=0;i<5;i++){for(let o=0;o<5;o++)if(this.matrix4[i][o]===e){n=i,r=o,t=!0;break}if(t)break}return[r,n]}static serializeGrid9(e,t){const n=Math.floor(1e3*(e.seconds-Math.floor(e.seconds))),r=Math.floor(n/125),i=Math.floor(1e3*(t.seconds-Math.floor(t.seconds))),o=Math.floor(i/125);return this.prefixInteger(8*(7-o)+r+1,2)}static deserializeGrid9(e){const t=Number.parseInt(e)-1,n=7-Math.floor(t/8);return[.125*(t-8*(7-n)),.125*n]}static serializeWarGrid(e,t,n=1){let r=this.serializeGrid1(e,t);return n>=2&&(r+=this.serializeGrid2(e,t),n>=3&&(r+=this.serializeGrid3(e,t),n>=4&&(r+=this.serializeGrid4(e,t),n>=5&&(r+=this.serializeGrid5(e,t),n>=6&&(r+=this.serializeGrid6(e,t),n>=7&&(r+=this.serializeGrid7(e,t),n>=8&&(r+=this.serializeGrid8(e,t),n>=9&&(r+=this.serializeGrid9(e,t))))))))),r}static deserializeWarGrid(e){const t=e.length;if(t<5)throw new Error("编码长度不小于5个");const[n,r]=this.deserializeGrid1(e);let i=[0,0];return t>=6&&(i=this.deserializeGrid2(e.substring(5,6)),n.minutes+=i[0],r.minutes+=i[1],t>=7&&(i=this.deserializeGrid3(e.substring(6,7)),n.minutes+=i[0],r.minutes+=i[1],t>=9&&(i=this.deserializeGrid4(e.substring(7,9)),n.minutes+=i[0],r.minutes+=i[1],t>=10&&(i=this.deserializeGrid5(e.substring(9,10)),n.seconds+=i[0],r.seconds+=i[1],t>=11&&(i=this.deserializeGrid6(e.substring(10,11)),n.seconds+=i[0],r.seconds+=i[1],t>=12&&(i=this.deserializeGrid7(e.substring(11,12)),n.seconds+=i[0],r.seconds+=i[1],t>=14&&(i=this.deserializeGrid8(e.substring(12,14)),n.seconds+=i[0],r.seconds+=i[1],t>=16&&(i=this.deserializeGrid9(e.substring(14,16)),n.seconds+=i[0],r.seconds+=i[1])))))))),[n,r]}},ci=((e,t)=>{let n={};for(var r in e)Y(n,r,{get:e[r],enumerable:!0});return t||Y(n,Symbol.toStringTag,{value:"Module"}),n})({base64ToBlob:()=>fi,blobToDataURL:()=>pi,convertDecimalism:()=>vi,convertDecimalismData:()=>wi,convertDecimalismSpacing:()=>yi,convertToDecimalism:()=>bi,convertToDecimalismByString:()=>Si,convertToDecimalismByString2:()=>Ci,filterObj:()=>ui,getRandomInt:()=>hi,getRandomItem:()=>di,replaceAll:()=>gi,reserveDecimal:()=>mi,traverseXYArrayFromInsideOut:()=>xi});function ui(e,t){const n={};return Object.keys(e).filter((e=>t.includes(e))).forEach((t=>{n[t]=e[t]})),n}function hi(e=100,t=0){return Math.floor(Math.random()*(e-t+1))+t}function di(e){if(!e)return;const t=e.length;return 0!==t?e[Math.floor(Math.random()*t)]:void 0}function fi(e,t="image/png"){let n=t,r="";const i=e.split(",");2===i.length?(n=(i[0]?.match(/:(.*?);/))[1],r=atob(i[1])):r=atob(i[0]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function pi(e){return new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)}))}function gi(e,t,n){return e.split(t).join(n)}function mi(e,t=2){const n=Math.pow(10,t);return Math.round(e*n)/n}function vi(e,t=!0,n=!0){const r=n?e>0?"E":"W":e>0?"N":"S",i=Math.floor(e),o=60*(e-i),s=Math.floor(o),a=60*(o-s);return t?`${r}:${i}°${s}′${a.toFixed(3)}″`:{degree:i*(e>0?1:-1),minute:s,second:a}}function yi(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return`${n} ${i} ${(60*(r-i)).toFixed(t)}`}function wi(e,t=3){const n=Math.floor(e),r=60*(e-n),i=Math.floor(r);return{degree:n,minute:i,second:mi(60*(r-i),t)}}function bi(e,t,n){return e+t/60+n/3600}function Si(e,t=-1){const n=e.split(" ");if(!n||3!=n.length)return-1;const r=Number(n[0]),i=Number(n[1]),o=Number(n[2]);return NaN===r||NaN===i||NaN===o?-1:-1!=t?mi(r+i/60+o/3600,t):r+i/60+o/3600}function Ci(e){const t=e.match(/^([EWNS]):?(\d+)[°ºd](\d+)[′'m](\d+\.?\d*)[″"s]?$/i);if(!t)return NaN;let n=parseFloat(t[2])+parseFloat(t[3])/60+parseFloat(t[4])/3600;return(e.toUpperCase().startsWith("W")||e.toUpperCase().startsWith("S"))&&(n=-n),n}function xi(e,t,n){if(e<=0||t<=0)throw new Error("行数或列数不能小于0!");const r=e,i=t,o=Math.floor(r/2),s=Math.floor(i/2),a=Math.max(o,r-1-o,s,i-1-s),l=Array(r).fill(!1).map((()=>Array(i).fill(!1))),c=[];for(let u=0;u<=a;u++){const e=Math.max(0,o-u),t=Math.min(r-1,o+u),a=Math.max(0,s-u),h=Math.min(i-1,s+u);for(let r=e;r<=t;r++)for(let e=a;e<=h;e++)l[r][e]||(n&&n(r,e),l[r][e]=!0,c.push([r,e]))}return c}function Ei(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),r=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),o=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)}function ki(e){var t=e.toLowerCase();if(Li(e)){if(4===t.length){for(var n="#",r=1;r<4;r+=1){const e=t.slice(r,r+1);n+=e.concat(e)}t=n}var i=[];for(r=1;r<7;r+=2)i.push(parseInt("0x"+t.slice(r,r+2)));return"rgb("+i.join(",")+")"}return t}function Mi(e){const t=e;if(4===t.length){let e="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);e+=r.concat(r)}return e}return t}function zi(e){if("object"==typeof e||!e)return;const t=e.toLowerCase().substring(0,1);return"#"===t?Gr.Hex:"r"===t||"("===t?Gr.RGBA:"h"===t?Gr.Hsla:Gr.RGBA}function Ti(e){if(e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t){var n,r,i,o=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),a=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(0===s)n=r=i=a;else{var l=a<=.5?a*(s+1):a+s-a*s,c=2*a-l;n=Ai(c,l,o+1/3),r=Ai(c,l,o),i=Ai(c,l,o-1/3)}return`rgba(${n=Math.round(255*n)},${r=Math.round(255*r)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}}function Ai(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Li(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function _i(e,t,n){const r=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(r.length-7)).join("0")+r}function Ri(e){let t=e.toLowerCase();if(Li(e)){if(4===t.length){let e="#";for(let n=1;n<4;n+=1)e+=t.slice(n,n+1).concat(t.slice(n,n+1));t=e}const e=[];for(let n=1;n<7;n+=2)e.push(parseInt("0x"+t.slice(n,n+2)));return"RGB("+e.join(",")+")"}return t}function Ii(e){if(!Li(e))return;const[t,n,r]=Ri(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map((e=>Number(e)));return.299*t+.578*n+.114*r<192}function Di(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Fi(e.substring(0,2),t)}${Fi(e.substring(2,4),t)}${Fi(e.substring(4,6),t)}`}function Pi(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Oi(e.substring(0,2),t)}${Oi(e.substring(2,4),t)}${Oi(e.substring(4,6),t)}`}function Oi(e,t){const n=parseInt(e,16)+t,r=n>255?255:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Ni(e,t,n){const r=[e,t,n].map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*r[0]+.7152*r[1]+.0722*r[2]}function Bi(e){return n=[0,0,0],(Ni(~~(t=Ri(e.substring(1)).split(","))[0],~~t[1],~~t[2])+.05)/(Ni(n[0],n[1],n[2])+.05)>=12?"#000000":"#FFFFFF";var t,n}function Fi(e,t){const n=parseInt(e,16)-t,r=n<0?0:n;return r.toString(16).length>1?r.toString(16):`0${r.toString(16)}`}function Wi(e){const t=(new Date).getTime();let n=(new Date).getTime();for(;n-t<e;)n=(new Date).getTime();console.log(`强制等待${Ui}毫秒`)}function Ui(e){return new Promise((t=>setTimeout(t,e)))}function ji(e,t,n,r="json",i){const o={baseURL:ve.Config?.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(e){return V.stringify(e,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+ze()?.token},responseType:r,cancelToken:i};if(n)for(let s in n)o.headers[s]=n[s];return ve.SystemID&&(o.headers.sysid=ve.SystemID,ve.SystemGroup&&(o.headers.sysgroup=ve.SystemGroup)),void 0!==t&&(o.baseURL=t),o}function $i(e,t,n,r,i="json",o,s){const a=ji(n,t,r,i,o);return s&&s>=2e4&&(a.timeout=s),ve.Axios?.get(e,a).catch((function(t){Hi(t,a.baseURL,e,"Get")}))}function Hi(e,t,n,r="Get"){const i=`${t}${n}`;if(e&&e.response){let t=!1;const n=e.response.status;switch(n){case 400:e.message="错误请求";break;case 401:e.message="未授权,请重新登录";break;case 403:e.message="拒绝访问";break;case 404:e.message="请求错误,未找到该资源";break;case 405:e.message="请求方法未允许";break;case 408:e.message="请求超时";break;case 500:const n=e.response.data;if(n){const r=n.indexOf(":"),i=n.indexOf("\n");if(r>0&&i-r>2){const o=n.substring(r+2,i);o.indexOf("System.Exception")>0?e.message="后台服务内部出错!":(t=!0,e.message=o)}else t=!0,e.message=n}else e.message="服务器端出错";break;case 501:e.message="网络未实现";break;case 502:e.message="网络错误";break;case 503:e.message="服务不可用";break;case 504:e.message="网络超时";break;case 505:e.message="http版本不支持该请求";break;default:e.message=`连接错误${e.response.status}`}let r={address:i,code:n,isExceptionInfo:t,message:e.message,result:e.response.data};if(ve.EventBus.emit(ce.AxiosRequestErrorEvent,r),t)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http请求错误!")}}function qi(e,t,n,r,i,o="json",s){const a=ji(r,t,i,o);s&&s>=2e4&&(a.timeout=s),a.headers["Content-Type"]="multipart/form-data";const l=function(e){let t=new FormData;return e&&Object.keys(e).forEach((n=>{if(!e)return;let r=e[n];null!=r&&(Ve(r)?r.forEach((e=>{t.append(n,Zi(e))})):t.append(n,Zi(r)))})),t}(n);return ve.Axios?.post(e,l,a).catch((function(e){Hi(e,t,a.baseURL,"Post")}))}function Gi(e,t,n,r,i,o="json",s){const a=ji(r,t,i,o);return s&&s>=2e4&&(a.timeout=s),ve.Axios?.post(e,n,a).catch((function(n){Hi(n,t,e,"Post")}))}function Xi(e,t,n=!1){return e.startsWith("http")?$i("",e,t):n||t?$i(e,void 0,t):$i(e,"",void 0)}function Vi(e,t){return qi(e,void 0,t)}function Ki(e,t){return ve.Axios?.get(e,{params:t}).catch((function(t){Hi(t,e,"","外部Get")}))}function Zi(e){return e instanceof Blob?e:e.toString()}function Yi(e,t,n){const r=t??Se.getFileName(e);$i("",e,n,void 0,"blob").then((e=>{e.data&&ar(e.data,r)}))}!function(e){e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla"}(Gr||(Gr={}));var Ji,Qi,eo,to=(Ji=()=>{Xr=globalThis||self},()=>(Ji&&(Qi=Ji(Ji=0)),Qi)),no=ne(((e,t)=>{var n;to(),n="undefined"!=typeof window?window:void 0!==Xr?Xr:"undefined"!=typeof self?self:{},t.exports=n})),ro=ne(((e,t)=>{t.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString})),io=ne(((e,t)=>{var n=function(e){return e.replace(/^\s+|\s+$/g,"")},r=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};for(var t=Object.create(null),i=n(e).split("\n"),o=0;o<i.length;o++){var s=i[o],a=s.indexOf(":"),l=n(s.slice(0,a)).toLowerCase(),c=n(s.slice(a+1));void 0===t[l]?t[l]=c:r(t[l])?t[l].push(c):t[l]=[t[l],c]}return t}})),oo=ne(((e,t)=>{t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty})),so=ne(((e,t)=>{var n=no(),r=ro(),i=io(),o=oo();function s(e,t,n){var i=e;return r(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=o(t,{uri:e}),i.callback=n,i}function a(e,t,n){return l(t=s(e,t,n))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),v)try{e=JSON.parse(e)}catch(e){}return e}function o(e){return clearTimeout(h),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function s(){if(!c){var t;clearTimeout(h),t=e.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var o=y,s=null;return 0!==t?(o={body:r(),statusCode:t,method:f,headers:{},url:d,rawRequest:u},u.getAllResponseHeaders&&(o.headers=i(u.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),n(s,o,o.body)}}var l,c,u=e.xhr||null;u||(u=e.cors||e.useXDR?new a.XDomainRequest:new a.XMLHttpRequest);var h,d=u.url=e.uri||e.url,f=u.method=e.method||"GET",p=e.body||e.data,g=u.headers=e.headers||{},m=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:u};if("json"in e&&!1!==e.json&&(v=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(s,0)},u.onload=s,u.onerror=o,u.onprogress=function(){},u.onabort=function(){c=!0},u.ontimeout=o,u.open(f,d,!m,e.username,e.password),m||(u.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(h=setTimeout((function(){if(!c){c=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",o(e)}}),e.timeout)),u.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&u.setRequestHeader(l,g[l]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}t.exports=a,t.exports.default=a,a.XMLHttpRequest=n.XMLHttpRequest||function(){},a.XDomainRequest="withCredentials"in new a.XMLHttpRequest?a.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){a["delete"===e?"del":e]=function(t,n,r){return(n=s(t,n,r)).method=e.toUpperCase(),l(n)}}))})),ao=re(so(),1),lo=[200,201,202,204,308],co=[408,502,503,504],uo=class{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunkCount;chunkByteSize;cacheSize=3;currentMaxIndex=0;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;isResumed=!1;mapXhrRequest;okRecordList;eventTarget;fileName;constructor(e){this.endpoint=e.endpoint,this.file=e.file,this.fileName=encodeURI(this.file.name),this.headers=e.headers||{},this.method=e.method||"PUT",this.chunkSize=e.chunkSize||5120,this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.md5=e.md5||"",null!=e.threadNumber&&e.threadNumber>=2&&(this.cacheSize=e.threadNumber),this.maxFileBytes=1024*(e.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.mapXhrRequest=new Map,this.okRecordList=[],this.eventTarget=oe(),this.validateOptions(),this.getEndpoint().then((()=>{for(let e=0;e<this.cacheSize;e++){const t=e;if(t<this.totalChunks){const e=100*t;e>0?Ui(e).then((e=>{this.sendChunks(t)})):this.sendChunks(t)}}})),"undefined"!=typeof window&&(window.addEventListener("online",(()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())})),window.addEventListener("offline",(()=>{this.offline=!0,this.dispatch("offline")})))}on(e,t){this.eventTarget.on(e,t)}abort(){this.pause(),this.mapXhrRequest.size>0&&(this.mapXhrRequest.forEach(((e,t)=>{e&&e.abort()})),this.mapXhrRequest.clear())}pause(){this.paused=!0}async resume(){this.paused=!1,this.isResumed=!0;for(let e=0;e<this.totalChunks;e++)this.mapXhrRequest.size>=this.cacheSize&&await Ui(500*(this.mapXhrRequest.size-this.cacheSize+1)),this.sendChunks(e)}dispatch(e,t){this.eventTarget.emit(e,t)}validateOptions(){if(!this.endpoint||"function"!=typeof this.endpoint&&"string"!=typeof this.endpoint)throw new TypeError("endpoint必须为:文件上传URL字符串,或返回地址的函数!");if(!(this.file instanceof File))throw new TypeError("file必须为文件对象");if(this.headers&&"object"!=typeof this.headers)throw new TypeError("文件头必须为对象或空!");if(this.chunkSize&&("number"!=typeof this.chunkSize||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize必须大于0,并是256的整数倍");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`文件大小超过最大允许值:(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&("number"!=typeof this.attempts||this.attempts<=0))throw new TypeError("重试次数必须为正数!");if(this.delayBeforeAttempt&&("number"!=typeof this.delayBeforeAttempt||this.delayBeforeAttempt<0))throw new TypeError("延时重试时间必须为正数!默认为1")}getEndpoint(){return"string"==typeof this.endpoint?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then((e=>(this.endpointValue=e,this.endpointValue)))}getChunk(e=0){return new Promise((t=>{const n=1===this.totalChunks?this.file.size:this.chunkByteSize,r=n*e,i=new FileReader;i.onload=function(){null!==this.result?t({chunkIndex:e,chunkContent:new Blob([this.result],{type:"application/octet-stream"})}):t(void 0)},i.readAsArrayBuffer(this.file.slice(r,r+n))}))}xhrPromise(e){return new Promise(((t,n)=>{const r=e.headers,i=Number(r.ChunkIndex),o=(0,ao.default)({...e},((e,r)=>(this.mapXhrRequest.delete(i),e?n(e):t(r))));this.mapXhrRequest.set(i,o)}))}sendChunk(e,t){if(!t)return;const n=e*this.chunkByteSize,r=n+t.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,ChunkIndex:e.toString(),"Content-Type":this.file.type,"Content-Range":`bytes ${n}-${r}/${this.file.size}`};return this.dispatch("attempt",{chunkNumber:e,chunkSize:t.size}),this.endpointValue?this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:t}):(console.warn("文件上传endpointValue不能为空!"),void this.dispatch("error",{message:"文件上传endpointValue不能为空!取消上传!",chunk:e,attempts:this.attemptCount}))}sendChunks(e=0){this.paused||this.offline||this.success||this.okRecordList.indexOf(e)<0&&(this.currentMaxIndex<e&&(this.currentMaxIndex=e),this.getChunk(e).then((e=>{if(e){const{chunkIndex:t,chunkContent:n}=e;return this.sendChunk(t,n)}})).then((t=>{if(t)if(lo.includes(t.statusCode)){const n=JSON.parse(t.body).RESULTVALUE;if(n.STATE){this.attemptCount=0,this.chunkCount=this.chunkCount+1;const e=Math.round(n.INDEX/this.chunkByteSize);this.mapXhrRequest.delete(e),this.dispatch("chunkSuccess",{chunkCount:this.chunkCount,attempts:this.attemptCount,chunkNumber:e}),this.okRecordList.push(e),this.chunkCount<this.totalChunks&&!this.isResumed&&this.currentMaxIndex<this.totalChunks-1&&(this.currentMaxIndex++,this.sendChunks(this.currentMaxIndex));const t=100*this.chunkCount/this.totalChunks;this.dispatch("progress",t),n.END&&(this.success=!0,this.dispatch("success",this.fileName),this.okRecordList.length=0)}else{const t=`服务器错误:${n.NAME},停止上传。`;console.log(t),this.dispatch("error",{message:t,chunkNumber:e,attempts:0}),this.mapXhrRequest.delete(e),Ui(1e3).then((t=>this.sendChunks(e)))}}else if(null!=t&&co.includes(t.statusCode)){if(this.paused||this.offline)return}else{if(this.paused||this.offline)return;console.log(`服务器错误:${t?.statusCode},停止上传。`),this.dispatch("error",{message:`服务器错误:${t?.statusCode},停止上传。`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}else console.warn("上传失败的索引为:"+e)})).catch((e=>{!this.paused&&this.offline})))}},ho=e=>new uo(e),fo=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():0}getViewportOffset(e){const t=document.documentElement,n=t.scrollLeft,r=t.scrollTop,i=t.clientLeft,o=t.clientTop,s=globalThis.scrollX,a=globalThis.scrollY,{left:l,top:c,width:u,height:h}=this.getBoundingClientRect(e),d=l+s-((s||n)-(i||0)),f=c+a-((a||r)-(o||0)),p=globalThis.document.documentElement.clientWidth,g=globalThis.document.documentElement.clientHeight;return{left:d,top:f,right:p-u-d,bottom:g-h-f,rightIncludeBody:p-d,bottomIncludeBody:g-f}}hackCss(e,t){const n={};return["webkit","Moz","ms","OT"].forEach((r=>{n[`${r}${Se.UpperFirst(e)}`]=t})),{...n,[e]:t}}on(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}off(e,t,n){e&&t&&n&&e.removeEventListener(t,n,!1)}once(e,t,n){const r=function(...i){n&&n.apply(this,i),this.off(e,t,r)};this.on(e,t,r)}},po=x({isLock:!1,lockTime:0});function go(e){po.isLock=e,e&&(Te(),console.log("锁屏了……"))}function mo(){return po.isLock}function vo(){clearInterval(eo),globalThis.location.href.indexOf("/login")>0||po.isLock||(go(!1),po.lockTime=function(){let e=3600;return ve.Config.UI?.LockTime&&ve.Config.UI?.LockTime>=10&&(e=ve.Config.UI.LockTime),e}(),eo=setInterval((()=>{if(po.lockTime--,po.lockTime<=0)return go(!0),clearInterval(eo)}),1e3))}function yo(){vo(),document.addEventListener("mousedown",vo),document.addEventListener("mousemove",vo)}function wo(){document.removeEventListener("mousedown",vo),document.removeEventListener("mousemove",vo)}var bo,So=ne(((e,t)=>{to(),function(n){"object"==typeof e&&void 0!==t?t.exports=n():"function"==typeof define&&define.amd?define([],n):("undefined"!=typeof window?window:void 0!==Xr?Xr:"undefined"!=typeof self?self:this).localforage=n()}((function(){return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof ie&&ie;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return i(t[s][1][e]||e)}),u,u.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof ie&&ie,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){(function(e){var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==Xr?Xr:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){var r=e(1);function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var s=p((function(){t(i,r)}));"error"===s.status&&r(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(i);return this.state!==l?h(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)f(e,r);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==n||r||(r=!0,o.resolve(c,s))}),(function(e){r||(r=!0,o.reject(c,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=-1,a=new this(i);++s<n;)l(e[s]);return a;function l(e){t.resolve(e).then((function(e){r||(r=!0,o.resolve(a,e))}),(function(e){r||(r=!0,o.reject(a,e))}))}}},{1:1}],3:[function(e,t,n){(function(t){"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==Xr?Xr:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var s=Promise;function a(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function l(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function u(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var h="local-forage-detect-blob-support",d=void 0,f={},p=Object.prototype.toString,g="readonly",m="readwrite";function v(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}function y(e){return"boolean"==typeof d?s.resolve(d):function(e){return new s((function(t){var n=e.transaction(h,m),r=o([""]);n.objectStore(h).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);t(navigator.userAgent.match(/Edge\//)||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function w(e){var t=f[e.name],n={};n.promise=new s((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function b(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function S(e,t){var n=f[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function C(e,t){return new s((function(n,r){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);w(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var s=i.open.apply(i,o);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(h)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),r(s.error)},s.onsuccess=function(){var t=s.result;t.onversionchange=function(e){e.target.close()},n(t),b(e)}}))}function x(e){return C(e,!1)}function E(e){return C(e,!0)}function k(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function M(e){return o([v(atob(e.data))],{type:e.type})}function z(e){return e&&e.__local_forage_encoded_blob}function T(e){var t=this,n=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return l(n,e,e),n}function A(e,t,n,r){void 0===r&&(r=1);try{n(null,e.db.transaction(e.storeName,t))}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return s.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),E(e)})).then((function(){return function(e){w(e);for(var t=f[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,x(e).then((function(t){return e.db=t,k(e)?E(e):t})).then((function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r})).catch((function(t){throw S(e,t),t}))}(e).then((function(){A(e,t,n,r-1)}))})).catch(n);n(i)}}var L={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=f[n.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=T);var o=[];function a(){return s.resolve()}for(var l=0;l<i.forages.length;l++){var c=i.forages[l];c!==t&&o.push(c._initReady().catch(a))}var u=i.forages.slice(0);return s.all(o).then((function(){return n.db=i.db,x(n)})).then((function(e){return n.db=e,k(n,t._defaultConfig.version)?E(n):e})).then((function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<u.length;r++){var o=u[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new s((function(t,r){n.ready().then((function(){A(n._dbInfo,g,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var r=n.value;z(r)&&(r=M(r));var i=e(r,n.key,a++);void 0!==i?t(i):n.continue()}else t()},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},getItem:function(e,t){var n=this;e=c(e);var r=new s((function(t,r){n.ready().then((function(){A(n._dbInfo,g,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).get(e);s.onsuccess=function(){var e=s.result;void 0===e&&(e=null),z(e)&&(e=M(e)),t(e)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},setItem:function(e,t,n){var r=this;e=c(e);var i=new s((function(n,i){var o;r.ready().then((function(){return o=r._dbInfo,"[object Blob]"===p.call(t)?y(o.db).then((function(e){return e?t:(n=t,new s((function(e,t){var r=new FileReader;r.onerror=t,r.onloadend=function(t){e({__local_forage_encoded_blob:!0,data:btoa(t.target.result||""),type:n.type})},r.readAsBinaryString(n)})));var n})):t})).then((function(t){A(r._dbInfo,m,(function(o,s){if(o)return i(o);try{var a=s.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var l=a.put(t,e);s.oncomplete=function(){void 0===t&&(t=null),n(t)},s.onabort=s.onerror=function(){i(l.error?l.error:l.transaction.error)}}catch(e){i(e)}}))})).catch(i)}));return a(i,n),i},removeItem:function(e,t){var n=this;e=c(e);var r=new s((function(t,r){n.ready().then((function(){A(n._dbInfo,m,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(s.error)},o.onabort=function(){r(s.error?s.error:s.transaction.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},clear:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){A(t._dbInfo,m,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){n(o.error?o.error:o.transaction.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,e),n},length:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){A(t._dbInfo,g,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,e),n},key:function(e,t){var n=this,r=new s((function(t,r){e<0?t(null):n.ready().then((function(){A(n._dbInfo,g,(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,l=s.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},l.onerror=function(){r(l.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},keys:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){A(t._dbInfo,g,(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var t=o.result;t?(s.push(t.key),t.continue()):e(s)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,e),n},dropInstance:function(e,t){t=u.apply(this,arguments);var n,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var o=e.name===r.name&&this._dbInfo.db?s.resolve(this._dbInfo.db):x(e).then((function(t){var n=f[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t}));n=e.storeName?o.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;w(e);var r=f[e.name],o=r.forages;t.close();for(var a=0;a<o.length;a++){var l=o[a];l._dbInfo.db=null,l._dbInfo.version=n}return new s((function(t,r){var o=i.open(e.name,n);o.onerror=function(e){o.result.close(),r(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,b(n._dbInfo)}})).catch((function(t){throw(S(e,t)||s.resolve()).catch((function(){})),t}))}})):o.then((function(t){w(e);var n=f[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;return new s((function(t,n){var r=i.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<r.length;t++)b(r[t]._dbInfo)})).catch((function(t){throw(S(e,t)||s.resolve()).catch((function(){})),t}))}))}else n=s.reject("Invalid arguments");return a(n,t),n}},_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R=/^~~local_forage_type~([^~]+)~/,I="__lfsc__:",D="arbf",P="blob",O="si08",N="ui08",B="uic8",F="si16",W="si32",U="ur16",j="ui32",$="fl32",H="fl64",q=Object.prototype.toString;function G(e){var t,n,r,i,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)n=_.indexOf(e[t]),r=_.indexOf(e[t+1]),i=_.indexOf(e[t+2]),o=_.indexOf(e[t+3]),u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|i>>2,u[l++]=(3&i)<<6|63&o;return c}function X(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=_[n[t]>>2],r+=_[(3&n[t])<<4|n[t+1]>>4],r+=_[(15&n[t+1])<<2|n[t+2]>>6],r+=_[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var V={serialize:function(e,t){var n="";if(e&&(n=q.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===q.call(e.buffer))){var r,i=I;e instanceof ArrayBuffer?(r=e,i+=D):(r=e.buffer,"[object Int8Array]"===n?i+=O:"[object Uint8Array]"===n?i+=N:"[object Uint8ClampedArray]"===n?i+=B:"[object Int16Array]"===n?i+=F:"[object Uint16Array]"===n?i+=U:"[object Int32Array]"===n?i+=W:"[object Uint32Array]"===n?i+=j:"[object Float32Array]"===n?i+=$:"[object Float64Array]"===n?i+=H:t(new Error("Failed to get type for BinaryArray"))),t(i+X(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+X(this.result);t(I+P+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,9)!==I)return JSON.parse(e);var t,n=e.substring(13),r=e.substring(9,13);if(r===P&&R.test(n)){var i=n.match(R);t=i[1],n=n.substring(i[0].length)}var s=G(n);switch(r){case D:return s;case P:return o([s],{type:t});case O:return new Int8Array(s);case N:return new Uint8Array(s);case B:return new Uint8ClampedArray(s);case F:return new Int16Array(s);case U:return new Uint16Array(s);case W:return new Int32Array(s);case j:return new Uint32Array(s);case $:return new Float32Array(s);case H:return new Float64Array(s);default:throw new Error("Unkown type: "+r)}},stringToBuffer:G,bufferToString:X};function K(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function Z(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):K(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,s)}),o)}function Y(e,t,n,r){var i=this;e=c(e);var o=new s((function(o,s){i.ready().then((function(){void 0===t&&(t=null);var a=t,l=i._dbInfo;l.serializer.serialize(t,(function(t,c){c?s(c):l.db.transaction((function(n){Z(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(Y.apply(i,[e,a,n,r-1]));s(t)}}))}))})).catch(s)}));return a(o,n),o}var J={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new s((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(i){K(i,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=V,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT * FROM "+i.storeName,[],(function(n,r){for(var o=r.rows,s=o.length,a=0;a<s;a++){var l=o.item(a),c=l.value;if(c&&(c=i.serializer.deserialize(c)),void 0!==(c=e(c,l.key,a+1)))return void t(c)}t()}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},getItem:function(e,t){var n=this;e=c(e);var r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},setItem:function(e,t,n){return Y.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=c(e);var r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},clear:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,e),n},length:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,e),n},key:function(e,t){var n=this,r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){Z(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){t(n.rows.length?n.rows.item(0).key:null)}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},keys:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){Z(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,e),n},dropInstance:function(e,t){t=u.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return r=e.name?new s((function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(function(e){return new s((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}(r))})).then((function(e){return new s((function(t,n){e.db.transaction((function(r){function i(e){return new s((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var o=[],a=0,l=e.storeNames.length;a<l;a++)o.push(i(e.storeNames[a]));s.all(o).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):s.reject("Invalid arguments"),a(r,t),r}};function Q(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}var ee={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=Q(e,this._defaultConfig),!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0?(this._dbInfo=t,t.serializer=V,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,s=1,a=0;a<o;a++){var l=localStorage.key(a);if(0===l.indexOf(r)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(i),s++)))return c}}}));return a(r,t),r},getItem:function(e,t){var n=this;e=c(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return a(r,t),r},setItem:function(e,t,n){var r=this;e=c(e);var i=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new s((function(i,o){var s=r._dbInfo;s.serializer.serialize(t,(function(t,r){if(r)o(r);else try{localStorage.setItem(s.keyPrefix+e,t),i(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return a(i,n),i},removeItem:function(e,t){var n=this;e=c(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return a(r,t),r},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return a(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return a(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return a(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r}));return a(n,e),n},dropInstance:function(e,t){if(t=u.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return r=e.name?new s((function(t){e.storeName?t(Q(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):s.reject("Invalid arguments"),a(r,t),r}},te=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},ne=function(e,t){for(var n=e.length,r=0;r<n;){if(te(e[r],t))return!0;r++}return!1},re=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},ie={},oe={},se={INDEXEDDB:L,WEBSQL:J,LOCALSTORAGE:ee},ae=[se.INDEXEDDB._driver,se.WEBSQL._driver,se.LOCALSTORAGE._driver],le=["dropInstance"],ce=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(le),ue={description:"",driver:ae.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function he(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function de(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(re(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}t.exports=new(function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),se)if(se.hasOwnProperty(n)){var r=se[n],i=r._driver;this[n]=i,ie[i]||this.defineDriver(r)}this._defaultConfig=de({},ue),this._config=de({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new s((function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=ce.concat("_initStorage"),l=0,c=o.length;l<c;l++){var u=o[l];if((!ne(le,u)||e[u])&&"function"!=typeof e[u])return void n(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=s.reject(t);return a(n,arguments[arguments.length-1]),n}},n=0,r=le.length;n<r;n++){var i=le[n];e[i]||(e[i]=t(i))}}();var h=function(n){ie[r]&&console.info("Redefining LocalForage driver: "+r),ie[r]=e,oe[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(h,n):h(!!e._support):h(!0)}catch(e){n(e)}}));return l(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=ie[e]?s.resolve(ie[e]):s.reject(new Error("Driver not found."));return l(r,t,n),r},e.prototype.getSerializer=function(e){var t=s.resolve(V);return l(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return l(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;re(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function a(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}var c=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=c.then((function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then((function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(a).catch(n)}o();var l=new Error("No available storage method found.");return r._driverSet=s.reject(l),r._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return r._driverSet=s.reject(e),r._driverSet})),l(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!oe[e]},e.prototype._extend=function(e){de(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=ce.length;e<t;e++)he(this,ce[e])},e.prototype.createInstance=function(t){return new e(t)},e}())},{3:3}]},{},[4])(4)}))})),Co=re(So(),1),xo={exports:{}};xo.exports,bo=()=>{const e=globalThis;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let t=null,n=!1;const r=e.WebStreamsPolyfill||{};let i=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const o={createWriteStream:function(e,r=null,a=null){let l={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},c=0,u=null,h=null,d=null;if(Number.isFinite(r)?([a,r]=[r,a],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):r&&r.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),l.size=a,l.writableStrategy=r):l=r||{},!i){t||(t=s(o.mitm)),h=new MessageChannel,e=encodeURIComponent(e.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const r={transferringReadable:n,pathname:l.pathname||Math.random().toString().slice(-6)+"/"+e,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+e}};l.size&&(r.headers["Content-Length"]=l.size);const i=[r,"*",[h.port2]];if(n){const e=void 0;d=new o.TransformStream(e,l.writableStrategy,l.readableStrategy);const t=d.readable;h.port1.postMessage({readableStream:t},[t])}h.port1.onmessage=e=>{e.data.download?(t.isPopup&&(t.remove(),t=null,s(o.mitm)),s(e.data.download)):e.data.abort&&(f=[],h.port1.postMessage("abort"),h.port1.onmessage=null,h.port1.close(),h.port2.close(),h=null)},t.loaded?t.postMessage(...i):t.addEventListener("load",(()=>{t.postMessage(...i)}),{once:!0})}let f=[];return!i&&d&&d.writable||new o.WritableStream({write(e){if(!(e instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");i?f.push(e):(h.port1.postMessage(e),c+=e.length,u&&(location.href=u,u=null))},close(){if(i){const t=new Blob(f,{type:"application/octet-stream; charset=utf-8"}),n=document.createElement("a");n.href=URL.createObjectURL(t),n.download=e,n.click()}else h.port1.postMessage("end")},abort(){f=[],h.port1.postMessage("abort"),h.port1.onmessage=null,h.port1.close(),h.port2.close(),h=null}},l.writableStrategy)},WritableStream:e.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"./mitm.html"};function s(e){if(!e)throw new Error("meh");const t=document.createElement("iframe");return t.hidden=!0,t.src=e,t.loaded=!1,t.name="iframe",t.isIframe=!0,t.postMessage=(...e)=>t.contentWindow.postMessage(...e),t.addEventListener("load",(()=>{t.loaded=!0}),{once:!0}),document.body.appendChild(t),t}try{new Response(new ReadableStream),"serviceWorker"in navigator||(i=!0)}catch(e){i=!0}return(()=>{try{(()=>{const{readable:e}=new TransformStream,t=new MessageChannel;t.port1.postMessage(e,[e]),t.port1.close(),t.port2.close(),n=!0,Object.defineProperty(o,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})})()}catch(e){}})(),o},void 0!==xo?xo.exports=bo():"function"==typeof define&&"object"==typeof define.amd?define(bo):(void 0).streamSaver=bo();var Eo=(null==xo.exports?{}:xo.exports).default||xo.exports,ko=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,r=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=oe(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("开始获取文件信息");const r=await $i(t,e,n);let i=null;return r&&200===r.status&&(i=r.data),i}async getIFileMeta(){if(null===this.fileMetaData){const e=await(this.currentDB?.getItem("fileinfo"));this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Co.default.createInstance({name:this.fileID,driver:Co.default.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(null!=this.fileMetaData){const e=this.fileMetaData.chunkSize;null!=e&&e>0&&(this.chunkByteSize=e)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("完成初始化文件信息,总分片:"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("已暂停下载任务")}restart(){this.dispatchInfo("正在重启下载任务"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Co.default.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("已删除下载任务")}sleep(e){return new Promise((t=>setTimeout(t,e)))}async download(e,t,n){let r=e;if(!r&&this.downloadURL&&(r=this.downloadURL),!r)throw Error("下载URL不能为空!");this.currentDB||this.initIndexDB();const i=ve.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const o={key:this.fileMetaData?.downloadID},s=n??o;let a=0;const l=this.cacheSize;let c=0;for(let u=0;u<this.totalChunks;u++){if(this.keys&&this.keys?.indexOf(u.toString())>=0){a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());continue}const e=u*this.chunkByteSize;let n=e+this.chunkByteSize-1;this.fileMetaData&&n>this.fileMetaData.length&&(n=this.fileMetaData.length-1);const i={range:`bytes=${e}-${n}`};for(;c>=l;)await this.sleep(200);const o=u.toString();this.dispatchInfo(`开始下载分片${u+1}/${this.totalChunks}`),c++,$i(r,t,s,i,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then((async e=>{const t=e.data;c--,await(this.currentDB?.setItem(o,t)),a++,a>this.finishNum&&(this.finishNum=a,this.downloadProgress());const n=parseInt(o)+1;this.dispatchInfo(`完成下载分片${n}/${this.totalChunks}`),this.savefile()})).catch((e=>{c--;const t=parseInt(o)+1;this.dispatchError(`下载第${t})个分片内容失败!`)}))}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("下载错误:文件名为空!");this.dispatchInfo("开始保存下载文件:"+this.fileName);const e=Eo.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const r=n.toString();let i=await(this.currentDB?.getItem(r));if(i||(i=await(this.currentDB?.getItem(r))),!i)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);let o=new Response(i).body;if(null===o)return void this.dispatchError(`输出分片第${n+1})个内容为空,错误退出!`);const s=o.getReader();for(;;){const{done:t,value:n}=await s.read();if(t)break;await e.write(n)}t++,this.outputProgress(t),this.dispatchInfo(`完成第${n+1}个分片输出`)}e.close(),Co.default.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("完成文件下载")}}};function Mo(e,t){let n="",r="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),r=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,r}function zo(e={},t={}){let n;for(n in t)Ue(t[n])?e[n]=zo(e[n],t[n]):e[n]=t[n];return e}function To(e,t,n={name:void 0}){const r=e.resolve({path:t,query:n});globalThis.open(r.href,"_blank")}function Ao(e){let t=e;if(e.endsWith("/")){if(e.endsWith("/#/"))return t;t=e+"#/"}else t=e+"/#/"}function Lo(e,t="/"){if(e)return e.startsWith("/")?e.startsWith(t)?e:`${t}${e}`:"/"===t?`${t}${e}`:`${t}/${e}`}function _o(e,t){e.getRoutes().find((e=>"/"===e.path))||e.addRoute({name:"/",path:"/",redirect:t.path})}function Ro(e){const t=[];let n=[];return Object.keys(e).forEach((t=>{const r=e[t];r&&n.push(...r)})),n=n.sort(((e,t)=>{let n=0,r=0;return e.meta&&(n=null!=e.meta.index?Number(e.meta.index):100),t.meta&&(r=null!=t.meta.index?Number(t.meta.index):100),n-r})),t.push(...n),n.length=0,t}function Io(e,t=!1){let n=[];for(const r in e){const t=e[r];t&&t.length>0&&(n.push(...t),t.length=0),delete e[r]}return t&&(n=n.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n}function Do(e,t=!1){const n=[];let r=[];return Object.keys(e).forEach((t=>{const n=e[t];n&&r.push(...n)})),t&&(r=r.sort(((e,t)=>{let n=0,r=0;return null!=e.index&&(n=Number(e.index)),null!=t.index&&(r=Number(t.index)),n-r}))),n.push(...r),r.length=0,n}var Po=new Map;function Oo(e,t=!1){if(t&&Po.size>0)return Po;Po.clear();for(const n in e){const t=e[n];t&&t.length>0&&(t.forEach((e=>{let t;const n=e.layoutID;Po.has(n)&&(t=Po.get(n)),t||(t=new Array,Po.set(n,t)),t&&t.push(e)})),t.length=0),delete e[n]}return Po}function No(e,t="/"){let n=t;return e.redirect&&e.children?(n=e.path.startsWith(t)?e.path:t.endsWith("/")?t+e.path:t+"/"+e.path,No(e.children[0],n)):(n=e.path.startsWith(t)?e.path:`${t}/${e.path}`,{title:e.meta?.title,fullPath:n,path:e.path,icon:e.meta?.icon,keepAlive:e.meta?.keepAlive,name:e.name})}function Bo(e,t){const n=`${e}_${t}`;return dt.MD5(n)}function Fo(e){const t=function(e){if(!e)return;const t=e,n=[];if(t)for(let r of t){const e=Wo(r);e&&n.push(e)}return n}(e.bussinessRoutes),n=function(e){if(!e)return;const t=e;if(t&&t.length>0){const e=[];return t.forEach((t=>{const n=Uo(t);n&&e.push(n)})),e}}(e.widgetMenuConfig),r=function(e){if(e&&e.length>0){const t=[];return e.forEach((e=>{const n=(r=e)?{id:r.id,label:r.label,layoutID:r.layoutID,container:r.container,preload:r.preload,afterid:r.afterid,bindid:r.bindid,group:r.group}:void 0;var r;n&&t.push(n)})),t}}(e.widgetConfig),i=function(e){if(e)return e.length>0?e:void 0}(e.functionList),o=e.pkgObject.version,s=e.pkgObject.name;return{id:Bo(s,o),name:ve.Config.UI.SiteTitle,group:ve.Config.UI.Group,product:s,version:o,routes:t,widgetMenu:n,widgets:r,functions:i}}function Wo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const t=[];for(let n of e.children){const e=Wo(n);e&&t.push(e)}t.length>0&&(n.children=t)}return n}}function Uo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach((e=>{const n=Uo(e);n&&t.children?.push(n)}))),t}function jo(e,t="IconifyList.ts"){let n="",r="const iconlist={\n",i=0;e.forEach((e=>{const t=e.split(":");if(t&&2===t.length){const o="icon"+i;n+=`import ${o} from '~icons/${t[0]}/${t[1]}'\n`,r+=`\t'${e}':${o},\n`,i++}})),i>0&&(r+="};\n",ar(n+r+"export default iconlist;","IconifyList.ts"))}function $o(e,t){cr(Fo(e),t),ve.Message?.msg("导出系统功能权限文件成功!")}function Ho(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function qo(e){let t=Go(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function Go(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function Xo(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function Vo(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Ko(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Zo(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Yo(e){let t=Go(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Jo(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Qo(e,t="仟佰拾亿仟佰拾万仟佰拾元角分",n=""){let r=(e+="00").indexOf(".");r>=0&&(e=e.substring(0,r)+e.substring(r+1,r+3)),t=t.substring(t.length-e.length);for(let i=0;i<e.length;i++)n+="零壹贰叁肆伍陆柒捌玖".substring(e.substring(i,i+1),1)+t.substring(i,i+1);return n.replace(/零角零分$/,"整").replace(/零[仟佰拾]/g,"零").replace(/零{2,}/g,"零").replace(/零([亿|万])/g,"$1").replace(/零+元/,"元").replace(/亿零{0,3}万/,"亿").replace(/^元/,"零元")}function es(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function ts(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function ns(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function rs(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function is(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function os(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="弱"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="中"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="强"),t}function ss(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function as(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function ls(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function cs(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function us(e){return!!/^[1-9][0-9]{5}$/.test(e)}function hs(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function ds(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}function fs(e){e&&ve.EventBus.emit(ce.ModalContainerWidget_LoadModal,e)}function ps(e){ve.EventBus.emit(ce.ModalContainerWidget_CloseModal,e)}var gs=[],ms=()=>{setTimeout((async()=>{await async function(){const e=await async function(e){const t=/<script.*src=["'](?<src>[^"']+)/gm,n=[];let r;for(;r=t.exec(e);)n.push(r.groups?.src??"");return n}(await fetch("/").then((e=>e.text())));if(!gs.length)return gs=e,!1;if(e.length!==gs.length)return gs=e,!0;for(let t=0;t<gs.length;t++)if(gs[t]!==e[t])return gs=e,!0;return!1}()?confirm("页面有更新,点击确定刷新页面?")&&location.reload():ms()}),5e3)};function vs(e,t=Co.default.INDEXEDDB){return Co.default.createInstance({name:e,driver:t})}function ys(e){Co.default.dropInstance({name:e})}async function ws(e){const t=(await fetch(e)).body?.getReader();if(!t)return;let n=0;const r=[];for(;;){const{done:e,value:i}=await t.read();if(e)break;r.push(i),n+=i.length,console.log(`已接收: ${(n/1024/1024).toFixed(2)}MB`)}const i=new Uint8Array(n);let o=0;for(let s of r)i.set(s,o),o+=s.length;return r.length=0,i}async function bs(e){const t=await ws(e);if(t)return new TextDecoder("utf-8").decode(t)}async function Ss(e,t="application/octet-stream"){const n=await ws(e);if(n)return new Blob([n],{type:t})}async function Cs(e,t="/upload",n){const r=e.stream();let i=0;const o=new TransformStream({transform(t,r){i+=t.length;const o=(i/e.size*100).toFixed(2);console.log(`上传进度: ${o}%`),n&&n(o),r.enqueue(t)}}),s=r.pipeThrough(o);return(await fetch(t,{method:"POST",body:s})).json()}async function xs(e,t,n=128){const r=(await fetch(t)).body?.getReader();if(!r)return;const i=e.width,o=e.height,s=e.getContext("2d");let a=0,l=[];const c=1024*n;for(;;){const{done:e,value:t}=await r.read();if(e)break;l.push(t),a+=t.length,a>c&&(await Es(s,i,o,l),a=0)}await Es(s,i,o,l,!0)}async function Es(e,t,n,r,i=!1){const o=new Blob(r,{type:"image/jpeg"}),s=URL.createObjectURL(o);return new Promise((r=>{const i=new Image;i.onload=()=>{e.clearRect(0,0,t,n),e.drawImage(i,0,0),URL.revokeObjectURL(s),r(!0)},i.src=s}))}var ks=class{sizes={sm:600,md:1024,lg:1440,xl:1920};lt={sm:!0,md:!0,lg:!0,xl:!0};gt={xs:!1,sm:!1,md:!1,lg:!1};xs=!0;sm=!1;md=!1;lg=!1;xl=!1;getSize(){const{visualViewport:e}=window,t=document.scrollingElement||document.documentElement;return void 0===e||ct()?[Math.max(window.innerWidth,t.clientWidth),Math.max(window.innerHeight,t.clientHeight)]:e?[e.width*e.scale+window.innerWidth-t.clientWidth,e.height*e.scale+window.innerHeight-t.clientHeight]:[window.innerWidth-t.clientWidth,window.innerHeight-t.clientHeight]}updateSize(){const[e,t]=this.getSize();let n=this.sizes;this.gt.xs=e>=n.sm,this.gt.sm=e>=n.md,this.gt.md=e>=n.lg,this.gt.lg=e>=n.xl,this.lt.sm=e<n.sm,this.lt.md=e<n.md,this.lt.lg=e<n.lg,this.lt.xl=e<n.xl,this.xs=this.lt.sm,this.sm=!0===this.gt.xs&&!0===this.lt.md,this.md=!0===this.gt.sm&&!0===this.lt.lg,this.lg=!0===this.gt.md&&!0===this.lt.xl,this.xl=this.gt.lg}},Ms=new ks,zs=new Map,Ts=E(new Map),As=class{static ZIndexMax=1;static addWindowPanel(e){zs.set(e.id,e)}static removeWindowPanel(e){zs.has(e)&&(zs.delete(e),Ts.value.delete(e))}static minimizeWindowPanel(e){zs.has(e)&&Ts.value.set(e,-1)}static openWindowPanel(e){if(zs.has(e)){Ts.value.set(e,1);const t=document.getElementById(e);t&&t.open&&t.open()}}},Ls={width:1024,height:1024,body:'<path fill="currentColor" fill-rule="evenodd" d="M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926L224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512L166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"/>'},_s={width:1024,height:1024,body:'<path fill="currentColor" d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"/>'},Rs={width:1024,height:1024,body:'<path fill="currentColor" d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"/>'},Is={width:1024,height:1024,body:'<path fill="currentColor" d="M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"/>'},Ds=["id"],Ps=["src"],Os={key:1,class:"paneltitle"},Ns={class:"dragPanelBar"},Bs={class:"dragPanelContent"},Fs={class:"drag-pointer-group"},Ws=ye(d({__name:"XWindow",props:{top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},nWidth:{type:[String,Number],default:"300px"},nHeight:{type:[String,Number],default:"400px"},icon:{type:String,default:""},title:{type:String,default:""},titleHeight:{type:[String,Number],default:"40px"},hasMin:{type:Boolean,default:!1},hasMax:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},pid:{type:String,default:""},tag:{type:[String,Array,Object,Number],default:""},right:{type:[String,Number],default:"unset"},bottom:{type:[String,Number],default:"unset"}},emits:["close","open","loaded","minimize"],setup(e,{expose:t,emit:n}){const i=St(),u=E(i),h=e,d=n,f=E(),p=E(),g=o((()=>h.isDark)),m=E({x:0,y:0}),w=E({width:0,height:0}),x=e=>{f.value&&(f.value.style.left=`${e.x}px`,f.value.style.top=`${e.y}px`)};I((()=>m.value),(e=>{x(e)}));const k=e=>{f.value&&(f.value.style.width=`${e.width}px`,f.value.style.height=`${e.height}px`)};I((()=>w.value),(e=>{k(e)}));const z={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(z.refs).forEach((([e,t])=>{t.value&&t.value.addEventListener("mousedown",(t=>{z.mouseDown(t,e)}))}))},mouseDown:(e,t)=>{0==e.button&&(e.preventDefault(),z.startingEdges={left:m.value.x,top:m.value.y,right:m.value.x+w.value.width,bottom:m.value.y+w.value.height},z.newEdges={...z.startingEdges},z.clickStart={x:e.clientX,y:e.clientY},z.eventListenerController=new AbortController,document.addEventListener("mousemove",(e=>{z.mouseMove(e,t)}),{signal:z.eventListenerController.signal}),document.addEventListener("mouseup",(e=>{z.mouseUp(e,t)}),{signal:z.eventListenerController.signal}))},mouseMove:(e,t)=>{if(null!=z.startingEdges&&null!=z.newEdges&&null!=z.clickStart&&z.refs[t].value){if(e.preventDefault(),console.log("mouseMove",t),t.toLowerCase().includes("north")){z.newEdges.top=Math.max(z.startingEdges.top+e.clientY-z.clickStart.y,0);const t=z.newEdges.bottom-z.newEdges.top-100;t<0&&(z.newEdges.top+=t)}else t.toLowerCase().includes("south")&&(z.newEdges.bottom=Math.min(z.startingEdges.bottom+e.clientY-z.clickStart.y,document.body.clientHeight));if(t.toLowerCase().includes("west")){z.newEdges.left=Math.max(z.startingEdges.left+e.clientX-z.clickStart.x,0);const t=z.newEdges.right-z.newEdges.left-250;t<0&&(z.newEdges.left+=t)}else t.toLowerCase().includes("east")&&(z.newEdges.right=Math.min(z.startingEdges.right+e.clientX-z.clickStart.x,document.body.clientWidth));z.update()}},update:()=>{null!=z.newEdges&&null!=z.startingEdges&&(m.value={x:Math.max(z.newEdges.left,0),y:Math.max(z.newEdges.top,0)},w.value={width:Math.min(Math.max(z.newEdges.right-z.newEdges.left,250),document.body.clientWidth),height:Math.min(Math.max(z.newEdges.bottom-z.newEdges.top,100),document.body.clientHeight)})},mouseUp:(e,t)=>{0==e.button&&null!=z.startingEdges&&(console.log("mouseUp",t),e.preventDefault(),z.startingEdges=null,z.newEdges=null,z.clickStart=null,z.eventListenerController&&(z.eventListenerController.abort(),z.eventListenerController=null))},refs:{northWest:E(null),north:E(null),northEast:E(null),west:E(null),east:E(null),southWest:E(null),south:E(null),southEast:E(null)}},T={startingMouse:null,startingPosition:null,mouseDown:e=>{0==e.button&&(e.preventDefault(),console.log("mouseDown"),T.startingMouse={x:e.clientX,y:e.clientY},T.startingPosition=m.value,document.addEventListener("mousemove",T.mouseMove),document.addEventListener("mouseup",T.mouseUp))},mouseMove:e=>{T.startingMouse&&T.startingPosition&&(e.preventDefault(),m.value={x:Math.min(Math.max(T.startingPosition.x+e.clientX-T.startingMouse.x,0),document.body.clientWidth-w.value.width),y:Math.max(T.startingPosition.y+e.clientY-T.startingMouse.y,0)})},mouseUp:e=>{0==e.button&&T.startingMouse&&T.startingPosition&&(e.preventDefault(),T.startingMouse=null,T.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",T.mouseMove),document.removeEventListener("mouseup",T.mouseUp))}};function _(e){return{id:i,icon:h.icon,title:h.title,pid:h.pid,data:e??h.tag}}const N=E(1),B=o((()=>!(-1===Ts.value.get(i)))),F=E(!1),W=E(!0),U=o((()=>"z-index:"+N.value));function j(){N.value<=As.ZIndexMax&&(As.ZIndexMax+=1,N.value=As.ZIndexMax)}function $(){d("minimize",_()),As.minimizeWindowPanel(i)}function H(){F.value=!F.value}function q(){d("close",_(!1)),W.value=!1}const G=o((()=>F.value?Is:Rs)),X={id:i,isShow:B,close:q,open:function(){d("open",_(!0)),W.value=!0},showHidePanel:$,updatePosition:x};function V(e,t=document.body.clientWidth){if($e(e))return e;{const n=Number(e);if(n==n)return n;if(e.endsWith("px")){const t=e.substring(0,e.length-2);return Number(t)}if(e.endsWith("%")){const n=e.substring(0,e.length-1);return Number(n)/100*t}return 300}}function Z(e,t){if(!f.value)return void console.warn("dragPanelRef.value当前窗体html元素为空!");let n=e??document.body.clientWidth,r=t??document.body.clientHeight,i=V(h.left,n),o=V(h.top,r);"unset"==h.bottom&&"unset"==h.right||("unset"!=h.right&&(i=n-V(h.right,n)-w.value.width),"unset"!=h.bottom&&(o=r-V(h.bottom,r)-w.value.height)),m.value.x=i,m.value.y=o,x(m.value)}function Y(){if(J&&("unset"!=h.bottom||"unset"!=h.right)){const e=J.getBoundingClientRect();Z(e.width,e.height)}}let J;return t(X),b((()=>{!function(){let e=96;if(h.hasMin||(e-=32),h.hasMax||(e-=32),h.hasClose||(e-=32),dt.setCssVar("--right-bar-width",e+"px",p.value),!p.value)return;const t=$e(h.titleHeight)?h.titleHeight+"px":h.titleHeight;p.value.style.height=t,p.value.style.lineHeight=t}(),function(){const e=_(X);As.addWindowPanel(e),d("loaded",e)}();const{parentElement:e,clientWidth:t,clientHeight:n}=function(e){if(!(e instanceof HTMLElement))throw new Error("参数必须是有效的 DOM 元素");let t=e.parentElement;for(;t&&"static"===globalThis.getComputedStyle(t).position;)t=t.parentElement,t||(t=document.documentElement);return{clientWidth:t?.clientWidth,clientHeight:t?.clientHeight,parentElement:t}}(f.value);J=e,w.value={width:V(h.nWidth,t),height:V(h.nHeight,n)},k(w.value),Z(t,n),z.mount(),dt.windowResizeHandler(Y)})),S((()=>{dt.offWindowResizeHandler(Y),As.removeWindowPanel(i)})),(t,n)=>(C(),s(r,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:D((()=>[W.value?P((C(),l("div",{key:0,ref_key:"dragPanelRef",ref:f,id:u.value,class:v(["dragWindowPanel",{maxPanel:F.value,dragWindowPanel_dark:g.value}]),style:y(U.value)},[c("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:p,onMousedown:n[0]||(n[0]=(...e)=>T.mouseDown&&T.mouseDown(...e)),onClick:O(j,["stop"])},[M(t.$slots,"title",{},(()=>[h.icon?(C(),l("img",{key:0,src:h.icon,width:"24",height:"24"},null,8,Ps)):a("",!0),h.title?(C(),l("span",Os,A(h.title),1)):a("",!0)]),!0),c("div",Ns,[e.hasMin?(C(),s(L(K),{key:0,icon:L(_s),onClick:O($,["stop"])},null,8,["icon"])):a("",!0),e.hasMax?(C(),s(L(K),{key:1,icon:G.value,onClick:O(H,["stop"])},null,8,["icon"])):a("",!0),e.hasClose?(C(),s(L(K),{key:2,icon:L(Ls),onClick:O(q,["stop"])},null,8,["icon"])):a("",!0)])],544),c("div",Bs,[M(t.$slots,"default",{},void 0,!0)]),c("div",Fs,[c("div",{class:"cursor-nw-resize",ref:z.refs.northWest},null,512),c("div",{class:"cursor-n-resize",ref:z.refs.north},null,512),c("div",{class:"cursor-ne-resize",ref:z.refs.northEast},null,512),c("div",{class:"cursor-w-resize",ref:z.refs.west},null,512),n[1]||(n[1]=c("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1)),c("div",{class:"cursor-e-resize",ref:z.refs.east},null,512),c("div",{class:"cursor-sw-resize",ref:z.refs.southWest},null,512),c("div",{class:"cursor-s-resize",ref:z.refs.south},null,512),c("div",{class:"cursor-se-resize",ref:z.refs.southEast},null,512)])],14,Ds)),[[R,B.value]]):a("",!0)])),_:3}))}}),[["__scopeId","data-v-fe259582"]]),Us={class:"adivider"},js={class:"contentText"},$s=ye(d({__name:"ADivider",props:{align:{type:String,default:"left"},color:{type:String,default:"#888"}},setup(e){_((e=>({v1dc34ba7:n.value})));const t=e,n=o((()=>Li(t.color)||zi(t.color)?t.color:"#888")),r=o((()=>"left"!=t.align?"flex:1;":"width:40px;")),i=o((()=>"right"!=t.align?"flex:1;":"width:40px;"));return(e,t)=>(C(),l("div",Us,[c("div",{class:"line",style:y(r.value)},null,4),c("div",js,[M(e.$slots,"default",{},void 0,!0)]),c("div",{class:"line",style:y(i.value)},null,4)]))}}),[["__scopeId","data-v-133ad44f"]]),Hs={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce(((e,t)=>(e[t.id]=t)&&e),{})}},methods:{updatePaneComponents(){this.panes.forEach((e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})}))},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))),this.touch.mouseDown=!1,setTimeout((()=>{this.touch.dragging=!1,this.unbindEvents()}),100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout((()=>{this.splitterTaps.splitter=null}),500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map(((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e))),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:r}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:r-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const r=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(e),i),r);let s=[t,t+1],a=this.panes[s[0]]||null,l=this.panes[s[1]]||null;const c=a.max<100&&o>=a.max+n.prevPanesSize,u=l.max<100&&o<=100-(l.max+this.sumNextPanesSize(t+1));if(c||u)c?(a.size=a.max,l.size=Math.max(100-a.max-n.prevPanesSize-n.nextPanesSize,0)):(a.size=Math.max(100-l.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),l.size=l.max);else{if(this.pushOtherPanes){const e=this.doPushOtherPanes(n,o);if(!e)return;({sums:n,panesToResize:s}=e),a=this.panes[s[0]]||null,l=this.panes[s[1]]||null}null!==a&&(a.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,a.min),a.max)),null!==l&&(l.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,r=[n,n+1];return t<e.prevPanesSize+this.panes[r[0]].min&&(r[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,r[0]<n&&this.panes.forEach(((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),e.prevPanesSize=this.sumPrevPanesSize(r[0]),void 0===r[0])?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach(((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)})),this.panes[r[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach(((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),e.nextPanesSize=this.sumNextPanesSize(r[1]-1),void 0===r[1])?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach(((t,r)=>{r<this.panesCount-1&&r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)})),this.panes[r[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:r}},sumPrevPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r<e?n.size:0)),0)},sumNextPanesSize(e){return this.panes.reduce(((t,n,r)=>t+(r>e+1?n.size:0)),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find((t=>t.index<e&&t.size>t.min))||{}},findNextExpandedPane(e){return this.panes.find((t=>t.index>e+1&&t.size>t.min))||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach((e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")}))},addSplitter(e,t,n=!1){const r=e-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=e=>this.onMouseDown(e,r),"undefined"!=typeof window&&"ontouchstart"in window&&(i.ontouchstart=e=>this.onMouseDown(e,r)),i.onclick=e=>this.onSplitterClick(e,r+1)),this.dblClickSplitter&&(i.ondblclick=e=>this.onSplitterDblClick(e,r+1)),t.parentNode.insertBefore(i,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach((e=>{e.className.includes("splitpanes__splitter")&&this.removeSplitter(e)}));let t=0;e.forEach((e=>{e.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,e,!0):t&&this.addSplitter(t,e),t++)}))},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach((([e,t])=>n[e]=t))},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some((n=>(n.className.includes("splitpanes__pane")&&t++,n===e.$el)));const n=parseFloat(e.minSize),r=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:null===e.size?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach(((e,t)=>e.index=t)),this.ready&&this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},onPaneRemove(e){const t=this.panes.findIndex((t=>t.id===e._.uid)),n=this.panes.splice(t,1)[0];this.panes.forEach(((e,t)=>e.index=t)),this.$nextTick((()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map((e=>({min:e.min,max:e.max,size:e.size})))})}))},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some((e=>null!==e.givenSize||e.min||e.max<100))?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map((e=>({min:e.min,max:e.max,size:e.size}))))},equalize(){const e=100/this.panesCount;let t=0;const n=[],r=[];this.panes.forEach((i=>{i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id)})),t>.1&&this.readjustSizes(t,n,r)},initialPanesSizing(){let e=100;const t=[],n=[];let r=0;this.panes.forEach((i=>{e-=i.size,null!==i.size&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)}));let i=100;e>.1&&(this.panes.forEach((t=>{null===t.size&&(t.size=Math.max(Math.min(e/(this.panesCount-r),t.max),t.min)),i-=t.size})),i>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const r=[],i=[];e&&null!==e.givenSize&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach((e=>{n-=e.size,e.size>=e.max&&r.push(e.id),e.size<=e.min&&i.push(e.id)})),Math.abs(n)<.1||(this.panes.forEach((o=>{e&&null!==e.givenSize&&e.id===o.id||(o.size=Math.max(Math.min(t,o.max),o.min)),n-=o.size,o.size>=o.max&&r.push(o.id),o.size<=o.min&&i.push(o.id)})),n>.1&&this.readjustSizes(n,r,i))},readjustSizes(e,t,n){let r;r=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach((i=>{if(e>0&&!t.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){const t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})})),Math.abs(e)>.1&&this.$nextTick((()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")}))}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach(((t,n)=>{t.ondblclick=e?e=>this.onSplitterDblClick(e,n):void 0}))}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return f("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},qs={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||0===this.size?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}},Gs=ye(qs,[["render",function(e,t,n,r,i,o){return C(),l("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=t=>o.onPaneClick(t,e._.uid)),style:y(e.style)},[M(e.$slots,"default")],4)}]]),Xs=d({name:"Popover",__name:"index",props:{dir:{type:String,default:"bottom"}},emits:["show","hide"],setup(e,{emit:t}){const n=E(!1),i=t;return I(n,(()=>{n.value?i("show"):i("hide")})),document.addEventListener("click",(function(){n.value=!1})),(t,i)=>(C(),l("div",{class:"popover-cantainer",onClick:i[1]||(i[1]=O((()=>{}),["stop"]))},[h(r,{name:"popover-content-transition-"+e.dir},{default:D((()=>[n.value?M(t.$slots,"default",{key:0}):a("",!0)])),_:3},8,["name"]),c("div",{onClick:i[0]||(i[0]=e=>n.value=!n.value)},[t.$slots.reference?M(t.$slots,"reference",{key:0}):a("",!0)])]))}}),Vs={class:"xScreen-container"},Ks=d({__name:"index",setup(e){const t=E(null);let n=1920,r=1080;function i(){t.value&&(t.value.style.transform=`scale(${function(e=1920,t=1080){const n=window.innerWidth/e,r=window.innerHeight/t;return n<r?n:r}(n,r)}) translate(-50%, -50%)`)}return b((()=>{const e=window.innerWidth/window.innerHeight;if(e>=2.5||e<=.4||(n=n>window.innerWidth?window.innerWidth:n,r=r>window.innerHeight?window.innerHeight:r),t.value){const e=t.value;e.style.width=n+"px",e.style.height=r+"px",i()}dt.windowResizeHandler(i)})),(e,n)=>(C(),l("div",Vs,[c("div",{ref_key:"scaleContainerRef",ref:t,class:"xScreen"},[M(e.$slots,"default")],512)]))}}),Zs={class:"scrollSnapContainer"},Ys=d({__name:"index",props:{height:{type:Number,default:0}},setup(e){_((e=>({v3bebca7d:n.value})));const t=e,n=o((()=>$e(t.height)&&t.height>0?`${t.height}px`:"unset"));return(e,t)=>(C(),l("div",Zs,[M(e.$slots,"default")]))}});function Js(e){const t=new $(new W);return t.serialize(e),t.stream.toString()}function Qs(e){return null==e||""===e?e:new U(new W(e)).deserialize()}var ea=class e{debug=!1;simple=!1;utc=!1;longType="number";dictType="object";nullType=void 0;static Instance=new e;textEncoder=new TextEncoder;textDecoder=new TextDecoder;constructor(){}encodeResponse(e,t={}){var n=new W,r=new $(n,this.simple,this.utc),i=t;this.simple;var o=0;for(var s in i)o++;o>0&&(n.writeByte(72),r.serialize(i),r.reset()),e instanceof Error?(n.writeByte(69),r.serialize(this.debug&&e.stack?e.stack:e.message)):(n.writeByte(82),r.serialize(e)),n.writeByte(122);const a=n.takeBytes();return this.textDecoder.decode(a)}decodeRequest(e,t={}){const n=this.textEncoder.encode(e);if(0===n.length)return["~",[]];var r=new W(n),i=new U(r,!1);i.longType=this.longType,i.dictType=this.dictType;var o=r.readByte();if(console.log("tag",o),72===o){var s=i.deserialize(this.nullType);for(var a in s)t[a]=s[a];i.reset(),o=r.readByte()}switch(o){case 67:return[i.deserialize(String),this.decodeArguments(i)];case 122:return["~",[]];default:throw new Error("Invalid request:\r\n"+r.toString())}}decodeArguments(e){var t=e.stream;let n=[];if(97===t.readByte()){e.reset();var r=j.readCount(t);const o=new Array(r).fill(this.nullType);n=new Array(r),e.addReference(n);for(var i=0;i<r;++i)n[i]=e.deserialize(o[i]);t.readByte()}return n}encodeRequest(e,t,n={}){var r=new W,i=new $(r,this.simple,this.utc),o=n;this.simple&&(o.simple=!0);var s=0;for(var a in o)s++;s>0&&(r.writeByte(72),i.serialize(o),i.reset()),r.writeByte(67),i.serialize(e),t.length>0&&(i.reset(),i.serialize(t)),r.writeByte(122);const l=r.takeBytes();return this.textDecoder.decode(l)}decodeResponse(e,t={}){var n=new W(this.textEncoder.encode(e)),r=new U(n,!1);r.longType=this.longType,r.dictType=this.dictType;var i=n.readByte();if(72===i){var o=r.deserialize();for(var s in o)t[s]=o[s];r.reset(),i=n.readByte()}switch(i){case 82:return t.simple&&(r.simple=!0),console.log(i,"9999999999"),r.deserialize();case 69:throw new Error(r.deserialize(String));case 122:return;default:throw new Error("Invalid response:\r\n"+n.toString())}}},ta=new Map,na=new Map,ra=void 0,ia={getDefaultClient(){if(ra||(ra=new Le(SysConfig?.ServiceURL.DefaultHproseAPI)),!ra)throw Error("HproseProxy对象为空");return ra},registerHprose(e,t){const n=na.get(e);if(!n){const n=new Le(t);ta.set(e,n)}return n},getHprose:e=>na?.get(e),getProxyHprose:e=>ta.get(e),unregisterHprose(e){ta.get(e)&&(na.delete(e),ta.delete(e))}},oa=5e3,sa=36e5,aa={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},la="access_token",ca=ve?.Config?.ServiceURL.LoginAuthURL;function ua(){const e=Ae();e&&$i(aa.RefreshToken,ca,{refreshToken:e}).then((e=>{da(e.data)}))}function ha(){const e=Me.getJsonObject(la);if(!e)return;const t=(new Date).getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?ua():setTimeout(ua,n-5e3))}function da(e){const t=(new Date).getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("客户端时间与服务器不一致:过去时间!")):n<-6e5&&(n=18e5,console.warn("客户端时间与服务器不一致:未来时间!")),n>0){let t=ze();t?(t.token=e.accessToken.tokenContent,t.expire=e.accessToken.expires,t.refresh=e.refreshToken.tokenContent):t={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},Me.set(la,t,n/1e3),ha()}else Me.remove(la)}var fa,pa="Wm314243",ga=ve?.Config?.ServiceURL.LoginAuthURL;async function ma(e){const t={username:e.username,pwd:zr.encryptToString(e.pwd,pa)},n=(await $i(aa.Login,ga,t))?.data;return n&&(da(n.doubletoken),go(!1)),n}function va(e){const t={oldpwd:zr.encryptToString(e.oldpwd,pa),newpwd:zr.encryptToString(e.newpwd,pa)};return $i(aa.ChangeMyPwd,ga,t)}function ya(e){return zr.encryptToString(e,pa)}function wa(){const e=ze();e&&(Gi(aa.Logout,ga,{token:e.token,reftoken:e.refresh}),Te())}function ba(e){return $i(aa.CheckToken,ga,{token:e})}!function(e){e[e.Widget=0]="Widget",e[e.Route=1]="Route",e[e.URL=2]="URL",e[e.Action=3]="Action"}(fa||(fa={}));var Sa="ROLE_SYSTEM_RIGHT",Ca=new xe("",globalThis.sessionStorage);function xa(){return Ca.get(Sa)}function Ea(e){Ca.set(Sa,e)}function ka(){Ca.remove(Sa)}function Ma(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(Ma(n.children),0===n.children.length&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function za(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&za(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function Ta(e,t,n="name"){e&&t&&e.forEach((e=>{const r=t.find((t=>t[n]===e[n]));r&&(e.children?r.children&&Ta(e.children,r.children,n):r.children&&0!==r.children.length||r.selected&&(e.selected=r.selected))}))}function Aa(e,t,n,r="name"){const i=e[n],o=t[n];i?o&&Ta(i,o,r):o&&(e[n]=o)}function La(e){if(e&&e.length>0){const t=e.length;let n,r=!1;if(t>0){r=Ue(e[0]);const i=r?e[0]:JSON.parse(e[0]);if(t>1)for(let t=1;t<e.length;t++){const n=e[t],o=r?n:JSON.parse(n);Aa(i,o,"routes","name"),Aa(i,o,"widgetMenu","name"),Aa(i,o,"widgets","id"),Aa(i,o,"functions","id")}n=i}return n&&(Ma(n.routes),Ma(n.widgetMenu),Ma(n.widgets),Ma(n.functions)),n}}var _a=[],Ra=[],Ia=[];function Da(){return xa()}async function Pa(e,t=!1){ka();const n=aa.GetSystemRights,r=ve?.Config?.ServiceURL.LoginAuthURL,i=await $i(n,r,{systemid:e});if(!i||!i.data)return void ve.Message?.warn("无法获取功能授权列表!");const o=i.data;if(o&&o.length>0){if(t){const e=JSON.parse(o[0]);return Ea(e),e}{const e=La(o);return Ea(e),e}}}function Oa(e,t){const n={...e};return n.meta||(n.meta={}),null!=t.index&&(n.meta.index=t.index),null!=t.title&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.path===t.path));if(r){const e=Oa(r,t);e&&n.children?.push(e)}}))),n}function Na(e,t=2){if(0===t)return e;const n=Da();return n&&n.routes?(Ia.length>0||e.forEach((e=>{const t=n.routes?.find((t=>t.name===e.name));if(t){const n=Oa(e,t);n&&Ia.push(n)}})),Ia):void 0}function Ba(e,t){const n={...e};return null!=t.index&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach((t=>{const r=e.children?.find((e=>e.name===t.name));if(r){const e=Ba(r,t);e&&n.children?.push(e)}}))),n}function Fa(e,t=2){if(0===t)return e;const n=Da();return n&&n.widgetMenu?(Ra.length>0||e.forEach((e=>{const t=n.widgetMenu?.find((t=>t.name===e.name));if(t){const n=Ba(e,t);n&&Ra.push(n)}})),Ra):void 0}function Wa(e,t=2){if(0===t)return e;const n=Da();return n&&n.widgets?(_a.length>0||e?.forEach((e=>{n.widgets?.find((t=>t.id===e.id))&&_a.push(e)})),_a):void 0}function Ua(e,t=2){if(0===t&&(ve.RightWidgetConfigMap=e,ve.RightWidgetConfigMap&&ve.RightWidgetConfigMap.size>0))return ve.RightWidgetConfigMap;const n=Da();if(n&&n.widgets){const t=new Map;if(n.widgets.forEach((e=>{const n=e.layoutID;if(n){let r;t.has(n)&&(r=t.get(n)),r||(r=new Array,t.set(n,r)),r&&r.push(e)}})),n.widgets.length=0,t.size>0){const n=new Map;for(const[r,i]of t){const t=e.get(r);if(t){const e=new Array;t.forEach((t=>{i.findIndex((e=>e.id===t.id))>=0&&e.push(t)})),e.length>0&&n.set(r,e),t.length=0}}return t.clear(),ve.RightWidgetConfigMap=n,n}}else;}function ja(e,t=2){if(0===t)return e;const n=Da();return n?n.functions:void 0}var $a={mounted(e,t){const n=t.value,r=n&&n.container&&document.querySelector(n.container)||document.querySelector("#map3dContainer")||document.body,i=n&&n.selector&&e.querySelector(n.selector)||e.querySelector(".drag-el")||e;i!==e&&i.classList.add("ls-draggable"),i.onmousedown=function(t){e.style.transition="none";const n=t.clientX-e.offsetLeft,i=t.clientY-e.offsetTop,o=r.offsetWidth,s=r.offsetHeight,a=e.offsetWidth,l=e.offsetHeight;"100"!==e.style.zIndex&&(e.style.zIndex=100),r.onmousemove=function(t){let r=t.clientX-n,c=t.clientY-i;r<0&&(r=0),c<0&&(c=0),r>o-a&&(r=o-a),c>s-l&&(c=s-l),e.style.left=r+"px",e.style.top=c+"px"},r.onmouseup=function(t){r.onmousemove=r.onmouseup=null,e.style.transition="all 0.3s"}}}};function Ha(e){e.directive("drag",$a)}var qa={created:(e,t)=>{let n=0,r=0,i=0,o=null;e.addEventListener("click",(function(e){r=(new Date).getTime(),n++,1===n&&(r=(new Date).getTime()),2===n&&(i=(new Date).getTime()),r&&i&&i-r<400&&2===n&&t.value(),o?console.log("别点了"):o=setTimeout((()=>{r=0,i=0,n=0,clearTimeout(o),o=null}),500)}))}};function Ga(e){e.directive("dc",qa)}var Xa={beforeMount(e,t){let n=null,r=0;const i=()=>t?.value(),o=()=>{Date.now()-r<100&&i(),n&&clearInterval(n),n=null};fo.on(e,"mousedown",(e=>{0===e.button&&(r=Date.now(),fo.once(document,"mouseup",o),n&&clearInterval(n),n=setInterval(i,100))}))}};function Va(e){e.directive("repeatClick",Xa)}var Ka={mounted(e,t){const n=t.value;e.style.visibility="hidden",e.style["animation-name"]="none";const r=function(e,t){if(function(e){const t=globalThis.scrollY||globalThis.pageYOffset||document.documentElement.scrollTop||e.parentNode.scrollTop,n=t+(ct()?document.documentElement.scrollHeight>document.documentElement.clientHeight?globalThis.innerHeight:document.documentElement.clientHeight:Math.min(document.documentElement.clientHeight,globalThis.innerHeight)),r=function(e){let t;for(;void 0===e.offsetTop;)e=e.parentNode;for(t=e.offsetTop;e=e.offsetParent;)t+=e.offsetTop;return t}(e),i=r+e.clientHeight;return r<n&&i>=t}(e)){e.style.visibility="visible";for(const n in t)e.style[n]=t[n];"none"!=e.style["animation-name"]&&(e.style["animation-duration"]||(e.style["animation-duration"]="1s")),e.parentNode.removeEventListener("scroll",o)}};let i=Date.now();const o=function(){Date.now()-i>=100&&(r(e,n),i=Date.now())};setTimeout((function(){r(e,n)}),1),e.parentNode.addEventListener("scroll",o)}};function Za(e){e.directive("wow",Ka)}var Ya={mounted(e,t){const n=t.value,r=Object.assign({},e.classList),i=n.split(" "),o=()=>{i&&i.length>0&&(Ms.updateSize(),i.forEach((t=>{const n=t.indexOf(".");if(n>0){const i=t.substring(0,n),o=t.substring(n+1);if(o){const t=o.split(".");if(t&&t.length>0){let n=Ms;t.forEach((e=>{n=n[e]})),n?e.classList.add(i):r?.contains&&r?.contains(i)||e.classList.remove(i)}}}})))};o(),dt.windowResizeHandler(o)}};function Ja(e){e.directive("media",Ya)}var Qa=Symbol("Comlink.proxy"),el=Symbol("Comlink.endpoint"),tl=Symbol("Comlink.releaseProxy"),nl=Symbol("Comlink.finalizer"),rl=Symbol("Comlink.thrown"),il=e=>"object"==typeof e&&null!==e||"function"==typeof e,ol=new Map([["proxy",{canHandle:e=>il(e)&&e[Qa],serialize(e){const{port1:t,port2:n}=new MessageChannel;return sl(e,t),[n,[n]]},deserialize:e=>(e.start(),ll(e))}],["throw",{canHandle:e=>il(e)&&rl in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function sl(e,t=globalThis,n=["*"]){t.addEventListener("message",(function r(i){if(!i||!i.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:o,type:s,path:a}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(vl);let c;try{const t=a.slice(0,-1).reduce(((e,t)=>e[t]),e),n=a.reduce(((e,t)=>e[t]),e);switch(s){case"GET":c=n;break;case"SET":t[a.slice(-1)[0]]=vl(i.data.value),c=!0;break;case"APPLY":c=n.apply(t,l);break;case"CONSTRUCT":c=function(e){return Object.assign(e,{[Qa]:!0})}(new n(...l));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;sl(e,n),c=function(e,t){return gl.set(e,t),e}(t,[t])}break;case"RELEASE":c=void 0;break;default:return}}catch(e){c={value:e,[rl]:0}}Promise.resolve(c).catch((e=>({value:e,[rl]:0}))).then((n=>{const[i,a]=ml(n);t.postMessage(Object.assign(Object.assign({},i),{id:o}),a),"RELEASE"===s&&(t.removeEventListener("message",r),al(t),nl in e&&"function"==typeof e[nl]&&e[nl]())})).catch((e=>{const[n,r]=ml({value:new TypeError("Unserializable return value"),[rl]:0});t.postMessage(Object.assign(Object.assign({},n),{id:o}),r)}))})),t.start&&t.start()}function al(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function ll(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}})),fl(e,n,[],t)}function cl(e){if(e)throw new Error("Proxy has been released and is not useable")}function ul(e){return yl(e,new Map,{type:"RELEASE"}).then((()=>{al(e)}))}var hl=new WeakMap,dl="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(hl.get(e)||0)-1;hl.set(e,t),0===t&&ul(e)}));function fl(e,t,n=[],r=function(){}){let i=!1;const o=new Proxy(r,{get(r,s){if(cl(i),s===tl)return()=>{!function(e){dl&&dl.unregister(e)}(o),ul(e),t.clear(),i=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=yl(e,t,{type:"GET",path:n.map((e=>e.toString()))}).then(vl);return r.then.bind(r)}return fl(e,t,[...n,s])},set(r,o,s){cl(i);const[a,l]=ml(s);return yl(e,t,{type:"SET",path:[...n,o].map((e=>e.toString())),value:a},l).then(vl)},apply(r,o,s){cl(i);const a=n[n.length-1];if(a===el)return yl(e,t,{type:"ENDPOINT"}).then(vl);if("bind"===a)return fl(e,t,n.slice(0,-1));const[l,c]=pl(s);return yl(e,t,{type:"APPLY",path:n.map((e=>e.toString())),argumentList:l},c).then(vl)},construct(r,o){cl(i);const[s,a]=pl(o);return yl(e,t,{type:"CONSTRUCT",path:n.map((e=>e.toString())),argumentList:s},a).then(vl)}});return function(e,t){const n=(hl.get(t)||0)+1;hl.set(t,n),dl&&dl.register(e,t,e)}(o,e),o}function pl(e){const t=e.map(ml);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}var gl=new WeakMap;function ml(e){for(const[t,n]of ol)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},gl.get(e)||[]]}function vl(e){switch(e.type){case"HANDLER":return ol.get(e.name).deserialize(e.value);case"RAW":return e.value}}function yl(e,t,n,r){return new Promise((i=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),r)}))}var wl=Symbol("getEndpoint"),bl=e=>{const t=ll(e);return new Proxy(t,{get:(t,n,r)=>n===wl?e:Reflect.get(t,n,r)})},Sl=bl(new Worker(new URL("/assets/worker-iconv-KS7y7NCM.js",""+import.meta.url),{type:"module"})),Cl=bl(new Worker(new URL("/assets/worker-xmath-CbuRtVJ1.js",""+import.meta.url),{type:"module"})),xl=bl(new Worker(new URL("/assets/worker-webcache-DX6bhBzy.js",""+import.meta.url),{type:"module"})),El=oe();function kl(e){e.addEventListener("message",(({data:e})=>{El.emit(e.reqID,e)}))}async function Ml(e,t,n){return new Promise(((r,i)=>{const o=String(Date.now())+String(Math.random());e.postMessage({reqID:o,op:t,args:n}),El.on(o,(e=>{"ok"===e.status?r(e.result):i(e.result)}))}))}function zl(e,t){const n={};for(const r in e){const i=e[r];if(i)for(const e in i){const r=""+e;n[e]=(...e)=>Ml(t,r,e)}}return n}var Tl=class{static batteryStatusCallback;static _battery;static batteryStatusChange(e){const t=this._battery;t&&(console.log("电量: "+100*t.level+"%"),console.log("充电状态: "+t.charging),this.batteryStatusCallback&&this.batteryStatusCallback(t))}static async OnBatteryStatusHandler(e){this.batteryStatusCallback=e;const t=await navigator.getBattery();t&&(this._battery=t,this.batteryStatusCallback&&this.batteryStatusCallback(t),t.onlevelchange=this.batteryStatusChange.bind(this),t.onchargingchange=this.batteryStatusChange.bind(this),t.ondischargingtimechange=this.batteryStatusChange.bind(this))}static OffBatteryStatusHandler(){this._battery=void 0}static onlineChangeCallback;static networkStatusChange(){const e=this.isOnline();console.log(e?"设备已联网":"设备未联网"),this.onlineChangeCallback&&this.onlineChangeCallback(e)}static isOnline(){return navigator.onLine}static OnNetworkHandle(e){this.onlineChangeCallback=e,this.networkStatusChange(),window.addEventListener("online",this.networkStatusChange.bind(this)),window.addEventListener("offline",this.networkStatusChange.bind(this))}static OffNetworkHandle(){window.removeEventListener("online",this.networkStatusChange.bind(this)),window.removeEventListener("offline",this.networkStatusChange.bind(this))}static downloadSpead(e){const t=navigator,n=t.connection||t.mozConnection||t.webkitConnection;return n?(console.log("下行带宽:",n.downlink+" Mbps"),n.addEventListener("change",(()=>{console.log("网络状态变化:",n.effectiveType),e&&e(n.downlink)})),n.downlink):-1}static async vibrate(e=300){const t=navigator,n=t.vibrate||t.webkitVibrate||t.mozVibrate||t.msVibrate;n&&n(e)}static defaultSpeakOption={text:"",lang:"zh-CN",rate:1,pitch:1,volume:.2,voice:0};static changeSpeakOptions(e=.2,t=1,n=1,r=0){e>=0&&e<=1&&(this.defaultSpeakOption.volume=e),t>=.1&&t<=2&&(this.defaultSpeakOption.rate=t),n>=0&&n<=2&&(this.defaultSpeakOption.pitch=n),this.defaultSpeakOption.voice=r}static getSupportedVoices(){return window.speechSynthesis.getVoices().map((e=>e.name))}static getSupportedLanguages(){return navigator.languages}static async speak(e,t="zh-CN"){if(!e)return;const n=window.speechSynthesis;n.speaking&&n.cancel();const r=new SpeechSynthesisUtterance;r.lang=t,r.text=e,r.rate=this.defaultSpeakOption.rate,r.pitch=this.defaultSpeakOption.pitch,r.volume=this.defaultSpeakOption.volume;const i=this.defaultSpeakOption.voice;if(i>0){const e=n.getVoices();i<e.length&&(r.voice=e[i])}n.speak(r)}static async speakEnglish(e){this.speak(e,"en-US")}static stopSpeak(){const e=window.speechSynthesis;e.speaking&&e.cancel()}static openNotification(e,t,n,r,i){"Notification"in window||console.log("浏览器不支持桌面通知!");let o=n;if(t)o=o??{},o.body=t;else if("granted"===Notification.permission){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}else"denied"!==Notification.permission&&Notification.requestPermission((t=>{if("granted"===t){const t=new Notification(e,o);t.onclick=e=>{i&&i(e.target)},t.onclose=e=>{r&&r(e.target)}}}))}static isPageVisible(){return!document.hidden}static onPageVisibleChange(e){document.addEventListener("visibilitychange",(()=>{e&&e(!document.hidden)}))}static async copyText(e){return await navigator.clipboard.writeText(e)}static async readText(){return await navigator.clipboard.readText()}static viewTransition(e){if(e){if(!document.startViewTransition)return void e();document.startViewTransition((()=>e()))}}},Al=Co.default;export{$s as ADivider,ko as BigFileDownload,ci as CommonTool,pr as DayjsTool,ar as Download,Gr as EnumColor,uo as FileUpload,Lr as GetSignalRClient,ve as Global,ia as GlobalHprose,se as GlobalMitt,fr as GzipTool,dt as H5Tool,Ce as HproseClient,ea as HproseRPCCodec,ur as HttpDownload,cr as JsonDownload,wt as LayoutContainer,me as LayoutContainerEnum,vt as LayoutManager,Al as LocalForage,po as LockState,fa as MenuItemEnum,Ts as MinWindowMap,Tl as NavigatorPlugin,Mo as ObjToUrlParams,To as OpenRouterURL,Gs as Pane,Xs as Popover,Le as ProxyClient,be as RouterTransition,bt as RouterTransitionAnimate,lr as SaveAs,hr as SaveToSelectedFile,Ks as ScaleContainer,Ms as Screen,ks as ScreenClass,Ys as ScrollSnapContainer,Hs as Splitpanes,xe as Storage,Se as StringUtils,we as SuspenseWithError,ce as SysEvents,oa as TOKEN_REFRESH_TIME,sa as TOKEN_VALID_TIMESPAN,aa as USER_TOKEN_API,li as WarGridTool,Ar as WaterMark,ai as WebCacheTool,zs as WindowsMap,Ws as XWindow,As as XWindowManager,zr as XXTEA,dr as ZipTool,ms as autoRefresh,fi as base64ToBlob,pi as blobToDataURL,Bi as calculateBestTextColor,va as changeMyPWD,_o as checkAddDefaultRoute,ha as checkDoRefreshToken,ba as checkToken,Te as clearLocalToken,ka as clearRight,Ii as colorIsDark,vi as convertDecimalism,wi as convertDecimalismData,yi as convertDecimalismSpacing,bi as convertToDecimalism,Si as convertToDecimalismByString,Ci as convertToDecimalismByString2,vs as createDB,ho as createFileUpload,Di as darken,zo as deepMerge,Ui as delay,ys as deleteDB,Qs as deserialize,ps as doCloseModal,fs as doLoadModal,ua as doRefreshToken,go as doSetLock,qa as doubleClickDirective,$a as dragDirective,Fo as exportSystemRights,ui as filterObj,sr as findStringPrefix,Xi as get,ir as getCommonFileBase,Da as getCurrentSystemRight,Ki as getData,Yi as getDownload,ya as getEncryptPWD,Qn as getFileBase,er as getFileExtension,ja as getFunctions,Ei as getHexColor,ze as getLocalToken,mo as getLockState,Mi as getLongHexColor,tr as getPathBase,gt as getProxyClient,ki as getRGBColor,Ti as getRGBColorFromHSLA,hi as getRandomInt,di as getRandomItem,Ae as getRefreshToken,xa as getRight,Lo as getRouteURL,Na as getRoutes,Pa as getSystemRoleRight,No as getTabRouteData,Ao as getVueURL,Wa as getWidgetConfig,Ua as getWidgetConfigMap,Fa as getWidgetMenus,Oo as globFilterLayoutWidgetConfig,Io as globFilterObjects,Do as globFilterObjectsOld,Ma as handleNodes,Ri as hexToRGB,q as iconv,Sl as iconvWorker,pt as init,mt as initDefaultProxyClient,kl as initWorker,De as is,Ve as isArray,He as isAsyncFunction,Xe as isBoolean,Ke as isClient,je as isDate,Oe as isDef,Ye as isElement,et as isEmpty,zi as isEnumColor,tt as isError,Pe as isFunction,Li as isHexColor,Qe as isImageDom,ot as isMap,ct as isMobile,Be as isNull,Fe as isNullAndUnDef,We as isNullOrUnDef,$e as isNumber,Ue as isObjectX,qe as isPromise,Je as isServer,Ge as isString,at as isStringLikeJson,lt as isStringLikeKml,it as isSymbol,Ne as isUnDef,st as isValidURL,rt as isWeakMap,nt as isWeakSet,Ze as isWindow,fo as jquery,Pi as lighten,ma as login,wa as logout,Ya as mediaDirective,La as mergeFilterRoleSysRight,or as mergeNames,za as mergeNodes,Aa as mergeNodesAll,oe as mitt,Ct as newGuid,yo as onLockListener,Jn as parseLocalPath,Vi as post,Ro as recursiveRoutes,zl as registerWorkerSerivces,Xa as repeatDirective,gi as replaceAll,nr as replaceFileExtension,$i as requestGet,qi as requestPost,Gi as requestPostBody,mi as reserveDecimal,_i as rgbToHex,Js as serialize,da as setLocalToken,Ea as setRight,Ga as setupDCDirective,Ha as setupDragDirective,Va as setupRepeatDirective,Za as setupWowDirective,Ja as setupmediaDirective,Wi as sleep,Ee as storage,Me as storageHelper,ws as streamFetch,Ss as streamFetchBlob,xs as streamFetchLoadImage,bs as streamFetchText,Cs as streamFetchUploadFile,rr as toLowerCaseExtension,xi as traverseXYArrayFromInsideOut,wo as unLockListener,St as uuid,Xo as verifiyNumberInteger,ns as verifyAccount,Zo as verifyAndSpace,ds as verifyCarNum,Vo as verifyCnAndSpace,as as verifyEmail,Ko as verifyEnAndSpace,cs as verifyFullName,ss as verifyIPAddress,ls as verifyIdCard,Qo as verifyNumberCnUppercase,Yo as verifyNumberComma,Go as verifyNumberIntegerAndFloat,Ho as verifyNumberPercentage,qo as verifyNumberPercentageFloat,rs as verifyPassword,is as verifyPasswordPowerful,os as verifyPasswordStrength,es as verifyPhone,us as verifyPostalCode,ts as verifyTelPhone,Jo as verifyTextColor,hs as verifyUrl,xl as webCacheWorker,Ka as wowDirective,jo as writeIconifyList,$o as writeSysRoleRight,Cl as xmathWorker};
|