xframelib 0.6.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/assets/output-79ea15e6.css +305 -0
- package/dist/index.cjs +3 -3
- package/dist/index.css +88 -88
- package/dist/index.js +3 -3
- package/dist/utils/AxiosHelper.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var w=require("vue"),ui=require("axios"),li=require("qs"),Re=require("@hprose/rpc-core"),vn=require("@hprose/io"),hi=require("@hprose/rpc-html5");function yn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var di=yn(ui),fi=yn(li),pi={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((o,i)=>(o.size=i===t?o.max:o.min,i!==t&&(n+=o.min),o)),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:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-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 o=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),r=Math.max(Math.min(this.getCurrentDragPercentage(e),i),o);let l=[t,t+1],f=this.panes[l[0]]||null,v=this.panes[l[1]]||null;const S=f.max<100&&r>=f.max+n.prevPanesSize,E=v.max<100&&r<=100-(v.max+this.sumNextPanesSize(t+1));if(S||E)S?(f.size=f.max,v.size=Math.max(100-f.max-n.prevPanesSize-n.nextPanesSize,0)):(f.size=Math.max(100-v.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),v.size=v.max);else{if(this.pushOtherPanes){const k=this.doPushOtherPanes(n,r);if(!k)return;({sums:n,panesToResize:l}=k),f=this.panes[l[0]]||null,v=this.panes[l[1]]||null}f!==null&&(f.size=Math.min(Math.max(r-n.prevPanesSize-n.prevReachedMinPanes,f.min),f.max)),v!==null&&(v.size=Math.min(Math.max(100-r-n.nextPanesSize-n.nextReachedMinPanes,v.min),v.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((i,r)=>{r>o[0]&&r<=n&&(i.size=i.min,e.prevReachedMinPanes+=i.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((i,r)=>{r>0&&r<=n&&(i.size=i.min,e.prevReachedMinPanes+=i.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((i,r)=>{r>n&&r<o[1]&&(i.size=i.min,e.nextReachedMinPanes+=i.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((i,r)=>{r<this.panesCount-1&&r>=n+1&&(i.size=i.min,e.nextReachedMinPanes+=i.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>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 o=e-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=r=>this.onMouseDown(r,o),typeof window<"u"&&"ontouchstart"in window&&(i.ontouchstart=r=>this.onMouseDown(r,o)),i.onclick=r=>this.onSplitterClick(r,o+1)),this.dblClickSplitter&&(i.ondblclick=r=>this.onSplitterDblClick(r,o+1)),t.parentNode.insertBefore(i,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(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(([o,i])=>n[o]=i)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(i=>(i.className.includes("splitpanes__pane")&&t++,i===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((i,r)=>i.index=r),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,i)=>o.index=i),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.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=[],o=[];this.panes.forEach(i=>{i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&o.push(i.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(r=>{e-=r.size,r.size!==null&&o++,r.size>=r.max&&t.push(r.id),r.size<=r.min&&n.push(r.id)});let i=100;e>.1&&(this.panes.forEach(r=>{r.size===null&&(r.size=Math.max(Math.min(e/(this.panesCount-o),r.max),r.min)),i-=r.size}),i>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const o=[],i=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(r=>{n-=r.size,r.size>=r.max&&o.push(r.id),r.size<=r.min&&i.push(r.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(r=>{e&&e.givenSize!==null&&e.id===r.id||(r.size=Math.max(Math.min(t,r.max),r.min)),n-=r.size,r.size>=r.max&&o.push(r.id),r.size<=r.min&&i.push(r.id)}),n>.1&&this.readjustSizes(n,o,i))},readjustSizes(e,t,n){let o;o=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(i=>{if(e>0&&!t.includes(i.id)){const r=Math.max(Math.min(i.size+o,i.max),i.min),l=r-i.size;e-=l,i.size=r}else if(!n.includes(i.id)){const r=Math.max(Math.min(i.size+o,i.max),i.min),l=r-i.size;e-=l,i.size=r}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,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 w.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"},ft={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})}}};ft.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=l=>r.onPaneClick(l,e._.uid)),style:w.normalizeStyle(e.style)},[w.renderSlot(e.$slots,"default")],4)},ft.__file="src/controls/splitpanes/pane.vue";const mi=Object.prototype.toString;function K(e,t){return mi.call(e)===`[object ${t}]`}function Me(e){return K(e,"Function")}const wn=e=>typeof e<"u",pt=e=>!wn(e);function mt(e){return e===null}const le=e=>e!==null&&K(e,"Object");function Le(e){return K(e,"String")}function gt(e){return e&&Array.isArray(e)}const gi=typeof window>"u";var he=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vi={exports:{}},vt=vi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(C,u){var p=C[0],d=C[1],h=C[2],g=C[3];d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[0]-680876936|0)<<7|p>>>25)+d|0)&d|~p&h)+u[1]-389564586|0)<<12|g>>>20)+p|0)&p|~g&d)+u[2]+606105819|0)<<17|h>>>15)+g|0)&g|~h&p)+u[3]-1044525330|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[4]-176418897|0)<<7|p>>>25)+d|0)&d|~p&h)+u[5]+1200080426|0)<<12|g>>>20)+p|0)&p|~g&d)+u[6]-1473231341|0)<<17|h>>>15)+g|0)&g|~h&p)+u[7]-45705983|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[8]+1770035416|0)<<7|p>>>25)+d|0)&d|~p&h)+u[9]-1958414417|0)<<12|g>>>20)+p|0)&p|~g&d)+u[10]-42063|0)<<17|h>>>15)+g|0)&g|~h&p)+u[11]-1990404162|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[12]+1804603682|0)<<7|p>>>25)+d|0)&d|~p&h)+u[13]-40341101|0)<<12|g>>>20)+p|0)&p|~g&d)+u[14]-1502002290|0)<<17|h>>>15)+g|0)&g|~h&p)+u[15]+1236535329|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[1]-165796510|0)<<5|p>>>27)+d|0)&h|d&~h)+u[6]-1069501632|0)<<9|g>>>23)+p|0)&d|p&~d)+u[11]+643717713|0)<<14|h>>>18)+g|0)&p|g&~p)+u[0]-373897302|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[5]-701558691|0)<<5|p>>>27)+d|0)&h|d&~h)+u[10]+38016083|0)<<9|g>>>23)+p|0)&d|p&~d)+u[15]-660478335|0)<<14|h>>>18)+g|0)&p|g&~p)+u[4]-405537848|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[9]+568446438|0)<<5|p>>>27)+d|0)&h|d&~h)+u[14]-1019803690|0)<<9|g>>>23)+p|0)&d|p&~d)+u[3]-187363961|0)<<14|h>>>18)+g|0)&p|g&~p)+u[8]+1163531501|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[13]-1444681467|0)<<5|p>>>27)+d|0)&h|d&~h)+u[2]-51403784|0)<<9|g>>>23)+p|0)&d|p&~d)+u[7]+1735328473|0)<<14|h>>>18)+g|0)&p|g&~p)+u[12]-1926607734|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[5]-378558|0)<<4|p>>>28)+d|0)^d^h)+u[8]-2022574463|0)<<11|g>>>21)+p|0)^p^d)+u[11]+1839030562|0)<<16|h>>>16)+g|0)^g^p)+u[14]-35309556|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[1]-1530992060|0)<<4|p>>>28)+d|0)^d^h)+u[4]+1272893353|0)<<11|g>>>21)+p|0)^p^d)+u[7]-155497632|0)<<16|h>>>16)+g|0)^g^p)+u[10]-1094730640|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[13]+681279174|0)<<4|p>>>28)+d|0)^d^h)+u[0]-358537222|0)<<11|g>>>21)+p|0)^p^d)+u[3]-722521979|0)<<16|h>>>16)+g|0)^g^p)+u[6]+76029189|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[9]-640364487|0)<<4|p>>>28)+d|0)^d^h)+u[12]-421815835|0)<<11|g>>>21)+p|0)^p^d)+u[15]+530742520|0)<<16|h>>>16)+g|0)^g^p)+u[2]-995338651|0)<<23|d>>>9)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[0]-198630844|0)<<6|p>>>26)+d|0)|~h))+u[7]+1126891415|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[14]-1416354905|0)<<15|h>>>17)+g|0)|~p))+u[5]-57434055|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[12]+1700485571|0)<<6|p>>>26)+d|0)|~h))+u[3]-1894986606|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[10]-1051523|0)<<15|h>>>17)+g|0)|~p))+u[1]-2054922799|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[8]+1873313359|0)<<6|p>>>26)+d|0)|~h))+u[15]-30611744|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[6]-1560198380|0)<<15|h>>>17)+g|0)|~p))+u[13]+1309151649|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[4]-145523070|0)<<6|p>>>26)+d|0)|~h))+u[11]-1120210379|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[2]+718787259|0)<<15|h>>>17)+g|0)|~p))+u[9]-343485551|0)<<21|d>>>11)+h|0,C[0]=p+C[0]|0,C[1]=d+C[1]|0,C[2]=h+C[2]|0,C[3]=g+C[3]|0}function o(C){var u,p=[];for(u=0;u<64;u+=4)p[u>>2]=C.charCodeAt(u)+(C.charCodeAt(u+1)<<8)+(C.charCodeAt(u+2)<<16)+(C.charCodeAt(u+3)<<24);return p}function i(C){var u,p=[];for(u=0;u<64;u+=4)p[u>>2]=C[u]+(C[u+1]<<8)+(C[u+2]<<16)+(C[u+3]<<24);return p}function r(C){var u,p,d,h,g,T,R=C.length,B=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=R;u+=64)n(B,o(C.substring(u-64,u)));for(p=(C=C.substring(u-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<p;u+=1)d[u>>2]|=C.charCodeAt(u)<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(B,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*R).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),T=parseInt(h[1],16)||0,d[14]=g,d[15]=T,n(B,d),B}function l(C){var u,p,d,h,g,T,R=C.length,B=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=R;u+=64)n(B,i(C.subarray(u-64,u)));for(p=(C=u-64<R?C.subarray(u-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<p;u+=1)d[u>>2]|=C[u]<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(B,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*R).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),T=parseInt(h[1],16)||0,d[14]=g,d[15]=T,n(B,d),B}function f(C){var u,p="";for(u=0;u<4;u+=1)p+=t[C>>8*u+4&15]+t[C>>8*u&15];return p}function v(C){var u;for(u=0;u<C.length;u+=1)C[u]=f(C[u]);return C.join("")}function S(C){return/[\u0080-\uFFFF]/.test(C)&&(C=unescape(encodeURIComponent(C))),C}function E(C,u){var p,d=C.length,h=new ArrayBuffer(d),g=new Uint8Array(h);for(p=0;p<d;p+=1)g[p]=C.charCodeAt(p);return u?g:h}function k(C){return String.fromCharCode.apply(null,new Uint8Array(C))}function A(C,u,p){var d=new Uint8Array(C.byteLength+u.byteLength);return d.set(new Uint8Array(C)),d.set(new Uint8Array(u),C.byteLength),p?d:d.buffer}function D(C){var u,p=[],d=C.length;for(u=0;u<d-1;u+=2)p.push(parseInt(C.substr(u,2),16));return String.fromCharCode.apply(String,p)}function I(){this.reset()}return v(r("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function C(u,p){return(u=0|u||0)<0?Math.max(u+p,0):Math.min(u,p)}ArrayBuffer.prototype.slice=function(u,p){var d,h,g,T,R=this.byteLength,B=C(u,R),U=R;return p!==e&&(U=C(p,R)),B>U?new ArrayBuffer(0):(d=U-B,h=new ArrayBuffer(d),g=new Uint8Array(h),T=new Uint8Array(this,B,d),g.set(T),h)}}(),I.prototype.append=function(C){return this.appendBinary(S(C)),this},I.prototype.appendBinary=function(C){this._buff+=C,this._length+=C.length;var u,p=this._buff.length;for(u=64;u<=p;u+=64)n(this._hash,o(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},I.prototype.end=function(C){var u,p,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d.charCodeAt(u)<<(u%4<<3);return this._finish(g,h),p=v(this._hash),C&&(p=D(p)),this.reset(),p},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(C){return this._buff=C.buff,this._length=C.length,this._hash=C.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.prototype._finish=function(C,u){var p,d,h,g=u;if(C[g>>2]|=128<<(g%4<<3),g>55)for(n(this._hash,C),g=0;g<16;g+=1)C[g]=0;p=(p=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(p[2],16),h=parseInt(p[1],16)||0,C[14]=d,C[15]=h,n(this._hash,C)},I.hash=function(C,u){return I.hashBinary(S(C),u)},I.hashBinary=function(C,u){var p=v(r(C));return u?D(p):p},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(C){var u,p=A(this._buff.buffer,C,!0),d=p.length;for(this._length+=C.byteLength,u=64;u<=d;u+=64)n(this._hash,i(p.subarray(u-64,u)));return this._buff=u-64<d?new Uint8Array(p.buffer.slice(u-64)):new Uint8Array(0),this},I.ArrayBuffer.prototype.end=function(C){var u,p,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d[u]<<(u%4<<3);return this._finish(g,h),p=v(this._hash),C&&(p=D(p)),this.reset(),p},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 C=I.prototype.getState.call(this);return C.buff=k(C.buff),C},I.ArrayBuffer.prototype.setState=function(C){return C.buff=E(C.buff,!0),I.prototype.setState.call(this,C)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(C,u){var p=v(l(new Uint8Array(C)));return u?D(p):p},I}();const yt=[];class ee{static addHandler(t,n,o){t.addEventListener?t.addEventListener(n,o,!1):t.attachEvent?t.attachEvent("on"+n,o):t["on"+n]=o}static windowResizeHandler(t){ee.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const o=window.document;let i=window.document.exitFullscreen||o.msExitFullscreen||o.mozCancelFullScreen||o.webkitCancelFullScreen;typeof i<"u"&&i?i.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let o=t;o||(o=window.document.documentElement);let i=o.requestFullScreen||o.webkitRequestFullScreen||o.mozRequestFullScreen||o.msRequestFullScreen;typeof i<"u"&&i?i.call(o):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(t=window.document.documentElement){let n=t;var o=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(o)o.call(n);else if(typeof window.ActiveXObject<"u"){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.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(typeof window.ActiveXObject<"u"){var o=new window.ActiveXObject("WScript.Shell");o!==null&&o.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ee.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const o=ee.isFullScreen();t(o)}):document.addEventListener("MSFullscreenChange",function(){const o=ee.isFullScreen();t(o)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(yt.indexOf(n)!==-1)return;yt.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ee.stringifyCircularHandler);return yt.length=0,n}static jsonParse(t){const n=ee.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const o=window;return o.createObjcectURL!=null?n=o.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const o=File.prototype,i=o.slice||o.mozSlice||o.webkitSlice,r=t,l=2097152,f=new vt.ArrayBuffer,v=new FileReader;v.onload=function(S){f.append(S.target?.result);const E=f.end();n({isOK:!0,data:E})},v.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=0+l>=r.size?r.size:0+l;v.readAsArrayBuffer(i.call(r,0,S))}()}static getFileMD5(t,n){const o=File.prototype,i=o.slice||o.mozSlice||o.webkitSlice,r=t,l=2097152,f=Math.ceil(r.size/l);let v=0;const S=new vt.ArrayBuffer,E=new FileReader;function k(){const A=v*l,D=A+l>=r.size?r.size:A+l;E.readAsArrayBuffer(i.call(r,A,D))}E.onload=function(A){if(S.append(A.target?.result),v++,v<f)k();else{const D=S.end();n({isOK:!0,data:D})}},E.onerror=function(){const A=`${r.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(A),n({isOK:!1,data:A})},k()}static MD5(t,n=!1){return vt.hash(t,n)}static copyTextByCommand(t){return new Promise((n,o)=>{const i=document.createElement("input");i.value=t,document.body.appendChild(i),i.select(),document.execCommand("copy"),i.remove(),n(!0)})}static copyText=t=>navigator.clipboard?navigator.clipboard.writeText(t).then(function(){return!0},function(n){return!1}):ee.copyTextByCommand(t);static copyElementTextByCommand(t){const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(n);try{return document.execCommand("copy"),o.removeRange(n),!0}catch(i){return o.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",i),!1}}static copyElementText(t){if(!navigator.clipboard)return ee.copyElementTextByCommand(t);const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(n),navigator.clipboard.writeText(o).then(function(){return o.removeRange(n),!0},function(i){return o.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",i),!1})}static setGrayMode(t){ee.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(t,n,o){const i=o||document.body;let{className:r}=i;r=r.replace(n,""),i.className=t?`${r} ${n} `:r}static setCssVar(t,n,o=document.documentElement){o.style.setProperty(t,n)}static dispatchWindowResize(){const t=new Event("resize");window.dispatchEvent(t)}static dispatchElementEvent(t,n="click",o){let i;if(i=Le(t)?document.getElementById(t):t,i){const r=new Event(n,{bubbles:!0,cancelable:!0});o&&i.addEventListener("ev",l=>{o(l)},!1),i.dispatchEvent(r)}}}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,o)=>o.toUpperCase()).replace("views","")}}class Be{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,o=604800){const i=JSON.stringify({value:n,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(t),i)}get(t,n=null){const o=this.storage.getItem(this.getKey(t));if(o)try{const i=JSON.parse(o),{value:r,expire:l}=i;if(l===null||l>=Date.now())return r;this.remove(this.getKey(t))}catch{return n}return n}getJsonObject(t){const n=this.storage.getItem(this.getKey(t));if(n)try{const o=JSON.parse(n);if(o.expire===null||o.expire>=Date.now())return o;this.remove(this.getKey(t))}catch{return}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,o=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${o}`}getCookie(t){const n=document.cookie.split("; ");for(let o=0,i=n.length;o<i;o++){const r=n[o].split("=");if(r[0]===this.getKey(t))return r[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 yi=new Be("",localStorage);function Ae(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const i=Math.floor(16*Math.random());e[n]=t.substring(i,i+1)}e[14]="4";const o=3&Number(e[19])|8;return e[19]=t.substring(o,o+1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function wt(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 Te(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function bt(e){let t=e.toLowerCase();if(Te(e)){if(t.length===4){let o="#";for(let i=1;i<4;i+=1)o+=t.slice(i,i+1).concat(t.slice(i,i+1));t=o}const n=[];for(let o=1;o<7;o+=2)n.push(parseInt("0x"+t.slice(o,o+2)));return"RGB("+n.join(",")+")"}return t}function St(e,t){const n=parseInt(e,16)+t,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function bn(e,t,n){const o=[e,t,n].map(i=>(i/=255)<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}function Ct(e,t){const n=parseInt(e,16)-t,o=n<0?0:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function xt(e){return{all:e=e||new Map,on(t,n){const o=e?.get(t);o&&o.push(n)||e?.set(t,[n])},off(t,n){const o=e?.get(t);o&&o.splice(o.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(o=>{o(n)}),(e?.get("*")||[]).slice().map(o=>{o(t,n)})}}}exports.EnumColor=void 0,function(e){e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla"}(exports.EnumColor||(exports.EnumColor={}));const ge=xt(),Q={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Pe=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const o=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(o),document.body.appendChild(n),n.click(),document.body.removeChild(n)},Sn=(e,t)=>{const n=JSON.stringify(e,null,2);t?Pe(n,t+".json"):ge.emit(Q.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")};function Cn(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function xn(e){return new Promise(t=>setTimeout(t,e))}var En,kn,Et,De={exports:{}};kn=he,Et=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function i(I,C){var u=I[C];if(typeof u.bind=="function")return u.bind(I);try{return Function.prototype.bind.call(u,I)}catch{return function(){return Function.prototype.apply.apply(u,[I,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(I){return I==="debug"&&(I="log"),typeof console!==t&&(I==="trace"&&n?r:console[I]!==void 0?i(console,I):console.log!==void 0?i(console,"log"):e)}function f(I,C){for(var u=0;u<o.length;u++){var p=o[u];this[p]=u<I?e:this.methodFactory(p,I,C)}this.log=this.debug}function v(I,C,u){return function(){typeof console!==t&&(f.call(this,C,u),this[I].apply(this,arguments))}}function S(I,C,u){return l(I)||v.apply(this,arguments)}function E(I,C,u){var p,d=this;C=C??"WARN";var h="loglevel";function g(){var R;if(typeof window!==t&&h){try{R=window.localStorage[h]}catch{}if(typeof R===t)try{var B=window.document.cookie,U=B.indexOf(encodeURIComponent(h)+"=");U!==-1&&(R=/^([^;]+)/.exec(B.slice(U))[1])}catch{}return d.levels[R]===void 0&&(R=void 0),R}}typeof I=="string"?h+=":"+I:typeof I=="symbol"&&(h=void 0),d.name=I,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=u||S,d.getLevel=function(){return p},d.setLevel=function(R,B){if(typeof R=="string"&&d.levels[R.toUpperCase()]!==void 0&&(R=d.levels[R.toUpperCase()]),!(typeof R=="number"&&R>=0&&R<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+R;if(p=R,B!==!1&&function(U){var F=(o[U]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=F)}catch{}try{window.document.cookie=encodeURIComponent(h)+"="+F+";"}catch{}}}(R),f.call(d,R,I),typeof console===t&&R<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(R){C=R,g()||d.setLevel(R,!1)},d.resetLevel=function(){d.setLevel(C,!1),function(){if(typeof window!==t&&h){try{return void window.localStorage.removeItem(h)}catch{}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},d.enableAll=function(R){d.setLevel(d.levels.TRACE,R)},d.disableAll=function(R){d.setLevel(d.levels.SILENT,R)};var T=g();T==null&&(T=C),d.setLevel(T,!1)}var k=new E,A={};k.getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var C=A[I];return C||(C=A[I]=new E(I,k.getLevel(),k.methodFactory)),C};var D=typeof window!==t?window.log:void 0;return k.noConflict=function(){return typeof window!==t&&window.log===k&&(window.log=D),k},k.getLoggers=function(){return A},k.default=k,k},(En=De).exports?En.exports=Et():kn.log=Et();let zn=!1;const N={Config:SysConfig,EventBus:ge,DefaultProxyClient:null,Axios:di.default,Logger:e=>{zn||((void 0).DEV||SysConfig.UI.ProductLog?De.exports.enableAll():De.exports.setDefaultLevel("warn"),zn=!0);const t=e||"default";return De.exports.getLogger(t)}},In="access_token",ie=new Be("user",localStorage);function de(){return ie.get(In)}function kt(){ie.remove(In)}function Rn(){return de()?.refresh}function zt(e,t,n,o="json",i){const r={baseURL:N.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(l){return fi.default.stringify(l,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+de()?.token},responseType:o,cancelToken:i};if(n)for(let l in n)r.headers[l]=n[l];return N.SystemID&&(r.headers.sysid=N.SystemID,N.SystemGroup&&(r.headers.sysgroup=N.SystemGroup)),t&&(r.baseURL=t),r}function re(e,t,n,o,i="json",r,l){const f=zt(n,t,o,i,r);return l&&l>=2e4&&(f.timeout=l),N.Axios?.get(e,f).catch(function(v){Ne(v,t,e,"Get")})}function Ne(e,t,n,o="Get"){const i=`${t}${n}`;if(e&&e.response){let r=!1;const l=e.response.status;switch(l){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const v=e.response.data;if(v){const S=v.indexOf(":"),E=v.indexOf(`
|
|
2
|
-
`);if(S>0&&E-S>2){const k=v.substring(S+2,E);k.indexOf("System.Exception")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(r=!0,e.message=k)}}else e.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:e.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:e.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:e.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:e.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:e.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:e.message=`\u8FDE\u63A5\u9519\u8BEF${e.response.status}`}let f={address:i,code:l,isExceptionInfo:r,message:e.message,result:e.response.data};if(N.EventBus.emit(Q.AxiosRequestErrorEvent,f),r)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Mn(e,t,n,o,i,r="json",l){const f=zt(o,t,i,r);l&&l>=2e4&&(f.timeout=l);const v=function(S){let E=new FormData;return S&&Object.keys(S).forEach(k=>{if(!S)return;let A=S[k];A!=null&&(gt(A)?A.forEach(D=>{E.append(k,_n(D))}):E.append(k,_n(A)))}),E}(n);return N.Axios?.post(e,v,f).catch(function(S){Ne(S,t,e,"Post")})}function Ln(e,t,n,o,i,r="json",l){const f=zt(o,t,i,r);return l&&l>=2e4&&(f.timeout=l),N.Axios?.post(e,n,f).catch(function(v){Ne(v,t,e,"Post")})}function _n(e){return e instanceof Blob?e:e.toString()}var It={exports:{}},wi=typeof window<"u"?window:he!==void 0?he:typeof self<"u"?self:{},bi=function(e){if(!e)return!1;var t=Si.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Si=Object.prototype.toString,Rt=function(e){return e.replace(/^\s+|\s+$/g,"")},Ci=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)xi.call(n,o)&&(e[o]=n[o])}return e},xi=Object.prototype.hasOwnProperty,Bn=wi,Ei=bi,ki=function(e){if(!e)return{};for(var t,n={},o=Rt(e).split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var w=require("vue"),ui=require("axios"),li=require("qs"),Re=require("@hprose/rpc-core"),vn=require("@hprose/io"),hi=require("@hprose/rpc-html5");function yn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var di=yn(ui),fi=yn(li),pi={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((o,i)=>(o.size=i===t?o.max:o.min,i!==t&&(n+=o.min),o)),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:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-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 o=0+(this.pushOtherPanes?0:n.prevPanesSize),i=100-(this.pushOtherPanes?0:n.nextPanesSize),r=Math.max(Math.min(this.getCurrentDragPercentage(e),i),o);let l=[t,t+1],f=this.panes[l[0]]||null,v=this.panes[l[1]]||null;const S=f.max<100&&r>=f.max+n.prevPanesSize,E=v.max<100&&r<=100-(v.max+this.sumNextPanesSize(t+1));if(S||E)S?(f.size=f.max,v.size=Math.max(100-f.max-n.prevPanesSize-n.nextPanesSize,0)):(f.size=Math.max(100-v.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),v.size=v.max);else{if(this.pushOtherPanes){const k=this.doPushOtherPanes(n,r);if(!k)return;({sums:n,panesToResize:l}=k),f=this.panes[l[0]]||null,v=this.panes[l[1]]||null}f!==null&&(f.size=Math.min(Math.max(r-n.prevPanesSize-n.prevReachedMinPanes,f.min),f.max)),v!==null&&(v.size=Math.min(Math.max(100-r-n.nextPanesSize-n.nextReachedMinPanes,v.min),v.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((i,r)=>{r>o[0]&&r<=n&&(i.size=i.min,e.prevReachedMinPanes+=i.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((i,r)=>{r>0&&r<=n&&(i.size=i.min,e.prevReachedMinPanes+=i.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((i,r)=>{r>n&&r<o[1]&&(i.size=i.min,e.nextReachedMinPanes+=i.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((i,r)=>{r<this.panesCount-1&&r>=n+1&&(i.size=i.min,e.nextReachedMinPanes+=i.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>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 o=e-1,i=document.createElement("div");i.classList.add("splitpanes__splitter"),n||(i.onmousedown=r=>this.onMouseDown(r,o),typeof window<"u"&&"ontouchstart"in window&&(i.ontouchstart=r=>this.onMouseDown(r,o)),i.onclick=r=>this.onSplitterClick(r,o+1)),this.dblClickSplitter&&(i.ondblclick=r=>this.onSplitterDblClick(r,o+1)),t.parentNode.insertBefore(i,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(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(([o,i])=>n[o]=i)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(i=>(i.className.includes("splitpanes__pane")&&t++,i===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((i,r)=>i.index=r),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,i)=>o.index=i),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.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=[],o=[];this.panes.forEach(i=>{i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&o.push(i.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(r=>{e-=r.size,r.size!==null&&o++,r.size>=r.max&&t.push(r.id),r.size<=r.min&&n.push(r.id)});let i=100;e>.1&&(this.panes.forEach(r=>{r.size===null&&(r.size=Math.max(Math.min(e/(this.panesCount-o),r.max),r.min)),i-=r.size}),i>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const o=[],i=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(r=>{n-=r.size,r.size>=r.max&&o.push(r.id),r.size<=r.min&&i.push(r.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(r=>{e&&e.givenSize!==null&&e.id===r.id||(r.size=Math.max(Math.min(t,r.max),r.min)),n-=r.size,r.size>=r.max&&o.push(r.id),r.size<=r.min&&i.push(r.id)}),n>.1&&this.readjustSizes(n,o,i))},readjustSizes(e,t,n){let o;o=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(i=>{if(e>0&&!t.includes(i.id)){const r=Math.max(Math.min(i.size+o,i.max),i.min),l=r-i.size;e-=l,i.size=r}else if(!n.includes(i.id)){const r=Math.max(Math.min(i.size+o,i.max),i.min),l=r-i.size;e-=l,i.size=r}i.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[i.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,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 w.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"},ft={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})}}};ft.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=l=>r.onPaneClick(l,e._.uid)),style:w.normalizeStyle(e.style)},[w.renderSlot(e.$slots,"default")],4)},ft.__file="src/controls/splitpanes/pane.vue";const mi=Object.prototype.toString;function K(e,t){return mi.call(e)===`[object ${t}]`}function Me(e){return K(e,"Function")}const wn=e=>typeof e<"u",pt=e=>!wn(e);function mt(e){return e===null}const le=e=>e!=null&&e!==null&&K(e,"Object");function Le(e){return K(e,"String")}function gt(e){return e&&Array.isArray(e)}const gi=typeof window>"u";var he=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vi={exports:{}},vt=vi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(C,u){var p=C[0],d=C[1],h=C[2],g=C[3];d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[0]-680876936|0)<<7|p>>>25)+d|0)&d|~p&h)+u[1]-389564586|0)<<12|g>>>20)+p|0)&p|~g&d)+u[2]+606105819|0)<<17|h>>>15)+g|0)&g|~h&p)+u[3]-1044525330|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[4]-176418897|0)<<7|p>>>25)+d|0)&d|~p&h)+u[5]+1200080426|0)<<12|g>>>20)+p|0)&p|~g&d)+u[6]-1473231341|0)<<17|h>>>15)+g|0)&g|~h&p)+u[7]-45705983|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[8]+1770035416|0)<<7|p>>>25)+d|0)&d|~p&h)+u[9]-1958414417|0)<<12|g>>>20)+p|0)&p|~g&d)+u[10]-42063|0)<<17|h>>>15)+g|0)&g|~h&p)+u[11]-1990404162|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&h|~d&g)+u[12]+1804603682|0)<<7|p>>>25)+d|0)&d|~p&h)+u[13]-40341101|0)<<12|g>>>20)+p|0)&p|~g&d)+u[14]-1502002290|0)<<17|h>>>15)+g|0)&g|~h&p)+u[15]+1236535329|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[1]-165796510|0)<<5|p>>>27)+d|0)&h|d&~h)+u[6]-1069501632|0)<<9|g>>>23)+p|0)&d|p&~d)+u[11]+643717713|0)<<14|h>>>18)+g|0)&p|g&~p)+u[0]-373897302|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[5]-701558691|0)<<5|p>>>27)+d|0)&h|d&~h)+u[10]+38016083|0)<<9|g>>>23)+p|0)&d|p&~d)+u[15]-660478335|0)<<14|h>>>18)+g|0)&p|g&~p)+u[4]-405537848|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[9]+568446438|0)<<5|p>>>27)+d|0)&h|d&~h)+u[14]-1019803690|0)<<9|g>>>23)+p|0)&d|p&~d)+u[3]-187363961|0)<<14|h>>>18)+g|0)&p|g&~p)+u[8]+1163531501|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d&g|h&~g)+u[13]-1444681467|0)<<5|p>>>27)+d|0)&h|d&~h)+u[2]-51403784|0)<<9|g>>>23)+p|0)&d|p&~d)+u[7]+1735328473|0)<<14|h>>>18)+g|0)&p|g&~p)+u[12]-1926607734|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[5]-378558|0)<<4|p>>>28)+d|0)^d^h)+u[8]-2022574463|0)<<11|g>>>21)+p|0)^p^d)+u[11]+1839030562|0)<<16|h>>>16)+g|0)^g^p)+u[14]-35309556|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[1]-1530992060|0)<<4|p>>>28)+d|0)^d^h)+u[4]+1272893353|0)<<11|g>>>21)+p|0)^p^d)+u[7]-155497632|0)<<16|h>>>16)+g|0)^g^p)+u[10]-1094730640|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[13]+681279174|0)<<4|p>>>28)+d|0)^d^h)+u[0]-358537222|0)<<11|g>>>21)+p|0)^p^d)+u[3]-722521979|0)<<16|h>>>16)+g|0)^g^p)+u[6]+76029189|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((p=((p+=(d^h^g)+u[9]-640364487|0)<<4|p>>>28)+d|0)^d^h)+u[12]-421815835|0)<<11|g>>>21)+p|0)^p^d)+u[15]+530742520|0)<<16|h>>>16)+g|0)^g^p)+u[2]-995338651|0)<<23|d>>>9)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[0]-198630844|0)<<6|p>>>26)+d|0)|~h))+u[7]+1126891415|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[14]-1416354905|0)<<15|h>>>17)+g|0)|~p))+u[5]-57434055|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[12]+1700485571|0)<<6|p>>>26)+d|0)|~h))+u[3]-1894986606|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[10]-1051523|0)<<15|h>>>17)+g|0)|~p))+u[1]-2054922799|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[8]+1873313359|0)<<6|p>>>26)+d|0)|~h))+u[15]-30611744|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[6]-1560198380|0)<<15|h>>>17)+g|0)|~p))+u[13]+1309151649|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((p=((p+=(h^(d|~g))+u[4]-145523070|0)<<6|p>>>26)+d|0)|~h))+u[11]-1120210379|0)<<10|g>>>22)+p|0)^((h=((h+=(p^(g|~d))+u[2]+718787259|0)<<15|h>>>17)+g|0)|~p))+u[9]-343485551|0)<<21|d>>>11)+h|0,C[0]=p+C[0]|0,C[1]=d+C[1]|0,C[2]=h+C[2]|0,C[3]=g+C[3]|0}function o(C){var u,p=[];for(u=0;u<64;u+=4)p[u>>2]=C.charCodeAt(u)+(C.charCodeAt(u+1)<<8)+(C.charCodeAt(u+2)<<16)+(C.charCodeAt(u+3)<<24);return p}function i(C){var u,p=[];for(u=0;u<64;u+=4)p[u>>2]=C[u]+(C[u+1]<<8)+(C[u+2]<<16)+(C[u+3]<<24);return p}function r(C){var u,p,d,h,g,T,R=C.length,B=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=R;u+=64)n(B,o(C.substring(u-64,u)));for(p=(C=C.substring(u-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<p;u+=1)d[u>>2]|=C.charCodeAt(u)<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(B,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*R).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),T=parseInt(h[1],16)||0,d[14]=g,d[15]=T,n(B,d),B}function l(C){var u,p,d,h,g,T,R=C.length,B=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=R;u+=64)n(B,i(C.subarray(u-64,u)));for(p=(C=u-64<R?C.subarray(u-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<p;u+=1)d[u>>2]|=C[u]<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(B,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*R).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),T=parseInt(h[1],16)||0,d[14]=g,d[15]=T,n(B,d),B}function f(C){var u,p="";for(u=0;u<4;u+=1)p+=t[C>>8*u+4&15]+t[C>>8*u&15];return p}function v(C){var u;for(u=0;u<C.length;u+=1)C[u]=f(C[u]);return C.join("")}function S(C){return/[\u0080-\uFFFF]/.test(C)&&(C=unescape(encodeURIComponent(C))),C}function E(C,u){var p,d=C.length,h=new ArrayBuffer(d),g=new Uint8Array(h);for(p=0;p<d;p+=1)g[p]=C.charCodeAt(p);return u?g:h}function k(C){return String.fromCharCode.apply(null,new Uint8Array(C))}function A(C,u,p){var d=new Uint8Array(C.byteLength+u.byteLength);return d.set(new Uint8Array(C)),d.set(new Uint8Array(u),C.byteLength),p?d:d.buffer}function D(C){var u,p=[],d=C.length;for(u=0;u<d-1;u+=2)p.push(parseInt(C.substr(u,2),16));return String.fromCharCode.apply(String,p)}function I(){this.reset()}return v(r("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function C(u,p){return(u=0|u||0)<0?Math.max(u+p,0):Math.min(u,p)}ArrayBuffer.prototype.slice=function(u,p){var d,h,g,T,R=this.byteLength,B=C(u,R),U=R;return p!==e&&(U=C(p,R)),B>U?new ArrayBuffer(0):(d=U-B,h=new ArrayBuffer(d),g=new Uint8Array(h),T=new Uint8Array(this,B,d),g.set(T),h)}}(),I.prototype.append=function(C){return this.appendBinary(S(C)),this},I.prototype.appendBinary=function(C){this._buff+=C,this._length+=C.length;var u,p=this._buff.length;for(u=64;u<=p;u+=64)n(this._hash,o(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},I.prototype.end=function(C){var u,p,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d.charCodeAt(u)<<(u%4<<3);return this._finish(g,h),p=v(this._hash),C&&(p=D(p)),this.reset(),p},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(C){return this._buff=C.buff,this._length=C.length,this._hash=C.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.prototype._finish=function(C,u){var p,d,h,g=u;if(C[g>>2]|=128<<(g%4<<3),g>55)for(n(this._hash,C),g=0;g<16;g+=1)C[g]=0;p=(p=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(p[2],16),h=parseInt(p[1],16)||0,C[14]=d,C[15]=h,n(this._hash,C)},I.hash=function(C,u){return I.hashBinary(S(C),u)},I.hashBinary=function(C,u){var p=v(r(C));return u?D(p):p},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(C){var u,p=A(this._buff.buffer,C,!0),d=p.length;for(this._length+=C.byteLength,u=64;u<=d;u+=64)n(this._hash,i(p.subarray(u-64,u)));return this._buff=u-64<d?new Uint8Array(p.buffer.slice(u-64)):new Uint8Array(0),this},I.ArrayBuffer.prototype.end=function(C){var u,p,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d[u]<<(u%4<<3);return this._finish(g,h),p=v(this._hash),C&&(p=D(p)),this.reset(),p},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 C=I.prototype.getState.call(this);return C.buff=k(C.buff),C},I.ArrayBuffer.prototype.setState=function(C){return C.buff=E(C.buff,!0),I.prototype.setState.call(this,C)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(C,u){var p=v(l(new Uint8Array(C)));return u?D(p):p},I}();const yt=[];class ee{static addHandler(t,n,o){t.addEventListener?t.addEventListener(n,o,!1):t.attachEvent?t.attachEvent("on"+n,o):t["on"+n]=o}static windowResizeHandler(t){ee.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const o=window.document;let i=window.document.exitFullscreen||o.msExitFullscreen||o.mozCancelFullScreen||o.webkitCancelFullScreen;typeof i<"u"&&i?i.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let o=t;o||(o=window.document.documentElement);let i=o.requestFullScreen||o.webkitRequestFullScreen||o.mozRequestFullScreen||o.msRequestFullScreen;typeof i<"u"&&i?i.call(o):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(t=window.document.documentElement){let n=t;var o=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(o)o.call(n);else if(typeof window.ActiveXObject<"u"){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.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(typeof window.ActiveXObject<"u"){var o=new window.ActiveXObject("WScript.Shell");o!==null&&o.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ee.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const o=ee.isFullScreen();t(o)}):document.addEventListener("MSFullscreenChange",function(){const o=ee.isFullScreen();t(o)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(yt.indexOf(n)!==-1)return;yt.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ee.stringifyCircularHandler);return yt.length=0,n}static jsonParse(t){const n=ee.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const o=window;return o.createObjcectURL!=null?n=o.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const o=File.prototype,i=o.slice||o.mozSlice||o.webkitSlice,r=t,l=2097152,f=new vt.ArrayBuffer,v=new FileReader;v.onload=function(S){f.append(S.target?.result);const E=f.end();n({isOK:!0,data:E})},v.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=0+l>=r.size?r.size:0+l;v.readAsArrayBuffer(i.call(r,0,S))}()}static getFileMD5(t,n){const o=File.prototype,i=o.slice||o.mozSlice||o.webkitSlice,r=t,l=2097152,f=Math.ceil(r.size/l);let v=0;const S=new vt.ArrayBuffer,E=new FileReader;function k(){const A=v*l,D=A+l>=r.size?r.size:A+l;E.readAsArrayBuffer(i.call(r,A,D))}E.onload=function(A){if(S.append(A.target?.result),v++,v<f)k();else{const D=S.end();n({isOK:!0,data:D})}},E.onerror=function(){const A=`${r.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(A),n({isOK:!1,data:A})},k()}static MD5(t,n=!1){return vt.hash(t,n)}static copyTextByCommand(t){return new Promise((n,o)=>{const i=document.createElement("input");i.value=t,document.body.appendChild(i),i.select(),document.execCommand("copy"),i.remove(),n(!0)})}static copyText=t=>navigator.clipboard?navigator.clipboard.writeText(t).then(function(){return!0},function(n){return!1}):ee.copyTextByCommand(t);static copyElementTextByCommand(t){const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(n);try{return document.execCommand("copy"),o.removeRange(n),!0}catch(i){return o.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",i),!1}}static copyElementText(t){if(!navigator.clipboard)return ee.copyElementTextByCommand(t);const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(n),navigator.clipboard.writeText(o).then(function(){return o.removeRange(n),!0},function(i){return o.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",i),!1})}static setGrayMode(t){ee.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(t,n,o){const i=o||document.body;let{className:r}=i;r=r.replace(n,""),i.className=t?`${r} ${n} `:r}static setCssVar(t,n,o=document.documentElement){o.style.setProperty(t,n)}static dispatchWindowResize(){const t=new Event("resize");window.dispatchEvent(t)}static dispatchElementEvent(t,n="click",o){let i;if(i=Le(t)?document.getElementById(t):t,i){const r=new Event(n,{bubbles:!0,cancelable:!0});o&&i.addEventListener("ev",l=>{o(l)},!1),i.dispatchEvent(r)}}}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,o)=>o.toUpperCase()).replace("views","")}}class Be{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,o=604800){const i=JSON.stringify({value:n,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(t),i)}get(t,n=null){const o=this.storage.getItem(this.getKey(t));if(o)try{const i=JSON.parse(o),{value:r,expire:l}=i;if(l===null||l>=Date.now())return r;this.remove(this.getKey(t))}catch{return n}return n}getJsonObject(t){const n=this.storage.getItem(this.getKey(t));if(n)try{const o=JSON.parse(n);if(o.expire===null||o.expire>=Date.now())return o;this.remove(this.getKey(t))}catch{return}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,o=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${o}`}getCookie(t){const n=document.cookie.split("; ");for(let o=0,i=n.length;o<i;o++){const r=n[o].split("=");if(r[0]===this.getKey(t))return r[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 yi=new Be("",localStorage);function Ae(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const i=Math.floor(16*Math.random());e[n]=t.substring(i,i+1)}e[14]="4";const o=3&Number(e[19])|8;return e[19]=t.substring(o,o+1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function wt(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 Te(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function bt(e){let t=e.toLowerCase();if(Te(e)){if(t.length===4){let o="#";for(let i=1;i<4;i+=1)o+=t.slice(i,i+1).concat(t.slice(i,i+1));t=o}const n=[];for(let o=1;o<7;o+=2)n.push(parseInt("0x"+t.slice(o,o+2)));return"RGB("+n.join(",")+")"}return t}function St(e,t){const n=parseInt(e,16)+t,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function bn(e,t,n){const o=[e,t,n].map(i=>(i/=255)<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}function Ct(e,t){const n=parseInt(e,16)-t,o=n<0?0:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function xt(e){return{all:e=e||new Map,on(t,n){const o=e?.get(t);o&&o.push(n)||e?.set(t,[n])},off(t,n){const o=e?.get(t);o&&o.splice(o.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(o=>{o(n)}),(e?.get("*")||[]).slice().map(o=>{o(t,n)})}}}exports.EnumColor=void 0,function(e){e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla"}(exports.EnumColor||(exports.EnumColor={}));const ge=xt(),Q={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Pe=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const o=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(o),document.body.appendChild(n),n.click(),document.body.removeChild(n)},Sn=(e,t)=>{const n=JSON.stringify(e,null,2);t?Pe(n,t+".json"):ge.emit(Q.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")};function Cn(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function xn(e){return new Promise(t=>setTimeout(t,e))}var En,kn,Et,De={exports:{}};kn=he,Et=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function i(I,C){var u=I[C];if(typeof u.bind=="function")return u.bind(I);try{return Function.prototype.bind.call(u,I)}catch{return function(){return Function.prototype.apply.apply(u,[I,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(I){return I==="debug"&&(I="log"),typeof console!==t&&(I==="trace"&&n?r:console[I]!==void 0?i(console,I):console.log!==void 0?i(console,"log"):e)}function f(I,C){for(var u=0;u<o.length;u++){var p=o[u];this[p]=u<I?e:this.methodFactory(p,I,C)}this.log=this.debug}function v(I,C,u){return function(){typeof console!==t&&(f.call(this,C,u),this[I].apply(this,arguments))}}function S(I,C,u){return l(I)||v.apply(this,arguments)}function E(I,C,u){var p,d=this;C=C??"WARN";var h="loglevel";function g(){var R;if(typeof window!==t&&h){try{R=window.localStorage[h]}catch{}if(typeof R===t)try{var B=window.document.cookie,U=B.indexOf(encodeURIComponent(h)+"=");U!==-1&&(R=/^([^;]+)/.exec(B.slice(U))[1])}catch{}return d.levels[R]===void 0&&(R=void 0),R}}typeof I=="string"?h+=":"+I:typeof I=="symbol"&&(h=void 0),d.name=I,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=u||S,d.getLevel=function(){return p},d.setLevel=function(R,B){if(typeof R=="string"&&d.levels[R.toUpperCase()]!==void 0&&(R=d.levels[R.toUpperCase()]),!(typeof R=="number"&&R>=0&&R<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+R;if(p=R,B!==!1&&function(U){var F=(o[U]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=F)}catch{}try{window.document.cookie=encodeURIComponent(h)+"="+F+";"}catch{}}}(R),f.call(d,R,I),typeof console===t&&R<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(R){C=R,g()||d.setLevel(R,!1)},d.resetLevel=function(){d.setLevel(C,!1),function(){if(typeof window!==t&&h){try{return void window.localStorage.removeItem(h)}catch{}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},d.enableAll=function(R){d.setLevel(d.levels.TRACE,R)},d.disableAll=function(R){d.setLevel(d.levels.SILENT,R)};var T=g();T==null&&(T=C),d.setLevel(T,!1)}var k=new E,A={};k.getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var C=A[I];return C||(C=A[I]=new E(I,k.getLevel(),k.methodFactory)),C};var D=typeof window!==t?window.log:void 0;return k.noConflict=function(){return typeof window!==t&&window.log===k&&(window.log=D),k},k.getLoggers=function(){return A},k.default=k,k},(En=De).exports?En.exports=Et():kn.log=Et();let zn=!1;const N={Config:SysConfig,EventBus:ge,DefaultProxyClient:null,Axios:di.default,Logger:e=>{zn||((void 0).DEV||SysConfig.UI.ProductLog?De.exports.enableAll():De.exports.setDefaultLevel("warn"),zn=!0);const t=e||"default";return De.exports.getLogger(t)}},In="access_token",ie=new Be("user",localStorage);function de(){return ie.get(In)}function kt(){ie.remove(In)}function Rn(){return de()?.refresh}function zt(e,t,n,o="json",i){const r={baseURL:N.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(l){return fi.default.stringify(l,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+de()?.token},responseType:o,cancelToken:i};if(n)for(let l in n)r.headers[l]=n[l];return N.SystemID&&(r.headers.sysid=N.SystemID,N.SystemGroup&&(r.headers.sysgroup=N.SystemGroup)),t&&(r.baseURL=t),r}function re(e,t,n,o,i="json",r,l){const f=zt(n,t,o,i,r);return l&&l>=2e4&&(f.timeout=l),N.Axios?.get(e,f).catch(function(v){Ne(v,t,e,"Get")})}function Ne(e,t,n,o="Get"){const i=`${t}${n}`;if(e&&e.response){let r=!1;const l=e.response.status;switch(l){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const v=e.response.data;if(v){const S=v.indexOf(":"),E=v.indexOf(`
|
|
2
|
+
`);if(S>0&&E-S>2){const k=v.substring(S+2,E);k.indexOf("System.Exception")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(r=!0,e.message=k)}}else e.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:e.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:e.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:e.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:e.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:e.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:e.message=`\u8FDE\u63A5\u9519\u8BEF${e.response.status}`}let f={address:i,code:l,isExceptionInfo:r,message:e.message,result:e.response.data};if(N.EventBus.emit(Q.AxiosRequestErrorEvent,f),r)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Mn(e,t,n,o,i,r="json",l){const f=zt(o,t,i,r);l&&l>=2e4&&(f.timeout=l),f.headers["Content-Type"]="multipart/form-data";const v=function(S){let E=new FormData;return S&&Object.keys(S).forEach(k=>{if(!S)return;let A=S[k];A!=null&&(gt(A)?A.forEach(D=>{E.append(k,_n(D))}):E.append(k,_n(A)))}),E}(n);return N.Axios?.post(e,v,f).catch(function(S){Ne(S,t,e,"Post")})}function Ln(e,t,n,o,i,r="json",l){const f=zt(o,t,i,r);return l&&l>=2e4&&(f.timeout=l),N.Axios?.post(e,n,f).catch(function(v){Ne(v,t,e,"Post")})}function _n(e){return e instanceof Blob?e:e.toString()}var It={exports:{}},wi=typeof window<"u"?window:he!==void 0?he:typeof self<"u"?self:{},bi=function(e){if(!e)return!1;var t=Si.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Si=Object.prototype.toString,Rt=function(e){return e.replace(/^\s+|\s+$/g,"")},Ci=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)xi.call(n,o)&&(e[o]=n[o])}return e},xi=Object.prototype.hasOwnProperty,Bn=wi,Ei=bi,ki=function(e){if(!e)return{};for(var t,n={},o=Rt(e).split(`
|
|
3
3
|
`),i=0;i<o.length;i++){var r=o[i],l=r.indexOf(":"),f=Rt(r.slice(0,l)).toLowerCase(),v=Rt(r.slice(l+1));n[f]===void 0?n[f]=v:(t=n[f],Object.prototype.toString.call(t)==="[object Array]"?n[f].push(v):n[f]=[n[f],v])}return n},zi=Ci;function An(e,t,n){var o=e;return Ei(t)?(n=t,typeof e=="string"&&(o={uri:e})):o=zi(t,{uri:e}),o.callback=n,o}function se(e,t,n){return Tn(t=An(e,t,n))}function Tn(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(p,d,h){t||(t=!0,e.callback(p,d,h))};function o(){var p=void 0;if(p=v.response?v.response:v.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var h=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!h)return d.responseXML}catch{}return null}(v),C)try{p=JSON.parse(p)}catch{}return p}function i(p){return clearTimeout(S),p instanceof Error||(p=new Error(""+(p||"Unknown XMLHttpRequest Error"))),p.statusCode=0,n(p,u)}function r(){if(!f){var p;clearTimeout(S),p=e.useXDR&&v.status===void 0?200:v.status===1223?204:v.status;var d=u,h=null;return p!==0?(d={body:o(),statusCode:p,method:k,headers:{},url:E,rawRequest:v},v.getAllResponseHeaders&&(d.headers=ki(v.getAllResponseHeaders()))):h=new Error("Internal XMLHttpRequest Error"),n(h,d,d.body)}}var l,f,v=e.xhr||null;v||(v=e.cors||e.useXDR?new se.XDomainRequest:new se.XMLHttpRequest);var S,E=v.url=e.uri||e.url,k=v.method=e.method||"GET",A=e.body||e.data,D=v.headers=e.headers||{},I=!!e.sync,C=!1,u={body:void 0,headers:{},statusCode:0,method:k,url:E,rawRequest:v};if("json"in e&&e.json!==!1&&(C=!0,D.accept||D.Accept||(D.Accept="application/json"),k!=="GET"&&k!=="HEAD"&&(D["content-type"]||D["Content-Type"]||(D["Content-Type"]="application/json"),A=JSON.stringify(e.json===!0?A:e.json))),v.onreadystatechange=function(){v.readyState===4&&setTimeout(r,0)},v.onload=r,v.onerror=i,v.onprogress=function(){},v.onabort=function(){f=!0},v.ontimeout=i,v.open(k,E,!I,e.username,e.password),I||(v.withCredentials=!!e.withCredentials),!I&&e.timeout>0&&(S=setTimeout(function(){if(!f){f=!0,v.abort("timeout");var p=new Error("XMLHttpRequest timeout");p.code="ETIMEDOUT",i(p)}},e.timeout)),v.setRequestHeader)for(l in D)D.hasOwnProperty(l)&&v.setRequestHeader(l,D[l]);else if(e.headers&&!function(p){for(var d in p)if(p.hasOwnProperty(d))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(v.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(v),v.send(A||null),v}It.exports=se,It.exports.default=se,se.XMLHttpRequest=Bn.XMLHttpRequest||function(){},se.XDomainRequest="withCredentials"in new se.XMLHttpRequest?se.XMLHttpRequest:Bn.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){se[e==="delete"?"del":e]=function(t,n,o){return(n=An(t,n,o)).method=e.toUpperCase(),Tn(n)}});const Ii=[200,201,202,204,308],Ri=[408,502,503,504];class Pn{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=xt(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{!this.offline||(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,o=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(o,o+n))})}xhrPromise(t){const n=o=>{o.upload.onprogress=i=>{const r=100/this.totalChunks,l=r*this.file.size,f=r*this.chunkCount,v=i.loaded/(i.total??l)*r;this.dispatch("progress",Math.min(f+v,100))}};return new Promise((o,i)=>{this.currentXhr=It.exports({...t,beforeSend:n},(r,l)=>(this.currentXhr=void 0,r?i(r):o(l)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,o={...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:o,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(){console.log(this.paused,this.offline,this.success,"sendChunks this.paused || this.offline || this.success"),!(this.paused||this.offline||this.success)&&this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Ii.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=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Ri.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;console.log(`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`),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 Mi=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}};class Ee{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!_e.isNullOrEmpty(t)){if(Ee.httpTransport||(Ee.httpTransport=new hi.HttpTransport),this.client=new Re.Client(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):ge.emit(Q.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,o){if(this.client)return await this.client.invoke(t,n,o)}encode(t,n,o){if(this.client)return this.client.codec.encode(t,n,o)}decode(t,n){if(this.client)return this.client.codec.decode(t,n)}}class we{hproseClient;hpProxyObj;defaultContext=new Re.ClientContext;constructor(t){this.hproseClient=new Ee(t),this.hpProxyObj=null}getClientContext(t,n){const o={};n&&(o.requestHeaders=n);const i=de();o.httpRequestHeaders=t||{};const r=o.httpRequestHeaders;return i&&(r.token=i.token),N.SystemID&&(r.sysid=N.SystemID,N.SystemGroup&&(r.sysgroup=N.SystemGroup)),new Re.ClientContext(o)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||ge.emit(Q.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,o){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,o)}async hproseInvokeContext(t,n,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const i=de();return console.log(i,"userToken3"),i&&(n||(n=new Re.ClientContext({httpRequestHeaders:{token:i.token}}))),await this.hproseClient.invoke(t,o,n)}async hproseInvokeEncode(t){const n=new vn.ByteStream(t).toBytes(),o=await this.hproseClient.client?.request(n,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(t,...n){const o=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return vn.ByteStream.toString(o)}}class Li{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:t,duration:n});else switch(o){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn?this.message.warn(t,n):this.message.warning&&this.message.warning(t,n);break;case"error":this.message.error(t,n)}else{switch(o){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":o="dark",console.error(t)}this.eventBus&&this.eventBus.emit(Q.AlertInfoEvent,{type:o,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")}success(t,n=3){this.msg(t,n,"success")}}const Mt=new Map;function Dn(e){if(e&&_e.isNotEmpty(e)){if(Mt.has(e))return Mt.get(e);{const t=new we(e);return Mt.set(e,t),t}}}const Lt="is_LockScreen",Nn=ie.get(Lt,!1),be={isLock:Nn,lockTime:Nn=="true"?On():0};function Un(e){be.isLock=e,ie.set(Lt,e,10),e&&(kt(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function On(){let e=3600;return N.Config.UI?.LockTime&&N.Config.UI?.LockTime>=10&&(e=N.Config.UI.LockTime),e}let _t;function Bt(){clearInterval(_t),!(window.location.href.indexOf("/login")>0||be.isLock)&&(Un(!1),be.lockTime=On(),_t=setInterval(()=>{if(be.lockTime--,be.lockTime<=0)return Un(!0),clearInterval(_t)},1e3))}function At(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 _i={exports:{}},Ue=_i.exports=function e(t,n,o){function i(f,v){if(!n[f]){if(!t[f]){if(!v&&At)return At(f);if(r)return r(f,!0);var S=new Error("Cannot find module '"+f+"'");throw S.code="MODULE_NOT_FOUND",S}var E=n[f]={exports:{}};t[f][0].call(E.exports,function(k){var A=t[f][1][k];return i(A||k)},E,E.exports,e,t,n,o)}return n[f].exports}for(var r=At,l=0;l<o.length;l++)i(o[l]);return i}({1:[function(e,t,n){(function(o){var i,r,l=o.MutationObserver||o.WebKitMutationObserver;if(l){var f=0,v=new l(A),S=o.document.createTextNode("");v.observe(S,{characterData:!0}),i=function(){S.data=f=++f%2}}else if(o.setImmediate||o.MessageChannel===void 0)i="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var I=o.document.createElement("script");I.onreadystatechange=function(){A(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},o.document.documentElement.appendChild(I)}:function(){setTimeout(A,0)};else{var E=new o.MessageChannel;E.port1.onmessage=A,i=function(){E.port2.postMessage(0)}}var k=[];function A(){var I,C;r=!0;for(var u=k.length;u;){for(C=k,k=[],I=-1;++I<u;)C[I]();u=k.length}r=!1}function D(I){k.push(I)!==1||r||i()}t.exports=D}).call(this,he!==void 0?he:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var o=e(1);function i(){}var r={},l=["REJECTED"],f=["FULFILLED"],v=["PENDING"];function S(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,h!==i&&D(this,h)}function E(h,g,T){this.promise=h,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof T=="function"&&(this.onRejected=T,this.callRejected=this.otherCallRejected)}function k(h,g,T){o(function(){var R;try{R=g(T)}catch(B){return r.reject(h,B)}R===h?r.reject(h,new TypeError("Cannot resolve promise with itself")):r.resolve(h,R)})}function A(h){var g=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof g=="function")return function(){g.apply(h,arguments)}}function D(h,g){var T=!1;function R(j){T||(T=!0,r.reject(h,j))}function B(j){T||(T=!0,r.resolve(h,j))}function U(){g(B,R)}var F=I(U);F.status==="error"&&R(F.value)}function I(h,g){var T={};try{T.value=h(g),T.status="success"}catch(R){T.status="error",T.value=R}return T}function C(h){return h instanceof this?h:r.resolve(new this(i),h)}function u(h){var g=new this(i);return r.reject(g,h)}function p(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=h.length,R=!1;if(!T)return this.resolve([]);for(var B=new Array(T),U=0,F=-1,j=new this(i);++F<T;)H(h[F],F);return j;function H(Z,V){function X(q){B[V]=q,++U!==T||R||(R=!0,r.resolve(j,B))}g.resolve(Z).then(X,function(q){R||(R=!0,r.reject(j,q))})}}function d(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=h.length,R=!1;if(!T)return this.resolve([]);for(var B=-1,U=new this(i);++B<T;)F(h[B]);return U;function F(j){g.resolve(j).then(function(H){R||(R=!0,r.resolve(U,H))},function(H){R||(R=!0,r.reject(U,H))})}}t.exports=S,S.prototype.catch=function(h){return this.then(null,h)},S.prototype.then=function(h,g){if(typeof h!="function"&&this.state===f||typeof g!="function"&&this.state===l)return this;var T=new this.constructor(i);return this.state!==v?k(T,this.state===f?h:g,this.outcome):this.queue.push(new E(T,h,g)),T},E.prototype.callFulfilled=function(h){r.resolve(this.promise,h)},E.prototype.otherCallFulfilled=function(h){k(this.promise,this.onFulfilled,h)},E.prototype.callRejected=function(h){r.reject(this.promise,h)},E.prototype.otherCallRejected=function(h){k(this.promise,this.onRejected,h)},r.resolve=function(h,g){var T=I(A,g);if(T.status==="error")return r.reject(h,T.value);var R=T.value;if(R)D(h,R);else{h.state=f,h.outcome=g;for(var B=-1,U=h.queue.length;++B<U;)h.queue[B].callFulfilled(g)}return h},r.reject=function(h,g){h.state=l,h.outcome=g;for(var T=-1,R=h.queue.length;++T<R;)h.queue[T].callRejected(g);return h},S.resolve=C,S.reject=u,S.all=p,S.race=d},{1:1}],3:[function(e,t,n){(function(o){typeof o.Promise!="function"&&(o.Promise=e(2))}).call(this,he!==void 0?he:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function i(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function r(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var l=r();function f(){try{if(!l||!l.open)return!1;var s=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),a=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!s||a)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(s,a){s=s||[],a=a||{};try{return new Blob(s,a)}catch(m){if(m.name!=="TypeError")throw m;for(var c=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),y=0;y<s.length;y+=1)c.append(s[y]);return c.getBlob(a.type)}}typeof Promise>"u"&&e(3);var S=Promise;function E(s,a){a&&s.then(function(c){a(null,c)},function(c){a(c)})}function k(s,a,c){typeof a=="function"&&s.then(a),typeof c=="function"&&s.catch(c)}function A(s){return typeof s!="string"&&(console.warn(s+" used as a key, but it is not a string."),s=String(s)),s}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="local-forage-detect-blob-support",C=void 0,u={},p=Object.prototype.toString,d="readonly",h="readwrite";function g(s){for(var a=s.length,c=new ArrayBuffer(a),y=new Uint8Array(c),m=0;m<a;m++)y[m]=s.charCodeAt(m);return c}function T(s){return new S(function(a){var c=s.transaction(I,h),y=v([""]);c.objectStore(I).put(y,"key"),c.onabort=function(m){m.preventDefault(),m.stopPropagation(),a(!1)},c.oncomplete=function(){var m=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);a(b||!m||parseInt(m[1],10)>=43)}}).catch(function(){return!1})}function R(s){return typeof C=="boolean"?S.resolve(C):T(s).then(function(a){return C=a})}function B(s){var a=u[s.name],c={};c.promise=new S(function(y,m){c.resolve=y,c.reject=m}),a.deferredOperations.push(c),a.dbReady?a.dbReady=a.dbReady.then(function(){return c.promise}):a.dbReady=c.promise}function U(s){var a=u[s.name].deferredOperations.pop();if(a)return a.resolve(),a.promise}function F(s,a){var c=u[s.name].deferredOperations.pop();if(c)return c.reject(a),c.promise}function j(s,a){return new S(function(c,y){if(u[s.name]=u[s.name]||Yt(),s.db){if(!a)return c(s.db);B(s),s.db.close()}var m=[s.name];a&&m.push(s.version);var b=l.open.apply(l,m);a&&(b.onupgradeneeded=function(x){var z=b.result;try{z.createObjectStore(s.storeName),x.oldVersion<=1&&z.createObjectStore(I)}catch(M){if(M.name!=="ConstraintError")throw M;console.warn('The database "'+s.name+'" has been upgraded from version '+x.oldVersion+" to version "+x.newVersion+', but the storage "'+s.storeName+'" already exists.')}}),b.onerror=function(x){x.preventDefault(),y(b.error)},b.onsuccess=function(){var x=b.result;x.onversionchange=function(z){z.target.close()},c(x),U(s)}})}function H(s){return j(s,!1)}function Z(s){return j(s,!0)}function V(s,a){if(!s.db)return!0;var c=!s.db.objectStoreNames.contains(s.storeName),y=s.version<s.db.version,m=s.version>s.db.version;if(y&&(s.version!==a&&console.warn('The database "'+s.name+`" can't be downgraded from version `+s.db.version+" to version "+s.version+"."),s.version=s.db.version),m||c){if(c){var b=s.db.version+1;b>s.version&&(s.version=b)}return!0}return!1}function X(s){return new S(function(a,c){var y=new FileReader;y.onerror=c,y.onloadend=function(m){var b=btoa(m.target.result||"");a({__local_forage_encoded_blob:!0,data:b,type:s.type})},y.readAsBinaryString(s)})}function q(s){return v([g(atob(s.data))],{type:s.type})}function ne(s){return s&&s.__local_forage_encoded_blob}function ke(s){var a=this,c=a._initReady().then(function(){var y=u[a._dbInfo.name];if(y&&y.dbReady)return y.dbReady});return k(c,s,s),c}function ot(s){B(s);for(var a=u[s.name],c=a.forages,y=0;y<c.length;y++){var m=c[y];m._dbInfo.db&&(m._dbInfo.db.close(),m._dbInfo.db=null)}return s.db=null,H(s).then(function(b){return s.db=b,V(s)?Z(s):b}).then(function(b){s.db=a.db=b;for(var x=0;x<c.length;x++)c[x]._dbInfo.db=b}).catch(function(b){throw F(s,b),b})}function te(s,a,c,y){y===void 0&&(y=1);try{var m=s.db.transaction(s.storeName,a);c(null,m)}catch(b){if(y>0&&(!s.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return S.resolve().then(function(){if(!s.db||b.name==="NotFoundError"&&!s.db.objectStoreNames.contains(s.storeName)&&s.version<=s.db.version)return s.db&&(s.version=s.db.version+1),Z(s)}).then(function(){return ot(s).then(function(){te(s,a,c,y-1)})}).catch(c);c(b)}}function Yt(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function fo(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=s[y];var m=u[c.name];m||(m=Yt(),u[c.name]=m),m.forages.push(a),a._initReady||(a._initReady=a.ready,a.ready=ke);var b=[];function x(){return S.resolve()}for(var z=0;z<m.forages.length;z++){var M=m.forages[z];M!==a&&b.push(M._initReady().catch(x))}var L=m.forages.slice(0);return S.all(b).then(function(){return c.db=m.db,H(c)}).then(function(_){return c.db=_,V(c,a._defaultConfig.version)?Z(c):_}).then(function(_){c.db=m.db=_,a._dbInfo=c;for(var P=0;P<L.length;P++){var O=L[P];O!==a&&(O._dbInfo.db=c.db,O._dbInfo.version=c.version)}})}function po(s,a){var c=this;s=A(s);var y=new S(function(m,b){c.ready().then(function(){te(c._dbInfo,d,function(x,z){if(x)return b(x);try{var M=z.objectStore(c._dbInfo.storeName).get(s);M.onsuccess=function(){var L=M.result;L===void 0&&(L=null),ne(L)&&(L=q(L)),m(L)},M.onerror=function(){b(M.error)}}catch(L){b(L)}})}).catch(b)});return E(y,a),y}function mo(s,a){var c=this,y=new S(function(m,b){c.ready().then(function(){te(c._dbInfo,d,function(x,z){if(x)return b(x);try{var M=z.objectStore(c._dbInfo.storeName).openCursor(),L=1;M.onsuccess=function(){var _=M.result;if(_){var P=_.value;ne(P)&&(P=q(P));var O=s(P,_.key,L++);O!==void 0?m(O):_.continue()}else m()},M.onerror=function(){b(M.error)}}catch(_){b(_)}})}).catch(b)});return E(y,a),y}function go(s,a,c){var y=this;s=A(s);var m=new S(function(b,x){var z;y.ready().then(function(){return z=y._dbInfo,p.call(a)==="[object Blob]"?R(z.db).then(function(M){return M?a:X(a)}):a}).then(function(M){te(y._dbInfo,h,function(L,_){if(L)return x(L);try{var P=_.objectStore(y._dbInfo.storeName);M===null&&(M=void 0);var O=P.put(M,s);_.oncomplete=function(){M===void 0&&(M=null),b(M)},_.onabort=_.onerror=function(){var $=O.error?O.error:O.transaction.error;x($)}}catch($){x($)}})}).catch(x)});return E(m,c),m}function vo(s,a){var c=this;s=A(s);var y=new S(function(m,b){c.ready().then(function(){te(c._dbInfo,h,function(x,z){if(x)return b(x);try{var M=z.objectStore(c._dbInfo.storeName).delete(s);z.oncomplete=function(){m()},z.onerror=function(){b(M.error)},z.onabort=function(){var L=M.error?M.error:M.transaction.error;b(L)}}catch(L){b(L)}})}).catch(b)});return E(y,a),y}function yo(s){var a=this,c=new S(function(y,m){a.ready().then(function(){te(a._dbInfo,h,function(b,x){if(b)return m(b);try{var z=x.objectStore(a._dbInfo.storeName).clear();x.oncomplete=function(){y()},x.onabort=x.onerror=function(){var M=z.error?z.error:z.transaction.error;m(M)}}catch(M){m(M)}})}).catch(m)});return E(c,s),c}function wo(s){var a=this,c=new S(function(y,m){a.ready().then(function(){te(a._dbInfo,d,function(b,x){if(b)return m(b);try{var z=x.objectStore(a._dbInfo.storeName).count();z.onsuccess=function(){y(z.result)},z.onerror=function(){m(z.error)}}catch(M){m(M)}})}).catch(m)});return E(c,s),c}function bo(s,a){var c=this,y=new S(function(m,b){s<0?m(null):c.ready().then(function(){te(c._dbInfo,d,function(x,z){if(x)return b(x);try{var M=z.objectStore(c._dbInfo.storeName),L=!1,_=M.openKeyCursor();_.onsuccess=function(){var P=_.result;P?s===0||L?m(P.key):(L=!0,P.advance(s)):m(null)},_.onerror=function(){b(_.error)}}catch(P){b(P)}})}).catch(b)});return E(y,a),y}function So(s){var a=this,c=new S(function(y,m){a.ready().then(function(){te(a._dbInfo,d,function(b,x){if(b)return m(b);try{var z=x.objectStore(a._dbInfo.storeName).openKeyCursor(),M=[];z.onsuccess=function(){var L=z.result;L?(M.push(L.key),L.continue()):y(M)},z.onerror=function(){m(z.error)}}catch(L){m(L)}})}).catch(m)});return E(c,s),c}function Co(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;if(s.name){var b=s.name===c.name&&m._dbInfo.db?S.resolve(m._dbInfo.db):H(s).then(function(x){var z=u[s.name],M=z.forages;z.db=x;for(var L=0;L<M.length;L++)M[L]._dbInfo.db=x;return x});y=s.storeName?b.then(function(x){if(x.objectStoreNames.contains(s.storeName)){var z=x.version+1;B(s);var M=u[s.name],L=M.forages;x.close();for(var _=0;_<L.length;_++){var P=L[_];P._dbInfo.db=null,P._dbInfo.version=z}var O=new S(function($,W){var G=l.open(s.name,z);G.onerror=function(oe){G.result.close(),W(oe)},G.onupgradeneeded=function(){G.result.deleteObjectStore(s.storeName)},G.onsuccess=function(){var oe=G.result;oe.close(),$(oe)}});return O.then(function($){M.db=$;for(var W=0;W<L.length;W++){var G=L[W];G._dbInfo.db=$,U(G._dbInfo)}}).catch(function($){throw(F(s,$)||S.resolve()).catch(function(){}),$})}}):b.then(function(x){B(s);var z=u[s.name],M=z.forages;x.close();for(var L=0;L<M.length;L++)M[L]._dbInfo.db=null;var _=new S(function(P,O){var $=l.deleteDatabase(s.name);$.onerror=function(){var W=$.result;W&&W.close(),O($.error)},$.onblocked=function(){console.warn('dropInstance blocked for database "'+s.name+'" until all open connections are closed')},$.onsuccess=function(){var W=$.result;W&&W.close(),P(W)}});return _.then(function(P){z.db=P;for(var O=0;O<M.length;O++)U(M[O]._dbInfo)}).catch(function(P){throw(F(s,P)||S.resolve()).catch(function(){}),P})})}else y=S.reject("Invalid arguments");return E(y,a),y}var xo={_driver:"asyncStorage",_initStorage:fo,_support:f(),iterate:mo,getItem:po,setItem:go,removeItem:vo,clear:yo,length:wo,key:bo,keys:So,dropInstance:Co};function Eo(){return typeof openDatabase=="function"}var ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ko="~~local_forage_type~",Jt=/^~~local_forage_type~([^~]+)~/,ze="__lfsc__:",it=ze.length,rt="arbf",st="blob",Zt="si08",Qt="ui08",en="uic8",tn="si16",nn="si32",on="ur16",rn="ui32",sn="fl32",an="fl64",cn=it+rt.length,un=Object.prototype.toString;function ln(s){var a,c,y,m,b,x=.75*s.length,z=s.length,M=0;s[s.length-1]==="="&&(x--,s[s.length-2]==="="&&x--);var L=new ArrayBuffer(x),_=new Uint8Array(L);for(a=0;a<z;a+=4)c=ae.indexOf(s[a]),y=ae.indexOf(s[a+1]),m=ae.indexOf(s[a+2]),b=ae.indexOf(s[a+3]),_[M++]=c<<2|y>>4,_[M++]=(15&y)<<4|m>>2,_[M++]=(3&m)<<6|63&b;return L}function at(s){var a,c=new Uint8Array(s),y="";for(a=0;a<c.length;a+=3)y+=ae[c[a]>>2],y+=ae[(3&c[a])<<4|c[a+1]>>4],y+=ae[(15&c[a+1])<<2|c[a+2]>>6],y+=ae[63&c[a+2]];return c.length%3==2?y=y.substring(0,y.length-1)+"=":c.length%3==1&&(y=y.substring(0,y.length-2)+"=="),y}function zo(s,a){var c="";if(s&&(c=un.call(s)),s&&(c==="[object ArrayBuffer]"||s.buffer&&un.call(s.buffer)==="[object ArrayBuffer]")){var y,m=ze;s instanceof ArrayBuffer?(y=s,m+=rt):(y=s.buffer,c==="[object Int8Array]"?m+=Zt:c==="[object Uint8Array]"?m+=Qt:c==="[object Uint8ClampedArray]"?m+=en:c==="[object Int16Array]"?m+=tn:c==="[object Uint16Array]"?m+=on:c==="[object Int32Array]"?m+=nn:c==="[object Uint32Array]"?m+=rn:c==="[object Float32Array]"?m+=sn:c==="[object Float64Array]"?m+=an:a(new Error("Failed to get type for BinaryArray"))),a(m+at(y))}else if(c==="[object Blob]"){var b=new FileReader;b.onload=function(){var x=ko+s.type+"~"+at(this.result);a(ze+st+x)},b.readAsArrayBuffer(s)}else try{a(JSON.stringify(s))}catch(x){console.error("Couldn't convert value into a JSON string: ",s),a(null,x)}}function Io(s){if(s.substring(0,it)!==ze)return JSON.parse(s);var a,c=s.substring(cn),y=s.substring(it,cn);if(y===st&&Jt.test(c)){var m=c.match(Jt);a=m[1],c=c.substring(m[0].length)}var b=ln(c);switch(y){case rt:return b;case st:return v([b],{type:a});case Zt:return new Int8Array(b);case Qt:return new Uint8Array(b);case en:return new Uint8ClampedArray(b);case tn:return new Int16Array(b);case on:return new Uint16Array(b);case nn:return new Int32Array(b);case rn:return new Uint32Array(b);case sn:return new Float32Array(b);case an:return new Float64Array(b);default:throw new Error("Unkown type: "+y)}}var ct={serialize:zo,deserialize:Io,stringToBuffer:ln,bufferToString:at};function hn(s,a,c,y){s.executeSql("CREATE TABLE IF NOT EXISTS "+a.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,y)}function Ro(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=typeof s[y]!="string"?s[y].toString():s[y];var m=new S(function(b,x){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(z){return x(z)}c.db.transaction(function(z){hn(z,c,function(){a._dbInfo=c,b()},function(M,L){x(L)})},x)});return c.serializer=ct,m}function ce(s,a,c,y,m,b){s.executeSql(c,y,m,function(x,z){z.code===z.SYNTAX_ERR?x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[a.storeName],function(M,L){L.rows.length?b(M,z):hn(M,a,function(){M.executeSql(c,y,m,b)},b)},b):b(x,z)},b)}function Mo(s,a){var c=this;s=A(s);var y=new S(function(m,b){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(z){ce(z,x,"SELECT * FROM "+x.storeName+" WHERE key = ? LIMIT 1",[s],function(M,L){var _=L.rows.length?L.rows.item(0).value:null;_&&(_=x.serializer.deserialize(_)),m(_)},function(M,L){b(L)})})}).catch(b)});return E(y,a),y}function Lo(s,a){var c=this,y=new S(function(m,b){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(z){ce(z,x,"SELECT * FROM "+x.storeName,[],function(M,L){for(var _=L.rows,P=_.length,O=0;O<P;O++){var $=_.item(O),W=$.value;if(W&&(W=x.serializer.deserialize(W)),(W=s(W,$.key,O+1))!==void 0)return void m(W)}m()},function(M,L){b(L)})})}).catch(b)});return E(y,a),y}function dn(s,a,c,y){var m=this;s=A(s);var b=new S(function(x,z){m.ready().then(function(){a===void 0&&(a=null);var M=a,L=m._dbInfo;L.serializer.serialize(a,function(_,P){P?z(P):L.db.transaction(function(O){ce(O,L,"INSERT OR REPLACE INTO "+L.storeName+" (key, value) VALUES (?, ?)",[s,_],function(){x(M)},function($,W){z(W)})},function(O){if(O.code===O.QUOTA_ERR){if(y>0)return void x(dn.apply(m,[s,M,c,y-1]));z(O)}})})}).catch(z)});return E(b,c),b}function _o(s,a,c){return dn.apply(this,[s,a,c,1])}function Bo(s,a){var c=this;s=A(s);var y=new S(function(m,b){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(z){ce(z,x,"DELETE FROM "+x.storeName+" WHERE key = ?",[s],function(){m()},function(M,L){b(L)})})}).catch(b)});return E(y,a),y}function Ao(s){var a=this,c=new S(function(y,m){a.ready().then(function(){var b=a._dbInfo;b.db.transaction(function(x){ce(x,b,"DELETE FROM "+b.storeName,[],function(){y()},function(z,M){m(M)})})}).catch(m)});return E(c,s),c}function To(s){var a=this,c=new S(function(y,m){a.ready().then(function(){var b=a._dbInfo;b.db.transaction(function(x){ce(x,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(z,M){var L=M.rows.item(0).c;y(L)},function(z,M){m(M)})})}).catch(m)});return E(c,s),c}function Po(s,a){var c=this,y=new S(function(m,b){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(z){ce(z,x,"SELECT key FROM "+x.storeName+" WHERE id = ? LIMIT 1",[s+1],function(M,L){var _=L.rows.length?L.rows.item(0).key:null;m(_)},function(M,L){b(L)})})}).catch(b)});return E(y,a),y}function Do(s){var a=this,c=new S(function(y,m){a.ready().then(function(){var b=a._dbInfo;b.db.transaction(function(x){ce(x,b,"SELECT key FROM "+b.storeName,[],function(z,M){for(var L=[],_=0;_<M.rows.length;_++)L.push(M.rows.item(_).key);y(L)},function(z,M){m(M)})})}).catch(m)});return E(c,s),c}function No(s){return new S(function(a,c){s.transaction(function(y){y.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(m,b){for(var x=[],z=0;z<b.rows.length;z++)x.push(b.rows.item(z).name);a({db:s,storeNames:x})},function(m,b){c(b)})},function(y){c(y)})})}function Uo(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;return y=s.name?new S(function(b){var x;x=s.name===c.name?m._dbInfo.db:openDatabase(s.name,"","",0),s.storeName?b({db:x,storeNames:[s.storeName]}):b(No(x))}).then(function(b){return new S(function(x,z){b.db.transaction(function(M){function L($){return new S(function(W,G){M.executeSql("DROP TABLE IF EXISTS "+$,[],function(){W()},function(oe,ht){G(ht)})})}for(var _=[],P=0,O=b.storeNames.length;P<O;P++)_.push(L(b.storeNames[P]));S.all(_).then(function(){x()}).catch(function($){z($)})},function(M){z(M)})})}):S.reject("Invalid arguments"),E(y,a),y}var Oo={_driver:"webSQLStorage",_initStorage:Ro,_support:Eo(),iterate:Lo,getItem:Mo,setItem:_o,removeItem:Bo,clear:Ao,length:To,key:Po,keys:Do,dropInstance:Uo};function jo(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function fn(s,a){var c=s.name+"/";return s.storeName!==a.storeName&&(c+=s.storeName+"/"),c}function Fo(){var s="_localforage_support_test";try{return localStorage.setItem(s,!0),localStorage.removeItem(s),!1}catch{return!0}}function $o(){return!Fo()||localStorage.length>0}function Wo(s){var a=this,c={};if(s)for(var y in s)c[y]=s[y];return c.keyPrefix=fn(s,a._defaultConfig),$o()?(a._dbInfo=c,c.serializer=ct,S.resolve()):S.reject()}function Ho(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo.keyPrefix,m=localStorage.length-1;m>=0;m--){var b=localStorage.key(m);b.indexOf(y)===0&&localStorage.removeItem(b)}});return E(c,s),c}function qo(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo,b=localStorage.getItem(m.keyPrefix+s);return b&&(b=m.serializer.deserialize(b)),b});return E(y,a),y}function Go(s,a){var c=this,y=c.ready().then(function(){for(var m=c._dbInfo,b=m.keyPrefix,x=b.length,z=localStorage.length,M=1,L=0;L<z;L++){var _=localStorage.key(L);if(_.indexOf(b)===0){var P=localStorage.getItem(_);if(P&&(P=m.serializer.deserialize(P)),(P=s(P,_.substring(x),M++))!==void 0)return P}}});return E(y,a),y}function Vo(s,a){var c=this,y=c.ready().then(function(){var m,b=c._dbInfo;try{m=localStorage.key(s)}catch{m=null}return m&&(m=m.substring(b.keyPrefix.length)),m});return E(y,a),y}function Xo(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo,m=localStorage.length,b=[],x=0;x<m;x++){var z=localStorage.key(x);z.indexOf(y.keyPrefix)===0&&b.push(z.substring(y.keyPrefix.length))}return b});return E(c,s),c}function Ko(s){var a=this.keys().then(function(c){return c.length});return E(a,s),a}function Yo(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo;localStorage.removeItem(m.keyPrefix+s)});return E(y,a),y}function Jo(s,a,c){var y=this;s=A(s);var m=y.ready().then(function(){a===void 0&&(a=null);var b=a;return new S(function(x,z){var M=y._dbInfo;M.serializer.serialize(a,function(L,_){if(_)z(_);else try{localStorage.setItem(M.keyPrefix+s,L),x(b)}catch(P){P.name!=="QuotaExceededError"&&P.name!=="NS_ERROR_DOM_QUOTA_REACHED"||z(P),z(P)}})})});return E(m,c),m}function Zo(s,a){if(a=D.apply(this,arguments),!(s=typeof s!="function"&&s||{}).name){var c=this.config();s.name=s.name||c.name,s.storeName=s.storeName||c.storeName}var y,m=this;return y=s.name?new S(function(b){s.storeName?b(fn(s,m._defaultConfig)):b(s.name+"/")}).then(function(b){for(var x=localStorage.length-1;x>=0;x--){var z=localStorage.key(x);z.indexOf(b)===0&&localStorage.removeItem(z)}}):S.reject("Invalid arguments"),E(y,a),y}var Qo={_driver:"localStorageWrapper",_initStorage:Wo,_support:jo(),iterate:Go,getItem:qo,setItem:Jo,removeItem:Yo,clear:Ho,length:Ko,key:Vo,keys:Xo,dropInstance:Zo},ei=function(s,a){return s===a||typeof s=="number"&&typeof a=="number"&&isNaN(s)&&isNaN(a)},ti=function(s,a){for(var c=s.length,y=0;y<c;){if(ei(s[y],a))return!0;y++}return!1},pn=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},ye={},mn={},me={INDEXEDDB:xo,WEBSQL:Oo,LOCALSTORAGE:Qo},ni=[me.INDEXEDDB._driver,me.WEBSQL._driver,me.LOCALSTORAGE._driver],Ie=["dropInstance"],ut=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ie),oi={description:"",driver:ni.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ii(s,a){s[a]=function(){var c=arguments;return s.ready().then(function(){return s[a].apply(s,c)})}}function lt(){for(var s=1;s<arguments.length;s++){var a=arguments[s];if(a)for(var c in a)a.hasOwnProperty(c)&&(pn(a[c])?arguments[0][c]=a[c].slice():arguments[0][c]=a[c])}return arguments[0]}var ri=function(){function s(a){for(var c in i(this,s),me)if(me.hasOwnProperty(c)){var y=me[c],m=y._driver;this[c]=m,ye[m]||this.defineDriver(y)}this._defaultConfig=lt({},oi),this._config=lt({},this._defaultConfig,a),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return s.prototype.config=function(a){if((a===void 0?"undefined":o(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var c in a){if(c==="storeName"&&(a[c]=a[c].replace(/\W/g,"_")),c==="version"&&typeof a[c]!="number")return new Error("Database version must be a number.");this._config[c]=a[c]}return!("driver"in a)||!a.driver||this.setDriver(this._config.driver)}return typeof a=="string"?this._config[a]:this._config},s.prototype.defineDriver=function(a,c,y){var m=new S(function(b,x){try{var z=a._driver,M=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver)return void x(M);for(var L=ut.concat("_initStorage"),_=0,P=L.length;_<P;_++){var O=L[_];if((!ti(Ie,O)||a[O])&&typeof a[O]!="function")return void x(M)}var $=function(){for(var G=function(ai){return function(){var ci=new Error("Method "+ai+" is not implemented by the current driver"),gn=S.reject(ci);return E(gn,arguments[arguments.length-1]),gn}},oe=0,ht=Ie.length;oe<ht;oe++){var dt=Ie[oe];a[dt]||(a[dt]=G(dt))}};$();var W=function(G){ye[z]&&console.info("Redefining LocalForage driver: "+z),ye[z]=a,mn[z]=G,b()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then(W,x):W(!!a._support):W(!0)}catch(G){x(G)}});return k(m,c,y),m},s.prototype.driver=function(){return this._driver||null},s.prototype.getDriver=function(a,c,y){var m=ye[a]?S.resolve(ye[a]):S.reject(new Error("Driver not found."));return k(m,c,y),m},s.prototype.getSerializer=function(a){var c=S.resolve(ct);return k(c,a),c},s.prototype.ready=function(a){var c=this,y=c._driverSet.then(function(){return c._ready===null&&(c._ready=c._initDriver()),c._ready});return k(y,a,a),y},s.prototype.setDriver=function(a,c,y){var m=this;pn(a)||(a=[a]);var b=this._getSupportedDrivers(a);function x(){m._config.driver=m.driver()}function z(_){return m._extend(_),x(),m._ready=m._initStorage(m._config),m._ready}function M(_){return function(){var P=0;function O(){for(;P<_.length;){var $=_[P];return P++,m._dbInfo=null,m._ready=null,m.getDriver($).then(z).catch(O)}x();var W=new Error("No available storage method found.");return m._driverSet=S.reject(W),m._driverSet}return O()}}var L=this._driverSet!==null?this._driverSet.catch(function(){return S.resolve()}):S.resolve();return this._driverSet=L.then(function(){var _=b[0];return m._dbInfo=null,m._ready=null,m.getDriver(_).then(function(P){m._driver=P._driver,x(),m._wrapLibraryMethodsWithReady(),m._initDriver=M(b)})}).catch(function(){x();var _=new Error("No available storage method found.");return m._driverSet=S.reject(_),m._driverSet}),k(this._driverSet,c,y),this._driverSet},s.prototype.supports=function(a){return!!mn[a]},s.prototype._extend=function(a){lt(this,a)},s.prototype._getSupportedDrivers=function(a){for(var c=[],y=0,m=a.length;y<m;y++){var b=a[y];this.supports(b)&&c.push(b)}return c},s.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,c=ut.length;a<c;a++)ii(this,ut[a])},s.prototype.createInstance=function(a){return new s(a)},s}(),si=new ri;t.exports=si},{3:3}]},{},[4])(4),jn={exports:{}};(function(e){((t,n)=>{e.exports=n()})(0,()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,o=!1;const i=t.WebStreamsPolyfill||{},r=t.isSecureContext;let l=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const f=r||"MozAppearance"in document.documentElement.style?"iframe":"navigate",v={createWriteStream:function(E,k,A){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,C=null,u=null,p=null;if(Number.isFinite(k)?([A,k]=[k,A],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=k):k&&k.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=k):D=k||{},!l){n||(n=r?S(v.mitm):function(T){const R="width=200,height=100",B=document.createDocumentFragment(),U={frame:t.open(T,"popup",R),loaded:!1,isIframe:!1,isPopup:!0,remove(){U.frame.close()},addEventListener(...j){B.addEventListener(...j)},dispatchEvent(...j){B.dispatchEvent(...j)},removeEventListener(...j){B.removeEventListener(...j)},postMessage(...j){U.frame.postMessage(...j)}},F=j=>{j.source===U.frame&&(U.loaded=!0,t.removeEventListener("message",F),U.dispatchEvent(new Event("load")))};return t.addEventListener("message",F),U}(v.mitm)),u=new MessageChannel,E=encodeURIComponent(E.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const h={transferringReadable:o,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+E,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+E}};D.size&&(h.headers["Content-Length"]=D.size);const g=[h,"*",[u.port2]];if(o){const T=f==="iframe"?void 0:{transform(B,U){if(!(B instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");I+=B.length,U.enqueue(B),C&&(location.href=C,C=null)},flush(){C&&(location.href=C)}};p=new v.TransformStream(T,D.writableStrategy,D.readableStrategy);const R=p.readable;u.port1.postMessage({readableStream:R},[R])}u.port1.onmessage=T=>{T.data.download?f==="navigate"?(n.remove(),n=null,I?location.href=T.data.download:C=T.data.download):(n.isPopup&&(n.remove(),n=null,f==="iframe"&&S(v.mitm)),S(T.data.download)):T.data.abort&&(d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...g):n.addEventListener("load",()=>{n.postMessage(...g)},{once:!0})}let d=[];return!l&&p&&p.writable||new v.WritableStream({write(h){if(!(h instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");l?d.push(h):(u.port1.postMessage(h),I+=h.length,C&&(location.href=C,C=null))},close(){if(l){const h=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),g=document.createElement("a");g.href=URL.createObjectURL(h),g.download=E,g.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},D.writableStrategy)},WritableStream:t.WritableStream||i.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function S(E){if(!E)throw new Error("meh");const k=document.createElement("iframe");return k.hidden=!0,k.src=E,k.loaded=!1,k.name="iframe",k.isIframe=!0,k.postMessage=(...A)=>k.contentWindow.postMessage(...A),k.addEventListener("load",()=>{k.loaded=!0},{once:!0}),document.body.appendChild(k),k}try{new Response(new ReadableStream),r&&!("serviceWorker"in navigator)&&(l=!0)}catch{l=!0}return(E=>{try{E()}catch{}})(()=>{const{readable:E}=new TransformStream,k=new MessageChannel;k.port1.postMessage(E,[E]),k.port1.close(),k.port2.close(),o=!0,Object.defineProperty(v,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),v})})(jn);var Bi=jn.exports;function Ai(e,t){const n=`${e}_${t}`;return ee.MD5(n)}function Fn(e){const t=function(f){if(!f)return;const v=f,S=[];if(v)for(let E of v){const k=$n(E);k&&S.push(k)}return S}(e.bussinessRoutes),n=function(f){if(!f)return;const v=f;if(v&&v.length>0){const S=[];return v.forEach(E=>{const k=Wn(E);k&&S.push(k)}),S}}(e.widgetMenuConfig),o=function(f){if(f&&f.length>0){const v=[];return f.forEach(S=>{const E=function(k){return k?{id:k.id,label:k.label,container:k.container,preload:k.preload,afterid:k.afterid,bindid:k.bindid,group:k.group}:void 0}(S);E&&v.push(E)}),v}}(e.widgetConfig),i=function(f){if(f&&f.length>0)return f}(e.functionList),r=e.pkgObject.version,l=e.pkgObject.name;return{id:Ai(l,r),name:N.Config.UI.SiteTitle,group:N.Config.UI.Group,product:l,version:r,routes:t,widgetMenu:n,widgets:o,functions:i}}function $n(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const o=[];for(let i of e.children){const r=$n(i);r&&o.push(r)}o.length>0&&(n.children=o)}return n}}function Wn(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach(n=>{const o=Wn(n);o&&t.children?.push(o)})),t}let Hn=!0;try{String.fromCharCode.apply(String,[1,2])}catch{Hn=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var Tt=2654435769;function qn(e,t){var n=e.length,o=n<<2;if(t){var i=e[n-1];if(i<(o-=4)-3||i>o)return null;o=i}for(var r=new Uint8Array(o),l=0;l<o;++l)r[l]=e[l>>2]>>((3&l)<<3);return r}function Oe(e,t){var n,o=e.length,i=o>>2;(3&o)!=0&&++i,t?(n=new Uint32Array(i+1))[i]=o:n=new Uint32Array(i);for(var r=0;r<o;++r)n[r>>2]|=e[r]<<((3&r)<<3);return n}function fe(e){return 4294967295&e}function je(e,t,n,o,i,r){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(r[3&o^i]^n)}function Gn(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function Fe(e){for(var t=e.length,n=new Uint8Array(3*t),o=0,i=0;i<t;i++){var r=e.charCodeAt(i);if(r<128)n[o++]=r;else if(r<2048)n[o++]=192|r>>6,n[o++]=128|63&r;else{if(!(r<55296||r>57343)){if(i+1<t){var l=e.charCodeAt(i+1);if(r<56320&&56320<=l&&l<=57343){var f=65536+((1023&r)<<10|1023&l);n[o++]=240|f>>18,n[o++]=128|f>>12&63,n[o++]=128|f>>6&63,n[o++]=128|63&f,i++;continue}}throw new Error("Malformed string")}n[o++]=224|r>>12,n[o++]=128|r>>6&63,n[o++]=128|63&r}}return n.subarray(0,o)}function Vn(e){var t=e.length;return t===0?"":t<32767?function(n,o){for(var i=new Array(o),r=0,l=0,f=n.length;r<o&&l<f;r++){var v=n[l++];switch(v>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[r]=v;break;case 12:case 13:if(!(l<f))throw new Error("Unfinished UTF-8 octet sequence");i[r]=(31&v)<<6|63&n[l++];break;case 14:if(!(l+1<f))throw new Error("Unfinished UTF-8 octet sequence");i[r]=(15&v)<<12|(63&n[l++])<<6|63&n[l++];break;case 15:if(!(l+2<f))throw new Error("Unfinished UTF-8 octet sequence");var S=((7&v)<<18|(63&n[l++])<<12|(63&n[l++])<<6|63&n[l++])-65536;if(!(0<=S&&S<=1048575))throw new Error("Character outside valid Unicode range: 0x"+S.toString(16));i[r++]=S>>10&1023|55296,i[r]=1023&S|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+v.toString(16))}}return r<o&&(i.length=r),String.fromCharCode.apply(String,i)}(e,t):function(n,o){for(var i=[],r=new Array(32768),l=0,f=0,v=n.length;l<o&&f<v;l++){var S=n[f++];switch(S>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[l]=S;break;case 12:case 13:if(!(f<v))throw new Error("Unfinished UTF-8 octet sequence");r[l]=(31&S)<<6|63&n[f++];break;case 14:if(!(f+1<v))throw new Error("Unfinished UTF-8 octet sequence");r[l]=(15&S)<<12|(63&n[f++])<<6|63&n[f++];break;case 15:if(!(f+2<v))throw new Error("Unfinished UTF-8 octet sequence");var E=((7&S)<<18|(63&n[f++])<<12|(63&n[f++])<<6|63&n[f++])-65536;if(!(0<=E&&E<=1048575))throw new Error("Character outside valid Unicode range: 0x"+E.toString(16));r[l++]=E>>10&1023|55296,r[l]=1023&E|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+S.toString(16))}if(l>=32766){var k=l+1;r.length=k,i.push(String.fromCharCode.apply(String,r)),o-=k,l=-1}}return l>0&&(r.length=l,i.push(String.fromCharCode.apply(String,r))),i.join("")}(e,t)}function Ti(e){var t=e.length;if(t===0)return"";var n=Hn?e:function(f){for(var v=f.length,S=new Array(f.length),E=0;E<v;++E)S[E]=f[E];return S}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var o=32767&t,i=t>>15,r=new Array(o?i+1:i),l=0;l<i;++l)r[l]=String.fromCharCode.apply(String,n.subarray(l<<15,l+1<<15));return o&&(r[i]=String.fromCharCode.apply(String,n.subarray(i<<15,t))),r.join("")}function Xn(e,t){return typeof e=="string"&&(e=Fe(e)),typeof t=="string"&&(t=Fe(t)),e==null||e.length===0?e:qn(function(n,o){var i,r,l,f,v,S,E=n.length,k=E-1;for(r=n[k],l=0,S=0|Math.floor(6+52/E);S>0;--S){for(f=(l=fe(l+Tt))>>>2&3,v=0;v<k;++v)i=n[v+1],r=n[v]=fe(n[v]+je(l,i,r,v,f,o));i=n[0],r=n[k]=fe(n[k]+je(l,i,r,k,f,o))}return n}(Oe(e,!0),Oe(Gn(t),!1)),!1)}function Kn(e,t){return typeof e=="string"&&(e=function(n){for(var o=window.atob(n),i=o.length,r=new Uint8Array(i),l=0;l<i;l++)r[l]=o.charCodeAt(l);return r}(e)),typeof t=="string"&&(t=Fe(t)),e==null||e.length===0?e:qn(function(n,o){var i,r,l,f,v,S=n.length,E=S-1;for(i=n[0],l=fe(Math.floor(6+52/S)*Tt);l!==0;l=fe(l-Tt)){for(f=l>>>2&3,v=E;v>0;--v)r=n[v-1],i=n[v]=fe(n[v]-je(l,i,r,v,f,o));r=n[E],i=n[0]=fe(n[0]-je(l,i,r,0,f,o))}return n}(Oe(e,!1),Oe(Gn(t),!1)),!0)}const Se={toBytes:Fe,toString:Vn,encrypt:Xn,encryptToString:function(e,t){return window.btoa(Ti(Xn(e,t)))},decrypt:Kn,decryptToString:function(e,t){return Vn(Kn(e,t))}},Y=w.reactive({panelGroups:{}}),Yn=()=>({useGroupAccordion:e=>w.computed(()=>Y.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{Y.panelGroups[e]={...Y.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>w.computed(()=>Y.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{Y.panelGroups[e]={...Y.panelGroups[e],panelExpandStatus:{...Y.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{Y.panelGroups[e].accordion&&(Y.panelGroups[e].panelExpandStatus[t]||Object.keys(Y.panelGroups[e].panelExpandStatus).forEach(n=>{Y.panelGroups[e].panelExpandStatus[n]=!1})),Y.panelGroups[e].panelExpandStatus[t]=!Y.panelGroups[e].panelExpandStatus[t]}}),Pt=e=>e>255?255:e<0?0:e,$e=(e,t)=>{const n=e.replace("#",""),o=parseInt(n,16),i=Pt((o>>16)+t),r=Pt((o>>8&255)+t);return"#"+(Pt((255&o)+t)|r<<8|i<<16).toString(16)};var We=w.defineComponent({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=w.ref(`group-${Ae()}`),{setGroupAccordionStatus:n}=Yn(),o={"--base-color":e.baseColor,"--border-color":$e(e.baseColor,180),"--bg-color-header":$e(e.baseColor,140),"--bg-color-header-hover":$e(e.baseColor,190),"--bg-color-header-active":$e(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:o}}});const Pi=["data-id-group"];We.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{"data-id-group":e.idGroup,style:w.normalizeStyle(e.cssColorVars),class:"vcpg"},[w.renderSlot(e.$slots,"default")],12,Pi)},We.__scopeId="data-v-23ab5317",We.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var He=w.defineComponent({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${Ae()}`,o=w.ref(),i=w.ref(),r=w.ref(),{panelExpanded:l,togglePanelExpandedStatus:f,setPanelExpandedStatus:v}=Yn(),S=w.computed(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:Ae()})),E=w.computed(()=>o.value?.parentElement?.getAttribute("data-id-group")||""),k=w.computed(()=>l(E.value,n).value&&S.value.hasContent);return w.onMounted(()=>{v(E.value,n,e.expanded)}),w.onUpdated(()=>{(async()=>(await w.nextTick(),i.value&&r.value&&(i.value.style.height=`${Math.min(r.value.scrollHeight,i.value.scrollHeight)}px`)))()}),{body:S,panelRef:o,bodyRef:i,bodyContentRef:r,isExpanded:k,collapse:A=>{A.style.height="0"},expand:A=>{A.style.height=`${A.scrollHeight}px`},toggle:()=>{!S.value.hasContent||f(E.value,n)},toggleIcon:`
|
|
4
4
|
<svg
|
|
5
5
|
width="24px"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
>
|
|
11
11
|
<path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
|
|
12
12
|
</svg>
|
|
13
|
-
`}}});const Di={class:"vcp__header-title"},Ni={key:0,class:"vcp__header-icon"},Ui=["innerHTML"],Oi={key:0,ref:"bodyRef",class:"vcp__body"},ji={ref:"bodyContentRef",class:"vcp__body-content"};function Dt(e){return window.TouchEvent&&e instanceof TouchEvent}He.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("section",{ref:"panelRef",class:w.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[w.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...l)=>e.toggle&&e.toggle(...l))},[w.createElementVNode("div",Di,[w.renderSlot(e.$slots,"title")]),e.body.hasContent?(w.openBlock(),w.createElementBlock("div",Ni,[w.renderSlot(e.$slots,"icon",{},()=>[w.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,Ui)])])):w.createCommentVNode("v-if",!0)]),w.createVNode(w.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:w.withCtx(()=>[e.isExpanded?(w.openBlock(),w.createElementBlock("div",Oi,[w.createElementVNode("div",ji,[w.renderSlot(e.$slots,"content")],512)],512)):w.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},He.__scopeId="data-v-08c94cf8",He.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class J{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Kt(this.clientX,this.clientY)}static bindDown(t,n,o,i=!1){const r=f=>{n(new J(f))},l=f=>{f.touches.length===1&&n(new J(f)),f.touches.length>1&&o&&o(new J(f))};return t.addEventListener("mousedown",r,i),t.addEventListener("touchstart",l,i),()=>{t.removeEventListener("mousedown",r,i),t.removeEventListener("touchstart",l,i)}}static bindMove(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===1&&n(new J(l))};return t.addEventListener("mousemove",i,o),t.addEventListener("touchmove",r,o),()=>{t.removeEventListener("mousemove",i,o),t.removeEventListener("touchmove",r,o)}}static bindUp(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===0&&n(new J(l))};return t.addEventListener("mouseup",i,o),t.addEventListener("touchend",r,o),()=>{t.removeEventListener("mouseup",i,o),t.removeEventListener("touchend",r,o)}}originalEvent({mouse:t,touch:n}){Dt(this.e)?n&&n(this.e):t&&t(this.e)}}class Kt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Kt(this.x,this.y)}}class Fi{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=J.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:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.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 $i{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=Ge(this._group),o=Ge(t);n.splice(n.indexOf(this),1),o.push(this),Zn()}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(Ge(this._group)),Zn()}}const qe=new Map;function Ge(e){return qe.has(e)||qe.set(e,[]),qe.get(e)}function Jn(e,t){return e>t?-Jn(t,e):e<0&&t>=0?1:e-t}function Zn(){let e=0;for(const t of function(n){const o=[];return n.forEach((i,r)=>o.push(r)),o}(qe).sort(Jn))for(const n of Ge(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Nt(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Ve(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ve(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,i=t.top,r=t.left;return{width:n,height:o,top:i,left:r,bottom:i+o,right:r+n}}class Wi{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=Qn.map(v=>new v(t,this));const{width:o,height:i}=Nt(t),r=n.maxWidth||window.innerWidth,l=n.maxHeight||window.innerHeight;let f=!1;(o<n.minWidth||o>r)&&(t.style.width=`${eo(o,n.minWidth,r)}px`,f=!0),(i<n.minHeight||i>l)&&(t.style.height=`${eo(i,n.minHeight,l)}px`,f=!0),f&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const Qn=[];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=J.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:o,width:i,height:r}=Ve(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=i,this.height0=r,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:i}=Ve(this.container),r=this.helper.options,l=r.maxWidth||window.innerWidth,f=r.maxHeight||window.innerHeight;this.minLeft=Math.max(o-l,0),this.maxLeft=o-r.minWidth,this.minRight=t+r.minWidth,this.maxRight=Math.min(t+l,window.innerWidth),this.minTop=Math.max(i-f,0),this.maxTop=i-r.minHeight,this.minBottom=n+r.minHeight,this.maxBottom=Math.min(n+f,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:o,top:i,right:r,bottom:l}=Ve(this.container),f=this.helper.options;!f||(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${f.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):r<this.minRight?this.container.style.width=`${f.minWidth}px`:r>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),i<this.minTop?(this.container.style.height=n+i-this.minTop+"px",this.container.style.top=`${this.minTop}px`):i>this.maxTop?(this.container.style.height=`${f.minHeight}px`,this.container.style.top=`${this.maxTop}px`):l<this.minBottom?this.container.style.height=`${f.minHeight}px`:l>this.maxBottom&&(this.container.style.height=this.maxBottom-i+"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 eo(e,t,n){return e<t?t:e>n?n:e}Qn.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 Xe=w.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=w.ref(!1),n=w.ref(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const i=J.bindUp(document,()=>{n.value=!1,i()})}}}});const Hi=["disabled"];Xe.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{class:"btn",style:w.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=l=>e.hover=!0),onMouseleave:t[1]||(t[1]=l=>e.hover=!1),onMousedown:t[2]||(t[2]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onTouchstart:t[3]||(t[3]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onMouseup:t[4]||(t[4]=(...l)=>e.mouseup&&e.mouseup(...l)),onTouchend:t[5]||(t[5]=(...l)=>e.mouseup&&e.mouseup(...l)),disabled:e.disabled},[w.renderSlot(e.$slots,"default")],44,Hi)},Xe.__scopeId="data-v-71662210",Xe.__file="src/controls/vuewindow/window/Button.vue";const Ut=new Set;function to(e){return e!==null?parseFloat(e):0}function Ke(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(to).reduce((i,r)=>i+r)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(to).reduce((i,r)=>i+r));return{width:n,height:o}}class no{width;height;constructor(t,n){this.width=t,this.height=n}}function qi(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function Gi(e,t,n,o){const i=e-n,r=t-o;return i*i+r*r}window.addEventListener("resize",e=>{Ut.forEach(t=>{t&&Me(t.fixPosition)&&t.fixPosition()})});const Ye=[];var Je=w.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:Xe},setup(e,{emit:t}){const n=w.getCurrentInstance();if(!n)return;const{proxy:o}=n;let i=0,r,l,f;const v=w.ref(e.isOpen),S=()=>{Ye.push(o),f=new $i(e.zGroup,E),e.isOpen&&function(R){R&&(w.nextTick(()=>{i++==0&&(d(o),function(){const B=k.value,{width:U,height:F}=Nt(B);let j,H;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,H=e.top;else{const Z=e.positionHint||"auto";switch(Z){case"auto":{let V=20,X=50,q=0;do{if(Ye.every(ne=>{if(!ne.isOpen||o==ne)return!0;const ke=qi(ne);if(ke==null)return!0;const{left:ot,top:te}=ke;return Gi(ot,te,V,X)>16}))break;V=(V+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++q<100);j=V,H=X}break;case"center":j=(window.innerWidth-U)/2,H=(window.innerHeight-F)/2,console.log(j,H,window.innerWidth,window.innerHeight,"111111");break;default:try{const V=Z.split("/").map(Number);if(V.length!=2)throw null;const[X,q]=V;if(!isFinite(X)||!isFinite(q))throw null;j=X>=0?X:window.innerWidth-U+X,H=q>=0?q:window.innerHeight-F+q}catch{throw new Error(`invalid position string: ${Z}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${H}px`)}()),e.resizable&&h(),T(),r=new Fi(A.value,k.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Nt(A.value);l=new Wi(k.value,{onResize:()=>h(),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())}(!0),Ut.add(o)};function E(R){C.value.zIndex=`${R}`}const k=w.ref(null),A=w.ref(null),D=w.ref(null);function I(){f.raise(),t("activate")}const C=w.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=w.computed(()=>e.windowStyle.titlebar),p=w.computed(()=>{const R={...e.windowStyle.content};return e.resizable?R.padding="0":e.padding!=null&&(R.padding=`${e.padding}px`),e.isScrollable&&(R.overflow="auto"),R});function d(R){const{width:B,height:U,top:F,left:j}=R,H=k;if(H&&B!=null&&(H.value.style.width=`${B}px`),U!=null){const Z=A.value;if(Z){const V=Ke(Z).height;H.value.style.height=`${U+V}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&F!=null&&(H.value.style.top=`${F}px`)}function h(R=!0){const B=k.value,U=A.value,F=D.value;if(F&&B&&U){const{width:j,height:H}=Ke(F),{width:Z,height:V}=Ke(B),X=Ke(U).height,q=Z-(F.offsetWidth-j),ne=V-X-(F.offsetHeight-H);F.style.width=`${q}px`,F.style.height=`${ne}px`,g(),t("resize",new no(q,ne)),R&&(t("update:width",q),t("update:height",ne))}}function g(){const R=k.value;if(R){const B=R.getBoundingClientRect();B.left<0&&(C.value.left="0px"),B.top<0&&(C.value.top="0px"),B.right>window.innerWidth&&(C.value.left=window.innerWidth-B.width+"px"),B.bottom>window.innerHeight&&(C.value.top=window.innerHeight-B.height+"px")}}function T(R=!0){g();const B=k.value;if(B){const{left:U,top:F}=B.getBoundingClientRect();R&&(t("update:left",U),t("update:top",F))}}return w.watch(()=>e.isOpen,R=>{v.value=R}),w.watch(()=>e.zGroup,R=>{f.group=R}),w.watch(()=>e.width,R=>{d({width:R}),h(!1)}),w.watch(()=>e.height,R=>{d({height:R}),h(!1)}),w.onMounted(()=>{S()}),w.onBeforeUnmount(()=>{Ut.delete(this),f.unregister(),l&&l.teardown(),r&&r.teardown(),Ye.splice(Ye.indexOf(o),1)}),{isOpen:v,windowEl:k,titlebar:A,content:D,activate:I,styleWindow:C,styleTitlebar:u,styleContent:p,closeButtonClick:function(){v.value=!1,t("closebuttonclick")},fixPosition:g}}});const Vi={class:"title"};var oo;Je.render=function(e,t,n,o,i,r){const l=w.resolveComponent("myButton");return w.openBlock(),w.createBlock(w.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=f=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=f=>e.$emit("open")),persisted:""},{default:w.withCtx(()=>[w.withDirectives(w.createElementVNode("div",{class:"window",style:w.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...f)=>e.activate&&e.activate(...f)),onTouchstart:t[1]||(t[1]=(...f)=>e.activate&&e.activate(...f))},[w.createElementVNode("div",{class:"titlebar",style:w.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[w.createElementVNode("div",Vi,[e.$slots.title?w.renderSlot(e.$slots,"title",{key:0}):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[w.createTextVNode(w.toDisplayString(e.title),1)],64))]),e.closeButton?(w.openBlock(),w.createBlock(l,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:w.withCtx(()=>[w.createTextVNode("\xD7")]),_:1},8,["windowStyle","onClick"])):w.createCommentVNode("v-if",!0)],4),w.createElementVNode("div",{class:"content",style:w.normalizeStyle(e.styleContent),ref:"content"},[w.renderSlot(e.$slots,"default")],4)],36),[[w.vShow,e.isOpen]])]),_:3})},Je.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(oo||(oo={}));const Xi=Je;exports.LayoutContainerEnum=void 0,function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"}(exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}));class io{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(t,n,o){this.layoutState=t,this._LayoutID=o,n.forEach(i=>{if(i.layoutID===o&&(this.widgetConfig.push(i),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)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return le(t)?n=t:Le(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=w.markRaw(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),w.nextTick().then(()=>{N.EventBus.emit(Q.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const i of o)if(this.isWidgetLoaded(i.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const r=this.preConditionMap.get(t);if(r)for(const l of r)this.unloadWidget(l.id)}const o=this.getContainerComponents(n.container),i=o.value.get(t);i&&i.unmounted&&i.unmounted(),o.value.delete(t),this.widgetsLoadedSet.delete(t),N.EventBus.emit(Q.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.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 o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&N.EventBus.emit(Q.WidgetVisibleChanged,{id:t,layoutID:this._LayoutID,name:o.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetConfig.find(o=>o.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=w.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Ze=w.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const i=e.layoutID,r=w.ref(e.enableRouterView);w.watch(()=>e.enableRouterView,()=>{r.value=e.enableRouterView});const l=w.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),f=new io(l,e.widgetConfig,i),v=I(exports.LayoutContainerEnum.top),S=I(exports.LayoutContainerEnum.centerBack),E=I(exports.LayoutContainerEnum.centerFront),k=I(exports.LayoutContainerEnum.left),A=I(exports.LayoutContainerEnum.right),D=I(exports.LayoutContainerEnum.bottom);function I(u){return f?.getContainerComponents(u)}const C=w.computed(()=>e.layoutStyle);return w.onMounted(()=>{f&&(f.preloadWidgets(),i===void 0&&(N.LayoutManager=f),o("containerLoaded",{layoutID:i,layoutManager:f}))}),{...w.toRefs(l),topContainerComponents:v,centerbackComponents:S,centerfrontComponents:E,leftContainerComponents:k,rightContainerComponents:A,bottomContainerComponents:D,containerStyle:C,isEnableRouterView:r}}});const Ki={ref:"topContainer",class:"topContainer"},Yi={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},Ji={ref:"centerBackContainer",class:"centerdiv backContainer"},Zi={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Qi={ref:"leftContainer",class:"leftContainer"},er={ref:"rightContainer",class:"rightContainer"},tr={ref:"bottomContainer",class:"bottomContainer"};Ze.render=function(e,t,n,o,i,r){const l=w.resolveComponent("router-view");return w.openBlock(),w.createElementBlock("div",{class:"layoutContainer",style:w.normalizeStyle(e.containerStyle)},[w.createElementVNode("div",Ki,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.topContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",null,[w.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(w.openBlock(),w.createElementBlock("div",Yi,[w.createVNode(l,null,{default:w.withCtx(({Component:f})=>[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(f)))]),_:1})],512)):w.createCommentVNode("v-if",!0),w.createCommentVNode(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Ji,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerbackComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createCommentVNode(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Zi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerfrontComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",Qi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.leftContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",er,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.rightContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)]),w.createElementVNode("div",tr,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.bottomContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)],4)},Ze.__scopeId="data-v-4d081e5c",Ze.__file="src/controls/layoutcontainer/layout.vue";const Qe=new Map,Ot=new Map;let et;const nr={getDefaultClient(){if(et||(et=new we(SysConfig.DefaultHproseAPI)),!et)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return et},registerHprose(e,t){const n=Ot.get(e);if(!n){const o=new we(t);Qe.set(e,o)}return n},getHprose:e=>Ot?.get(e),getProxyHprose:e=>Qe.get(e),unregisterHprose(e){Qe.get(e)&&(Ot.delete(e),Qe.delete(e))}},pe={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},jt="access_token",or=N.Config.ServiceURL.LoginAuthURL;function Ft(){const e=Rn();e&&re(pe.RefreshToken,or,{refreshToken:e}).then(t=>{$t(t.data)})}function ro(){const e=ie.getJsonObject(jt);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Ft():setTimeout(Ft,n-5e3))}function $t(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=de();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},ie.set(jt,o,n/1e3),ro()}else ie.remove(jt)}const tt="Wm314243",nt=N.Config.ServiceURL.LoginAuthURL,Wt="ROLE_SYSTEM_RIGHT",Ht=new Be("",sessionStorage);function so(){return Ht.get(Wt)}function qt(e){Ht.set(Wt,e)}function ao(){Ht.remove(Wt)}function ve(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ve(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function co(e,t,n="name"){e&&t&&e.forEach(o=>{const i=t.find(r=>r[n]===o[n]);i&&(o.children?i.children&&co(o.children,i.children,n):(!i.children||i.children.length===0)&&i.selected&&(o.selected=i.selected))})}function Ce(e,t,n,o="name"){const i=e[n],r=t[n];i?r&&co(i,r,o):r&&(e[n]=r)}function uo(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=le(e[0]);const i=o?e[0]:JSON.parse(e[0]);if(t>1)for(let r=1;r<e.length;r++){const l=e[r],f=o?l:JSON.parse(l);Ce(i,f,"routes","name"),Ce(i,f,"widgetMenu","name"),Ce(i,f,"widgets","id"),Ce(i,f,"functions","id")}n=i}return n&&(ve(n.routes),ve(n.widgetMenu),ve(n.widgets),ve(n.functions)),n}}const Gt=[],Vt=[],Xt=[];function xe(){return so()}function lo(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.path===o.path);if(i){const r=lo(i,o);r&&n.children?.push(r)}})),n}function ho(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.name===o.name);if(i){const r=ho(i,o);r&&n.children?.push(r)}})),n}exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,o=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=xt(),this.initIndexDB(),o>=3&&(this.cacheSize=o),i>this.requestTimeout&&(this.requestTimeout=i)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const o=await re(t,e,n);let i=null;return o&&o.status===200&&(i=o.data),i}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Ue.createInstance({name:this.fileID,driver:Ue.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(),Ue.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const o=N.Axios.CancelToken;this.cancelSource=o.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let f=0;for(let v=0;v<this.totalChunks;v++){if(this.keys&&this.keys?.indexOf(v.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const S=v*this.chunkByteSize;let E=S+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const k={range:`bytes=${S}-${E}`};for(;f>=l;)await this.sleep(200);const A=v.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${v+1}/${this.totalChunks}`),f++,re(n,t,i,k,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async D=>{const I=D.data;f--,await this.currentDB?.setItem(A,I),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const C=parseInt(A)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${C}/${this.totalChunks}`),this.savefile()}).catch(D=>{f--;const I=parseInt(A)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${I}\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=Bi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const o=n.toString();let i=await this.currentDB?.getItem(o);if(i||(i=await this.currentDB?.getItem(o)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let r=new Response(i).body;if(r===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 l=r.getReader();for(;;){const{done:f,value:v}=await l.read();if(f)break;await e.write(v)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Ue.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Pe,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((i,r)=>{if(o){const l=document.createElement("a");if(l.href=e,l.target=t,l.download!==void 0&&(l.download=n||Cn(e)),document.createEvent){const f=document.createEvent("MouseEvents");return f.initEvent("click",!0,!0),l.dispatchEvent(f),i(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),i(!0)}{const l=document.createElement("canvas"),f=document.createElement("img");f.setAttribute("crossOrigin","Anonymous"),f.src=e,f.onload=v=>{l.width=f.width,l.height=f.height,l.getContext("2d").drawImage(f,0,0,f.width,f.height),l.toBlob(S=>{if(S){const E=document.createElement("a");E.href=window.URL.createObjectURL(S),E.download=Cn(e),E.click(),URL.revokeObjectURL(E.href),i(!0)}},"image/jpeg")},f.onerror=v=>r(v)}})},exports.FileUpload=Pn,exports.Global=N,exports.GlobalHprose=nr,exports.GlobalMitt=ge,exports.H5Tool=ee,exports.HproseClient=Ee,exports.HttpDownload=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){Pe(o.data,n)}).catch(o=>{console.warn(o),ge.emit(Q.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=Sn,exports.LayoutContainer=Ze,exports.LayoutManager=io,exports.ObjToUrlParams=function(e,t){let n="",o="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o},exports.Pane=ft,exports.ProxyClient=we,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),i=document.createElement("a");i.href=n.createObjectURL(o),i.download=t,i.click(),n.revokeObjectURL(i.href)},exports.Splitpanes=pi,exports.Storage=Be,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=Q,exports.TOKEN_REFRESH_TIME=5e3,exports.TOKEN_VALID_TIMESPAN=36e5,exports.USER_TOKEN_API=pe,exports.VCollapsiblePanel=He,exports.VCollapsiblePanelGroup=We,exports.VWindow=Je,exports.WindowResizeEvent=no,exports.WindowType=Xi,exports.XXTEA=Se,exports.calculateBestTextColor=function(e){return function(t,n){return(bn(~~t[0],~~t[1],~~t[2])+.05)/(bn(n[0],n[1],n[2])+.05)}(bt(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"},exports.changeMyPWD=function(e){const t={oldpwd:Se.encryptToString(e.oldpwd,tt),newpwd:Se.encryptToString(e.newpwd,tt)};return re(pe.ChangeMyPwd,nt,t)},exports.checkDoRefreshToken=ro,exports.checkToken=function(e){return re(pe.CheckToken,nt,{token:e})},exports.clearLocalToken=kt,exports.clearRight=ao,exports.colorIsDark=function(e){if(!Te(e))return;const[t,n,o]=bt(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(i=>Number(i));return .299*t+.578*n+.114*o<192},exports.createFileUpload=e=>new Pn(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ct(e.substring(0,2),t)}${Ct(e.substring(2,4),t)}${Ct(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let o;for(o in n)t[o]=le(t[o])?e(t[o],n[o]):t[o]=n[o];return t},exports.delay=xn,exports.doRefreshToken=Ft,exports.exportSystemRights=Fn,exports.get=function(e,t){return re(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return N.Axios?.get(e,{params:t}).catch(function(n){Ne(n,e,"","\u5916\u90E8Get")})},exports.getEncryptPWD=function(e){return Se.encryptToString(e,tt)},exports.getFunctions=function(e,t=2){if(t===0)return e;const n=xe();return n?n.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),r=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)},exports.getLocalToken=de,exports.getLockState=function(){return ie.get(Lt,!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const i=t.slice(n,n+1);o+=i.concat(i)}return o}return t},exports.getProxyClient=Dn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Te(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const r=t.slice(o,o+1);n+=r.concat(r)}t=n}var i=[];for(o=1;o<7;o+=2)i.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+i.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,o,i,r=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),f=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(l===0)n=o=i=f;else{var v=f<=.5?f*(l+1):f+l-f*l,S=2*f-v;n=wt(S,v,r+1/3),o=wt(S,v,r),i=wt(S,v,r-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=Rn,exports.getRight=so,exports.getRoutes=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.routes?(Xt.length>0||e.forEach(o=>{const i=n.routes?.find(r=>r.name===o.name);if(i){const r=lo(o,i);r&&Xt.push(r)}}),Xt):void 0},exports.getSystemRoleRight=async function(e,t=!1){ao();const n=pe.GetSystemRights,o=N.Config.ServiceURL.LoginAuthURL,i=await re(n,o,{systemid:e});if(!i||!i.data)return void N.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const r=i.data;if(r&&r.length>0){if(t){const l=JSON.parse(r[0]);return qt(l),l}{const l=uo(r);return qt(l),l}}},exports.getWidgetConfig=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgets?(Gt.length>0||e?.forEach(o=>{n.widgets?.find(i=>i.id===o.id)&&Gt.push(o)}),Gt):void 0},exports.getWidgetMenus=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgetMenu?(Vt.length>0||e.forEach(o=>{const i=n.widgetMenu?.find(r=>r.name===o.name);if(i){const r=ho(o,i);r&&Vt.push(r)}}),Vt):void 0},exports.handleNodes=ve,exports.hexToRGB=bt,exports.init=function(e,t,n){!N.Config.DefaultHproseAPI&&N.Config.ServiceURL&&(N.Config.DefaultHproseAPI=N.Config.ServiceURL.DefaultHproseAPI),N.Config.DefaultHproseAPI&&_e.isNotEmpty(N.Config.DefaultHproseAPI)&&(N.DefaultProxyClient=new we(N.Config.DefaultHproseAPI));const o=N.Config.UI.GrayMode;o&&ee.setGrayMode(o);const i=new Li(e,N.EventBus);N.Message=i,N.SystemID=t,N.SystemGroup=n,N.EventBus.on(Q.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.AxiosRequestErrorEvent,r=>{const l=`Http\u8BF7\u6C42'${r.code}'\u9519\u8BEF: ${r.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.CommonWarnEvent,r=>{i.warn(r)})},exports.initDefaultProxyClient=function(e){const t=Dn(e);return t&&(N.DefaultProxyClient=t),t},exports.is=K,exports.isArray=gt,exports.isAsyncFunction=function(e){return K(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||K(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return K(e,"Date")},exports.isDef=wn,exports.isElement=e=>le(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Le(e)||gt(e)?e.length===0:!!le(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return K(e,"Error")},exports.isFunction=Me,exports.isHexColor=Te,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return K(e,"Map")},exports.isNull=mt,exports.isNullAndUnDef=function(e){return pt(e)&&mt(e)},exports.isNullOrUnDef=function(e){return pt(e)||mt(e)},exports.isNumber=function(e){return K(e,"Number")},exports.isObjectX=le,exports.isPromise=function(e){return K(e,"Promise")&&le(e)&&Me(e.then)&&Me(e.catch)},exports.isServer=gi,exports.isString=Le,exports.isSymbol=function(e){return K(e,"Symbol")},exports.isUnDef=pt,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 K(e,"WeakMap")},exports.isWeakSet=function(e){return K(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&K(e,"Window"),exports.jquery=Mi,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={username:e.username,pwd:Se.encryptToString(e.pwd,tt)},n=(await re(pe.Login,nt,t))?.data;return n&&$t(n.doubletoken),n},exports.logout=function(){const e=de();e&&(Ln(pe.Logout,nt,{token:e.token,reftoken:e.refresh}),kt())},exports.mergeFilterRoleSysRight=uo,exports.mergeNodes=function e(t,n,o="name"){t&&n&&t.forEach(i=>{const r=n.find(l=>l[o]===i[o]);r&&(i.children?r.children&&e(i.children,r.children,o):(!r.children||r.children.length===0)&&r.selected&&(i.selected=r.selected))})},exports.mergeNodesAll=Ce,exports.newGuid=function(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t},exports.onLockListener=function(){Bt(),document.addEventListener("mousedown",Bt)},exports.post=function(e,t){return Mn(e,void 0,t)},exports.requestGet=re,exports.requestPost=Mn,exports.requestPostBody=Ln,exports.rgbToHex=function(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o},exports.setLocalToken=$t,exports.setRight=qt,exports.sleep=function(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${xn}\u6BEB\u79D2`)},exports.storage=yi,exports.storageHelper=ie,exports.unLockListener=function(){document.removeEventListener("mousedown",Bt)},exports.uuid=Ae,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",o=`const iconlist={
|
|
13
|
+
`}}});const Di={class:"vcp__header-title"},Ni={key:0,class:"vcp__header-icon"},Ui=["innerHTML"],Oi={key:0,ref:"bodyRef",class:"vcp__body"},ji={ref:"bodyContentRef",class:"vcp__body-content"};function Dt(e){return window.TouchEvent&&e instanceof TouchEvent}He.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("section",{ref:"panelRef",class:w.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[w.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...l)=>e.toggle&&e.toggle(...l))},[w.createElementVNode("div",Di,[w.renderSlot(e.$slots,"title")]),e.body.hasContent?(w.openBlock(),w.createElementBlock("div",Ni,[w.renderSlot(e.$slots,"icon",{},()=>[w.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,Ui)])])):w.createCommentVNode("v-if",!0)]),w.createVNode(w.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:w.withCtx(()=>[e.isExpanded?(w.openBlock(),w.createElementBlock("div",Oi,[w.createElementVNode("div",ji,[w.renderSlot(e.$slots,"content")],512)],512)):w.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},He.__scopeId="data-v-08c94cf8",He.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class J{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Kt(this.clientX,this.clientY)}static bindDown(t,n,o,i=!1){const r=f=>{n(new J(f))},l=f=>{f.touches.length===1&&n(new J(f)),f.touches.length>1&&o&&o(new J(f))};return t.addEventListener("mousedown",r,i),t.addEventListener("touchstart",l,i),()=>{t.removeEventListener("mousedown",r,i),t.removeEventListener("touchstart",l,i)}}static bindMove(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===1&&n(new J(l))};return t.addEventListener("mousemove",i,o),t.addEventListener("touchmove",r,o),()=>{t.removeEventListener("mousemove",i,o),t.removeEventListener("touchmove",r,o)}}static bindUp(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===0&&n(new J(l))};return t.addEventListener("mouseup",i,o),t.addEventListener("touchend",r,o),()=>{t.removeEventListener("mouseup",i,o),t.removeEventListener("touchend",r,o)}}originalEvent({mouse:t,touch:n}){Dt(this.e)?n&&n(this.e):t&&t(this.e)}}class Kt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Kt(this.x,this.y)}}class Fi{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=J.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:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.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 $i{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=Ge(this._group),o=Ge(t);n.splice(n.indexOf(this),1),o.push(this),Zn()}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(Ge(this._group)),Zn()}}const qe=new Map;function Ge(e){return qe.has(e)||qe.set(e,[]),qe.get(e)}function Jn(e,t){return e>t?-Jn(t,e):e<0&&t>=0?1:e-t}function Zn(){let e=0;for(const t of function(n){const o=[];return n.forEach((i,r)=>o.push(r)),o}(qe).sort(Jn))for(const n of Ge(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Nt(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Ve(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ve(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,i=t.top,r=t.left;return{width:n,height:o,top:i,left:r,bottom:i+o,right:r+n}}class Wi{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=Qn.map(v=>new v(t,this));const{width:o,height:i}=Nt(t),r=n.maxWidth||window.innerWidth,l=n.maxHeight||window.innerHeight;let f=!1;(o<n.minWidth||o>r)&&(t.style.width=`${eo(o,n.minWidth,r)}px`,f=!0),(i<n.minHeight||i>l)&&(t.style.height=`${eo(i,n.minHeight,l)}px`,f=!0),f&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const Qn=[];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=J.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:o,width:i,height:r}=Ve(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=i,this.height0=r,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:i}=Ve(this.container),r=this.helper.options,l=r.maxWidth||window.innerWidth,f=r.maxHeight||window.innerHeight;this.minLeft=Math.max(o-l,0),this.maxLeft=o-r.minWidth,this.minRight=t+r.minWidth,this.maxRight=Math.min(t+l,window.innerWidth),this.minTop=Math.max(i-f,0),this.maxTop=i-r.minHeight,this.minBottom=n+r.minHeight,this.maxBottom=Math.min(n+f,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:o,top:i,right:r,bottom:l}=Ve(this.container),f=this.helper.options;!f||(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${f.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):r<this.minRight?this.container.style.width=`${f.minWidth}px`:r>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),i<this.minTop?(this.container.style.height=n+i-this.minTop+"px",this.container.style.top=`${this.minTop}px`):i>this.maxTop?(this.container.style.height=`${f.minHeight}px`,this.container.style.top=`${this.maxTop}px`):l<this.minBottom?this.container.style.height=`${f.minHeight}px`:l>this.maxBottom&&(this.container.style.height=this.maxBottom-i+"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 eo(e,t,n){return e<t?t:e>n?n:e}Qn.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 Xe=w.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=w.ref(!1),n=w.ref(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const i=J.bindUp(document,()=>{n.value=!1,i()})}}}});const Hi=["disabled"];Xe.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{class:"btn",style:w.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=l=>e.hover=!0),onMouseleave:t[1]||(t[1]=l=>e.hover=!1),onMousedown:t[2]||(t[2]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onTouchstart:t[3]||(t[3]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onMouseup:t[4]||(t[4]=(...l)=>e.mouseup&&e.mouseup(...l)),onTouchend:t[5]||(t[5]=(...l)=>e.mouseup&&e.mouseup(...l)),disabled:e.disabled},[w.renderSlot(e.$slots,"default")],44,Hi)},Xe.__scopeId="data-v-71662210",Xe.__file="src/controls/vuewindow/window/Button.vue";const Ut=new Set;function to(e){return e!==null?parseFloat(e):0}function Ke(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(to).reduce((i,r)=>i+r)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(to).reduce((i,r)=>i+r));return{width:n,height:o}}class no{width;height;constructor(t,n){this.width=t,this.height=n}}function qi(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function Gi(e,t,n,o){const i=e-n,r=t-o;return i*i+r*r}window.addEventListener("resize",e=>{Ut.forEach(t=>{t&&Me(t.fixPosition)&&t.fixPosition()})});const Ye=[];var Je=w.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:Xe},setup(e,{emit:t}){const n=w.getCurrentInstance();if(!n)return;const{proxy:o}=n;let i=0,r,l,f;const v=w.ref(e.isOpen),S=()=>{Ye.push(o),f=new $i(e.zGroup,E),e.isOpen&&function(R){R&&(w.nextTick(()=>{i++==0&&(d(o),function(){const B=k.value,{width:U,height:F}=Nt(B);let j,H;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,H=e.top;else{const Z=e.positionHint||"auto";switch(Z){case"auto":{let V=20,X=50,q=0;do{if(Ye.every(ne=>{if(!ne.isOpen||o==ne)return!0;const ke=qi(ne);if(ke==null)return!0;const{left:ot,top:te}=ke;return Gi(ot,te,V,X)>16}))break;V=(V+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++q<100);j=V,H=X}break;case"center":j=(window.innerWidth-U)/2,H=(window.innerHeight-F)/2,console.log(j,H,window.innerWidth,window.innerHeight,"111111");break;default:try{const V=Z.split("/").map(Number);if(V.length!=2)throw null;const[X,q]=V;if(!isFinite(X)||!isFinite(q))throw null;j=X>=0?X:window.innerWidth-U+X,H=q>=0?q:window.innerHeight-F+q}catch{throw new Error(`invalid position string: ${Z}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${H}px`)}()),e.resizable&&h(),T(),r=new Fi(A.value,k.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Nt(A.value);l=new Wi(k.value,{onResize:()=>h(),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())}(!0),Ut.add(o)};function E(R){C.value.zIndex=`${R}`}const k=w.ref(null),A=w.ref(null),D=w.ref(null);function I(){f.raise(),t("activate")}const C=w.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=w.computed(()=>e.windowStyle.titlebar),p=w.computed(()=>{const R={...e.windowStyle.content};return e.resizable?R.padding="0":e.padding!=null&&(R.padding=`${e.padding}px`),e.isScrollable&&(R.overflow="auto"),R});function d(R){const{width:B,height:U,top:F,left:j}=R,H=k;if(H&&B!=null&&(H.value.style.width=`${B}px`),U!=null){const Z=A.value;if(Z){const V=Ke(Z).height;H.value.style.height=`${U+V}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&F!=null&&(H.value.style.top=`${F}px`)}function h(R=!0){const B=k.value,U=A.value,F=D.value;if(F&&B&&U){const{width:j,height:H}=Ke(F),{width:Z,height:V}=Ke(B),X=Ke(U).height,q=Z-(F.offsetWidth-j),ne=V-X-(F.offsetHeight-H);F.style.width=`${q}px`,F.style.height=`${ne}px`,g(),t("resize",new no(q,ne)),R&&(t("update:width",q),t("update:height",ne))}}function g(){const R=k.value;if(R){const B=R.getBoundingClientRect();B.left<0&&(C.value.left="0px"),B.top<0&&(C.value.top="0px"),B.right>window.innerWidth&&(C.value.left=window.innerWidth-B.width+"px"),B.bottom>window.innerHeight&&(C.value.top=window.innerHeight-B.height+"px")}}function T(R=!0){g();const B=k.value;if(B){const{left:U,top:F}=B.getBoundingClientRect();R&&(t("update:left",U),t("update:top",F))}}return w.watch(()=>e.isOpen,R=>{v.value=R}),w.watch(()=>e.zGroup,R=>{f.group=R}),w.watch(()=>e.width,R=>{d({width:R}),h(!1)}),w.watch(()=>e.height,R=>{d({height:R}),h(!1)}),w.onMounted(()=>{S()}),w.onBeforeUnmount(()=>{Ut.delete(this),f.unregister(),l&&l.teardown(),r&&r.teardown(),Ye.splice(Ye.indexOf(o),1)}),{isOpen:v,windowEl:k,titlebar:A,content:D,activate:I,styleWindow:C,styleTitlebar:u,styleContent:p,closeButtonClick:function(){v.value=!1,t("closebuttonclick")},fixPosition:g}}});const Vi={class:"title"};var oo;Je.render=function(e,t,n,o,i,r){const l=w.resolveComponent("myButton");return w.openBlock(),w.createBlock(w.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=f=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=f=>e.$emit("open")),persisted:""},{default:w.withCtx(()=>[w.withDirectives(w.createElementVNode("div",{class:"window",style:w.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...f)=>e.activate&&e.activate(...f)),onTouchstart:t[1]||(t[1]=(...f)=>e.activate&&e.activate(...f))},[w.createElementVNode("div",{class:"titlebar",style:w.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[w.createElementVNode("div",Vi,[e.$slots.title?w.renderSlot(e.$slots,"title",{key:0}):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[w.createTextVNode(w.toDisplayString(e.title),1)],64))]),e.closeButton?(w.openBlock(),w.createBlock(l,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:w.withCtx(()=>[w.createTextVNode("\xD7")]),_:1},8,["windowStyle","onClick"])):w.createCommentVNode("v-if",!0)],4),w.createElementVNode("div",{class:"content",style:w.normalizeStyle(e.styleContent),ref:"content"},[w.renderSlot(e.$slots,"default")],4)],36),[[w.vShow,e.isOpen]])]),_:3})},Je.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(oo||(oo={}));const Xi=Je;exports.LayoutContainerEnum=void 0,function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"}(exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}));class io{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(t,n,o){this.layoutState=t,this._LayoutID=o,n.forEach(i=>{if(i.layoutID===o&&(this.widgetConfig.push(i),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)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return le(t)?n=t:Le(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=w.markRaw(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),w.nextTick().then(()=>{N.EventBus.emit(Q.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const i of o)if(this.isWidgetLoaded(i.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const r=this.preConditionMap.get(t);if(r)for(const l of r)this.unloadWidget(l.id)}const o=this.getContainerComponents(n.container),i=o.value.get(t);i&&i.unmounted&&i.unmounted(),o.value.delete(t),this.widgetsLoadedSet.delete(t),N.EventBus.emit(Q.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.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 o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&N.EventBus.emit(Q.WidgetVisibleChanged,{id:t,layoutID:this._LayoutID,name:o.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetConfig.find(o=>o.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=w.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Ze=w.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const i=e.layoutID,r=w.ref(e.enableRouterView);w.watch(()=>e.enableRouterView,()=>{r.value=e.enableRouterView});const l=w.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),f=new io(l,e.widgetConfig,i),v=I(exports.LayoutContainerEnum.top),S=I(exports.LayoutContainerEnum.centerBack),E=I(exports.LayoutContainerEnum.centerFront),k=I(exports.LayoutContainerEnum.left),A=I(exports.LayoutContainerEnum.right),D=I(exports.LayoutContainerEnum.bottom);function I(u){return f?.getContainerComponents(u)}const C=w.computed(()=>e.layoutStyle);return w.onMounted(()=>{f&&(f.preloadWidgets(),i===void 0&&(N.LayoutManager=f),o("containerLoaded",{layoutID:i,layoutManager:f}))}),{...w.toRefs(l),topContainerComponents:v,centerbackComponents:S,centerfrontComponents:E,leftContainerComponents:k,rightContainerComponents:A,bottomContainerComponents:D,containerStyle:C,isEnableRouterView:r}}});const Ki={ref:"topContainer",class:"topContainer"},Yi={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},Ji={ref:"centerBackContainer",class:"centerdiv backContainer"},Zi={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Qi={ref:"leftContainer",class:"leftContainer"},er={ref:"rightContainer",class:"rightContainer"},tr={ref:"bottomContainer",class:"bottomContainer"};Ze.render=function(e,t,n,o,i,r){const l=w.resolveComponent("router-view");return w.openBlock(),w.createElementBlock("div",{class:"layoutContainer",style:w.normalizeStyle(e.containerStyle)},[w.createElementVNode("div",Ki,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.topContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",null,[w.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(w.openBlock(),w.createElementBlock("div",Yi,[w.createVNode(l,null,{default:w.withCtx(({Component:f})=>[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(f)))]),_:1})],512)):w.createCommentVNode("v-if",!0),w.createCommentVNode(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Ji,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerbackComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createCommentVNode(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Zi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerfrontComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",Qi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.leftContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",er,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.rightContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)]),w.createElementVNode("div",tr,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.bottomContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)],4)},Ze.__scopeId="data-v-4d081e5c",Ze.__file="src/controls/layoutcontainer/layout.vue";const Qe=new Map,Ot=new Map;let et;const nr={getDefaultClient(){if(et||(et=new we(SysConfig.DefaultHproseAPI)),!et)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return et},registerHprose(e,t){const n=Ot.get(e);if(!n){const o=new we(t);Qe.set(e,o)}return n},getHprose:e=>Ot?.get(e),getProxyHprose:e=>Qe.get(e),unregisterHprose(e){Qe.get(e)&&(Ot.delete(e),Qe.delete(e))}},pe={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},jt="access_token",or=N.Config.ServiceURL.LoginAuthURL;function Ft(){const e=Rn();e&&re(pe.RefreshToken,or,{refreshToken:e}).then(t=>{$t(t.data)})}function ro(){const e=ie.getJsonObject(jt);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Ft():setTimeout(Ft,n-5e3))}function $t(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=de();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},ie.set(jt,o,n/1e3),ro()}else ie.remove(jt)}const tt="Wm314243",nt=N.Config.ServiceURL.LoginAuthURL,Wt="ROLE_SYSTEM_RIGHT",Ht=new Be("",sessionStorage);function so(){return Ht.get(Wt)}function qt(e){Ht.set(Wt,e)}function ao(){Ht.remove(Wt)}function ve(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ve(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function co(e,t,n="name"){e&&t&&e.forEach(o=>{const i=t.find(r=>r[n]===o[n]);i&&(o.children?i.children&&co(o.children,i.children,n):(!i.children||i.children.length===0)&&i.selected&&(o.selected=i.selected))})}function Ce(e,t,n,o="name"){const i=e[n],r=t[n];i?r&&co(i,r,o):r&&(e[n]=r)}function uo(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=le(e[0]);const i=o?e[0]:JSON.parse(e[0]);if(t>1)for(let r=1;r<e.length;r++){const l=e[r],f=o?l:JSON.parse(l);Ce(i,f,"routes","name"),Ce(i,f,"widgetMenu","name"),Ce(i,f,"widgets","id"),Ce(i,f,"functions","id")}n=i}return n&&(ve(n.routes),ve(n.widgetMenu),ve(n.widgets),ve(n.functions)),n}}const Gt=[],Vt=[],Xt=[];function xe(){return so()}function lo(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.path===o.path);if(i){const r=lo(i,o);r&&n.children?.push(r)}})),n}function ho(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.name===o.name);if(i){const r=ho(i,o);r&&n.children?.push(r)}})),n}exports.BigFileDownload=class{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,n=3,o=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=xt(),this.initIndexDB(),o>=3&&(this.cacheSize=o),i>this.requestTimeout&&(this.requestTimeout=i)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const o=await re(t,e,n);let i=null;return o&&o.status===200&&(i=o.data),i}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Ue.createInstance({name:this.fileID,driver:Ue.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(),Ue.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const o=N.Axios.CancelToken;this.cancelSource=o.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let f=0;for(let v=0;v<this.totalChunks;v++){if(this.keys&&this.keys?.indexOf(v.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const S=v*this.chunkByteSize;let E=S+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const k={range:`bytes=${S}-${E}`};for(;f>=l;)await this.sleep(200);const A=v.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${v+1}/${this.totalChunks}`),f++,re(n,t,i,k,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async D=>{const I=D.data;f--,await this.currentDB?.setItem(A,I),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const C=parseInt(A)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${C}/${this.totalChunks}`),this.savefile()}).catch(D=>{f--;const I=parseInt(A)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${I}\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=Bi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const o=n.toString();let i=await this.currentDB?.getItem(o);if(i||(i=await this.currentDB?.getItem(o)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let r=new Response(i).body;if(r===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 l=r.getReader();for(;;){const{done:f,value:v}=await l.read();if(f)break;await e.write(v)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Ue.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Pe,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((i,r)=>{if(o){const l=document.createElement("a");if(l.href=e,l.target=t,l.download!==void 0&&(l.download=n||Cn(e)),document.createEvent){const f=document.createEvent("MouseEvents");return f.initEvent("click",!0,!0),l.dispatchEvent(f),i(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),i(!0)}{const l=document.createElement("canvas"),f=document.createElement("img");f.setAttribute("crossOrigin","Anonymous"),f.src=e,f.onload=v=>{l.width=f.width,l.height=f.height,l.getContext("2d").drawImage(f,0,0,f.width,f.height),l.toBlob(S=>{if(S){const E=document.createElement("a");E.href=window.URL.createObjectURL(S),E.download=Cn(e),E.click(),URL.revokeObjectURL(E.href),i(!0)}},"image/jpeg")},f.onerror=v=>r(v)}})},exports.FileUpload=Pn,exports.Global=N,exports.GlobalHprose=nr,exports.GlobalMitt=ge,exports.H5Tool=ee,exports.HproseClient=Ee,exports.HttpDownload=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){Pe(o.data,n)}).catch(o=>{console.warn(o),ge.emit(Q.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=Sn,exports.LayoutContainer=Ze,exports.LayoutManager=io,exports.ObjToUrlParams=function(e,t){let n="",o="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o},exports.Pane=ft,exports.ProxyClient=we,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),i=document.createElement("a");i.href=n.createObjectURL(o),i.download=t,i.click(),n.revokeObjectURL(i.href)},exports.Splitpanes=pi,exports.Storage=Be,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=Q,exports.TOKEN_REFRESH_TIME=5e3,exports.TOKEN_VALID_TIMESPAN=36e5,exports.USER_TOKEN_API=pe,exports.VCollapsiblePanel=He,exports.VCollapsiblePanelGroup=We,exports.VWindow=Je,exports.WindowResizeEvent=no,exports.WindowType=Xi,exports.XXTEA=Se,exports.calculateBestTextColor=function(e){return function(t,n){return(bn(~~t[0],~~t[1],~~t[2])+.05)/(bn(n[0],n[1],n[2])+.05)}(bt(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"},exports.changeMyPWD=function(e){const t={oldpwd:Se.encryptToString(e.oldpwd,tt),newpwd:Se.encryptToString(e.newpwd,tt)};return re(pe.ChangeMyPwd,nt,t)},exports.checkDoRefreshToken=ro,exports.checkToken=function(e){return re(pe.CheckToken,nt,{token:e})},exports.clearLocalToken=kt,exports.clearRight=ao,exports.colorIsDark=function(e){if(!Te(e))return;const[t,n,o]=bt(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(i=>Number(i));return .299*t+.578*n+.114*o<192},exports.createFileUpload=e=>new Pn(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ct(e.substring(0,2),t)}${Ct(e.substring(2,4),t)}${Ct(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let o;for(o in n)le(n[o])?e(t[o],n[o]):t[o]=n[o];return t},exports.delay=xn,exports.doRefreshToken=Ft,exports.exportSystemRights=Fn,exports.get=function(e,t){return re(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return N.Axios?.get(e,{params:t}).catch(function(n){Ne(n,e,"","\u5916\u90E8Get")})},exports.getEncryptPWD=function(e){return Se.encryptToString(e,tt)},exports.getFunctions=function(e,t=2){if(t===0)return e;const n=xe();return n?n.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),r=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)},exports.getLocalToken=de,exports.getLockState=function(){return ie.get(Lt,!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const i=t.slice(n,n+1);o+=i.concat(i)}return o}return t},exports.getProxyClient=Dn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Te(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const r=t.slice(o,o+1);n+=r.concat(r)}t=n}var i=[];for(o=1;o<7;o+=2)i.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+i.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,o,i,r=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),f=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(l===0)n=o=i=f;else{var v=f<=.5?f*(l+1):f+l-f*l,S=2*f-v;n=wt(S,v,r+1/3),o=wt(S,v,r),i=wt(S,v,r-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=Rn,exports.getRight=so,exports.getRoutes=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.routes?(Xt.length>0||e.forEach(o=>{const i=n.routes?.find(r=>r.name===o.name);if(i){const r=lo(o,i);r&&Xt.push(r)}}),Xt):void 0},exports.getSystemRoleRight=async function(e,t=!1){ao();const n=pe.GetSystemRights,o=N.Config.ServiceURL.LoginAuthURL,i=await re(n,o,{systemid:e});if(!i||!i.data)return void N.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const r=i.data;if(r&&r.length>0){if(t){const l=JSON.parse(r[0]);return qt(l),l}{const l=uo(r);return qt(l),l}}},exports.getWidgetConfig=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgets?(Gt.length>0||e?.forEach(o=>{n.widgets?.find(i=>i.id===o.id)&&Gt.push(o)}),Gt):void 0},exports.getWidgetMenus=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgetMenu?(Vt.length>0||e.forEach(o=>{const i=n.widgetMenu?.find(r=>r.name===o.name);if(i){const r=ho(o,i);r&&Vt.push(r)}}),Vt):void 0},exports.handleNodes=ve,exports.hexToRGB=bt,exports.init=function(e,t,n){!N.Config.DefaultHproseAPI&&N.Config.ServiceURL&&(N.Config.DefaultHproseAPI=N.Config.ServiceURL.DefaultHproseAPI),N.Config.DefaultHproseAPI&&_e.isNotEmpty(N.Config.DefaultHproseAPI)&&(N.DefaultProxyClient=new we(N.Config.DefaultHproseAPI));const o=N.Config.UI.GrayMode;o&&ee.setGrayMode(o);const i=new Li(e,N.EventBus);N.Message=i,N.SystemID=t,N.SystemGroup=n,N.EventBus.on(Q.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.AxiosRequestErrorEvent,r=>{const l=`Http\u8BF7\u6C42'${r.code}'\u9519\u8BEF: ${r.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.CommonWarnEvent,r=>{i.warn(r)})},exports.initDefaultProxyClient=function(e){const t=Dn(e);return t&&(N.DefaultProxyClient=t),t},exports.is=K,exports.isArray=gt,exports.isAsyncFunction=function(e){return K(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||K(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return K(e,"Date")},exports.isDef=wn,exports.isElement=e=>le(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Le(e)||gt(e)?e.length===0:!!le(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return K(e,"Error")},exports.isFunction=Me,exports.isHexColor=Te,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return K(e,"Map")},exports.isNull=mt,exports.isNullAndUnDef=function(e){return pt(e)&&mt(e)},exports.isNullOrUnDef=function(e){return pt(e)||mt(e)},exports.isNumber=function(e){return K(e,"Number")},exports.isObjectX=le,exports.isPromise=function(e){return K(e,"Promise")&&le(e)&&Me(e.then)&&Me(e.catch)},exports.isServer=gi,exports.isString=Le,exports.isSymbol=function(e){return K(e,"Symbol")},exports.isUnDef=pt,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 K(e,"WeakMap")},exports.isWeakSet=function(e){return K(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&K(e,"Window"),exports.jquery=Mi,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={username:e.username,pwd:Se.encryptToString(e.pwd,tt)},n=(await re(pe.Login,nt,t))?.data;return n&&$t(n.doubletoken),n},exports.logout=function(){const e=de();e&&(Ln(pe.Logout,nt,{token:e.token,reftoken:e.refresh}),kt())},exports.mergeFilterRoleSysRight=uo,exports.mergeNodes=function e(t,n,o="name"){t&&n&&t.forEach(i=>{const r=n.find(l=>l[o]===i[o]);r&&(i.children?r.children&&e(i.children,r.children,o):(!r.children||r.children.length===0)&&r.selected&&(i.selected=r.selected))})},exports.mergeNodesAll=Ce,exports.newGuid=function(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t},exports.onLockListener=function(){Bt(),document.addEventListener("mousedown",Bt)},exports.post=function(e,t){return Mn(e,void 0,t)},exports.requestGet=re,exports.requestPost=Mn,exports.requestPostBody=Ln,exports.rgbToHex=function(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o},exports.setLocalToken=$t,exports.setRight=qt,exports.sleep=function(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${xn}\u6BEB\u79D2`)},exports.storage=yi,exports.storageHelper=ie,exports.unLockListener=function(){document.removeEventListener("mousedown",Bt)},exports.uuid=Ae,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",o=`const iconlist={
|
|
14
14
|
`,i=0;e.forEach(r=>{const l=r.split(":");if(l&&l.length===2){const f="icon"+i;n+=`import ${f} from '~icons/${l[0]}/${l[1]}'
|
|
15
15
|
`,o+=` '${r}':${f},
|
|
16
16
|
`,i++}}),i>0&&(o+=`};
|