xframelib 0.5.6 → 0.5.7
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 +1 -0
- package/dist/core/Global.d.ts +0 -20
- package/dist/core/IModel.d.ts +7 -0
- package/dist/core/Init.d.ts +20 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/index.cjs +6 -6
- package/dist/index.css +31 -31
- package/dist/index.js +7 -7
- package/dist/model/Config.d.ts +42 -1
- package/dist/model/Layout.d.ts +1 -1
- package/dist/public/mitm.html +143 -129
- package/dist/utils/H5Tool.d.ts +19 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("vue"),Me=require("@hprose/rpc-core"),on=require("@hprose/io"),Ri=require("@hprose/rpc-html5");function Pi(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Ti=Pi(require("axios")),Di={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(t=>({min:t.min,max:t.max,size:t.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((i,r)=>(i.size=r===t?i.max:i.min,r!==t&&(n+=i.min),i)),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:i}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:i-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 i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),c=Math.max(Math.min(this.getCurrentDragPercentage(e),r),i);let y=[t,t+1],w=this.panes[y[0]]||null,b=this.panes[y[1]]||null;const x=w.max<100&&c>=w.max+n.prevPanesSize,E=b.max<100&&c<=100-(b.max+this.sumNextPanesSize(t+1));if(x||E)x?(w.size=w.max,b.size=Math.max(100-w.max-n.prevPanesSize-n.nextPanesSize,0)):(w.size=Math.max(100-b.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),b.size=b.max);else{if(this.pushOtherPanes){const M=this.doPushOtherPanes(n,c);if(!M)return;({sums:n,panesToResize:y}=M),w=this.panes[y[0]]||null,b=this.panes[y[1]]||null}w!==null&&(w.size=Math.min(Math.max(c-n.prevPanesSize-n.prevReachedMinPanes,w.min),w.max)),b!==null&&(b.size=Math.min(Math.max(100-c-n.nextPanesSize-n.nextReachedMinPanes,b.min),b.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,i=[n,n+1];return t<e.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,c)=>{c>i[0]&&c<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,c)=>{c>0&&c<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,c)=>{c>n&&c<i[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,c)=>{c<this.panesCount-1&&c>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:i}},sumPrevPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i>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 i=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=c=>this.onMouseDown(c,i),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=c=>this.onMouseDown(c,i)),r.onclick=c=>this.onSplitterClick(c,i+1)),this.dblClickSplitter&&(r.ondblclick=c=>this.onSplitterDblClick(c,i+1)),t.parentNode.insertBefore(r,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(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([i,r])=>n[i]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),i=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,c)=>r.index=c),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(i=>i.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),t>.1&&this.readjustSizes(t,n,i)},initialPanesSizing(){let e=100;const t=[],n=[];let i=0;this.panes.forEach(c=>{e-=c.size,c.size!==null&&i++,c.size>=c.max&&t.push(c.id),c.size<=c.min&&n.push(c.id)});let r=100;e>.1&&(this.panes.forEach(c=>{c.size===null&&(c.size=Math.max(Math.min(e/(this.panesCount-i),c.max),c.min)),r-=c.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const i=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(c=>{n-=c.size,c.size>=c.max&&i.push(c.id),c.size<=c.min&&r.push(c.id)}),Math.abs(n)<.1||(this.panes.forEach(c=>{e&&e.givenSize!==null&&e.id===c.id||(c.size=Math.max(Math.min(t,c.max),c.min)),n-=c.size,c.size>=c.max&&i.push(c.id),c.size<=c.min&&r.push(c.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(e,t,n){let i;i=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const c=Math.max(Math.min(r.size+i,r.max),r.min);e-=c-r.size,r.size=c}else if(!n.includes(r.id)){const c=Math.max(Math.min(r.size+i,r.max),r.min);e-=c-r.size,r.size=c}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.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?i=>this.onSplitterDblClick(i,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 g.h("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},ot={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||this.size===0?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})}}};ot.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=y=>c.onPaneClick(y,e._.uid)),style:g.normalizeStyle(e.style)},[g.renderSlot(e.$slots,"default")],4)},ot.__file="src/controls/splitpanes/pane.vue";var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rt(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 Ai={exports:{}},rn=Ai.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(S,u){var d=S[0],h=S[1],l=S[2],p=S[3];h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[0]-680876936|0)<<7|d>>>25)+h|0)&h|~d&l)+u[1]-389564586|0)<<12|p>>>20)+d|0)&d|~p&h)+u[2]+606105819|0)<<17|l>>>15)+p|0)&p|~l&d)+u[3]-1044525330|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[4]-176418897|0)<<7|d>>>25)+h|0)&h|~d&l)+u[5]+1200080426|0)<<12|p>>>20)+d|0)&d|~p&h)+u[6]-1473231341|0)<<17|l>>>15)+p|0)&p|~l&d)+u[7]-45705983|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[8]+1770035416|0)<<7|d>>>25)+h|0)&h|~d&l)+u[9]-1958414417|0)<<12|p>>>20)+d|0)&d|~p&h)+u[10]-42063|0)<<17|l>>>15)+p|0)&p|~l&d)+u[11]-1990404162|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[12]+1804603682|0)<<7|d>>>25)+h|0)&h|~d&l)+u[13]-40341101|0)<<12|p>>>20)+d|0)&d|~p&h)+u[14]-1502002290|0)<<17|l>>>15)+p|0)&p|~l&d)+u[15]+1236535329|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[1]-165796510|0)<<5|d>>>27)+h|0)&l|h&~l)+u[6]-1069501632|0)<<9|p>>>23)+d|0)&h|d&~h)+u[11]+643717713|0)<<14|l>>>18)+p|0)&d|p&~d)+u[0]-373897302|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[5]-701558691|0)<<5|d>>>27)+h|0)&l|h&~l)+u[10]+38016083|0)<<9|p>>>23)+d|0)&h|d&~h)+u[15]-660478335|0)<<14|l>>>18)+p|0)&d|p&~d)+u[4]-405537848|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[9]+568446438|0)<<5|d>>>27)+h|0)&l|h&~l)+u[14]-1019803690|0)<<9|p>>>23)+d|0)&h|d&~h)+u[3]-187363961|0)<<14|l>>>18)+p|0)&d|p&~d)+u[8]+1163531501|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[13]-1444681467|0)<<5|d>>>27)+h|0)&l|h&~l)+u[2]-51403784|0)<<9|p>>>23)+d|0)&h|d&~h)+u[7]+1735328473|0)<<14|l>>>18)+p|0)&d|p&~d)+u[12]-1926607734|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[5]-378558|0)<<4|d>>>28)+h|0)^h^l)+u[8]-2022574463|0)<<11|p>>>21)+d|0)^d^h)+u[11]+1839030562|0)<<16|l>>>16)+p|0)^p^d)+u[14]-35309556|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[1]-1530992060|0)<<4|d>>>28)+h|0)^h^l)+u[4]+1272893353|0)<<11|p>>>21)+d|0)^d^h)+u[7]-155497632|0)<<16|l>>>16)+p|0)^p^d)+u[10]-1094730640|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[13]+681279174|0)<<4|d>>>28)+h|0)^h^l)+u[0]-358537222|0)<<11|p>>>21)+d|0)^d^h)+u[3]-722521979|0)<<16|l>>>16)+p|0)^p^d)+u[6]+76029189|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[9]-640364487|0)<<4|d>>>28)+h|0)^h^l)+u[12]-421815835|0)<<11|p>>>21)+d|0)^d^h)+u[15]+530742520|0)<<16|l>>>16)+p|0)^p^d)+u[2]-995338651|0)<<23|h>>>9)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[0]-198630844|0)<<6|d>>>26)+h|0)|~l))+u[7]+1126891415|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[14]-1416354905|0)<<15|l>>>17)+p|0)|~d))+u[5]-57434055|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[12]+1700485571|0)<<6|d>>>26)+h|0)|~l))+u[3]-1894986606|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[10]-1051523|0)<<15|l>>>17)+p|0)|~d))+u[1]-2054922799|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[8]+1873313359|0)<<6|d>>>26)+h|0)|~l))+u[15]-30611744|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[6]-1560198380|0)<<15|l>>>17)+p|0)|~d))+u[13]+1309151649|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[4]-145523070|0)<<6|d>>>26)+h|0)|~l))+u[11]-1120210379|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[2]+718787259|0)<<15|l>>>17)+p|0)|~d))+u[9]-343485551|0)<<21|h>>>11)+l|0,S[0]=d+S[0]|0,S[1]=h+S[1]|0,S[2]=l+S[2]|0,S[3]=p+S[3]|0}function i(S){var u,d=[];for(u=0;u<64;u+=4)d[u>>2]=S.charCodeAt(u)+(S.charCodeAt(u+1)<<8)+(S.charCodeAt(u+2)<<16)+(S.charCodeAt(u+3)<<24);return d}function r(S){var u,d=[];for(u=0;u<64;u+=4)d[u>>2]=S[u]+(S[u+1]<<8)+(S[u+2]<<16)+(S[u+3]<<24);return d}function c(S){var u,d,h,l,p,T,B=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=B;u+=64)n(D,i(S.substring(u-64,u)));for(d=(S=S.substring(u-64)).length,h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<d;u+=1)h[u>>2]|=S.charCodeAt(u)<<(u%4<<3);if(h[u>>2]|=128<<(u%4<<3),u>55)for(n(D,h),u=0;u<16;u+=1)h[u]=0;return l=(l=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),T=parseInt(l[1],16)||0,h[14]=p,h[15]=T,n(D,h),D}function y(S){var u,d,h,l,p,T,B=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=B;u+=64)n(D,r(S.subarray(u-64,u)));for(d=(S=u-64<B?S.subarray(u-64):new Uint8Array(0)).length,h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<d;u+=1)h[u>>2]|=S[u]<<(u%4<<3);if(h[u>>2]|=128<<(u%4<<3),u>55)for(n(D,h),u=0;u<16;u+=1)h[u]=0;return l=(l=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),T=parseInt(l[1],16)||0,h[14]=p,h[15]=T,n(D,h),D}function w(S){var u,d="";for(u=0;u<4;u+=1)d+=t[S>>8*u+4&15]+t[S>>8*u&15];return d}function b(S){var u;for(u=0;u<S.length;u+=1)S[u]=w(S[u]);return S.join("")}function x(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function E(S,u){var d,h=S.length,l=new ArrayBuffer(h),p=new Uint8Array(l);for(d=0;d<h;d+=1)p[d]=S.charCodeAt(d);return u?p:l}function M(S){return String.fromCharCode.apply(null,new Uint8Array(S))}function R(S,u,d){var h=new Uint8Array(S.byteLength+u.byteLength);return h.set(new Uint8Array(S)),h.set(new Uint8Array(u),S.byteLength),d?h:h.buffer}function N(S){var u,d=[],h=S.length;for(u=0;u<h-1;u+=2)d.push(parseInt(S.substr(u,2),16));return String.fromCharCode.apply(String,d)}function P(){this.reset()}return b(c("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function S(u,d){return(u=0|u||0)<0?Math.max(u+d,0):Math.min(u,d)}ArrayBuffer.prototype.slice=function(u,d){var h,l,p,T,B=this.byteLength,D=S(u,B),U=B;return d!==e&&(U=S(d,B)),D>U?new ArrayBuffer(0):(h=U-D,l=new ArrayBuffer(h),p=new Uint8Array(l),T=new Uint8Array(this,D,h),p.set(T),l)}}(),P.prototype.append=function(S){return this.appendBinary(x(S)),this},P.prototype.appendBinary=function(S){this._buff+=S,this._length+=S.length;var u,d=this._buff.length;for(u=64;u<=d;u+=64)n(this._hash,i(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},P.prototype.end=function(S){var u,d,h=this._buff,l=h.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=h.charCodeAt(u)<<(u%4<<3);return this._finish(p,l),d=b(this._hash),S&&(d=N(d)),this.reset(),d},P.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},P.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},P.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},P.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},P.prototype._finish=function(S,u){var d,h,l,p=u;if(S[p>>2]|=128<<(p%4<<3),p>55)for(n(this._hash,S),p=0;p<16;p+=1)S[p]=0;d=(d=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),h=parseInt(d[2],16),l=parseInt(d[1],16)||0,S[14]=h,S[15]=l,n(this._hash,S)},P.hash=function(S,u){return P.hashBinary(x(S),u)},P.hashBinary=function(S,u){var d=b(c(S));return u?N(d):d},P.ArrayBuffer=function(){this.reset()},P.ArrayBuffer.prototype.append=function(S){var u,d=R(this._buff.buffer,S,!0),h=d.length;for(this._length+=S.byteLength,u=64;u<=h;u+=64)n(this._hash,r(d.subarray(u-64,u)));return this._buff=u-64<h?new Uint8Array(d.buffer.slice(u-64)):new Uint8Array(0),this},P.ArrayBuffer.prototype.end=function(S){var u,d,h=this._buff,l=h.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=h[u]<<(u%4<<3);return this._finish(p,l),d=b(this._hash),S&&(d=N(d)),this.reset(),d},P.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},P.ArrayBuffer.prototype.getState=function(){var S=P.prototype.getState.call(this);return S.buff=M(S.buff),S},P.ArrayBuffer.prototype.setState=function(S){return S.buff=E(S.buff,!0),P.prototype.setState.call(this,S)},P.ArrayBuffer.prototype.destroy=P.prototype.destroy,P.ArrayBuffer.prototype._finish=P.prototype._finish,P.ArrayBuffer.hash=function(S,u){var d=b(y(new Uint8Array(S)));return u?N(d):d},P}();const st=[];class re{static addHandler(t,n,i){t.addEventListener?t.addEventListener(n,i,!1):t.attachEvent?t.attachEvent("on"+n,i):t["on"+n]=i}static windowResizeHandler(t){re.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;if(r!==void 0&&r)r.call(window.document);else if(window.ActiveXObject!==void 0){let c=new window.ActiveXObject("WScript.Shell");c?.SendKeys("{F11}")}}else{let i=t;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;if(r!==void 0&&r)r.call(i);else if(window.ActiveXObject!==void 0){let c=new window.ActiveXObject("WScript.Shell");c?.SendKeys("{F11}")}}}static requestFullScreen(t=window.document.documentElement){let n=t;var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(window.ActiveXObject!==void 0){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(window.ActiveXObject!==void 0){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!re.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=re.isFullScreen();t(i)}):document.addEventListener("MSFullscreenChange",function(){const i=re.isFullScreen();t(i)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(st.indexOf(n)!==-1)return;st.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,re.stringifyCircularHandler);return st.length=0,n}static jsonParse(t){const n=re.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,c=t,y=new rn.ArrayBuffer,w=new FileReader;w.onload=function(b){y.append(b.target?.result);const x=y.end();n({isOK:!0,data:x})},w.onerror=function(){const b="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(b),n({isOK:!1,data:b})},function(){const b=2097152>=c.size?c.size:2097152;w.readAsArrayBuffer(r.call(c,0,b))}()}static MD5(t,n=!1){return rn.hash(t,n)}static copyText=t=>new Promise((n,i)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}class _e{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class Le{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const i=this.storage.getItem(this.getKey(t));if(i)try{const r=JSON.parse(i),{value:c,expire:y}=r;if(y===null||y>=Date.now())return c;this.remove(this.getKey(t))}catch{return n}return n}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,i=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${i}`}getCookie(t){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const c=n[i].split("=");if(c[0]===this.getKey(t))return c[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const Ni=new Le("",localStorage);function Be(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&Number(e[19])|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}var ge;function at(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 Ie(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function ct(e){let t=e.toLowerCase();if(Ie(e)){if(t.length===4){let i="#";for(let r=1;r<4;r+=1)i+=t.slice(r,r+1).concat(t.slice(r,r+1));t=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return"RGB("+n.join(",")+")"}return t}function ut(e,t){const n=parseInt(e,16)+t,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function sn(e,t,n){const i=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function lt(e,t){const n=parseInt(e,16)-t,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function ht(e){return{all:e=e||new Map,on(t,n){const i=e?.get(t);i&&i.push(n)||e?.set(t,[n])},off(t,n){const i=e?.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(i=>{i(n)}),(e?.get("*")||[]).slice().map(i=>{i(t,n)})}}}exports.EnumColor=void 0,(ge=exports.EnumColor||(exports.EnumColor={}))[ge.RGBA=0]="RGBA",ge[ge.Hex=1]="Hex",ge[ge.Hsla=2]="Hsla";const ve=ht(),X={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Re=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const i=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)},an=(e,t)=>{const n=JSON.stringify(e,null,2);t?Re(n,t+".json"):ve.emit(X.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")};function cn(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}class ke{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!_e.isNullOrEmpty(t)){if(ke.httpTransport||(ke.httpTransport=new Ri.HttpTransport),this.client=new Me.Client(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):ve.emit(X.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}const ce=new Le("user",localStorage);function he(){return ce.get("access_token")}function dt(){ce.remove("access_token"),I.User&&delete I.User}function un(){return he()?.refresh}class be{hproseClient;hpProxyObj;defaultContext=new Me.ClientContext;constructor(t){this.hproseClient=new ke(t),this.hpProxyObj=null}getClientContext(t,n){const i={};n&&(i.requestHeaders=n);const r=he();i.httpRequestHeaders=t||{};const c=i.httpRequestHeaders;return r&&(c.token=r.token),I.SystemID&&(c.sysid=I.SystemID),new Me.ClientContext(i)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||ve.emit(X.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=he();return console.log(r,"userToken3"),r&&(n||(n=new Me.ClientContext({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,i,n)}async hproseInvokeEncode(t){const n=new on.ByteStream(t).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(t,...n){const i=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return on.ByteStream.toString(i)}}class Oi{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:t,duration:n});else switch(i){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn(t,n);break;case"error":this.message.error(t,n)}else{switch(i){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":i="dark",console.error(t)}this.eventBus&&this.eventBus.emit(X.AlertInfoEvent,{type:i,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}}const ft=new Map,I={Config:SysConfig,EventBus:ve,DefaultProxyClient:null,Axios:Ti.default};function ln(e){if(e&&_e.isNotEmpty(e)){if(ft.has(e))return ft.get(e);{const t=new be(e);return ft.set(e,t),t}}}function pt(e,t,n,i="json",r){const c={baseURL:I.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+he()?.token},responseType:i,cancelToken:r};if(n)for(let y in n)c.headers[y]=n[y];return I.SystemID&&(c.headers.sysid=I.SystemID),t&&(c.baseURL=t),c}function te(e,t,n,i,r="json",c,y){const w=pt(n,t,i,r,c);return y&&y>=2e4&&(w.timeout=y),I.Axios?.get(e,w).catch(function(b){Pe(b,t,e,"Get")})}function Pe(e,t,n,i="Get"){const r=`${t}${n}`;if(e&&e.response){let c=!1;const y=e.response.status;switch(y){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const b=e.response.data;if(b){const x=b.indexOf(":"),E=b.indexOf(`\r
|
|
2
|
-
`);if(x>0&&E-x>2){const M=b.substring(x+2,E);M.indexOf("'System.Exception'")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(
|
|
3
|
-
`),r=0;r<i.length;r++){var c=i[r],y=c.indexOf(":"),w=vt(c.slice(0,y)).toLowerCase(),b=vt(c.slice(y+1));n[w]===void 0?n[w]=b:(t=n[w],Object.prototype.toString.call(t)==="[object Array]"?n[w].push(b):n[w]=[n[w],b])}return n},Vi=Fi;function dn(e,t,n){var i=e;return Hi(t)?(n=t,typeof e=="string"&&(i={uri:e})):i=Vi(t,{uri:e}),i.callback=n,i}function oe(e,t,n){return fn(t=dn(e,t,n))}function fn(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(d,h,l){t||(t=!0,e.callback(d,h,l))};function i(){var d=void 0;if(d=b.response?b.response:b.responseText||function(h){try{if(h.responseType==="document")return h.responseXML;var l=h.responseXML&&h.responseXML.documentElement.nodeName==="parsererror";if(h.responseType===""&&!l)return h.responseXML}catch{}return null}(b),S)try{d=JSON.parse(d)}catch{}return d}function r(d){return clearTimeout(x),d instanceof Error||(d=new Error(""+(d||"Unknown XMLHttpRequest Error"))),d.statusCode=0,n(d,u)}function c(){if(!w){var d;clearTimeout(x),d=e.useXDR&&b.status===void 0?200:b.status===1223?204:b.status;var h=u,l=null;return d!==0?(h={body:i(),statusCode:d,method:M,headers:{},url:E,rawRequest:b},b.getAllResponseHeaders&&(h.headers=qi(b.getAllResponseHeaders()))):l=new Error("Internal XMLHttpRequest Error"),n(l,h,h.body)}}var y,w,b=e.xhr||null;b||(b=e.cors||e.useXDR?new oe.XDomainRequest:new oe.XMLHttpRequest);var x,E=b.url=e.uri||e.url,M=b.method=e.method||"GET",R=e.body||e.data,N=b.headers=e.headers||{},P=!!e.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:M,url:E,rawRequest:b};if("json"in e&&e.json!==!1&&(S=!0,N.accept||N.Accept||(N.Accept="application/json"),M!=="GET"&&M!=="HEAD"&&(N["content-type"]||N["Content-Type"]||(N["Content-Type"]="application/json"),R=JSON.stringify(e.json===!0?R:e.json))),b.onreadystatechange=function(){b.readyState===4&&setTimeout(c,0)},b.onload=c,b.onerror=r,b.onprogress=function(){},b.onabort=function(){w=!0},b.ontimeout=r,b.open(M,E,!P,e.username,e.password),P||(b.withCredentials=!!e.withCredentials),!P&&e.timeout>0&&(x=setTimeout(function(){if(!w){w=!0,b.abort("timeout");var d=new Error("XMLHttpRequest timeout");d.code="ETIMEDOUT",r(d)}},e.timeout)),b.setRequestHeader)for(y in N)N.hasOwnProperty(y)&&b.setRequestHeader(y,N[y]);else if(e.headers&&!function(d){for(var h in d)if(d.hasOwnProperty(h))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(b.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(b),b.send(R||null),b}gt.exports=oe,gt.exports.default=oe,oe.XMLHttpRequest=hn.XMLHttpRequest||function(){},oe.XDomainRequest="withCredentials"in new oe.XMLHttpRequest?oe.XMLHttpRequest:hn.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){oe[e==="delete"?"del":e]=function(t,n,i){return(n=dn(t,n,i)).method=e.toUpperCase(),fn(n)}});var Xi=gt.exports;const Gi=[200,201,202,204,308],Ki=[408,502,503,504];class Yi{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.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.reader=new FileReader,this.eventTarget=ht(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(t){const n=i=>{i.upload.onprogress=r=>{const c=100/this.totalChunks,y=c*this.file.size,w=c*this.chunkCount,b=r.loaded/(r.total??y)*c;this.dispatch("progress",Math.min(w+b,100))}};return new Promise((i,r)=>{this.currentXhr=Xi({...t,beforeSend:n},(c,y)=>(this.currentXhr=void 0,c?r(c):i(y)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){this.paused||this.offline||this.success||this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Gi.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Ki.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const Ji=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)}},pn=ce.get("is_LockScreen",!1),Se={isLock:pn,lockTime:pn=="true"?gn():0};function mn(e){Se.isLock=e,ce.set("is_LockScreen",e,10),e&&(dt(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function gn(){let e=3600;return I.Config.UI?.LockTime&&I.Config.UI?.LockTime>=10&&(e=I.Config.UI.LockTime),e}let yt;function wt(){clearInterval(yt),window.location.href.indexOf("/login")>0||Se.isLock||(mn(!1),Se.lockTime=gn(),yt=setInterval(()=>{if(Se.lockTime--,Se.lockTime<=0)return mn(!0),clearInterval(yt)},1e3))}var Zi={exports:{}},Te=Zi.exports=function e(t,n,i){function r(w,b){if(!n[w]){if(!t[w]){if(!b&&rt)return rt(w);if(c)return c(w,!0);var x=new Error("Cannot find module '"+w+"'");throw x.code="MODULE_NOT_FOUND",x}var E=n[w]={exports:{}};t[w][0].call(E.exports,function(M){var R=t[w][1][M];return r(R||M)},E,E.exports,e,t,n,i)}return n[w].exports}for(var c=rt,y=0;y<i.length;y++)r(i[y]);return r}({1:[function(e,t,n){(function(i){var r,c,y=i.MutationObserver||i.WebKitMutationObserver;if(y){var w=0,b=new y(R),x=i.document.createTextNode("");b.observe(x,{characterData:!0}),r=function(){x.data=w=++w%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var P=i.document.createElement("script");P.onreadystatechange=function(){R(),P.onreadystatechange=null,P.parentNode.removeChild(P),P=null},i.document.documentElement.appendChild(P)}:function(){setTimeout(R,0)};else{var E=new i.MessageChannel;E.port1.onmessage=R,r=function(){E.port2.postMessage(0)}}var M=[];function R(){var P,S;c=!0;for(var u=M.length;u;){for(S=M,M=[],P=-1;++P<u;)S[P]();u=M.length}c=!1}function N(P){M.push(P)!==1||c||r()}t.exports=N}).call(this,me!==void 0?me:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var c={},y=["REJECTED"],w=["FULFILLED"],b=["PENDING"];function x(l){if(typeof l!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,l!==r&&N(this,l)}function E(l,p,T){this.promise=l,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof T=="function"&&(this.onRejected=T,this.callRejected=this.otherCallRejected)}function M(l,p,T){i(function(){var B;try{B=p(T)}catch(D){return c.reject(l,D)}B===l?c.reject(l,new TypeError("Cannot resolve promise with itself")):c.resolve(l,B)})}function R(l){var p=l&&l.then;if(l&&(typeof l=="object"||typeof l=="function")&&typeof p=="function")return function(){p.apply(l,arguments)}}function N(l,p){var T=!1;function B(W){T||(T=!0,c.reject(l,W))}function D(W){T||(T=!0,c.resolve(l,W))}function U(){p(D,B)}var j=P(U);j.status==="error"&&B(j.value)}function P(l,p){var T={};try{T.value=l(p),T.status="success"}catch(B){T.status="error",T.value=B}return T}function S(l){return l instanceof this?l:c.resolve(new this(r),l)}function u(l){var p=new this(r);return c.reject(p,l)}function d(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=l.length,B=!1;if(!T)return this.resolve([]);for(var D=new Array(T),U=0,j=-1,W=new this(r);++j<T;)H(l[j],j);return W;function H(q,V){function Q(J){D[V]=J,++U!==T||B||(B=!0,c.resolve(W,D))}p.resolve(q).then(Q,function(J){B||(B=!0,c.reject(W,J))})}}function h(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=l.length,B=!1;if(!T)return this.resolve([]);for(var D=-1,U=new this(r);++D<T;)j(l[D]);return U;function j(W){p.resolve(W).then(function(H){B||(B=!0,c.resolve(U,H))},function(H){B||(B=!0,c.reject(U,H))})}}t.exports=x,x.prototype.catch=function(l){return this.then(null,l)},x.prototype.then=function(l,p){if(typeof l!="function"&&this.state===w||typeof p!="function"&&this.state===y)return this;var T=new this.constructor(r);return this.state!==b?M(T,this.state===w?l:p,this.outcome):this.queue.push(new E(T,l,p)),T},E.prototype.callFulfilled=function(l){c.resolve(this.promise,l)},E.prototype.otherCallFulfilled=function(l){M(this.promise,this.onFulfilled,l)},E.prototype.callRejected=function(l){c.reject(this.promise,l)},E.prototype.otherCallRejected=function(l){M(this.promise,this.onRejected,l)},c.resolve=function(l,p){var T=P(R,p);if(T.status==="error")return c.reject(l,T.value);var B=T.value;if(B)N(l,B);else{l.state=w,l.outcome=p;for(var D=-1,U=l.queue.length;++D<U;)l.queue[D].callFulfilled(p)}return l},c.reject=function(l,p){l.state=y,l.outcome=p;for(var T=-1,B=l.queue.length;++T<B;)l.queue[T].callRejected(p);return l},x.resolve=S,x.reject=u,x.all=d,x.race=h},{1:1}],3:[function(e,t,n){(function(i){typeof i.Promise!="function"&&(i.Promise=e(2))}).call(this,me!==void 0?me:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function r(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")}function c(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var y=c();function w(){try{if(!y||!y.open)return!1;var o=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),s=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!o||s)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function b(o,s){o=o||[],s=s||{};try{return new Blob(o,s)}catch(f){if(f.name!=="TypeError")throw f;for(var a=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),m=0;m<o.length;m+=1)a.append(o[m]);return a.getBlob(s.type)}}typeof Promise>"u"&&e(3);var x=Promise;function E(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function M(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function R(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var P="local-forage-detect-blob-support",S=void 0,u={},d=Object.prototype.toString,h="readonly",l="readwrite";function p(o){for(var s=o.length,a=new ArrayBuffer(s),m=new Uint8Array(a),f=0;f<s;f++)m[f]=o.charCodeAt(f);return a}function T(o){return new x(function(s){var a=o.transaction(P,l),m=b([""]);a.objectStore(P).put(m,"key"),a.onabort=function(f){f.preventDefault(),f.stopPropagation(),s(!1)},a.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),v=navigator.userAgent.match(/Edge\//);s(v||!f||parseInt(f[1],10)>=43)}}).catch(function(){return!1})}function B(o){return typeof S=="boolean"?x.resolve(S):T(o).then(function(s){return S=s})}function D(o){var s=u[o.name],a={};a.promise=new x(function(m,f){a.resolve=m,a.reject=f}),s.deferredOperations.push(a),s.dbReady?s.dbReady=s.dbReady.then(function(){return a.promise}):s.dbReady=a.promise}function U(o){var s=u[o.name].deferredOperations.pop();if(s)return s.resolve(),s.promise}function j(o,s){var a=u[o.name].deferredOperations.pop();if(a)return a.reject(s),a.promise}function W(o,s){return new x(function(a,m){if(u[o.name]=u[o.name]||At(),o.db){if(!s)return a(o.db);D(o),o.db.close()}var f=[o.name];s&&f.push(o.version);var v=y.open.apply(y,f);s&&(v.onupgradeneeded=function(C){var k=v.result;try{k.createObjectStore(o.storeName),C.oldVersion<=1&&k.createObjectStore(P)}catch(z){if(z.name!=="ConstraintError")throw z;console.warn('The database "'+o.name+'" has been upgraded from version '+C.oldVersion+" to version "+C.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),v.onerror=function(C){C.preventDefault(),m(v.error)},v.onsuccess=function(){var C=v.result;C.onversionchange=function(k){k.target.close()},a(C),U(o)}})}function H(o){return W(o,!1)}function q(o){return W(o,!0)}function V(o,s){if(!o.db)return!0;var a=!o.db.objectStoreNames.contains(o.storeName),m=o.version<o.db.version,f=o.version>o.db.version;if(m&&(o.version!==s&&console.warn('The database "'+o.name+`" can't be downgraded from version `+o.db.version+" to version "+o.version+"."),o.version=o.db.version),f||a){if(a){var v=o.db.version+1;v>o.version&&(o.version=v)}return!0}return!1}function Q(o){return new x(function(s,a){var m=new FileReader;m.onerror=a,m.onloadend=function(f){var v=btoa(f.target.result||"");s({__local_forage_encoded_blob:!0,data:v,type:o.type})},m.readAsBinaryString(o)})}function J(o){return b([p(atob(o.data))],{type:o.type})}function ne(o){return o&&o.__local_forage_encoded_blob}function Ke(o){var s=this,a=s._initReady().then(function(){var m=u[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return M(a,o,o),a}function Ye(o){D(o);for(var s=u[o.name],a=s.forages,m=0;m<a.length;m++){var f=a[m];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return o.db=null,H(o).then(function(v){return o.db=v,V(o)?q(o):v}).then(function(v){o.db=s.db=v;for(var C=0;C<a.length;C++)a[C]._dbInfo.db=v}).catch(function(v){throw j(o,v),v})}function ie(o,s,a,m){m===void 0&&(m=1);try{var f=o.db.transaction(o.storeName,s);a(null,f)}catch(v){if(m>0&&(!o.db||v.name==="InvalidStateError"||v.name==="NotFoundError"))return x.resolve().then(function(){if(!o.db||v.name==="NotFoundError"&&!o.db.objectStoreNames.contains(o.storeName)&&o.version<=o.db.version)return o.db&&(o.version=o.db.version+1),q(o)}).then(function(){return Ye(o).then(function(){ie(o,s,a,m-1)})}).catch(a);a(v)}}function At(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Nn(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=o[m];var f=u[a.name];f||(f=At(),u[a.name]=f),f.forages.push(s),s._initReady||(s._initReady=s.ready,s.ready=Ke);var v=[];function C(){return x.resolve()}for(var k=0;k<f.forages.length;k++){var z=f.forages[k];z!==s&&v.push(z._initReady().catch(C))}var _=f.forages.slice(0);return x.all(v).then(function(){return a.db=f.db,H(a)}).then(function(L){return a.db=L,V(a,s._defaultConfig.version)?q(a):L}).then(function(L){a.db=f.db=L,s._dbInfo=a;for(var A=0;A<_.length;A++){var O=_[A];O!==s&&(O._dbInfo.db=a.db,O._dbInfo.version=a.version)}})}function On(o,s){var a=this;o=R(o);var m=new x(function(f,v){a.ready().then(function(){ie(a._dbInfo,h,function(C,k){if(C)return v(C);try{var z=k.objectStore(a._dbInfo.storeName).get(o);z.onsuccess=function(){var _=z.result;_===void 0&&(_=null),ne(_)&&(_=J(_)),f(_)},z.onerror=function(){v(z.error)}}catch(_){v(_)}})}).catch(v)});return E(m,s),m}function Un(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){ie(a._dbInfo,h,function(C,k){if(C)return v(C);try{var z=k.objectStore(a._dbInfo.storeName).openCursor(),_=1;z.onsuccess=function(){var L=z.result;if(L){var A=L.value;ne(A)&&(A=J(A));var O=o(A,L.key,_++);O!==void 0?f(O):L.continue()}else f()},z.onerror=function(){v(z.error)}}catch(L){v(L)}})}).catch(v)});return E(m,s),m}function jn(o,s,a){var m=this;o=R(o);var f=new x(function(v,C){var k;m.ready().then(function(){return k=m._dbInfo,d.call(s)==="[object Blob]"?B(k.db).then(function(z){return z?s:Q(s)}):s}).then(function(z){ie(m._dbInfo,l,function(_,L){if(_)return C(_);try{var A=L.objectStore(m._dbInfo.storeName);z===null&&(z=void 0);var O=A.put(z,o);L.oncomplete=function(){z===void 0&&(z=null),v(z)},L.onabort=L.onerror=function(){var F=O.error?O.error:O.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return E(f,a),f}function Wn(o,s){var a=this;o=R(o);var m=new x(function(f,v){a.ready().then(function(){ie(a._dbInfo,l,function(C,k){if(C)return v(C);try{var z=k.objectStore(a._dbInfo.storeName).delete(o);k.oncomplete=function(){f()},k.onerror=function(){v(z.error)},k.onabort=function(){var _=z.error?z.error:z.transaction.error;v(_)}}catch(_){v(_)}})}).catch(v)});return E(m,s),m}function Fn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ie(s._dbInfo,l,function(v,C){if(v)return f(v);try{var k=C.objectStore(s._dbInfo.storeName).clear();C.oncomplete=function(){m()},C.onabort=C.onerror=function(){var z=k.error?k.error:k.transaction.error;f(z)}}catch(z){f(z)}})}).catch(f)});return E(a,o),a}function $n(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ie(s._dbInfo,h,function(v,C){if(v)return f(v);try{var k=C.objectStore(s._dbInfo.storeName).count();k.onsuccess=function(){m(k.result)},k.onerror=function(){f(k.error)}}catch(z){f(z)}})}).catch(f)});return E(a,o),a}function Hn(o,s){var a=this,m=new x(function(f,v){o<0?f(null):a.ready().then(function(){ie(a._dbInfo,h,function(C,k){if(C)return v(C);try{var z=k.objectStore(a._dbInfo.storeName),_=!1,L=z.openKeyCursor();L.onsuccess=function(){var A=L.result;A?o===0||_?f(A.key):(_=!0,A.advance(o)):f(null)},L.onerror=function(){v(L.error)}}catch(A){v(A)}})}).catch(v)});return E(m,s),m}function qn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ie(s._dbInfo,h,function(v,C){if(v)return f(v);try{var k=C.objectStore(s._dbInfo.storeName).openKeyCursor(),z=[];k.onsuccess=function(){var _=k.result;_?(z.push(_.key),_.continue()):m(z)},k.onerror=function(){f(k.error)}}catch(_){f(_)}})}).catch(f)});return E(a,o),a}function Vn(o,s){s=N.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;if(o.name){var v=o.name===a.name&&f._dbInfo.db?x.resolve(f._dbInfo.db):H(o).then(function(C){var k=u[o.name],z=k.forages;k.db=C;for(var _=0;_<z.length;_++)z[_]._dbInfo.db=C;return C});m=o.storeName?v.then(function(C){if(C.objectStoreNames.contains(o.storeName)){var k=C.version+1;D(o);var z=u[o.name],_=z.forages;C.close();for(var L=0;L<_.length;L++){var A=_[L];A._dbInfo.db=null,A._dbInfo.version=k}return new x(function(O,F){var $=y.open(o.name,k);$.onerror=function(ee){$.result.close(),F(ee)},$.onupgradeneeded=function(){$.result.deleteObjectStore(o.storeName)},$.onsuccess=function(){var ee=$.result;ee.close(),O(ee)}}).then(function(O){z.db=O;for(var F=0;F<_.length;F++){var $=_[F];$._dbInfo.db=O,U($._dbInfo)}}).catch(function(O){throw(j(o,O)||x.resolve()).catch(function(){}),O})}}):v.then(function(C){D(o);var k=u[o.name],z=k.forages;C.close();for(var _=0;_<z.length;_++)z[_]._dbInfo.db=null;return new x(function(L,A){var O=y.deleteDatabase(o.name);O.onerror=function(){var F=O.result;F&&F.close(),A(O.error)},O.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},O.onsuccess=function(){var F=O.result;F&&F.close(),L(F)}}).then(function(L){k.db=L;for(var A=0;A<z.length;A++)U(z[A]._dbInfo)}).catch(function(L){throw(j(o,L)||x.resolve()).catch(function(){}),L})})}else m=x.reject("Invalid arguments");return E(m,s),m}var Xn={_driver:"asyncStorage",_initStorage:Nn,_support:w(),iterate:Un,getItem:On,setItem:jn,removeItem:Wn,clear:Fn,length:$n,key:Hn,keys:qn,dropInstance:Vn};function Gn(){return typeof openDatabase=="function"}var se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kn="~~local_forage_type~",Nt=/^~~local_forage_type~([^~]+)~/,Ee="__lfsc__:",Je=Ee.length,Ze="arbf",Qe="blob",Ot="si08",Ut="ui08",jt="uic8",Wt="si16",Ft="si32",$t="ur16",Ht="ui32",qt="fl32",Vt="fl64",Xt=Je+Ze.length,Gt=Object.prototype.toString;function Kt(o){var s,a,m,f,v,C=.75*o.length,k=o.length,z=0;o[o.length-1]==="="&&(C--,o[o.length-2]==="="&&C--);var _=new ArrayBuffer(C),L=new Uint8Array(_);for(s=0;s<k;s+=4)a=se.indexOf(o[s]),m=se.indexOf(o[s+1]),f=se.indexOf(o[s+2]),v=se.indexOf(o[s+3]),L[z++]=a<<2|m>>4,L[z++]=(15&m)<<4|f>>2,L[z++]=(3&f)<<6|63&v;return _}function et(o){var s,a=new Uint8Array(o),m="";for(s=0;s<a.length;s+=3)m+=se[a[s]>>2],m+=se[(3&a[s])<<4|a[s+1]>>4],m+=se[(15&a[s+1])<<2|a[s+2]>>6],m+=se[63&a[s+2]];return a.length%3==2?m=m.substring(0,m.length-1)+"=":a.length%3==1&&(m=m.substring(0,m.length-2)+"=="),m}function Yn(o,s){var a="";if(o&&(a=Gt.call(o)),o&&(a==="[object ArrayBuffer]"||o.buffer&&Gt.call(o.buffer)==="[object ArrayBuffer]")){var m,f=Ee;o instanceof ArrayBuffer?(m=o,f+=Ze):(m=o.buffer,a==="[object Int8Array]"?f+=Ot:a==="[object Uint8Array]"?f+=Ut:a==="[object Uint8ClampedArray]"?f+=jt:a==="[object Int16Array]"?f+=Wt:a==="[object Uint16Array]"?f+=$t:a==="[object Int32Array]"?f+=Ft:a==="[object Uint32Array]"?f+=Ht:a==="[object Float32Array]"?f+=qt:a==="[object Float64Array]"?f+=Vt:s(new Error("Failed to get type for BinaryArray"))),s(f+et(m))}else if(a==="[object Blob]"){var v=new FileReader;v.onload=function(){var C=Kn+o.type+"~"+et(this.result);s(Ee+Qe+C)},v.readAsArrayBuffer(o)}else try{s(JSON.stringify(o))}catch(C){console.error("Couldn't convert value into a JSON string: ",o),s(null,C)}}function Jn(o){if(o.substring(0,Je)!==Ee)return JSON.parse(o);var s,a=o.substring(Xt),m=o.substring(Je,Xt);if(m===Qe&&Nt.test(a)){var f=a.match(Nt);s=f[1],a=a.substring(f[0].length)}var v=Kt(a);switch(m){case Ze:return v;case Qe:return b([v],{type:s});case Ot:return new Int8Array(v);case Ut:return new Uint8Array(v);case jt:return new Uint8ClampedArray(v);case Wt:return new Int16Array(v);case $t:return new Uint16Array(v);case Ft:return new Int32Array(v);case Ht:return new Uint32Array(v);case qt:return new Float32Array(v);case Vt:return new Float64Array(v);default:throw new Error("Unkown type: "+m)}}var tt={serialize:Yn,deserialize:Jn,stringToBuffer:Kt,bufferToString:et};function Yt(o,s,a,m){o.executeSql("CREATE TABLE IF NOT EXISTS "+s.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function Zn(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=typeof o[m]!="string"?o[m].toString():o[m];var f=new x(function(v,C){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(k){return C(k)}a.db.transaction(function(k){Yt(k,a,function(){s._dbInfo=a,v()},function(z,_){C(_)})},C)});return a.serializer=tt,f}function ae(o,s,a,m,f,v){o.executeSql(a,m,f,function(C,k){k.code===k.SYNTAX_ERR?C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[s.storeName],function(z,_){_.rows.length?v(z,k):Yt(z,s,function(){z.executeSql(a,m,f,v)},v)},v):v(C,k)},v)}function Qn(o,s){var a=this;o=R(o);var m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(k){ae(k,C,"SELECT * FROM "+C.storeName+" WHERE key = ? LIMIT 1",[o],function(z,_){var L=_.rows.length?_.rows.item(0).value:null;L&&(L=C.serializer.deserialize(L)),f(L)},function(z,_){v(_)})})}).catch(v)});return E(m,s),m}function ei(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(k){ae(k,C,"SELECT * FROM "+C.storeName,[],function(z,_){for(var L=_.rows,A=L.length,O=0;O<A;O++){var F=L.item(O),$=F.value;if($&&($=C.serializer.deserialize($)),($=o($,F.key,O+1))!==void 0)return void f($)}f()},function(z,_){v(_)})})}).catch(v)});return E(m,s),m}function Jt(o,s,a,m){var f=this;o=R(o);var v=new x(function(C,k){f.ready().then(function(){s===void 0&&(s=null);var z=s,_=f._dbInfo;_.serializer.serialize(s,function(L,A){A?k(A):_.db.transaction(function(O){ae(O,_,"INSERT OR REPLACE INTO "+_.storeName+" (key, value) VALUES (?, ?)",[o,L],function(){C(z)},function(F,$){k($)})},function(O){if(O.code===O.QUOTA_ERR){if(m>0)return void C(Jt.apply(f,[o,z,a,m-1]));k(O)}})})}).catch(k)});return E(v,a),v}function ti(o,s,a){return Jt.apply(this,[o,s,a,1])}function ni(o,s){var a=this;o=R(o);var m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(k){ae(k,C,"DELETE FROM "+C.storeName+" WHERE key = ?",[o],function(){f()},function(z,_){v(_)})})}).catch(v)});return E(m,s),m}function ii(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(C){ae(C,v,"DELETE FROM "+v.storeName,[],function(){m()},function(k,z){f(z)})})}).catch(f)});return E(a,o),a}function oi(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(C){ae(C,v,"SELECT COUNT(key) as c FROM "+v.storeName,[],function(k,z){var _=z.rows.item(0).c;m(_)},function(k,z){f(z)})})}).catch(f)});return E(a,o),a}function ri(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(k){ae(k,C,"SELECT key FROM "+C.storeName+" WHERE id = ? LIMIT 1",[o+1],function(z,_){var L=_.rows.length?_.rows.item(0).key:null;f(L)},function(z,_){v(_)})})}).catch(v)});return E(m,s),m}function si(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(C){ae(C,v,"SELECT key FROM "+v.storeName,[],function(k,z){for(var _=[],L=0;L<z.rows.length;L++)_.push(z.rows.item(L).key);m(_)},function(k,z){f(z)})})}).catch(f)});return E(a,o),a}function ai(o){return new x(function(s,a){o.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(f,v){for(var C=[],k=0;k<v.rows.length;k++)C.push(v.rows.item(k).name);s({db:o,storeNames:C})},function(f,v){a(v)})},function(m){a(m)})})}function ci(o,s){s=N.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;return E(m=o.name?new x(function(v){var C;C=o.name===a.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?v({db:C,storeNames:[o.storeName]}):v(ai(C))}).then(function(v){return new x(function(C,k){v.db.transaction(function(z){function _(F){return new x(function($,ee){z.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(tn,we){ee(we)})})}for(var L=[],A=0,O=v.storeNames.length;A<O;A++)L.push(_(v.storeNames[A]));x.all(L).then(function(){C()}).catch(function(F){k(F)})},function(z){k(z)})})}):x.reject("Invalid arguments"),s),m}var ui={_driver:"webSQLStorage",_initStorage:Zn,_support:Gn(),iterate:ei,getItem:Qn,setItem:ti,removeItem:ni,clear:ii,length:oi,key:ri,keys:si,dropInstance:ci};function li(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Zt(o,s){var a=o.name+"/";return o.storeName!==s.storeName&&(a+=o.storeName+"/"),a}function hi(){var o="_localforage_support_test";try{return localStorage.setItem(o,!0),localStorage.removeItem(o),!1}catch{return!0}}function di(){return!hi()||localStorage.length>0}function fi(o){var s=this,a={};if(o)for(var m in o)a[m]=o[m];return a.keyPrefix=Zt(o,s._defaultConfig),di()?(s._dbInfo=a,a.serializer=tt,x.resolve()):x.reject()}function pi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo.keyPrefix,f=localStorage.length-1;f>=0;f--){var v=localStorage.key(f);v.indexOf(m)===0&&localStorage.removeItem(v)}});return E(a,o),a}function mi(o,s){var a=this;o=R(o);var m=a.ready().then(function(){var f=a._dbInfo,v=localStorage.getItem(f.keyPrefix+o);return v&&(v=f.serializer.deserialize(v)),v});return E(m,s),m}function gi(o,s){var a=this,m=a.ready().then(function(){for(var f=a._dbInfo,v=f.keyPrefix,C=v.length,k=localStorage.length,z=1,_=0;_<k;_++){var L=localStorage.key(_);if(L.indexOf(v)===0){var A=localStorage.getItem(L);if(A&&(A=f.serializer.deserialize(A)),(A=o(A,L.substring(C),z++))!==void 0)return A}}});return E(m,s),m}function vi(o,s){var a=this,m=a.ready().then(function(){var f,v=a._dbInfo;try{f=localStorage.key(o)}catch{f=null}return f&&(f=f.substring(v.keyPrefix.length)),f});return E(m,s),m}function yi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo,f=localStorage.length,v=[],C=0;C<f;C++){var k=localStorage.key(C);k.indexOf(m.keyPrefix)===0&&v.push(k.substring(m.keyPrefix.length))}return v});return E(a,o),a}function wi(o){var s=this.keys().then(function(a){return a.length});return E(s,o),s}function bi(o,s){var a=this;o=R(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return E(m,s),m}function Si(o,s,a){var m=this;o=R(o);var f=m.ready().then(function(){s===void 0&&(s=null);var v=s;return new x(function(C,k){var z=m._dbInfo;z.serializer.serialize(s,function(_,L){if(L)k(L);else try{localStorage.setItem(z.keyPrefix+o,_),C(v)}catch(A){A.name!=="QuotaExceededError"&&A.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(A),k(A)}})})});return E(f,a),f}function Ci(o,s){if(s=N.apply(this,arguments),!(o=typeof o!="function"&&o||{}).name){var a=this.config();o.name=o.name||a.name,o.storeName=o.storeName||a.storeName}var m,f=this;return E(m=o.name?new x(function(v){o.storeName?v(Zt(o,f._defaultConfig)):v(o.name+"/")}).then(function(v){for(var C=localStorage.length-1;C>=0;C--){var k=localStorage.key(C);k.indexOf(v)===0&&localStorage.removeItem(k)}}):x.reject("Invalid arguments"),s),m}var xi={_driver:"localStorageWrapper",_initStorage:fi,_support:li(),iterate:gi,getItem:mi,setItem:Si,removeItem:bi,clear:pi,length:wi,key:vi,keys:yi,dropInstance:Ci},ki=function(o,s){return o===s||typeof o=="number"&&typeof s=="number"&&isNaN(o)&&isNaN(s)},Ei=function(o,s){for(var a=o.length,m=0;m<a;){if(ki(o[m],s))return!0;m++}return!1},Qt=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"},ye={},en={},pe={INDEXEDDB:Xn,WEBSQL:ui,LOCALSTORAGE:xi},zi=[pe.INDEXEDDB._driver,pe.WEBSQL._driver,pe.LOCALSTORAGE._driver],ze=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ze),Mi={description:"",driver:zi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _i(o,s){o[s]=function(){var a=arguments;return o.ready().then(function(){return o[s].apply(o,a)})}}function it(){for(var o=1;o<arguments.length;o++){var s=arguments[o];if(s)for(var a in s)s.hasOwnProperty(a)&&(Qt(s[a])?arguments[0][a]=s[a].slice():arguments[0][a]=s[a])}return arguments[0]}var Li=new(function(){function o(s){for(var a in r(this,o),pe)if(pe.hasOwnProperty(a)){var m=pe[a],f=m._driver;this[a]=f,ye[f]||this.defineDriver(m)}this._defaultConfig=it({},Mi),this._config=it({},this._defaultConfig,s),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return o.prototype.config=function(s){if((s===void 0?"undefined":i(s))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var a in s){if(a==="storeName"&&(s[a]=s[a].replace(/\W/g,"_")),a==="version"&&typeof s[a]!="number")return new Error("Database version must be a number.");this._config[a]=s[a]}return!("driver"in s)||!s.driver||this.setDriver(this._config.driver)}return typeof s=="string"?this._config[s]:this._config},o.prototype.defineDriver=function(s,a,m){var f=new x(function(v,C){try{var k=s._driver,z=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!s._driver)return void C(z);for(var _=nt.concat("_initStorage"),L=0,A=_.length;L<A;L++){var O=_[L];if((!Ei(ze,O)||s[O])&&typeof s[O]!="function")return void C(z)}(function(){for(var $=function(Bi){return function(){var Ii=new Error("Method "+Bi+" is not implemented by the current driver"),nn=x.reject(Ii);return E(nn,arguments[arguments.length-1]),nn}},ee=0,tn=ze.length;ee<tn;ee++){var we=ze[ee];s[we]||(s[we]=$(we))}})();var F=function($){ye[k]&&console.info("Redefining LocalForage driver: "+k),ye[k]=s,en[k]=$,v()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(F,C):F(!!s._support):F(!0)}catch($){C($)}});return M(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=ye[s]?x.resolve(ye[s]):x.reject(new Error("Driver not found."));return M(f,a,m),f},o.prototype.getSerializer=function(s){var a=x.resolve(tt);return M(a,s),a},o.prototype.ready=function(s){var a=this,m=a._driverSet.then(function(){return a._ready===null&&(a._ready=a._initDriver()),a._ready});return M(m,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;Qt(s)||(s=[s]);var v=this._getSupportedDrivers(s);function C(){f._config.driver=f.driver()}function k(L){return f._extend(L),C(),f._ready=f._initStorage(f._config),f._ready}function z(L){return function(){var A=0;function O(){for(;A<L.length;){var F=L[A];return A++,f._dbInfo=null,f._ready=null,f.getDriver(F).then(k).catch(O)}C();var $=new Error("No available storage method found.");return f._driverSet=x.reject($),f._driverSet}return O()}}var _=this._driverSet!==null?this._driverSet.catch(function(){return x.resolve()}):x.resolve();return this._driverSet=_.then(function(){var L=v[0];return f._dbInfo=null,f._ready=null,f.getDriver(L).then(function(A){f._driver=A._driver,C(),f._wrapLibraryMethodsWithReady(),f._initDriver=z(v)})}).catch(function(){C();var L=new Error("No available storage method found.");return f._driverSet=x.reject(L),f._driverSet}),M(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!en[s]},o.prototype._extend=function(s){it(this,s)},o.prototype._getSupportedDrivers=function(s){for(var a=[],m=0,f=s.length;m<f;m++){var v=s[m];this.supports(v)&&a.push(v)}return a},o.prototype._wrapLibraryMethodsWithReady=function(){for(var s=0,a=nt.length;s<a;s++)_i(this,nt[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=Li},{3:3}]},{},[4])(4),vn={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(e){vn.exports=(()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=t.WebStreamsPolyfill||{},c=t.isSecureContext;let y=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const w=c||"MozAppearance"in document.documentElement.style?"iframe":"navigate",b={createWriteStream:function(E,M,R){let N={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},P=0,S=null,u=null,d=null;if(Number.isFinite(M)?([R,M]=[M,R],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=R,N.writableStrategy=M):M&&M.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=R,N.writableStrategy=M):N=M||{},!y){n||(n=c?x(b.mitm):function(T){const B="width=200,height=100",D=document.createDocumentFragment(),U={frame:t.open(T,"popup",B),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...W){D.addEventListener(...W)},dispatchEvent(...W){D.dispatchEvent(...W)},removeEventListener(...W){D.removeEventListener(...W)},postMessage(...W){U.frame.postMessage(...W)}},j=W=>{W.source===U.frame&&(U.loaded=!0,t.removeEventListener("message",j),U.dispatchEvent(new Event("load")))};return t.addEventListener("message",j),U}(b.mitm)),u=new MessageChannel,E=encodeURIComponent(E.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const l={transferringReadable:i,pathname:N.pathname||Math.random().toString().slice(-6)+"/"+E,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+E}};N.size&&(l.headers["Content-Length"]=N.size);const p=[l,"*",[u.port2]];if(i){const T=w==="iframe"?void 0:{transform(D,U){if(!(D instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");P+=D.length,U.enqueue(D),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};d=new b.TransformStream(T,N.writableStrategy,N.readableStrategy);const B=d.readable;u.port1.postMessage({readableStream:B},[B])}u.port1.onmessage=T=>{T.data.download?w==="navigate"?(n.remove(),n=null,P?location.href=T.data.download:S=T.data.download):(n.isPopup&&(n.remove(),n=null,w==="iframe"&&x(b.mitm)),x(T.data.download)):T.data.abort&&(h=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...p):n.addEventListener("load",()=>{n.postMessage(...p)},{once:!0})}let h=[];return!y&&d&&d.writable||new b.WritableStream({write(l){if(!(l instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");y?h.push(l):(u.port1.postMessage(l),P+=l.length,S&&(location.href=S,S=null))},close(){if(y){const l=new Blob(h,{type:"application/octet-stream; charset=utf-8"}),p=document.createElement("a");p.href=URL.createObjectURL(l),p.download=E,p.click()}else u.port1.postMessage("end")},abort(){h=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},N.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function x(E){if(!E)throw new Error("meh");const M=document.createElement("iframe");return M.hidden=!0,M.src=E,M.loaded=!1,M.name="iframe",M.isIframe=!0,M.postMessage=(...R)=>M.contentWindow.postMessage(...R),M.addEventListener("load",()=>{M.loaded=!0},{once:!0}),document.body.appendChild(M),M}try{new Response(new ReadableStream),c&&!("serviceWorker"in navigator)&&(y=!0)}catch{y=!0}return(E=>{try{E()}catch{}})(()=>{const{readable:E}=new TransformStream,M=new MessageChannel;M.port1.postMessage(E,[E]),M.port1.close(),M.port2.close(),i=!0,Object.defineProperty(b,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),b})()})();var Qi=vn.exports;const eo=Object.prototype.toString;function G(e,t){return eo.call(e)===`[object ${t}]`}function bt(e){return G(e,"Function")}const yn=e=>e!==void 0,St=e=>!yn(e);function Ct(e){return e===null}const de=e=>e!==null&&G(e,"Object");function De(e){return G(e,"String")}function wn(e){return e&&Array.isArray(e)}const to=typeof window>"u";function bn(e){const t=function(b){if(!b)return;const x=b,E=[];if(x)for(let M of x){const R=Sn(M);R&&E.push(R)}return E}(e.bussinessRoutes),n=function(b){if(!b)return;const x=b;if(x&&x.length>0){const E=[];return x.forEach(M=>{const R=Cn(M);R&&E.push(R)}),E}}(e.widgetMenuConfig),i=function(b){if(!!b&&b.length>0){const x=[];return b.forEach(E=>{const M=function(R){if(!!R)return{id:R.id,label:R.label,container:R.container,preload:R.preload,afterid:R.afterid,bindid:R.bindid,group:R.group}}(E);M&&x.push(M)}),x}}(e.widgetConfig),r=(c=e.functionList)&&c.length>0?c:void 0;var c;const y=e.pkgObject.version,w=e.pkgObject.name;return{id:function(b,x){const E=`${b}_${x}`;return re.MD5(E)}(w,y),name:I.Config.UI.SiteTitle,group:I.Config.UI.Group,product:w,version:y,routes:t,widgetMenu:n,widgets:i,functions:r}}function Sn(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 i=[];for(let r of e.children){const c=Sn(r);c&&i.push(c)}i.length>0&&(n.children=i)}return n}}function Cn(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(n=>{const i=Cn(n);i&&t.children?.push(i)})),t}const K=g.reactive({panelGroups:{}}),xn=()=>({useGroupAccordion:e=>g.computed(()=>K.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{K.panelGroups[e]={...K.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>g.computed(()=>K.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{K.panelGroups[e]={...K.panelGroups[e],panelExpandStatus:{...K.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{K.panelGroups[e].accordion&&(K.panelGroups[e].panelExpandStatus[t]||Object.keys(K.panelGroups[e].panelExpandStatus).forEach(n=>{K.panelGroups[e].panelExpandStatus[n]=!1})),K.panelGroups[e].panelExpandStatus[t]=!K.panelGroups[e].panelExpandStatus[t]}}),xt=e=>e>255?255:e<0?0:e,Ae=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=xt((i>>16)+t),c=xt((i>>8&255)+t);return"#"+(xt((255&i)+t)|c<<8|r<<16).toString(16)};var Ne=g.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=g.ref(`group-${Be()}`),{setGroupAccordionStatus:n}=xn(),i={"--base-color":e.baseColor,"--border-color":Ae(e.baseColor,180),"--bg-color-header":Ae(e.baseColor,140),"--bg-color-header-hover":Ae(e.baseColor,190),"--bg-color-header-active":Ae(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:i}}});const no=["data-id-group"];Ne.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("div",{"data-id-group":e.idGroup,style:g.normalizeStyle(e.cssColorVars),class:"vcpg"},[g.renderSlot(e.$slots,"default")],12,no)},Ne.__scopeId="data-v-23ab5317",Ne.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Oe=g.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${Be()}`,i=g.ref(),r=g.ref(),c=g.ref(),{panelExpanded:y,togglePanelExpandedStatus:w,setPanelExpandedStatus:b}=xn(),x=g.computed(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:Be()})),E=g.computed(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),M=g.computed(()=>y(E.value,n).value&&x.value.hasContent);return g.onMounted(()=>{b(E.value,n,e.expanded)}),g.onUpdated(()=>{(async()=>(await g.nextTick(),r.value&&c.value&&(r.value.style.height=`${Math.min(c.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:x,panelRef:i,bodyRef:r,bodyContentRef:c,isExpanded:M,collapse:R=>{R.style.height="0"},expand:R=>{R.style.height=`${R.scrollHeight}px`},toggle:()=>{x.value.hasContent&&w(E.value,n)},toggleIcon:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("vue"),Ri=require("axios"),Me=require("@hprose/rpc-core"),on=require("@hprose/io"),Pi=require("@hprose/rpc-html5");function Ti(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Di=Ti(Ri),Ni={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(t=>({min:t.min,max:t.max,size:t.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((i,r)=>(i.size=r===t?i.max:i.min,r!==t&&(n+=i.min),i)),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:i}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:i-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 i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),s=Math.max(Math.min(this.getCurrentDragPercentage(e),r),i);let y=[t,t+1],w=this.panes[y[0]]||null,b=this.panes[y[1]]||null;const x=w.max<100&&s>=w.max+n.prevPanesSize,E=b.max<100&&s<=100-(b.max+this.sumNextPanesSize(t+1));if(x||E)x?(w.size=w.max,b.size=Math.max(100-w.max-n.prevPanesSize-n.nextPanesSize,0)):(w.size=Math.max(100-b.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),b.size=b.max);else{if(this.pushOtherPanes){const M=this.doPushOtherPanes(n,s);if(!M)return;({sums:n,panesToResize:y}=M),w=this.panes[y[0]]||null,b=this.panes[y[1]]||null}w!==null&&(w.size=Math.min(Math.max(s-n.prevPanesSize-n.prevReachedMinPanes,w.min),w.max)),b!==null&&(b.size=Math.min(Math.max(100-s-n.nextPanesSize-n.nextReachedMinPanes,b.min),b.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,i=[n,n+1];return t<e.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,s)=>{s>i[0]&&s<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,s)=>{s>0&&s<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,s)=>{s>n&&s<i[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,s)=>{s<this.panesCount-1&&s>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:i}},sumPrevPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,i)=>t+(i>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 i=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=s=>this.onMouseDown(s,i),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=s=>this.onMouseDown(s,i)),r.onclick=s=>this.onSplitterClick(s,i+1)),this.dblClickSplitter&&(r.ondblclick=s=>this.onSplitterDblClick(s,i+1)),t.parentNode.insertBefore(r,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(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([i,r])=>n[i]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),i=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,s)=>r.index=s),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(i=>i.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),t>.1&&this.readjustSizes(t,n,i)},initialPanesSizing(){let e=100;const t=[],n=[];let i=0;this.panes.forEach(s=>{e-=s.size,s.size!==null&&i++,s.size>=s.max&&t.push(s.id),s.size<=s.min&&n.push(s.id)});let r=100;e>.1&&(this.panes.forEach(s=>{s.size===null&&(s.size=Math.max(Math.min(e/(this.panesCount-i),s.max),s.min)),r-=s.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const i=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(s=>{n-=s.size,s.size>=s.max&&i.push(s.id),s.size<=s.min&&r.push(s.id)}),Math.abs(n)<.1||(this.panes.forEach(s=>{e&&e.givenSize!==null&&e.id===s.id||(s.size=Math.max(Math.min(t,s.max),s.min)),n-=s.size,s.size>=s.max&&i.push(s.id),s.size<=s.min&&r.push(s.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(e,t,n){let i;i=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const s=Math.max(Math.min(r.size+i,r.max),r.min);e-=s-r.size,r.size=s}else if(!n.includes(r.id)){const s=Math.max(Math.min(r.size+i,r.max),r.min);e-=s-r.size,r.size=s}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.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?i=>this.onSplitterDblClick(i,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 g.h("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},ot={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||this.size===0?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})}}};ot.render=function(e,t,n,i,r,s){return g.openBlock(),g.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=y=>s.onPaneClick(y,e._.uid)),style:g.normalizeStyle(e.style)},[g.renderSlot(e.$slots,"default")],4)},ot.__file="src/controls/splitpanes/pane.vue";var me=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rt(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 Ai={exports:{}},rn=Ai.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(S,u){var d=S[0],h=S[1],l=S[2],p=S[3];h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[0]-680876936|0)<<7|d>>>25)+h|0)&h|~d&l)+u[1]-389564586|0)<<12|p>>>20)+d|0)&d|~p&h)+u[2]+606105819|0)<<17|l>>>15)+p|0)&p|~l&d)+u[3]-1044525330|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[4]-176418897|0)<<7|d>>>25)+h|0)&h|~d&l)+u[5]+1200080426|0)<<12|p>>>20)+d|0)&d|~p&h)+u[6]-1473231341|0)<<17|l>>>15)+p|0)&p|~l&d)+u[7]-45705983|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[8]+1770035416|0)<<7|d>>>25)+h|0)&h|~d&l)+u[9]-1958414417|0)<<12|p>>>20)+d|0)&d|~p&h)+u[10]-42063|0)<<17|l>>>15)+p|0)&p|~l&d)+u[11]-1990404162|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&l|~h&p)+u[12]+1804603682|0)<<7|d>>>25)+h|0)&h|~d&l)+u[13]-40341101|0)<<12|p>>>20)+d|0)&d|~p&h)+u[14]-1502002290|0)<<17|l>>>15)+p|0)&p|~l&d)+u[15]+1236535329|0)<<22|h>>>10)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[1]-165796510|0)<<5|d>>>27)+h|0)&l|h&~l)+u[6]-1069501632|0)<<9|p>>>23)+d|0)&h|d&~h)+u[11]+643717713|0)<<14|l>>>18)+p|0)&d|p&~d)+u[0]-373897302|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[5]-701558691|0)<<5|d>>>27)+h|0)&l|h&~l)+u[10]+38016083|0)<<9|p>>>23)+d|0)&h|d&~h)+u[15]-660478335|0)<<14|l>>>18)+p|0)&d|p&~d)+u[4]-405537848|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[9]+568446438|0)<<5|d>>>27)+h|0)&l|h&~l)+u[14]-1019803690|0)<<9|p>>>23)+d|0)&h|d&~h)+u[3]-187363961|0)<<14|l>>>18)+p|0)&d|p&~d)+u[8]+1163531501|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h&p|l&~p)+u[13]-1444681467|0)<<5|d>>>27)+h|0)&l|h&~l)+u[2]-51403784|0)<<9|p>>>23)+d|0)&h|d&~h)+u[7]+1735328473|0)<<14|l>>>18)+p|0)&d|p&~d)+u[12]-1926607734|0)<<20|h>>>12)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[5]-378558|0)<<4|d>>>28)+h|0)^h^l)+u[8]-2022574463|0)<<11|p>>>21)+d|0)^d^h)+u[11]+1839030562|0)<<16|l>>>16)+p|0)^p^d)+u[14]-35309556|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[1]-1530992060|0)<<4|d>>>28)+h|0)^h^l)+u[4]+1272893353|0)<<11|p>>>21)+d|0)^d^h)+u[7]-155497632|0)<<16|l>>>16)+p|0)^p^d)+u[10]-1094730640|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[13]+681279174|0)<<4|d>>>28)+h|0)^h^l)+u[0]-358537222|0)<<11|p>>>21)+d|0)^d^h)+u[3]-722521979|0)<<16|l>>>16)+p|0)^p^d)+u[6]+76029189|0)<<23|h>>>9)+l|0,h=((h+=((l=((l+=((p=((p+=((d=((d+=(h^l^p)+u[9]-640364487|0)<<4|d>>>28)+h|0)^h^l)+u[12]-421815835|0)<<11|p>>>21)+d|0)^d^h)+u[15]+530742520|0)<<16|l>>>16)+p|0)^p^d)+u[2]-995338651|0)<<23|h>>>9)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[0]-198630844|0)<<6|d>>>26)+h|0)|~l))+u[7]+1126891415|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[14]-1416354905|0)<<15|l>>>17)+p|0)|~d))+u[5]-57434055|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[12]+1700485571|0)<<6|d>>>26)+h|0)|~l))+u[3]-1894986606|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[10]-1051523|0)<<15|l>>>17)+p|0)|~d))+u[1]-2054922799|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[8]+1873313359|0)<<6|d>>>26)+h|0)|~l))+u[15]-30611744|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[6]-1560198380|0)<<15|l>>>17)+p|0)|~d))+u[13]+1309151649|0)<<21|h>>>11)+l|0,h=((h+=((p=((p+=(h^((d=((d+=(l^(h|~p))+u[4]-145523070|0)<<6|d>>>26)+h|0)|~l))+u[11]-1120210379|0)<<10|p>>>22)+d|0)^((l=((l+=(d^(p|~h))+u[2]+718787259|0)<<15|l>>>17)+p|0)|~d))+u[9]-343485551|0)<<21|h>>>11)+l|0,S[0]=d+S[0]|0,S[1]=h+S[1]|0,S[2]=l+S[2]|0,S[3]=p+S[3]|0}function i(S){var u,d=[];for(u=0;u<64;u+=4)d[u>>2]=S.charCodeAt(u)+(S.charCodeAt(u+1)<<8)+(S.charCodeAt(u+2)<<16)+(S.charCodeAt(u+3)<<24);return d}function r(S){var u,d=[];for(u=0;u<64;u+=4)d[u>>2]=S[u]+(S[u+1]<<8)+(S[u+2]<<16)+(S[u+3]<<24);return d}function s(S){var u,d,h,l,p,T,B=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=B;u+=64)n(D,i(S.substring(u-64,u)));for(d=(S=S.substring(u-64)).length,h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<d;u+=1)h[u>>2]|=S.charCodeAt(u)<<(u%4<<3);if(h[u>>2]|=128<<(u%4<<3),u>55)for(n(D,h),u=0;u<16;u+=1)h[u]=0;return l=(l=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),T=parseInt(l[1],16)||0,h[14]=p,h[15]=T,n(D,h),D}function y(S){var u,d,h,l,p,T,B=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=B;u+=64)n(D,r(S.subarray(u-64,u)));for(d=(S=u-64<B?S.subarray(u-64):new Uint8Array(0)).length,h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<d;u+=1)h[u>>2]|=S[u]<<(u%4<<3);if(h[u>>2]|=128<<(u%4<<3),u>55)for(n(D,h),u=0;u<16;u+=1)h[u]=0;return l=(l=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),T=parseInt(l[1],16)||0,h[14]=p,h[15]=T,n(D,h),D}function w(S){var u,d="";for(u=0;u<4;u+=1)d+=t[S>>8*u+4&15]+t[S>>8*u&15];return d}function b(S){var u;for(u=0;u<S.length;u+=1)S[u]=w(S[u]);return S.join("")}function x(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function E(S,u){var d,h=S.length,l=new ArrayBuffer(h),p=new Uint8Array(l);for(d=0;d<h;d+=1)p[d]=S.charCodeAt(d);return u?p:l}function M(S){return String.fromCharCode.apply(null,new Uint8Array(S))}function R(S,u,d){var h=new Uint8Array(S.byteLength+u.byteLength);return h.set(new Uint8Array(S)),h.set(new Uint8Array(u),S.byteLength),d?h:h.buffer}function A(S){var u,d=[],h=S.length;for(u=0;u<h-1;u+=2)d.push(parseInt(S.substr(u,2),16));return String.fromCharCode.apply(String,d)}function P(){this.reset()}return b(s("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function S(u,d){return(u=0|u||0)<0?Math.max(u+d,0):Math.min(u,d)}ArrayBuffer.prototype.slice=function(u,d){var h,l,p,T,B=this.byteLength,D=S(u,B),O=B;return d!==e&&(O=S(d,B)),D>O?new ArrayBuffer(0):(h=O-D,l=new ArrayBuffer(h),p=new Uint8Array(l),T=new Uint8Array(this,D,h),p.set(T),l)}}(),P.prototype.append=function(S){return this.appendBinary(x(S)),this},P.prototype.appendBinary=function(S){this._buff+=S,this._length+=S.length;var u,d=this._buff.length;for(u=64;u<=d;u+=64)n(this._hash,i(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},P.prototype.end=function(S){var u,d,h=this._buff,l=h.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=h.charCodeAt(u)<<(u%4<<3);return this._finish(p,l),d=b(this._hash),S&&(d=A(d)),this.reset(),d},P.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},P.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},P.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},P.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},P.prototype._finish=function(S,u){var d,h,l,p=u;if(S[p>>2]|=128<<(p%4<<3),p>55)for(n(this._hash,S),p=0;p<16;p+=1)S[p]=0;d=(d=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),h=parseInt(d[2],16),l=parseInt(d[1],16)||0,S[14]=h,S[15]=l,n(this._hash,S)},P.hash=function(S,u){return P.hashBinary(x(S),u)},P.hashBinary=function(S,u){var d=b(s(S));return u?A(d):d},P.ArrayBuffer=function(){this.reset()},P.ArrayBuffer.prototype.append=function(S){var u,d=R(this._buff.buffer,S,!0),h=d.length;for(this._length+=S.byteLength,u=64;u<=h;u+=64)n(this._hash,r(d.subarray(u-64,u)));return this._buff=u-64<h?new Uint8Array(d.buffer.slice(u-64)):new Uint8Array(0),this},P.ArrayBuffer.prototype.end=function(S){var u,d,h=this._buff,l=h.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<l;u+=1)p[u>>2]|=h[u]<<(u%4<<3);return this._finish(p,l),d=b(this._hash),S&&(d=A(d)),this.reset(),d},P.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},P.ArrayBuffer.prototype.getState=function(){var S=P.prototype.getState.call(this);return S.buff=M(S.buff),S},P.ArrayBuffer.prototype.setState=function(S){return S.buff=E(S.buff,!0),P.prototype.setState.call(this,S)},P.ArrayBuffer.prototype.destroy=P.prototype.destroy,P.ArrayBuffer.prototype._finish=P.prototype._finish,P.ArrayBuffer.hash=function(S,u){var d=b(y(new Uint8Array(S)));return u?A(d):d},P}();const st=[];class ee{static addHandler(t,n,i){t.addEventListener?t.addEventListener(n,i,!1):t.attachEvent?t.attachEvent("on"+n,i):t["on"+n]=i}static windowResizeHandler(t){ee.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;if(r!==void 0&&r)r.call(window.document);else if(window.ActiveXObject!==void 0){let s=new window.ActiveXObject("WScript.Shell");s?.SendKeys("{F11}")}}else{let i=t;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;if(r!==void 0&&r)r.call(i);else if(window.ActiveXObject!==void 0){let s=new window.ActiveXObject("WScript.Shell");s?.SendKeys("{F11}")}}}static requestFullScreen(t=window.document.documentElement){let n=t;var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(window.ActiveXObject!==void 0){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(window.ActiveXObject!==void 0){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ee.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=ee.isFullScreen();t(i)}):document.addEventListener("MSFullscreenChange",function(){const i=ee.isFullScreen();t(i)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(st.indexOf(n)!==-1)return;st.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ee.stringifyCircularHandler);return st.length=0,n}static jsonParse(t){const n=ee.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,s=t,y=new rn.ArrayBuffer,w=new FileReader;w.onload=function(b){y.append(b.target?.result);const x=y.end();n({isOK:!0,data:x})},w.onerror=function(){const b="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(b),n({isOK:!1,data:b})},function(){const b=2097152>=s.size?s.size:2097152;w.readAsArrayBuffer(r.call(s,0,b))}()}static MD5(t,n=!1){return rn.hash(t,n)}static copyText=t=>new Promise((n,i)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)});static setGrayMode(t){ee.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(t,n,i){const r=i||document.body;let{className:s}=r;s=s.replace(n,""),r.className=t?`${s} ${n} `:s}static setCssVar(t,n,i=document.documentElement){i.style.setProperty(t,n)}}class _e{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class Le{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const i=this.storage.getItem(this.getKey(t));if(i)try{const r=JSON.parse(i),{value:s,expire:y}=r;if(y===null||y>=Date.now())return s;this.remove(this.getKey(t))}catch{return n}return n}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,i=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${i}`}getCookie(t){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const s=n[i].split("=");if(s[0]===this.getKey(t))return s[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const Ui=new Le("",localStorage);function Be(){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 i=3&Number(e[19])|8;return e[19]=t.substring(i,i+1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}var ge;function at(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 Ie(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function ct(e){let t=e.toLowerCase();if(Ie(e)){if(t.length===4){let i="#";for(let r=1;r<4;r+=1)i+=t.slice(r,r+1).concat(t.slice(r,r+1));t=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+t.slice(i,i+2)));return"RGB("+n.join(",")+")"}return t}function ut(e,t){const n=parseInt(e,16)+t,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function sn(e,t,n){const i=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function lt(e,t){const n=parseInt(e,16)-t,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function ht(e){return{all:e=e||new Map,on(t,n){const i=e?.get(t);i&&i.push(n)||e?.set(t,[n])},off(t,n){const i=e?.get(t);i&&i.splice(i.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(i=>{i(n)}),(e?.get("*")||[]).slice().map(i=>{i(t,n)})}}}exports.EnumColor=void 0,(ge=exports.EnumColor||(exports.EnumColor={}))[ge.RGBA=0]="RGBA",ge[ge.Hex=1]="Hex",ge[ge.Hsla=2]="Hsla";const ve=ht(),X={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Re=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const i=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)},an=(e,t)=>{const n=JSON.stringify(e,null,2);t?Re(n,t+".json"):ve.emit(X.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")};function cn(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}const I={Config:SysConfig,EventBus:ve,DefaultProxyClient:null,Axios:Di.default},ce=new Le("user",localStorage);function he(){return ce.get("access_token")}function dt(){ce.remove("access_token"),I.User&&delete I.User}function un(){return he()?.refresh}function ft(e,t,n,i="json",r){const s={baseURL:I.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+he()?.token},responseType:i,cancelToken:r};if(n)for(let y in n)s.headers[y]=n[y];return I.SystemID&&(s.headers.sysid=I.SystemID,I.SystemGroup&&(s.headers.sysgroup=I.SystemGroup)),t&&(s.baseURL=t),s}function ne(e,t,n,i,r="json",s,y){const w=ft(n,t,i,r,s);return y&&y>=2e4&&(w.timeout=y),I.Axios?.get(e,w).catch(function(b){Pe(b,t,e,"Get")})}function Pe(e,t,n,i="Get"){const r=`${t}${n}`;if(e&&e.response){let s=!1;const y=e.response.status;switch(y){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const b=e.response.data;if(b){const x=b.indexOf(":"),E=b.indexOf(`\r
|
|
2
|
+
`);if(x>0&&E-x>2){const M=b.substring(x+2,E);M.indexOf("'System.Exception'")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(s=!0,e.message=M)}}else e.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:e.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:e.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:e.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:e.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:e.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:e.message=`\u8FDE\u63A5\u9519\u8BEF${e.response.status}`}let w={address:r,code:y,isExceptionInfo:s,message:e.message,result:e.response.data};if(console.warn(`HTTP ${i}\u8BF7\u6C42\u9519\u8BEF\uFF1A`,w),I.EventBus.emit(X.AxiosRequestErrorEvent,w),s)throw new Error(e.message)}}function pt(e,t,n,i,r,s="json",y){const w=ft(i,t,r,s);y&&y>=2e4&&(w.timeout=y);const b=function(x){let E=new FormData;return x&&Object.keys(x).forEach(M=>{if(!x)return;let R=x[M];var A;R!=null&&E.append(M,(A=R)instanceof Blob?A:A.toString())}),E}(n);return I.Axios?.post(e,b,w).catch(function(x){Pe(x,t,e,"Post")})}var mt={exports:{}},Oi=typeof window<"u"?window:me!==void 0?me:typeof self<"u"?self:{},ji=function(e){if(!e)return!1;var t=Wi.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Wi=Object.prototype.toString,gt=function(e){return e.replace(/^\s+|\s+$/g,"")},Fi=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)$i.call(n,i)&&(e[i]=n[i])}return e},$i=Object.prototype.hasOwnProperty,ln=Oi,Hi=ji,qi=function(e){if(!e)return{};for(var t,n={},i=gt(e).split(`
|
|
3
|
+
`),r=0;r<i.length;r++){var s=i[r],y=s.indexOf(":"),w=gt(s.slice(0,y)).toLowerCase(),b=gt(s.slice(y+1));n[w]===void 0?n[w]=b:(t=n[w],Object.prototype.toString.call(t)==="[object Array]"?n[w].push(b):n[w]=[n[w],b])}return n},Gi=Fi;function hn(e,t,n){var i=e;return Hi(t)?(n=t,typeof e=="string"&&(i={uri:e})):i=Gi(t,{uri:e}),i.callback=n,i}function re(e,t,n){return dn(t=hn(e,t,n))}function dn(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(d,h,l){t||(t=!0,e.callback(d,h,l))};function i(){var d=void 0;if(d=b.response?b.response:b.responseText||function(h){try{if(h.responseType==="document")return h.responseXML;var l=h.responseXML&&h.responseXML.documentElement.nodeName==="parsererror";if(h.responseType===""&&!l)return h.responseXML}catch{}return null}(b),S)try{d=JSON.parse(d)}catch{}return d}function r(d){return clearTimeout(x),d instanceof Error||(d=new Error(""+(d||"Unknown XMLHttpRequest Error"))),d.statusCode=0,n(d,u)}function s(){if(!w){var d;clearTimeout(x),d=e.useXDR&&b.status===void 0?200:b.status===1223?204:b.status;var h=u,l=null;return d!==0?(h={body:i(),statusCode:d,method:M,headers:{},url:E,rawRequest:b},b.getAllResponseHeaders&&(h.headers=qi(b.getAllResponseHeaders()))):l=new Error("Internal XMLHttpRequest Error"),n(l,h,h.body)}}var y,w,b=e.xhr||null;b||(b=e.cors||e.useXDR?new re.XDomainRequest:new re.XMLHttpRequest);var x,E=b.url=e.uri||e.url,M=b.method=e.method||"GET",R=e.body||e.data,A=b.headers=e.headers||{},P=!!e.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:M,url:E,rawRequest:b};if("json"in e&&e.json!==!1&&(S=!0,A.accept||A.Accept||(A.Accept="application/json"),M!=="GET"&&M!=="HEAD"&&(A["content-type"]||A["Content-Type"]||(A["Content-Type"]="application/json"),R=JSON.stringify(e.json===!0?R:e.json))),b.onreadystatechange=function(){b.readyState===4&&setTimeout(s,0)},b.onload=s,b.onerror=r,b.onprogress=function(){},b.onabort=function(){w=!0},b.ontimeout=r,b.open(M,E,!P,e.username,e.password),P||(b.withCredentials=!!e.withCredentials),!P&&e.timeout>0&&(x=setTimeout(function(){if(!w){w=!0,b.abort("timeout");var d=new Error("XMLHttpRequest timeout");d.code="ETIMEDOUT",r(d)}},e.timeout)),b.setRequestHeader)for(y in A)A.hasOwnProperty(y)&&b.setRequestHeader(y,A[y]);else if(e.headers&&!function(d){for(var h in d)if(d.hasOwnProperty(h))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(b.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(b),b.send(R||null),b}mt.exports=re,mt.exports.default=re,re.XMLHttpRequest=ln.XMLHttpRequest||function(){},re.XDomainRequest="withCredentials"in new re.XMLHttpRequest?re.XMLHttpRequest:ln.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){re[e==="delete"?"del":e]=function(t,n,i){return(n=hn(t,n,i)).method=e.toUpperCase(),dn(n)}});var Xi=mt.exports;const Vi=[200,201,202,204,308],Ki=[408,502,503,504];class Yi{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.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.reader=new FileReader,this.eventTarget=ht(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(t){const n=i=>{i.upload.onprogress=r=>{const s=100/this.totalChunks,y=s*this.file.size,w=s*this.chunkCount,b=r.loaded/(r.total??y)*s;this.dispatch("progress",Math.min(w+b,100))}};return new Promise((i,r)=>{this.currentXhr=Xi({...t,beforeSend:n},(s,y)=>(this.currentXhr=void 0,s?r(s):i(y)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){this.paused||this.offline||this.success||this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Vi.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Ki.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const Ji=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)}};class ke{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!_e.isNullOrEmpty(t)){if(ke.httpTransport||(ke.httpTransport=new Pi.HttpTransport),this.client=new Me.Client(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):ve.emit(X.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}class be{hproseClient;hpProxyObj;defaultContext=new Me.ClientContext;constructor(t){this.hproseClient=new ke(t),this.hpProxyObj=null}getClientContext(t,n){const i={};n&&(i.requestHeaders=n);const r=he();i.httpRequestHeaders=t||{};const s=i.httpRequestHeaders;return r&&(s.token=r.token),I.SystemID&&(s.sysid=I.SystemID,I.SystemGroup&&(s.sysgroup=I.SystemGroup)),new Me.ClientContext(i)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||ve.emit(X.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=he();return console.log(r,"userToken3"),r&&(n||(n=new Me.ClientContext({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,i,n)}async hproseInvokeEncode(t){const n=new on.ByteStream(t).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(t,...n){const i=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return on.ByteStream.toString(i)}}class Zi{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:t,duration:n});else switch(i){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn(t,n);break;case"error":this.message.error(t,n)}else{switch(i){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":i="dark",console.error(t)}this.eventBus&&this.eventBus.emit(X.AlertInfoEvent,{type:i,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}}const vt=new Map;function fn(e){if(e&&_e.isNotEmpty(e)){if(vt.has(e))return vt.get(e);{const t=new be(e);return vt.set(e,t),t}}}const pn=ce.get("is_LockScreen",!1),Se={isLock:pn,lockTime:pn=="true"?gn():0};function mn(e){Se.isLock=e,ce.set("is_LockScreen",e,10),e&&(dt(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function gn(){let e=3600;return I.Config.UI?.LockTime&&I.Config.UI?.LockTime>=10&&(e=I.Config.UI.LockTime),e}let yt;function wt(){clearInterval(yt),window.location.href.indexOf("/login")>0||Se.isLock||(mn(!1),Se.lockTime=gn(),yt=setInterval(()=>{if(Se.lockTime--,Se.lockTime<=0)return mn(!0),clearInterval(yt)},1e3))}var Qi={exports:{}},Te=Qi.exports=function e(t,n,i){function r(w,b){if(!n[w]){if(!t[w]){if(!b&&rt)return rt(w);if(s)return s(w,!0);var x=new Error("Cannot find module '"+w+"'");throw x.code="MODULE_NOT_FOUND",x}var E=n[w]={exports:{}};t[w][0].call(E.exports,function(M){var R=t[w][1][M];return r(R||M)},E,E.exports,e,t,n,i)}return n[w].exports}for(var s=rt,y=0;y<i.length;y++)r(i[y]);return r}({1:[function(e,t,n){(function(i){var r,s,y=i.MutationObserver||i.WebKitMutationObserver;if(y){var w=0,b=new y(R),x=i.document.createTextNode("");b.observe(x,{characterData:!0}),r=function(){x.data=w=++w%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var P=i.document.createElement("script");P.onreadystatechange=function(){R(),P.onreadystatechange=null,P.parentNode.removeChild(P),P=null},i.document.documentElement.appendChild(P)}:function(){setTimeout(R,0)};else{var E=new i.MessageChannel;E.port1.onmessage=R,r=function(){E.port2.postMessage(0)}}var M=[];function R(){var P,S;s=!0;for(var u=M.length;u;){for(S=M,M=[],P=-1;++P<u;)S[P]();u=M.length}s=!1}function A(P){M.push(P)!==1||s||r()}t.exports=A}).call(this,me!==void 0?me:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var s={},y=["REJECTED"],w=["FULFILLED"],b=["PENDING"];function x(l){if(typeof l!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,l!==r&&A(this,l)}function E(l,p,T){this.promise=l,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof T=="function"&&(this.onRejected=T,this.callRejected=this.otherCallRejected)}function M(l,p,T){i(function(){var B;try{B=p(T)}catch(D){return s.reject(l,D)}B===l?s.reject(l,new TypeError("Cannot resolve promise with itself")):s.resolve(l,B)})}function R(l){var p=l&&l.then;if(l&&(typeof l=="object"||typeof l=="function")&&typeof p=="function")return function(){p.apply(l,arguments)}}function A(l,p){var T=!1;function B(W){T||(T=!0,s.reject(l,W))}function D(W){T||(T=!0,s.resolve(l,W))}function O(){p(D,B)}var j=P(O);j.status==="error"&&B(j.value)}function P(l,p){var T={};try{T.value=l(p),T.status="success"}catch(B){T.status="error",T.value=B}return T}function S(l){return l instanceof this?l:s.resolve(new this(r),l)}function u(l){var p=new this(r);return s.reject(p,l)}function d(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=l.length,B=!1;if(!T)return this.resolve([]);for(var D=new Array(T),O=0,j=-1,W=new this(r);++j<T;)H(l[j],j);return W;function H(q,G){function Q(J){D[G]=J,++O!==T||B||(B=!0,s.resolve(W,D))}p.resolve(q).then(Q,function(J){B||(B=!0,s.reject(W,J))})}}function h(l){var p=this;if(Object.prototype.toString.call(l)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=l.length,B=!1;if(!T)return this.resolve([]);for(var D=-1,O=new this(r);++D<T;)j(l[D]);return O;function j(W){p.resolve(W).then(function(H){B||(B=!0,s.resolve(O,H))},function(H){B||(B=!0,s.reject(O,H))})}}t.exports=x,x.prototype.catch=function(l){return this.then(null,l)},x.prototype.then=function(l,p){if(typeof l!="function"&&this.state===w||typeof p!="function"&&this.state===y)return this;var T=new this.constructor(r);return this.state!==b?M(T,this.state===w?l:p,this.outcome):this.queue.push(new E(T,l,p)),T},E.prototype.callFulfilled=function(l){s.resolve(this.promise,l)},E.prototype.otherCallFulfilled=function(l){M(this.promise,this.onFulfilled,l)},E.prototype.callRejected=function(l){s.reject(this.promise,l)},E.prototype.otherCallRejected=function(l){M(this.promise,this.onRejected,l)},s.resolve=function(l,p){var T=P(R,p);if(T.status==="error")return s.reject(l,T.value);var B=T.value;if(B)A(l,B);else{l.state=w,l.outcome=p;for(var D=-1,O=l.queue.length;++D<O;)l.queue[D].callFulfilled(p)}return l},s.reject=function(l,p){l.state=y,l.outcome=p;for(var T=-1,B=l.queue.length;++T<B;)l.queue[T].callRejected(p);return l},x.resolve=S,x.reject=u,x.all=d,x.race=h},{1:1}],3:[function(e,t,n){(function(i){typeof i.Promise!="function"&&(i.Promise=e(2))}).call(this,me!==void 0?me:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function r(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function s(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var y=s();function w(){try{if(!y||!y.open)return!1;var o=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),a=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!o||a)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function b(o,a){o=o||[],a=a||{};try{return new Blob(o,a)}catch(f){if(f.name!=="TypeError")throw f;for(var c=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),m=0;m<o.length;m+=1)c.append(o[m]);return c.getBlob(a.type)}}typeof Promise>"u"&&e(3);var x=Promise;function E(o,a){a&&o.then(function(c){a(null,c)},function(c){a(c)})}function M(o,a,c){typeof a=="function"&&o.then(a),typeof c=="function"&&o.catch(c)}function R(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function A(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var P="local-forage-detect-blob-support",S=void 0,u={},d=Object.prototype.toString,h="readonly",l="readwrite";function p(o){for(var a=o.length,c=new ArrayBuffer(a),m=new Uint8Array(c),f=0;f<a;f++)m[f]=o.charCodeAt(f);return c}function T(o){return new x(function(a){var c=o.transaction(P,l),m=b([""]);c.objectStore(P).put(m,"key"),c.onabort=function(f){f.preventDefault(),f.stopPropagation(),a(!1)},c.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),v=navigator.userAgent.match(/Edge\//);a(v||!f||parseInt(f[1],10)>=43)}}).catch(function(){return!1})}function B(o){return typeof S=="boolean"?x.resolve(S):T(o).then(function(a){return S=a})}function D(o){var a=u[o.name],c={};c.promise=new x(function(m,f){c.resolve=m,c.reject=f}),a.deferredOperations.push(c),a.dbReady?a.dbReady=a.dbReady.then(function(){return c.promise}):a.dbReady=c.promise}function O(o){var a=u[o.name].deferredOperations.pop();if(a)return a.resolve(),a.promise}function j(o,a){var c=u[o.name].deferredOperations.pop();if(c)return c.reject(a),c.promise}function W(o,a){return new x(function(c,m){if(u[o.name]=u[o.name]||Nt(),o.db){if(!a)return c(o.db);D(o),o.db.close()}var f=[o.name];a&&f.push(o.version);var v=y.open.apply(y,f);a&&(v.onupgradeneeded=function(C){var k=v.result;try{k.createObjectStore(o.storeName),C.oldVersion<=1&&k.createObjectStore(P)}catch(z){if(z.name!=="ConstraintError")throw z;console.warn('The database "'+o.name+'" has been upgraded from version '+C.oldVersion+" to version "+C.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),v.onerror=function(C){C.preventDefault(),m(v.error)},v.onsuccess=function(){var C=v.result;C.onversionchange=function(k){k.target.close()},c(C),O(o)}})}function H(o){return W(o,!1)}function q(o){return W(o,!0)}function G(o,a){if(!o.db)return!0;var c=!o.db.objectStoreNames.contains(o.storeName),m=o.version<o.db.version,f=o.version>o.db.version;if(m&&(o.version!==a&&console.warn('The database "'+o.name+`" can't be downgraded from version `+o.db.version+" to version "+o.version+"."),o.version=o.db.version),f||c){if(c){var v=o.db.version+1;v>o.version&&(o.version=v)}return!0}return!1}function Q(o){return new x(function(a,c){var m=new FileReader;m.onerror=c,m.onloadend=function(f){var v=btoa(f.target.result||"");a({__local_forage_encoded_blob:!0,data:v,type:o.type})},m.readAsBinaryString(o)})}function J(o){return b([p(atob(o.data))],{type:o.type})}function ie(o){return o&&o.__local_forage_encoded_blob}function Ke(o){var a=this,c=a._initReady().then(function(){var m=u[a._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return M(c,o,o),c}function Ye(o){D(o);for(var a=u[o.name],c=a.forages,m=0;m<c.length;m++){var f=c[m];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return o.db=null,H(o).then(function(v){return o.db=v,G(o)?q(o):v}).then(function(v){o.db=a.db=v;for(var C=0;C<c.length;C++)c[C]._dbInfo.db=v}).catch(function(v){throw j(o,v),v})}function oe(o,a,c,m){m===void 0&&(m=1);try{var f=o.db.transaction(o.storeName,a);c(null,f)}catch(v){if(m>0&&(!o.db||v.name==="InvalidStateError"||v.name==="NotFoundError"))return x.resolve().then(function(){if(!o.db||v.name==="NotFoundError"&&!o.db.objectStoreNames.contains(o.storeName)&&o.version<=o.db.version)return o.db&&(o.version=o.db.version+1),q(o)}).then(function(){return Ye(o).then(function(){oe(o,a,c,m-1)})}).catch(c);c(v)}}function Nt(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function An(o){var a=this,c={db:null};if(o)for(var m in o)c[m]=o[m];var f=u[c.name];f||(f=Nt(),u[c.name]=f),f.forages.push(a),a._initReady||(a._initReady=a.ready,a.ready=Ke);var v=[];function C(){return x.resolve()}for(var k=0;k<f.forages.length;k++){var z=f.forages[k];z!==a&&v.push(z._initReady().catch(C))}var _=f.forages.slice(0);return x.all(v).then(function(){return c.db=f.db,H(c)}).then(function(L){return c.db=L,G(c,a._defaultConfig.version)?q(c):L}).then(function(L){c.db=f.db=L,a._dbInfo=c;for(var N=0;N<_.length;N++){var U=_[N];U!==a&&(U._dbInfo.db=c.db,U._dbInfo.version=c.version)}})}function Un(o,a){var c=this;o=R(o);var m=new x(function(f,v){c.ready().then(function(){oe(c._dbInfo,h,function(C,k){if(C)return v(C);try{var z=k.objectStore(c._dbInfo.storeName).get(o);z.onsuccess=function(){var _=z.result;_===void 0&&(_=null),ie(_)&&(_=J(_)),f(_)},z.onerror=function(){v(z.error)}}catch(_){v(_)}})}).catch(v)});return E(m,a),m}function On(o,a){var c=this,m=new x(function(f,v){c.ready().then(function(){oe(c._dbInfo,h,function(C,k){if(C)return v(C);try{var z=k.objectStore(c._dbInfo.storeName).openCursor(),_=1;z.onsuccess=function(){var L=z.result;if(L){var N=L.value;ie(N)&&(N=J(N));var U=o(N,L.key,_++);U!==void 0?f(U):L.continue()}else f()},z.onerror=function(){v(z.error)}}catch(L){v(L)}})}).catch(v)});return E(m,a),m}function jn(o,a,c){var m=this;o=R(o);var f=new x(function(v,C){var k;m.ready().then(function(){return k=m._dbInfo,d.call(a)==="[object Blob]"?B(k.db).then(function(z){return z?a:Q(a)}):a}).then(function(z){oe(m._dbInfo,l,function(_,L){if(_)return C(_);try{var N=L.objectStore(m._dbInfo.storeName);z===null&&(z=void 0);var U=N.put(z,o);L.oncomplete=function(){z===void 0&&(z=null),v(z)},L.onabort=L.onerror=function(){var F=U.error?U.error:U.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return E(f,c),f}function Wn(o,a){var c=this;o=R(o);var m=new x(function(f,v){c.ready().then(function(){oe(c._dbInfo,l,function(C,k){if(C)return v(C);try{var z=k.objectStore(c._dbInfo.storeName).delete(o);k.oncomplete=function(){f()},k.onerror=function(){v(z.error)},k.onabort=function(){var _=z.error?z.error:z.transaction.error;v(_)}}catch(_){v(_)}})}).catch(v)});return E(m,a),m}function Fn(o){var a=this,c=new x(function(m,f){a.ready().then(function(){oe(a._dbInfo,l,function(v,C){if(v)return f(v);try{var k=C.objectStore(a._dbInfo.storeName).clear();C.oncomplete=function(){m()},C.onabort=C.onerror=function(){var z=k.error?k.error:k.transaction.error;f(z)}}catch(z){f(z)}})}).catch(f)});return E(c,o),c}function $n(o){var a=this,c=new x(function(m,f){a.ready().then(function(){oe(a._dbInfo,h,function(v,C){if(v)return f(v);try{var k=C.objectStore(a._dbInfo.storeName).count();k.onsuccess=function(){m(k.result)},k.onerror=function(){f(k.error)}}catch(z){f(z)}})}).catch(f)});return E(c,o),c}function Hn(o,a){var c=this,m=new x(function(f,v){o<0?f(null):c.ready().then(function(){oe(c._dbInfo,h,function(C,k){if(C)return v(C);try{var z=k.objectStore(c._dbInfo.storeName),_=!1,L=z.openKeyCursor();L.onsuccess=function(){var N=L.result;N?o===0||_?f(N.key):(_=!0,N.advance(o)):f(null)},L.onerror=function(){v(L.error)}}catch(N){v(N)}})}).catch(v)});return E(m,a),m}function qn(o){var a=this,c=new x(function(m,f){a.ready().then(function(){oe(a._dbInfo,h,function(v,C){if(v)return f(v);try{var k=C.objectStore(a._dbInfo.storeName).openKeyCursor(),z=[];k.onsuccess=function(){var _=k.result;_?(z.push(_.key),_.continue()):m(z)},k.onerror=function(){f(k.error)}}catch(_){f(_)}})}).catch(f)});return E(c,o),c}function Gn(o,a){a=A.apply(this,arguments);var c=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||c.name,o.storeName=o.storeName||c.storeName);var m,f=this;if(o.name){var v=o.name===c.name&&f._dbInfo.db?x.resolve(f._dbInfo.db):H(o).then(function(C){var k=u[o.name],z=k.forages;k.db=C;for(var _=0;_<z.length;_++)z[_]._dbInfo.db=C;return C});m=o.storeName?v.then(function(C){if(C.objectStoreNames.contains(o.storeName)){var k=C.version+1;D(o);var z=u[o.name],_=z.forages;C.close();for(var L=0;L<_.length;L++){var N=_[L];N._dbInfo.db=null,N._dbInfo.version=k}return new x(function(U,F){var $=y.open(o.name,k);$.onerror=function(te){$.result.close(),F(te)},$.onupgradeneeded=function(){$.result.deleteObjectStore(o.storeName)},$.onsuccess=function(){var te=$.result;te.close(),U(te)}}).then(function(U){z.db=U;for(var F=0;F<_.length;F++){var $=_[F];$._dbInfo.db=U,O($._dbInfo)}}).catch(function(U){throw(j(o,U)||x.resolve()).catch(function(){}),U})}}):v.then(function(C){D(o);var k=u[o.name],z=k.forages;C.close();for(var _=0;_<z.length;_++)z[_]._dbInfo.db=null;return new x(function(L,N){var U=y.deleteDatabase(o.name);U.onerror=function(){var F=U.result;F&&F.close(),N(U.error)},U.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},U.onsuccess=function(){var F=U.result;F&&F.close(),L(F)}}).then(function(L){k.db=L;for(var N=0;N<z.length;N++)O(z[N]._dbInfo)}).catch(function(L){throw(j(o,L)||x.resolve()).catch(function(){}),L})})}else m=x.reject("Invalid arguments");return E(m,a),m}var Xn={_driver:"asyncStorage",_initStorage:An,_support:w(),iterate:On,getItem:Un,setItem:jn,removeItem:Wn,clear:Fn,length:$n,key:Hn,keys:qn,dropInstance:Gn};function Vn(){return typeof openDatabase=="function"}var se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kn="~~local_forage_type~",At=/^~~local_forage_type~([^~]+)~/,Ee="__lfsc__:",Je=Ee.length,Ze="arbf",Qe="blob",Ut="si08",Ot="ui08",jt="uic8",Wt="si16",Ft="si32",$t="ur16",Ht="ui32",qt="fl32",Gt="fl64",Xt=Je+Ze.length,Vt=Object.prototype.toString;function Kt(o){var a,c,m,f,v,C=.75*o.length,k=o.length,z=0;o[o.length-1]==="="&&(C--,o[o.length-2]==="="&&C--);var _=new ArrayBuffer(C),L=new Uint8Array(_);for(a=0;a<k;a+=4)c=se.indexOf(o[a]),m=se.indexOf(o[a+1]),f=se.indexOf(o[a+2]),v=se.indexOf(o[a+3]),L[z++]=c<<2|m>>4,L[z++]=(15&m)<<4|f>>2,L[z++]=(3&f)<<6|63&v;return _}function et(o){var a,c=new Uint8Array(o),m="";for(a=0;a<c.length;a+=3)m+=se[c[a]>>2],m+=se[(3&c[a])<<4|c[a+1]>>4],m+=se[(15&c[a+1])<<2|c[a+2]>>6],m+=se[63&c[a+2]];return c.length%3==2?m=m.substring(0,m.length-1)+"=":c.length%3==1&&(m=m.substring(0,m.length-2)+"=="),m}function Yn(o,a){var c="";if(o&&(c=Vt.call(o)),o&&(c==="[object ArrayBuffer]"||o.buffer&&Vt.call(o.buffer)==="[object ArrayBuffer]")){var m,f=Ee;o instanceof ArrayBuffer?(m=o,f+=Ze):(m=o.buffer,c==="[object Int8Array]"?f+=Ut:c==="[object Uint8Array]"?f+=Ot:c==="[object Uint8ClampedArray]"?f+=jt:c==="[object Int16Array]"?f+=Wt:c==="[object Uint16Array]"?f+=$t:c==="[object Int32Array]"?f+=Ft:c==="[object Uint32Array]"?f+=Ht:c==="[object Float32Array]"?f+=qt:c==="[object Float64Array]"?f+=Gt:a(new Error("Failed to get type for BinaryArray"))),a(f+et(m))}else if(c==="[object Blob]"){var v=new FileReader;v.onload=function(){var C=Kn+o.type+"~"+et(this.result);a(Ee+Qe+C)},v.readAsArrayBuffer(o)}else try{a(JSON.stringify(o))}catch(C){console.error("Couldn't convert value into a JSON string: ",o),a(null,C)}}function Jn(o){if(o.substring(0,Je)!==Ee)return JSON.parse(o);var a,c=o.substring(Xt),m=o.substring(Je,Xt);if(m===Qe&&At.test(c)){var f=c.match(At);a=f[1],c=c.substring(f[0].length)}var v=Kt(c);switch(m){case Ze:return v;case Qe:return b([v],{type:a});case Ut:return new Int8Array(v);case Ot:return new Uint8Array(v);case jt:return new Uint8ClampedArray(v);case Wt:return new Int16Array(v);case $t:return new Uint16Array(v);case Ft:return new Int32Array(v);case Ht:return new Uint32Array(v);case qt:return new Float32Array(v);case Gt:return new Float64Array(v);default:throw new Error("Unkown type: "+m)}}var tt={serialize:Yn,deserialize:Jn,stringToBuffer:Kt,bufferToString:et};function Yt(o,a,c,m){o.executeSql("CREATE TABLE IF NOT EXISTS "+a.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,m)}function Zn(o){var a=this,c={db:null};if(o)for(var m in o)c[m]=typeof o[m]!="string"?o[m].toString():o[m];var f=new x(function(v,C){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(k){return C(k)}c.db.transaction(function(k){Yt(k,c,function(){a._dbInfo=c,v()},function(z,_){C(_)})},C)});return c.serializer=tt,f}function ae(o,a,c,m,f,v){o.executeSql(c,m,f,function(C,k){k.code===k.SYNTAX_ERR?C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[a.storeName],function(z,_){_.rows.length?v(z,k):Yt(z,a,function(){z.executeSql(c,m,f,v)},v)},v):v(C,k)},v)}function Qn(o,a){var c=this;o=R(o);var m=new x(function(f,v){c.ready().then(function(){var C=c._dbInfo;C.db.transaction(function(k){ae(k,C,"SELECT * FROM "+C.storeName+" WHERE key = ? LIMIT 1",[o],function(z,_){var L=_.rows.length?_.rows.item(0).value:null;L&&(L=C.serializer.deserialize(L)),f(L)},function(z,_){v(_)})})}).catch(v)});return E(m,a),m}function ei(o,a){var c=this,m=new x(function(f,v){c.ready().then(function(){var C=c._dbInfo;C.db.transaction(function(k){ae(k,C,"SELECT * FROM "+C.storeName,[],function(z,_){for(var L=_.rows,N=L.length,U=0;U<N;U++){var F=L.item(U),$=F.value;if($&&($=C.serializer.deserialize($)),($=o($,F.key,U+1))!==void 0)return void f($)}f()},function(z,_){v(_)})})}).catch(v)});return E(m,a),m}function Jt(o,a,c,m){var f=this;o=R(o);var v=new x(function(C,k){f.ready().then(function(){a===void 0&&(a=null);var z=a,_=f._dbInfo;_.serializer.serialize(a,function(L,N){N?k(N):_.db.transaction(function(U){ae(U,_,"INSERT OR REPLACE INTO "+_.storeName+" (key, value) VALUES (?, ?)",[o,L],function(){C(z)},function(F,$){k($)})},function(U){if(U.code===U.QUOTA_ERR){if(m>0)return void C(Jt.apply(f,[o,z,c,m-1]));k(U)}})})}).catch(k)});return E(v,c),v}function ti(o,a,c){return Jt.apply(this,[o,a,c,1])}function ni(o,a){var c=this;o=R(o);var m=new x(function(f,v){c.ready().then(function(){var C=c._dbInfo;C.db.transaction(function(k){ae(k,C,"DELETE FROM "+C.storeName+" WHERE key = ?",[o],function(){f()},function(z,_){v(_)})})}).catch(v)});return E(m,a),m}function ii(o){var a=this,c=new x(function(m,f){a.ready().then(function(){var v=a._dbInfo;v.db.transaction(function(C){ae(C,v,"DELETE FROM "+v.storeName,[],function(){m()},function(k,z){f(z)})})}).catch(f)});return E(c,o),c}function oi(o){var a=this,c=new x(function(m,f){a.ready().then(function(){var v=a._dbInfo;v.db.transaction(function(C){ae(C,v,"SELECT COUNT(key) as c FROM "+v.storeName,[],function(k,z){var _=z.rows.item(0).c;m(_)},function(k,z){f(z)})})}).catch(f)});return E(c,o),c}function ri(o,a){var c=this,m=new x(function(f,v){c.ready().then(function(){var C=c._dbInfo;C.db.transaction(function(k){ae(k,C,"SELECT key FROM "+C.storeName+" WHERE id = ? LIMIT 1",[o+1],function(z,_){var L=_.rows.length?_.rows.item(0).key:null;f(L)},function(z,_){v(_)})})}).catch(v)});return E(m,a),m}function si(o){var a=this,c=new x(function(m,f){a.ready().then(function(){var v=a._dbInfo;v.db.transaction(function(C){ae(C,v,"SELECT key FROM "+v.storeName,[],function(k,z){for(var _=[],L=0;L<z.rows.length;L++)_.push(z.rows.item(L).key);m(_)},function(k,z){f(z)})})}).catch(f)});return E(c,o),c}function ai(o){return new x(function(a,c){o.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(f,v){for(var C=[],k=0;k<v.rows.length;k++)C.push(v.rows.item(k).name);a({db:o,storeNames:C})},function(f,v){c(v)})},function(m){c(m)})})}function ci(o,a){a=A.apply(this,arguments);var c=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||c.name,o.storeName=o.storeName||c.storeName);var m,f=this;return E(m=o.name?new x(function(v){var C;C=o.name===c.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?v({db:C,storeNames:[o.storeName]}):v(ai(C))}).then(function(v){return new x(function(C,k){v.db.transaction(function(z){function _(F){return new x(function($,te){z.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(tn,we){te(we)})})}for(var L=[],N=0,U=v.storeNames.length;N<U;N++)L.push(_(v.storeNames[N]));x.all(L).then(function(){C()}).catch(function(F){k(F)})},function(z){k(z)})})}):x.reject("Invalid arguments"),a),m}var ui={_driver:"webSQLStorage",_initStorage:Zn,_support:Vn(),iterate:ei,getItem:Qn,setItem:ti,removeItem:ni,clear:ii,length:oi,key:ri,keys:si,dropInstance:ci};function li(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Zt(o,a){var c=o.name+"/";return o.storeName!==a.storeName&&(c+=o.storeName+"/"),c}function hi(){var o="_localforage_support_test";try{return localStorage.setItem(o,!0),localStorage.removeItem(o),!1}catch{return!0}}function di(){return!hi()||localStorage.length>0}function fi(o){var a=this,c={};if(o)for(var m in o)c[m]=o[m];return c.keyPrefix=Zt(o,a._defaultConfig),di()?(a._dbInfo=c,c.serializer=tt,x.resolve()):x.reject()}function pi(o){var a=this,c=a.ready().then(function(){for(var m=a._dbInfo.keyPrefix,f=localStorage.length-1;f>=0;f--){var v=localStorage.key(f);v.indexOf(m)===0&&localStorage.removeItem(v)}});return E(c,o),c}function mi(o,a){var c=this;o=R(o);var m=c.ready().then(function(){var f=c._dbInfo,v=localStorage.getItem(f.keyPrefix+o);return v&&(v=f.serializer.deserialize(v)),v});return E(m,a),m}function gi(o,a){var c=this,m=c.ready().then(function(){for(var f=c._dbInfo,v=f.keyPrefix,C=v.length,k=localStorage.length,z=1,_=0;_<k;_++){var L=localStorage.key(_);if(L.indexOf(v)===0){var N=localStorage.getItem(L);if(N&&(N=f.serializer.deserialize(N)),(N=o(N,L.substring(C),z++))!==void 0)return N}}});return E(m,a),m}function vi(o,a){var c=this,m=c.ready().then(function(){var f,v=c._dbInfo;try{f=localStorage.key(o)}catch{f=null}return f&&(f=f.substring(v.keyPrefix.length)),f});return E(m,a),m}function yi(o){var a=this,c=a.ready().then(function(){for(var m=a._dbInfo,f=localStorage.length,v=[],C=0;C<f;C++){var k=localStorage.key(C);k.indexOf(m.keyPrefix)===0&&v.push(k.substring(m.keyPrefix.length))}return v});return E(c,o),c}function wi(o){var a=this.keys().then(function(c){return c.length});return E(a,o),a}function bi(o,a){var c=this;o=R(o);var m=c.ready().then(function(){var f=c._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return E(m,a),m}function Si(o,a,c){var m=this;o=R(o);var f=m.ready().then(function(){a===void 0&&(a=null);var v=a;return new x(function(C,k){var z=m._dbInfo;z.serializer.serialize(a,function(_,L){if(L)k(L);else try{localStorage.setItem(z.keyPrefix+o,_),C(v)}catch(N){N.name!=="QuotaExceededError"&&N.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(N),k(N)}})})});return E(f,c),f}function Ci(o,a){if(a=A.apply(this,arguments),!(o=typeof o!="function"&&o||{}).name){var c=this.config();o.name=o.name||c.name,o.storeName=o.storeName||c.storeName}var m,f=this;return E(m=o.name?new x(function(v){o.storeName?v(Zt(o,f._defaultConfig)):v(o.name+"/")}).then(function(v){for(var C=localStorage.length-1;C>=0;C--){var k=localStorage.key(C);k.indexOf(v)===0&&localStorage.removeItem(k)}}):x.reject("Invalid arguments"),a),m}var xi={_driver:"localStorageWrapper",_initStorage:fi,_support:li(),iterate:gi,getItem:mi,setItem:Si,removeItem:bi,clear:pi,length:wi,key:vi,keys:yi,dropInstance:Ci},ki=function(o,a){return o===a||typeof o=="number"&&typeof a=="number"&&isNaN(o)&&isNaN(a)},Ei=function(o,a){for(var c=o.length,m=0;m<c;){if(ki(o[m],a))return!0;m++}return!1},Qt=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"},ye={},en={},pe={INDEXEDDB:Xn,WEBSQL:ui,LOCALSTORAGE:xi},zi=[pe.INDEXEDDB._driver,pe.WEBSQL._driver,pe.LOCALSTORAGE._driver],ze=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ze),Mi={description:"",driver:zi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _i(o,a){o[a]=function(){var c=arguments;return o.ready().then(function(){return o[a].apply(o,c)})}}function it(){for(var o=1;o<arguments.length;o++){var a=arguments[o];if(a)for(var c in a)a.hasOwnProperty(c)&&(Qt(a[c])?arguments[0][c]=a[c].slice():arguments[0][c]=a[c])}return arguments[0]}var Li=new(function(){function o(a){for(var c in r(this,o),pe)if(pe.hasOwnProperty(c)){var m=pe[c],f=m._driver;this[c]=f,ye[f]||this.defineDriver(m)}this._defaultConfig=it({},Mi),this._config=it({},this._defaultConfig,a),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return o.prototype.config=function(a){if((a===void 0?"undefined":i(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var c in a){if(c==="storeName"&&(a[c]=a[c].replace(/\W/g,"_")),c==="version"&&typeof a[c]!="number")return new Error("Database version must be a number.");this._config[c]=a[c]}return!("driver"in a)||!a.driver||this.setDriver(this._config.driver)}return typeof a=="string"?this._config[a]:this._config},o.prototype.defineDriver=function(a,c,m){var f=new x(function(v,C){try{var k=a._driver,z=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver)return void C(z);for(var _=nt.concat("_initStorage"),L=0,N=_.length;L<N;L++){var U=_[L];if((!Ei(ze,U)||a[U])&&typeof a[U]!="function")return void C(z)}(function(){for(var $=function(Bi){return function(){var Ii=new Error("Method "+Bi+" is not implemented by the current driver"),nn=x.reject(Ii);return E(nn,arguments[arguments.length-1]),nn}},te=0,tn=ze.length;te<tn;te++){var we=ze[te];a[we]||(a[we]=$(we))}})();var F=function($){ye[k]&&console.info("Redefining LocalForage driver: "+k),ye[k]=a,en[k]=$,v()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then(F,C):F(!!a._support):F(!0)}catch($){C($)}});return M(f,c,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(a,c,m){var f=ye[a]?x.resolve(ye[a]):x.reject(new Error("Driver not found."));return M(f,c,m),f},o.prototype.getSerializer=function(a){var c=x.resolve(tt);return M(c,a),c},o.prototype.ready=function(a){var c=this,m=c._driverSet.then(function(){return c._ready===null&&(c._ready=c._initDriver()),c._ready});return M(m,a,a),m},o.prototype.setDriver=function(a,c,m){var f=this;Qt(a)||(a=[a]);var v=this._getSupportedDrivers(a);function C(){f._config.driver=f.driver()}function k(L){return f._extend(L),C(),f._ready=f._initStorage(f._config),f._ready}function z(L){return function(){var N=0;function U(){for(;N<L.length;){var F=L[N];return N++,f._dbInfo=null,f._ready=null,f.getDriver(F).then(k).catch(U)}C();var $=new Error("No available storage method found.");return f._driverSet=x.reject($),f._driverSet}return U()}}var _=this._driverSet!==null?this._driverSet.catch(function(){return x.resolve()}):x.resolve();return this._driverSet=_.then(function(){var L=v[0];return f._dbInfo=null,f._ready=null,f.getDriver(L).then(function(N){f._driver=N._driver,C(),f._wrapLibraryMethodsWithReady(),f._initDriver=z(v)})}).catch(function(){C();var L=new Error("No available storage method found.");return f._driverSet=x.reject(L),f._driverSet}),M(this._driverSet,c,m),this._driverSet},o.prototype.supports=function(a){return!!en[a]},o.prototype._extend=function(a){it(this,a)},o.prototype._getSupportedDrivers=function(a){for(var c=[],m=0,f=a.length;m<f;m++){var v=a[m];this.supports(v)&&c.push(v)}return c},o.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,c=nt.length;a<c;a++)_i(this,nt[a])},o.prototype.createInstance=function(a){return new o(a)},o}());t.exports=Li},{3:3}]},{},[4])(4),vn={exports:{}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(e){vn.exports=(()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=t.WebStreamsPolyfill||{},s=t.isSecureContext;let y=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const w=s||"MozAppearance"in document.documentElement.style?"iframe":"navigate",b={createWriteStream:function(E,M,R){let A={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},P=0,S=null,u=null,d=null;if(Number.isFinite(M)?([R,M]=[M,R],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),A.size=R,A.writableStrategy=M):M&&M.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),A.size=R,A.writableStrategy=M):A=M||{},!y){n||(n=s?x(b.mitm):function(T){const B="width=200,height=100",D=document.createDocumentFragment(),O={frame:t.open(T,"popup",B),loaded:!1,isIframe:!1,isPopup:!0,remove(){O.frame.close()},addEventListener(...W){D.addEventListener(...W)},dispatchEvent(...W){D.dispatchEvent(...W)},removeEventListener(...W){D.removeEventListener(...W)},postMessage(...W){O.frame.postMessage(...W)}},j=W=>{W.source===O.frame&&(O.loaded=!0,t.removeEventListener("message",j),O.dispatchEvent(new Event("load")))};return t.addEventListener("message",j),O}(b.mitm)),u=new MessageChannel,E=encodeURIComponent(E.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const l={transferringReadable:i,pathname:A.pathname||Math.random().toString().slice(-6)+"/"+E,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+E}};A.size&&(l.headers["Content-Length"]=A.size);const p=[l,"*",[u.port2]];if(i){const T=w==="iframe"?void 0:{transform(D,O){if(!(D instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");P+=D.length,O.enqueue(D),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};d=new b.TransformStream(T,A.writableStrategy,A.readableStrategy);const B=d.readable;u.port1.postMessage({readableStream:B},[B])}u.port1.onmessage=T=>{T.data.download?w==="navigate"?(n.remove(),n=null,P?location.href=T.data.download:S=T.data.download):(n.isPopup&&(n.remove(),n=null,w==="iframe"&&x(b.mitm)),x(T.data.download)):T.data.abort&&(h=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...p):n.addEventListener("load",()=>{n.postMessage(...p)},{once:!0})}let h=[];return!y&&d&&d.writable||new b.WritableStream({write(l){if(!(l instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");y?h.push(l):(u.port1.postMessage(l),P+=l.length,S&&(location.href=S,S=null))},close(){if(y){const l=new Blob(h,{type:"application/octet-stream; charset=utf-8"}),p=document.createElement("a");p.href=URL.createObjectURL(l),p.download=E,p.click()}else u.port1.postMessage("end")},abort(){h=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},A.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function x(E){if(!E)throw new Error("meh");const M=document.createElement("iframe");return M.hidden=!0,M.src=E,M.loaded=!1,M.name="iframe",M.isIframe=!0,M.postMessage=(...R)=>M.contentWindow.postMessage(...R),M.addEventListener("load",()=>{M.loaded=!0},{once:!0}),document.body.appendChild(M),M}try{new Response(new ReadableStream),s&&!("serviceWorker"in navigator)&&(y=!0)}catch{y=!0}return(E=>{try{E()}catch{}})(()=>{const{readable:E}=new TransformStream,M=new MessageChannel;M.port1.postMessage(E,[E]),M.port1.close(),M.port2.close(),i=!0,Object.defineProperty(b,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),b})()})();var eo=vn.exports;const to=Object.prototype.toString;function V(e,t){return to.call(e)===`[object ${t}]`}function bt(e){return V(e,"Function")}const yn=e=>e!==void 0,St=e=>!yn(e);function Ct(e){return e===null}const de=e=>e!==null&&V(e,"Object");function De(e){return V(e,"String")}function wn(e){return e&&Array.isArray(e)}const no=typeof window>"u";function bn(e){const t=function(b){if(!b)return;const x=b,E=[];if(x)for(let M of x){const R=Sn(M);R&&E.push(R)}return E}(e.bussinessRoutes),n=function(b){if(!b)return;const x=b;if(x&&x.length>0){const E=[];return x.forEach(M=>{const R=Cn(M);R&&E.push(R)}),E}}(e.widgetMenuConfig),i=function(b){if(!!b&&b.length>0){const x=[];return b.forEach(E=>{const M=function(R){if(!!R)return{id:R.id,label:R.label,container:R.container,preload:R.preload,afterid:R.afterid,bindid:R.bindid,group:R.group}}(E);M&&x.push(M)}),x}}(e.widgetConfig),r=(s=e.functionList)&&s.length>0?s:void 0;var s;const y=e.pkgObject.version,w=e.pkgObject.name;return{id:function(b,x){const E=`${b}_${x}`;return ee.MD5(E)}(w,y),name:I.Config.UI.SiteTitle,group:I.Config.UI.Group,product:w,version:y,routes:t,widgetMenu:n,widgets:i,functions:r}}function Sn(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 i=[];for(let r of e.children){const s=Sn(r);s&&i.push(s)}i.length>0&&(n.children=i)}return n}}function Cn(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(n=>{const i=Cn(n);i&&t.children?.push(i)})),t}const K=g.reactive({panelGroups:{}}),xn=()=>({useGroupAccordion:e=>g.computed(()=>K.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{K.panelGroups[e]={...K.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>g.computed(()=>K.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{K.panelGroups[e]={...K.panelGroups[e],panelExpandStatus:{...K.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{K.panelGroups[e].accordion&&(K.panelGroups[e].panelExpandStatus[t]||Object.keys(K.panelGroups[e].panelExpandStatus).forEach(n=>{K.panelGroups[e].panelExpandStatus[n]=!1})),K.panelGroups[e].panelExpandStatus[t]=!K.panelGroups[e].panelExpandStatus[t]}}),xt=e=>e>255?255:e<0?0:e,Ne=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=xt((i>>16)+t),s=xt((i>>8&255)+t);return"#"+(xt((255&i)+t)|s<<8|r<<16).toString(16)};var Ae=g.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=g.ref(`group-${Be()}`),{setGroupAccordionStatus:n}=xn(),i={"--base-color":e.baseColor,"--border-color":Ne(e.baseColor,180),"--bg-color-header":Ne(e.baseColor,140),"--bg-color-header-hover":Ne(e.baseColor,190),"--bg-color-header-active":Ne(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:i}}});const io=["data-id-group"];Ae.render=function(e,t,n,i,r,s){return g.openBlock(),g.createElementBlock("div",{"data-id-group":e.idGroup,style:g.normalizeStyle(e.cssColorVars),class:"vcpg"},[g.renderSlot(e.$slots,"default")],12,io)},Ae.__scopeId="data-v-23ab5317",Ae.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Ue=g.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${Be()}`,i=g.ref(),r=g.ref(),s=g.ref(),{panelExpanded:y,togglePanelExpandedStatus:w,setPanelExpandedStatus:b}=xn(),x=g.computed(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:Be()})),E=g.computed(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),M=g.computed(()=>y(E.value,n).value&&x.value.hasContent);return g.onMounted(()=>{b(E.value,n,e.expanded)}),g.onUpdated(()=>{(async()=>(await g.nextTick(),r.value&&s.value&&(r.value.style.height=`${Math.min(s.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:x,panelRef:i,bodyRef:r,bodyContentRef:s,isExpanded:M,collapse:R=>{R.style.height="0"},expand:R=>{R.style.height=`${R.scrollHeight}px`},toggle:()=>{x.value.hasContent&&w(E.value,n)},toggleIcon:`
|
|
4
4
|
<svg
|
|
5
5
|
width="24px"
|
|
6
6
|
height="24px"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
>
|
|
11
11
|
<path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
|
|
12
12
|
</svg>
|
|
13
|
-
`}}});const io={class:"vcp__header-title"},oo={key:0,class:"vcp__header-icon"},ro=["innerHTML"],so={key:0,ref:"bodyRef",class:"vcp__body"},ao={ref:"bodyContentRef",class:"vcp__body-content"};function kt(e){return window.TouchEvent&&e instanceof TouchEvent}Oe.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("section",{ref:"panelRef",class:g.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[g.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...y)=>e.toggle&&e.toggle(...y))},[g.createElementVNode("div",io,[g.renderSlot(e.$slots,"title")]),e.body.hasContent?(g.openBlock(),g.createElementBlock("div",oo,[g.renderSlot(e.$slots,"icon",{},()=>[g.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,ro)])])):g.createCommentVNode("v-if",!0)]),g.createVNode(g.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:g.withCtx(()=>[e.isExpanded?(g.openBlock(),g.createElementBlock("div",so,[g.createElementVNode("div",ao,[g.renderSlot(e.$slots,"content")],512)],512)):g.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Oe.__scopeId="data-v-08c94cf8",Oe.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Y{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return kt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return kt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Dt(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const c=w=>{n(new Y(w))},y=w=>{w.touches.length===1&&n(new Y(w)),w.touches.length>1&&i&&i(new Y(w))};return t.addEventListener("mousedown",c,r),t.addEventListener("touchstart",y,r),()=>{t.removeEventListener("mousedown",c,r),t.removeEventListener("touchstart",y,r)}}static bindMove(t,n,i=!1){const r=y=>{n(new Y(y))},c=y=>{y.touches.length===1&&n(new Y(y))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",c,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",c,i)}}static bindUp(t,n,i=!1){const r=y=>{n(new Y(y))},c=y=>{y.touches.length===0&&n(new Y(y))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",c,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",c,i)}}originalEvent({mouse:t,touch:n}){kt(this.e)?n&&n(this.e):t&&t(this.e)}}class Dt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Dt(this.x,this.y)}}class co{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Y.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class uo{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=je(this._group),i=je(t);n.splice(n.indexOf(this),1),i.push(this),En()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(je(this._group)),En()}}const Ue=new Map;function je(e){return Ue.has(e)||Ue.set(e,[]),Ue.get(e)}function kn(e,t){return e>t?-kn(t,e):e<0&&t>=0?1:e-t}function En(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,c)=>i.push(c)),i}(Ue).sort(kn))for(const n of je(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Et(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=We(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function We(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,c=t.left;return{width:n,height:i,top:r,left:c,bottom:r+i,right:c+n}}class lo{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=zn.map(b=>new b(t,this));const{width:i,height:r}=Et(t),c=n.maxWidth||window.innerWidth,y=n.maxHeight||window.innerHeight;let w=!1;(i<n.minWidth||i>c)&&(t.style.width=`${Mn(i,n.minWidth,c)}px`,w=!0),(r<n.minHeight||r>y)&&(t.style.height=`${Mn(r,n.minHeight,y)}px`,w=!0),w&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const zn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Y.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:c}=We(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=c,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=We(this.container),c=this.helper.options,y=c.maxWidth||window.innerWidth,w=c.maxHeight||window.innerHeight;this.minLeft=Math.max(i-y,0),this.maxLeft=i-c.minWidth,this.minRight=t+c.minWidth,this.maxRight=Math.min(t+y,window.innerWidth),this.minTop=Math.max(r-w,0),this.maxTop=r-c.minHeight,this.minBottom=n+c.minHeight,this.maxBottom=Math.min(n+w,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:c,bottom:y}=We(this.container),w=this.helper.options;w&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${w.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):c<this.minRight?this.container.style.width=`${w.minWidth}px`:c>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${w.minHeight}px`,this.container.style.top=`${this.maxTop}px`):y<this.minBottom?this.container.style.height=`${w.minHeight}px`:y>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function Mn(e,t,n){return e<t?t:e>n?n:e}zn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Fe=g.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=g.ref(!1),n=g.ref(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Y.bindUp(document,()=>{n.value=!1,r()})}}}});const ho=["disabled"];Fe.render=function(e,t,n,i,r,c){return g.openBlock(),g.createElementBlock("div",{class:"btn",style:g.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=y=>e.hover=!0),onMouseleave:t[1]||(t[1]=y=>e.hover=!1),onMousedown:t[2]||(t[2]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onTouchstart:t[3]||(t[3]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onMouseup:t[4]||(t[4]=(...y)=>e.mouseup&&e.mouseup(...y)),onTouchend:t[5]||(t[5]=(...y)=>e.mouseup&&e.mouseup(...y)),disabled:e.disabled},[g.renderSlot(e.$slots,"default")],44,ho)},Fe.__scopeId="data-v-71662210",Fe.__file="src/controls/vuewindow/window/Button.vue";const zt=new Set;function _n(e){return e!==null?parseFloat(e):0}function $e(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(_n).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(_n).reduce((n,i)=>n+i))}}class Ln{width;height;constructor(t,n){this.width=t,this.height=n}}function fo(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function po(e,t,n,i){const r=e-n,c=t-i;return r*r+c*c}window.addEventListener("resize",e=>{zt.forEach(t=>{t?.fixPosition()})});const He=[];var qe=g.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:Fe},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,c,y,w;const b=g.ref(e.isOpen),x=()=>{He.push(i),w=new uo(e.zGroup,E),e.isOpen&&(g.nextTick(()=>{r++==0&&(h(i),function(){const B=M.value,{width:D,height:U}=Et(B);let j,W;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,W=e.top;else{const H=e.positionHint||"auto";switch(H){case"auto":{let q=20,V=50,Q=0;do{if(He.every(J=>{if(!J.isOpen||i==J)return!0;const ne=fo(J);if(ne==null)return!0;const{left:Ke,top:Ye}=ne;return po(Ke,Ye,q,V)>16}))break;q=(q+40)%(window.innerWidth-200),V=(V+40)%(window.innerHeight-200)}while(++Q<100);j=q,W=V}break;case"center":j=(window.innerWidth-D)/2,W=(window.innerHeight-U)/2,console.log(j,W,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[V,Q]=q;if(!isFinite(V)||!isFinite(Q))throw null;j=V>=0?V:window.innerWidth-D+V,W=Q>=0?Q:window.innerHeight-U+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${W}px`)}()),e.resizable&&l(),T(),c=new co(R.value,M.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(R.value);y=new lo(M.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&P()),zt.add(i)};function E(B){S.value.zIndex=`${B}`}const M=g.ref(null),R=g.ref(null),N=g.ref(null);function P(){w.raise(),t("activate")}const S=g.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=g.computed(()=>e.windowStyle.titlebar),d=g.computed(()=>{const B={...e.windowStyle.content};return e.resizable?B.padding="0":e.padding!=null&&(B.padding=`${e.padding}px`),e.isScrollable&&(B.overflow="auto"),B});function h(B){const{width:D,height:U,top:j,left:W}=B,H=M;if(H&&D!=null&&(H.value.style.width=`${D}px`),U!=null){const q=R.value;if(q){const V=$e(q).height;H.value.style.height=`${U+V}px`}}H&&W!=null&&(H.value.style.left=`${W}px`),H&&j!=null&&(H.value.style.top=`${j}px`)}function l(B=!0){const D=M.value,U=R.value,j=N.value;if(j&&D&&U){const{width:W,height:H}=$e(j),{width:q,height:V}=$e(D),Q=$e(U).height,J=q-(j.offsetWidth-W),ne=V-Q-(j.offsetHeight-H);j.style.width=`${J}px`,j.style.height=`${ne}px`,p(),t("resize",new Ln(J,ne)),B&&(t("update:width",J),t("update:height",ne))}}function p(){const B=M.value;if(B){const D=B.getBoundingClientRect();D.left<0&&(S.value.left="0px"),D.top<0&&(S.value.top="0px"),D.right>window.innerWidth&&(S.value.left=window.innerWidth-D.width+"px"),D.bottom>window.innerHeight&&(S.value.top=window.innerHeight-D.height+"px")}}function T(B=!0){p();const D=M.value;if(D){const{left:U,top:j}=D.getBoundingClientRect();B&&(t("update:left",U),t("update:top",j))}}return g.watch(()=>e.isOpen,B=>{b.value=B}),g.watch(()=>e.zGroup,B=>{w.group=B}),g.watch(()=>e.width,B=>{h({width:B}),l(!1)}),g.watch(()=>e.height,B=>{h({height:B}),l(!1)}),g.onMounted(()=>{x()}),g.onBeforeUnmount(()=>{zt.delete(this),w.unregister(),y&&y.teardown(),c&&c.teardown(),He.splice(He.indexOf(i),1)}),{isOpen:b,windowEl:M,titlebar:R,content:N,activate:P,styleWindow:S,styleTitlebar:u,styleContent:d,closeButtonClick:function(){b.value=!1,t("closebuttonclick")}}}});const mo={class:"title"},go=g.createTextVNode("\xD7");var Bn,le;qe.render=function(e,t,n,i,r,c){const y=g.resolveComponent("myButton");return g.openBlock(),g.createBlock(g.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=w=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=w=>e.$emit("open"))},{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",{class:"window",style:g.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...w)=>e.activate&&e.activate(...w)),onTouchstart:t[1]||(t[1]=(...w)=>e.activate&&e.activate(...w))},[g.createElementVNode("div",{class:"titlebar",style:g.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[g.createElementVNode("div",mo,[e.$slots.title?g.renderSlot(e.$slots,"title",{key:0}):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(e.title),1)],2112))]),e.closeButton?(g.openBlock(),g.createBlock(y,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:g.withCtx(()=>[go]),_:1},8,["windowStyle","onClick"])):g.createCommentVNode("v-if",!0)],4),g.createElementVNode("div",{class:"content",style:g.normalizeStyle(e.styleContent),ref:"content"},[g.renderSlot(e.$slots,"default")],4)],36),[[g.vShow,e.isOpen]])]),_:3})},qe.__file="src/controls/vuewindow/window/index.vue",(le=Bn||(Bn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const vo=qe;var Z;exports.LayoutContainerEnum=void 0,(Z=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[Z.top=0]="top",Z[Z.bottom=1]="bottom",Z[Z.centerBack=2]="centerBack",Z[Z.centerMain=3]="centerMain",Z[Z.centerFront=4]="centerFront",Z[Z.left=5]="left",Z[Z.right=6]="right";class yo{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;de(t)?n=t:De(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=g.markRaw(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(X.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const r of i)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(X.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(X.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=g.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Mt=g.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=g.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!I.LayoutManager){const N=new yo(r,e.widgetConfig);I.LayoutManager=N,N.preloadWidgets()}const c=M(exports.LayoutContainerEnum.top),y=M(exports.LayoutContainerEnum.centerBack),w=M(exports.LayoutContainerEnum.centerFront),b=M(exports.LayoutContainerEnum.left),x=M(exports.LayoutContainerEnum.right),E=M(exports.LayoutContainerEnum.bottom);function M(N){return I.LayoutManager?.getContainerComponents(N)}const R=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:c,centerbackComponents:y,centerfrontComponents:w,leftContainerComponents:b,rightContainerComponents:x,bottomContainerComponents:E,containerStyle:R}}});const wo={ref:"topContainer",class:"topContainer"},bo={ref:"centerBackContainer",class:"centerdiv backContainer"},So={ref:"centerMainContainer",class:"centerdiv mainContainer"},Co={ref:"centerFrontContainer",class:"centerdiv centerContainer"},xo={ref:"leftContainer",class:"leftContainer"},ko={ref:"rightContainer",class:"rightContainer"},Eo={ref:"bottomContainer",class:"bottomContainer"};Mt.render=function(e,t,n,i,r,c){const y=g.resolveComponent("router-view");return g.openBlock(),g.createElementBlock("div",{class:"layoutContainer",style:g.normalizeStyle(e.containerStyle)},[g.createElementVNode("div",wo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.topContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",null,[g.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",bo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerbackComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),g.createElementVNode("div",So,[g.createVNode(y,null,{default:g.withCtx(({Component:w})=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(w)))]),_:1})],512),g.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",Co,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerfrontComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",xo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",ko,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)]),g.createElementVNode("div",Eo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)],4)},Mt.__file="src/controls/layoutcontainer/layout.vue";const Ve=new Map,_t=new Map;let Xe;const zo={getDefaultClient(){if(Xe||(Xe=new be(SysConfig.DefaultHproseAPI)),!Xe)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Xe},registerHprose(e,t){const n=_t.get(e);if(!n){const i=new be(t);Ve.set(e,i)}return n},getHprose:e=>_t?.get(e),getProxyHprose:e=>Ve.get(e),unregisterHprose(e){Ve.get(e)&&(_t.delete(e),Ve.delete(e))}},fe={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},Mo=I.Config.ServiceURL.LoginAuthURL;function Lt(){const e=un();e&&te(fe.RefreshToken,Mo,{refreshToken:e}).then(t=>{Ge(t.data)})}function In(e){I.User||(I.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?Lt():setTimeout(Lt,n-4e3))}function Ge(e){I.User&&(I.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&I.User){let i=he();if(!i){const r=I.User.doubleToken;i={id:I.User.id,name:I.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:I.User.issystem,issecurity:I.User.issecurity,appkey:I.User.appkey,role:I.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,ce.set("access_token",i,n/1e3),In(i)}else ce.remove("access_token")}function Bt(e){I.User=e}const Ce=I.Config.ServiceURL.LoginAuthURL,It=new Le("",sessionStorage);function Rn(){return It.get("ROLE_SYSTEM_RIGHT")}function Pn(e){It.set("ROLE_SYSTEM_RIGHT",e)}function Tn(){It.remove("ROLE_SYSTEM_RIGHT")}const Rt=[],Pt=[],Tt=[];function xe(){return Rn()}function Dn(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.path===i.path);if(r){const c=Dn(r,i);c&&n.children?.push(c)}})),n}function An(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(c=>c.name===i.name);if(r){const c=An(r,i);c&&n.children?.push(c)}})),n}exports.BigFileDownload=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,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=ht(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}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("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await te(t,e,n);let r=null;return i&&i.status===200&&(r=i.data),r}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Te.createInstance({name:this.fileID,driver:Te.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(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+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("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Te.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("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const i=I.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const r={key:this.fileMetaData?.downloadID};let c=0;const y=this.cacheSize;let w=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());continue}const x=b*this.chunkByteSize;let E=x+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const M={range:`bytes=${x}-${E}`};for(;w>=y;)await this.sleep(200);const R=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),w++,te(n,t,r,M,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async N=>{const P=N.data;w--,await this.currentDB?.setItem(R,P),c++,c>this.finishNum&&(this.finishNum=c,this.downloadProgress());const S=parseInt(R)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${S}/${this.totalChunks}`),this.savefile()}).catch(N=>{w--;const P=parseInt(R)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${P}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}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("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=Qi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let c=new Response(r).body;if(c===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const y=c.getReader();for(;;){const{done:w,value:b}=await y.read();if(w)break;await e.write(b)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Te.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Re,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,c)=>{if(i){const y=document.createElement("a");if(y.href=e,y.target=t,y.download!==void 0&&(y.download=n||cn(e)),document.createEvent){const w=document.createEvent("MouseEvents");return w.initEvent("click",!0,!0),y.dispatchEvent(w),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const y=document.createElement("canvas"),w=document.createElement("img");w.setAttribute("crossOrigin","Anonymous"),w.src=e,w.onload=b=>{y.width=w.width,y.height=w.height,y.getContext("2d").drawImage(w,0,0,w.width,w.height),y.toBlob(x=>{if(x){const E=document.createElement("a");E.href=window.URL.createObjectURL(x),E.download=cn(e),E.click(),URL.revokeObjectURL(E.href),r(!0)}},"image/jpeg")},w.onerror=b=>c(b)}})},exports.Global=I,exports.GlobalHprose=zo,exports.GlobalMitt=ve,exports.H5Tool=re,exports.HproseClient=ke,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){Re(i.data,n)}).catch(i=>{console.warn(i),ve.emit(X.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=an,exports.LayoutContainer=Mt,exports.LayoutManager=class{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(e,t){this.layoutState=e,this.widgetCofig=t,this.widgetCofig.forEach(n=>{if(n.afterid)if(this.preConditionMap.has(n.afterid))this.preConditionMap.get(n.afterid)?.add(n);else{const i=new Set;i.add(n),this.preConditionMap.set(n.afterid,i)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(e){if(!e)return;let t;de(e)?t=e:De(e)&&(t=this.widgetCofig.find(n=>n.id===e)),t&&this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e,t){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const i=g.markRaw(n.default);this.getContainerComponents(e.container).value.set(e.id,i),this.widgetsLoadedSet.add(e.id),I.EventBus.emit(X.WidgetLoadedEvent,e.id),t&&t(e.id)}})}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n){for(const i of n)if(this.isWidgetLoaded(i.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetCofig.find(n=>n.id===e);if(t){if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n)for(const i of n)this.unloadWidget(i.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),I.EventBus.emit(X.WidgetUnLoadedEvent,e)}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,n=this.layoutState.centerBackContainer;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 exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}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&&I.EventBus.emit(X.WidgetVisibleChanged,{id:e,name:n.name,visible:t})}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)){const t=this.widgetCofig.find(n=>n.id===e);if(t)return this.getContainerComponents(t.container).value.get(e)}}getWigetItem(e){return this.widgetCofig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetCofig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=g.ref(new Map);return this.layoutMap.set(e,t),t}}addContainerComponent(e,t){}},exports.ObjToUrlParams=function(e,t){let n="",i="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,i},exports.Pane=ot,exports.ProxyClient=be,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,i=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=t,r.click(),n.revokeObjectURL(r.href)},exports.Splitpanes=Di,exports.Storage=Le,exports.StringUtils=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=X,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=fe,exports.VCollapsiblePanel=Oe,exports.VCollapsiblePanelGroup=Ne,exports.VWindow=qe,exports.WindowResizeEvent=Ln,exports.WindowType=vo,exports.calculateBestTextColor=function(e){const t=ct(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(sn(~~n[0],~~n[1],~~n[2])+.05)/(sn(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(e){return te(fe.ChangePWD,Ce,e)},exports.checkDoRefreshToken=In,exports.checkLogin=async function(e){const t=(await te(fe.CheckLogin,Ce,e))?.data;return t&&t.isSuccess&&(Bt(t.resultValue),Ge(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return te(fe.CheckToken,Ce,{token:e})},exports.clearLocalToken=dt,exports.clearRight=Tn,exports.colorIsDark=function(e){if(!Ie(e))return;const[t,n,i]=ct(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192},exports.createFileUpload=e=>new Yi(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${lt(e.substring(0,2),t)}${lt(e.substring(2,4),t)}${lt(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let i;for(i in n)t[i]=de(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=Lt,exports.exportSystemRights=bn,exports.get=function(e,t){return te(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return I.Axios?.get(e,{params:t}).catch(function(n){Pe(n,e,"","\u5916\u90E8Get")})},exports.getFunctions=function(e){if(I.User?.issystem)return e;const t=xe();return t?t.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),i=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),c=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+c.toString(16)).slice(-2)},exports.getLocalToken=he,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=ln,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Ie(e)){if(t.length===4){for(var n="#",i=1;i<4;i+=1){const c=t.slice(i,i+1);n+=c.concat(c)}t=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+t.slice(i,i+2)));return"rgb("+r.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(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,i,r,c=(parseFloat(t[1])%360+360)%360/360,y=parseFloat(t[2])/(/%$/.test(t[2])?100:1),w=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(y===0)n=i=r=w;else{var b=w<=.5?w*(y+1):w+y-w*y,x=2*w-b;n=at(x,b,c+1/3),i=at(x,b,c),r=at(x,b,c-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=un,exports.getRight=Rn,exports.getRoutes=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.routes?(Tt.length>0||e.forEach(n=>{const i=t.routes?.find(r=>r.name===n.name);if(i){const r=Dn(n,i);r&&Tt.push(r)}}),Tt):void 0},exports.getSystemRoleRight=async function(e,t,n,i){if(Tn(),!I.User)return;let r;if(i)r=i;else{if(!t)return;let c=n;c||(c=I.Config.ServiceURL.LoginAuthURL);const y=await te(t,c,{system:e});if(!y||!y.data)return void I.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");r=y.data}return r&&Pn(r),r},exports.getWidgetConfig=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgets?(Rt.length>0||e?.forEach(n=>{t.widgets?.find(i=>i.id===n.id)&&Rt.push(n)}),Rt):void 0},exports.getWidgetMenus=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgetMenu?(Pt.length>0||e.forEach(n=>{const i=t.widgetMenu?.find(r=>r.name===n.name);if(i){const r=An(n,i);r&&Pt.push(r)}}),Pt):void 0},exports.hexToRGB=ct,exports.init=function(e,t,n){n?I.Config.DefaultHproseAPI=n:!I.Config.DefaultHproseAPI&&I.Config.ServiceURL&&(I.Config.DefaultHproseAPI=I.Config.ServiceURL.DefaultHproseAPI),I.Config.DefaultHproseAPI&&_e.isNotEmpty(I.Config.DefaultHproseAPI)&&(I.DefaultProxyClient=new be(I.Config.DefaultHproseAPI));const i=new Oi(e,I.EventBus);I.Message=i,I.SystemID=t,I.EventBus.on(X.HproseServiceErrorEvent,r=>{const c=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(c)}),I.EventBus.on(X.WebAPIErrorEvent,r=>{const c=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(c)}),I.EventBus.on(X.CommonWarnEvent,r=>{i.warn(r)})},exports.initDefaultProxyClient=function(e){const t=ln(e);return t&&(I.DefaultProxyClient=t),t},exports.is=G,exports.isArray=wn,exports.isAsyncFunction=function(e){return G(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||G(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return G(e,"Date")},exports.isDef=yn,exports.isElement=e=>de(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(De(e)||wn(e)?e.length===0:!!de(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return G(e,"Error")},exports.isFunction=bt,exports.isHexColor=Ie,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return G(e,"Map")},exports.isNull=Ct,exports.isNullAndUnDef=function(e){return St(e)&&Ct(e)},exports.isNullOrUnDef=function(e){return St(e)||Ct(e)},exports.isNumber=function(e){return G(e,"Number")},exports.isObject=de,exports.isPromise=function(e){return G(e,"Promise")&&de(e)&&bt(e.then)&&bt(e.catch)},exports.isServer=to,exports.isString=De,exports.isSymbol=function(e){return G(e,"Symbol")},exports.isUnDef=St,exports.isValidURL=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),exports.isWeakMap=function(e){return G(e,"WeakMap")},exports.isWeakSet=function(e){return G(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&G(e,"Window"),exports.jquery=Ji,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ut(e.substring(0,2),t)}${ut(e.substring(2,4),t)}${ut(e.substring(4,6),t)}`},exports.login=async function(e){const t=(await te(fe.Login,Ce,e))?.data;return t&&t.isSuccess&&(Bt(t.resultValue),Ge(t.resultValue.doubleToken)),t},exports.logout=function(){const e=he();e&&(mt(fe.Logout,Ce,{token:e.token,reftoken:e.refresh}),dt())},exports.newGuid=function(){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),(t==="x"?n:3&n|8).toString(16)})},exports.onLockListener=function(){wt(),document.addEventListener("mousedown",wt)},exports.post=function(e,t){return mt(e,void 0,t)},exports.requestGet=te,exports.requestPost=mt,exports.requestPostBody=function(e,t,n,i,r,c="json",y){const w=pt(i,t,r,c);return y&&y>=2e4&&(w.timeout=y),I.Axios?.post(e,n,w).catch(function(b){Pe(b,t,e,"Post")})},exports.rgbToHex=function(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i},exports.setLocalToken=Ge,exports.setRight=Pn,exports.setUser=Bt,exports.sleep=function(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)},exports.storage=Ni,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",wt)},exports.uuid=Be,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",i=`const iconlist={
|
|
14
|
-
`,r=0;e.forEach(
|
|
15
|
-
`,i+=` '${
|
|
13
|
+
`}}});const oo={class:"vcp__header-title"},ro={key:0,class:"vcp__header-icon"},so=["innerHTML"],ao={key:0,ref:"bodyRef",class:"vcp__body"},co={ref:"bodyContentRef",class:"vcp__body-content"};function kt(e){return window.TouchEvent&&e instanceof TouchEvent}Ue.render=function(e,t,n,i,r,s){return g.openBlock(),g.createElementBlock("section",{ref:"panelRef",class:g.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[g.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...y)=>e.toggle&&e.toggle(...y))},[g.createElementVNode("div",oo,[g.renderSlot(e.$slots,"title")]),e.body.hasContent?(g.openBlock(),g.createElementBlock("div",ro,[g.renderSlot(e.$slots,"icon",{},()=>[g.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,so)])])):g.createCommentVNode("v-if",!0)]),g.createVNode(g.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:g.withCtx(()=>[e.isExpanded?(g.openBlock(),g.createElementBlock("div",ao,[g.createElementVNode("div",co,[g.renderSlot(e.$slots,"content")],512)],512)):g.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Ue.__scopeId="data-v-08c94cf8",Ue.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class Y{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return kt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return kt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Dt(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const s=w=>{n(new Y(w))},y=w=>{w.touches.length===1&&n(new Y(w)),w.touches.length>1&&i&&i(new Y(w))};return t.addEventListener("mousedown",s,r),t.addEventListener("touchstart",y,r),()=>{t.removeEventListener("mousedown",s,r),t.removeEventListener("touchstart",y,r)}}static bindMove(t,n,i=!1){const r=y=>{n(new Y(y))},s=y=>{y.touches.length===1&&n(new Y(y))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",s,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",s,i)}}static bindUp(t,n,i=!1){const r=y=>{n(new Y(y))},s=y=>{y.touches.length===0&&n(new Y(y))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",s,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",s,i)}}originalEvent({mouse:t,touch:n}){kt(this.e)?n&&n(this.e):t&&t(this.e)}}class Dt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Dt(this.x,this.y)}}class uo{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,i={}){this.handle=t,this.container=n,this.options=i,t&&(this.unbindDown=Y.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:i}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-i}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class lo{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(i=>i.push(this))}set group(t){this._group=t;const n=je(this._group),i=je(t);n.splice(n.indexOf(this),1),i.push(this),En()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(je(this._group)),En()}}const Oe=new Map;function je(e){return Oe.has(e)||Oe.set(e,[]),Oe.get(e)}function kn(e,t){return e>t?-kn(t,e):e<0&&t>=0?1:e-t}function En(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,s)=>i.push(s)),i}(Oe).sort(kn))for(const n of je(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Et(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const i=We(e);return e.style.width=t,e.style.height=n,i}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function We(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,s=t.left;return{width:n,height:i,top:r,left:s,bottom:r+i,right:s+n}}class ho{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=zn.map(b=>new b(t,this));const{width:i,height:r}=Et(t),s=n.maxWidth||window.innerWidth,y=n.maxHeight||window.innerHeight;let w=!1;(i<n.minWidth||i>s)&&(t.style.width=`${Mn(i,n.minWidth,s)}px`,w=!0),(r<n.minHeight||r>y)&&(t.style.height=`${Mn(r,n.minHeight,y)}px`,w=!0),w&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const zn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=Y.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:i,width:r,height:s}=We(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=s,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=Y.bindMove(document,this.mousemove),this.unbindUp=Y.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:i,bottom:r}=We(this.container),s=this.helper.options,y=s.maxWidth||window.innerWidth,w=s.maxHeight||window.innerHeight;this.minLeft=Math.max(i-y,0),this.maxLeft=i-s.minWidth,this.minRight=t+s.minWidth,this.maxRight=Math.min(t+y,window.innerWidth),this.minTop=Math.max(r-w,0),this.maxTop=r-s.minHeight,this.minBottom=n+s.minHeight,this.maxBottom=Math.min(n+w,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:i,top:r,right:s,bottom:y}=We(this.container),w=this.helper.options;w&&(i<this.minLeft?(this.container.style.width=t+i-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):i>this.maxLeft?(this.container.style.width=`${w.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):s<this.minRight?this.container.style.width=`${w.minWidth}px`:s>this.maxRight&&(this.container.style.width=this.maxRight-i+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${w.minHeight}px`,this.container.style.top=`${this.maxTop}px`):y<this.minBottom?this.container.style.height=`${w.minHeight}px`:y>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function Mn(e,t,n){return e<t?t:e>n?n:e}zn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Fe=g.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=g.ref(!1),n=g.ref(!1);return{hover:t,active:n,style:function(){let i=e.windowStyle.button;return t.value&&(i={...i,...this.windowStyle.buttonHover}),n.value&&(i={...i,...this.windowStyle.buttonActive}),i},mouseup:function(i){this.active&&this.$emit("click")},mousedown:function(i){i.preventDefault(),n.value=!0;const r=Y.bindUp(document,()=>{n.value=!1,r()})}}}});const fo=["disabled"];Fe.render=function(e,t,n,i,r,s){return g.openBlock(),g.createElementBlock("div",{class:"btn",style:g.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=y=>e.hover=!0),onMouseleave:t[1]||(t[1]=y=>e.hover=!1),onMousedown:t[2]||(t[2]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onTouchstart:t[3]||(t[3]=g.withModifiers((...y)=>e.mousedown&&e.mousedown(...y),["stop"])),onMouseup:t[4]||(t[4]=(...y)=>e.mouseup&&e.mouseup(...y)),onTouchend:t[5]||(t[5]=(...y)=>e.mouseup&&e.mouseup(...y)),disabled:e.disabled},[g.renderSlot(e.$slots,"default")],44,fo)},Fe.__scopeId="data-v-71662210",Fe.__file="src/controls/vuewindow/window/Button.vue";const zt=new Set;function _n(e){return e!==null?parseFloat(e):0}function $e(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(_n).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(_n).reduce((n,i)=>n+i))}}class Ln{width;height;constructor(t,n){this.width=t,this.height=n}}function po(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),i=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(i))return{left:n,top:i}}return null}function mo(e,t,n,i){const r=e-n,s=t-i;return r*r+s*s}window.addEventListener("resize",e=>{zt.forEach(t=>{t?.fixPosition()})});const He=[];var qe=g.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:Fe},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,s,y,w;const b=g.ref(e.isOpen),x=()=>{He.push(i),w=new lo(e.zGroup,E),e.isOpen&&(g.nextTick(()=>{r++==0&&(h(i),function(){const B=M.value,{width:D,height:O}=Et(B);let j,W;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,W=e.top;else{const H=e.positionHint||"auto";switch(H){case"auto":{let q=20,G=50,Q=0;do{if(He.every(J=>{if(!J.isOpen||i==J)return!0;const ie=po(J);if(ie==null)return!0;const{left:Ke,top:Ye}=ie;return mo(Ke,Ye,q,G)>16}))break;q=(q+40)%(window.innerWidth-200),G=(G+40)%(window.innerHeight-200)}while(++Q<100);j=q,W=G}break;case"center":j=(window.innerWidth-D)/2,W=(window.innerHeight-O)/2,console.log(j,W,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[G,Q]=q;if(!isFinite(G)||!isFinite(Q))throw null;j=G>=0?G:window.innerWidth-D+G,W=Q>=0?Q:window.innerHeight-O+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${W}px`)}()),e.resizable&&l(),T(),s=new uo(R.value,M.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(R.value);y=new ho(M.value,{onResize:()=>l(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&P()),zt.add(i)};function E(B){S.value.zIndex=`${B}`}const M=g.ref(null),R=g.ref(null),A=g.ref(null);function P(){w.raise(),t("activate")}const S=g.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=g.computed(()=>e.windowStyle.titlebar),d=g.computed(()=>{const B={...e.windowStyle.content};return e.resizable?B.padding="0":e.padding!=null&&(B.padding=`${e.padding}px`),e.isScrollable&&(B.overflow="auto"),B});function h(B){const{width:D,height:O,top:j,left:W}=B,H=M;if(H&&D!=null&&(H.value.style.width=`${D}px`),O!=null){const q=R.value;if(q){const G=$e(q).height;H.value.style.height=`${O+G}px`}}H&&W!=null&&(H.value.style.left=`${W}px`),H&&j!=null&&(H.value.style.top=`${j}px`)}function l(B=!0){const D=M.value,O=R.value,j=A.value;if(j&&D&&O){const{width:W,height:H}=$e(j),{width:q,height:G}=$e(D),Q=$e(O).height,J=q-(j.offsetWidth-W),ie=G-Q-(j.offsetHeight-H);j.style.width=`${J}px`,j.style.height=`${ie}px`,p(),t("resize",new Ln(J,ie)),B&&(t("update:width",J),t("update:height",ie))}}function p(){const B=M.value;if(B){const D=B.getBoundingClientRect();D.left<0&&(S.value.left="0px"),D.top<0&&(S.value.top="0px"),D.right>window.innerWidth&&(S.value.left=window.innerWidth-D.width+"px"),D.bottom>window.innerHeight&&(S.value.top=window.innerHeight-D.height+"px")}}function T(B=!0){p();const D=M.value;if(D){const{left:O,top:j}=D.getBoundingClientRect();B&&(t("update:left",O),t("update:top",j))}}return g.watch(()=>e.isOpen,B=>{b.value=B}),g.watch(()=>e.zGroup,B=>{w.group=B}),g.watch(()=>e.width,B=>{h({width:B}),l(!1)}),g.watch(()=>e.height,B=>{h({height:B}),l(!1)}),g.onMounted(()=>{x()}),g.onBeforeUnmount(()=>{zt.delete(this),w.unregister(),y&&y.teardown(),s&&s.teardown(),He.splice(He.indexOf(i),1)}),{isOpen:b,windowEl:M,titlebar:R,content:A,activate:P,styleWindow:S,styleTitlebar:u,styleContent:d,closeButtonClick:function(){b.value=!1,t("closebuttonclick")}}}});const go={class:"title"},vo=g.createTextVNode("\xD7");var Bn,le;qe.render=function(e,t,n,i,r,s){const y=g.resolveComponent("myButton");return g.openBlock(),g.createBlock(g.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=w=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=w=>e.$emit("open"))},{default:g.withCtx(()=>[g.withDirectives(g.createElementVNode("div",{class:"window",style:g.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...w)=>e.activate&&e.activate(...w)),onTouchstart:t[1]||(t[1]=(...w)=>e.activate&&e.activate(...w))},[g.createElementVNode("div",{class:"titlebar",style:g.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[g.createElementVNode("div",go,[e.$slots.title?g.renderSlot(e.$slots,"title",{key:0}):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[g.createTextVNode(g.toDisplayString(e.title),1)],2112))]),e.closeButton?(g.openBlock(),g.createBlock(y,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:g.withCtx(()=>[vo]),_:1},8,["windowStyle","onClick"])):g.createCommentVNode("v-if",!0)],4),g.createElementVNode("div",{class:"content",style:g.normalizeStyle(e.styleContent),ref:"content"},[g.renderSlot(e.$slots,"default")],4)],36),[[g.vShow,e.isOpen]])]),_:3})},qe.__file="src/controls/vuewindow/window/index.vue",(le=Bn||(Bn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const yo=qe;var Z;exports.LayoutContainerEnum=void 0,(Z=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[Z.top=0]="top",Z[Z.bottom=1]="bottom",Z[Z.centerBack=2]="centerBack",Z[Z.centerMain=3]="centerMain",Z[Z.centerFront=4]="centerFront",Z[Z.left=5]="left",Z[Z.right=6]="right";class wo{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(t,n){this.layoutState=t,this.widgetCofig=n,this.widgetCofig.forEach(i=>{if(i.afterid)if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(t){if(!t)return;let n;de(t)?n=t:De(t)&&(n=this.widgetCofig.find(i=>i.id===t)),n&&this._loadWidget(n,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t,n){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(i=>{if(i.default){const r=g.markRaw(i.default);this.getContainerComponents(t.container).value.set(t.id,r),this.widgetsLoadedSet.add(t.id),I.EventBus.emit(X.WidgetLoadedEvent,t.id),n&&n(t.id)}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i){for(const r of i)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetCofig.find(i=>i.id===t);if(n){if(this.preConditionMap.has(t)){const s=this.preConditionMap.get(t);if(s)for(const y of s)this.unloadWidget(y.id)}const i=this.getContainerComponents(n.container),r=i.value.get(t);r&&r.unmounted&&r.unmounted(),i.value.delete(t),this.widgetsLoadedSet.delete(t),I.EventBus.emit(X.WidgetUnLoadedEvent,t)}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,i=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),i&&(i.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),i&&(i.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const i=this.getLayoutContainer(t);i&&(i.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const i=this.getWidgetComponent(t);i&&I.EventBus.emit(X.WidgetVisibleChanged,{id:t,name:i.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetCofig.find(i=>i.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetCofig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetCofig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=g.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Mt=g.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(e,{attrs:t,slots:n,emit:i}){const r=g.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!I.LayoutManager){const A=new wo(r,e.widgetConfig);I.LayoutManager=A,A.preloadWidgets()}const s=M(exports.LayoutContainerEnum.top),y=M(exports.LayoutContainerEnum.centerBack),w=M(exports.LayoutContainerEnum.centerFront),b=M(exports.LayoutContainerEnum.left),x=M(exports.LayoutContainerEnum.right),E=M(exports.LayoutContainerEnum.bottom);function M(A){return I.LayoutManager?.getContainerComponents(A)}const R=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:s,centerbackComponents:y,centerfrontComponents:w,leftContainerComponents:b,rightContainerComponents:x,bottomContainerComponents:E,containerStyle:R}}});const bo={ref:"topContainer",class:"topContainer"},So={ref:"centerBackContainer",class:"centerdiv backContainer"},Co={ref:"centerMainContainer",class:"centerdiv mainContainer"},xo={ref:"centerFrontContainer",class:"centerdiv centerContainer"},ko={ref:"leftContainer",class:"leftContainer"},Eo={ref:"rightContainer",class:"rightContainer"},zo={ref:"bottomContainer",class:"bottomContainer"};Mt.render=function(e,t,n,i,r,s){const y=g.resolveComponent("router-view");return g.openBlock(),g.createElementBlock("div",{class:"layoutContainer",style:g.normalizeStyle(e.containerStyle)},[g.createElementVNode("div",bo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.topContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",null,[g.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",So,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerbackComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),g.createElementVNode("div",Co,[g.createVNode(y,null,{default:g.withCtx(({Component:w})=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(w)))]),_:1})],512),g.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",xo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerfrontComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",ko,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512),g.createElementVNode("div",Eo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)]),g.createElementVNode("div",zo,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([w,b])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(b),{key:w}))),128))],512)],4)},Mt.__file="src/controls/layoutcontainer/layout.vue";const Ge=new Map,_t=new Map;let Xe;const Mo={getDefaultClient(){if(Xe||(Xe=new be(SysConfig.DefaultHproseAPI)),!Xe)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Xe},registerHprose(e,t){const n=_t.get(e);if(!n){const i=new be(t);Ge.set(e,i)}return n},getHprose:e=>_t?.get(e),getProxyHprose:e=>Ge.get(e),unregisterHprose(e){Ge.get(e)&&(_t.delete(e),Ge.delete(e))}},fe={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},_o=I.Config.ServiceURL.LoginAuthURL;function Lt(){const e=un();e&&ne(fe.RefreshToken,_o,{refreshToken:e}).then(t=>{Ve(t.data)})}function In(e){I.User||(I.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?Lt():setTimeout(Lt,n-4e3))}function Ve(e){I.User&&(I.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&I.User){let i=he();if(!i){const r=I.User.doubleToken;i={id:I.User.id,name:I.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:I.User.issystem,issecurity:I.User.issecurity,appkey:I.User.appkey,role:I.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,ce.set("access_token",i,n/1e3),In(i)}else ce.remove("access_token")}function Bt(e){I.User=e}const Ce=I.Config.ServiceURL.LoginAuthURL,It=new Le("",sessionStorage);function Rn(){return It.get("ROLE_SYSTEM_RIGHT")}function Pn(e){It.set("ROLE_SYSTEM_RIGHT",e)}function Tn(){It.remove("ROLE_SYSTEM_RIGHT")}const Rt=[],Pt=[],Tt=[];function xe(){return Rn()}function Dn(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(s=>s.path===i.path);if(r){const s=Dn(r,i);s&&n.children?.push(s)}})),n}function Nn(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(i=>{const r=e.children?.find(s=>s.name===i.name);if(r){const s=Nn(r,i);s&&n.children?.push(s)}})),n}exports.BigFileDownload=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,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=ht(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}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("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await ne(t,e,n);let r=null;return i&&i.status===200&&(r=i.data),r}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Te.createInstance({name:this.fileID,driver:Te.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(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+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("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Te.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("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const i=I.Axios.CancelToken;this.cancelSource=i.source(),this.isStarting=!0;const r={key:this.fileMetaData?.downloadID};let s=0;const y=this.cacheSize;let w=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const x=b*this.chunkByteSize;let E=x+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const M={range:`bytes=${x}-${E}`};for(;w>=y;)await this.sleep(200);const R=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),w++,ne(n,t,r,M,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async A=>{const P=A.data;w--,await this.currentDB?.setItem(R,P),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const S=parseInt(R)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${S}/${this.totalChunks}`),this.savefile()}).catch(A=>{w--;const P=parseInt(R)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${P}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}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("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=eo.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let s=new Response(r).body;if(s===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const y=s.getReader();for(;;){const{done:w,value:b}=await y.read();if(w)break;await e.write(b)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Te.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Re,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,s)=>{if(i){const y=document.createElement("a");if(y.href=e,y.target=t,y.download!==void 0&&(y.download=n||cn(e)),document.createEvent){const w=document.createEvent("MouseEvents");return w.initEvent("click",!0,!0),y.dispatchEvent(w),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const y=document.createElement("canvas"),w=document.createElement("img");w.setAttribute("crossOrigin","Anonymous"),w.src=e,w.onload=b=>{y.width=w.width,y.height=w.height,y.getContext("2d").drawImage(w,0,0,w.width,w.height),y.toBlob(x=>{if(x){const E=document.createElement("a");E.href=window.URL.createObjectURL(x),E.download=cn(e),E.click(),URL.revokeObjectURL(E.href),r(!0)}},"image/jpeg")},w.onerror=b=>s(b)}})},exports.Global=I,exports.GlobalHprose=Mo,exports.GlobalMitt=ve,exports.H5Tool=ee,exports.HproseClient=ke,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){Re(i.data,n)}).catch(i=>{console.warn(i),ve.emit(X.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=an,exports.LayoutContainer=Mt,exports.LayoutManager=class{layoutState;widgetCofig;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;constructor(e,t){this.layoutState=e,this.widgetCofig=t,this.widgetCofig.forEach(n=>{if(n.afterid)if(this.preConditionMap.has(n.afterid))this.preConditionMap.get(n.afterid)?.add(n);else{const i=new Set;i.add(n),this.preConditionMap.set(n.afterid,i)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(e){if(!e)return;let t;de(e)?t=e:De(e)&&(t=this.widgetCofig.find(n=>n.id===e)),t&&this._loadWidget(t,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e,t){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const i=g.markRaw(n.default);this.getContainerComponents(e.container).value.set(e.id,i),this.widgetsLoadedSet.add(e.id),I.EventBus.emit(X.WidgetLoadedEvent,e.id),t&&t(e.id)}})}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const n=this.preConditionMap.get(e);if(n){for(const i of n)if(this.isWidgetLoaded(i.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetCofig.find(n=>n.id===e);if(t){if(this.preConditionMap.has(e)){const r=this.preConditionMap.get(e);if(r)for(const s of r)this.unloadWidget(s.id)}const n=this.getContainerComponents(t.container),i=n.value.get(e);i&&i.unmounted&&i.unmounted(),n.value.delete(e),this.widgetsLoadedSet.delete(e),I.EventBus.emit(X.WidgetUnLoadedEvent,e)}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,n=this.layoutState.centerBackContainer;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 exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}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&&I.EventBus.emit(X.WidgetVisibleChanged,{id:e,name:n.name,visible:t})}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)){const t=this.widgetCofig.find(n=>n.id===e);if(t)return this.getContainerComponents(t.container).value.get(e)}}getWigetItem(e){return this.widgetCofig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetCofig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=g.ref(new Map);return this.layoutMap.set(e,t),t}}addContainerComponent(e,t){}},exports.ObjToUrlParams=function(e,t){let n="",i="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,i},exports.Pane=ot,exports.ProxyClient=be,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,i=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=t,r.click(),n.revokeObjectURL(r.href)},exports.Splitpanes=Ni,exports.Storage=Le,exports.StringUtils=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=X,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=fe,exports.VCollapsiblePanel=Ue,exports.VCollapsiblePanelGroup=Ae,exports.VWindow=qe,exports.WindowResizeEvent=Ln,exports.WindowType=yo,exports.calculateBestTextColor=function(e){const t=ct(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(sn(~~n[0],~~n[1],~~n[2])+.05)/(sn(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(e){return ne(fe.ChangePWD,Ce,e)},exports.checkDoRefreshToken=In,exports.checkLogin=async function(e){const t=(await ne(fe.CheckLogin,Ce,e))?.data;return t&&t.isSuccess&&(Bt(t.resultValue),Ve(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return ne(fe.CheckToken,Ce,{token:e})},exports.clearLocalToken=dt,exports.clearRight=Tn,exports.colorIsDark=function(e){if(!Ie(e))return;const[t,n,i]=ct(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192},exports.createFileUpload=e=>new Yi(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${lt(e.substring(0,2),t)}${lt(e.substring(2,4),t)}${lt(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let i;for(i in n)t[i]=de(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=Lt,exports.exportSystemRights=bn,exports.get=function(e,t){return ne(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return I.Axios?.get(e,{params:t}).catch(function(n){Pe(n,e,"","\u5916\u90E8Get")})},exports.getFunctions=function(e){if(I.User?.issystem)return e;const t=xe();return t?t.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),i=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),s=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+s.toString(16)).slice(-2)},exports.getLocalToken=he,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=fn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Ie(e)){if(t.length===4){for(var n="#",i=1;i<4;i+=1){const s=t.slice(i,i+1);n+=s.concat(s)}t=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+t.slice(i,i+2)));return"rgb("+r.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(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,i,r,s=(parseFloat(t[1])%360+360)%360/360,y=parseFloat(t[2])/(/%$/.test(t[2])?100:1),w=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(y===0)n=i=r=w;else{var b=w<=.5?w*(y+1):w+y-w*y,x=2*w-b;n=at(x,b,s+1/3),i=at(x,b,s),r=at(x,b,s-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=un,exports.getRight=Rn,exports.getRoutes=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.routes?(Tt.length>0||e.forEach(n=>{const i=t.routes?.find(r=>r.name===n.name);if(i){const r=Dn(n,i);r&&Tt.push(r)}}),Tt):void 0},exports.getSystemRoleRight=async function(e,t,n,i){if(Tn(),!I.User)return;let r;if(i)r=i;else{if(!t)return;let s=n;s||(s=I.Config.ServiceURL.LoginAuthURL);const y=await ne(t,s,{system:e});if(!y||!y.data)return void I.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");r=y.data}return r&&Pn(r),r},exports.getWidgetConfig=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgets?(Rt.length>0||e?.forEach(n=>{t.widgets?.find(i=>i.id===n.id)&&Rt.push(n)}),Rt):void 0},exports.getWidgetMenus=function(e){if(I.User?.issystem)return e;const t=xe();return t&&t.widgetMenu?(Pt.length>0||e.forEach(n=>{const i=t.widgetMenu?.find(r=>r.name===n.name);if(i){const r=Nn(n,i);r&&Pt.push(r)}}),Pt):void 0},exports.hexToRGB=ct,exports.init=function(e,t,n){!I.Config.DefaultHproseAPI&&I.Config.ServiceURL&&(I.Config.DefaultHproseAPI=I.Config.ServiceURL.DefaultHproseAPI),I.Config.DefaultHproseAPI&&_e.isNotEmpty(I.Config.DefaultHproseAPI)&&(I.DefaultProxyClient=new be(I.Config.DefaultHproseAPI));const i=I.Config.UI.GrayMode;i&&ee.setGrayMode(i);const r=new Zi(e,I.EventBus);I.Message=r,I.SystemID=t,I.SystemGroup=n,I.EventBus.on(X.HproseServiceErrorEvent,s=>{const y=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${s}`;r.warn(y)}),I.EventBus.on(X.WebAPIErrorEvent,s=>{const y=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${s}`;r.warn(y)}),I.EventBus.on(X.CommonWarnEvent,s=>{r.warn(s)})},exports.initDefaultProxyClient=function(e){const t=fn(e);return t&&(I.DefaultProxyClient=t),t},exports.is=V,exports.isArray=wn,exports.isAsyncFunction=function(e){return V(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||V(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return V(e,"Date")},exports.isDef=yn,exports.isElement=e=>de(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(De(e)||wn(e)?e.length===0:!!de(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return V(e,"Error")},exports.isFunction=bt,exports.isHexColor=Ie,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return V(e,"Map")},exports.isNull=Ct,exports.isNullAndUnDef=function(e){return St(e)&&Ct(e)},exports.isNullOrUnDef=function(e){return St(e)||Ct(e)},exports.isNumber=function(e){return V(e,"Number")},exports.isObject=de,exports.isPromise=function(e){return V(e,"Promise")&&de(e)&&bt(e.then)&&bt(e.catch)},exports.isServer=no,exports.isString=De,exports.isSymbol=function(e){return V(e,"Symbol")},exports.isUnDef=St,exports.isValidURL=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),exports.isWeakMap=function(e){return V(e,"WeakMap")},exports.isWeakSet=function(e){return V(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&V(e,"Window"),exports.jquery=Ji,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${ut(e.substring(0,2),t)}${ut(e.substring(2,4),t)}${ut(e.substring(4,6),t)}`},exports.login=async function(e){const t=(await ne(fe.Login,Ce,e))?.data;return t&&t.isSuccess&&(Bt(t.resultValue),Ve(t.resultValue.doubleToken)),t},exports.logout=function(){const e=he();e&&(pt(fe.Logout,Ce,{token:e.token,reftoken:e.refresh}),dt())},exports.newGuid=function(){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),(t==="x"?n:3&n|8).toString(16)})},exports.onLockListener=function(){wt(),document.addEventListener("mousedown",wt)},exports.post=function(e,t){return pt(e,void 0,t)},exports.requestGet=ne,exports.requestPost=pt,exports.requestPostBody=function(e,t,n,i,r,s="json",y){const w=ft(i,t,r,s);return y&&y>=2e4&&(w.timeout=y),I.Axios?.post(e,n,w).catch(function(b){Pe(b,t,e,"Post")})},exports.rgbToHex=function(e,t,n){const i=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i},exports.setLocalToken=Ve,exports.setRight=Pn,exports.setUser=Bt,exports.sleep=function(e){for(var t=new Date().getTime();new Date().getTime()-t<e;);console.log(`\u5F3A\u5236\u7B49\u5F85${e}\u6BEB\u79D2`)},exports.storage=Ui,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",wt)},exports.uuid=Be,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",i=`const iconlist={
|
|
14
|
+
`,r=0;e.forEach(s=>{const y=s.split(":");if(y&&y.length===2){const w="icon"+r;n+=`import ${w} from '~icons/${y[0]}/${y[1]}'
|
|
15
|
+
`,i+=` '${s}':${w},
|
|
16
16
|
`,r++}}),r>0&&(i+=`};
|
|
17
17
|
`,Re(n+i+"export default iconlist;","IconifyList.ts"))},exports.writeSysRoleRight=function(e,t){const n=bn(e);an(n,t),I.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")};
|