xframelib 0.3.7 → 0.4.2

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