xframelib 0.3.9 → 0.4.3

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