xframelib 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.cjs +3 -3
- package/dist/index.css +90 -90
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("vue"),ze=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,_=C.max<100&&l<=100-(C.max+this.sumNextPanesSize(t+1));if(x||_)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 M=this.doPushOtherPanes(n,l);if(!M)return;({sums:n,panesToResize:w}=M),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 me=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,R=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(R,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(R,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(R,d),R}function w(b){var c,h,d,u,p,P,B=b.length,R=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(R,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(R,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(R,d),R}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 _(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 M(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function N(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 D(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 I(){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,R=b(c,B),U=B;return h!==e&&(U=b(h,B)),R>U?new ArrayBuffer(0):(d=U-R,u=new ArrayBuffer(d),p=new Uint8Array(u),P=new Uint8Array(this,R,d),p.set(P),u)}}(),I.prototype.append=function(b){return this.appendBinary(x(b)),this},I.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},I.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=D(h)),this.reset(),h},I.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},I.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.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)},I.hash=function(b,c){return I.hashBinary(x(b),c)},I.hashBinary=function(b,c){var h=C(l(b));return c?D(h):h},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(b){var c,h=N(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},I.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=D(h)),this.reset(),h},I.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.ArrayBuffer.prototype.getState=function(){var b=I.prototype.getState.call(this);return b.buff=M(b.buff),b},I.ArrayBuffer.prototype.setState=function(b){return b.buff=_(b.buff,!0),I.prototype.setState.call(this,b)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(b,c){var h=C(w(new Uint8Array(b)));return c?D(h):h},I}();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 _e{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class 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 Me(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&Number(e[19])|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}var ge;function 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 Le(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function rt(e){let t=e.toLowerCase();if(Le(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,(ge=exports.EnumColor||(exports.EnumColor={}))[ge.RGBA=0]="RGBA",ge[ge.Hex=1]="Hex",ge[ge.Hsla=2]="Hsla";const ve=ct(),V={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},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 be{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!_e.isNullOrEmpty(t)){if(be.httpTransport||(be.httpTransport=new yi.HttpTransport),this.client=new ze.Client(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):ve.emit(V.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}const ce=new it("user",localStorage);function he(){return ce.get("access_token")}function lt(){ce.remove("access_token"),T.User&&delete T.User}function tn(){return he()?.refresh}class Se{hproseClient;hpProxyObj;defaultContext=new ze.ClientContext;constructor(t){this.hproseClient=new be(t),this.hpProxyObj=null}getClientContext(t,n){const i={};n&&(i.requestHeaders=n);const r=he();i.httpRequestHeaders=t||{};const l=i.httpRequestHeaders;return r&&(l.token=r.token),new ze.ClientContext(i)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||ve.emit(V.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=he();return console.log(r,"userToken3"),r&&(n||(n=new ze.ClientContext({httpRequestHeaders:{token:r.token}}))),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(V.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 ht=new Map,T={Config:SysConfig,EventBus:ve,DefaultProxyClient:null,Axios:void 0},nn=function(e,t,n){n?T.Config.DefaultHproseAPI=n:!T.Config.DefaultHproseAPI&&T.Config.ServiceURL&&(T.Config.DefaultHproseAPI=T.Config.ServiceURL.DefaultHproseAPI),t&&(T.Axios=t),T.Config.DefaultHproseAPI&&_e.isNotEmpty(T.Config.DefaultHproseAPI)&&(T.DefaultProxyClient=new Se(T.Config.DefaultHproseAPI));const i=new Ci(e,T.EventBus);T.Message=i,T.EventBus.on(V.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),T.EventBus.on(V.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),T.EventBus.on(V.CommonWarnEvent,r=>{i.warn(r)})};function on(e){if(e&&_e.isNotEmpty(e)){if(ht.has(e))return ht.get(e);{const t=new Se(e);return ht.set(e,t),t}}}function dt(e,t,n,i="json",r){const l={baseURL:T.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+he()?.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,w){const y=dt(n,t,i,r,l);return w&&w>=2e4&&(y.timeout=w),T.Axios?.get(e,y).catch(function(C){console.error(C);const x=`http\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;T.EventBus.emit(V.AxiosRequestErrorEvent,x)})}function ft(e,t,n,i,r,l="json",w){const y=dt(i,t,r,l);w&&w>=2e4&&(y.timeout=w);const C=function(x){let _=new FormData;return x&&Object.keys(x).forEach(M=>{if(!x)return;let N=x[M];var D;N!=null&&_.append(M,(D=N)instanceof Blob?D:D.toString())}),_}(n);return T.Axios?.post(e,C,y).catch(function(x){console.error(x);const _=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;T.EventBus.emit(V.AxiosRequestErrorEvent,_)})}var pt={exports:{}},xi=typeof window!="undefined"?window:me!==void 0?me: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)_i.call(n,i)&&(e[i]=n[i])}return e},_i=Object.prototype.hasOwnProperty,rn=xi,Mi=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 Mi(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:M,headers:{},url:_,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,_=C.url=e.uri||e.url,M=C.method=e.method||"GET",N=e.body||e.data,D=C.headers=e.headers||{},I=!!e.sync,b=!1,c={body:void 0,headers:{},statusCode:0,method:M,url:_,rawRequest:C};if("json"in e&&e.json!==!1&&(b=!0,D.accept||D.Accept||(D.Accept="application/json"),M!=="GET"&&M!=="HEAD"&&(D["content-type"]||D["Content-Type"]||(D["Content-Type"]="application/json"),N=JSON.stringify(e.json===!0?N: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,_,!I,e.username,e.password),I||(C.withCredentials=!!e.withCredentials),!I&&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 D)D.hasOwnProperty(w)&&C.setRequestHeader(w,D[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(N||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 Ri=[200,201,202,204,308],Pi=[408,502,503,504];class Ai{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&&Ri.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&&Pi.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 Di=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),Ce={isLock:cn,lockTime:cn=="true"?ln():0};function un(e){Ce.isLock=e,ce.set("is_LockScreen",e,10),e&&(lt(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function ln(){let e=3600;return T.Config.UI?.LockTime&&T.Config.UI?.LockTime>=10&&(e=T.Config.UI.LockTime),e}let gt;function vt(){clearInterval(gt),window.location.href.indexOf("/login")>0||Ce.isLock||(un(!1),Ce.lockTime=ln(),gt=setInterval(()=>{if(Ce.lockTime--,Ce.lockTime<=0)return un(!0),clearInterval(gt)},1e3))}var Ni={exports:{}},Be=Ni.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 _=n[y]={exports:{}};t[y][0].call(_.exports,function(M){var N=t[y][1][M];return r(N||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(N),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 I=i.document.createElement("script");I.onreadystatechange=function(){N(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},i.document.documentElement.appendChild(I)}:function(){setTimeout(N,0)};else{var _=new i.MessageChannel;_.port1.onmessage=N,r=function(){_.port2.postMessage(0)}}var M=[];function N(){var I,b;l=!0;for(var c=M.length;c;){for(b=M,M=[],I=-1;++I<c;)b[I]();c=M.length}l=!1}function D(I){M.push(I)!==1||l||r()}t.exports=D}).call(this,me!==void 0?me: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&&D(this,u)}function _(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 M(u,p,P){i(function(){var B;try{B=p(P)}catch(R){return l.reject(u,R)}B===u?l.reject(u,new TypeError("Cannot resolve promise with itself")):l.resolve(u,B)})}function N(u){var p=u&&u.then;if(u&&(typeof u=="object"||typeof u=="function")&&typeof p=="function")return function(){p.apply(u,arguments)}}function D(u,p){var P=!1;function B(j){P||(P=!0,l.reject(u,j))}function R(j){P||(P=!0,l.resolve(u,j))}function U(){p(R,B)}var W=I(U);W.status==="error"&&B(W.value)}function I(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 R=new Array(P),U=0,W=-1,j=new this(r);++W<P;)H(u[W],W);return j;function H(q,X){function Q(J){R[X]=J,++U!==P||B||(B=!0,l.resolve(j,R))}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 R=-1,U=new this(r);++R<P;)W(u[R]);return U;function W(j){p.resolve(j).then(function(H){B||(B=!0,l.resolve(U,H))},function(H){B||(B=!0,l.reject(U,H))})}}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?M(P,this.state===y?u:p,this.outcome):this.queue.push(new _(P,u,p)),P},_.prototype.callFulfilled=function(u){l.resolve(this.promise,u)},_.prototype.otherCallFulfilled=function(u){M(this.promise,this.onFulfilled,u)},_.prototype.callRejected=function(u){l.reject(this.promise,u)},_.prototype.otherCallRejected=function(u){M(this.promise,this.onRejected,u)},l.resolve=function(u,p){var P=I(N,p);if(P.status==="error")return l.reject(u,P.value);var B=P.value;if(B)D(u,B);else{u.state=y,u.outcome=p;for(var R=-1,U=u.queue.length;++R<U;)u.queue[R].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,me!==void 0?me: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 _(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function M(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function N(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="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(I,u),m=C([""]);a.objectStore(I).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 R(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);R(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(I)}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 H(o){return j(o,!1)}function q(o){return j(o,!0)}function X(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 qe(o){var s=this,a=s._initReady().then(function(){var m=c[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return M(a,o,o),a}function Ve(o){R(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,H(o).then(function(v){return o.db=v,X(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 Ve(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=qe);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,H(a)}).then(function(L){return a.db=L,X(a,s._defaultConfig.version)?q(a):L}).then(function(L){a.db=f.db=L,s._dbInfo=a;for(var A=0;A<z.length;A++){var O=z[A];O!==s&&(O._dbInfo.db=a.db,O._dbInfo.version=a.version)}})}function En(o,s){var a=this;o=N(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,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 A=L.value;te(A)&&(A=J(A));var O=o(A,L.key,z++);O!==void 0?f(O):L.continue()}else f()},k.onerror=function(){v(k.error)}}catch(L){v(L)}})}).catch(v)});return _(m,s),m}function zn(o,s,a){var m=this;o=N(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 A=L.objectStore(m._dbInfo.storeName);k===null&&(k=void 0);var O=A.put(k,o);L.oncomplete=function(){k===void 0&&(k=null),v(k)},L.onabort=L.onerror=function(){var F=O.error?O.error:O.transaction.error;S(F)}}catch(F){S(F)}})}).catch(S)});return _(f,a),f}function _n(o,s){var a=this;o=N(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,s),m}function Mn(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 _(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 _(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 A=L.result;A?o===0||z?f(A.key):(z=!0,A.advance(o)):f(null)},L.onerror=function(){v(L.error)}}catch(A){v(A)}})}).catch(v)});return _(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 _(a,o),a}function Rn(o,s){s=D.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;if(o.name){var v=o.name===a.name&&f._dbInfo.db?x.resolve(f._dbInfo.db):H(o).then(function(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;R(o);var k=c[o.name],z=k.forages;S.close();for(var L=0;L<z.length;L++){var A=z[L];A._dbInfo.db=null,A._dbInfo.version=E}return new x(function(O,F){var $=w.open(o.name,E);$.onerror=function(ee){$.result.close(),F(ee)},$.onupgradeneeded=function(){$.result.deleteObjectStore(o.storeName)},$.onsuccess=function(){var ee=$.result;ee.close(),O(ee)}}).then(function(O){k.db=O;for(var F=0;F<z.length;F++){var $=z[F];$._dbInfo.db=O,U($._dbInfo)}}).catch(function(O){throw(W(o,O)||x.resolve()).catch(function(){}),O})}}):v.then(function(S){R(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,A){var O=w.deleteDatabase(o.name);O.onerror=function(){var F=O.result;F&&F.close(),A(O.error)},O.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},O.onsuccess=function(){var F=O.result;F&&F.close(),L(F)}}).then(function(L){E.db=L;for(var A=0;A<k.length;A++)U(k[A]._dbInfo)}).catch(function(L){throw(W(o,L)||x.resolve()).catch(function(){}),L})})}else m=x.reject("Invalid arguments");return _(m,s),m}var Pn={_driver:"asyncStorage",_initStorage:xn,_support:y(),iterate:kn,getItem:En,setItem:zn,removeItem:_n,clear:Mn,length:Ln,key:Bn,keys:In,dropInstance:Rn};function An(){return typeof openDatabase=="function"}var re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dn="~~local_forage_type~",It=/^~~local_forage_type~([^~]+)~/,Ee="__lfsc__:",Xe=Ee.length,Ge="arbf",Ke="blob",Rt="si08",Pt="ui08",At="uic8",Dt="si16",Nt="si32",Tt="ur16",Ot="ui32",Ut="fl32",Wt="fl64",jt=Xe+Ge.length,Ft=Object.prototype.toString;function $t(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 Ye(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 Nn(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=Ee;o instanceof ArrayBuffer?(m=o,f+=Ge):(m=o.buffer,a==="[object Int8Array]"?f+=Rt:a==="[object Uint8Array]"?f+=Pt:a==="[object Uint8ClampedArray]"?f+=At:a==="[object Int16Array]"?f+=Dt:a==="[object Uint16Array]"?f+=Tt:a==="[object Int32Array]"?f+=Nt: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+Ye(m))}else if(a==="[object Blob]"){var v=new FileReader;v.onload=function(){var S=Dn+o.type+"~"+Ye(this.result);s(Ee+Ke+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,Xe)!==Ee)return JSON.parse(o);var s,a=o.substring(jt),m=o.substring(Xe,jt);if(m===Ke&&It.test(a)){var f=a.match(It);s=f[1],a=a.substring(f[0].length)}var v=$t(a);switch(m){case Ge:return v;case Ke:return C([v],{type:s});case Rt:return new Int8Array(v);case Pt:return new Uint8Array(v);case At:return new Uint8ClampedArray(v);case Dt:return new Int16Array(v);case Tt:return new Uint16Array(v);case Nt: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 Je={serialize:Nn,deserialize:Tn,stringToBuffer:$t,bufferToString:Ye};function Ht(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){Ht(E,a,function(){s._dbInfo=a,v()},function(k,z){S(z)})},S)});return a.serializer=Je,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):Ht(k,s,function(){k.executeSql(a,m,f,v)},v)},v):v(S,E)},v)}function Un(o,s){var a=this;o=N(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,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,A=L.length,O=0;O<A;O++){var F=L.item(O),$=F.value;if($&&($=S.serializer.deserialize($)),($=o($,F.key,O+1))!==void 0)return void f($)}f()},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function qt(o,s,a,m){var f=this;o=N(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,A){A?E(A):z.db.transaction(function(O){se(O,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[o,L],function(){S(k)},function(F,$){E($)})},function(O){if(O.code===O.QUOTA_ERR){if(m>0)return void S(qt.apply(f,[o,k,a,m-1]));E(O)}})})}).catch(E)});return _(v,a),v}function jn(o,s,a){return qt.apply(this,[o,s,a,1])}function Fn(o,s){var a=this;o=N(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,s),m}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,"DELETE FROM "+v.storeName,[],function(){m()},function(E,k){f(k)})})}).catch(f)});return _(a,o),a}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,"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 _(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,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 _(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=D.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=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($,ee){k.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(Kt,we){ee(we)})})}for(var L=[],A=0,O=v.storeNames.length;A<O;A++)L.push(z(v.storeNames[A]));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:An(),iterate:Wn,getItem:Un,setItem:jn,removeItem:Fn,clear:$n,length:Hn,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=Je,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 _(a,o),a}function ti(o,s){var a=this;o=N(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,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 A=localStorage.getItem(L);if(A&&(A=f.serializer.deserialize(A)),(A=o(A,L.substring(S),k++))!==void 0)return A}}});return _(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,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 _(a,o),a}function ri(o){var s=this.keys().then(function(a){return a.length});return _(s,o),s}function si(o,s){var a=this;o=N(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return _(m,s),m}function ai(o,s,a){var m=this;o=N(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(A){A.name!=="QuotaExceededError"&&A.name!=="NS_ERROR_DOM_QUOTA_REACHED"||E(A),E(A)}})})});return _(f,a),f}function ci(o,s){if(s=D.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=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]"},ye={},Gt={},pe={INDEXEDDB:Pn,WEBSQL:Kn,LOCALSTORAGE:ui},di=[pe.INDEXEDDB._driver,pe.WEBSQL._driver,pe.LOCALSTORAGE._driver],ke=["dropInstance"],Ze=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ke),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 Qe(){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),pe)if(pe.hasOwnProperty(a)){var m=pe[a],f=m._driver;this[a]=f,ye[f]||this.defineDriver(m)}this._defaultConfig=Qe({},fi),this._config=Qe({},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=Ze.concat("_initStorage"),L=0,A=z.length;L<A;L++){var O=z[L];if((!hi(ke,O)||s[O])&&typeof s[O]!="function")return void S(k)}(function(){for(var $=function(gi){return function(){var vi=new Error("Method "+gi+" is not implemented by the current driver"),Yt=x.reject(vi);return _(Yt,arguments[arguments.length-1]),Yt}},ee=0,Kt=ke.length;ee<Kt;ee++){var we=ke[ee];s[we]||(s[we]=$(we))}})();var F=function($){ye[E]&&console.info("Redefining LocalForage driver: "+E),ye[E]=s,Gt[E]=$,v()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(F,S):F(!!s._support):F(!0)}catch($){S($)}});return M(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=ye[s]?x.resolve(ye[s]):x.reject(new Error("Driver not found."));return M(f,a,m),f},o.prototype.getSerializer=function(s){var a=x.resolve(Je);return M(a,s),a},o.prototype.ready=function(s){var a=this,m=a._driverSet.then(function(){return a._ready===null&&(a._ready=a._initDriver()),a._ready});return M(m,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;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 A=0;function O(){for(;A<L.length;){var F=L[A];return A++,f._dbInfo=null,f._ready=null,f.getDriver(F).then(E).catch(O)}S();var $=new Error("No available storage method found.");return f._driverSet=x.reject($),f._driverSet}return O()}}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(A){f._driver=A._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}),M(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!Gt[s]},o.prototype._extend=function(s){Qe(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=Ze.length;s<a;s++)pi(this,Ze[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=mi},{3:3}]},{},[4])(4),hn={exports:{}};(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,N){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,b=null,c=null,h=null;if(Number.isFinite(M)?([N,M]=[M,N],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),D.size=N,D.writableStrategy=M):M&&M.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),D.size=N,D.writableStrategy=M):D=M||{},!w){n||(n=l?x(C.mitm):function(P){const B="width=200,height=100",R=document.createDocumentFragment(),U={frame:t.open(P,"popup",B),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...j){R.addEventListener(...j)},dispatchEvent(...j){R.dispatchEvent(...j)},removeEventListener(...j){R.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,_=encodeURIComponent(_.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const u={transferringReadable:i,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+_,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+_}};D.size&&(u.headers["Content-Length"]=D.size);const p=[u,"*",[c.port2]];if(i){const P=y==="iframe"?void 0:{transform(R,U){if(!(R instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");I+=R.length,U.enqueue(R),b&&(location.href=b,b=null)},flush(){b&&(location.href=b)}};h=new C.TransformStream(P,D.writableStrategy,D.readableStrategy);const B=h.readable;c.port1.postMessage({readableStream:B},[B])}c.port1.onmessage=P=>{P.data.download&&(y==="navigate"?(n.remove(),n=null,I?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),I+=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=_,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}},D.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"/mitm.html"};function x(_){if(!_)throw new Error("meh");const M=document.createElement("iframe");return M.hidden=!0,M.src=_,M.loaded=!1,M.name="iframe",M.isIframe=!0,M.postMessage=(...N)=>M.contentWindow.postMessage(...N),M.addEventListener("load",()=>{M.loaded=!0},{once:!0}),document.body.appendChild(M),M}try{new Response(new ReadableStream),l&&!("serviceWorker"in navigator)&&(w=!0)}catch{w=!0}return(_=>{try{_()}catch{}})(()=>{const{readable:_}=new TransformStream,M=new MessageChannel;M.port1.postMessage(_,[_]),M.port1.close(),M.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 de=e=>e!==null&&G(e,"Object");function Ie(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,Re=(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-${Me()}`),{setGroupAccordionStatus:n}=pn(),i={"--base-color":e.baseColor,"--border-color":Re(e.baseColor,180),"--bg-color-header":Re(e.baseColor,140),"--bg-color-header-hover":Re(e.baseColor,190),"--bg-color-header-active":Re(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 Ae=g.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${Me()}`,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:Me()})),_=g.computed(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),M=g.computed(()=>w(_.value,n).value&&x.value.hasContent);return g.onMounted(()=>{C(_.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:M,collapse:N=>{N.style.height="0"},expand:N=>{N.style.height=`${N.scrollHeight}px`},toggle:()=>{x.value.hasContent&&y(_.value,n)},toggleIcon:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("vue"),ze=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,S=this.panes[w[1]]||null;const x=y.max<100&&l>=y.max+n.prevPanesSize,_=S.max<100&&l<=100-(S.max+this.sumNextPanesSize(t+1));if(x||_)x?(y.size=y.max,S.size=Math.max(100-y.max-n.prevPanesSize-n.nextPanesSize,0)):(y.size=Math.max(100-S.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),S.size=S.max);else{if(this.pushOtherPanes){const M=this.doPushOtherPanes(n,l);if(!M)return;({sums:n,panesToResize:w}=M),y=this.panes[w[0]]||null,S=this.panes[w[1]]||null}y!==null&&(y.size=Math.min(Math.max(l-n.prevPanesSize-n.prevReachedMinPanes,y.min),y.max)),S!==null&&(S.size=Math.min(Math.max(100-l-n.nextPanesSize-n.nextReachedMinPanes,S.min),S.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 me=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,R=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(R,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(R,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(R,d),R}function w(b){var c,h,d,u,p,P,B=b.length,R=[1732584193,-271733879,-1732584194,271733878];for(c=64;c<=B;c+=64)n(R,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(R,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(R,d),R}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 S(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 _(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 M(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function T(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 N(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 I(){this.reset()}return S(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,R=b(c,B),U=B;return h!==e&&(U=b(h,B)),R>U?new ArrayBuffer(0):(d=U-R,u=new ArrayBuffer(d),p=new Uint8Array(u),P=new Uint8Array(this,R,d),p.set(P),u)}}(),I.prototype.append=function(b){return this.appendBinary(x(b)),this},I.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},I.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=S(this._hash),b&&(h=N(h)),this.reset(),h},I.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},I.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.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)},I.hash=function(b,c){return I.hashBinary(x(b),c)},I.hashBinary=function(b,c){var h=S(l(b));return c?N(h):h},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(b){var c,h=T(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},I.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=S(this._hash),b&&(h=N(h)),this.reset(),h},I.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.ArrayBuffer.prototype.getState=function(){var b=I.prototype.getState.call(this);return b.buff=M(b.buff),b},I.ArrayBuffer.prototype.setState=function(b){return b.buff=_(b.buff,!0),I.prototype.setState.call(this,b)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(b,c){var h=S(w(new Uint8Array(b)));return c?N(h):h},I}();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(S){w.append(S.target?.result);const x=w.end();n({isOK:!0,data:x})},y.onerror=function(){const S="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(S),n({isOK:!1,data:S})},function(){const S=2097152>=l.size?l.size:2097152;y.readAsArrayBuffer(r.call(l,0,S))}()}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 _e{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>t!==null&&t!==""&&t!==void 0&&t.length!==0;static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class 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 Ci=new it("",localStorage);function Me(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&Number(e[19])|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}var ge;function 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 Le(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function rt(e){let t=e.toLowerCase();if(Le(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,(ge=exports.EnumColor||(exports.EnumColor={}))[ge.RGBA=0]="RGBA",ge[ge.Hex=1]="Hex",ge[ge.Hsla=2]="Hsla";const ve=ct(),V={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},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 be{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!_e.isNullOrEmpty(t)){if(be.httpTransport||(be.httpTransport=new yi.HttpTransport),this.client=new ze.Client(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):ve.emit(V.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,i){if(this.client)return await this.client.invoke(t,n,i)}encode(t,n,i){return this.client?this.client.codec.encode(t,n,i):void 0}decode(t,n){return this.client?this.client.codec.decode(t,n):void 0}}const ce=new it("user",localStorage);function he(){return ce.get("access_token")}function lt(){ce.remove("access_token"),A.User&&delete A.User}function tn(){return he()?.refresh}class Ce{hproseClient;hpProxyObj;defaultContext=new ze.ClientContext;constructor(t){this.hproseClient=new be(t),this.hpProxyObj=null}getClientContext(t,n){const i={};n&&(i.requestHeaders=n);const r=he();i.httpRequestHeaders=t||{};const l=i.httpRequestHeaders;return r&&(l.token=r.token),new ze.ClientContext(i)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||ve.emit(V.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,i)}async hproseInvokeContext(t,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=he();return console.log(r,"userToken3"),r&&(n||(n=new ze.ClientContext({httpRequestHeaders:{token:r.token}}))),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 Si{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(V.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 ht=new Map,A={Config:SysConfig,EventBus:ve,DefaultProxyClient:null,Axios:void 0},nn=function(e,t,n){n?A.Config.DefaultHproseAPI=n:!A.Config.DefaultHproseAPI&&A.Config.ServiceURL&&(A.Config.DefaultHproseAPI=A.Config.ServiceURL.DefaultHproseAPI),t&&(A.Axios=t),A.Config.DefaultHproseAPI&&_e.isNotEmpty(A.Config.DefaultHproseAPI)&&(A.DefaultProxyClient=new Ce(A.Config.DefaultHproseAPI));const i=new Si(e,A.EventBus);A.Message=i,A.EventBus.on(V.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),A.EventBus.on(V.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;i.warn(l)}),A.EventBus.on(V.CommonWarnEvent,r=>{i.warn(r)})};function on(e){if(e&&_e.isNotEmpty(e)){if(ht.has(e))return ht.get(e);{const t=new Ce(e);return ht.set(e,t),t}}}function dt(e,t,n,i="json",r){const l={baseURL:A.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,headers:{"Content-Type":"application/json",Authorization:"bearer "+he()?.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,w){const y=dt(n,t,i,r,l);return w&&w>=2e4&&(y.timeout=w),A.Axios?.get(e,y).catch(function(S){console.error(S);const x=`http\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;A.EventBus.emit(V.AxiosRequestErrorEvent,x)})}function ft(e,t,n,i,r,l="json",w){const y=dt(i,t,r,l);w&&w>=2e4&&(y.timeout=w);const S=function(x){let _=new FormData;return x&&Object.keys(x).forEach(M=>{if(!x)return;let T=x[M];var N;T!=null&&_.append(M,(N=T)instanceof Blob?N:N.toString())}),_}(n);return A.Axios?.post(e,S,y).catch(function(x){console.error(x);const _=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;A.EventBus.emit(V.AxiosRequestErrorEvent,_)})}var pt={exports:{}},xi=typeof window!="undefined"?window:me!==void 0?me: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)_i.call(n,i)&&(e[i]=n[i])}return e},_i=Object.prototype.hasOwnProperty,rn=xi,Mi=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(),S=mt(l.slice(w+1));n[y]===void 0?n[y]=S:(t=n[y],Object.prototype.toString.call(t)==="[object Array]"?n[y].push(S):n[y]=[n[y],S])}return n},Bi=zi;function sn(e,t,n){var i=e;return Mi(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=S.response?S.response:S.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}(S),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&&S.status===void 0?200:S.status===1223?204:S.status;var d=c,u=null;return h!==0?(d={body:i(),statusCode:h,method:M,headers:{},url:_,rawRequest:S},S.getAllResponseHeaders&&(d.headers=Li(S.getAllResponseHeaders()))):u=new Error("Internal XMLHttpRequest Error"),n(u,d,d.body)}}var w,y,S=e.xhr||null;S||(S=e.cors||e.useXDR?new oe.XDomainRequest:new oe.XMLHttpRequest);var x,_=S.url=e.uri||e.url,M=S.method=e.method||"GET",T=e.body||e.data,N=S.headers=e.headers||{},I=!!e.sync,b=!1,c={body:void 0,headers:{},statusCode:0,method:M,url:_,rawRequest:S};if("json"in e&&e.json!==!1&&(b=!0,N.accept||N.Accept||(N.Accept="application/json"),M!=="GET"&&M!=="HEAD"&&(N["content-type"]||N["Content-Type"]||(N["Content-Type"]="application/json"),T=JSON.stringify(e.json===!0?T:e.json))),S.onreadystatechange=function(){S.readyState===4&&setTimeout(l,0)},S.onload=l,S.onerror=r,S.onprogress=function(){},S.onabort=function(){y=!0},S.ontimeout=r,S.open(M,_,!I,e.username,e.password),I||(S.withCredentials=!!e.withCredentials),!I&&e.timeout>0&&(x=setTimeout(function(){if(!y){y=!0,S.abort("timeout");var h=new Error("XMLHttpRequest timeout");h.code="ETIMEDOUT",r(h)}},e.timeout)),S.setRequestHeader)for(w in N)N.hasOwnProperty(w)&&S.setRequestHeader(w,N[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&&(S.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(S),S.send(T||null),S}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 Ri=[200,201,202,204,308],Pi=[408,502,503,504];class Ai{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,S=r.loaded/(r.total??w)*l;this.dispatch("progress",Math.min(y+S,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&&Ri.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&&Pi.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 Di=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&&(lt(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function ln(){let e=3600;return A.Config.UI?.LockTime&&A.Config.UI?.LockTime>=10&&(e=A.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 Ni={exports:{}},Be=Ni.exports=function e(t,n,i){function r(y,S){if(!n[y]){if(!t[y]){if(!S&&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 _=n[y]={exports:{}};t[y][0].call(_.exports,function(M){var T=t[y][1][M];return r(T||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,S=new w(T),x=i.document.createTextNode("");S.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 I=i.document.createElement("script");I.onreadystatechange=function(){T(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},i.document.documentElement.appendChild(I)}:function(){setTimeout(T,0)};else{var _=new i.MessageChannel;_.port1.onmessage=T,r=function(){_.port2.postMessage(0)}}var M=[];function T(){var I,b;l=!0;for(var c=M.length;c;){for(b=M,M=[],I=-1;++I<c;)b[I]();c=M.length}l=!1}function N(I){M.push(I)!==1||l||r()}t.exports=N}).call(this,me!==void 0?me: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"],S=["PENDING"];function x(u){if(typeof u!="function")throw new TypeError("resolver must be a function");this.state=S,this.queue=[],this.outcome=void 0,u!==r&&N(this,u)}function _(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 M(u,p,P){i(function(){var B;try{B=p(P)}catch(R){return l.reject(u,R)}B===u?l.reject(u,new TypeError("Cannot resolve promise with itself")):l.resolve(u,B)})}function T(u){var p=u&&u.then;if(u&&(typeof u=="object"||typeof u=="function")&&typeof p=="function")return function(){p.apply(u,arguments)}}function N(u,p){var P=!1;function B(j){P||(P=!0,l.reject(u,j))}function R(j){P||(P=!0,l.resolve(u,j))}function U(){p(R,B)}var W=I(U);W.status==="error"&&B(W.value)}function I(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 R=new Array(P),U=0,W=-1,j=new this(r);++W<P;)H(u[W],W);return j;function H(q,X){function Q(J){R[X]=J,++U!==P||B||(B=!0,l.resolve(j,R))}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 R=-1,U=new this(r);++R<P;)W(u[R]);return U;function W(j){p.resolve(j).then(function(H){B||(B=!0,l.resolve(U,H))},function(H){B||(B=!0,l.reject(U,H))})}}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!==S?M(P,this.state===y?u:p,this.outcome):this.queue.push(new _(P,u,p)),P},_.prototype.callFulfilled=function(u){l.resolve(this.promise,u)},_.prototype.otherCallFulfilled=function(u){M(this.promise,this.onFulfilled,u)},_.prototype.callRejected=function(u){l.reject(this.promise,u)},_.prototype.otherCallRejected=function(u){M(this.promise,this.onRejected,u)},l.resolve=function(u,p){var P=I(T,p);if(P.status==="error")return l.reject(u,P.value);var B=P.value;if(B)N(u,B);else{u.state=y,u.outcome=p;for(var R=-1,U=u.queue.length;++R<U;)u.queue[R].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,me!==void 0?me: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 S(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 _(o,s){s&&o.then(function(a){s(null,a)},function(a){s(a)})}function M(o,s,a){typeof s=="function"&&o.then(s),typeof a=="function"&&o.catch(a)}function T(o){return typeof o!="string"&&(console.warn(o+" used as a key, but it is not a string."),o=String(o)),o}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="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(I,u),m=S([""]);a.objectStore(I).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 R(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);R(o),o.db.close()}var f=[o.name];s&&f.push(o.version);var v=w.open.apply(w,f);s&&(v.onupgradeneeded=function(C){var E=v.result;try{E.createObjectStore(o.storeName),C.oldVersion<=1&&E.createObjectStore(I)}catch(k){if(k.name!=="ConstraintError")throw k;console.warn('The database "'+o.name+'" has been upgraded from version '+C.oldVersion+" to version "+C.newVersion+', but the storage "'+o.storeName+'" already exists.')}}),v.onerror=function(C){C.preventDefault(),m(v.error)},v.onsuccess=function(){var C=v.result;C.onversionchange=function(E){E.target.close()},a(C),U(o)}})}function H(o){return j(o,!1)}function q(o){return j(o,!0)}function X(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 S([p(atob(o.data))],{type:o.type})}function te(o){return o&&o.__local_forage_encoded_blob}function qe(o){var s=this,a=s._initReady().then(function(){var m=c[s._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return M(a,o,o),a}function Ve(o){R(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,H(o).then(function(v){return o.db=v,X(o)?q(o):v}).then(function(v){o.db=s.db=v;for(var C=0;C<a.length;C++)a[C]._dbInfo.db=v}).catch(function(v){throw 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 Ve(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=qe);var v=[];function C(){return x.resolve()}for(var E=0;E<f.forages.length;E++){var k=f.forages[E];k!==s&&v.push(k._initReady().catch(C))}var z=f.forages.slice(0);return x.all(v).then(function(){return a.db=f.db,H(a)}).then(function(L){return a.db=L,X(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 O=z[D];O!==s&&(O._dbInfo.db=a.db,O._dbInfo.version=a.version)}})}function En(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,d,function(C,E){if(C)return v(C);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,s),m}function kn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,d,function(C,E){if(C)return v(C);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 O=o(D,L.key,z++);O!==void 0?f(O):L.continue()}else f()},k.onerror=function(){v(k.error)}}catch(L){v(L)}})}).catch(v)});return _(m,s),m}function zn(o,s,a){var m=this;o=T(o);var f=new x(function(v,C){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 C(z);try{var D=L.objectStore(m._dbInfo.storeName);k===null&&(k=void 0);var O=D.put(k,o);L.oncomplete=function(){k===void 0&&(k=null),v(k)},L.onabort=L.onerror=function(){var F=O.error?O.error:O.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return _(f,a),f}function _n(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){ne(a._dbInfo,u,function(C,E){if(C)return v(C);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,s),m}function Mn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,u,function(v,C){if(v)return f(v);try{var E=C.objectStore(s._dbInfo.storeName).clear();C.oncomplete=function(){m()},C.onabort=C.onerror=function(){var k=E.error?E.error:E.transaction.error;f(k)}}catch(k){f(k)}})}).catch(f)});return _(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,C){if(v)return f(v);try{var E=C.objectStore(s._dbInfo.storeName).count();E.onsuccess=function(){m(E.result)},E.onerror=function(){f(E.error)}}catch(k){f(k)}})}).catch(f)});return _(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(C,E){if(C)return v(C);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,s),m}function In(o){var s=this,a=new x(function(m,f){s.ready().then(function(){ne(s._dbInfo,d,function(v,C){if(v)return f(v);try{var E=C.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 _(a,o),a}function Rn(o,s){s=N.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;if(o.name){var v=o.name===a.name&&f._dbInfo.db?x.resolve(f._dbInfo.db):H(o).then(function(C){var E=c[o.name],k=E.forages;E.db=C;for(var z=0;z<k.length;z++)k[z]._dbInfo.db=C;return C});m=o.storeName?v.then(function(C){if(C.objectStoreNames.contains(o.storeName)){var E=C.version+1;R(o);var k=c[o.name],z=k.forages;C.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(O,F){var $=w.open(o.name,E);$.onerror=function(ee){$.result.close(),F(ee)},$.onupgradeneeded=function(){$.result.deleteObjectStore(o.storeName)},$.onsuccess=function(){var ee=$.result;ee.close(),O(ee)}}).then(function(O){k.db=O;for(var F=0;F<z.length;F++){var $=z[F];$._dbInfo.db=O,U($._dbInfo)}}).catch(function(O){throw(W(o,O)||x.resolve()).catch(function(){}),O})}}):v.then(function(C){R(o);var E=c[o.name],k=E.forages;C.close();for(var z=0;z<k.length;z++)k[z]._dbInfo.db=null;return new x(function(L,D){var O=w.deleteDatabase(o.name);O.onerror=function(){var F=O.result;F&&F.close(),D(O.error)},O.onblocked=function(){console.warn('dropInstance blocked for database "'+o.name+'" until all open connections are closed')},O.onsuccess=function(){var F=O.result;F&&F.close(),L(F)}}).then(function(L){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,s),m}var Pn={_driver:"asyncStorage",_initStorage:xn,_support:y(),iterate:kn,getItem:En,setItem:zn,removeItem:_n,clear:Mn,length:Ln,key:Bn,keys:In,dropInstance:Rn};function An(){return typeof openDatabase=="function"}var re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dn="~~local_forage_type~",It=/^~~local_forage_type~([^~]+)~/,Ee="__lfsc__:",Xe=Ee.length,Ge="arbf",Ke="blob",Rt="si08",Pt="ui08",At="uic8",Dt="si16",Nt="si32",Tt="ur16",Ot="ui32",Ut="fl32",Wt="fl64",jt=Xe+Ge.length,Ft=Object.prototype.toString;function $t(o){var s,a,m,f,v,C=.75*o.length,E=o.length,k=0;o[o.length-1]==="="&&(C--,o[o.length-2]==="="&&C--);var z=new ArrayBuffer(C),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 Ye(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 Nn(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=Ee;o instanceof ArrayBuffer?(m=o,f+=Ge):(m=o.buffer,a==="[object Int8Array]"?f+=Rt:a==="[object Uint8Array]"?f+=Pt:a==="[object Uint8ClampedArray]"?f+=At:a==="[object Int16Array]"?f+=Dt:a==="[object Uint16Array]"?f+=Tt:a==="[object Int32Array]"?f+=Nt: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+Ye(m))}else if(a==="[object Blob]"){var v=new FileReader;v.onload=function(){var C=Dn+o.type+"~"+Ye(this.result);s(Ee+Ke+C)},v.readAsArrayBuffer(o)}else try{s(JSON.stringify(o))}catch(C){console.error("Couldn't convert value into a JSON string: ",o),s(null,C)}}function Tn(o){if(o.substring(0,Xe)!==Ee)return JSON.parse(o);var s,a=o.substring(jt),m=o.substring(Xe,jt);if(m===Ke&&It.test(a)){var f=a.match(It);s=f[1],a=a.substring(f[0].length)}var v=$t(a);switch(m){case Ge:return v;case Ke:return S([v],{type:s});case Rt:return new Int8Array(v);case Pt:return new Uint8Array(v);case At:return new Uint8ClampedArray(v);case Dt:return new Int16Array(v);case Tt:return new Uint16Array(v);case Nt: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 Je={serialize:Nn,deserialize:Tn,stringToBuffer:$t,bufferToString:Ye};function Ht(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,C){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(E){return C(E)}a.db.transaction(function(E){Ht(E,a,function(){s._dbInfo=a,v()},function(k,z){C(z)})},C)});return a.serializer=Je,f}function se(o,s,a,m,f,v){o.executeSql(a,m,f,function(C,E){E.code===E.SYNTAX_ERR?C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[s.storeName],function(k,z){z.rows.length?v(k,E):Ht(k,s,function(){k.executeSql(a,m,f,v)},v)},v):v(C,E)},v)}function Un(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(E){se(E,C,"SELECT * FROM "+C.storeName+" WHERE key = ? LIMIT 1",[o],function(k,z){var L=z.rows.length?z.rows.item(0).value:null;L&&(L=C.serializer.deserialize(L)),f(L)},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function Wn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(E){se(E,C,"SELECT * FROM "+C.storeName,[],function(k,z){for(var L=z.rows,D=L.length,O=0;O<D;O++){var F=L.item(O),$=F.value;if($&&($=C.serializer.deserialize($)),($=o($,F.key,O+1))!==void 0)return void f($)}f()},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function qt(o,s,a,m){var f=this;o=T(o);var v=new x(function(C,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(O){se(O,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[o,L],function(){C(k)},function(F,$){E($)})},function(O){if(O.code===O.QUOTA_ERR){if(m>0)return void C(qt.apply(f,[o,k,a,m-1]));E(O)}})})}).catch(E)});return _(v,a),v}function jn(o,s,a){return qt.apply(this,[o,s,a,1])}function Fn(o,s){var a=this;o=T(o);var m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(E){se(E,C,"DELETE FROM "+C.storeName+" WHERE key = ?",[o],function(){f()},function(k,z){v(z)})})}).catch(v)});return _(m,s),m}function $n(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(C){se(C,v,"DELETE FROM "+v.storeName,[],function(){m()},function(E,k){f(k)})})}).catch(f)});return _(a,o),a}function Hn(o){var s=this,a=new x(function(m,f){s.ready().then(function(){var v=s._dbInfo;v.db.transaction(function(C){se(C,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 _(a,o),a}function qn(o,s){var a=this,m=new x(function(f,v){a.ready().then(function(){var C=a._dbInfo;C.db.transaction(function(E){se(E,C,"SELECT key FROM "+C.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,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(C){se(C,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 _(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 C=[],E=0;E<v.rows.length;E++)C.push(v.rows.item(E).name);s({db:o,storeNames:C})},function(f,v){a(v)})},function(m){a(m)})})}function Gn(o,s){s=N.apply(this,arguments);var a=this.config();(o=typeof o!="function"&&o||{}).name||(o.name=o.name||a.name,o.storeName=o.storeName||a.storeName);var m,f=this;return _(m=o.name?new x(function(v){var C;C=o.name===a.name?f._dbInfo.db:openDatabase(o.name,"","",0),o.storeName?v({db:C,storeNames:[o.storeName]}):v(Xn(C))}).then(function(v){return new x(function(C,E){v.db.transaction(function(k){function z(F){return new x(function($,ee){k.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(Kt,we){ee(we)})})}for(var L=[],D=0,O=v.storeNames.length;D<O;D++)L.push(z(v.storeNames[D]));x.all(L).then(function(){C()}).catch(function(F){E(F)})},function(k){E(k)})})}):x.reject("Invalid arguments"),s),m}var Kn={_driver:"webSQLStorage",_initStorage:On,_support:An(),iterate:Wn,getItem:Un,setItem:jn,removeItem:Fn,clear:$n,length:Hn,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=Je,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 _(a,o),a}function ti(o,s){var a=this;o=T(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,s),m}function ni(o,s){var a=this,m=a.ready().then(function(){for(var f=a._dbInfo,v=f.keyPrefix,C=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(C),k++))!==void 0)return D}}});return _(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,s),m}function oi(o){var s=this,a=s.ready().then(function(){for(var m=s._dbInfo,f=localStorage.length,v=[],C=0;C<f;C++){var E=localStorage.key(C);E.indexOf(m.keyPrefix)===0&&v.push(E.substring(m.keyPrefix.length))}return v});return _(a,o),a}function ri(o){var s=this.keys().then(function(a){return a.length});return _(s,o),s}function si(o,s){var a=this;o=T(o);var m=a.ready().then(function(){var f=a._dbInfo;localStorage.removeItem(f.keyPrefix+o)});return _(m,s),m}function ai(o,s,a){var m=this;o=T(o);var f=m.ready().then(function(){s===void 0&&(s=null);var v=s;return new x(function(C,E){var k=m._dbInfo;k.serializer.serialize(s,function(z,L){if(L)E(L);else try{localStorage.setItem(k.keyPrefix+o,z),C(v)}catch(D){D.name!=="QuotaExceededError"&&D.name!=="NS_ERROR_DOM_QUOTA_REACHED"||E(D),E(D)}})})});return _(f,a),f}function ci(o,s){if(s=N.apply(this,arguments),!(o=typeof o!="function"&&o||{}).name){var a=this.config();o.name=o.name||a.name,o.storeName=o.storeName||a.storeName}var m,f=this;return _(m=o.name?new x(function(v){o.storeName?v(Vt(o,f._defaultConfig)):v(o.name+"/")}).then(function(v){for(var C=localStorage.length-1;C>=0;C--){var E=localStorage.key(C);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]"},ye={},Gt={},pe={INDEXEDDB:Pn,WEBSQL:Kn,LOCALSTORAGE:ui},di=[pe.INDEXEDDB._driver,pe.WEBSQL._driver,pe.LOCALSTORAGE._driver],ke=["dropInstance"],Ze=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ke),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 Qe(){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),pe)if(pe.hasOwnProperty(a)){var m=pe[a],f=m._driver;this[a]=f,ye[f]||this.defineDriver(m)}this._defaultConfig=Qe({},fi),this._config=Qe({},this._defaultConfig,s),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return o.prototype.config=function(s){if((s===void 0?"undefined":i(s))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var a in s){if(a==="storeName"&&(s[a]=s[a].replace(/\W/g,"_")),a==="version"&&typeof s[a]!="number")return new Error("Database version must be a number.");this._config[a]=s[a]}return!("driver"in s)||!s.driver||this.setDriver(this._config.driver)}return typeof s=="string"?this._config[s]:this._config},o.prototype.defineDriver=function(s,a,m){var f=new x(function(v,C){try{var E=s._driver,k=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!s._driver)return void C(k);for(var z=Ze.concat("_initStorage"),L=0,D=z.length;L<D;L++){var O=z[L];if((!hi(ke,O)||s[O])&&typeof s[O]!="function")return void C(k)}(function(){for(var $=function(gi){return function(){var vi=new Error("Method "+gi+" is not implemented by the current driver"),Yt=x.reject(vi);return _(Yt,arguments[arguments.length-1]),Yt}},ee=0,Kt=ke.length;ee<Kt;ee++){var we=ke[ee];s[we]||(s[we]=$(we))}})();var F=function($){ye[E]&&console.info("Redefining LocalForage driver: "+E),ye[E]=s,Gt[E]=$,v()};"_support"in s?s._support&&typeof s._support=="function"?s._support().then(F,C):F(!!s._support):F(!0)}catch($){C($)}});return M(f,a,m),f},o.prototype.driver=function(){return this._driver||null},o.prototype.getDriver=function(s,a,m){var f=ye[s]?x.resolve(ye[s]):x.reject(new Error("Driver not found."));return M(f,a,m),f},o.prototype.getSerializer=function(s){var a=x.resolve(Je);return M(a,s),a},o.prototype.ready=function(s){var a=this,m=a._driverSet.then(function(){return a._ready===null&&(a._ready=a._initDriver()),a._ready});return M(m,s,s),m},o.prototype.setDriver=function(s,a,m){var f=this;Xt(s)||(s=[s]);var v=this._getSupportedDrivers(s);function C(){f._config.driver=f.driver()}function E(L){return f._extend(L),C(),f._ready=f._initStorage(f._config),f._ready}function k(L){return function(){var D=0;function O(){for(;D<L.length;){var F=L[D];return D++,f._dbInfo=null,f._ready=null,f.getDriver(F).then(E).catch(O)}C();var $=new Error("No available storage method found.");return f._driverSet=x.reject($),f._driverSet}return O()}}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,C(),f._wrapLibraryMethodsWithReady(),f._initDriver=k(v)})}).catch(function(){C();var L=new Error("No available storage method found.");return f._driverSet=x.reject(L),f._driverSet}),M(this._driverSet,a,m),this._driverSet},o.prototype.supports=function(s){return!!Gt[s]},o.prototype._extend=function(s){Qe(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=Ze.length;s<a;s++)pi(this,Ze[s])},o.prototype.createInstance=function(s){return new o(s)},o}());t.exports=mi},{3:3}]},{},[4])(4),hn={exports:{}};(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",S={createWriteStream:function(_,M,T){let N={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,b=null,c=null,h=null;if(Number.isFinite(M)?([T,M]=[M,T],console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),N.size=T,N.writableStrategy=M):M&&M.highWaterMark?(console.warn("[StreamSaver] Depricated pass an object as 2nd argument when creating a write stream"),N.size=T,N.writableStrategy=M):N=M||{},!w){n||(n=l?x(S.mitm):function(P){const B="width=200,height=100",R=document.createDocumentFragment(),U={frame:t.open(P,"popup",B),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...j){R.addEventListener(...j)},dispatchEvent(...j){R.dispatchEvent(...j)},removeEventListener(...j){R.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}(S.mitm)),c=new MessageChannel,_=encodeURIComponent(_.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const u={transferringReadable:i,pathname:N.pathname||Math.random().toString().slice(-6)+"/"+_,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+_}};N.size&&(u.headers["Content-Length"]=N.size);const p=[u,"*",[c.port2]];if(i){const P=y==="iframe"?void 0:{transform(R,U){if(!(R instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");I+=R.length,U.enqueue(R),b&&(location.href=b,b=null)},flush(){b&&(location.href=b)}};h=new S.TransformStream(P,N.writableStrategy,N.readableStrategy);const B=h.readable;c.port1.postMessage({readableStream:B},[B])}c.port1.onmessage=P=>{P.data.download&&(y==="navigate"?(n.remove(),n=null,I?location.href=P.data.download:b=P.data.download):(n.isPopup&&(n.remove(),n=null,y==="iframe"&&x(S.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 S.WritableStream({write(u){if(!(u instanceof Uint8Array))throw new TypeError("Can only wirte Uint8Arrays");w?d.push(u):(c.port1.postMessage(u),I+=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=_,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}},N.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"/mitm.html"};function x(_){if(!_)throw new Error("meh");const M=document.createElement("iframe");return M.hidden=!0,M.src=_,M.loaded=!1,M.name="iframe",M.isIframe=!0,M.postMessage=(...T)=>M.contentWindow.postMessage(...T),M.addEventListener("load",()=>{M.loaded=!0},{once:!0}),document.body.appendChild(M),M}try{new Response(new ReadableStream),l&&!("serviceWorker"in navigator)&&(w=!0)}catch{w=!0}return(_=>{try{_()}catch{}})(()=>{const{readable:_}=new TransformStream,M=new MessageChannel;M.port1.postMessage(_,[_]),M.port1.close(),M.port2.close(),i=!0,Object.defineProperty(S,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),S})()})();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 de=e=>e!==null&&G(e,"Object");function Ie(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]}}),Ct=e=>e>255?255:e<0?0:e,Re=(e,t)=>{const n=e.replace("#",""),i=parseInt(n,16),r=Ct((i>>16)+t),l=Ct((i>>8&255)+t);return"#"+(Ct((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-${Me()}`),{setGroupAccordionStatus:n}=pn(),i={"--base-color":e.baseColor,"--border-color":Re(e.baseColor,180),"--bg-color-header":Re(e.baseColor,140),"--bg-color-header-hover":Re(e.baseColor,190),"--bg-color-header-active":Re(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 Ae=g.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${Me()}`,i=g.ref(),r=g.ref(),l=g.ref(),{panelExpanded:w,togglePanelExpandedStatus:y,setPanelExpandedStatus:S}=pn(),x=g.computed(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:Me()})),_=g.computed(()=>i.value?.parentElement?.getAttribute("data-id-group")||""),M=g.computed(()=>w(_.value,n).value&&x.value.hasContent);return g.onMounted(()=>{S(_.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:M,collapse:T=>{T.style.height="0"},expand:T=>{T.style.height=`${T.scrollHeight}px`},toggle:()=>{x.value.hasContent&&y(_.value,n)},toggleIcon:`
|
|
3
3
|
<svg
|
|
4
4
|
width="24px"
|
|
5
5
|
height="24px"
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
>
|
|
10
10
|
<path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
|
|
11
11
|
</svg>
|
|
12
|
-
`}}});const ji={class:"vcp__header-title"},Fi={key:0,class:"vcp__header-icon"},$i=["innerHTML"],Hi={key:0,ref:"bodyRef",class:"vcp__body"},qi={ref:"bodyContentRef",class:"vcp__body-content"};function Ct(e){return window.TouchEvent&&e instanceof TouchEvent}Ae.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,$i)])])):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",Hi,[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)},Ae.__scopeId="data-v-08c94cf8",Ae.__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=Te(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 Te(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}=Te(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}=Te(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}=Te(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 Oe=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"];Oe.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)},Oe.__scopeId="data-v-71662210",Oe.__file="src/controls/vuewindow/window/Button.vue";const kt=new Set;function wn(e){return e!==null?parseFloat(e):0}function Ue(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 We=[];var je=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:Oe},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=()=>{We.push(i),y=new Xi(e.zGroup,_),e.isOpen&&(g.nextTick(()=>{r++==0&&(d(i),function(){const B=M.value,{width:R,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 H=e.positionHint||"auto";switch(H){case"auto":{let q=20,X=50,Q=0;do{if(We.every(J=>{if(!J.isOpen||i==J)return!0;const te=Yi(J);if(te==null)return!0;const{left:qe,top:Ve}=te;return Ji(qe,Ve,q,X)>16}))break;q=(q+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++Q<100);W=q,j=X}break;case"center":W=(window.innerWidth-R)/2,j=(window.innerHeight-U)/2,console.log(W,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[X,Q]=q;if(!isFinite(X)||!isFinite(Q))throw null;W=X>=0?X:window.innerWidth-R+X,j=Q>=0?Q:window.innerHeight-U+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${W}px`,B.style.top=`${j}px`)}()),e.resizable&&u(),P(),l=new Vi(N.value,M.value,{onMove:()=>P(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(N.value);w=new Gi(M.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&&I()),kt.add(i)};function _(B){b.value.zIndex=`${B}`}const M=g.ref(null),N=g.ref(null),D=g.ref(null);function I(){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:R,height:U,top:W,left:j}=B,H=M;if(H&&R!=null&&(H.value.style.width=`${R}px`),U!=null){const q=N.value;if(q){const X=Ue(q).height;H.value.style.height=`${U+X}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&W!=null&&(H.value.style.top=`${W}px`)}function u(B=!0){const R=M.value,U=N.value,W=D.value;if(W&&R&&U){const{width:j,height:H}=Ue(W),{width:q,height:X}=Ue(R),Q=Ue(U).height,J=q-(W.offsetWidth-j),te=X-Q-(W.offsetHeight-H);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=M.value;if(B){const R=B.getBoundingClientRect();R.left<0&&(b.value.left="0px"),R.top<0&&(b.value.top="0px"),R.right>window.innerWidth&&(b.value.left=window.innerWidth-R.width+"px"),R.bottom>window.innerHeight&&(b.value.top=window.innerHeight-R.height+"px")}}function P(B=!0){p();const R=M.value;if(R){const{left:U,top:W}=R.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(),We.splice(We.indexOf(i),1)}),{isOpen:C,windowEl:M,titlebar:N,content:D,activate:I,styleWindow:b,styleTitlebar:c,styleContent:h,closeButtonClick:function(){C.value=!1,t("closebuttonclick")}}}});const Zi={class:"title"},Qi=g.createTextVNode("\xD7");var Sn,le;je.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})},je.__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=je;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;de(t)?n=t:Ie(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),T.EventBus.emit(V.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),T.EventBus.emit(V.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&&T.EventBus.emit(V.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(!T.LayoutManager){const D=new to(r,e.widgetConfig);T.LayoutManager=D,D.preloadWidgets()}const l=M(exports.LayoutContainerEnum.top),w=M(exports.LayoutContainerEnum.centerBack),y=M(exports.LayoutContainerEnum.centerFront),C=M(exports.LayoutContainerEnum.left),x=M(exports.LayoutContainerEnum.right),_=M(exports.LayoutContainerEnum.bottom);function M(D){return T.LayoutManager?.getContainerComponents(D)}const N=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:l,centerbackComponents:w,centerfrontComponents:y,leftContainerComponents:C,rightContainerComponents:x,bottomContainerComponents:_,containerStyle:N}}});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 Fe=new Map,_t=new Map;let $e;const uo={getDefaultClient(){if($e||($e=new Se(SysConfig.DefaultHproseAPI)),!$e)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return $e},registerHprose(e,t){const n=_t.get(e);if(!n){const i=new Se(t);Fe.set(e,i)}return n},getHprose:e=>_t?.get(e),getProxyHprose:e=>Fe.get(e),unregisterHprose(e){Fe.get(e)&&(_t.delete(e),Fe.delete(e))}},fe={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},lo=T.Config.ServiceURL.LoginAuthURL;function Mt(){const e=tn();e&&ie(fe.RefreshToken,lo,{refreshToken:e}).then(t=>{He(t.data)})}function Cn(e){T.User||(T.User=e);const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?Mt():setTimeout(Mt,n-4e3))}function He(e){T.User&&(T.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&T.User){const i=he();i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,ce.set("access_token",i,n/1e3),Cn(i)}else ce.remove("access_token")}function Lt(e){T.User=e}const xe=T.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=ct(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await 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=Be.createInstance({name:this.fileID,driver:Be.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(),Be.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e){e&&(this.downloadURL=e);const t=this.downloadURL;if(!t)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const n=T.Axios.CancelToken;this.cancelSource=n.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let w=0;for(let y=0;y<this.totalChunks;y++){if(this.keys&&this.keys?.indexOf(y.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const C=y*this.chunkByteSize;let x=C+this.chunkByteSize-1;this.fileMetaData&&x>this.fileMetaData.length&&(x=this.fileMetaData.length-1);const _={range:`bytes=${C}-${x}`};for(;w>=l;)await this.sleep(200);const M=y.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${y+1}/${this.totalChunks}`),w++,ie("",t,i,_,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async N=>{const D=N.data;w--,await this.currentDB?.setItem(M,D),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const I=parseInt(M)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${I}/${this.totalChunks}`),this.savefile()}).catch(N=>{w--;const D=parseInt(M)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${D}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=Ti.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let l=new Response(r).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const w=l.getReader();for(;;){const{done:y,value:C}=await w.read();if(y)break;await e.write(C)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Be.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 _=document.createElement("a");_.href=window.URL.createObjectURL(x),_.download=en(e),_.click(),URL.revokeObjectURL(_.href),r(!0)}},"image/jpeg")},y.onerror=C=>l(C)}})},exports.Global=T,exports.GlobalHprose=uo,exports.GlobalMitt=ve,exports.H5Tool=ae,exports.HproseClient=be,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){ut(i.data,n)}).catch(i=>{console.warn(i),ve.emit(V.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(e,t)=>{const n=JSON.stringify(e,null,2);t?ut(n,t+".json"):ve.emit(V.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;de(e)?t=e:Ie(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),T.EventBus.emit(V.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),T.EventBus.emit(V.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&&T.EventBus.emit(V.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=Se,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=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=V,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=fe,exports.VCollapsiblePanel=Ae,exports.VCollapsiblePanelGroup=Pe,exports.VWindow=je,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(fe.ChangePWD,xe,e)},exports.checkDoRefreshToken=Cn,exports.checkLogin=async function(e){const t=(await ie(fe.CheckLogin,xe,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),He(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return ie(fe.CheckToken,xe,{token:e})},exports.clearLocalToken=lt,exports.colorIsDark=function(e){if(!Le(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 Ai(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]=de(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=Mt,exports.get=function(e,t){return ie(e,void 0,t)},exports.getData=function(e,t){return T.Axios?.get(e,{params:t}).catch(function(n){console.error(n);const i=`\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A${e}`;T.EventBus.emit(V.AxiosRequestErrorEvent,i)})},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=he,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=on,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Le(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=tn,exports.hexToRGB=rt,exports.init=nn,exports.initDefaultProxyClient=function(e){const t=on(e);return t&&(T.DefaultProxyClient=t),t},exports.initXFrame=function(e){nn(e.message,e.axios,e.defaultHproseURL),e.config&&(T.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=>de(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Ie(e)||fn(e)?e.length===0:!!de(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return G(e,"Error")},exports.isFunction=yt,exports.isHexColor=Le,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=de,exports.isPromise=function(e){return G(e,"Promise")&&de(e)&&yt(e.then)&&yt(e.catch)},exports.isServer=Ui,exports.isString=Ie,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=Di,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(fe.Login,xe,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),He(t.resultValue.doubleToken)),t},exports.logout=function(){const e=he();e&&(ft(fe.Logout,xe,{token:e.token,reftoken:e.refresh}),lt())},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",w){const y=dt(i,t,r,l);return w&&w>=2e4&&(y.timeout=w),T.Axios?.post(e,n,y).catch(function(C){console.error(C);const x=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;T.EventBus.emit(V.AxiosRequestErrorEvent,x)})},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=Me;
|
|
12
|
+
`}}});const ji={class:"vcp__header-title"},Fi={key:0,class:"vcp__header-icon"},$i=["innerHTML"],Hi={key:0,ref:"bodyRef",class:"vcp__body"},qi={ref:"bodyContentRef",class:"vcp__body-content"};function St(e){return window.TouchEvent&&e instanceof TouchEvent}Ae.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,$i)])])):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",Hi,[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)},Ae.__scopeId="data-v-08c94cf8",Ae.__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 St(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return St(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}){St(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=Te(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 Te(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(S=>new S(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}=Te(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}=Te(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}=Te(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 Oe=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"];Oe.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)},Oe.__scopeId="data-v-71662210",Oe.__file="src/controls/vuewindow/window/Button.vue";const kt=new Set;function wn(e){return e!==null?parseFloat(e):0}function Ue(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 We=[];var je=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:Oe},setup(e,{emit:t}){const n=g.getCurrentInstance();if(!n)return;const{proxy:i}=n;let r=0,l,w,y;const S=g.ref(e.isOpen),x=()=>{We.push(i),y=new Xi(e.zGroup,_),e.isOpen&&(g.nextTick(()=>{r++==0&&(d(i),function(){const B=M.value,{width:R,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 H=e.positionHint||"auto";switch(H){case"auto":{let q=20,X=50,Q=0;do{if(We.every(J=>{if(!J.isOpen||i==J)return!0;const te=Yi(J);if(te==null)return!0;const{left:qe,top:Ve}=te;return Ji(qe,Ve,q,X)>16}))break;q=(q+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++Q<100);W=q,j=X}break;case"center":W=(window.innerWidth-R)/2,j=(window.innerHeight-U)/2,console.log(W,j,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=H.split("/").map(Number);if(q.length!=2)throw null;const[X,Q]=q;if(!isFinite(X)||!isFinite(Q))throw null;W=X>=0?X:window.innerWidth-R+X,j=Q>=0?Q:window.innerHeight-U+Q}catch{throw new Error(`invalid position string: ${H}`)}}}B&&(B.style.left=`${W}px`,B.style.top=`${j}px`)}()),e.resizable&&u(),P(),l=new Vi(T.value,M.value,{onMove:()=>P(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Et(T.value);w=new Gi(M.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&&I()),kt.add(i)};function _(B){b.value.zIndex=`${B}`}const M=g.ref(null),T=g.ref(null),N=g.ref(null);function I(){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:R,height:U,top:W,left:j}=B,H=M;if(H&&R!=null&&(H.value.style.width=`${R}px`),U!=null){const q=T.value;if(q){const X=Ue(q).height;H.value.style.height=`${U+X}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&W!=null&&(H.value.style.top=`${W}px`)}function u(B=!0){const R=M.value,U=T.value,W=N.value;if(W&&R&&U){const{width:j,height:H}=Ue(W),{width:q,height:X}=Ue(R),Q=Ue(U).height,J=q-(W.offsetWidth-j),te=X-Q-(W.offsetHeight-H);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=M.value;if(B){const R=B.getBoundingClientRect();R.left<0&&(b.value.left="0px"),R.top<0&&(b.value.top="0px"),R.right>window.innerWidth&&(b.value.left=window.innerWidth-R.width+"px"),R.bottom>window.innerHeight&&(b.value.top=window.innerHeight-R.height+"px")}}function P(B=!0){p();const R=M.value;if(R){const{left:U,top:W}=R.getBoundingClientRect();B&&(t("update:left",U),t("update:top",W))}}return g.watch(()=>e.isOpen,B=>{S.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(),We.splice(We.indexOf(i),1)}),{isOpen:S,windowEl:M,titlebar:T,content:N,activate:I,styleWindow:b,styleTitlebar:c,styleContent:h,closeButtonClick:function(){S.value=!1,t("closebuttonclick")}}}});const Zi={class:"title"},Qi=g.createTextVNode("\xD7");var Cn,le;je.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})},je.__file="src/controls/vuewindow/window/index.vue",(le=Cn||(Cn={}))[le.StyleBlack=0]="StyleBlack",le[le.StyleWhite=1]="StyleWhite",le[le.StyleMetal=2]="StyleMetal",le[le.StyleGrayblue=3]="StyleGrayblue";const eo=je;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;de(t)?n=t:Ie(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),A.EventBus.emit(V.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),A.EventBus.emit(V.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&&A.EventBus.emit(V.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(!A.LayoutManager){const N=new to(r,e.widgetConfig);A.LayoutManager=N,N.preloadWidgets()}const l=M(exports.LayoutContainerEnum.top),w=M(exports.LayoutContainerEnum.centerBack),y=M(exports.LayoutContainerEnum.centerFront),S=M(exports.LayoutContainerEnum.left),x=M(exports.LayoutContainerEnum.right),_=M(exports.LayoutContainerEnum.bottom);function M(N){return A.LayoutManager?.getContainerComponents(N)}const T=g.computed(()=>e.layoutStyle);return{...g.toRefs(r),topContainerComponents:l,centerbackComponents:w,centerfrontComponents:y,leftContainerComponents:S,rightContainerComponents:x,bottomContainerComponents:_,containerStyle:T}}});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,S])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(S),{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,S])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(S),{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,S])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(S),{key:y}))),128))],512),g.createElementVNode("div",so,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.leftContainerComponents,([y,S])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(S),{key:y}))),128))],512),g.createElementVNode("div",ao,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.rightContainerComponents,([y,S])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(S),{key:y}))),128))],512)]),g.createElementVNode("div",co,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.bottomContainerComponents,([y,S])=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(S),{key:y}))),128))],512)],4)},zt.__file="src/controls/layoutcontainer/layout.vue";const Fe=new Map,_t=new Map;let $e;const uo={getDefaultClient(){if($e||($e=new Ce(SysConfig.DefaultHproseAPI)),!$e)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return $e},registerHprose(e,t){const n=_t.get(e);if(!n){const i=new Ce(t);Fe.set(e,i)}return n},getHprose:e=>_t?.get(e),getProxyHprose:e=>Fe.get(e),unregisterHprose(e){Fe.get(e)&&(_t.delete(e),Fe.delete(e))}},fe={Login:"/api/Login/Login",CheckLogin:"\u200B/api\u200B/Check\u200B/Login",Logout:"/api/Check/ExitLogin",ChangePWD:"/api/UserManager/UpdateUserPWD",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken"},lo=A.Config.ServiceURL.LoginAuthURL;function Mt(){const e=tn();e&&ie(fe.RefreshToken,lo,{refreshToken:e}).then(t=>{He(t.data)})}function Sn(e){A.User||(A.User={id:e.id,name:e.name,issystem:e.issystem,issecurity:e.issecurity,appkey:e.appkey,role:e.role,doubleToken:{accessToken:{tokenContent:e.token,expires:e.expire},refreshToken:{tokenContent:e.refresh,expires:e.expire}}});const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=4e3?Mt():setTimeout(Mt,n-4e3))}function He(e){A.User&&(A.User.doubleToken=e);const t=new Date().getTime(),n=new Date(e.accessToken.expires).getTime()-t;if(n>0&&A.User){let i=he();if(!i){const r=A.User.doubleToken;i={id:A.User.id,name:A.User.name,token:r?r.accessToken.tokenContent:"",expire:r?r.accessToken.expires:"",refresh:r?r.accessToken.tokenContent:"",issystem:A.User.issystem,issecurity:A.User.issecurity,appkey:A.User.appkey,role:A.User.role}}i.token=e.accessToken.tokenContent,i.expire=e.accessToken.expires,i.refresh=e.refreshToken.tokenContent,ce.set("access_token",i,n/1e3),Sn(i)}else ce.remove("access_token")}function Lt(e){A.User=e}const xe=A.Config.ServiceURL.LoginAuthURL;exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,i=6,r=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=ct(),this.initIndexDB(),i>=3&&(this.cacheSize=i),r>this.requestTimeout&&(this.requestTimeout=r)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const i=await 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=Be.createInstance({name:this.fileID,driver:Be.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(),Be.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e){e&&(this.downloadURL=e);const t=this.downloadURL;if(!t)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const n=A.Axios.CancelToken;this.cancelSource=n.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let w=0;for(let y=0;y<this.totalChunks;y++){if(this.keys&&this.keys?.indexOf(y.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const S=y*this.chunkByteSize;let x=S+this.chunkByteSize-1;this.fileMetaData&&x>this.fileMetaData.length&&(x=this.fileMetaData.length-1);const _={range:`bytes=${S}-${x}`};for(;w>=l;)await this.sleep(200);const M=y.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${y+1}/${this.totalChunks}`),w++,ie("",t,i,_,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async T=>{const N=T.data;w--,await this.currentDB?.setItem(M,N),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const I=parseInt(M)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${I}/${this.totalChunks}`),this.savefile()}).catch(T=>{w--;const N=parseInt(M)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${N}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=Ti.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const i=n.toString();let r=await this.currentDB?.getItem(i);if(r||(r=await this.currentDB?.getItem(i)),!r)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let l=new Response(r).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const w=l.getReader();for(;;){const{done:y,value:S}=await w.read();if(y)break;await e.write(S)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Be.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=S=>{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 _=document.createElement("a");_.href=window.URL.createObjectURL(x),_.download=en(e),_.click(),URL.revokeObjectURL(_.href),r(!0)}},"image/jpeg")},y.onerror=S=>l(S)}})},exports.Global=A,exports.GlobalHprose=uo,exports.GlobalMitt=ve,exports.H5Tool=ae,exports.HproseClient=be,exports.HttpDownload=(e,t,n)=>{e.get(t).then(function(i){ut(i.data,n)}).catch(i=>{console.warn(i),ve.emit(V.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=(e,t)=>{const n=JSON.stringify(e,null,2);t?ut(n,t+".json"):ve.emit(V.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;de(e)?t=e:Ie(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),A.EventBus.emit(V.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),A.EventBus.emit(V.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&&A.EventBus.emit(V.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=Ce,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=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=V,exports.TOKEN_REFRESH_TIME=4e3,exports.USER_TOKEN_API=fe,exports.VCollapsiblePanel=Ae,exports.VCollapsiblePanelGroup=Pe,exports.VWindow=je,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(fe.ChangePWD,xe,e)},exports.checkDoRefreshToken=Sn,exports.checkLogin=async function(e){const t=(await ie(fe.CheckLogin,xe,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),He(t.resultValue.doubleToken)),t},exports.checkToken=function(e){return ie(fe.CheckToken,xe,{token:e})},exports.clearLocalToken=lt,exports.colorIsDark=function(e){if(!Le(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 Ai(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]=de(t[i])?e(t[i],n[i]):t[i]=n[i];return t},exports.doRefreshToken=Mt,exports.get=function(e,t){return ie(e,void 0,t)},exports.getData=function(e,t){return A.Axios?.get(e,{params:t}).catch(function(n){console.error(n);const i=`\u5916\u90E8Get\u670D\u52A1\u8BF7\u6C42\u9519\u8BEF\uFF1A${e}`;A.EventBus.emit(V.AxiosRequestErrorEvent,i)})},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=he,exports.getLockState=function(){return ce.get("is_LockScreen",!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let i="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);i+=r.concat(r)}return i}return t},exports.getProxyClient=on,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Le(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 S=y<=.5?y*(w+1):y+w-y*w,x=2*y-S;n=ot(x,S,l+1/3),i=ot(x,S,l),r=ot(x,S,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=tn,exports.hexToRGB=rt,exports.init=nn,exports.initDefaultProxyClient=function(e){const t=on(e);return t&&(A.DefaultProxyClient=t),t},exports.initXFrame=function(e){nn(e.message,e.axios,e.defaultHproseURL),e.config&&(A.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=>de(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Ie(e)||fn(e)?e.length===0:!!de(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substr(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return G(e,"Error")},exports.isFunction=yt,exports.isHexColor=Le,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=de,exports.isPromise=function(e){return G(e,"Promise")&&de(e)&&yt(e.then)&&yt(e.catch)},exports.isServer=Ui,exports.isString=Ie,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=Di,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(fe.Login,xe,e))?.data;return t&&t.isSuccess&&(Lt(t.resultValue),He(t.resultValue.doubleToken)),t},exports.logout=function(){const e=he();e&&(ft(fe.Logout,xe,{token:e.token,reftoken:e.refresh}),lt())},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",w){const y=dt(i,t,r,l);return w&&w>=2e4&&(y.timeout=w),A.Axios?.post(e,n,y).catch(function(S){console.error(S);const x=`post\u8BF7\u6C42\u9519\u8BEF\uFF1A${t}${e}`;A.EventBus.emit(V.AxiosRequestErrorEvent,x)})},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=Ci,exports.storageHelper=ce,exports.unLockListener=function(){document.removeEventListener("mousedown",vt)},exports.uuid=Me;
|