xframelib 0.4.2 → 0.4.3

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/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("@hprose/rpc-core"),n=require("@hprose/io"),i=require("@hprose/rpc-html5"),o={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((Tt,Ot)=>(Tt[Ot.id]=Ot)&&Tt,{})}},methods:{updatePaneComponents(){this.panes.forEach(Tt=>{Tt.update&&Tt.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[Tt.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(Tt,Ot){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=Ot},onMouseMove(Tt){this.touch.mouseDown&&(Tt.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(Tt)),this.$emit("resize",this.panes.map(Ot=>({min:Ot.min,max:Ot.max,size:Ot.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(Tt=>({min:Tt.min,max:Tt.max,size:Tt.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(Tt,Ot){"ontouchstart"in window&&(Tt.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===Ot?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(Tt,Ot),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=Ot,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[Ot])},onSplitterDblClick(Tt,Ot){let jt=0;this.panes=this.panes.map((Ut,Wt)=>(Ut.size=Wt===Ot?Ut.max:Ut.min,Wt!==Ot&&(jt+=Ut.min),Ut)),this.panes[Ot].size-=jt,this.$emit("pane-maximize",this.panes[Ot])},onPaneClick(Tt,Ot){this.$emit("pane-click",this.indexedPanes[Ot])},getCurrentMouseDrag(Tt){const Ot=this.container.getBoundingClientRect(),{clientX:jt,clientY:Ut}="ontouchstart"in window&&Tt.touches?Tt.touches[0]:Tt;return{x:jt-Ot.left,y:Ut-Ot.top}},getCurrentDragPercentage(Tt){Tt=Tt[this.horizontal?"y":"x"];const Ot=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(Tt=Ot-Tt),100*Tt/Ot},calculatePanesSize(Tt){const Ot=this.touch.activeSplitter;let jt={prevPanesSize:this.sumPrevPanesSize(Ot),nextPanesSize:this.sumNextPanesSize(Ot),prevReachedMinPanes:0,nextReachedMinPanes:0};const Ut=0+(this.pushOtherPanes?0:jt.prevPanesSize),Wt=100-(this.pushOtherPanes?0:jt.nextPanesSize),Xt=Math.max(Math.min(this.getCurrentDragPercentage(Tt),Wt),Ut);let tn=[Ot,Ot+1],en=this.panes[tn[0]]||null,rn=this.panes[tn[1]]||null;const an=en.max<100&&Xt>=en.max+jt.prevPanesSize,ln=rn.max<100&&Xt<=100-(rn.max+this.sumNextPanesSize(Ot+1));if(an||ln)an?(en.size=en.max,rn.size=Math.max(100-en.max-jt.prevPanesSize-jt.nextPanesSize,0)):(en.size=Math.max(100-rn.max-jt.prevPanesSize-this.sumNextPanesSize(Ot+1),0),rn.size=rn.max);else{if(this.pushOtherPanes){const hn=this.doPushOtherPanes(jt,Xt);if(!hn)return;({sums:jt,panesToResize:tn}=hn),en=this.panes[tn[0]]||null,rn=this.panes[tn[1]]||null}en!==null&&(en.size=Math.min(Math.max(Xt-jt.prevPanesSize-jt.prevReachedMinPanes,en.min),en.max)),rn!==null&&(rn.size=Math.min(Math.max(100-Xt-jt.nextPanesSize-jt.nextReachedMinPanes,rn.min),rn.max))}},doPushOtherPanes(Tt,Ot){const jt=this.touch.activeSplitter,Ut=[jt,jt+1];return Ot<Tt.prevPanesSize+this.panes[Ut[0]].min&&(Ut[0]=this.findPrevExpandedPane(jt).index,Tt.prevReachedMinPanes=0,Ut[0]<jt&&this.panes.forEach((Wt,Xt)=>{Xt>Ut[0]&&Xt<=jt&&(Wt.size=Wt.min,Tt.prevReachedMinPanes+=Wt.min)}),Tt.prevPanesSize=this.sumPrevPanesSize(Ut[0]),Ut[0]===void 0)?(Tt.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((Wt,Xt)=>{Xt>0&&Xt<=jt&&(Wt.size=Wt.min,Tt.prevReachedMinPanes+=Wt.min)}),this.panes[Ut[1]].size=100-Tt.prevReachedMinPanes-this.panes[0].min-Tt.prevPanesSize-Tt.nextPanesSize,null):Ot>100-Tt.nextPanesSize-this.panes[Ut[1]].min&&(Ut[1]=this.findNextExpandedPane(jt).index,Tt.nextReachedMinPanes=0,Ut[1]>jt+1&&this.panes.forEach((Wt,Xt)=>{Xt>jt&&Xt<Ut[1]&&(Wt.size=Wt.min,Tt.nextReachedMinPanes+=Wt.min)}),Tt.nextPanesSize=this.sumNextPanesSize(Ut[1]-1),Ut[1]===void 0)?(Tt.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((Wt,Xt)=>{Xt<this.panesCount-1&&Xt>=jt+1&&(Wt.size=Wt.min,Tt.nextReachedMinPanes+=Wt.min)}),this.panes[Ut[0]].size=100-Tt.prevPanesSize-Tt.nextReachedMinPanes-this.panes[this.panesCount-1].min-Tt.nextPanesSize,null):{sums:Tt,panesToResize:Ut}},sumPrevPanesSize(Tt){return this.panes.reduce((Ot,jt,Ut)=>Ot+(Ut<Tt?jt.size:0),0)},sumNextPanesSize(Tt){return this.panes.reduce((Ot,jt,Ut)=>Ot+(Ut>Tt+1?jt.size:0),0)},findPrevExpandedPane(Tt){return[...this.panes].reverse().find(Ot=>Ot.index<Tt&&Ot.size>Ot.min)||{}},findNextExpandedPane(Tt){return this.panes.find(Ot=>Ot.index>Tt+1&&Ot.size>Ot.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(Tt=>{const Ot=Tt.classList.contains("splitpanes__pane"),jt=Tt.classList.contains("splitpanes__splitter");if(!Ot&&!jt)return Tt.parentNode.removeChild(Tt),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(Tt,Ot,jt=!1){const Ut=Tt-1,Wt=document.createElement("div");Wt.classList.add("splitpanes__splitter"),jt||(Wt.onmousedown=Xt=>this.onMouseDown(Xt,Ut),typeof window!="undefined"&&"ontouchstart"in window&&(Wt.ontouchstart=Xt=>this.onMouseDown(Xt,Ut)),Wt.onclick=Xt=>this.onSplitterClick(Xt,Ut+1)),this.dblClickSplitter&&(Wt.ondblclick=Xt=>this.onSplitterDblClick(Xt,Ut+1)),Ot.parentNode.insertBefore(Wt,Ot)},removeSplitter(Tt){Tt.onmousedown=void 0,Tt.onclick=void 0,Tt.ondblclick=void 0,Tt.parentNode.removeChild(Tt)},redoSplitters(){const Tt=Array.from(this.container.children);Tt.forEach(jt=>{jt.className.includes("splitpanes__splitter")&&this.removeSplitter(jt)});let Ot=0;Tt.forEach(jt=>{jt.className.includes("splitpanes__pane")&&(!Ot&&this.firstSplitter?this.addSplitter(Ot,jt,!0):Ot&&this.addSplitter(Ot,jt),Ot++)})},requestUpdate({target:Tt,...Ot}){const jt=this.indexedPanes[Tt._.uid];Object.entries(Ot).forEach(([Ut,Wt])=>jt[Ut]=Wt)},onPaneAdd(Tt){let Ot=-1;Array.from(Tt.$el.parentNode.children).some(Wt=>(Wt.className.includes("splitpanes__pane")&&Ot++,Wt===Tt.$el));const jt=parseFloat(Tt.minSize),Ut=parseFloat(Tt.maxSize);this.panes.splice(Ot,0,{id:Tt._.uid,index:Ot,min:isNaN(jt)?0:jt,max:isNaN(Ut)?100:Ut,size:Tt.size===null?null:parseFloat(Tt.size),givenSize:Tt.size,update:Tt.update}),this.panes.forEach((Wt,Xt)=>Wt.index=Xt),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[Ot]}),this.$emit("pane-add",{index:Ot,panes:this.panes.map(Wt=>({min:Wt.min,max:Wt.max,size:Wt.size}))})})},onPaneRemove(Tt){const Ot=this.panes.findIndex(Ut=>Ut.id===Tt._.uid),jt=this.panes.splice(Ot,1)[0];this.panes.forEach((Ut,Wt)=>Ut.index=Wt),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...jt,index:Ot}}),this.$emit("pane-remove",{removed:jt,panes:this.panes.map(Ut=>({min:Ut.min,max:Ut.max,size:Ut.size}))})})},resetPaneSizes(Tt={}){Tt.addedPane||Tt.removedPane?this.panes.some(Ot=>Ot.givenSize!==null||Ot.min||Ot.max<100)?this.equalizeAfterAddOrRemove(Tt):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(Ot=>({min:Ot.min,max:Ot.max,size:Ot.size})))},equalize(){const Tt=100/this.panesCount;let Ot=0;const jt=[],Ut=[];this.panes.forEach(Wt=>{Wt.size=Math.max(Math.min(Tt,Wt.max),Wt.min),Ot-=Wt.size,Wt.size>=Wt.max&&jt.push(Wt.id),Wt.size<=Wt.min&&Ut.push(Wt.id)}),Ot>.1&&this.readjustSizes(Ot,jt,Ut)},initialPanesSizing(){let Tt=100;const Ot=[],jt=[];let Ut=0;this.panes.forEach(Xt=>{Tt-=Xt.size,Xt.size!==null&&Ut++,Xt.size>=Xt.max&&Ot.push(Xt.id),Xt.size<=Xt.min&&jt.push(Xt.id)});let Wt=100;Tt>.1&&(this.panes.forEach(Xt=>{Xt.size===null&&(Xt.size=Math.max(Math.min(Tt/(this.panesCount-Ut),Xt.max),Xt.min)),Wt-=Xt.size}),Wt>.1&&this.readjustSizes(Tt,Ot,jt))},equalizeAfterAddOrRemove({addedPane:Tt}={}){let Ot=100/this.panesCount,jt=0;const Ut=[],Wt=[];Tt&&Tt.givenSize!==null&&(Ot=(100-Tt.givenSize)/(this.panesCount-1)),this.panes.forEach(Xt=>{jt-=Xt.size,Xt.size>=Xt.max&&Ut.push(Xt.id),Xt.size<=Xt.min&&Wt.push(Xt.id)}),Math.abs(jt)<.1||(this.panes.forEach(Xt=>{Tt&&Tt.givenSize!==null&&Tt.id===Xt.id||(Xt.size=Math.max(Math.min(Ot,Xt.max),Xt.min)),jt-=Xt.size,Xt.size>=Xt.max&&Ut.push(Xt.id),Xt.size<=Xt.min&&Wt.push(Xt.id)}),jt>.1&&this.readjustSizes(jt,Ut,Wt))},readjustSizes(Tt,Ot,jt){let Ut;Ut=Tt>0?Tt/(this.panesCount-Ot.length):Tt/(this.panesCount-jt.length),this.panes.forEach(Wt=>{if(Tt>0&&!Ot.includes(Wt.id)){const Xt=Math.max(Math.min(Wt.size+Ut,Wt.max),Wt.min);Tt-=Xt-Wt.size,Wt.size=Xt}else if(!jt.includes(Wt.id)){const Xt=Math.max(Math.min(Wt.size+Ut,Wt.max),Wt.min);Tt-=Xt-Wt.size,Wt.size=Xt}Wt.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[Wt.id].size}%`})}),Math.abs(Tt)>.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(Tt){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((Ot,jt)=>{Ot.ondblclick=Tt?Ut=>this.onSplitterDblClick(Ut,jt):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 e.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"},r={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(Tt){this.style=Tt}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(Tt){this.requestUpdate({target:this,size:Tt})},minSizeNumber(Tt){this.requestUpdate({target:this,min:Tt})},maxSizeNumber(Tt){this.requestUpdate({target:this,max:Tt})}}};r.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("div",{class:"splitpanes__pane",onClick:Ot[0]||(Ot[0]=tn=>Xt.onPaneClick(tn,Tt._.uid)),style:e.normalizeStyle(Tt.style)},[e.renderSlot(Tt.$slots,"default")],4)},r.__file="src/controls/splitpanes/pane.vue";var s=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function a(Tt){throw new Error('Could not dynamically require "'+Tt+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var c={exports:{}},l=c.exports=function(Tt){var Ot=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function jt(nn,qt){var Gt=nn[0],Kt=nn[1],Vt=nn[2],Jt=nn[3];Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[0]-680876936|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[1]-389564586|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[2]+606105819|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[3]-1044525330|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[4]-176418897|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[5]+1200080426|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[6]-1473231341|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[7]-45705983|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[8]+1770035416|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[9]-1958414417|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[10]-42063|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[11]-1990404162|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Vt|~Kt&Jt)+qt[12]+1804603682|0)<<7|Gt>>>25)+Kt|0)&Kt|~Gt&Vt)+qt[13]-40341101|0)<<12|Jt>>>20)+Gt|0)&Gt|~Jt&Kt)+qt[14]-1502002290|0)<<17|Vt>>>15)+Jt|0)&Jt|~Vt&Gt)+qt[15]+1236535329|0)<<22|Kt>>>10)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[1]-165796510|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[6]-1069501632|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[11]+643717713|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[0]-373897302|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[5]-701558691|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[10]+38016083|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[15]-660478335|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[4]-405537848|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[9]+568446438|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[14]-1019803690|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[3]-187363961|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[8]+1163531501|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt&Jt|Vt&~Jt)+qt[13]-1444681467|0)<<5|Gt>>>27)+Kt|0)&Vt|Kt&~Vt)+qt[2]-51403784|0)<<9|Jt>>>23)+Gt|0)&Kt|Gt&~Kt)+qt[7]+1735328473|0)<<14|Vt>>>18)+Jt|0)&Gt|Jt&~Gt)+qt[12]-1926607734|0)<<20|Kt>>>12)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[5]-378558|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[8]-2022574463|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[11]+1839030562|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[14]-35309556|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[1]-1530992060|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[4]+1272893353|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[7]-155497632|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[10]-1094730640|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[13]+681279174|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[0]-358537222|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[3]-722521979|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[6]+76029189|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Vt=((Vt+=((Jt=((Jt+=((Gt=((Gt+=(Kt^Vt^Jt)+qt[9]-640364487|0)<<4|Gt>>>28)+Kt|0)^Kt^Vt)+qt[12]-421815835|0)<<11|Jt>>>21)+Gt|0)^Gt^Kt)+qt[15]+530742520|0)<<16|Vt>>>16)+Jt|0)^Jt^Gt)+qt[2]-995338651|0)<<23|Kt>>>9)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[0]-198630844|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[7]+1126891415|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[14]-1416354905|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[5]-57434055|0)<<21|Kt>>>11)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[12]+1700485571|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[3]-1894986606|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[10]-1051523|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[1]-2054922799|0)<<21|Kt>>>11)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[8]+1873313359|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[15]-30611744|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[6]-1560198380|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[13]+1309151649|0)<<21|Kt>>>11)+Vt|0,Kt=((Kt+=((Jt=((Jt+=(Kt^((Gt=((Gt+=(Vt^(Kt|~Jt))+qt[4]-145523070|0)<<6|Gt>>>26)+Kt|0)|~Vt))+qt[11]-1120210379|0)<<10|Jt>>>22)+Gt|0)^((Vt=((Vt+=(Gt^(Jt|~Kt))+qt[2]+718787259|0)<<15|Vt>>>17)+Jt|0)|~Gt))+qt[9]-343485551|0)<<21|Kt>>>11)+Vt|0,nn[0]=Gt+nn[0]|0,nn[1]=Kt+nn[1]|0,nn[2]=Vt+nn[2]|0,nn[3]=Jt+nn[3]|0}function Ut(nn){var qt,Gt=[];for(qt=0;qt<64;qt+=4)Gt[qt>>2]=nn.charCodeAt(qt)+(nn.charCodeAt(qt+1)<<8)+(nn.charCodeAt(qt+2)<<16)+(nn.charCodeAt(qt+3)<<24);return Gt}function Wt(nn){var qt,Gt=[];for(qt=0;qt<64;qt+=4)Gt[qt>>2]=nn[qt]+(nn[qt+1]<<8)+(nn[qt+2]<<16)+(nn[qt+3]<<24);return Gt}function Xt(nn){var qt,Gt,Kt,Vt,Jt,mn,pn=nn.length,fn=[1732584193,-271733879,-1732584194,271733878];for(qt=64;qt<=pn;qt+=64)jt(fn,Ut(nn.substring(qt-64,qt)));for(Gt=(nn=nn.substring(qt-64)).length,Kt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],qt=0;qt<Gt;qt+=1)Kt[qt>>2]|=nn.charCodeAt(qt)<<(qt%4<<3);if(Kt[qt>>2]|=128<<(qt%4<<3),qt>55)for(jt(fn,Kt),qt=0;qt<16;qt+=1)Kt[qt]=0;return Vt=(Vt=8*pn).toString(16).match(/(.*?)(.{0,8})$/),Jt=parseInt(Vt[2],16),mn=parseInt(Vt[1],16)||0,Kt[14]=Jt,Kt[15]=mn,jt(fn,Kt),fn}function tn(nn){var qt,Gt,Kt,Vt,Jt,mn,pn=nn.length,fn=[1732584193,-271733879,-1732584194,271733878];for(qt=64;qt<=pn;qt+=64)jt(fn,Wt(nn.subarray(qt-64,qt)));for(Gt=(nn=qt-64<pn?nn.subarray(qt-64):new Uint8Array(0)).length,Kt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],qt=0;qt<Gt;qt+=1)Kt[qt>>2]|=nn[qt]<<(qt%4<<3);if(Kt[qt>>2]|=128<<(qt%4<<3),qt>55)for(jt(fn,Kt),qt=0;qt<16;qt+=1)Kt[qt]=0;return Vt=(Vt=8*pn).toString(16).match(/(.*?)(.{0,8})$/),Jt=parseInt(Vt[2],16),mn=parseInt(Vt[1],16)||0,Kt[14]=Jt,Kt[15]=mn,jt(fn,Kt),fn}function en(nn){var qt,Gt="";for(qt=0;qt<4;qt+=1)Gt+=Ot[nn>>8*qt+4&15]+Ot[nn>>8*qt&15];return Gt}function rn(nn){var qt;for(qt=0;qt<nn.length;qt+=1)nn[qt]=en(nn[qt]);return nn.join("")}function an(nn){return/[\u0080-\uFFFF]/.test(nn)&&(nn=unescape(encodeURIComponent(nn))),nn}function ln(nn,qt){var Gt,Kt=nn.length,Vt=new ArrayBuffer(Kt),Jt=new Uint8Array(Vt);for(Gt=0;Gt<Kt;Gt+=1)Jt[Gt]=nn.charCodeAt(Gt);return qt?Jt:Vt}function hn(nn){return String.fromCharCode.apply(null,new Uint8Array(nn))}function yn(nn,qt,Gt){var Kt=new Uint8Array(nn.byteLength+qt.byteLength);return Kt.set(new Uint8Array(nn)),Kt.set(new Uint8Array(qt),nn.byteLength),Gt?Kt:Kt.buffer}function bn(nn){var qt,Gt=[],Kt=nn.length;for(qt=0;qt<Kt-1;qt+=2)Gt.push(parseInt(nn.substr(qt,2),16));return String.fromCharCode.apply(String,Gt)}function gn(){this.reset()}return rn(Xt("hello")),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function nn(qt,Gt){return(qt=0|qt||0)<0?Math.max(qt+Gt,0):Math.min(qt,Gt)}ArrayBuffer.prototype.slice=function(qt,Gt){var Kt,Vt,Jt,mn,pn=this.byteLength,fn=nn(qt,pn),xn=pn;return Gt!==Tt&&(xn=nn(Gt,pn)),fn>xn?new ArrayBuffer(0):(Kt=xn-fn,Vt=new ArrayBuffer(Kt),Jt=new Uint8Array(Vt),mn=new Uint8Array(this,fn,Kt),Jt.set(mn),Vt)}}(),gn.prototype.append=function(nn){return this.appendBinary(an(nn)),this},gn.prototype.appendBinary=function(nn){this._buff+=nn,this._length+=nn.length;var qt,Gt=this._buff.length;for(qt=64;qt<=Gt;qt+=64)jt(this._hash,Ut(this._buff.substring(qt-64,qt)));return this._buff=this._buff.substring(qt-64),this},gn.prototype.end=function(nn){var qt,Gt,Kt=this._buff,Vt=Kt.length,Jt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(qt=0;qt<Vt;qt+=1)Jt[qt>>2]|=Kt.charCodeAt(qt)<<(qt%4<<3);return this._finish(Jt,Vt),Gt=rn(this._hash),nn&&(Gt=bn(Gt)),this.reset(),Gt},gn.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},gn.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},gn.prototype.setState=function(nn){return this._buff=nn.buff,this._length=nn.length,this._hash=nn.hash,this},gn.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},gn.prototype._finish=function(nn,qt){var Gt,Kt,Vt,Jt=qt;if(nn[Jt>>2]|=128<<(Jt%4<<3),Jt>55)for(jt(this._hash,nn),Jt=0;Jt<16;Jt+=1)nn[Jt]=0;Gt=(Gt=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),Kt=parseInt(Gt[2],16),Vt=parseInt(Gt[1],16)||0,nn[14]=Kt,nn[15]=Vt,jt(this._hash,nn)},gn.hash=function(nn,qt){return gn.hashBinary(an(nn),qt)},gn.hashBinary=function(nn,qt){var Gt=rn(Xt(nn));return qt?bn(Gt):Gt},gn.ArrayBuffer=function(){this.reset()},gn.ArrayBuffer.prototype.append=function(nn){var qt,Gt=yn(this._buff.buffer,nn,!0),Kt=Gt.length;for(this._length+=nn.byteLength,qt=64;qt<=Kt;qt+=64)jt(this._hash,Wt(Gt.subarray(qt-64,qt)));return this._buff=qt-64<Kt?new Uint8Array(Gt.buffer.slice(qt-64)):new Uint8Array(0),this},gn.ArrayBuffer.prototype.end=function(nn){var qt,Gt,Kt=this._buff,Vt=Kt.length,Jt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(qt=0;qt<Vt;qt+=1)Jt[qt>>2]|=Kt[qt]<<(qt%4<<3);return this._finish(Jt,Vt),Gt=rn(this._hash),nn&&(Gt=bn(Gt)),this.reset(),Gt},gn.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},gn.ArrayBuffer.prototype.getState=function(){var nn=gn.prototype.getState.call(this);return nn.buff=hn(nn.buff),nn},gn.ArrayBuffer.prototype.setState=function(nn){return nn.buff=ln(nn.buff,!0),gn.prototype.setState.call(this,nn)},gn.ArrayBuffer.prototype.destroy=gn.prototype.destroy,gn.ArrayBuffer.prototype._finish=gn.prototype._finish,gn.ArrayBuffer.hash=function(nn,qt){var Gt=rn(tn(new Uint8Array(nn)));return qt?bn(Gt):Gt},gn}();const u=[],h=class{static addHandler(Tt,Ot,jt){Tt.addEventListener?Tt.addEventListener(Ot,jt,!1):Tt.attachEvent?Tt.attachEvent("on"+Ot,jt):Tt["on"+Ot]=jt}static windowResizeHandler(Tt){h.addHandler(window,"resize",Tt)}static fullscreenEnabled(){const Tt=window.document;return document.fullscreenEnabled||window.fullScreen||Tt.mozFullscreenEnabled||Tt.webkitIsFullScreen}static fullScreen(Tt,Ot){if(Ot){const jt=window.document;let Ut=window.document.exitFullscreen||jt.msExitFullscreen||jt.mozCancelFullScreen||jt.webkitCancelFullScreen;if(Ut!==void 0&&Ut)Ut.call(window.document);else if(window.ActiveXObject!==void 0){let Wt=new window.ActiveXObject("WScript.Shell");Wt!=null&&Wt.SendKeys("{F11}")}}else{let jt=Tt;jt||(jt=window.document.documentElement);let Ut=jt.requestFullScreen||jt.webkitRequestFullScreen||jt.mozRequestFullScreen||jt.msRequestFullScreen;if(Ut!==void 0&&Ut)Ut.call(jt);else if(window.ActiveXObject!==void 0){let Wt=new window.ActiveXObject("WScript.Shell");Wt!=null&&Wt.SendKeys("{F11}")}}}static requestFullScreen(Tt){let Ot=Tt;Ot||(Ot=window.document.documentElement);var jt=Ot.requestFullScreen||Ot.webkitRequestFullScreen||Ot.mozRequestFullScreen||Ot.msRequestFullScreen;if(jt)jt.call(Ot);else if(window.ActiveXObject!==void 0){var Ut=new window.ActiveXObject("WScript.Shell");Ut!==null&&Ut.SendKeys("{F11}")}}static exitFullScreen(){const Tt=window.document;var Ot=document.exitFullscreen||Tt.mozCancelFullScreen||Tt.webkitExitFullscreen||Tt.webkitExitFullscreen;if(Ot)Ot.call(document);else if(window.ActiveXObject!==void 0){var jt=new window.ActiveXObject("WScript.Shell");jt!==null&&jt.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!h.fullScreenElement()}static onFullScreenChanged(Tt){let Ot;"onfullscreenchange"in window.document?Ot="fullscreenchange":"onwebkitfullscreenchange"in window.document?Ot="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(Ot="mozfullscreenchange"),Ot?document.addEventListener(Ot,function(){const jt=h.isFullScreen();Tt(jt)}):document.addEventListener("MSFullscreenChange",function(){const jt=h.isFullScreen();Tt(jt)})}static stringifyCircularHandler(Tt,Ot){if(typeof Ot=="object"&&Ot!==null){if(u.indexOf(Ot)!==-1)return;u.push(Ot)}return Ot}static jsonStringify(Tt){if(!Tt)return"";const Ot=JSON.stringify(Tt,h.stringifyCircularHandler);return u.length=0,Ot}static jsonParse(Tt){const Ot=h.jsonStringify(Tt);if(Ot.length>1)return JSON.parse(Ot)}static getObjectURL(Tt){let Ot;const jt=window;return jt.createObjcectURL!=null?Ot=jt.createOjcectURL(Tt):window.URL!=null?Ot=window.URL.createObjectURL(Tt):window.webkitURL!=null&&(Ot=window.webkitURL.createObjectURL(Tt)),Ot}static getFileShortMD5(Tt,Ot){const jt=File.prototype,Ut=jt.slice||jt.mozSlice||jt.webkitSlice,Wt=Tt,Xt=new l.ArrayBuffer,tn=new FileReader;tn.onload=function(en){Xt.append(en.target?.result);const rn=Xt.end();Ot({isOK:!0,data:rn})},tn.onerror=function(){const en="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(en),Ot({isOK:!1,data:en})},function(){const en=2097152>=Wt.size?Wt.size:2097152;tn.readAsArrayBuffer(Ut.call(Wt,0,en))}()}static MD5(Tt,Ot=!1){return l.hash(Tt,Ot)}};let d=h;d.copyText=Tt=>new Promise((Ot,jt)=>{const Ut=document.createElement("input");Ut.value=Tt,document.body.appendChild(Ut),Ut.select(),document.execCommand("copy"),Ut.remove(),Ot(!0)});class p{static toHump(Ot){return Ot.replace(/[\-\/\_](\w)/g,(jt,Ut)=>Ut.toUpperCase()).replace("views","")}}p.isNullOrEmpty=Tt=>Tt===null||Tt===""||Tt===void 0||Tt.length===0,p.isNotEmpty=Tt=>Tt!==null&&Tt!==""&&Tt!==void 0&&Tt.length!==0;class f{constructor(Ot="",jt=localStorage){this.prefixKey=Ot,this.storage=jt}getKey(Ot){return`${this.prefixKey}${Ot}`.toUpperCase()}set(Ot,jt,Ut=604800){const Wt=JSON.stringify({value:jt,expire:Ut!==null?new Date().getTime()+1e3*Ut:null});this.storage.setItem(this.getKey(Ot),Wt)}get(Ot,jt=null){const Ut=this.storage.getItem(this.getKey(Ot));if(Ut)try{const Wt=JSON.parse(Ut),{value:Xt,expire:tn}=Wt;if(tn===null||tn>=Date.now())return Xt;this.remove(this.getKey(Ot))}catch{return jt}return jt}remove(Ot){this.storage.removeItem(this.getKey(Ot))}clear(){this.storage.clear()}setCookie(Ot,jt,Ut=604800){document.cookie=`${this.getKey(Ot)}=${jt}; Max-Age=${Ut}`}getCookie(Ot){const jt=document.cookie.split("; ");for(let Ut=0,Wt=jt.length;Ut<Wt;Ut++){const Xt=jt[Ut].split("=");if(Xt[0]===this.getKey(Ot))return Xt[1]}return""}removeCookie(Ot){this.setCookie(Ot,1,-1)}clearCookie(){const Ot=document.cookie.match(/[^ =;]+(?==)/g);if(Ot)for(let jt=Ot.length;jt--;)document.cookie=Ot[jt]+"=0;expire="+new Date(0).toUTCString()}}const m=new f("",localStorage);function g(){let Tt=[];const Ot="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var jt=0;jt<36;jt++)Tt[jt]=Ot.substr(Math.floor(16*Math.random()),1);return Tt[14]="4",Tt[19]=Ot.substr(3&Number(Tt[19])|8,1),Tt[8]=Tt[13]=Tt[18]=Tt[23]="-",Tt.join("")}var v;function y(Tt,Ot,jt){return jt<0&&(jt+=1),jt>1&&(jt-=1),jt<1/6?Tt+6*(Ot-Tt)*jt:jt<.5?Ot:jt<2/3?Tt+(Ot-Tt)*(2/3-jt)*6:Tt}function w(Tt){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(Tt)}function b(Tt){let Ot=Tt.toLowerCase();if(w(Tt)){if(Ot.length===4){let Ut="#";for(let Wt=1;Wt<4;Wt+=1)Ut+=Ot.slice(Wt,Wt+1).concat(Ot.slice(Wt,Wt+1));Ot=Ut}const jt=[];for(let Ut=1;Ut<7;Ut+=2)jt.push(parseInt("0x"+Ot.slice(Ut,Ut+2)));return"RGB("+jt.join(",")+")"}return Ot}function x(Tt,Ot){const jt=parseInt(Tt,16)+Ot,Ut=jt>255?255:jt;return Ut.toString(16).length>1?Ut.toString(16):`0${Ut.toString(16)}`}function S(Tt,Ot,jt){const Ut=[Tt,Ot,jt].map(Wt=>(Wt/=255)<=.03928?Wt/12.92:Math.pow((Wt+.055)/1.055,2.4));return .2126*Ut[0]+.7152*Ut[1]+.0722*Ut[2]}function C(Tt,Ot){const jt=parseInt(Tt,16)-Ot,Ut=jt<0?0:jt;return Ut.toString(16).length>1?Ut.toString(16):`0${Ut.toString(16)}`}function E(Tt){return{all:Tt=Tt||new Map,on(Ot,jt){const Ut=Tt?.get(Ot);Ut&&Ut.push(jt)||Tt?.set(Ot,[jt])},off(Ot,jt){const Ut=Tt?.get(Ot);Ut&&Ut.splice(Ut.indexOf(jt)>>>0,1)},emit(Ot,jt){(Tt?.get(Ot)||[]).slice().map(Ut=>{Ut(jt)}),(Tt?.get("*")||[]).slice().map(Ut=>{Ut(Ot,jt)})}}}exports.EnumColor=void 0,(v=exports.EnumColor||(exports.EnumColor={}))[v.RGBA=0]="RGBA",v[v.Hex=1]="Hex",v[v.Hsla=2]="Hsla";const k=E(),z={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetLoaded",WidgetVisibleChanged:"WidgetVisibleChanged"},_=(Tt,Ot)=>{const jt=document.createElement("a");jt.download=Ot,jt.style.display="none";const Ut=new Blob([Tt],{type:"application/octet-stream"});jt.href=URL.createObjectURL(Ut),document.body.appendChild(jt),jt.click(),document.body.removeChild(jt)};function M(Tt){const Ot=Tt.lastIndexOf("/")+1;let jt=Tt.substring(Ot);return jt=decodeURI(jt.split("?")[0]),jt}class L{constructor(Ot){if(Ot&&!p.isNullOrEmpty(Ot)){if(L.httpTransport||(L.httpTransport=new i.HttpTransport),this.client=new t.Client(Ot),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=Ot,this.init()}}init(){this.client&&this.client.useServiceAsync().then(Ot=>{this.hproseProxy=Ot}).catch(Ot=>{String(Ot).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):k.emit(z.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(Ot)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(Ot){console.warn(Ot),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(Ot,jt,Ut){if(this.client)return await this.client.invoke(Ot,jt,Ut)}encode(Ot,jt,Ut){return this.client?this.client.codec.encode(Ot,jt,Ut):void 0}decode(Ot,jt){return this.client?this.client.codec.decode(Ot,jt):void 0}}class B{constructor(Ot){this.hproseClient=new L(Ot),this.hpProxyObj=null,this.defaultContext=new t.ClientContext}getClientContext(){return null}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 Ot=await this.hproseClient.getProxy();this.hpProxyObj=Ot}return this.hpProxyObj||k.emit(z.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(Ot,jt){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");let Ut;return Ut=new t.ClientContext,await this.hproseClient.invoke(Ot,jt,Ut)}async hproseInvokeContext(Ot,jt,...Ut){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(Ot,Ut,jt)}async hproseInvokeEncode(Ot){const jt=new n.ByteStream(Ot).toBytes(),Ut=await this.hproseClient.client?.request(jt,this.defaultContext);return Ut&&this.hproseClient.client?.codec.decode(Ut,this.defaultContext)}encodeRequest(Ot,...jt){const Ut=this.hproseClient.client?.codec?.encode(Ot,jt,this.defaultContext);return n.ByteStream.toString(Ut)}}class I{constructor(Ot,jt){Ot&&(this.message=Ot),jt&&(this.eventBus=jt)}msg(Ot,jt=3,Ut="success"){if(this.message)if(typeof this.message=="function")this.message({type:Ut,message:Ot,duration:jt});else switch(Ut){case"info":this.message.info(Ot,jt);break;case"success":this.message.success(Ot,jt);break;case"warning":this.message.warn(Ot,jt);break;case"error":this.message.error(Ot,jt)}else{switch(Ut){case"info":case"success":console.log(Ot);break;case"warning":console.warn(Ot);break;case"error":Ut="dark",console.error(Ot)}this.eventBus&&this.eventBus.emit(z.AlertInfoEvent,{type:Ut,info:Ot})}}info(Ot,jt=3){this.msg(Ot,jt,"info")}warn(Ot,jt=3){this.msg(Ot,jt,"warning")}err(Ot,jt=3){this.msg(Ot,jt,"error")}}const P=new Map,R={Config:SysConfig,EventBus:k,DefaultProxyClient:null,Axios:void 0},N=function(Tt,Ot,jt){jt?R.Config.DefaultHproseAPI=jt:!R.Config.DefaultHproseAPI&&R.Config.ServiceURL&&(R.Config.DefaultHproseAPI=R.Config.ServiceURL.DefaultHproseAPI),Ot&&(R.Axios=Ot),R.Config.DefaultHproseAPI&&p.isNotEmpty(R.Config.DefaultHproseAPI)&&(R.DefaultProxyClient=new B(R.Config.DefaultHproseAPI));const Ut=new I(Tt,R.EventBus);R.Message=Ut,R.EventBus.on(z.HproseServiceErrorEvent,Wt=>{const Xt=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${Wt}`;Ut.warn(Xt)}),R.EventBus.on(z.WebAPIErrorEvent,Wt=>{const Xt=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${Wt}`;Ut.warn(Xt)}),R.EventBus.on(z.CommonWarnEvent,Wt=>{Ut.warn(Wt)})};function D(Tt){if(Tt&&p.isNotEmpty(Tt)){if(P.has(Tt))return P.get(Tt);{const Ot=new B(Tt);return P.set(Tt,Ot),Ot}}}const A=new f("user",localStorage);function T(){return A.get("access_token")}function O(){A.remove("access_token"),R.User&&delete R.User}function j(){return T()?.refresh}function U(Tt,Ot,jt,Ut="json",Wt){const Xt={baseURL:R.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:Tt,headers:{"Content-Type":"application/json",Authorization:"bearer "+T()?.token},responseType:Ut,cancelToken:Wt};if(jt)for(let tn in jt)Xt.headers[tn]=jt[tn];return Ot&&(Xt.baseURL=Ot),Xt}function W(Tt,Ot,jt,Ut,Wt="json",Xt){const tn=U(jt,Ot,Ut,Wt,Xt);return R.Axios?.get(Tt,tn).catch(function(en){console.log(en),R.Message?.err("\u670D\u52A1Get\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})}function F(Tt,Ot,jt,Ut,Wt,Xt="json"){const tn=U(Ut,Ot,Wt,Xt),en=function(rn){let an=new FormData;return rn&&Object.keys(rn).forEach(ln=>{if(!rn)return;let hn=rn[ln];var yn;hn!=null&&an.append(ln,(yn=hn)instanceof Blob?yn:yn.toString())}),an}(jt);return R.Axios?.post(Tt,en,tn).catch(function(rn){console.log(rn),R.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})}var $={exports:{}},H=typeof window!="undefined"?window:s!==void 0?s:typeof self!="undefined"?self:{},q=function(Tt){if(!Tt)return!1;var Ot=V.call(Tt);return Ot==="[object Function]"||typeof Tt=="function"&&Ot!=="[object RegExp]"||typeof window!="undefined"&&(Tt===window.setTimeout||Tt===window.alert||Tt===window.confirm||Tt===window.prompt)},V=Object.prototype.toString,X=function(Tt){return Tt.replace(/^\s+|\s+$/g,"")},G=function(){for(var Tt={},Ot=0;Ot<arguments.length;Ot++){var jt=arguments[Ot];for(var Ut in jt)K.call(jt,Ut)&&(Tt[Ut]=jt[Ut])}return Tt},K=Object.prototype.hasOwnProperty,Y=H,J=q,Z=function(Tt){if(!Tt)return{};for(var Ot,jt={},Ut=X(Tt).split(`
2
- `),Wt=0;Wt<Ut.length;Wt++){var Xt=Ut[Wt],tn=Xt.indexOf(":"),en=X(Xt.slice(0,tn)).toLowerCase(),rn=X(Xt.slice(tn+1));jt[en]===void 0?jt[en]=rn:(Ot=jt[en],Object.prototype.toString.call(Ot)==="[object Array]"?jt[en].push(rn):jt[en]=[jt[en],rn])}return jt},Q=G;function ee(Tt,Ot,jt){var Ut=Tt;return J(Ot)?(jt=Ot,typeof Tt=="string"&&(Ut={uri:Tt})):Ut=Q(Ot,{uri:Tt}),Ut.callback=jt,Ut}function te(Tt,Ot,jt){return ne(Ot=ee(Tt,Ot,jt))}function ne(Tt){if(Tt.callback===void 0)throw new Error("callback argument missing");var Ot=!1,jt=function(Gt,Kt,Vt){Ot||(Ot=!0,Tt.callback(Gt,Kt,Vt))};function Ut(){var Gt=void 0;if(Gt=rn.response?rn.response:rn.responseText||function(Kt){try{if(Kt.responseType==="document")return Kt.responseXML;var Vt=Kt.responseXML&&Kt.responseXML.documentElement.nodeName==="parsererror";if(Kt.responseType===""&&!Vt)return Kt.responseXML}catch{}return null}(rn),nn)try{Gt=JSON.parse(Gt)}catch{}return Gt}function Wt(Gt){return clearTimeout(an),Gt instanceof Error||(Gt=new Error(""+(Gt||"Unknown XMLHttpRequest Error"))),Gt.statusCode=0,jt(Gt,qt)}function Xt(){if(!en){var Gt;clearTimeout(an),Gt=Tt.useXDR&&rn.status===void 0?200:rn.status===1223?204:rn.status;var Kt=qt,Vt=null;return Gt!==0?(Kt={body:Ut(),statusCode:Gt,method:hn,headers:{},url:ln,rawRequest:rn},rn.getAllResponseHeaders&&(Kt.headers=Z(rn.getAllResponseHeaders()))):Vt=new Error("Internal XMLHttpRequest Error"),jt(Vt,Kt,Kt.body)}}var tn,en,rn=Tt.xhr||null;rn||(rn=Tt.cors||Tt.useXDR?new te.XDomainRequest:new te.XMLHttpRequest);var an,ln=rn.url=Tt.uri||Tt.url,hn=rn.method=Tt.method||"GET",yn=Tt.body||Tt.data,bn=rn.headers=Tt.headers||{},gn=!!Tt.sync,nn=!1,qt={body:void 0,headers:{},statusCode:0,method:hn,url:ln,rawRequest:rn};if("json"in Tt&&Tt.json!==!1&&(nn=!0,bn.accept||bn.Accept||(bn.Accept="application/json"),hn!=="GET"&&hn!=="HEAD"&&(bn["content-type"]||bn["Content-Type"]||(bn["Content-Type"]="application/json"),yn=JSON.stringify(Tt.json===!0?yn:Tt.json))),rn.onreadystatechange=function(){rn.readyState===4&&setTimeout(Xt,0)},rn.onload=Xt,rn.onerror=Wt,rn.onprogress=function(){},rn.onabort=function(){en=!0},rn.ontimeout=Wt,rn.open(hn,ln,!gn,Tt.username,Tt.password),gn||(rn.withCredentials=!!Tt.withCredentials),!gn&&Tt.timeout>0&&(an=setTimeout(function(){if(!en){en=!0,rn.abort("timeout");var Gt=new Error("XMLHttpRequest timeout");Gt.code="ETIMEDOUT",Wt(Gt)}},Tt.timeout)),rn.setRequestHeader)for(tn in bn)bn.hasOwnProperty(tn)&&rn.setRequestHeader(tn,bn[tn]);else if(Tt.headers&&!function(Gt){for(var Kt in Gt)if(Gt.hasOwnProperty(Kt))return!1;return!0}(Tt.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in Tt&&(rn.responseType=Tt.responseType),"beforeSend"in Tt&&typeof Tt.beforeSend=="function"&&Tt.beforeSend(rn),rn.send(yn||null),rn}$.exports=te,$.exports.default=te,te.XMLHttpRequest=Y.XMLHttpRequest||function(){},te.XDomainRequest="withCredentials"in new te.XMLHttpRequest?te.XMLHttpRequest:Y.XDomainRequest,function(Tt,Ot){for(var jt=0;jt<Tt.length;jt++)Ot(Tt[jt])}(["get","put","post","patch","head","delete"],function(Tt){te[Tt==="delete"?"del":Tt]=function(Ot,jt,Ut){return(jt=ee(Ot,jt,Ut)).method=Tt.toUpperCase(),ne(jt)}});var ie=$.exports;const oe=[200,201,202,204,308],re=[408,502,503,504];class se{constructor(Ot){this.endpoint=Ot.endpoint,this.file=Ot.file,this.fileName=encodeURI(this.file.name),this.headers=Ot.headers||{},this.method=Ot.method||"PUT",this.chunkSize=Ot.chunkSize||5120,this.attempts=Ot.attempts||5,this.delayBeforeAttempt=Ot.delayBeforeAttempt||1,this.md5=Ot.md5||"",this.maxFileBytes=1024*(Ot.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=E(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(Ot,jt){this.eventTarget.on(Ot,jt)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(Ot,jt){this.eventTarget.emit(Ot,jt)}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(Ot=>(this.endpointValue=Ot,this.endpointValue))}getChunk(){return new Promise(Ot=>{const jt=this.totalChunks===1?this.file.size:this.chunkByteSize,Ut=jt*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),Ot(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(Ut,Ut+jt))})}xhrPromise(Ot){const jt=Ut=>{Ut.upload.onprogress=Wt=>{const Xt=100/this.totalChunks,tn=Xt*this.file.size,en=Xt*this.chunkCount,rn=Wt.loaded/(Wt.total??tn)*Xt;this.dispatch("progress",Math.min(en+rn,100))}};return new Promise((Ut,Wt)=>{this.currentXhr=ie({...Ot,beforeSend:jt},(Xt,tn)=>(this.currentXhr=void 0,Xt?Wt(Xt):Ut(tn)))})}sendChunk(){if(!this.chunk)return;const Ot=this.chunkCount*this.chunkByteSize,jt=Ot+this.chunk.size-1,Ut={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${Ot}-${jt}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:Ut,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(Ot=>{if(this.attemptCount=this.attemptCount+1,Ot!=null&&oe.includes(Ot.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:Ot}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const jt=100*(this.chunkCount/this.totalChunks*this.file.size)/this.file.size;this.dispatch("progress",jt)}else if(Ot!=null&&re.includes(Ot.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:${Ot?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(Ot=>{this.paused||this.offline||this.manageRetries()})}}const ae=new class{hasClass(Tt,Ot){return Tt.className.match(new RegExp("(\\s|^)"+Ot+"(\\s|$)"))}addClass(Tt,Ot){this.hasClass(Tt,Ot)||(Tt.className+=" "+Ot)}removeClass(Tt,Ot){if(this.hasClass(Tt,Ot)){const jt=new RegExp("(\\s|^)"+Ot+"(\\s|$)");Tt.className=Tt.className.replace(jt," ")}}toggleClass(Tt,Ot){this.hasClass(Tt,Ot)?this.removeClass(Tt,Ot):this.addClass(Tt,Ot)}},ce=A.get("is_LockScreen",!1),le={isLock:ce,lockTime:ce=="true"?he():0};function ue(Tt){le.isLock=Tt,A.set("is_LockScreen",Tt,10),Tt&&(O(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function he(){let Tt=3600;return R.Config.UI?.LockTime&&R.Config.UI?.LockTime>=10&&(Tt=R.Config.UI.LockTime),Tt}let de;function pe(){clearInterval(de),window.location.href.indexOf("/login")>0||le.isLock||(ue(!1),le.lockTime=he(),de=setInterval(()=>{if(le.lockTime--,le.lockTime<=0)return ue(!0),clearInterval(de)},1e3))}var fe={exports:{}},me=fe.exports=function Tt(Ot,jt,Ut){function Wt(en,rn){if(!jt[en]){if(!Ot[en]){if(!rn&&a)return a(en);if(Xt)return Xt(en,!0);var an=new Error("Cannot find module '"+en+"'");throw an.code="MODULE_NOT_FOUND",an}var ln=jt[en]={exports:{}};Ot[en][0].call(ln.exports,function(hn){var yn=Ot[en][1][hn];return Wt(yn||hn)},ln,ln.exports,Tt,Ot,jt,Ut)}return jt[en].exports}for(var Xt=a,tn=0;tn<Ut.length;tn++)Wt(Ut[tn]);return Wt}({1:[function(Tt,Ot,jt){(function(Ut){var Wt,Xt,tn=Ut.MutationObserver||Ut.WebKitMutationObserver;if(tn){var en=0,rn=new tn(yn),an=Ut.document.createTextNode("");rn.observe(an,{characterData:!0}),Wt=function(){an.data=en=++en%2}}else if(Ut.setImmediate||Ut.MessageChannel===void 0)Wt="document"in Ut&&"onreadystatechange"in Ut.document.createElement("script")?function(){var gn=Ut.document.createElement("script");gn.onreadystatechange=function(){yn(),gn.onreadystatechange=null,gn.parentNode.removeChild(gn),gn=null},Ut.document.documentElement.appendChild(gn)}:function(){setTimeout(yn,0)};else{var ln=new Ut.MessageChannel;ln.port1.onmessage=yn,Wt=function(){ln.port2.postMessage(0)}}var hn=[];function yn(){var gn,nn;Xt=!0;for(var qt=hn.length;qt;){for(nn=hn,hn=[],gn=-1;++gn<qt;)nn[gn]();qt=hn.length}Xt=!1}function bn(gn){hn.push(gn)!==1||Xt||Wt()}Ot.exports=bn}).call(this,s!==void 0?s:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(Tt,Ot,jt){var Ut=Tt(1);function Wt(){}var Xt={},tn=["REJECTED"],en=["FULFILLED"],rn=["PENDING"];function an(Vt){if(typeof Vt!="function")throw new TypeError("resolver must be a function");this.state=rn,this.queue=[],this.outcome=void 0,Vt!==Wt&&bn(this,Vt)}function ln(Vt,Jt,mn){this.promise=Vt,typeof Jt=="function"&&(this.onFulfilled=Jt,this.callFulfilled=this.otherCallFulfilled),typeof mn=="function"&&(this.onRejected=mn,this.callRejected=this.otherCallRejected)}function hn(Vt,Jt,mn){Ut(function(){var pn;try{pn=Jt(mn)}catch(fn){return Xt.reject(Vt,fn)}pn===Vt?Xt.reject(Vt,new TypeError("Cannot resolve promise with itself")):Xt.resolve(Vt,pn)})}function yn(Vt){var Jt=Vt&&Vt.then;if(Vt&&(typeof Vt=="object"||typeof Vt=="function")&&typeof Jt=="function")return function(){Jt.apply(Vt,arguments)}}function bn(Vt,Jt){var mn=!1;function pn(Cn){mn||(mn=!0,Xt.reject(Vt,Cn))}function fn(Cn){mn||(mn=!0,Xt.resolve(Vt,Cn))}function xn(){Jt(fn,pn)}var Sn=gn(xn);Sn.status==="error"&&pn(Sn.value)}function gn(Vt,Jt){var mn={};try{mn.value=Vt(Jt),mn.status="success"}catch(pn){mn.status="error",mn.value=pn}return mn}function nn(Vt){return Vt instanceof this?Vt:Xt.resolve(new this(Wt),Vt)}function qt(Vt){var Jt=new this(Wt);return Xt.reject(Jt,Vt)}function Gt(Vt){var Jt=this;if(Object.prototype.toString.call(Vt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var mn=Vt.length,pn=!1;if(!mn)return this.resolve([]);for(var fn=new Array(mn),xn=0,Sn=-1,Cn=new this(Wt);++Sn<mn;)zn(Vt[Sn],Sn);return Cn;function zn(_n,Mn){function Bn(Ln){fn[Mn]=Ln,++xn!==mn||pn||(pn=!0,Xt.resolve(Cn,fn))}Jt.resolve(_n).then(Bn,function(Ln){pn||(pn=!0,Xt.reject(Cn,Ln))})}}function Kt(Vt){var Jt=this;if(Object.prototype.toString.call(Vt)!=="[object Array]")return this.reject(new TypeError("must be an array"));var mn=Vt.length,pn=!1;if(!mn)return this.resolve([]);for(var fn=-1,xn=new this(Wt);++fn<mn;)Sn(Vt[fn]);return xn;function Sn(Cn){Jt.resolve(Cn).then(function(zn){pn||(pn=!0,Xt.resolve(xn,zn))},function(zn){pn||(pn=!0,Xt.reject(xn,zn))})}}Ot.exports=an,an.prototype.catch=function(Vt){return this.then(null,Vt)},an.prototype.then=function(Vt,Jt){if(typeof Vt!="function"&&this.state===en||typeof Jt!="function"&&this.state===tn)return this;var mn=new this.constructor(Wt);return this.state!==rn?hn(mn,this.state===en?Vt:Jt,this.outcome):this.queue.push(new ln(mn,Vt,Jt)),mn},ln.prototype.callFulfilled=function(Vt){Xt.resolve(this.promise,Vt)},ln.prototype.otherCallFulfilled=function(Vt){hn(this.promise,this.onFulfilled,Vt)},ln.prototype.callRejected=function(Vt){Xt.reject(this.promise,Vt)},ln.prototype.otherCallRejected=function(Vt){hn(this.promise,this.onRejected,Vt)},Xt.resolve=function(Vt,Jt){var mn=gn(yn,Jt);if(mn.status==="error")return Xt.reject(Vt,mn.value);var pn=mn.value;if(pn)bn(Vt,pn);else{Vt.state=en,Vt.outcome=Jt;for(var fn=-1,xn=Vt.queue.length;++fn<xn;)Vt.queue[fn].callFulfilled(Jt)}return Vt},Xt.reject=function(Vt,Jt){Vt.state=tn,Vt.outcome=Jt;for(var mn=-1,pn=Vt.queue.length;++mn<pn;)Vt.queue[mn].callRejected(Jt);return Vt},an.resolve=nn,an.reject=qt,an.all=Gt,an.race=Kt},{1:1}],3:[function(Tt,Ot,jt){(function(Ut){typeof Ut.Promise!="function"&&(Ut.Promise=Tt(2))}).call(this,s!==void 0?s:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(Tt,Ot,jt){var Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ft){return typeof Ft}:function(Ft){return Ft&&typeof Symbol=="function"&&Ft.constructor===Symbol&&Ft!==Symbol.prototype?"symbol":typeof Ft};function Wt(Ft,$t){if(!(Ft instanceof $t))throw new TypeError("Cannot call a class as a function")}function Xt(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}var tn=Xt();function en(){try{if(!tn||!tn.open)return!1;var Ft=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),$t=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!Ft||$t)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}function rn(Ft,$t){Ft=Ft||[],$t=$t||{};try{return new Blob(Ft,$t)}catch(Yt){if(Yt.name!=="TypeError")throw Yt;for(var Ht=new(typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),Zt=0;Zt<Ft.length;Zt+=1)Ht.append(Ft[Zt]);return Ht.getBlob($t.type)}}typeof Promise=="undefined"&&Tt(3);var an=Promise;function ln(Ft,$t){$t&&Ft.then(function(Ht){$t(null,Ht)},function(Ht){$t(Ht)})}function hn(Ft,$t,Ht){typeof $t=="function"&&Ft.then($t),typeof Ht=="function"&&Ft.catch(Ht)}function yn(Ft){return typeof Ft!="string"&&(console.warn(Ft+" used as a key, but it is not a string."),Ft=String(Ft)),Ft}function bn(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var gn="local-forage-detect-blob-support",nn=void 0,qt={},Gt=Object.prototype.toString,Kt="readonly",Vt="readwrite";function Jt(Ft){for(var $t=Ft.length,Ht=new ArrayBuffer($t),Zt=new Uint8Array(Ht),Yt=0;Yt<$t;Yt++)Zt[Yt]=Ft.charCodeAt(Yt);return Ht}function mn(Ft){return new an(function($t){var Ht=Ft.transaction(gn,Vt),Zt=rn([""]);Ht.objectStore(gn).put(Zt,"key"),Ht.onabort=function(Yt){Yt.preventDefault(),Yt.stopPropagation(),$t(!1)},Ht.oncomplete=function(){var Yt=navigator.userAgent.match(/Chrome\/(\d+)/),Qt=navigator.userAgent.match(/Edge\//);$t(Qt||!Yt||parseInt(Yt[1],10)>=43)}}).catch(function(){return!1})}function pn(Ft){return typeof nn=="boolean"?an.resolve(nn):mn(Ft).then(function($t){return nn=$t})}function fn(Ft){var $t=qt[Ft.name],Ht={};Ht.promise=new an(function(Zt,Yt){Ht.resolve=Zt,Ht.reject=Yt}),$t.deferredOperations.push(Ht),$t.dbReady?$t.dbReady=$t.dbReady.then(function(){return Ht.promise}):$t.dbReady=Ht.promise}function xn(Ft){var $t=qt[Ft.name].deferredOperations.pop();if($t)return $t.resolve(),$t.promise}function Sn(Ft,$t){var Ht=qt[Ft.name].deferredOperations.pop();if(Ht)return Ht.reject($t),Ht.promise}function Cn(Ft,$t){return new an(function(Ht,Zt){if(qt[Ft.name]=qt[Ft.name]||Yn(),Ft.db){if(!$t)return Ht(Ft.db);fn(Ft),Ft.db.close()}var Yt=[Ft.name];$t&&Yt.push(Ft.version);var Qt=tn.open.apply(tn,Yt);$t&&(Qt.onupgradeneeded=function(on){var sn=Qt.result;try{sn.createObjectStore(Ft.storeName),on.oldVersion<=1&&sn.createObjectStore(gn)}catch(cn){if(cn.name!=="ConstraintError")throw cn;console.warn('The database "'+Ft.name+'" has been upgraded from version '+on.oldVersion+" to version "+on.newVersion+', but the storage "'+Ft.storeName+'" already exists.')}}),Qt.onerror=function(on){on.preventDefault(),Zt(Qt.error)},Qt.onsuccess=function(){var on=Qt.result;on.onversionchange=function(sn){sn.target.close()},Ht(on),xn(Ft)}})}function zn(Ft){return Cn(Ft,!1)}function _n(Ft){return Cn(Ft,!0)}function Mn(Ft,$t){if(!Ft.db)return!0;var Ht=!Ft.db.objectStoreNames.contains(Ft.storeName),Zt=Ft.version<Ft.db.version,Yt=Ft.version>Ft.db.version;if(Zt&&(Ft.version!==$t&&console.warn('The database "'+Ft.name+`" can't be downgraded from version `+Ft.db.version+" to version "+Ft.version+"."),Ft.version=Ft.db.version),Yt||Ht){if(Ht){var Qt=Ft.db.version+1;Qt>Ft.version&&(Ft.version=Qt)}return!0}return!1}function Bn(Ft){return new an(function($t,Ht){var Zt=new FileReader;Zt.onerror=Ht,Zt.onloadend=function(Yt){var Qt=btoa(Yt.target.result||"");$t({__local_forage_encoded_blob:!0,data:Qt,type:Ft.type})},Zt.readAsBinaryString(Ft)})}function Ln(Ft){return rn([Jt(atob(Ft.data))],{type:Ft.type})}function Pn(Ft){return Ft&&Ft.__local_forage_encoded_blob}function Fn(Ft){var $t=this,Ht=$t._initReady().then(function(){var Zt=qt[$t._dbInfo.name];if(Zt&&Zt.dbReady)return Zt.dbReady});return hn(Ht,Ft,Ft),Ht}function Wn(Ft){fn(Ft);for(var $t=qt[Ft.name],Ht=$t.forages,Zt=0;Zt<Ht.length;Zt++){var Yt=Ht[Zt];Yt._dbInfo.db&&(Yt._dbInfo.db.close(),Yt._dbInfo.db=null)}return Ft.db=null,zn(Ft).then(function(Qt){return Ft.db=Qt,Mn(Ft)?_n(Ft):Qt}).then(function(Qt){Ft.db=$t.db=Qt;for(var on=0;on<Ht.length;on++)Ht[on]._dbInfo.db=Qt}).catch(function(Qt){throw Sn(Ft,Qt),Qt})}function Rn(Ft,$t,Ht,Zt){Zt===void 0&&(Zt=1);try{var Yt=Ft.db.transaction(Ft.storeName,$t);Ht(null,Yt)}catch(Qt){if(Zt>0&&(!Ft.db||Qt.name==="InvalidStateError"||Qt.name==="NotFoundError"))return an.resolve().then(function(){if(!Ft.db||Qt.name==="NotFoundError"&&!Ft.db.objectStoreNames.contains(Ft.storeName)&&Ft.version<=Ft.db.version)return Ft.db&&(Ft.version=Ft.db.version+1),_n(Ft)}).then(function(){return Wn(Ft).then(function(){Rn(Ft,$t,Ht,Zt-1)})}).catch(Ht);Ht(Qt)}}function Yn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function vi(Ft){var $t=this,Ht={db:null};if(Ft)for(var Zt in Ft)Ht[Zt]=Ft[Zt];var Yt=qt[Ht.name];Yt||(Yt=Yn(),qt[Ht.name]=Yt),Yt.forages.push($t),$t._initReady||($t._initReady=$t.ready,$t.ready=Fn);var Qt=[];function on(){return an.resolve()}for(var sn=0;sn<Yt.forages.length;sn++){var cn=Yt.forages[sn];cn!==$t&&Qt.push(cn._initReady().catch(on))}var un=Yt.forages.slice(0);return an.all(Qt).then(function(){return Ht.db=Yt.db,zn(Ht)}).then(function(dn){return Ht.db=dn,Mn(Ht,$t._defaultConfig.version)?_n(Ht):dn}).then(function(dn){Ht.db=Yt.db=dn,$t._dbInfo=Ht;for(var vn=0;vn<un.length;vn++){var wn=un[vn];wn!==$t&&(wn._dbInfo.db=Ht.db,wn._dbInfo.version=Ht.version)}})}function yi(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){Rn(Ht._dbInfo,Kt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName).get(Ft);cn.onsuccess=function(){var un=cn.result;un===void 0&&(un=null),Pn(un)&&(un=Ln(un)),Yt(un)},cn.onerror=function(){Qt(cn.error)}}catch(un){Qt(un)}})}).catch(Qt)});return ln(Zt,$t),Zt}function wi(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ht.ready().then(function(){Rn(Ht._dbInfo,Kt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName).openCursor(),un=1;cn.onsuccess=function(){var dn=cn.result;if(dn){var vn=dn.value;Pn(vn)&&(vn=Ln(vn));var wn=Ft(vn,dn.key,un++);wn!==void 0?Yt(wn):dn.continue()}else Yt()},cn.onerror=function(){Qt(cn.error)}}catch(dn){Qt(dn)}})}).catch(Qt)});return ln(Zt,$t),Zt}function bi(Ft,$t,Ht){var Zt=this;Ft=yn(Ft);var Yt=new an(function(Qt,on){var sn;Zt.ready().then(function(){return sn=Zt._dbInfo,Gt.call($t)==="[object Blob]"?pn(sn.db).then(function(cn){return cn?$t:Bn($t)}):$t}).then(function(cn){Rn(Zt._dbInfo,Vt,function(un,dn){if(un)return on(un);try{var vn=dn.objectStore(Zt._dbInfo.storeName);cn===null&&(cn=void 0);var wn=vn.put(cn,Ft);dn.oncomplete=function(){cn===void 0&&(cn=null),Qt(cn)},dn.onabort=dn.onerror=function(){var En=wn.error?wn.error:wn.transaction.error;on(En)}}catch(En){on(En)}})}).catch(on)});return ln(Yt,Ht),Yt}function xi(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){Rn(Ht._dbInfo,Vt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName).delete(Ft);sn.oncomplete=function(){Yt()},sn.onerror=function(){Qt(cn.error)},sn.onabort=function(){var un=cn.error?cn.error:cn.transaction.error;Qt(un)}}catch(un){Qt(un)}})}).catch(Qt)});return ln(Zt,$t),Zt}function Si(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){Rn($t._dbInfo,Vt,function(Qt,on){if(Qt)return Yt(Qt);try{var sn=on.objectStore($t._dbInfo.storeName).clear();on.oncomplete=function(){Zt()},on.onabort=on.onerror=function(){var cn=sn.error?sn.error:sn.transaction.error;Yt(cn)}}catch(cn){Yt(cn)}})}).catch(Yt)});return ln(Ht,Ft),Ht}function Ci(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){Rn($t._dbInfo,Kt,function(Qt,on){if(Qt)return Yt(Qt);try{var sn=on.objectStore($t._dbInfo.storeName).count();sn.onsuccess=function(){Zt(sn.result)},sn.onerror=function(){Yt(sn.error)}}catch(cn){Yt(cn)}})}).catch(Yt)});return ln(Ht,Ft),Ht}function Ei(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ft<0?Yt(null):Ht.ready().then(function(){Rn(Ht._dbInfo,Kt,function(on,sn){if(on)return Qt(on);try{var cn=sn.objectStore(Ht._dbInfo.storeName),un=!1,dn=cn.openKeyCursor();dn.onsuccess=function(){var vn=dn.result;vn?Ft===0||un?Yt(vn.key):(un=!0,vn.advance(Ft)):Yt(null)},dn.onerror=function(){Qt(dn.error)}}catch(vn){Qt(vn)}})}).catch(Qt)});return ln(Zt,$t),Zt}function ki(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){Rn($t._dbInfo,Kt,function(Qt,on){if(Qt)return Yt(Qt);try{var sn=on.objectStore($t._dbInfo.storeName).openKeyCursor(),cn=[];sn.onsuccess=function(){var un=sn.result;un?(cn.push(un.key),un.continue()):Zt(cn)},sn.onerror=function(){Yt(sn.error)}}catch(un){Yt(un)}})}).catch(Yt)});return ln(Ht,Ft),Ht}function zi(Ft,$t){$t=bn.apply(this,arguments);var Ht=this.config();(Ft=typeof Ft!="function"&&Ft||{}).name||(Ft.name=Ft.name||Ht.name,Ft.storeName=Ft.storeName||Ht.storeName);var Zt,Yt=this;if(Ft.name){var Qt=Ft.name===Ht.name&&Yt._dbInfo.db?an.resolve(Yt._dbInfo.db):zn(Ft).then(function(on){var sn=qt[Ft.name],cn=sn.forages;sn.db=on;for(var un=0;un<cn.length;un++)cn[un]._dbInfo.db=on;return on});Zt=Ft.storeName?Qt.then(function(on){if(on.objectStoreNames.contains(Ft.storeName)){var sn=on.version+1;fn(Ft);var cn=qt[Ft.name],un=cn.forages;on.close();for(var dn=0;dn<un.length;dn++){var vn=un[dn];vn._dbInfo.db=null,vn._dbInfo.version=sn}return new an(function(wn,En){var kn=tn.open(Ft.name,sn);kn.onerror=function(In){kn.result.close(),En(In)},kn.onupgradeneeded=function(){kn.result.deleteObjectStore(Ft.storeName)},kn.onsuccess=function(){var In=kn.result;In.close(),wn(In)}}).then(function(wn){cn.db=wn;for(var En=0;En<un.length;En++){var kn=un[En];kn._dbInfo.db=wn,xn(kn._dbInfo)}}).catch(function(wn){throw(Sn(Ft,wn)||an.resolve()).catch(function(){}),wn})}}):Qt.then(function(on){fn(Ft);var sn=qt[Ft.name],cn=sn.forages;on.close();for(var un=0;un<cn.length;un++)cn[un]._dbInfo.db=null;return new an(function(dn,vn){var wn=tn.deleteDatabase(Ft.name);wn.onerror=function(){var En=wn.result;En&&En.close(),vn(wn.error)},wn.onblocked=function(){console.warn('dropInstance blocked for database "'+Ft.name+'" until all open connections are closed')},wn.onsuccess=function(){var En=wn.result;En&&En.close(),dn(En)}}).then(function(dn){sn.db=dn;for(var vn=0;vn<cn.length;vn++)xn(cn[vn]._dbInfo)}).catch(function(dn){throw(Sn(Ft,dn)||an.resolve()).catch(function(){}),dn})})}else Zt=an.reject("Invalid arguments");return ln(Zt,$t),Zt}var _i={_driver:"asyncStorage",_initStorage:vi,_support:en(),iterate:wi,getItem:yi,setItem:bi,removeItem:xi,clear:Si,length:Ci,key:Ei,keys:ki,dropInstance:zi};function Mi(){return typeof openDatabase=="function"}var Nn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Li="~~local_forage_type~",Jn=/^~~local_forage_type~([^~]+)~/,jn="__lfsc__:",$n=jn.length,Hn="arbf",qn="blob",Zn="si08",Qn="ui08",ei="uic8",ti="si16",ni="si32",ii="ur16",oi="ui32",ri="fl32",si="fl64",ai=$n+Hn.length,ci=Object.prototype.toString;function ui(Ft){var $t,Ht,Zt,Yt,Qt,on=.75*Ft.length,sn=Ft.length,cn=0;Ft[Ft.length-1]==="="&&(on--,Ft[Ft.length-2]==="="&&on--);var un=new ArrayBuffer(on),dn=new Uint8Array(un);for($t=0;$t<sn;$t+=4)Ht=Nn.indexOf(Ft[$t]),Zt=Nn.indexOf(Ft[$t+1]),Yt=Nn.indexOf(Ft[$t+2]),Qt=Nn.indexOf(Ft[$t+3]),dn[cn++]=Ht<<2|Zt>>4,dn[cn++]=(15&Zt)<<4|Yt>>2,dn[cn++]=(3&Yt)<<6|63&Qt;return un}function Vn(Ft){var $t,Ht=new Uint8Array(Ft),Zt="";for($t=0;$t<Ht.length;$t+=3)Zt+=Nn[Ht[$t]>>2],Zt+=Nn[(3&Ht[$t])<<4|Ht[$t+1]>>4],Zt+=Nn[(15&Ht[$t+1])<<2|Ht[$t+2]>>6],Zt+=Nn[63&Ht[$t+2]];return Ht.length%3==2?Zt=Zt.substring(0,Zt.length-1)+"=":Ht.length%3==1&&(Zt=Zt.substring(0,Zt.length-2)+"=="),Zt}function Bi(Ft,$t){var Ht="";if(Ft&&(Ht=ci.call(Ft)),Ft&&(Ht==="[object ArrayBuffer]"||Ft.buffer&&ci.call(Ft.buffer)==="[object ArrayBuffer]")){var Zt,Yt=jn;Ft instanceof ArrayBuffer?(Zt=Ft,Yt+=Hn):(Zt=Ft.buffer,Ht==="[object Int8Array]"?Yt+=Zn:Ht==="[object Uint8Array]"?Yt+=Qn:Ht==="[object Uint8ClampedArray]"?Yt+=ei:Ht==="[object Int16Array]"?Yt+=ti:Ht==="[object Uint16Array]"?Yt+=ii:Ht==="[object Int32Array]"?Yt+=ni:Ht==="[object Uint32Array]"?Yt+=oi:Ht==="[object Float32Array]"?Yt+=ri:Ht==="[object Float64Array]"?Yt+=si:$t(new Error("Failed to get type for BinaryArray"))),$t(Yt+Vn(Zt))}else if(Ht==="[object Blob]"){var Qt=new FileReader;Qt.onload=function(){var on=Li+Ft.type+"~"+Vn(this.result);$t(jn+qn+on)},Qt.readAsArrayBuffer(Ft)}else try{$t(JSON.stringify(Ft))}catch(on){console.error("Couldn't convert value into a JSON string: ",Ft),$t(null,on)}}function Ii(Ft){if(Ft.substring(0,$n)!==jn)return JSON.parse(Ft);var $t,Ht=Ft.substring(ai),Zt=Ft.substring($n,ai);if(Zt===qn&&Jn.test(Ht)){var Yt=Ht.match(Jn);$t=Yt[1],Ht=Ht.substring(Yt[0].length)}var Qt=ui(Ht);switch(Zt){case Hn:return Qt;case qn:return rn([Qt],{type:$t});case Zn:return new Int8Array(Qt);case Qn:return new Uint8Array(Qt);case ei:return new Uint8ClampedArray(Qt);case ti:return new Int16Array(Qt);case ii:return new Uint16Array(Qt);case ni:return new Int32Array(Qt);case oi:return new Uint32Array(Qt);case ri:return new Float32Array(Qt);case si:return new Float64Array(Qt);default:throw new Error("Unkown type: "+Zt)}}var Xn={serialize:Bi,deserialize:Ii,stringToBuffer:ui,bufferToString:Vn};function li(Ft,$t,Ht,Zt){Ft.executeSql("CREATE TABLE IF NOT EXISTS "+$t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],Ht,Zt)}function Pi(Ft){var $t=this,Ht={db:null};if(Ft)for(var Zt in Ft)Ht[Zt]=typeof Ft[Zt]!="string"?Ft[Zt].toString():Ft[Zt];var Yt=new an(function(Qt,on){try{Ht.db=openDatabase(Ht.name,String(Ht.version),Ht.description,Ht.size)}catch(sn){return on(sn)}Ht.db.transaction(function(sn){li(sn,Ht,function(){$t._dbInfo=Ht,Qt()},function(cn,un){on(un)})},on)});return Ht.serializer=Xn,Yt}function Dn(Ft,$t,Ht,Zt,Yt,Qt){Ft.executeSql(Ht,Zt,Yt,function(on,sn){sn.code===sn.SYNTAX_ERR?on.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[$t.storeName],function(cn,un){un.rows.length?Qt(cn,sn):li(cn,$t,function(){cn.executeSql(Ht,Zt,Yt,Qt)},Qt)},Qt):Qt(on,sn)},Qt)}function Ri(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"SELECT * FROM "+on.storeName+" WHERE key = ? LIMIT 1",[Ft],function(cn,un){var dn=un.rows.length?un.rows.item(0).value:null;dn&&(dn=on.serializer.deserialize(dn)),Yt(dn)},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function Ni(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"SELECT * FROM "+on.storeName,[],function(cn,un){for(var dn=un.rows,vn=dn.length,wn=0;wn<vn;wn++){var En=dn.item(wn),kn=En.value;if(kn&&(kn=on.serializer.deserialize(kn)),(kn=Ft(kn,En.key,wn+1))!==void 0)return void Yt(kn)}Yt()},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function hi(Ft,$t,Ht,Zt){var Yt=this;Ft=yn(Ft);var Qt=new an(function(on,sn){Yt.ready().then(function(){$t===void 0&&($t=null);var cn=$t,un=Yt._dbInfo;un.serializer.serialize($t,function(dn,vn){vn?sn(vn):un.db.transaction(function(wn){Dn(wn,un,"INSERT OR REPLACE INTO "+un.storeName+" (key, value) VALUES (?, ?)",[Ft,dn],function(){on(cn)},function(En,kn){sn(kn)})},function(wn){if(wn.code===wn.QUOTA_ERR){if(Zt>0)return void on(hi.apply(Yt,[Ft,cn,Ht,Zt-1]));sn(wn)}})})}).catch(sn)});return ln(Qt,Ht),Qt}function Di(Ft,$t,Ht){return hi.apply(this,[Ft,$t,Ht,1])}function Ai(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"DELETE FROM "+on.storeName+" WHERE key = ?",[Ft],function(){Yt()},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function Ti(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){var Qt=$t._dbInfo;Qt.db.transaction(function(on){Dn(on,Qt,"DELETE FROM "+Qt.storeName,[],function(){Zt()},function(sn,cn){Yt(cn)})})}).catch(Yt)});return ln(Ht,Ft),Ht}function Oi(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){var Qt=$t._dbInfo;Qt.db.transaction(function(on){Dn(on,Qt,"SELECT COUNT(key) as c FROM "+Qt.storeName,[],function(sn,cn){var un=cn.rows.item(0).c;Zt(un)},function(sn,cn){Yt(cn)})})}).catch(Yt)});return ln(Ht,Ft),Ht}function ji(Ft,$t){var Ht=this,Zt=new an(function(Yt,Qt){Ht.ready().then(function(){var on=Ht._dbInfo;on.db.transaction(function(sn){Dn(sn,on,"SELECT key FROM "+on.storeName+" WHERE id = ? LIMIT 1",[Ft+1],function(cn,un){var dn=un.rows.length?un.rows.item(0).key:null;Yt(dn)},function(cn,un){Qt(un)})})}).catch(Qt)});return ln(Zt,$t),Zt}function Ui(Ft){var $t=this,Ht=new an(function(Zt,Yt){$t.ready().then(function(){var Qt=$t._dbInfo;Qt.db.transaction(function(on){Dn(on,Qt,"SELECT key FROM "+Qt.storeName,[],function(sn,cn){for(var un=[],dn=0;dn<cn.rows.length;dn++)un.push(cn.rows.item(dn).key);Zt(un)},function(sn,cn){Yt(cn)})})}).catch(Yt)});return ln(Ht,Ft),Ht}function Fi(Ft){return new an(function($t,Ht){Ft.transaction(function(Zt){Zt.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(Yt,Qt){for(var on=[],sn=0;sn<Qt.rows.length;sn++)on.push(Qt.rows.item(sn).name);$t({db:Ft,storeNames:on})},function(Yt,Qt){Ht(Qt)})},function(Zt){Ht(Zt)})})}function Wi(Ft,$t){$t=bn.apply(this,arguments);var Ht=this.config();(Ft=typeof Ft!="function"&&Ft||{}).name||(Ft.name=Ft.name||Ht.name,Ft.storeName=Ft.storeName||Ht.storeName);var Zt,Yt=this;return ln(Zt=Ft.name?new an(function(Qt){var on;on=Ft.name===Ht.name?Yt._dbInfo.db:openDatabase(Ft.name,"","",0),Ft.storeName?Qt({db:on,storeNames:[Ft.storeName]}):Qt(Fi(on))}).then(function(Qt){return new an(function(on,sn){Qt.db.transaction(function(cn){function un(En){return new an(function(kn,In){cn.executeSql("DROP TABLE IF EXISTS "+En,[],function(){kn()},function(mi,On){In(On)})})}for(var dn=[],vn=0,wn=Qt.storeNames.length;vn<wn;vn++)dn.push(un(Qt.storeNames[vn]));an.all(dn).then(function(){on()}).catch(function(En){sn(En)})},function(cn){sn(cn)})})}):an.reject("Invalid arguments"),$t),Zt}var $i={_driver:"webSQLStorage",_initStorage:Pi,_support:Mi(),iterate:Ni,getItem:Ri,setItem:Di,removeItem:Ai,clear:Ti,length:Oi,key:ji,keys:Ui,dropInstance:Wi};function Hi(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function di(Ft,$t){var Ht=Ft.name+"/";return Ft.storeName!==$t.storeName&&(Ht+=Ft.storeName+"/"),Ht}function qi(){var Ft="_localforage_support_test";try{return localStorage.setItem(Ft,!0),localStorage.removeItem(Ft),!1}catch{return!0}}function Vi(){return!qi()||localStorage.length>0}function Xi(Ft){var $t=this,Ht={};if(Ft)for(var Zt in Ft)Ht[Zt]=Ft[Zt];return Ht.keyPrefix=di(Ft,$t._defaultConfig),Vi()?($t._dbInfo=Ht,Ht.serializer=Xn,an.resolve()):an.reject()}function Gi(Ft){var $t=this,Ht=$t.ready().then(function(){for(var Zt=$t._dbInfo.keyPrefix,Yt=localStorage.length-1;Yt>=0;Yt--){var Qt=localStorage.key(Yt);Qt.indexOf(Zt)===0&&localStorage.removeItem(Qt)}});return ln(Ht,Ft),Ht}function Ki(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=Ht.ready().then(function(){var Yt=Ht._dbInfo,Qt=localStorage.getItem(Yt.keyPrefix+Ft);return Qt&&(Qt=Yt.serializer.deserialize(Qt)),Qt});return ln(Zt,$t),Zt}function Yi(Ft,$t){var Ht=this,Zt=Ht.ready().then(function(){for(var Yt=Ht._dbInfo,Qt=Yt.keyPrefix,on=Qt.length,sn=localStorage.length,cn=1,un=0;un<sn;un++){var dn=localStorage.key(un);if(dn.indexOf(Qt)===0){var vn=localStorage.getItem(dn);if(vn&&(vn=Yt.serializer.deserialize(vn)),(vn=Ft(vn,dn.substring(on),cn++))!==void 0)return vn}}});return ln(Zt,$t),Zt}function Ji(Ft,$t){var Ht=this,Zt=Ht.ready().then(function(){var Yt,Qt=Ht._dbInfo;try{Yt=localStorage.key(Ft)}catch{Yt=null}return Yt&&(Yt=Yt.substring(Qt.keyPrefix.length)),Yt});return ln(Zt,$t),Zt}function Zi(Ft){var $t=this,Ht=$t.ready().then(function(){for(var Zt=$t._dbInfo,Yt=localStorage.length,Qt=[],on=0;on<Yt;on++){var sn=localStorage.key(on);sn.indexOf(Zt.keyPrefix)===0&&Qt.push(sn.substring(Zt.keyPrefix.length))}return Qt});return ln(Ht,Ft),Ht}function Qi(Ft){var $t=this.keys().then(function(Ht){return Ht.length});return ln($t,Ft),$t}function eo(Ft,$t){var Ht=this;Ft=yn(Ft);var Zt=Ht.ready().then(function(){var Yt=Ht._dbInfo;localStorage.removeItem(Yt.keyPrefix+Ft)});return ln(Zt,$t),Zt}function to(Ft,$t,Ht){var Zt=this;Ft=yn(Ft);var Yt=Zt.ready().then(function(){$t===void 0&&($t=null);var Qt=$t;return new an(function(on,sn){var cn=Zt._dbInfo;cn.serializer.serialize($t,function(un,dn){if(dn)sn(dn);else try{localStorage.setItem(cn.keyPrefix+Ft,un),on(Qt)}catch(vn){vn.name!=="QuotaExceededError"&&vn.name!=="NS_ERROR_DOM_QUOTA_REACHED"||sn(vn),sn(vn)}})})});return ln(Yt,Ht),Yt}function no(Ft,$t){if($t=bn.apply(this,arguments),!(Ft=typeof Ft!="function"&&Ft||{}).name){var Ht=this.config();Ft.name=Ft.name||Ht.name,Ft.storeName=Ft.storeName||Ht.storeName}var Zt,Yt=this;return ln(Zt=Ft.name?new an(function(Qt){Ft.storeName?Qt(di(Ft,Yt._defaultConfig)):Qt(Ft.name+"/")}).then(function(Qt){for(var on=localStorage.length-1;on>=0;on--){var sn=localStorage.key(on);sn.indexOf(Qt)===0&&localStorage.removeItem(sn)}}):an.reject("Invalid arguments"),$t),Zt}var io={_driver:"localStorageWrapper",_initStorage:Xi,_support:Hi(),iterate:Yi,getItem:Ki,setItem:to,removeItem:eo,clear:Gi,length:Qi,key:Ji,keys:Zi,dropInstance:no},oo=function(Ft,$t){return Ft===$t||typeof Ft=="number"&&typeof $t=="number"&&isNaN(Ft)&&isNaN($t)},ro=function(Ft,$t){for(var Ht=Ft.length,Zt=0;Zt<Ht;){if(oo(Ft[Zt],$t))return!0;Zt++}return!1},pi=Array.isArray||function(Ft){return Object.prototype.toString.call(Ft)==="[object Array]"},Tn={},fi={},An={INDEXEDDB:_i,WEBSQL:$i,LOCALSTORAGE:io},so=[An.INDEXEDDB._driver,An.WEBSQL._driver,An.LOCALSTORAGE._driver],Un=["dropInstance"],Gn=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Un),ao={description:"",driver:so.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function co(Ft,$t){Ft[$t]=function(){var Ht=arguments;return Ft.ready().then(function(){return Ft[$t].apply(Ft,Ht)})}}function Kn(){for(var Ft=1;Ft<arguments.length;Ft++){var $t=arguments[Ft];if($t)for(var Ht in $t)$t.hasOwnProperty(Ht)&&(pi($t[Ht])?arguments[0][Ht]=$t[Ht].slice():arguments[0][Ht]=$t[Ht])}return arguments[0]}var uo=new(function(){function Ft($t){for(var Ht in Wt(this,Ft),An)if(An.hasOwnProperty(Ht)){var Zt=An[Ht],Yt=Zt._driver;this[Ht]=Yt,Tn[Yt]||this.defineDriver(Zt)}this._defaultConfig=Kn({},ao),this._config=Kn({},this._defaultConfig,$t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return Ft.prototype.config=function($t){if(($t===void 0?"undefined":Ut($t))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var Ht in $t){if(Ht==="storeName"&&($t[Ht]=$t[Ht].replace(/\W/g,"_")),Ht==="version"&&typeof $t[Ht]!="number")return new Error("Database version must be a number.");this._config[Ht]=$t[Ht]}return!("driver"in $t)||!$t.driver||this.setDriver(this._config.driver)}return typeof $t=="string"?this._config[$t]:this._config},Ft.prototype.defineDriver=function($t,Ht,Zt){var Yt=new an(function(Qt,on){try{var sn=$t._driver,cn=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!$t._driver)return void on(cn);for(var un=Gn.concat("_initStorage"),dn=0,vn=un.length;dn<vn;dn++){var wn=un[dn];if((!ro(Un,wn)||$t[wn])&&typeof $t[wn]!="function")return void on(cn)}(function(){for(var kn=function(lo){return function(){var ho=new Error("Method "+lo+" is not implemented by the current driver"),gi=an.reject(ho);return ln(gi,arguments[arguments.length-1]),gi}},In=0,mi=Un.length;In<mi;In++){var On=Un[In];$t[On]||($t[On]=kn(On))}})();var En=function(kn){Tn[sn]&&console.info("Redefining LocalForage driver: "+sn),Tn[sn]=$t,fi[sn]=kn,Qt()};"_support"in $t?$t._support&&typeof $t._support=="function"?$t._support().then(En,on):En(!!$t._support):En(!0)}catch(kn){on(kn)}});return hn(Yt,Ht,Zt),Yt},Ft.prototype.driver=function(){return this._driver||null},Ft.prototype.getDriver=function($t,Ht,Zt){var Yt=Tn[$t]?an.resolve(Tn[$t]):an.reject(new Error("Driver not found."));return hn(Yt,Ht,Zt),Yt},Ft.prototype.getSerializer=function($t){var Ht=an.resolve(Xn);return hn(Ht,$t),Ht},Ft.prototype.ready=function($t){var Ht=this,Zt=Ht._driverSet.then(function(){return Ht._ready===null&&(Ht._ready=Ht._initDriver()),Ht._ready});return hn(Zt,$t,$t),Zt},Ft.prototype.setDriver=function($t,Ht,Zt){var Yt=this;pi($t)||($t=[$t]);var Qt=this._getSupportedDrivers($t);function on(){Yt._config.driver=Yt.driver()}function sn(dn){return Yt._extend(dn),on(),Yt._ready=Yt._initStorage(Yt._config),Yt._ready}function cn(dn){return function(){var vn=0;function wn(){for(;vn<dn.length;){var En=dn[vn];return vn++,Yt._dbInfo=null,Yt._ready=null,Yt.getDriver(En).then(sn).catch(wn)}on();var kn=new Error("No available storage method found.");return Yt._driverSet=an.reject(kn),Yt._driverSet}return wn()}}var un=this._driverSet!==null?this._driverSet.catch(function(){return an.resolve()}):an.resolve();return this._driverSet=un.then(function(){var dn=Qt[0];return Yt._dbInfo=null,Yt._ready=null,Yt.getDriver(dn).then(function(vn){Yt._driver=vn._driver,on(),Yt._wrapLibraryMethodsWithReady(),Yt._initDriver=cn(Qt)})}).catch(function(){on();var dn=new Error("No available storage method found.");return Yt._driverSet=an.reject(dn),Yt._driverSet}),hn(this._driverSet,Ht,Zt),this._driverSet},Ft.prototype.supports=function($t){return!!fi[$t]},Ft.prototype._extend=function($t){Kn(this,$t)},Ft.prototype._getSupportedDrivers=function($t){for(var Ht=[],Zt=0,Yt=$t.length;Zt<Yt;Zt++){var Qt=$t[Zt];this.supports(Qt)&&Ht.push(Qt)}return Ht},Ft.prototype._wrapLibraryMethodsWithReady=function(){for(var $t=0,Ht=Gn.length;$t<Ht;$t++)co(this,Gn[$t])},Ft.prototype.createInstance=function($t){return new Ft($t)},Ft}());Ot.exports=uo},{3:3}]},{},[4])(4),ge={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("vue"),Qe=require("@hprose/rpc-core"),Jt=require("@hprose/io"),yi=require("@hprose/rpc-html5"),wi={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),l=Math.max(Math.min(this.getCurrentDragPercentage(e),r),i);let w=[t,t+1],y=this.panes[w[0]]||null,C=this.panes[w[1]]||null;const x=y.max<100&&l>=y.max+n.prevPanesSize,M=C.max<100&&l<=100-(C.max+this.sumNextPanesSize(t+1));if(x||M)x?(y.size=y.max,C.size=Math.max(100-y.max-n.prevPanesSize-n.nextPanesSize,0)):(y.size=Math.max(100-C.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),C.size=C.max);else{if(this.pushOtherPanes){const _=this.doPushOtherPanes(n,l);if(!_)return;({sums:n,panesToResize:w}=_),y=this.panes[w[0]]||null,C=this.panes[w[1]]||null}y!==null&&(y.size=Math.min(Math.max(l-n.prevPanesSize-n.prevReachedMinPanes,y.min),y.max)),C!==null&&(C.size=Math.min(Math.max(100-l-n.nextPanesSize-n.nextReachedMinPanes,C.min),C.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,l)=>{l>i[0]&&l<=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,l)=>{l>0&&l<=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,l)=>{l>n&&l<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,l)=>{l<this.panesCount-1&&l>=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=l=>this.onMouseDown(l,i),typeof window!="undefined"&&"ontouchstart"in window&&(r.ontouchstart=l=>this.onMouseDown(l,i)),r.onclick=l=>this.onSplitterClick(l,i+1)),this.dblClickSplitter&&(r.ondblclick=l=>this.onSplitterDblClick(l,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,l)=>r.index=l),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(l=>{e-=l.size,l.size!==null&&i++,l.size>=l.max&&t.push(l.id),l.size<=l.min&&n.push(l.id)});let r=100;e>.1&&(this.panes.forEach(l=>{l.size===null&&(l.size=Math.max(Math.min(e/(this.panesCount-i),l.max),l.min)),r-=l.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(l=>{n-=l.size,l.size>=l.max&&i.push(l.id),l.size<=l.min&&r.push(l.id)}),Math.abs(n)<.1||(this.panes.forEach(l=>{e&&e.givenSize!==null&&e.id===l.id||(l.size=Math.max(Math.min(t,l.max),l.min)),n-=l.size,l.size>=l.max&&i.push(l.id),l.size<=l.min&&r.push(l.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 l=Math.max(Math.min(r.size+i,r.max),r.min);e-=l-r.size,r.size=l}else if(!n.includes(r.id)){const l=Math.max(Math.min(r.size+i,r.max),r.min);e-=l-r.size,r.size=l}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"},et={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})}}};et.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=w=>l.onPaneClick(w,e._.uid)),style:g.normalizeStyle(e.style)},[g.renderSlot(e.$slots,"default")],4)},et.__file="src/controls/splitpanes/pane.vue";var pe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tt(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 bi={exports:{}},Zt=bi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(b,c){var h=b[0],d=b[1],u=b[2],p=b[3];d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[0]-680876936|0)<<7|h>>>25)+d|0)&d|~h&u)+c[1]-389564586|0)<<12|p>>>20)+h|0)&h|~p&d)+c[2]+606105819|0)<<17|u>>>15)+p|0)&p|~u&h)+c[3]-1044525330|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[4]-176418897|0)<<7|h>>>25)+d|0)&d|~h&u)+c[5]+1200080426|0)<<12|p>>>20)+h|0)&h|~p&d)+c[6]-1473231341|0)<<17|u>>>15)+p|0)&p|~u&h)+c[7]-45705983|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[8]+1770035416|0)<<7|h>>>25)+d|0)&d|~h&u)+c[9]-1958414417|0)<<12|p>>>20)+h|0)&h|~p&d)+c[10]-42063|0)<<17|u>>>15)+p|0)&p|~u&h)+c[11]-1990404162|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&u|~d&p)+c[12]+1804603682|0)<<7|h>>>25)+d|0)&d|~h&u)+c[13]-40341101|0)<<12|p>>>20)+h|0)&h|~p&d)+c[14]-1502002290|0)<<17|u>>>15)+p|0)&p|~u&h)+c[15]+1236535329|0)<<22|d>>>10)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[1]-165796510|0)<<5|h>>>27)+d|0)&u|d&~u)+c[6]-1069501632|0)<<9|p>>>23)+h|0)&d|h&~d)+c[11]+643717713|0)<<14|u>>>18)+p|0)&h|p&~h)+c[0]-373897302|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[5]-701558691|0)<<5|h>>>27)+d|0)&u|d&~u)+c[10]+38016083|0)<<9|p>>>23)+h|0)&d|h&~d)+c[15]-660478335|0)<<14|u>>>18)+p|0)&h|p&~h)+c[4]-405537848|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[9]+568446438|0)<<5|h>>>27)+d|0)&u|d&~u)+c[14]-1019803690|0)<<9|p>>>23)+h|0)&d|h&~d)+c[3]-187363961|0)<<14|u>>>18)+p|0)&h|p&~h)+c[8]+1163531501|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d&p|u&~p)+c[13]-1444681467|0)<<5|h>>>27)+d|0)&u|d&~u)+c[2]-51403784|0)<<9|p>>>23)+h|0)&d|h&~d)+c[7]+1735328473|0)<<14|u>>>18)+p|0)&h|p&~h)+c[12]-1926607734|0)<<20|d>>>12)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[5]-378558|0)<<4|h>>>28)+d|0)^d^u)+c[8]-2022574463|0)<<11|p>>>21)+h|0)^h^d)+c[11]+1839030562|0)<<16|u>>>16)+p|0)^p^h)+c[14]-35309556|0)<<23|d>>>9)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[1]-1530992060|0)<<4|h>>>28)+d|0)^d^u)+c[4]+1272893353|0)<<11|p>>>21)+h|0)^h^d)+c[7]-155497632|0)<<16|u>>>16)+p|0)^p^h)+c[10]-1094730640|0)<<23|d>>>9)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[13]+681279174|0)<<4|h>>>28)+d|0)^d^u)+c[0]-358537222|0)<<11|p>>>21)+h|0)^h^d)+c[3]-722521979|0)<<16|u>>>16)+p|0)^p^h)+c[6]+76029189|0)<<23|d>>>9)+u|0,d=((d+=((u=((u+=((p=((p+=((h=((h+=(d^u^p)+c[9]-640364487|0)<<4|h>>>28)+d|0)^d^u)+c[12]-421815835|0)<<11|p>>>21)+h|0)^h^d)+c[15]+530742520|0)<<16|u>>>16)+p|0)^p^h)+c[2]-995338651|0)<<23|d>>>9)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[0]-198630844|0)<<6|h>>>26)+d|0)|~u))+c[7]+1126891415|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[14]-1416354905|0)<<15|u>>>17)+p|0)|~h))+c[5]-57434055|0)<<21|d>>>11)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[12]+1700485571|0)<<6|h>>>26)+d|0)|~u))+c[3]-1894986606|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[10]-1051523|0)<<15|u>>>17)+p|0)|~h))+c[1]-2054922799|0)<<21|d>>>11)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[8]+1873313359|0)<<6|h>>>26)+d|0)|~u))+c[15]-30611744|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[6]-1560198380|0)<<15|u>>>17)+p|0)|~h))+c[13]+1309151649|0)<<21|d>>>11)+u|0,d=((d+=((p=((p+=(d^((h=((h+=(u^(d|~p))+c[4]-145523070|0)<<6|h>>>26)+d|0)|~u))+c[11]-1120210379|0)<<10|p>>>22)+h|0)^((u=((u+=(h^(p|~d))+c[2]+718787259|0)<<15|u>>>17)+p|0)|~h))+c[9]-343485551|0)<<21|d>>>11)+u|0,b[0]=h+b[0]|0,b[1]=d+b[1]|0,b[2]=u+b[2]|0,b[3]=p+b[3]|0}function i(b){var c,h=[];for(c=0;c<64;c+=4)h[c>>2]=b.charCodeAt(c)+(b.charCodeAt(c+1)<<8)+(b.charCodeAt(c+2)<<16)+(b.charCodeAt(c+3)<<24);return h}function r(b){var c,h=[];for(c=0;c<64;c+=4)h[c>>2]=b[c]+(b[c+1]<<8)+(b[c+2]<<16)+(b[c+3]<<24);return h}function l(b){var c,h,d,u,p,P,B=b.length,I=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(I,i(b.substring(c-64,c)));for(h=(b=b.substring(c-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<h;c+=1)d[c>>2]|=b.charCodeAt(c)<<(c%4<<3);if(d[c>>2]|=128<<(c%4<<3),c>55)for(n(I,d),c=0;c<16;c+=1)d[c]=0;return u=(u=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(u[2],16),P=parseInt(u[1],16)||0,d[14]=p,d[15]=P,n(I,d),I}function w(b){var c,h,d,u,p,P,B=b.length,I=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(I,r(b.subarray(c-64,c)));for(h=(b=c-64<B?b.subarray(c-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<h;c+=1)d[c>>2]|=b[c]<<(c%4<<3);if(d[c>>2]|=128<<(c%4<<3),c>55)for(n(I,d),c=0;c<16;c+=1)d[c]=0;return u=(u=8*B).toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(u[2],16),P=parseInt(u[1],16)||0,d[14]=p,d[15]=P,n(I,d),I}function y(b){var c,h="";for(c=0;c<4;c+=1)h+=t[b>>8*c+4&15]+t[b>>8*c&15];return h}function C(b){var c;for(c=0;c<b.length;c+=1)b[c]=y(b[c]);return b.join("")}function x(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function M(b,c){var h,d=b.length,u=new ArrayBuffer(d),p=new Uint8Array(u);for(h=0;h<d;h+=1)p[h]=b.charCodeAt(h);return c?p:u}function _(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function A(b,c,h){var d=new Uint8Array(b.byteLength+c.byteLength);return d.set(new Uint8Array(b)),d.set(new Uint8Array(c),b.byteLength),h?d:d.buffer}function O(b){var c,h=[],d=b.length;for(c=0;c<d-1;c+=2)h.push(parseInt(b.substr(c,2),16));return String.fromCharCode.apply(String,h)}function R(){this.reset()}return C(l("hello")),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function b(c,h){return(c=0|c||0)<0?Math.max(c+h,0):Math.min(c,h)}ArrayBuffer.prototype.slice=function(c,h){var d,u,p,P,B=this.byteLength,I=b(c,B),U=B;return h!==e&&(U=b(h,B)),I>U?new ArrayBuffer(0):(d=U-I,u=new ArrayBuffer(d),p=new Uint8Array(u),P=new Uint8Array(this,I,d),p.set(P),u)}}(),R.prototype.append=function(b){return this.appendBinary(x(b)),this},R.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var c,h=this._buff.length;for(c=64;c<=h;c+=64)n(this._hash,i(this._buff.substring(c-64,c)));return this._buff=this._buff.substring(c-64),this},R.prototype.end=function(b){var c,h,d=this._buff,u=d.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(c=0;c<u;c+=1)p[c>>2]|=d.charCodeAt(c)<<(c%4<<3);return this._finish(p,u),h=C(this._hash),b&&(h=O(h)),this.reset(),h},R.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},R.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},R.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},R.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},R.prototype._finish=function(b,c){var h,d,u,p=c;if(b[p>>2]|=128<<(p%4<<3),p>55)for(n(this._hash,b),p=0;p<16;p+=1)b[p]=0;h=(h=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(h[2],16),u=parseInt(h[1],16)||0,b[14]=d,b[15]=u,n(this._hash,b)},R.hash=function(b,c){return R.hashBinary(x(b),c)},R.hashBinary=function(b,c){var h=C(l(b));return c?O(h):h},R.ArrayBuffer=function(){this.reset()},R.ArrayBuffer.prototype.append=function(b){var c,h=A(this._buff.buffer,b,!0),d=h.length;for(this._length+=b.byteLength,c=64;c<=d;c+=64)n(this._hash,r(h.subarray(c-64,c)));return this._buff=c-64<d?new Uint8Array(h.buffer.slice(c-64)):new Uint8Array(0),this},R.ArrayBuffer.prototype.end=function(b){var c,h,d=this._buff,u=d.length,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(c=0;c<u;c+=1)p[c>>2]|=d[c]<<(c%4<<3);return this._finish(p,u),h=C(this._hash),b&&(h=O(h)),this.reset(),h},R.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},R.ArrayBuffer.prototype.getState=function(){var b=R.prototype.getState.call(this);return b.buff=_(b.buff),b},R.ArrayBuffer.prototype.setState=function(b){return b.buff=M(b.buff,!0),R.prototype.setState.call(this,b)},R.ArrayBuffer.prototype.destroy=R.prototype.destroy,R.ArrayBuffer.prototype._finish=R.prototype._finish,R.ArrayBuffer.hash=function(b,c){var h=C(w(new Uint8Array(b)));return c?O(h):h},R}();const nt=[];class ae{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){ae.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 l=new window.ActiveXObject("WScript.Shell");l!=null&&l.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 l=new window.ActiveXObject("WScript.Shell");l!=null&&l.SendKeys("{F11}")}}}static requestFullScreen(t){let n=t;n||(n=window.document.documentElement);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!!ae.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=ae.isFullScreen();t(i)}):document.addEventListener("MSFullscreenChange",function(){const i=ae.isFullScreen();t(i)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(nt.indexOf(n)!==-1)return;nt.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ae.stringifyCircularHandler);return nt.length=0,n}static jsonParse(t){const n=ae.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,l=t,w=new Zt.ArrayBuffer,y=new FileReader;y.onload=function(C){w.append(C.target?.result);const x=w.end();n({isOK:!0,data:x})},y.onerror=function(){const C="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(C),n({isOK:!1,data:C})},function(){const C=2097152>=l.size?l.size:2097152;y.readAsArrayBuffer(r.call(l,0,C))}()}static MD5(t,n=!1){return Zt.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 ke{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 it{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:l,expire:w}=r;if(w===null||w>=Date.now())return l;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 l=n[i].split("=");if(l[0]===this.getKey(t))return l[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 Si=new it("",localStorage);function ze(){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 me;function ot(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 Me(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function rt(e){let t=e.toLowerCase();if(Me(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 st(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 Qt(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 at(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 ct(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,(me=exports.EnumColor||(exports.EnumColor={}))[me.RGBA=0]="RGBA",me[me.Hex=1]="Hex",me[me.Hsla=2]="Hsla";const ge=ct(),X={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged"},ut=(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)};function en(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}class we{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!ke.isNullOrEmpty(t)){if(we.httpTransport||(we.httpTransport=new yi.HttpTransport),this.client=new Qe.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")):ge.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;constructor(t){this.hproseClient=new we(t),this.hpProxyObj=null,this.defaultContext=new Qe.ClientContext}getClientContext(){return null}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||ge.emit(X.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");let i;return i=new Qe.ClientContext,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");return await this.hproseClient.invoke(t,i,n)}async hproseInvokeEncode(t){const n=new Jt.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 Jt.ByteStream.toString(i)}}class Ci{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 lt=new Map,N={Config:SysConfig,EventBus:ge,DefaultProxyClient:null,Axios:void 0},tn=function(e,t,n){n?N.Config.DefaultHproseAPI=n:!N.Config.DefaultHproseAPI&&N.Config.ServiceURL&&(N.Config.DefaultHproseAPI=N.Config.ServiceURL.DefaultHproseAPI),t&&(N.Axios=t),N.Config.DefaultHproseAPI&&ke.isNotEmpty(N.Config.DefaultHproseAPI)&&(N.DefaultProxyClient=new be(N.Config.DefaultHproseAPI));const i=new Ci(e,N.EventBus);N.Message=i,N.EventBus.on(X.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),N.EventBus.on(X.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),N.EventBus.on(X.CommonWarnEvent,r=>{i.warn(r)})};function nn(e){if(e&&ke.isNotEmpty(e)){if(lt.has(e))return lt.get(e);{const t=new be(e);return lt.set(e,t),t}}}const ce=new it("user",localStorage);function _e(){return ce.get("access_token")}function ht(){ce.remove("access_token"),N.User&&delete N.User}function on(){return _e()?.refresh}function dt(e,t,n,i="json",r){const l={baseURL:N.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+_e()?.token},responseType:i,cancelToken:r};if(n)for(let w in n)l.headers[w]=n[w];return t&&(l.baseURL=t),l}function ie(e,t,n,i,r="json",l){const w=dt(n,t,i,r,l);return N.Axios?.get(e,w).catch(function(y){console.log(y),N.Message?.err("\u670D\u52A1Get\u8BF7\u6C42\u9519\u8BEF\uFF1A"+e)})}function ft(e,t,n,i,r,l="json"){const w=dt(i,t,r,l),y=function(C){let x=new FormData;return C&&Object.keys(C).forEach(M=>{if(!C)return;let _=C[M];var A;_!=null&&x.append(M,(A=_)instanceof Blob?A:A.toString())}),x}(n);return N.Axios?.post(e,y,w).catch(function(C){console.log(C),N.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+e)})}var pt={exports:{}},xi=typeof window!="undefined"?window:pe!==void 0?pe:typeof self!="undefined"?self:{},Ei=function(e){if(!e)return!1;var t=ki.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window!="undefined"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},ki=Object.prototype.toString,mt=function(e){return e.replace(/^\s+|\s+$/g,"")},zi=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)Mi.call(n,i)&&(e[i]=n[i])}return e},Mi=Object.prototype.hasOwnProperty,rn=xi,_i=Ei,Li=function(e){if(!e)return{};for(var t,n={},i=mt(e).split(`
2
+ `),r=0;r<i.length;r++){var l=i[r],w=l.indexOf(":"),y=mt(l.slice(0,w)).toLowerCase(),C=mt(l.slice(w+1));n[y]===void 0?n[y]=C:(t=n[y],Object.prototype.toString.call(t)==="[object Array]"?n[y].push(C):n[y]=[n[y],C])}return n},Bi=zi;function sn(e,t,n){var i=e;return _i(t)?(n=t,typeof e=="string"&&(i={uri:e})):i=Bi(t,{uri:e}),i.callback=n,i}function oe(e,t,n){return an(t=sn(e,t,n))}function an(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(h,d,u){t||(t=!0,e.callback(h,d,u))};function i(){var h=void 0;if(h=C.response?C.response:C.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var u=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!u)return d.responseXML}catch{}return null}(C),b)try{h=JSON.parse(h)}catch{}return h}function r(h){return clearTimeout(x),h instanceof Error||(h=new Error(""+(h||"Unknown XMLHttpRequest Error"))),h.statusCode=0,n(h,c)}function l(){if(!y){var h;clearTimeout(x),h=e.useXDR&&C.status===void 0?200:C.status===1223?204:C.status;var d=c,u=null;return h!==0?(d={body:i(),statusCode:h,method:_,headers:{},url:M,rawRequest:C},C.getAllResponseHeaders&&(d.headers=Li(C.getAllResponseHeaders()))):u=new Error("Internal XMLHttpRequest Error"),n(u,d,d.body)}}var w,y,C=e.xhr||null;C||(C=e.cors||e.useXDR?new oe.XDomainRequest:new oe.XMLHttpRequest);var x,M=C.url=e.uri||e.url,_=C.method=e.method||"GET",A=e.body||e.data,O=C.headers=e.headers||{},R=!!e.sync,b=!1,c={body:void 0,headers:{},statusCode:0,method:_,url:M,rawRequest:C};if("json"in e&&e.json!==!1&&(b=!0,O.accept||O.Accept||(O.Accept="application/json"),_!=="GET"&&_!=="HEAD"&&(O["content-type"]||O["Content-Type"]||(O["Content-Type"]="application/json"),A=JSON.stringify(e.json===!0?A:e.json))),C.onreadystatechange=function(){C.readyState===4&&setTimeout(l,0)},C.onload=l,C.onerror=r,C.onprogress=function(){},C.onabort=function(){y=!0},C.ontimeout=r,C.open(_,M,!R,e.username,e.password),R||(C.withCredentials=!!e.withCredentials),!R&&e.timeout>0&&(x=setTimeout(function(){if(!y){y=!0,C.abort("timeout");var h=new Error("XMLHttpRequest timeout");h.code="ETIMEDOUT",r(h)}},e.timeout)),C.setRequestHeader)for(w in O)O.hasOwnProperty(w)&&C.setRequestHeader(w,O[w]);else if(e.headers&&!function(h){for(var d in h)if(h.hasOwnProperty(d))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(C.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(C),C.send(A||null),C}pt.exports=oe,pt.exports.default=oe,oe.XMLHttpRequest=rn.XMLHttpRequest||function(){},oe.XDomainRequest="withCredentials"in new oe.XMLHttpRequest?oe.XMLHttpRequest:rn.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=sn(t,n,i)).method=e.toUpperCase(),an(n)}});var Ii=pt.exports;const Pi=[200,201,202,204,308],Ri=[408,502,503,504];class Di{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=ct(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window!="undefined"&&(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 l=100/this.totalChunks,w=l*this.file.size,y=l*this.chunkCount,C=r.loaded/(r.total??w)*l;this.dispatch("progress",Math.min(y+C,100))}};return new Promise((i,r)=>{this.currentXhr=Ii({...t,beforeSend:n},(l,w)=>(this.currentXhr=void 0,l?r(l):i(w)))})}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&&Pi.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&&Ri.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 Ni=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)}},cn=ce.get("is_LockScreen",!1),Se={isLock:cn,lockTime:cn=="true"?ln():0};function un(e){Se.isLock=e,ce.set("is_LockScreen",e,10),e&&(ht(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function ln(){let e=3600;return N.Config.UI?.LockTime&&N.Config.UI?.LockTime>=10&&(e=N.Config.UI.LockTime),e}let gt;function vt(){clearInterval(gt),window.location.href.indexOf("/login")>0||Se.isLock||(un(!1),Se.lockTime=ln(),gt=setInterval(()=>{if(Se.lockTime--,Se.lockTime<=0)return un(!0),clearInterval(gt)},1e3))}var Ai={exports:{}},Le=Ai.exports=function e(t,n,i){function r(y,C){if(!n[y]){if(!t[y]){if(!C&&tt)return tt(y);if(l)return l(y,!0);var x=new Error("Cannot find module '"+y+"'");throw x.code="MODULE_NOT_FOUND",x}var M=n[y]={exports:{}};t[y][0].call(M.exports,function(_){var A=t[y][1][_];return r(A||_)},M,M.exports,e,t,n,i)}return n[y].exports}for(var l=tt,w=0;w<i.length;w++)r(i[w]);return r}({1:[function(e,t,n){(function(i){var r,l,w=i.MutationObserver||i.WebKitMutationObserver;if(w){var y=0,C=new w(A),x=i.document.createTextNode("");C.observe(x,{characterData:!0}),r=function(){x.data=y=++y%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var R=i.document.createElement("script");R.onreadystatechange=function(){A(),R.onreadystatechange=null,R.parentNode.removeChild(R),R=null},i.document.documentElement.appendChild(R)}:function(){setTimeout(A,0)};else{var M=new i.MessageChannel;M.port1.onmessage=A,r=function(){M.port2.postMessage(0)}}var _=[];function A(){var R,b;l=!0;for(var c=_.length;c;){for(b=_,_=[],R=-1;++R<c;)b[R]();c=_.length}l=!1}function O(R){_.push(R)!==1||l||r()}t.exports=O}).call(this,pe!==void 0?pe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(e,t,n){var i=e(1);function r(){}var l={},w=["REJECTED"],y=["FULFILLED"],C=["PENDING"];function x(u){if(typeof u!="function")throw new TypeError("resolver must be a function");this.state=C,this.queue=[],this.outcome=void 0,u!==r&&O(this,u)}function M(u,p,P){this.promise=u,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function _(u,p,P){i(function(){var B;try{B=p(P)}catch(I){return l.reject(u,I)}B===u?l.reject(u,new TypeError("Cannot resolve promise with itself")):l.resolve(u,B)})}function A(u){var p=u&&u.then;if(u&&(typeof u=="object"||typeof u=="function")&&typeof p=="function")return function(){p.apply(u,arguments)}}function O(u,p){var P=!1;function B(j){P||(P=!0,l.reject(u,j))}function I(j){P||(P=!0,l.resolve(u,j))}function U(){p(I,B)}var W=R(U);W.status==="error"&&B(W.value)}function R(u,p){var P={};try{P.value=u(p),P.status="success"}catch(B){P.status="error",P.value=B}return P}function b(u){return u instanceof this?u:l.resolve(new this(r),u)}function c(u){var p=new this(r);return l.reject(p,u)}function h(u){var p=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=u.length,B=!1;if(!P)return this.resolve([]);for(var I=new Array(P),U=0,W=-1,j=new this(r);++W<P;)$(u[W],W);return j;function $(q,V){function Q(J){I[V]=J,++U!==P||B||(B=!0,l.resolve(j,I))}p.resolve(q).then(Q,function(J){B||(B=!0,l.reject(j,J))})}}function d(u){var p=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=u.length,B=!1;if(!P)return this.resolve([]);for(var I=-1,U=new this(r);++I<P;)W(u[I]);return U;function W(j){p.resolve(j).then(function($){B||(B=!0,l.resolve(U,$))},function($){B||(B=!0,l.reject(U,$))})}}t.exports=x,x.prototype.catch=function(u){return this.then(null,u)},x.prototype.then=function(u,p){if(typeof u!="function"&&this.state===y||typeof p!="function"&&this.state===w)return this;var P=new this.constructor(r);return this.state!==C?_(P,this.state===y?u:p,this.outcome):this.queue.push(new M(P,u,p)),P},M.prototype.callFulfilled=function(u){l.resolve(this.promise,u)},M.prototype.otherCallFulfilled=function(u){_(this.promise,this.onFulfilled,u)},M.prototype.callRejected=function(u){l.reject(this.promise,u)},M.prototype.otherCallRejected=function(u){_(this.promise,this.onRejected,u)},l.resolve=function(u,p){var P=R(A,p);if(P.status==="error")return l.reject(u,P.value);var B=P.value;if(B)O(u,B);else{u.state=y,u.outcome=p;for(var I=-1,U=u.queue.length;++I<U;)u.queue[I].callFulfilled(p)}return u},l.reject=function(u,p){u.state=w,u.outcome=p;for(var P=-1,B=u.queue.length;++P<B;)u.queue[P].callRejected(p);return u},x.resolve=b,x.reject=c,x.all=h,x.race=d},{1:1}],3:[function(e,t,n){(function(i){typeof i.Promise!="function"&&(i.Promise=e(2))}).call(this,pe!==void 0?pe:typeof self!="undefined"?self:typeof window!="undefined"?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 l(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch{return}}var w=l();function y(){try{if(!w||!w.open)return!1;var o=typeof openDatabase!="undefined"&&/(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!="undefined"&&typeof IDBKeyRange!="undefined"}catch{return!1}}function C(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!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder),m=0;m<o.length;m+=1)a.append(o[m]);return a.getBlob(s.type)}}typeof Promise=="undefined"&&e(3);var x=Promise;function M(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function _(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function A(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function O(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var R="local-forage-detect-blob-support",b=void 0,c={},h=Object.prototype.toString,d="readonly",u="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 P(o){return new x(function(s){var a=o.transaction(R,u),m=C([""]);a.objectStore(R).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 b=="boolean"?x.resolve(b):P(o).then(function(s){return b=s})}function I(o){var s=c[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=c[o.name].deferredOperations.pop();if(s)return s.resolve(),s.promise}function W(o,s){var a=c[o.name].deferredOperations.pop();if(a)return a.reject(s),a.promise}function j(o,s){return new x(function(a,m){if(c[o.name]=c[o.name]||Bt(),o.db){if(!s)return a(o.db);I(o),o.db.close()}var f=[o.name];s&&f.push(o.version);var v=w.open.apply(w,f);s&&(v.onupgradeneeded=function(S){var E=v.result;try{E.createObjectStore(o.storeName),S.oldVersion<=1&&E.createObjectStore(R)}catch(k){if(k.name!=="ConstraintError")throw k;console.warn('The database "'+o.name+'" has been upgraded from version '+S.oldVersion+" to version "+S.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),v.onerror=function(S){S.preventDefault(),m(v.error)},v.onsuccess=function(){var S=v.result;S.onversionchange=function(E){E.target.close()},a(S),U(o)}})}function $(o){return j(o,!1)}function q(o){return j(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 C([p(atob(o.data))],{type:o.type})}function te(o){return o&&o.__local_forage_encoded_blob}function $e(o){var s=this,a=s._initReady().then(function(){var m=c[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return _(a,o,o),a}function qe(o){I(o);for(var s=c[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,$(o).then(function(v){return o.db=v,V(o)?q(o):v}).then(function(v){o.db=s.db=v;for(var S=0;S<a.length;S++)a[S]._dbInfo.db=v}).catch(function(v){throw W(o,v),v})}function ne(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 qe(o).then(function(){ne(o,s,a,m-1)})}).catch(a);a(v)}}function Bt(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function xn(o){var s=this,a={db:null};if(o)for(var m in o)a[m]=o[m];var f=c[a.name];f||(f=Bt(),c[a.name]=f),f.forages.push(s),s._initReady||(s._initReady=s.ready,s.ready=$e);var v=[];function S(){return x.resolve()}for(var E=0;E<f.forages.length;E++){var k=f.forages[E];k!==s&&v.push(k._initReady().catch(S))}var z=f.forages.slice(0);return x.all(v).then(function(){return a.db=f.db,$(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 D=0;D<z.length;D++){var T=z[D];T!==s&&(T._dbInfo.db=a.db,T._dbInfo.version=a.version)}})}function En(o,s){var a=this;o=A(o);var m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,d,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName).get(o);k.onsuccess=function(){var z=k.result;z===void 0&&(z=null),te(z)&&(z=J(z)),f(z)},k.onerror=function(){v(k.error)}}catch(z){v(z)}})}).catch(v)});return M(m,s),m}function kn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,d,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName).openCursor(),z=1;k.onsuccess=function(){var L=k.result;if(L){var D=L.value;te(D)&&(D=J(D));var T=o(D,L.key,z++);T!==void 0?f(T):L.continue()}else f()},k.onerror=function(){v(k.error)}}catch(L){v(L)}})}).catch(v)});return M(m,s),m}function zn(o,s,a){var m=this;o=A(o);var f=new x(function(v,S){var E;m.ready().then(function(){return E=m._dbInfo,h.call(s)==="[object Blob]"?B(E.db).then(function(k){return k?s:Q(s)}):s}).then(function(k){ne(m._dbInfo,u,function(z,L){if(z)return S(z);try{var D=L.objectStore(m._dbInfo.storeName);k===null&&(k=void 0);var T=D.put(k,o);L.oncomplete=function(){k===void 0&&(k=null),v(k)},L.onabort=L.onerror=function(){var F=T.error?T.error:T.transaction.error;S(F)}}catch(F){S(F)}})}).catch(S)});return M(f,a),f}function Mn(o,s){var a=this;o=A(o);var m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,u,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName).delete(o);E.oncomplete=function(){f()},E.onerror=function(){v(k.error)},E.onabort=function(){var z=k.error?k.error:k.transaction.error;v(z)}}catch(z){v(z)}})}).catch(v)});return M(m,s),m}function _n(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,u,function(v,S){if(v)return f(v);try{var E=S.objectStore(s._dbInfo.storeName).clear();S.oncomplete=function(){m()},S.onabort=S.onerror=function(){var k=E.error?E.error:E.transaction.error;f(k)}}catch(k){f(k)}})}).catch(f)});return M(a,o),a}function Ln(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,d,function(v,S){if(v)return f(v);try{var E=S.objectStore(s._dbInfo.storeName).count();E.onsuccess=function(){m(E.result)},E.onerror=function(){f(E.error)}}catch(k){f(k)}})}).catch(f)});return M(a,o),a}function Bn(o,s){var a=this,m=new x(function(f,v){o<0?f(null):a.ready().then(function(){ne(a._dbInfo,d,function(S,E){if(S)return v(S);try{var k=E.objectStore(a._dbInfo.storeName),z=!1,L=k.openKeyCursor();L.onsuccess=function(){var D=L.result;D?o===0||z?f(D.key):(z=!0,D.advance(o)):f(null)},L.onerror=function(){v(L.error)}}catch(D){v(D)}})}).catch(v)});return M(m,s),m}function In(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,d,function(v,S){if(v)return f(v);try{var E=S.objectStore(s._dbInfo.storeName).openKeyCursor(),k=[];E.onsuccess=function(){var z=E.result;z?(k.push(z.key),z.continue()):m(k)},E.onerror=function(){f(E.error)}}catch(z){f(z)}})}).catch(f)});return M(a,o),a}function Pn(o,s){s=O.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):$(o).then(function(S){var E=c[o.name],k=E.forages;E.db=S;for(var z=0;z<k.length;z++)k[z]._dbInfo.db=S;return S});m=o.storeName?v.then(function(S){if(S.objectStoreNames.contains(o.storeName)){var E=S.version+1;I(o);var k=c[o.name],z=k.forages;S.close();for(var L=0;L<z.length;L++){var D=z[L];D._dbInfo.db=null,D._dbInfo.version=E}return new x(function(T,F){var H=w.open(o.name,E);H.onerror=function(ee){H.result.close(),F(ee)},H.onupgradeneeded=function(){H.result.deleteObjectStore(o.storeName)},H.onsuccess=function(){var ee=H.result;ee.close(),T(ee)}}).then(function(T){k.db=T;for(var F=0;F<z.length;F++){var H=z[F];H._dbInfo.db=T,U(H._dbInfo)}}).catch(function(T){throw(W(o,T)||x.resolve()).catch(function(){}),T})}}):v.then(function(S){I(o);var E=c[o.name],k=E.forages;S.close();for(var z=0;z<k.length;z++)k[z]._dbInfo.db=null;return new x(function(L,D){var T=w.deleteDatabase(o.name);T.onerror=function(){var F=T.result;F&&F.close(),D(T.error)},T.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},T.onsuccess=function(){var F=T.result;F&&F.close(),L(F)}}).then(function(L){E.db=L;for(var D=0;D<k.length;D++)U(k[D]._dbInfo)}).catch(function(L){throw(W(o,L)||x.resolve()).catch(function(){}),L})})}else m=x.reject("Invalid arguments");return M(m,s),m}var Rn={_driver:"asyncStorage",_initStorage:xn,_support:y(),iterate:kn,getItem:En,setItem:zn,removeItem:Mn,clear:_n,length:Ln,key:Bn,keys:In,dropInstance:Pn};function Dn(){return typeof openDatabase=="function"}var re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nn="~~local_forage_type~",It=/^~~local_forage_type~([^~]+)~/,xe="__lfsc__:",Ve=xe.length,Xe="arbf",Ge="blob",Pt="si08",Rt="ui08",Dt="uic8",Nt="si16",At="si32",Tt="ur16",Ot="ui32",Ut="fl32",Wt="fl64",jt=Ve+Xe.length,Ft=Object.prototype.toString;function Ht(o){var s,a,m,f,v,S=.75*o.length,E=o.length,k=0;o[o.length-1]==="="&&(S--,o[o.length-2]==="="&&S--);var z=new ArrayBuffer(S),L=new Uint8Array(z);for(s=0;s<E;s+=4)a=re.indexOf(o[s]),m=re.indexOf(o[s+1]),f=re.indexOf(o[s+2]),v=re.indexOf(o[s+3]),L[k++]=a<<2|m>>4,L[k++]=(15&m)<<4|f>>2,L[k++]=(3&f)<<6|63&v;return z}function Ke(o){var s,a=new Uint8Array(o),m="";for(s=0;s<a.length;s+=3)m+=re[a[s]>>2],m+=re[(3&a[s])<<4|a[s+1]>>4],m+=re[(15&a[s+1])<<2|a[s+2]>>6],m+=re[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 An(o,s){var a="";if(o&&(a=Ft.call(o)),o&&(a==="[object ArrayBuffer]"||o.buffer&&Ft.call(o.buffer)==="[object ArrayBuffer]")){var m,f=xe;o instanceof ArrayBuffer?(m=o,f+=Xe):(m=o.buffer,a==="[object Int8Array]"?f+=Pt:a==="[object Uint8Array]"?f+=Rt:a==="[object Uint8ClampedArray]"?f+=Dt:a==="[object Int16Array]"?f+=Nt:a==="[object Uint16Array]"?f+=Tt:a==="[object Int32Array]"?f+=At:a==="[object Uint32Array]"?f+=Ot:a==="[object Float32Array]"?f+=Ut:a==="[object Float64Array]"?f+=Wt:s(new Error("Failed to get type for BinaryArray"))),s(f+Ke(m))}else if(a==="[object Blob]"){var v=new FileReader;v.onload=function(){var S=Nn+o.type+"~"+Ke(this.result);s(xe+Ge+S)},v.readAsArrayBuffer(o)}else try{s(JSON.stringify(o))}catch(S){console.error("Couldn't convert value into a JSON string: ",o),s(null,S)}}function Tn(o){if(o.substring(0,Ve)!==xe)return JSON.parse(o);var s,a=o.substring(jt),m=o.substring(Ve,jt);if(m===Ge&&It.test(a)){var f=a.match(It);s=f[1],a=a.substring(f[0].length)}var v=Ht(a);switch(m){case Xe:return v;case Ge:return C([v],{type:s});case Pt:return new Int8Array(v);case Rt:return new Uint8Array(v);case Dt:return new Uint8ClampedArray(v);case Nt:return new Int16Array(v);case Tt:return new Uint16Array(v);case At:return new Int32Array(v);case Ot:return new Uint32Array(v);case Ut:return new Float32Array(v);case Wt:return new Float64Array(v);default:throw new Error("Unkown type: "+m)}}var Ye={serialize:An,deserialize:Tn,stringToBuffer:Ht,bufferToString:Ke};function $t(o,s,a,m){o.executeSql("CREATE TABLE IF NOT EXISTS "+s.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function On(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,S){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(E){return S(E)}a.db.transaction(function(E){$t(E,a,function(){s._dbInfo=a,v()},function(k,z){S(z)})},S)});return a.serializer=Ye,f}function se(o,s,a,m,f,v){o.executeSql(a,m,f,function(S,E){E.code===E.SYNTAX_ERR?S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[s.storeName],function(k,z){z.rows.length?v(k,E):$t(k,s,function(){k.executeSql(a,m,f,v)},v)},v):v(S,E)},v)}function Un(o,s){var a=this;o=A(o);var m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"SELECT * FROM "+S.storeName+" WHERE key = ? LIMIT 1",[o],function(k,z){var L=z.rows.length?z.rows.item(0).value:null;L&&(L=S.serializer.deserialize(L)),f(L)},function(k,z){v(z)})})}).catch(v)});return M(m,s),m}function Wn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"SELECT * FROM "+S.storeName,[],function(k,z){for(var L=z.rows,D=L.length,T=0;T<D;T++){var F=L.item(T),H=F.value;if(H&&(H=S.serializer.deserialize(H)),(H=o(H,F.key,T+1))!==void 0)return void f(H)}f()},function(k,z){v(z)})})}).catch(v)});return M(m,s),m}function qt(o,s,a,m){var f=this;o=A(o);var v=new x(function(S,E){f.ready().then(function(){s===void 0&&(s=null);var k=s,z=f._dbInfo;z.serializer.serialize(s,function(L,D){D?E(D):z.db.transaction(function(T){se(T,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[o,L],function(){S(k)},function(F,H){E(H)})},function(T){if(T.code===T.QUOTA_ERR){if(m>0)return void S(qt.apply(f,[o,k,a,m-1]));E(T)}})})}).catch(E)});return M(v,a),v}function jn(o,s,a){return qt.apply(this,[o,s,a,1])}function Fn(o,s){var a=this;o=A(o);var m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"DELETE FROM "+S.storeName+" WHERE key = ?",[o],function(){f()},function(k,z){v(z)})})}).catch(v)});return M(m,s),m}function Hn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(S){se(S,v,"DELETE FROM "+v.storeName,[],function(){m()},function(E,k){f(k)})})}).catch(f)});return M(a,o),a}function $n(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(S){se(S,v,"SELECT COUNT(key) as c FROM "+v.storeName,[],function(E,k){var z=k.rows.item(0).c;m(z)},function(E,k){f(k)})})}).catch(f)});return M(a,o),a}function qn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var S=a._dbInfo;S.db.transaction(function(E){se(E,S,"SELECT key FROM "+S.storeName+" WHERE id = ? LIMIT 1",[o+1],function(k,z){var L=z.rows.length?z.rows.item(0).key:null;f(L)},function(k,z){v(z)})})}).catch(v)});return M(m,s),m}function Vn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(S){se(S,v,"SELECT key FROM "+v.storeName,[],function(E,k){for(var z=[],L=0;L<k.rows.length;L++)z.push(k.rows.item(L).key);m(z)},function(E,k){f(k)})})}).catch(f)});return M(a,o),a}function Xn(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 S=[],E=0;E<v.rows.length;E++)S.push(v.rows.item(E).name);s({db:o,storeNames:S})},function(f,v){a(v)})},function(m){a(m)})})}function Gn(o,s){s=O.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 M(m=o.name?new x(function(v){var S;S=o.name===a.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?v({db:S,storeNames:[o.storeName]}):v(Xn(S))}).then(function(v){return new x(function(S,E){v.db.transaction(function(k){function z(F){return new x(function(H,ee){k.executeSql("DROP TABLE IF EXISTS "+F,[],function(){H()},function(Kt,ye){ee(ye)})})}for(var L=[],D=0,T=v.storeNames.length;D<T;D++)L.push(z(v.storeNames[D]));x.all(L).then(function(){S()}).catch(function(F){E(F)})},function(k){E(k)})})}):x.reject("Invalid arguments"),s),m}var Kn={_driver:"webSQLStorage",_initStorage:On,_support:Dn(),iterate:Wn,getItem:Un,setItem:jn,removeItem:Fn,clear:Hn,length:$n,key:qn,keys:Vn,dropInstance:Gn};function Yn(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Vt(o,s){var a=o.name+"/";return o.storeName!==s.storeName&&(a+=o.storeName+"/"),a}function Jn(){var o="_localforage_support_test";try{return localStorage.setItem(o,!0),localStorage.removeItem(o),!1}catch{return!0}}function Zn(){return!Jn()||localStorage.length>0}function Qn(o){var s=this,a={};if(o)for(var m in o)a[m]=o[m];return a.keyPrefix=Vt(o,s._defaultConfig),Zn()?(s._dbInfo=a,a.serializer=Ye,x.resolve()):x.reject()}function ei(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 M(a,o),a}function ti(o,s){var a=this;o=A(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 M(m,s),m}function ni(o,s){var a=this,m=a.ready().then(function(){for(var f=a._dbInfo,v=f.keyPrefix,S=v.length,E=localStorage.length,k=1,z=0;z<E;z++){var L=localStorage.key(z);if(L.indexOf(v)===0){var D=localStorage.getItem(L);if(D&&(D=f.serializer.deserialize(D)),(D=o(D,L.substring(S),k++))!==void 0)return D}}});return M(m,s),m}function ii(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 M(m,s),m}function oi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo,f=localStorage.length,v=[],S=0;S<f;S++){var E=localStorage.key(S);E.indexOf(m.keyPrefix)===0&&v.push(E.substring(m.keyPrefix.length))}return v});return M(a,o),a}function ri(o){var s=this.keys().then(function(a){return a.length});return M(s,o),s}function si(o,s){var a=this;o=A(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return M(m,s),m}function ai(o,s,a){var m=this;o=A(o);var f=m.ready().then(function(){s===void 0&&(s=null);var v=s;return new x(function(S,E){var k=m._dbInfo;k.serializer.serialize(s,function(z,L){if(L)E(L);else try{localStorage.setItem(k.keyPrefix+o,z),S(v)}catch(D){D.name!=="QuotaExceededError"&&D.name!=="NS_ERROR_DOM_QUOTA_REACHED"||E(D),E(D)}})})});return M(f,a),f}function ci(o,s){if(s=O.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 M(m=o.name?new x(function(v){o.storeName?v(Vt(o,f._defaultConfig)):v(o.name+"/")}).then(function(v){for(var S=localStorage.length-1;S>=0;S--){var E=localStorage.key(S);E.indexOf(v)===0&&localStorage.removeItem(E)}}):x.reject("Invalid arguments"),s),m}var ui={_driver:"localStorageWrapper",_initStorage:Qn,_support:Yn(),iterate:ni,getItem:ti,setItem:ai,removeItem:si,clear:ei,length:ri,key:ii,keys:oi,dropInstance:ci},li=function(o,s){return o===s||typeof o=="number"&&typeof s=="number"&&isNaN(o)&&isNaN(s)},hi=function(o,s){for(var a=o.length,m=0;m<a;){if(li(o[m],s))return!0;m++}return!1},Xt=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"},ve={},Gt={},fe={INDEXEDDB:Rn,WEBSQL:Kn,LOCALSTORAGE:ui},di=[fe.INDEXEDDB._driver,fe.WEBSQL._driver,fe.LOCALSTORAGE._driver],Ee=["dropInstance"],Je=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ee),fi={description:"",driver:di.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function pi(o,s){o[s]=function(){var a=arguments;return o.ready().then(function(){return o[s].apply(o,a)})}}function Ze(){for(var o=1;o<arguments.length;o++){var s=arguments[o];if(s)for(var a in s)s.hasOwnProperty(a)&&(Xt(s[a])?arguments[0][a]=s[a].slice():arguments[0][a]=s[a])}return arguments[0]}var mi=new(function(){function o(s){for(var a in r(this,o),fe)if(fe.hasOwnProperty(a)){var m=fe[a],f=m._driver;this[a]=f,ve[f]||this.defineDriver(m)}this._defaultConfig=Ze({},fi),this._config=Ze({},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,S){try{var E=s._driver,k=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!s._driver)return void S(k);for(var z=Je.concat("_initStorage"),L=0,D=z.length;L<D;L++){var T=z[L];if((!hi(Ee,T)||s[T])&&typeof s[T]!="function")return void S(k)}(function(){for(var H=function(gi){return function(){var vi=new Error("Method "+gi+" is not implemented by the current driver"),Yt=x.reject(vi);return M(Yt,arguments[arguments.length-1]),Yt}},ee=0,Kt=Ee.length;ee<Kt;ee++){var ye=Ee[ee];s[ye]||(s[ye]=H(ye))}})();var F=function(H){ve[E]&&console.info("Redefining LocalForage driver: "+E),ve[E]=s,Gt[E]=H,v()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(F,S):F(!!s._support):F(!0)}catch(H){S(H)}});return _(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=ve[s]?x.resolve(ve[s]):x.reject(new Error("Driver not found."));return _(f,a,m),f},o.prototype.getSerializer=function(s){var a=x.resolve(Ye);return _(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,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;Xt(s)||(s=[s]);var v=this._getSupportedDrivers(s);function S(){f._config.driver=f.driver()}function E(L){return f._extend(L),S(),f._ready=f._initStorage(f._config),f._ready}function k(L){return function(){var D=0;function T(){for(;D<L.length;){var F=L[D];return D++,f._dbInfo=null,f._ready=null,f.getDriver(F).then(E).catch(T)}S();var H=new Error("No available storage method found.");return f._driverSet=x.reject(H),f._driverSet}return T()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return x.resolve()}):x.resolve();return this._driverSet=z.then(function(){var L=v[0];return f._dbInfo=null,f._ready=null,f.getDriver(L).then(function(D){f._driver=D._driver,S(),f._wrapLibraryMethodsWithReady(),f._initDriver=k(v)})}).catch(function(){S();var L=new Error("No available storage method found.");return f._driverSet=x.reject(L),f._driverSet}),_(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!Gt[s]},o.prototype._extend=function(s){Ze(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=Je.length;s<a;s++)pi(this,Je[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=mi},{3:3}]},{},[4])(4),hn={exports:{}};/*!
3
3
  localForage -- Offline Storage, Improved
4
4
  Version 1.10.0
5
5
  https://localforage.github.io/localForage
6
6
  (c) 2013-2017 Mozilla, Apache License 2.0
7
- */(function(Tt){ge.exports=(()=>{const Ot=typeof window=="object"?window:this;Ot.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let jt=null,Ut=!1;const Wt=Ot.WebStreamsPolyfill||{},Xt=Ot.isSecureContext;let tn=/constructor/i.test(Ot.HTMLElement)||!!Ot.safari||!!Ot.WebKitPoint;const en=Xt||"MozAppearance"in document.documentElement.style?"iframe":"navigate",rn={createWriteStream:function(ln,hn,yn){let bn={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},gn=0,nn=null,qt=null,Gt=null;if(Number.isFinite(hn)?([yn,hn]=[hn,yn],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),bn.size=yn,bn.writableStrategy=hn):hn&&hn.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),bn.size=yn,bn.writableStrategy=hn):bn=hn||{},!tn){jt||(jt=Xt?an(rn.mitm):function(mn){const pn="width=200,height=100",fn=document.createDocumentFragment(),xn={frame:Ot.open(mn,"popup",pn),loaded:!1,isIframe:!1,isPopup:!0,remove(){xn.frame.close()},addEventListener(...Cn){fn.addEventListener(...Cn)},dispatchEvent(...Cn){fn.dispatchEvent(...Cn)},removeEventListener(...Cn){fn.removeEventListener(...Cn)},postMessage(...Cn){xn.frame.postMessage(...Cn)}},Sn=Cn=>{Cn.source===xn.frame&&(xn.loaded=!0,Ot.removeEventListener("message",Sn),xn.dispatchEvent(new Event("load")))};return Ot.addEventListener("message",Sn),xn}(rn.mitm)),qt=new MessageChannel,ln=encodeURIComponent(ln.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const Vt={transferringReadable:Ut,pathname:bn.pathname||Math.random().toString().slice(-6)+"/"+ln,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+ln}};bn.size&&(Vt.headers["Content-Length"]=bn.size);const Jt=[Vt,"*",[qt.port2]];if(Ut){const mn=en==="iframe"?void 0:{transform(fn,xn){if(!(fn instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");gn+=fn.length,xn.enqueue(fn),nn&&(location.href=nn,nn=null)},flush(){nn&&(location.href=nn)}};Gt=new rn.TransformStream(mn,bn.writableStrategy,bn.readableStrategy);const pn=Gt.readable;qt.port1.postMessage({readableStream:pn},[pn])}qt.port1.onmessage=mn=>{mn.data.download&&(en==="navigate"?(jt.remove(),jt=null,gn?location.href=mn.data.download:nn=mn.data.download):(jt.isPopup&&(jt.remove(),jt=null,en==="iframe"&&an(rn.mitm)),an(mn.data.download)))},jt.loaded?jt.postMessage(...Jt):jt.addEventListener("load",()=>{jt.postMessage(...Jt)},{once:!0})}let Kt=[];return!tn&&Gt&&Gt.writable||new rn.WritableStream({write(Vt){if(!(Vt instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");tn?Kt.push(Vt):(qt.port1.postMessage(Vt),gn+=Vt.length,nn&&(location.href=nn,nn=null))},close(){if(tn){const Vt=new Blob(Kt,{type:"application/octet-stream; charset=utf-8"}),Jt=document.createElement("a");Jt.href=URL.createObjectURL(Vt),Jt.download=ln,Jt.click()}else qt.port1.postMessage("end")},abort(){Kt=[],qt.port1.postMessage("abort"),qt.port1.onmessage=null,qt.port1.close(),qt.port2.close(),qt=null}},bn.writableStrategy)},WritableStream:Ot.WritableStream||Wt.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 an(ln){if(!ln)throw new Error("meh");const hn=document.createElement("iframe");return hn.hidden=!0,hn.src=ln,hn.loaded=!1,hn.name="iframe",hn.isIframe=!0,hn.postMessage=(...yn)=>hn.contentWindow.postMessage(...yn),hn.addEventListener("load",()=>{hn.loaded=!0},{once:!0}),document.body.appendChild(hn),hn}try{new Response(new ReadableStream),Xt&&!("serviceWorker"in navigator)&&(tn=!0)}catch{tn=!0}return(ln=>{try{ln()}catch{}})(()=>{const{readable:ln}=new TransformStream,hn=new MessageChannel;hn.port1.postMessage(ln,[ln]),hn.port1.close(),hn.port2.close(),Ut=!0,Object.defineProperty(rn,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),rn})()})();var ve=ge.exports;const ye=Object.prototype.toString;function we(Tt,Ot){return ye.call(Tt)===`[object ${Ot}]`}function be(Tt){return we(Tt,"Function")}const xe=Tt=>Tt!==void 0,Se=Tt=>!xe(Tt);function Ce(Tt){return Tt===null}const Ee=Tt=>Tt!==null&&we(Tt,"Object");function ke(Tt){return we(Tt,"String")}function ze(Tt){return Tt&&Array.isArray(Tt)}const _e=typeof window=="undefined",Me=e.reactive({panelGroups:{}}),Le=()=>({useGroupAccordion:Tt=>e.computed(()=>Me.panelGroups[Tt].accordion),setGroupAccordionStatus:(Tt,Ot)=>{Me.panelGroups[Tt]={...Me.panelGroups[Tt],accordion:Ot}},panelExpanded:(Tt,Ot)=>e.computed(()=>Me.panelGroups[Tt]?.panelExpandStatus?.[Ot]||!1),setPanelExpandedStatus:(Tt,Ot,jt)=>{Me.panelGroups[Tt]={...Me.panelGroups[Tt],panelExpandStatus:{...Me.panelGroups[Tt]?.panelExpandStatus||{},[Ot]:jt}}},togglePanelExpandedStatus:(Tt,Ot)=>{Me.panelGroups[Tt].accordion&&(Me.panelGroups[Tt].panelExpandStatus[Ot]||Object.keys(Me.panelGroups[Tt].panelExpandStatus).forEach(jt=>{Me.panelGroups[Tt].panelExpandStatus[jt]=!1})),Me.panelGroups[Tt].panelExpandStatus[Ot]=!Me.panelGroups[Tt].panelExpandStatus[Ot]}}),Be=Tt=>Tt>255?255:Tt<0?0:Tt,Ie=(Tt,Ot)=>{const jt=Tt.replace("#",""),Ut=parseInt(jt,16),Wt=Be((Ut>>16)+Ot),Xt=Be((Ut>>8&255)+Ot);return"#"+(Be((255&Ut)+Ot)|Xt<<8|Wt<<16).toString(16)};var Pe=e.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(Tt){const Ot=e.ref(`group-${g()}`),{setGroupAccordionStatus:jt}=Le(),Ut={"--base-color":Tt.baseColor,"--border-color":Ie(Tt.baseColor,180),"--bg-color-header":Ie(Tt.baseColor,140),"--bg-color-header-hover":Ie(Tt.baseColor,190),"--bg-color-header-active":Ie(Tt.baseColor,200),"--bg-color-body":"#fff"};return jt(Ot.value,Tt.accordion),{idGroup:Ot,cssColorVars:Ut}}});const Re=["data-id-group"];Pe.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("div",{"data-id-group":Tt.idGroup,style:e.normalizeStyle(Tt.cssColorVars),class:"vcpg"},[e.renderSlot(Tt.$slots,"default")],12,Re)},Pe.__scopeId="data-v-23ab5317",Pe.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Ne=e.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(Tt,Ot){const jt=`panel-${g()}`,Ut=e.ref(),Wt=e.ref(),Xt=e.ref(),{panelExpanded:tn,togglePanelExpandedStatus:en,setPanelExpandedStatus:rn}=Le(),an=e.computed(()=>({hasContent:Ot.slots.content&&Ot.slots.content()[0].children.length>0,dataKey:g()})),ln=e.computed(()=>Ut.value?.parentElement?.getAttribute("data-id-group")||""),hn=e.computed(()=>tn(ln.value,jt).value&&an.value.hasContent);return e.onMounted(()=>{rn(ln.value,jt,Tt.expanded)}),e.onUpdated(()=>{(async()=>{await e.nextTick(),Wt.value&&Xt.value&&(Wt.value.style.height=`${Math.min(Xt.value.scrollHeight,Wt.value.scrollHeight)}px`)})()}),{body:an,panelRef:Ut,bodyRef:Wt,bodyContentRef:Xt,isExpanded:hn,collapse:yn=>{yn.style.height="0"},expand:yn=>{yn.style.height=`${yn.scrollHeight}px`},toggle:()=>{an.value.hasContent&&en(ln.value,jt)},toggleIcon:`
7
+ */(function(e){hn.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||{},l=t.isSecureContext;let w=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const y=l||"MozAppearance"in document.documentElement.style?"iframe":"navigate",C={createWriteStream:function(M,_,A){let O={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},R=0,b=null,c=null,h=null;if(Number.isFinite(_)?([A,_]=[_,A],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),O.size=A,O.writableStrategy=_):_&&_.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),O.size=A,O.writableStrategy=_):O=_||{},!w){n||(n=l?x(C.mitm):function(P){const B="width=200,height=100",I=document.createDocumentFragment(),U={frame:t.open(P,"popup",B),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...j){I.addEventListener(...j)},dispatchEvent(...j){I.dispatchEvent(...j)},removeEventListener(...j){I.removeEventListener(...j)},postMessage(...j){U.frame.postMessage(...j)}},W=j=>{j.source===U.frame&&(U.loaded=!0,t.removeEventListener("message",W),U.dispatchEvent(new Event("load")))};return t.addEventListener("message",W),U}(C.mitm)),c=new MessageChannel,M=encodeURIComponent(M.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const u={transferringReadable:i,pathname:O.pathname||Math.random().toString().slice(-6)+"/"+M,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+M}};O.size&&(u.headers["Content-Length"]=O.size);const p=[u,"*",[c.port2]];if(i){const P=y==="iframe"?void 0:{transform(I,U){if(!(I instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");R+=I.length,U.enqueue(I),b&&(location.href=b,b=null)},flush(){b&&(location.href=b)}};h=new C.TransformStream(P,O.writableStrategy,O.readableStrategy);const B=h.readable;c.port1.postMessage({readableStream:B},[B])}c.port1.onmessage=P=>{P.data.download&&(y==="navigate"?(n.remove(),n=null,R?location.href=P.data.download:b=P.data.download):(n.isPopup&&(n.remove(),n=null,y==="iframe"&&x(C.mitm)),x(P.data.download)))},n.loaded?n.postMessage(...p):n.addEventListener("load",()=>{n.postMessage(...p)},{once:!0})}let d=[];return!w&&h&&h.writable||new C.WritableStream({write(u){if(!(u instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");w?d.push(u):(c.port1.postMessage(u),R+=u.length,b&&(location.href=b,b=null))},close(){if(w){const u=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),p=document.createElement("a");p.href=URL.createObjectURL(u),p.download=M,p.click()}else c.port1.postMessage("end")},abort(){d=[],c.port1.postMessage("abort"),c.port1.onmessage=null,c.port1.close(),c.port2.close(),c=null}},O.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(M){if(!M)throw new Error("meh");const _=document.createElement("iframe");return _.hidden=!0,_.src=M,_.loaded=!1,_.name="iframe",_.isIframe=!0,_.postMessage=(...A)=>_.contentWindow.postMessage(...A),_.addEventListener("load",()=>{_.loaded=!0},{once:!0}),document.body.appendChild(_),_}try{new Response(new ReadableStream),l&&!("serviceWorker"in navigator)&&(w=!0)}catch{w=!0}return(M=>{try{M()}catch{}})(()=>{const{readable:M}=new TransformStream,_=new MessageChannel;_.port1.postMessage(M,[M]),_.port1.close(),_.port2.close(),i=!0,Object.defineProperty(C,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),C})()})();var Ti=hn.exports;const Oi=Object.prototype.toString;function G(e,t){return Oi.call(e)===`[object ${t}]`}function yt(e){return G(e,"Function")}const dn=e=>e!==void 0,wt=e=>!dn(e);function bt(e){return e===null}const he=e=>e!==null&&G(e,"Object");function Be(e){return G(e,"String")}function fn(e){return e&&Array.isArray(e)}const Ui=typeof window=="undefined",K=g.reactive({panelGroups:{}}),pn=()=>({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]}}),St=e=>e>255?255:e<0?0:e,Ie=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=St((i>>16)+t),l=St((i>>8&255)+t);return"#"+(St((255&i)+t)|l<<8|r<<16).toString(16)};var Pe=g.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=g.ref(`group-${ze()}`),{setGroupAccordionStatus:n}=pn(),i={"--base-color":e.baseColor,"--border-color":Ie(e.baseColor,180),"--bg-color-header":Ie(e.baseColor,140),"--bg-color-header-hover":Ie(e.baseColor,190),"--bg-color-header-active":Ie(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:i}}});const Wi=["data-id-group"];Pe.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("div",{"data-id-group":e.idGroup,style:g.normalizeStyle(e.cssColorVars),class:"vcpg"},[g.renderSlot(e.$slots,"default")],12,Wi)},Pe.__scopeId="data-v-23ab5317",Pe.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Re=g.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${ze()}`,i=g.ref(),r=g.ref(),l=g.ref(),{panelExpanded:w,togglePanelExpandedStatus:y,setPanelExpandedStatus:C}=pn(),x=g.computed(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:ze()})),M=g.computed(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),_=g.computed(()=>w(M.value,n).value&&x.value.hasContent);return g.onMounted(()=>{C(M.value,n,e.expanded)}),g.onUpdated(()=>{(async()=>(await g.nextTick(),r.value&&l.value&&(r.value.style.height=`${Math.min(l.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:x,panelRef:i,bodyRef:r,bodyContentRef:l,isExpanded:_,collapse:A=>{A.style.height="0"},expand:A=>{A.style.height=`${A.scrollHeight}px`},toggle:()=>{x.value.hasContent&&y(M.value,n)},toggleIcon:`
8
8
  <svg
9
9
  width="24px"
10
10
  height="24px"
@@ -14,4 +14,4 @@
14
14
  >
15
15
  <path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
16
16
  </svg>
17
- `}}});const De={class:"vcp__header-title"},Ae={key:0,class:"vcp__header-icon"},Te=["innerHTML"],Oe={key:0,ref:"bodyRef",class:"vcp__body"},je={ref:"bodyContentRef",class:"vcp__body-content"};function Ue(Tt){return window.TouchEvent&&Tt instanceof TouchEvent}Ne.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("section",{ref:"panelRef",class:e.normalizeClass(["vcp",{"vcp--expanded":Tt.isExpanded,"vcp--expandable":Tt.body.hasContent}])},[e.createElementVNode("header",{class:"vcp__header",onClick:Ot[0]||(Ot[0]=(...tn)=>Tt.toggle&&Tt.toggle(...tn))},[e.createElementVNode("div",De,[e.renderSlot(Tt.$slots,"title")]),Tt.body.hasContent?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(Tt.$slots,"icon",{},()=>[e.createElementVNode("span",{innerHTML:Tt.toggleIcon},null,8,Te)])])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.Transition,{"data-key":Tt.body.dataKey,name:"slide",onBeforeEnter:Tt.collapse,onEnter:Tt.expand,onBeforeLeave:Tt.expand,onLeave:Tt.collapse},{default:e.withCtx(()=>[Tt.isExpanded?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",je,[e.renderSlot(Tt.$slots,"content")],512)],512)):e.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Ne.__scopeId="data-v-08c94cf8",Ne.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class We{constructor(Ot){this.e=Ot}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Ue(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Ue(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Fe(this.clientX,this.clientY)}static bindDown(Ot,jt,Ut,Wt=!1){const Xt=en=>{jt(new We(en))},tn=en=>{en.touches.length===1&&jt(new We(en)),en.touches.length>1&&Ut&&Ut(new We(en))};return Ot.addEventListener("mousedown",Xt,Wt),Ot.addEventListener("touchstart",tn,Wt),()=>{Ot.removeEventListener("mousedown",Xt,Wt),Ot.removeEventListener("touchstart",tn,Wt)}}static bindMove(Ot,jt,Ut=!1){const Wt=tn=>{jt(new We(tn))},Xt=tn=>{tn.touches.length===1&&jt(new We(tn))};return Ot.addEventListener("mousemove",Wt,Ut),Ot.addEventListener("touchmove",Xt,Ut),()=>{Ot.removeEventListener("mousemove",Wt,Ut),Ot.removeEventListener("touchmove",Xt,Ut)}}static bindUp(Ot,jt,Ut=!1){const Wt=tn=>{jt(new We(tn))},Xt=tn=>{tn.touches.length===0&&jt(new We(tn))};return Ot.addEventListener("mouseup",Wt,Ut),Ot.addEventListener("touchend",Xt,Ut),()=>{Ot.removeEventListener("mouseup",Wt,Ut),Ot.removeEventListener("touchend",Xt,Ut)}}originalEvent({mouse:Ot,touch:jt}){Ue(this.e)?jt&&jt(this.e):Ot&&Ot(this.e)}}class Fe{constructor(Ot,jt){this.x=Ot,this.y=jt}clone(){return new Fe(this.x,this.y)}}class $e{constructor(Ot,jt,Ut={}){this.mousedown=Wt=>{if(Wt.preventDefault(),this.handle){const{left:Xt,top:tn}=this.handle.getBoundingClientRect();this.offsetX=Wt.clientX-Xt,this.offsetY=Wt.clientY-tn}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=We.bindMove(document,this.mousemove),this.unbindUp=We.bindUp(document,this.mouseup)},this.mousemove=Wt=>{this.container&&(this.container.style.left=Wt.clientX-this.offsetX+"px",this.container.style.top=Wt.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()},this.mouseup=Wt=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0},this.handle=Ot,this.container=jt,this.options=Ut,Ot&&(this.unbindDown=We.bindDown(Ot,this.mousedown),Ot.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}}class He{constructor(Ot,jt){this._group=Ot,this.onChange=jt,this.a(Ut=>Ut.push(this))}set group(Ot){this._group=Ot;const jt=Ve(this._group),Ut=Ve(Ot);jt.splice(jt.indexOf(this),1),Ut.push(this),Ge()}get group(){return this._group}unregister(){this.a(Ot=>Ot.splice(Ot.indexOf(this),1))}raise(){this.a(Ot=>{Ot.splice(Ot.indexOf(this),1),Ot.push(this)})}a(Ot){Ot(Ve(this._group)),Ge()}}const qe=new Map;function Ve(Tt){return qe.has(Tt)||qe.set(Tt,[]),qe.get(Tt)}function Xe(Tt,Ot){return Tt>Ot?-Xe(Ot,Tt):Tt<0&&Ot>=0?1:Tt-Ot}function Ge(){let Tt=0;for(const Ot of function(jt){const Ut=[];return jt.forEach((Wt,Xt)=>Ut.push(Xt)),Ut}(qe).sort(Xe))for(const jt of Ve(Ot))Tt!=jt.zIndex&&(jt.zIndex=Tt,jt.onChange(Tt)),Tt++}function Ke(Tt){if(Tt){const{width:Ot,height:jt}=Tt.style;Tt.style.width="auto",Tt.style.height="auto";const Ut=Ye(Tt);return Tt.style.width=Ot,Tt.style.height=jt,Ut}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ye(Tt){const Ot=Tt.getBoundingClientRect(),jt=Ot.width,Ut=Ot.height,Wt=Ot.top,Xt=Ot.left;return{width:jt,height:Ut,top:Wt,left:Xt,bottom:Wt+Ut,right:Xt+jt}}class Je{constructor(Ot,jt){if(this.container=Ot,this.options=jt,Ot&&jt){this.handles=Ze.map(rn=>new rn(Ot,this));const{width:Ut,height:Wt}=Ke(Ot),Xt=jt.maxWidth||window.innerWidth,tn=jt.maxHeight||window.innerHeight;let en=!1;(Ut<jt.minWidth||Ut>Xt)&&(Ot.style.width=`${et(Ut,jt.minWidth,Xt)}px`,en=!0),(Wt<jt.minHeight||Wt>tn)&&(Ot.style.height=`${et(Wt,jt.minHeight,tn)}px`,en=!0),en&&jt.onResize&&jt.onResize()}}teardown(){this.handles?.forEach(Ot=>Ot.teardown())}}const Ze=[];class Qe{constructor(Ot,jt){this.handleSize=8,this.mousedown=Ut=>{Ut.preventDefault(),Ut.stopPropagation();const{left:Wt,top:Xt,width:tn,height:en}=Ye(this.container);this.x0=Ut.clientX,this.y0=Ut.clientY,this.left0=Wt,this.top0=Xt,this.width0=tn,this.height0=en,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=We.bindMove(document,this.mousemove),this.unbindUp=We.bindUp(document,this.mouseup)},this.mousemove=Ut=>{Ut.preventDefault(),Ut.stopPropagation(),this.setPosition(Ut),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()},this.mouseup=Ut=>{Ut.preventDefault(),Ut.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0},this.container=Ot,this.helper=jt,this.handle=this.createHandleElement(),this.unbindDown=We.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}calcSafeBoundaries(){if(!this.helper.options)return;const{left:Ot,top:jt,right:Ut,bottom:Wt}=Ye(this.container),Xt=this.helper.options,tn=Xt.maxWidth||window.innerWidth,en=Xt.maxHeight||window.innerHeight;this.minLeft=Math.max(Ut-tn,0),this.maxLeft=Ut-Xt.minWidth,this.minRight=Ot+Xt.minWidth,this.maxRight=Math.min(Ot+tn,window.innerWidth),this.minTop=Math.max(Wt-en,0),this.maxTop=Wt-Xt.minHeight,this.minBottom=jt+Xt.minHeight,this.maxBottom=Math.min(jt+en,window.innerHeight)}fixPosition(){const{width:Ot,height:jt,left:Ut,top:Wt,right:Xt,bottom:tn}=Ye(this.container),en=this.helper.options;en&&(Ut<this.minLeft?(this.container.style.width=Ot+Ut-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):Ut>this.maxLeft?(this.container.style.width=`${en.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):Xt<this.minRight?this.container.style.width=`${en.minWidth}px`:Xt>this.maxRight&&(this.container.style.width=this.maxRight-Ut+"px"),Wt<this.minTop?(this.container.style.height=jt+Wt-this.minTop+"px",this.container.style.top=`${this.minTop}px`):Wt>this.maxTop?(this.container.style.height=`${en.minHeight}px`,this.container.style.top=`${this.maxTop}px`):tn<this.minBottom?this.container.style.height=`${en.minHeight}px`:tn>this.maxBottom&&(this.container.style.height=this.maxBottom-Wt+"px"))}createHandleElement(){const Ot=document.createElement("div"),jt=Ot.style;return jt.position="absolute",this.applyStyle(jt),this.container.appendChild(Ot),Ot}}function et(Tt,Ot,jt){return Tt<Ot?Ot:Tt>jt?jt:Tt}Ze.push(class extends Qe{setPosition(Tt){this.container.style.width=this.width0+Tt.clientX-this.x0+"px",this.container.style.height=this.height0+Tt.clientY-this.y0+"px"}applyStyle(Tt){Tt.width=2*this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.right=-this.handleSize+"px",Tt.bottom=-this.handleSize+"px",Tt.cursor="nwse-resize"}},class extends Qe{setPosition(Tt){this.container.style.height=this.height0+Tt.clientY-this.y0+"px"}applyStyle(Tt){Tt.right=`${this.handleSize}px`,Tt.left=`${this.handleSize}px`,Tt.height=2*this.handleSize+"px",Tt.bottom=-this.handleSize+"px",Tt.cursor="ns-resize"}},class extends Qe{setPosition(Tt){this.container.style.left=this.left0+Tt.clientX-this.x0+"px",this.container.style.width=this.width0-(Tt.clientX-this.x0)+"px",this.container.style.height=this.height0+Tt.clientY-this.y0+"px"}applyStyle(Tt){Tt.left=-this.handleSize+"px",Tt.bottom=-this.handleSize+"px",Tt.width=2*this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.cursor="nesw-resize"}},class extends Qe{setPosition(Tt){this.container.style.left=this.left0+Tt.clientX-this.x0+"px",this.container.style.width=this.width0-(Tt.clientX-this.x0)+"px"}applyStyle(Tt){Tt.left=-this.handleSize+"px",Tt.bottom=`${this.handleSize}px`,Tt.width=2*this.handleSize+"px",Tt.top=`${this.handleSize}px`,Tt.cursor="ew-resize"}},class extends Qe{setPosition(Tt){this.container.style.left=this.left0+Tt.clientX-this.x0+"px",this.container.style.width=this.width0-(Tt.clientX-this.x0)+"px",this.container.style.top=this.top0+Tt.clientY-this.y0+"px",this.container.style.height=this.height0-(Tt.clientY-this.y0)+"px"}applyStyle(Tt){Tt.left=-this.handleSize+"px",Tt.top=-this.handleSize+"px",Tt.width=2*this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.cursor="nwse-resize"}},class extends Qe{setPosition(Tt){this.container.style.top=this.top0+Tt.clientY-this.y0+"px",this.container.style.height=this.height0-(Tt.clientY-this.y0)+"px"}applyStyle(Tt){Tt.left=`${this.handleSize}px`,Tt.right=`${this.handleSize}px`,Tt.height=2*this.handleSize+"px",Tt.top=-this.handleSize+"px",Tt.cursor="ns-resize"}},class extends Qe{setPosition(Tt){this.container.style.top=this.top0+Tt.clientY-this.y0+"px",this.container.style.height=this.height0-(Tt.clientY-this.y0)+"px",this.container.style.width=this.width0+Tt.clientX-this.x0+"px"}applyStyle(Tt){Tt.right=-this.handleSize+"px",Tt.top=-this.handleSize+"px",Tt.height=2*this.handleSize+"px",Tt.width=2*this.handleSize+"px",Tt.cursor="nesw-resize"}},class extends Qe{setPosition(Tt){this.container.style.width=this.width0+Tt.clientX-this.x0+"px"}applyStyle(Tt){Tt.right=-this.handleSize+"px",Tt.top=`${this.handleSize}px`,Tt.bottom=`${this.handleSize}px`,Tt.width=2*this.handleSize+"px",Tt.cursor="ew-resize"}});var tt=e.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(Tt){const Ot=e.ref(!1),jt=e.ref(!1);return{hover:Ot,active:jt,style:function(){let Ut=Tt.windowStyle.button;return Ot.value&&(Ut={...Ut,...this.windowStyle.buttonHover}),jt.value&&(Ut={...Ut,...this.windowStyle.buttonActive}),Ut},mouseup:function(Ut){this.active&&this.$emit("click")},mousedown:function(Ut){Ut.preventDefault(),jt.value=!0;const Wt=We.bindUp(document,()=>{jt.value=!1,Wt()})}}}});const nt=["disabled"];tt.render=function(Tt,Ot,jt,Ut,Wt,Xt){return e.openBlock(),e.createElementBlock("div",{class:"btn",style:e.normalizeStyle(Tt.style()),onMouseenter:Ot[0]||(Ot[0]=tn=>Tt.hover=!0),onMouseleave:Ot[1]||(Ot[1]=tn=>Tt.hover=!1),onMousedown:Ot[2]||(Ot[2]=e.withModifiers((...tn)=>Tt.mousedown&&Tt.mousedown(...tn),["stop"])),onTouchstart:Ot[3]||(Ot[3]=e.withModifiers((...tn)=>Tt.mousedown&&Tt.mousedown(...tn),["stop"])),onMouseup:Ot[4]||(Ot[4]=(...tn)=>Tt.mouseup&&Tt.mouseup(...tn)),onTouchend:Ot[5]||(Ot[5]=(...tn)=>Tt.mouseup&&Tt.mouseup(...tn)),disabled:Tt.disabled},[e.renderSlot(Tt.$slots,"default")],44,nt)},tt.__scopeId="data-v-71662210",tt.__file="src/controls/vuewindow/window/Button.vue";const it=new Set;function ot(Tt){return Tt!==null?parseFloat(Tt):0}function rt(Tt){const Ot=window.getComputedStyle(Tt);return{width:Math.ceil([Ot.paddingLeft,Ot.width,Ot.paddingRight].map(ot).reduce((jt,Ut)=>jt+Ut)),height:Math.ceil([Ot.paddingTop,Ot.height,Ot.paddingBottom].map(ot).reduce((jt,Ut)=>jt+Ut))}}class st{constructor(Ot,jt){this.width=Ot,this.height=jt}}function at(Tt){const Ot=Tt.windowEl;if(Ot){const jt=parseFloat(Ot.style.left||"NaN"),Ut=parseFloat(Ot.style.top||"NaN");if(!isNaN(jt)&&!isNaN(Ut))return{left:jt,top:Ut}}return null}function ct(Tt,Ot,jt,Ut){const Wt=Tt-jt,Xt=Ot-Ut;return Wt*Wt+Xt*Xt}window.addEventListener("resize",Tt=>{it.forEach(Ot=>{Ot?.fixPosition()})});const lt=[];var ut=e.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:tt},setup(Tt,{emit:Ot}){const jt=e.getCurrentInstance();if(!jt)return;const{proxy:Ut}=jt;let Wt=0,Xt,tn,en;const rn=e.ref(Tt.isOpen),an=()=>{lt.push(Ut),en=new He(Tt.zGroup,ln),Tt.isOpen&&(e.nextTick(()=>{Wt++==0&&(Kt(Ut),function(){const pn=hn.value,{width:fn,height:xn}=Ke(pn);let Sn,Cn;if(Tt.left!==void 0!=(Tt.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof Tt.left=="number")Sn=Tt.left,Cn=Tt.top;else{const zn=Tt.positionHint||"auto";switch(zn){case"auto":{let _n=20,Mn=50,Bn=0;do{if(lt.every(Ln=>{if(!Ln.isOpen||Ut==Ln)return!0;const Pn=at(Ln);if(Pn==null)return!0;const{left:Fn,top:Wn}=Pn;return ct(Fn,Wn,_n,Mn)>16}))break;_n=(_n+40)%(window.innerWidth-200),Mn=(Mn+40)%(window.innerHeight-200)}while(++Bn<100);Sn=_n,Cn=Mn}break;case"center":Sn=(window.innerWidth-fn)/2,Cn=(window.innerHeight-xn)/2,console.log(Sn,Cn,window.innerWidth,window.innerHeight,"111111");break;default:try{const _n=zn.split("/").map(Number);if(_n.length!=2)throw null;const[Mn,Bn]=_n;if(!isFinite(Mn)||!isFinite(Bn))throw null;Sn=Mn>=0?Mn:window.innerWidth-fn+Mn,Cn=Bn>=0?Bn:window.innerHeight-xn+Bn}catch{throw new Error(`invalid position string: ${zn}`)}}}pn&&(pn.style.left=`${Sn}px`,pn.style.top=`${Cn}px`)}()),Tt.resizable&&Vt(),mn(),Xt=new $e(yn.value,hn.value,{onMove:()=>mn(),onMoveStart:()=>Ot("move-start"),onMoveEnd:()=>Ot("move-end")}),Tt.resizable&&function(){const{height:pn}=Ke(yn.value);tn=new Je(hn.value,{onResize:()=>Vt(),onResizeStart:()=>Ot("resize-start"),onResizeEnd:()=>Ot("resize-end"),minWidth:Tt.minWidth,minHeight:Tt.minHeight+pn,maxWidth:Tt.maxWidth,maxHeight:Tt.maxHeight?Tt.maxHeight+pn:void 0})}()}),Tt.activateWhenOpen&&gn()),it.add(Ut)};function ln(pn){nn.value.zIndex=`${pn}`}const hn=e.ref(null),yn=e.ref(null),bn=e.ref(null);function gn(){en.raise(),Ot("activate")}const nn=e.ref({...Tt.windowStyle.window,zIndex:"auto",overflow:Tt.overflow}),qt=e.computed(()=>Tt.windowStyle.titlebar),Gt=e.computed(()=>{const pn={...Tt.windowStyle.content};return Tt.resizable?pn.padding="0":Tt.padding!=null&&(pn.padding=`${Tt.padding}px`),Tt.isScrollable&&(pn.overflow="auto"),pn});function Kt(pn){const{width:fn,height:xn,top:Sn,left:Cn}=pn,zn=hn;if(zn&&fn!=null&&(zn.value.style.width=`${fn}px`),xn!=null){const _n=yn.value;if(_n){const Mn=rt(_n).height;zn.value.style.height=`${xn+Mn}px`}}zn&&Cn!=null&&(zn.value.style.left=`${Cn}px`),zn&&Sn!=null&&(zn.value.style.top=`${Sn}px`)}function Vt(pn=!0){const fn=hn.value,xn=yn.value,Sn=bn.value;if(Sn&&fn&&xn){const{width:Cn,height:zn}=rt(Sn),{width:_n,height:Mn}=rt(fn),Bn=rt(xn).height,Ln=_n-(Sn.offsetWidth-Cn),Pn=Mn-Bn-(Sn.offsetHeight-zn);Sn.style.width=`${Ln}px`,Sn.style.height=`${Pn}px`,Jt(),Ot("resize",new st(Ln,Pn)),pn&&(Ot("update:width",Ln),Ot("update:height",Pn))}}function Jt(){const pn=hn.value;if(pn){const fn=pn.getBoundingClientRect();fn.left<0&&(nn.value.left="0px"),fn.top<0&&(nn.value.top="0px"),fn.right>window.innerWidth&&(nn.value.left=window.innerWidth-fn.width+"px"),fn.bottom>window.innerHeight&&(nn.value.top=window.innerHeight-fn.height+"px")}}function mn(pn=!0){Jt();const fn=hn.value;if(fn){const{left:xn,top:Sn}=fn.getBoundingClientRect();pn&&(Ot("update:left",xn),Ot("update:top",Sn))}}return e.watch(()=>Tt.isOpen,pn=>{rn.value=pn}),e.watch(()=>Tt.zGroup,pn=>{en.group=pn}),e.watch(()=>Tt.width,pn=>{Kt({width:pn}),Vt(!1)}),e.watch(()=>Tt.height,pn=>{Kt({height:pn}),Vt(!1)}),e.onMounted(()=>{an()}),e.onBeforeUnmount(()=>{it.delete(this),en.unregister(),tn&&tn.teardown(),Xt&&Xt.teardown(),lt.splice(lt.indexOf(Ut),1)}),{isOpen:rn,windowEl:hn,titlebar:yn,content:bn,activate:gn,styleWindow:nn,styleTitlebar:qt,styleContent:Gt,closeButtonClick:function(){rn.value=!1,Ot("closebuttonclick")}}}});const ht={class:"title"},dt=e.createTextVNode("\xD7");var pt,ft;ut.render=function(Tt,Ot,jt,Ut,Wt,Xt){const tn=e.resolveComponent("myButton");return e.openBlock(),e.createBlock(e.Transition,{name:"fade",onAfterLeave:Ot[2]||(Ot[2]=en=>Tt.$emit("close")),onAfterEnter:Ot[3]||(Ot[3]=en=>Tt.$emit("open"))},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"window",style:e.normalizeStyle(Tt.styleWindow),ref:"windowEl",onMousedown:Ot[0]||(Ot[0]=(...en)=>Tt.activate&&Tt.activate(...en)),onTouchstart:Ot[1]||(Ot[1]=(...en)=>Tt.activate&&Tt.activate(...en))},[e.createElementVNode("div",{class:"titlebar",style:e.normalizeStyle(Tt.styleTitlebar),ref:"titlebar"},[e.createElementVNode("div",ht,[Tt.$slots.title?e.renderSlot(Tt.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(Tt.title),1)],2112))]),Tt.closeButton?(e.openBlock(),e.createBlock(tn,{key:0,windowStyle:Tt.windowStyle,onClick:Tt.closeButtonClick},{default:e.withCtx(()=>[dt]),_:1},8,["windowStyle","onClick"])):e.createCommentVNode("v-if",!0)],4),e.createElementVNode("div",{class:"content",style:e.normalizeStyle(Tt.styleContent),ref:"content"},[e.renderSlot(Tt.$slots,"default")],4)],36),[[e.vShow,Tt.isOpen]])]),_:3})},ut.__file="src/controls/vuewindow/window/index.vue",(ft=pt||(pt={}))[ft.StyleBlack=0]="StyleBlack",ft[ft.StyleWhite=1]="StyleWhite",ft[ft.StyleMetal=2]="StyleMetal";const mt=ut;var gt;exports.LayoutContainerEnum=void 0,(gt=exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}))[gt.top=0]="top",gt[gt.bottom=1]="bottom",gt[gt.centerBack=2]="centerBack",gt[gt.centerMain=3]="centerMain",gt[gt.centerFront=4]="centerFront",gt[gt.left=5]="left",gt[gt.right=6]="right";class vt{constructor(Ot,jt){this.layoutMap=new Map,this.preConditionMap=new Map,this.widgetsLoadedSet=new Set,this.layoutState=Ot,this.widgetCofig=jt,this.widgetCofig.forEach(Ut=>{if(Ut.afterid)if(this.preConditionMap.has(Ut.afterid))this.preConditionMap.get(Ut.afterid)?.add(Ut);else{const Wt=new Set;Wt.add(Ut),this.preConditionMap.set(Ut.afterid,Wt)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(Ot=>Ot.preload&&!Ot.afterid).forEach(Ot=>{this._loadWidget(Ot,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(Ot){if(!Ot)return;let jt;Ee(Ot)?jt=Ot:ke(Ot)&&(jt=this.widgetCofig.find(Ut=>Ut.id===Ot)),jt&&this._loadWidget(jt,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(Ot){this.preConditionMap.has(Ot)&&this.preConditionMap.get(Ot)?.forEach(jt=>{jt.preload&&this._loadWidget(jt)})}_loadWidget(Ot,jt){if(!this.widgetsLoadedSet.has(Ot.id))return Ot.component().then(Ut=>{if(Ut.default){const Wt=e.markRaw(Ut.default);this.getContainerComponents(Ot.container).value.set(Ot.id,Wt),this.widgetsLoadedSet.add(Ot.id),R.EventBus.emit(z.WidgetLoadedEvent,Ot.id),jt&&jt(Ot.id)}})}hasDependentWidgets(Ot){let jt=!1;if(this.preConditionMap.has(Ot)){const Ut=this.preConditionMap.get(Ot);if(Ut){for(const Wt of Ut)if(this.isWidgetLoaded(Wt.id)){jt=!0;break}}}return jt}unloadWidget(Ot){if(!Ot||!this.isWidgetLoaded(Ot))return;const jt=this.widgetCofig.find(Ut=>Ut.id===Ot);if(jt){if(this.preConditionMap.has(Ot)){const Ut=this.preConditionMap.get(Ot);if(Ut)for(const Wt of Ut)this.unloadWidget(Wt.id)}this.getContainerComponents(jt.container).value.delete(Ot),this.widgetsLoadedSet.delete(Ot),R.EventBus.emit(z.WidgetUnLoadedEvent,Ot)}}isWidgetLoaded(Ot){return this.widgetsLoadedSet.has(Ot)}splitTwoContainer(Ot=!1){const jt=this.layoutState.centerMainContainer,Ut=this.layoutState.centerBackContainer;Ot?(jt&&(jt.style.left="0",jt.style.width="100%"),Ut&&(Ut.style.width="100%")):(jt&&(jt.style.left="50%",jt.style.width="50%"),Ut&&(Ut.style.width="50%"))}getLayoutContainer(Ot){switch(Ot){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(Ot,jt=!1){const Ut=this.getLayoutContainer(Ot);Ut&&(Ut.style.visibility=jt?"visible":"hidden")}changeWidgetVisible(Ot,jt=!1){const Ut=this.getWidgetComponent(Ot);Ut&&R.EventBus.emit(z.WidgetVisibleChanged,{id:Ot,name:Ut.name,visible:jt})}getWidgetComponent(Ot){if(this.widgetsLoadedSet.has(Ot)){const jt=this.widgetCofig.find(Ut=>Ut.id===Ot);if(jt)return this.getContainerComponents(jt.container).value.get(Ot)}}getWigetItem(Ot){return this.widgetCofig.find(jt=>jt.id===Ot)}getGroupWigetItems(Ot){return this.widgetCofig.filter(jt=>jt.group===Ot)}getContainerComponents(Ot){if(this.layoutMap.has(Ot))return this.layoutMap.get(Ot);{const jt=e.ref(new Map);return this.layoutMap.set(Ot,jt),jt}}addContainerComponent(Ot,jt){}}var yt=e.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutStyle:{type:Object}},components:{},setup(Tt,{attrs:Ot,slots:jt,emit:Ut}){const Wt=e.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0});if(!R.LayoutManager){const bn=new vt(Wt,Tt.widgetConfig);R.LayoutManager=bn,bn.preloadWidgets()}const Xt=hn(exports.LayoutContainerEnum.top),tn=hn(exports.LayoutContainerEnum.centerBack),en=hn(exports.LayoutContainerEnum.centerFront),rn=hn(exports.LayoutContainerEnum.left),an=hn(exports.LayoutContainerEnum.right),ln=hn(exports.LayoutContainerEnum.bottom);function hn(bn){return R.LayoutManager?.getContainerComponents(bn)}const yn=e.computed(()=>Tt.layoutStyle);return{...e.toRefs(Wt),topContainerComponents:Xt,centerbackComponents:tn,centerfrontComponents:en,leftContainerComponents:rn,rightContainerComponents:an,bottomContainerComponents:ln,containerStyle:yn}}});const wt={ref:"topContainer",class:"topContainer"},bt={ref:"centerBackContainer",class:"centerdiv backContainer"},xt={ref:"centerMainContainer",class:"centerdiv mainContainer"},St={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Ct={ref:"leftContainer",class:"leftContainer"},Et={ref:"rightContainer",class:"rightContainer"},kt={ref:"bottomContainer",class:"bottomContainer"};yt.render=function(Tt,Ot,jt,Ut,Wt,Xt){const tn=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{class:"layoutContainer",style:e.normalizeStyle(Tt.containerStyle)},[e.createElementVNode("div",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.topContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createElementVNode("div",null,[e.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),e.createElementVNode("div",bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.centerbackComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),e.createElementVNode("div",xt,[e.createVNode(tn,null,{default:e.withCtx(({Component:en})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(en)))]),_:1})],512),e.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),e.createElementVNode("div",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.centerfrontComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createElementVNode("div",Ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.leftContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512),e.createElementVNode("div",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.rightContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512)]),e.createElementVNode("div",kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Tt.bottomContainerComponents,([en,rn])=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(rn),{key:en}))),128))],512)],4)},yt.__file="src/controls/layoutcontainer/layout.vue";const zt=new Map,_t=new Map;let Mt;const Lt={getDefaultClient(){if(Mt||(Mt=new B(SysConfig.DefaultHproseAPI)),!Mt)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Mt},registerHprose(Tt,Ot){const jt=_t.get(Tt);if(!jt){const Ut=new B(Ot);zt.set(Tt,Ut)}return jt},getHprose:Tt=>_t?.get(Tt),getProxyHprose:Tt=>zt.get(Tt),unregisterHprose(Tt){zt.get(Tt)&&(_t.delete(Tt),zt.delete(Tt))}},Bt={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"},It=R.Config.ServiceURL.LoginAuthURL;function Pt(){const Tt=j();Tt&&W(Bt.RefreshToken,It,{refreshToken:Tt}).then(Ot=>{Nt(Ot.data)})}function Rt(Tt){R.User||(R.User={id:Tt.id,name:Tt.name});const Ot=new Date().getTime(),jt=new Date(Tt.expire).getTime()-Ot;jt>0&&(jt<=4e3?Pt():setTimeout(Pt,jt-4e3))}function Nt(Tt){R.User&&(R.User.doubleToken=Tt);const Ot=new Date().getTime(),jt=new Date(Tt.accessToken.expires).getTime()-Ot;if(jt>0&&R.User){const Ut={id:R.User.id,name:R.User.name,token:Tt.accessToken.tokenContent,expire:Tt.accessToken.expires,refresh:Tt.refreshToken.tokenContent};A.set("access_token",Ut,jt/1e3),Rt(Ut)}else A.remove("access_token")}function Dt(Tt){R.User=Tt}const At=R.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{constructor(Tt,Ot,jt=5){this.ChunkUnitM=1048576,this.totalChunks=1,this.fileMetaData=null,this.finishNum=0,this.isStarting=!1,this.fileID=Tt,this.downloadURL=Ot,this.chunkByteSize=jt*this.ChunkUnitM,this.eventTarget=E(),this.initIndexDB()}on(Tt,Ot){this.eventTarget.on(Tt,Ot)}dispatch(Tt,Ot){this.eventTarget.emit(Tt,Ot)}dispatchError(Tt){this.eventTarget.emit("error",Tt)}dispatchInfo(Tt){this.eventTarget.emit("info",Tt)}async queryDownloadFileMeta(Tt,Ot="",jt){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const Ut=await W(Ot,Tt,jt);let Wt=null;return Ut&&Ut.status===200&&(Wt=Ut.data),Wt}async getIFileMeta(){if(this.fileMetaData===null){const Tt=await this.currentDB?.getItem("fileinfo");this.fileMetaData=Tt||null}return this.fileMetaData}initIndexDB(){this.currentDB=me.createInstance({name:this.fileID,driver:me.INDEXEDDB})}async init(Tt){if(this.finishNum=0,Tt){const Ot="fileinfo";this.fileMetaData={id:Tt.id,name:Tt.name,length:Tt.length,downloadID:Tt.downloadID,chunkSize:this.chunkByteSize},this.fileName=Tt.name,this.currentDB?.setItem(Ot,this.fileMetaData)}if(this.fileMetaData!=null){const Ot=this.fileMetaData.chunkSize;Ot!=null&&Ot>0&&(this.chunkByteSize=Ot)}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(),me.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")}download(Tt){Tt&&(this.downloadURL=Tt);const Ot=this.downloadURL;if(!Ot)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const jt=R.Axios.CancelToken;this.cancelSource=jt.source(),this.isStarting=!0;const Ut={key:this.fileMetaData?.downloadID};let Wt=0;for(let Xt=0;Xt<this.totalChunks;Xt++){if(this.keys&&this.keys?.indexOf(Xt.toString())>=0){Wt++,Wt>this.finishNum&&(this.finishNum=Wt,this.downloadProgress());continue}const tn=Xt*this.chunkByteSize;let en=tn+this.chunkByteSize-1;this.fileMetaData&&en>this.fileMetaData.length&&(en=this.fileMetaData.length-1);const rn={range:`bytes=${tn}-${en}`},an=Xt.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${Xt+1}/${this.totalChunks}`),W("",Ot,Ut,rn,"arraybuffer",this.cancelSource?.token).then(ln=>{const hn=ln.data;this.currentDB?.setItem(an,hn),Wt++,Wt>this.finishNum&&(this.finishNum=Wt,this.downloadProgress());const yn=parseInt(an)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${yn}/${this.totalChunks}`),this.savefile()})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const Tt=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",Tt)}outputProgress(Tt){const Ot=100*Tt/this.totalChunks;this.dispatch("saveProgress",Ot)}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");const Tt=ve.createWriteStream(this.fileName).getWriter();let Ot=0;for(let jt=0;jt<this.totalChunks;jt++){const Ut=jt.toString(),Wt=await this.currentDB?.getItem(Ut);let Xt=new Response(Wt).body;if(Xt===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${jt+1}\uFF09\u4E2A\u9519\u8BEF\uFF0C\u9000\u51FA\uFF01`);const tn=Xt.getReader();for(;;){const{done:en,value:rn}=await tn.read();if(en)break;Tt.write(rn)}Ot++,this.outputProgress(Ot),this.dispatchInfo(`\u5B8C\u6210\u7B2C${jt+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}Tt.close(),me.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=_,exports.DownloadByUrl=function({url:Tt,target:Ot="_blank",fileName:jt}){const Ut=new URL(Tt).host==location.host;return new Promise((Wt,Xt)=>{if(Ut){const tn=document.createElement("a");if(tn.href=Tt,tn.target=Ot,tn.download!==void 0&&(tn.download=jt||M(Tt)),document.createEvent){const en=document.createEvent("MouseEvents");return en.initEvent("click",!0,!0),tn.dispatchEvent(en),Wt(!0)}return Tt.indexOf("?")===-1&&(Tt+="?download"),window.open(Tt,Ot),Wt(!0)}{const tn=document.createElement("canvas"),en=document.createElement("img");en.setAttribute("crossOrigin","Anonymous"),en.src=Tt,en.onload=rn=>{tn.width=en.width,tn.height=en.height,tn.getContext("2d").drawImage(en,0,0,en.width,en.height),tn.toBlob(an=>{const ln=document.createElement("a");ln.href=window.URL.createObjectURL(an),ln.download=M(Tt),ln.click(),URL.revokeObjectURL(ln.href),Wt(!0)},"image/jpeg")},en.onerror=rn=>Xt(rn)}})},exports.Global=R,exports.GlobalHprose=Lt,exports.GlobalMitt=k,exports.H5Tool=d,exports.HproseClient=L,exports.HttpDownload=(Tt,Ot,jt)=>{Tt.get(Ot).then(function(Ut){_(Ut.data,jt)}).catch(Ut=>{console.warn(Ut),k.emit(z.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(Tt,Ot)=>{const jt=JSON.stringify(Tt,null,2);Ot?_(jt,Ot+".json"):k.emit(z.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},exports.LayoutContainer=yt,exports.LayoutManager=class{constructor(Tt,Ot){this.layoutMap=new Map,this.preConditionMap=new Map,this.widgetsLoadedSet=new Set,this.layoutState=Tt,this.widgetCofig=Ot,this.widgetCofig.forEach(jt=>{if(jt.afterid)if(this.preConditionMap.has(jt.afterid))this.preConditionMap.get(jt.afterid)?.add(jt);else{const Ut=new Set;Ut.add(jt),this.preConditionMap.set(jt.afterid,Ut)}})}getWidgetConfig(){return this.widgetCofig}preloadWidgets(){this.widgetCofig.filter(Tt=>Tt.preload&&!Tt.afterid).forEach(Tt=>{this._loadWidget(Tt,this.loadOtherDependenceWidgets.bind(this))})}loadWidget(Tt){if(!Tt)return;let Ot;Ee(Tt)?Ot=Tt:ke(Tt)&&(Ot=this.widgetCofig.find(jt=>jt.id===Tt)),Ot&&this._loadWidget(Ot,this.loadOtherDependenceWidgets.bind(this))}loadOtherDependenceWidgets(Tt){this.preConditionMap.has(Tt)&&this.preConditionMap.get(Tt)?.forEach(Ot=>{Ot.preload&&this._loadWidget(Ot)})}_loadWidget(Tt,Ot){if(!this.widgetsLoadedSet.has(Tt.id))return Tt.component().then(jt=>{if(jt.default){const Ut=e.markRaw(jt.default);this.getContainerComponents(Tt.container).value.set(Tt.id,Ut),this.widgetsLoadedSet.add(Tt.id),R.EventBus.emit(z.WidgetLoadedEvent,Tt.id),Ot&&Ot(Tt.id)}})}hasDependentWidgets(Tt){let Ot=!1;if(this.preConditionMap.has(Tt)){const jt=this.preConditionMap.get(Tt);if(jt){for(const Ut of jt)if(this.isWidgetLoaded(Ut.id)){Ot=!0;break}}}return Ot}unloadWidget(Tt){if(!Tt||!this.isWidgetLoaded(Tt))return;const Ot=this.widgetCofig.find(jt=>jt.id===Tt);if(Ot){if(this.preConditionMap.has(Tt)){const jt=this.preConditionMap.get(Tt);if(jt)for(const Ut of jt)this.unloadWidget(Ut.id)}this.getContainerComponents(Ot.container).value.delete(Tt),this.widgetsLoadedSet.delete(Tt),R.EventBus.emit(z.WidgetUnLoadedEvent,Tt)}}isWidgetLoaded(Tt){return this.widgetsLoadedSet.has(Tt)}splitTwoContainer(Tt=!1){const Ot=this.layoutState.centerMainContainer,jt=this.layoutState.centerBackContainer;Tt?(Ot&&(Ot.style.left="0",Ot.style.width="100%"),jt&&(jt.style.width="100%")):(Ot&&(Ot.style.left="50%",Ot.style.width="50%"),jt&&(jt.style.width="50%"))}getLayoutContainer(Tt){switch(Tt){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(Tt,Ot=!1){const jt=this.getLayoutContainer(Tt);jt&&(jt.style.visibility=Ot?"visible":"hidden")}changeWidgetVisible(Tt,Ot=!1){const jt=this.getWidgetComponent(Tt);jt&&R.EventBus.emit(z.WidgetVisibleChanged,{id:Tt,name:jt.name,visible:Ot})}getWidgetComponent(Tt){if(this.widgetsLoadedSet.has(Tt)){const Ot=this.widgetCofig.find(jt=>jt.id===Tt);if(Ot)return this.getContainerComponents(Ot.container).value.get(Tt)}}getWigetItem(Tt){return this.widgetCofig.find(Ot=>Ot.id===Tt)}getGroupWigetItems(Tt){return this.widgetCofig.filter(Ot=>Ot.group===Tt)}getContainerComponents(Tt){if(this.layoutMap.has(Tt))return this.layoutMap.get(Tt);{const Ot=e.ref(new Map);return this.layoutMap.set(Tt,Ot),Ot}}addContainerComponent(Tt,Ot){}},exports.ObjToUrlParams=function(Tt,Ot){let jt="",Ut="";for(const Wt in Ot)jt+=Wt+"="+encodeURIComponent(Ot[Wt])+"&";return jt=jt.replace(/&$/,""),Ut=/\?$/.test(Tt)?Tt+jt:Tt.replace(/\/?$/,"?")+jt,Ut},exports.Pane=r,exports.ProxyClient=B,exports.SaveAs=function(Tt,Ot){const jt=window.URL||window.webkitURL||window,Ut=new Blob([Tt]),Wt=document.createElement("a");Wt.href=jt.createObjectURL(Ut),Wt.download=Ot,Wt.click(),jt.revokeObjectURL(Wt.href)},exports.Splitpanes=o,exports.Storage=f,exports.StringUtils=p,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.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=z,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=Bt,exports.VCollapsiblePanel=Ne,exports.VCollapsiblePanelGroup=Pe,exports.VWindow=ut,exports.WindowResizeEvent=st,exports.WindowType=mt,exports.calculateBestTextColor=function(Tt){const Ot=b(Tt.substring(1));var jt,Ut;return jt=Ot.split(","),Ut=[0,0,0],(S(~~jt[0],~~jt[1],~~jt[2])+.05)/(S(Ut[0],Ut[1],Ut[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(Tt){return W(Bt.ChangePWD,At,Tt)},exports.checkDoRefreshToken=Rt,exports.checkLogin=async function(Tt){const Ot=(await W(Bt.CheckLogin,At,Tt))?.data;return Ot&&Ot.isSuccess&&(Dt(Ot.resultValue),Nt(Ot.resultValue.doubleToken)),Ot},exports.checkToken=function(Tt){return W(Bt.CheckToken,At,{token:Tt})},exports.clearLocalToken=O,exports.colorIsDark=function(Tt){if(!w(Tt))return;const[Ot,jt,Ut]=b(Tt).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(Wt=>Number(Wt));return .299*Ot+.578*jt+.114*Ut<192},exports.createFileUpload=Tt=>new se(Tt),exports.darken=function(Tt,Ot){return Tt=Tt.indexOf("#")>=0?Tt.substring(1,Tt.length):Tt,Ot=Math.trunc(255*Ot/100),`#${C(Tt.substring(0,2),Ot)}${C(Tt.substring(2,4),Ot)}${C(Tt.substring(4,6),Ot)}`},exports.deepMerge=function Tt(Ot={},jt={}){let Ut;for(Ut in jt)Ot[Ut]=Ee(Ot[Ut])?Tt(Ot[Ut],jt[Ut]):Ot[Ut]=jt[Ut];return Ot},exports.doRefreshToken=Pt,exports.get=function(Tt,Ot){return W(Tt,void 0,Ot)},exports.getData=function(Tt,Ot){return R.Axios?.get(Tt,{params:Ot}).catch(function(jt){console.log(jt),R.Message?.err("\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})},exports.getHexColor=function(Tt){const Ot=Tt.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),jt=parseFloat(Ot[3]||"1"),Ut=Math.floor(jt*parseInt(Ot[0])+255*(1-jt)),Wt=Math.floor(jt*parseInt(Ot[1])+255*(1-jt)),Xt=Math.floor(jt*parseInt(Ot[2])+255*(1-jt));return"#"+("0"+Ut.toString(16)).slice(-2)+("0"+Wt.toString(16)).slice(-2)+("0"+Xt.toString(16)).slice(-2)},exports.getLocalToken=T,exports.getLockState=function(){return A.get("is_LockScreen",!1)},exports.getLongHexColor=function(Tt){const Ot=Tt;if(Ot.length===4){let Ut="#";for(var jt=1;jt<4;jt+=1){const Wt=Ot.slice(jt,jt+1);Ut+=Wt.concat(Wt)}return Ut}return Ot},exports.getProxyClient=D,exports.getRGBColor=function(Tt){var Ot=Tt.toLowerCase();if(w(Tt)){if(Ot.length===4){for(var jt="#",Ut=1;Ut<4;Ut+=1){const Xt=Ot.slice(Ut,Ut+1);jt+=Xt.concat(Xt)}Ot=jt}var Wt=[];for(Ut=1;Ut<7;Ut+=2)Wt.push(parseInt("0x"+Ot.slice(Ut,Ut+2)));return"rgb("+Wt.join(",")+")"}return Ot},exports.getRGBColorFromHSLA=function(Tt){if(!!Tt){var Ot=Tt.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(!!Ot){var jt,Ut,Wt,Xt=(parseFloat(Ot[1])%360+360)%360/360,tn=parseFloat(Ot[2])/(/%$/.test(Ot[2])?100:1),en=parseFloat(Ot[3])/(/%$/.test(Ot[3])?100:1);if(tn===0)jt=Ut=Wt=en;else{var rn=en<=.5?en*(tn+1):en+tn-en*tn,an=2*en-rn;jt=y(an,rn,Xt+1/3),Ut=y(an,rn,Xt),Wt=y(an,rn,Xt-1/3)}return`rgba(${jt=Math.round(255*jt)},${Ut=Math.round(255*Ut)},${Wt=Math.round(255*Wt)},${Ot[4]?parseFloat(Ot[4]):1})`}}},exports.getRefreshToken=j,exports.hexToRGB=b,exports.init=N,exports.initDefaultProxyClient=function(Tt){const Ot=D(Tt);return Ot&&(R.DefaultProxyClient=Ot),Ot},exports.initXFrame=function(Tt){N(Tt.message,Tt.axios,Tt.defaultHproseURL),Tt.config&&(R.Config=Tt.config)},exports.is=we,exports.isArray=ze,exports.isAsyncFunction=function(Tt){return we(Tt,"AsyncFunction")},exports.isBoolean=function(Tt){return Tt===!0||Tt===!1||we(Tt,"Boolean")},exports.isClient=()=>typeof window!="undefined",exports.isDate=function(Tt){return we(Tt,"Date")},exports.isDef=xe,exports.isElement=Tt=>Ee(Tt)&&!!Tt.tagName,exports.isEmpty=function(Tt){return Tt==null||(ke(Tt)||ze(Tt)?Tt.length===0:!!Ee(Tt)&&JSON.stringify(Tt)==="{}")},exports.isEnumColor=function(Tt){if(typeof Tt=="object"||!Tt)return;const Ot=Tt.toLowerCase().substr(0,1);return Ot==="#"?exports.EnumColor.Hex:Ot==="r"||Ot==="("?exports.EnumColor.RGBA:Ot==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(Tt){return we(Tt,"Error")},exports.isFunction=be,exports.isHexColor=w,exports.isImageDom=function(Tt){return Tt&&["IMAGE","IMG"].includes(Tt.tagName)},exports.isMap=function(Tt){return we(Tt,"Map")},exports.isNull=Ce,exports.isNullAndUnDef=function(Tt){return Se(Tt)&&Ce(Tt)},exports.isNullOrUnDef=function(Tt){return Se(Tt)||Ce(Tt)},exports.isNumber=function(Tt){return we(Tt,"Number")},exports.isObject=Ee,exports.isPromise=function(Tt){return we(Tt,"Promise")&&Ee(Tt)&&be(Tt.then)&&be(Tt.catch)},exports.isServer=_e,exports.isString=ke,exports.isSymbol=function(Tt){return we(Tt,"Symbol")},exports.isUnDef=Se,exports.isValidURL=Tt=>/^(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(Tt),exports.isWeakMap=function(Tt){return we(Tt,"WeakMap")},exports.isWeakSet=function(Tt){return we(Tt,"WeakSet")},exports.isWindow=Tt=>typeof window!="undefined"&&we(Tt,"Window"),exports.jquery=ae,exports.lighten=function(Tt,Ot){return Tt=Tt.indexOf("#")>=0?Tt.substring(1,Tt.length):Tt,Ot=Math.trunc(255*Ot/100),`#${x(Tt.substring(0,2),Ot)}${x(Tt.substring(2,4),Ot)}${x(Tt.substring(4,6),Ot)}`},exports.login=async function(Tt){const Ot=(await W(Bt.Login,At,Tt))?.data;return Ot&&Ot.isSuccess&&(Dt(Ot.resultValue),Nt(Ot.resultValue.doubleToken)),Ot},exports.logout=function(){const Tt=T();Tt&&(F(Bt.Logout,At,{token:Tt.token,reftoken:Tt.refresh}),O())},exports.newGuid=function(){var Tt=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Ot){var jt=(Tt+16*Math.random())%16|0;return Tt=Math.floor(Tt/16),(Ot==="x"?jt:3&jt|8).toString(16)})},exports.onLockListener=function(){pe(),document.addEventListener("mousedown",pe)},exports.post=function(Tt,Ot){return F(Tt,void 0,Ot)},exports.requestGet=W,exports.requestPost=F,exports.requestPostBody=function(Tt,Ot,jt,Ut,Wt,Xt="json"){const tn=U(Ut,Ot,Wt,Xt);return R.Axios?.post(Tt,jt,tn).catch(function(en){console.log(en),R.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+Tt)})},exports.rgbToHex=function(Tt,Ot,jt){const Ut=(Tt<<16|Ot<<8|jt).toString(16);return"#"+new Array(Math.abs(Ut.length-7)).join("0")+Ut},exports.setLocalToken=Nt,exports.setUser=Dt,exports.sleep=function(Tt){for(var Ot=new Date().getTime();new Date().getTime()-Ot<Tt;);console.log(`\u5F3A\u5236\u7B49\u5F85${Tt}\u6BEB\u79D2`)},exports.storage=m,exports.storageHelper=A,exports.unLockListener=function(){document.removeEventListener("mousedown",pe)},exports.uuid=g;
17
+ `}}});const ji={class:"vcp__header-title"},Fi={key:0,class:"vcp__header-icon"},Hi=["innerHTML"],$i={key:0,ref:"bodyRef",class:"vcp__body"},qi={ref:"bodyContentRef",class:"vcp__body-content"};function Ct(e){return window.TouchEvent&&e instanceof TouchEvent}Re.render=function(e,t,n,i,r,l){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]=(...w)=>e.toggle&&e.toggle(...w))},[g.createElementVNode("div",ji,[g.renderSlot(e.$slots,"title")]),e.body.hasContent?(g.openBlock(),g.createElementBlock("div",Fi,[g.renderSlot(e.$slots,"icon",{},()=>[g.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,Hi)])])):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",$i,[g.createElementVNode("div",qi,[g.renderSlot(e.$slots,"content")],512)],512)):g.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Re.__scopeId="data-v-08c94cf8",Re.__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 Ct(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Ct(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new xt(this.clientX,this.clientY)}static bindDown(t,n,i,r=!1){const l=y=>{n(new Y(y))},w=y=>{y.touches.length===1&&n(new Y(y)),y.touches.length>1&&i&&i(new Y(y))};return t.addEventListener("mousedown",l,r),t.addEventListener("touchstart",w,r),()=>{t.removeEventListener("mousedown",l,r),t.removeEventListener("touchstart",w,r)}}static bindMove(t,n,i=!1){const r=w=>{n(new Y(w))},l=w=>{w.touches.length===1&&n(new Y(w))};return t.addEventListener("mousemove",r,i),t.addEventListener("touchmove",l,i),()=>{t.removeEventListener("mousemove",r,i),t.removeEventListener("touchmove",l,i)}}static bindUp(t,n,i=!1){const r=w=>{n(new Y(w))},l=w=>{w.touches.length===0&&n(new Y(w))};return t.addEventListener("mouseup",r,i),t.addEventListener("touchend",l,i),()=>{t.removeEventListener("mouseup",r,i),t.removeEventListener("touchend",l,i)}}originalEvent({mouse:t,touch:n}){Ct(this.e)?n&&n(this.e):t&&t(this.e)}}class xt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new xt(this.x,this.y)}}class Vi{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 Xi{_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=Ne(this._group),i=Ne(t);n.splice(n.indexOf(this),1),i.push(this),gn()}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(Ne(this._group)),gn()}}const De=new Map;function Ne(e){return De.has(e)||De.set(e,[]),De.get(e)}function mn(e,t){return e>t?-mn(t,e):e<0&&t>=0?1:e-t}function gn(){let e=0;for(const t of function(n){const i=[];return n.forEach((r,l)=>i.push(l)),i}(De).sort(mn))for(const n of Ne(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=Ae(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 Ae(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height,r=t.top,l=t.left;return{width:n,height:i,top:r,left:l,bottom:r+i,right:l+n}}class Gi{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=vn.map(C=>new C(t,this));const{width:i,height:r}=Et(t),l=n.maxWidth||window.innerWidth,w=n.maxHeight||window.innerHeight;let y=!1;(i<n.minWidth||i>l)&&(t.style.width=`${yn(i,n.minWidth,l)}px`,y=!0),(r<n.minHeight||r>w)&&(t.style.height=`${yn(r,n.minHeight,w)}px`,y=!0),y&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const vn=[];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:l}=Ae(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=i,this.width0=r,this.height0=l,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}=Ae(this.container),l=this.helper.options,w=l.maxWidth||window.innerWidth,y=l.maxHeight||window.innerHeight;this.minLeft=Math.max(i-w,0),this.maxLeft=i-l.minWidth,this.minRight=t+l.minWidth,this.maxRight=Math.min(t+w,window.innerWidth),this.minTop=Math.max(r-y,0),this.maxTop=r-l.minHeight,this.minBottom=n+l.minHeight,this.maxBottom=Math.min(n+y,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:l,bottom:w}=Ae(this.container),y=this.helper.options;y&&(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=`${y.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):l<this.minRight?this.container.style.width=`${y.minWidth}px`:l>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=`${y.minHeight}px`,this.container.style.top=`${this.maxTop}px`):w<this.minBottom?this.container.style.height=`${y.minHeight}px`:w>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 yn(e,t,n){return e<t?t:e>n?n:e}vn.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 Te=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 Ki=["disabled"];Te.render=function(e,t,n,i,r,l){return g.openBlock(),g.createElementBlock("div",{class:"btn",style:g.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=w=>e.hover=!0),onMouseleave:t[1]||(t[1]=w=>e.hover=!1),onMousedown:t[2]||(t[2]=g.withModifiers((...w)=>e.mousedown&&e.mousedown(...w),["stop"])),onTouchstart:t[3]||(t[3]=g.withModifiers((...w)=>e.mousedown&&e.mousedown(...w),["stop"])),onMouseup:t[4]||(t[4]=(...w)=>e.mouseup&&e.mouseup(...w)),onTouchend:t[5]||(t[5]=(...w)=>e.mouseup&&e.mouseup(...w)),disabled:e.disabled},[g.renderSlot(e.$slots,"default")],44,Ki)},Te.__scopeId="data-v-71662210",Te.__file="src/controls/vuewindow/window/Button.vue";const kt=new Set;function wn(e){return e!==null?parseFloat(e):0}function Oe(e){const t=window.getComputedStyle(e);return{width:Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(wn).reduce((n,i)=>n+i)),height:Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(wn).reduce((n,i)=>n+i))}}class bn{width;height;constructor(t,n){this.width=t,this.height=n}}function Yi(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 Ji(e,t,n,i){const r=e-n,l=t-i;return r*r+l*l}window.addEventListener("resize",e=>{kt.forEach(t=>{t?.fixPosition()})});const Ue=[];var We=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:Te},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,l,w,y;const C=g.ref(e.isOpen),x=()=>{Ue.push(i),y=new Xi(e.zGroup,M),e.isOpen&&(g.nextTick(()=>{r++==0&&(d(i),function(){const B=_.value,{width:I,height:U}=Et(B);let W,j;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")W=e.left,j=e.top;else{const $=e.positionHint||"auto";switch($){case"auto":{let q=20,V=50,Q=0;do{if(Ue.every(J=>{if(!J.isOpen||i==J)return!0;const te=Yi(J);if(te==null)return!0;const{left:$e,top:qe}=te;return Ji($e,qe,q,V)>16}))break;q=(q+40)%(window.innerWidth-200),V=(V+40)%(window.innerHeight-200)}while(++Q<100);W=q,j=V}break;case"center":W=(window.innerWidth-I)/2,j=(window.innerHeight-U)/2,console.log(W,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=$.split("/").map(Number);if(q.length!=2)throw null;const[V,Q]=q;if(!isFinite(V)||!isFinite(Q))throw null;W=V>=0?V:window.innerWidth-I+V,j=Q>=0?Q:window.innerHeight-U+Q}catch{throw new Error(`invalid position string: ${$}`)}}}B&&(B.style.left=`${W}px`,B.style.top=`${j}px`)}()),e.resizable&&u(),P(),l=new Vi(A.value,_.value,{onMove:()=>P(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(A.value);w=new Gi(_.value,{onResize:()=>u(),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&&R()),kt.add(i)};function M(B){b.value.zIndex=`${B}`}const _=g.ref(null),A=g.ref(null),O=g.ref(null);function R(){y.raise(),t("activate")}const b=g.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),c=g.computed(()=>e.windowStyle.titlebar),h=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 d(B){const{width:I,height:U,top:W,left:j}=B,$=_;if($&&I!=null&&($.value.style.width=`${I}px`),U!=null){const q=A.value;if(q){const V=Oe(q).height;$.value.style.height=`${U+V}px`}}$&&j!=null&&($.value.style.left=`${j}px`),$&&W!=null&&($.value.style.top=`${W}px`)}function u(B=!0){const I=_.value,U=A.value,W=O.value;if(W&&I&&U){const{width:j,height:$}=Oe(W),{width:q,height:V}=Oe(I),Q=Oe(U).height,J=q-(W.offsetWidth-j),te=V-Q-(W.offsetHeight-$);W.style.width=`${J}px`,W.style.height=`${te}px`,p(),t("resize",new bn(J,te)),B&&(t("update:width",J),t("update:height",te))}}function p(){const B=_.value;if(B){const I=B.getBoundingClientRect();I.left<0&&(b.value.left="0px"),I.top<0&&(b.value.top="0px"),I.right>window.innerWidth&&(b.value.left=window.innerWidth-I.width+"px"),I.bottom>window.innerHeight&&(b.value.top=window.innerHeight-I.height+"px")}}function P(B=!0){p();const I=_.value;if(I){const{left:U,top:W}=I.getBoundingClientRect();B&&(t("update:left",U),t("update:top",W))}}return g.watch(()=>e.isOpen,B=>{C.value=B}),g.watch(()=>e.zGroup,B=>{y.group=B}),g.watch(()=>e.width,B=>{d({width:B}),u(!1)}),g.watch(()=>e.height,B=>{d({height:B}),u(!1)}),g.onMounted(()=>{x()}),g.onBeforeUnmount(()=>{kt.delete(this),y.unregister(),w&&w.teardown(),l&&l.teardown(),Ue.splice(Ue.indexOf(i),1)}),{isOpen:C,windowEl:_,titlebar:A,content:O,activate:R,styleWindow:b,styleTitlebar:c,styleContent:h,closeButtonClick:function(){C.value=!1,t("closebuttonclick")}}}});const Zi={class:"title"},Qi=g.createTextVNode("\xD7");var Sn,le;We.render=function(e,t,n,i,r,l){const w=g.resolveComponent("myButton");return g.openBlock(),g.createBlock(g.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=y=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=y=>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]=(...y)=>e.activate&&e.activate(...y)),onTouchstart:t[1]||(t[1]=(...y)=>e.activate&&e.activate(...y))},[g.createElementVNode("div",{class:"titlebar",style:g.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[g.createElementVNode("div",Zi,[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(w,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:g.withCtx(()=>[Qi]),_: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})},We.__file="src/controls/vuewindow/window/index.vue",(le=Sn||(Sn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const eo=We;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 to{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;he(t)?n=t:Be(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),N.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),N.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&&N.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 zt=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(!N.LayoutManager){const O=new to(r,e.widgetConfig);N.LayoutManager=O,O.preloadWidgets()}const l=_(exports.LayoutContainerEnum.top),w=_(exports.LayoutContainerEnum.centerBack),y=_(exports.LayoutContainerEnum.centerFront),C=_(exports.LayoutContainerEnum.left),x=_(exports.LayoutContainerEnum.right),M=_(exports.LayoutContainerEnum.bottom);function _(O){return N.LayoutManager?.getContainerComponents(O)}const A=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:l,centerbackComponents:w,centerfrontComponents:y,leftContainerComponents:C,rightContainerComponents:x,bottomContainerComponents:M,containerStyle:A}}});const no={ref:"topContainer",class:"topContainer"},io={ref:"centerBackContainer",class:"centerdiv backContainer"},oo={ref:"centerMainContainer",class:"centerdiv mainContainer"},ro={ref:"centerFrontContainer",class:"centerdiv centerContainer"},so={ref:"leftContainer",class:"leftContainer"},ao={ref:"rightContainer",class:"rightContainer"},co={ref:"bottomContainer",class:"bottomContainer"};zt.render=function(e,t,n,i,r,l){const w=g.resolveComponent("router-view");return g.openBlock(),g.createElementBlock("div",{class:"layoutContainer",style:g.normalizeStyle(e.containerStyle)},[g.createElementVNode("div",no,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.topContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createElementVNode("div",null,[g.createCommentVNode(" \u5E95\u5C42-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",io,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerbackComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668 "),g.createElementVNode("div",oo,[g.createVNode(w,null,{default:g.withCtx(({Component:y})=>[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(y)))]),_:1})],512),g.createCommentVNode(" \u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),g.createElementVNode("div",ro,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.centerfrontComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createElementVNode("div",so,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512),g.createElementVNode("div",ao,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512)]),g.createElementVNode("div",co,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([y,C])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(C),{key:y}))),128))],512)],4)},zt.__file="src/controls/layoutcontainer/layout.vue";const je=new Map,Mt=new Map;let Fe;const uo={getDefaultClient(){if(Fe||(Fe=new be(SysConfig.DefaultHproseAPI)),!Fe)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Fe},registerHprose(e,t){const n=Mt.get(e);if(!n){const i=new be(t);je.set(e,i)}return n},getHprose:e=>Mt?.get(e),getProxyHprose:e=>je.get(e),unregisterHprose(e){je.get(e)&&(Mt.delete(e),je.delete(e))}},de={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"},lo=N.Config.ServiceURL.LoginAuthURL;function _t(){const e=on();e&&ie(de.RefreshToken,lo,{refreshToken:e}).then(t=>{He(t.data)})}function Cn(e){N.User||(N.User={id:e.id,name:e.name});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?_t():setTimeout(_t,n-4e3))}function He(e){N.User&&(N.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&N.User){const i={id:N.User.id,name:N.User.name,token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent};ce.set("access_token",i,n/1e3),Cn(i)}else ce.remove("access_token")}function Lt(e){N.User=e}const Ce=N.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;constructor(e,t,n=5){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=ct(),this.initIndexDB()}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 ie(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=Le.createInstance({name:this.fileID,driver:Le.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(),Le.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")}download(e){e&&(this.downloadURL=e);const t=this.downloadURL;if(!t)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const n=N.Axios.CancelToken;this.cancelSource=n.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;for(let l=0;l<this.totalChunks;l++){if(this.keys&&this.keys?.indexOf(l.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const w=l*this.chunkByteSize;let y=w+this.chunkByteSize-1;this.fileMetaData&&y>this.fileMetaData.length&&(y=this.fileMetaData.length-1);const C={range:`bytes=${w}-${y}`},x=l.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${l+1}/${this.totalChunks}`),ie("",t,i,C,"arraybuffer",this.cancelSource?.token).then(M=>{const _=M.data;this.currentDB?.setItem(x,_),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const A=parseInt(x)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${A}/${this.totalChunks}`),this.savefile()})}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");const e=Ti.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString(),r=await this.currentDB?.getItem(i);let l=new Response(r).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u9519\u8BEF\uFF0C\u9000\u51FA\uFF01`);const w=l.getReader();for(;;){const{done:y,value:C}=await w.read();if(y)break;e.write(C)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Le.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=ut,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const i=new URL(e).host==location.host;return new Promise((r,l)=>{if(i){const w=document.createElement("a");if(w.href=e,w.target=t,w.download!==void 0&&(w.download=n||en(e)),document.createEvent){const y=document.createEvent("MouseEvents");return y.initEvent("click",!0,!0),w.dispatchEvent(y),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const w=document.createElement("canvas"),y=document.createElement("img");y.setAttribute("crossOrigin","Anonymous"),y.src=e,y.onload=C=>{w.width=y.width,w.height=y.height,w.getContext("2d").drawImage(y,0,0,y.width,y.height),w.toBlob(x=>{if(x){const M=document.createElement("a");M.href=window.URL.createObjectURL(x),M.download=en(e),M.click(),URL.revokeObjectURL(M.href),r(!0)}},"image/jpeg")},y.onerror=C=>l(C)}})},exports.Global=N,exports.GlobalHprose=uo,exports.GlobalMitt=ge,exports.H5Tool=ae,exports.HproseClient=we,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){ut(i.data,n)}).catch(i=>{console.warn(i),ge.emit(X.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(e,t)=>{const n=JSON.stringify(e,null,2);t?ut(n,t+".json"):ge.emit(X.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},exports.LayoutContainer=zt,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;he(e)?t=e:Be(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),N.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),N.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&&N.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=et,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=wi,exports.Storage=it,exports.StringUtils=ke,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=de,exports.VCollapsiblePanel=Re,exports.VCollapsiblePanelGroup=Pe,exports.VWindow=We,exports.WindowResizeEvent=bn,exports.WindowType=eo,exports.calculateBestTextColor=function(e){const t=rt(e.substring(1));var n,i;return n=t.split(","),i=[0,0,0],(Qt(~~n[0],~~n[1],~~n[2])+.05)/(Qt(i[0],i[1],i[2])+.05)>=12?"#000000":"#FFFFFF"},exports.changePWD=function(e){return ie(de.ChangePWD,Ce,e)},exports.checkDoRefreshToken=Cn,exports.checkLogin=async function(e){const t=(await ie(de.CheckLogin,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),He(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return ie(de.CheckToken,Ce,{token:e})},exports.clearLocalToken=ht,exports.colorIsDark=function(e){if(!Me(e))return;const[t,n,i]=rt(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*i<192},exports.createFileUpload=e=>new Di(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${at(e.substring(0,2),t)}${at(e.substring(2,4),t)}${at(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let i;for(i in n)t[i]=he(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=_t,exports.get=function(e,t){return ie(e,void 0,t)},exports.getData=function(e,t){return N.Axios?.get(e,{params:t}).catch(function(n){console.log(n),N.Message?.err("\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A"+e)})},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)),l=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+l.toString(16)).slice(-2)},exports.getLocalToken=_e,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=nn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Me(e)){if(t.length===4){for(var n="#",i=1;i<4;i+=1){const l=t.slice(i,i+1);n+=l.concat(l)}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,l=(parseFloat(t[1])%360+360)%360/360,w=parseFloat(t[2])/(/%$/.test(t[2])?100:1),y=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(w===0)n=i=r=y;else{var C=y<=.5?y*(w+1):y+w-y*w,x=2*y-C;n=ot(x,C,l+1/3),i=ot(x,C,l),r=ot(x,C,l-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=on,exports.hexToRGB=rt,exports.init=tn,exports.initDefaultProxyClient=function(e){const t=nn(e);return t&&(N.DefaultProxyClient=t),t},exports.initXFrame=function(e){tn(e.message,e.axios,e.defaultHproseURL),e.config&&(N.Config=e.config)},exports.is=G,exports.isArray=fn,exports.isAsyncFunction=function(e){return G(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||G(e,"Boolean")},exports.isClient=()=>typeof window!="undefined",exports.isDate=function(e){return G(e,"Date")},exports.isDef=dn,exports.isElement=e=>he(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Be(e)||fn(e)?e.length===0:!!he(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=yt,exports.isHexColor=Me,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return G(e,"Map")},exports.isNull=bt,exports.isNullAndUnDef=function(e){return wt(e)&&bt(e)},exports.isNullOrUnDef=function(e){return wt(e)||bt(e)},exports.isNumber=function(e){return G(e,"Number")},exports.isObject=he,exports.isPromise=function(e){return G(e,"Promise")&&he(e)&&yt(e.then)&&yt(e.catch)},exports.isServer=Ui,exports.isString=Be,exports.isSymbol=function(e){return G(e,"Symbol")},exports.isUnDef=wt,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!="undefined"&&G(e,"Window"),exports.jquery=Ni,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${st(e.substring(0,2),t)}${st(e.substring(2,4),t)}${st(e.substring(4,6),t)}`},exports.login=async function(e){const t=(await ie(de.Login,Ce,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),He(t.resultValue.doubleToken)),t},exports.logout=function(){const e=_e();e&&(ft(de.Logout,Ce,{token:e.token,reftoken:e.refresh}),ht())},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(){vt(),document.addEventListener("mousedown",vt)},exports.post=function(e,t){return ft(e,void 0,t)},exports.requestGet=ie,exports.requestPost=ft,exports.requestPostBody=function(e,t,n,i,r,l="json"){const w=dt(i,t,r,l);return N.Axios?.post(e,n,w).catch(function(y){console.log(y),N.Message?.err("\u670D\u52A1Post\u8BF7\u6C42\u9519\u8BEF\uFF1A"+e)})},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=He,exports.setUser=Lt,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=Si,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",vt)},exports.uuid=ze;