xframelib 0.7.3 → 0.7.6

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 (72) hide show
  1. package/README.md +23 -18
  2. package/dist/api/Token.d.ts +15 -15
  3. package/dist/api/User.d.ts +49 -49
  4. package/dist/api/index.d.ts +2 -2
  5. package/dist/assets/output-ad5f5cbf.css +307 -0
  6. package/dist/controls/collapsepanel/VCollapsiblePanel.vue.d.ts +27 -27
  7. package/dist/controls/collapsepanel/VCollapsiblePanelGroup.vue.d.ts +33 -33
  8. package/dist/controls/collapsepanel/color.util.d.ts +1 -1
  9. package/dist/controls/collapsepanel/composables/store.d.ts +7 -7
  10. package/dist/controls/collapsepanel/constant.d.ts +1 -1
  11. package/dist/controls/collapsepanel/index.d.ts +3 -3
  12. package/dist/controls/layoutcontainer/LayoutManager.d.ts +133 -112
  13. package/dist/controls/layoutcontainer/index.d.ts +3 -3
  14. package/dist/controls/layoutcontainer/layout.vue.d.ts +61 -60
  15. package/dist/controls/splitpanes/index.d.ts +3 -3
  16. package/dist/controls/vuewindow/SinglePointerEvent.d.ts +23 -23
  17. package/dist/controls/vuewindow/dom.d.ts +16 -16
  18. package/dist/controls/vuewindow/draggable_helper.d.ts +20 -20
  19. package/dist/controls/vuewindow/index.d.ts +6 -6
  20. package/dist/controls/vuewindow/resizable_helper.d.ts +16 -16
  21. package/dist/controls/vuewindow/style.d.ts +110 -110
  22. package/dist/controls/vuewindow/window/Button.vue.d.ts +29 -29
  23. package/dist/controls/vuewindow/window/index.vue.d.ts +211 -211
  24. package/dist/controls/vuewindow/window/utils.d.ts +17 -17
  25. package/dist/controls/vuewindow/z_element.d.ts +11 -11
  26. package/dist/core/Global.d.ts +2 -2
  27. package/dist/core/IModel.d.ts +46 -46
  28. package/dist/core/Init.d.ts +20 -20
  29. package/dist/core/MsgHelper.d.ts +13 -13
  30. package/dist/core/SysEvents.d.ts +24 -24
  31. package/dist/core/index.d.ts +4 -4
  32. package/dist/hprose/HproseClient.d.ts +20 -20
  33. package/dist/hprose/ProxyClient.d.ts +39 -39
  34. package/dist/hprose/index.d.ts +11 -11
  35. package/dist/index.cjs +10 -5
  36. package/dist/index.css +96 -81
  37. package/dist/index.d.ts +11 -11
  38. package/dist/index.js +10 -5
  39. package/dist/mitt/index.d.ts +25 -25
  40. package/dist/model/Config.d.ts +151 -151
  41. package/dist/model/Constants.d.ts +19 -19
  42. package/dist/model/IRole.d.ts +89 -89
  43. package/dist/model/IUserModel.d.ts +67 -67
  44. package/dist/model/Layout.d.ts +83 -83
  45. package/dist/model/index.d.ts +5 -5
  46. package/dist/permission/RoleSysRightHelper.d.ts +27 -27
  47. package/dist/permission/filter.d.ts +45 -45
  48. package/dist/permission/index.d.ts +4 -4
  49. package/dist/permission/register.d.ts +24 -24
  50. package/dist/permission/right.d.ts +15 -15
  51. package/dist/utils/AxiosHelper.d.ts +58 -58
  52. package/dist/utils/BigFileDownload.d.ts +117 -117
  53. package/dist/utils/CodeHelper.d.ts +14 -14
  54. package/dist/utils/Color.d.ts +74 -74
  55. package/dist/utils/FileDownload.d.ts +36 -36
  56. package/dist/utils/FileUpload.d.ts +90 -90
  57. package/dist/utils/H5Tool.d.ts +158 -150
  58. package/dist/utils/IsTool.d.ts +101 -101
  59. package/dist/utils/JQuery.d.ts +41 -41
  60. package/dist/utils/LockHelper.d.ts +17 -17
  61. package/dist/utils/SignalRClient.d.ts +8 -8
  62. package/dist/utils/Storage.d.ts +66 -66
  63. package/dist/utils/StringUtils.d.ts +15 -15
  64. package/dist/utils/Time.d.ts +11 -11
  65. package/dist/utils/TokenHelper.d.ts +18 -18
  66. package/dist/utils/URLTool.d.ts +18 -18
  67. package/dist/utils/ValidateTool.d.ts +149 -149
  68. package/dist/utils/WaterMark.d.ts +10 -10
  69. package/dist/utils/XXTEA.d.ts +15 -15
  70. package/dist/utils/index.d.ts +21 -21
  71. package/dist/utils/uuid.d.ts +3 -3
  72. package/package.json +19 -19
package/dist/index.js CHANGED
@@ -1,10 +1,15 @@
1
- import{h as di,openBlock as G,createElementBlock as ot,normalizeStyle as kt,renderSlot as Ct,reactive as ao,computed as Et,defineComponent as Ft,ref as ht,onMounted as Ve,onUpdated as pi,nextTick as Ke,normalizeClass as fi,createElementVNode as rt,createCommentVNode as It,createVNode as co,Transition as lo,withCtx as ie,withModifiers as ho,getCurrentInstance as gi,watch as qt,onBeforeUnmount as mi,resolveComponent as uo,createBlock as vt,withDirectives as vi,Fragment as Tt,createTextVNode as po,toDisplayString as yi,vShow as wi,markRaw as bi,toRefs as _i,renderList as Bt,resolveDynamicComponent as Rt}from"vue";import Si from"axios";import Ci from"qs";import{Client as Ei,ClientContext as Je}from"@hprose/rpc-core";import{ByteStream as fo}from"@hprose/io";import{HttpTransport as xi}from"@hprose/rpc-html5";var ki={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((o,r)=>(o.size=r===t?o.max:o.min,r!==t&&(n+=o.min),o)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(e),r),o);let s=[t,t+1],c=this.panes[s[0]]||null,p=this.panes[s[1]]||null;const m=c.max<100&&i>=c.max+n.prevPanesSize,_=p.max<100&&i<=100-(p.max+this.sumNextPanesSize(t+1));if(m||_)m?(c.size=c.max,p.size=Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,0)):(c.size=Math.max(100-p.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),p.size=p.max);else{if(this.pushOtherPanes){const C=this.doPushOtherPanes(n,i);if(!C)return;({sums:n,panesToResize:s}=C),c=this.panes[s[0]]||null,p=this.panes[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),p!==null&&(p.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,p.min),p.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((r,i)=>{i>o[0]&&i<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,i)=>{i>0&&i<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((r,i)=>{i>n&&i<o[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,i)=>{i<this.panesCount-1&&i>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(e,t,n=!1){const o=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=i=>this.onMouseDown(i,o),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=i=>this.onMouseDown(i,o)),r.onclick=i=>this.onSplitterClick(i,o+1)),this.dblClickSplitter&&(r.ondblclick=i=>this.onSplitterDblClick(i,o+1)),t.parentNode.insertBefore(r,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([o,r])=>n[o]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,i)=>r.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,r)=>o.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],o=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&o.push(r.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(i=>{e-=i.size,i.size!==null&&o++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)});let r=100;e>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(e/(this.panesCount-o),i.max),i.min)),r-=i.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const o=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{n-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(i=>{e&&e.givenSize!==null&&e.id===i.id||(i.size=Math.max(Math.min(t,i.max),i.min)),n-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),n>.1&&this.readjustSizes(n,o,r))},readjustSizes(e,t,n){let o;o=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;e-=s,r.size=i}else if(!n.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;e-=s,r.size=i}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return di("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},Ye={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};Ye.render=function(e,t,n,o,r,i){return G(),ot("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=s=>i.onPaneClick(s,e._.uid)),style:kt(e.style)},[Ct(e.$slots,"default")],4)},Ye.__file="src/controls/splitpanes/pane.vue";const Ii=Object.prototype.toString;function it(e,t){return Ii.call(e)===`[object ${t}]`}function se(e){return it(e,"Function")}const go=e=>typeof e<"u",Ze=e=>!go(e);function Qe(e){return e===null}function Ti(e){return Ze(e)&&Qe(e)}function Ri(e){return Ze(e)||Qe(e)}const Pt=e=>e!=null&&e!==null&&it(e,"Object");function Pi(e){return it(e,"Date")}function zi(e){return it(e,"Number")}function Di(e){return it(e,"AsyncFunction")}function Mi(e){return it(e,"Promise")&&Pt(e)&&se(e.then)&&se(e.catch)}function ae(e){return it(e,"String")}function $i(e){return e===!0||e===!1||it(e,"Boolean")}function tn(e){return e&&Array.isArray(e)}const Ai=()=>typeof window<"u",Li=e=>typeof window<"u"&&it(e,"Window"),Ni=e=>Pt(e)&&!!e.tagName,Bi=typeof window>"u";function Ui(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Oi(e){return e==null||(ae(e)||tn(e)?e.length===0:!!Pt(e)&&JSON.stringify(e)==="{}")}function ji(e){return it(e,"Error")}function Hi(e){return it(e,"WeakSet")}function Wi(e){return it(e,"WeakMap")}function Fi(e){return it(e,"Symbol")}function qi(e){return it(e,"Map")}const Gi=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},en={},Xi={get exports(){return en},set exports(e){en=e}};Xi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(S,u){var g=S[0],f=S[1],d=S[2],y=S[3];f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[0]-680876936|0)<<7|g>>>25)+f|0)&f|~g&d)+u[1]-389564586|0)<<12|y>>>20)+g|0)&g|~y&f)+u[2]+606105819|0)<<17|d>>>15)+y|0)&y|~d&g)+u[3]-1044525330|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[4]-176418897|0)<<7|g>>>25)+f|0)&f|~g&d)+u[5]+1200080426|0)<<12|y>>>20)+g|0)&g|~y&f)+u[6]-1473231341|0)<<17|d>>>15)+y|0)&y|~d&g)+u[7]-45705983|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[8]+1770035416|0)<<7|g>>>25)+f|0)&f|~g&d)+u[9]-1958414417|0)<<12|y>>>20)+g|0)&g|~y&f)+u[10]-42063|0)<<17|d>>>15)+y|0)&y|~d&g)+u[11]-1990404162|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&d|~f&y)+u[12]+1804603682|0)<<7|g>>>25)+f|0)&f|~g&d)+u[13]-40341101|0)<<12|y>>>20)+g|0)&g|~y&f)+u[14]-1502002290|0)<<17|d>>>15)+y|0)&y|~d&g)+u[15]+1236535329|0)<<22|f>>>10)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[1]-165796510|0)<<5|g>>>27)+f|0)&d|f&~d)+u[6]-1069501632|0)<<9|y>>>23)+g|0)&f|g&~f)+u[11]+643717713|0)<<14|d>>>18)+y|0)&g|y&~g)+u[0]-373897302|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[5]-701558691|0)<<5|g>>>27)+f|0)&d|f&~d)+u[10]+38016083|0)<<9|y>>>23)+g|0)&f|g&~f)+u[15]-660478335|0)<<14|d>>>18)+y|0)&g|y&~g)+u[4]-405537848|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[9]+568446438|0)<<5|g>>>27)+f|0)&d|f&~d)+u[14]-1019803690|0)<<9|y>>>23)+g|0)&f|g&~f)+u[3]-187363961|0)<<14|d>>>18)+y|0)&g|y&~g)+u[8]+1163531501|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f&y|d&~y)+u[13]-1444681467|0)<<5|g>>>27)+f|0)&d|f&~d)+u[2]-51403784|0)<<9|y>>>23)+g|0)&f|g&~f)+u[7]+1735328473|0)<<14|d>>>18)+y|0)&g|y&~g)+u[12]-1926607734|0)<<20|f>>>12)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[5]-378558|0)<<4|g>>>28)+f|0)^f^d)+u[8]-2022574463|0)<<11|y>>>21)+g|0)^g^f)+u[11]+1839030562|0)<<16|d>>>16)+y|0)^y^g)+u[14]-35309556|0)<<23|f>>>9)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[1]-1530992060|0)<<4|g>>>28)+f|0)^f^d)+u[4]+1272893353|0)<<11|y>>>21)+g|0)^g^f)+u[7]-155497632|0)<<16|d>>>16)+y|0)^y^g)+u[10]-1094730640|0)<<23|f>>>9)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[13]+681279174|0)<<4|g>>>28)+f|0)^f^d)+u[0]-358537222|0)<<11|y>>>21)+g|0)^g^f)+u[3]-722521979|0)<<16|d>>>16)+y|0)^y^g)+u[6]+76029189|0)<<23|f>>>9)+d|0,f=((f+=((d=((d+=((y=((y+=((g=((g+=(f^d^y)+u[9]-640364487|0)<<4|g>>>28)+f|0)^f^d)+u[12]-421815835|0)<<11|y>>>21)+g|0)^g^f)+u[15]+530742520|0)<<16|d>>>16)+y|0)^y^g)+u[2]-995338651|0)<<23|f>>>9)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[0]-198630844|0)<<6|g>>>26)+f|0)|~d))+u[7]+1126891415|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[14]-1416354905|0)<<15|d>>>17)+y|0)|~g))+u[5]-57434055|0)<<21|f>>>11)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[12]+1700485571|0)<<6|g>>>26)+f|0)|~d))+u[3]-1894986606|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[10]-1051523|0)<<15|d>>>17)+y|0)|~g))+u[1]-2054922799|0)<<21|f>>>11)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[8]+1873313359|0)<<6|g>>>26)+f|0)|~d))+u[15]-30611744|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[6]-1560198380|0)<<15|d>>>17)+y|0)|~g))+u[13]+1309151649|0)<<21|f>>>11)+d|0,f=((f+=((y=((y+=(f^((g=((g+=(d^(f|~y))+u[4]-145523070|0)<<6|g>>>26)+f|0)|~d))+u[11]-1120210379|0)<<10|y>>>22)+g|0)^((d=((d+=(g^(y|~f))+u[2]+718787259|0)<<15|d>>>17)+y|0)|~g))+u[9]-343485551|0)<<21|f>>>11)+d|0,S[0]=g+S[0]|0,S[1]=f+S[1]|0,S[2]=d+S[2]|0,S[3]=y+S[3]|0}function o(S){var u,g=[];for(u=0;u<64;u+=4)g[u>>2]=S.charCodeAt(u)+(S.charCodeAt(u+1)<<8)+(S.charCodeAt(u+2)<<16)+(S.charCodeAt(u+3)<<24);return g}function r(S){var u,g=[];for(u=0;u<64;u+=4)g[u>>2]=S[u]+(S[u+1]<<8)+(S[u+2]<<16)+(S[u+3]<<24);return g}function i(S){var u,g,f,d,y,$,T=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=T;u+=64)n(D,o(S.substring(u-64,u)));for(g=(S=S.substring(u-64)).length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<g;u+=1)f[u>>2]|=S.charCodeAt(u)<<(u%4<<3);if(f[u>>2]|=128<<(u%4<<3),u>55)for(n(D,f),u=0;u<16;u+=1)f[u]=0;return d=(d=8*T).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(d[2],16),$=parseInt(d[1],16)||0,f[14]=y,f[15]=$,n(D,f),D}function s(S){var u,g,f,d,y,$,T=S.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=T;u+=64)n(D,r(S.subarray(u-64,u)));for(g=(S=u-64<T?S.subarray(u-64):new Uint8Array(0)).length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<g;u+=1)f[u>>2]|=S[u]<<(u%4<<3);if(f[u>>2]|=128<<(u%4<<3),u>55)for(n(D,f),u=0;u<16;u+=1)f[u]=0;return d=(d=8*T).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(d[2],16),$=parseInt(d[1],16)||0,f[14]=y,f[15]=$,n(D,f),D}function c(S){var u,g="";for(u=0;u<4;u+=1)g+=t[S>>8*u+4&15]+t[S>>8*u&15];return g}function p(S){var u;for(u=0;u<S.length;u+=1)S[u]=c(S[u]);return S.join("")}function m(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function _(S,u){var g,f=S.length,d=new ArrayBuffer(f),y=new Uint8Array(d);for(g=0;g<f;g+=1)y[g]=S.charCodeAt(g);return u?y:d}function C(S){return String.fromCharCode.apply(null,new Uint8Array(S))}function M(S,u,g){var f=new Uint8Array(S.byteLength+u.byteLength);return f.set(new Uint8Array(S)),f.set(new Uint8Array(u),S.byteLength),g?f:f.buffer}function N(S){var u,g=[],f=S.length;for(u=0;u<f-1;u+=2)g.push(parseInt(S.substr(u,2),16));return String.fromCharCode.apply(String,g)}function I(){this.reset()}return p(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function S(u,g){return(u=0|u||0)<0?Math.max(u+g,0):Math.min(u,g)}ArrayBuffer.prototype.slice=function(u,g){var f,d,y,$,T=this.byteLength,D=S(u,T),B=T;return g!==e&&(B=S(g,T)),D>B?new ArrayBuffer(0):(f=B-D,d=new ArrayBuffer(f),y=new Uint8Array(d),$=new Uint8Array(this,D,f),y.set($),d)}}(),I.prototype.append=function(S){return this.appendBinary(m(S)),this},I.prototype.appendBinary=function(S){this._buff+=S,this._length+=S.length;var u,g=this._buff.length;for(u=64;u<=g;u+=64)n(this._hash,o(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},I.prototype.end=function(S){var u,g,f=this._buff,d=f.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<d;u+=1)y[u>>2]|=f.charCodeAt(u)<<(u%4<<3);return this._finish(y,d),g=p(this._hash),S&&(g=N(g)),this.reset(),g},I.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},I.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.prototype._finish=function(S,u){var g,f,d,y=u;if(S[y>>2]|=128<<(y%4<<3),y>55)for(n(this._hash,S),y=0;y<16;y+=1)S[y]=0;g=(g=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(g[2],16),d=parseInt(g[1],16)||0,S[14]=f,S[15]=d,n(this._hash,S)},I.hash=function(S,u){return I.hashBinary(m(S),u)},I.hashBinary=function(S,u){var g=p(i(S));return u?N(g):g},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(S){var u,g=M(this._buff.buffer,S,!0),f=g.length;for(this._length+=S.byteLength,u=64;u<=f;u+=64)n(this._hash,r(g.subarray(u-64,u)));return this._buff=u-64<f?new Uint8Array(g.buffer.slice(u-64)):new Uint8Array(0),this},I.ArrayBuffer.prototype.end=function(S){var u,g,f=this._buff,d=f.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<d;u+=1)y[u>>2]|=f[u]<<(u%4<<3);return this._finish(y,d),g=p(this._hash),S&&(g=N(g)),this.reset(),g},I.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.ArrayBuffer.prototype.getState=function(){var S=I.prototype.getState.call(this);return S.buff=C(S.buff),S},I.ArrayBuffer.prototype.setState=function(S){return S.buff=_(S.buff,!0),I.prototype.setState.call(this,S)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(S,u){var g=p(s(new Uint8Array(S)));return u?N(g):g},I}();var nn=en;const on=[];class ut{static addHandler(t,n,o){t.addEventListener?t.addEventListener(n,o,!1):t.attachEvent?t.attachEvent("on"+n,o):t["on"+n]=o}static windowResizeHandler(t){ut.addHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const o=window.document;let r=window.document.exitFullscreen||o.msExitFullscreen||o.mozCancelFullScreen||o.webkitCancelFullScreen;typeof r<"u"&&r?r.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let o=t;o||(o=window.document.documentElement);let r=o.requestFullScreen||o.webkitRequestFullScreen||o.mozRequestFullScreen||o.msRequestFullScreen;typeof r<"u"&&r?r.call(o):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(t=window.document.documentElement){let n=t;var o=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(o)o.call(n);else if(typeof window.ActiveXObject<"u"){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(typeof window.ActiveXObject<"u"){var o=new window.ActiveXObject("WScript.Shell");o!==null&&o.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ut.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const o=ut.isFullScreen();t(o)}):document.addEventListener("MSFullscreenChange",function(){const o=ut.isFullScreen();t(o)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(on.indexOf(n)!==-1)return;on.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ut.stringifyCircularHandler);return on.length=0,n}static jsonParse(t){const n=ut.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const o=window;return o.createObjcectURL!=null?n=o.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,c=new nn.ArrayBuffer,p=new FileReader;p.onload=function(m){c.append(m.target?.result);const _=c.end();n({isOK:!0,data:_})},p.onerror=function(){const m="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(m),n({isOK:!1,data:m})},function(){const m=0+s>=i.size?i.size:0+s;p.readAsArrayBuffer(r.call(i,0,m))}()}static getFileMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,c=Math.ceil(i.size/s);let p=0;const m=new nn.ArrayBuffer,_=new FileReader;function C(){const M=p*s,N=M+s>=i.size?i.size:M+s;_.readAsArrayBuffer(r.call(i,M,N))}_.onload=function(M){if(m.append(M.target?.result),p++,p<c)C();else{const N=m.end();n({isOK:!0,data:N})}},_.onerror=function(){const M=`${i.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(M),n({isOK:!1,data:M})},C()}static MD5(t,n=!1){return nn.hash(t,n)}static copyTextByCommand(t){return new Promise((n,o)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}static copyText=t=>navigator.clipboard?navigator.clipboard.writeText(t).then(function(){return!0},function(n){return!1}):ut.copyTextByCommand(t);static copyElementTextByCommand(t){const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(n);try{return document.execCommand("copy"),o.removeRange(n),!0}catch(r){return o.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(t){if(!navigator.clipboard)return ut.copyElementTextByCommand(t);const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(n),navigator.clipboard.writeText(o).then(function(){return o.removeRange(n),!0},function(r){return o.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(t){ut.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(t,n,o){const r=o||document.body;let{className:i}=r;i=i.replace(n,""),r.className=t?`${i} ${n} `:i}static setCssVar(t,n,o=document.documentElement){o.style.setProperty(t,n)}static dispatchWindowResize(){const t=new Event("resize");window.dispatchEvent(t)}static dispatchElementEvent(t,n="click",o){let r;if(r=ae(t)?document.getElementById(t):t,r){const i=new Event(n,{bubbles:!0,cancelable:!0});o&&r.addEventListener("ev",s=>{o(s)},!1),r.dispatchEvent(i)}}}class ce{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>!(t===null||t===""||t===void 0||t.length===0);static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,o)=>o.toUpperCase()).replace("views","")}}class le{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,o=604800){const r=JSON.stringify({value:n,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const o=this.storage.getItem(this.getKey(t));if(o)try{const r=JSON.parse(o),{value:i,expire:s}=r;if(s===null||s>=Date.now())return i;this.remove(this.getKey(t))}catch{return n}return n}getJsonObject(t){const n=this.storage.getItem(this.getKey(t));if(n)try{const o=JSON.parse(n);if(o.expire===null||o.expire>=Date.now())return o;this.remove(this.getKey(t))}catch{return}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,o=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${o}`}getCookie(t){const n=document.cookie.split("; ");for(let o=0,r=n.length;o<r;o++){const i=n[o].split("=");if(i[0]===this.getKey(t))return i[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const Vi=new le("",localStorage);function he(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const o=3&Number(e[19])|8;return e[19]=t.substring(o,o+1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function Ki(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t}function Ji(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),i=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)}function Yi(e){var t=e.toLowerCase();if(ue(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const i=t.slice(o,o+1);n+=i.concat(i)}t=n}var r=[];for(o=1;o<7;o+=2)r.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+r.join(",")+")"}return t}function Zi(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);o+=r.concat(r)}return o}return t}var Dt;function Qi(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?Dt.Hex:t==="r"||t==="("?Dt.RGBA:t==="h"?Dt.Hsla:Dt.RGBA}function ts(e){if(e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t){var n,o,r,i=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),c=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(s===0)n=o=r=c;else{var p=c<=.5?c*(s+1):c+s-c*s,m=2*c-p;n=rn(m,p,i+1/3),o=rn(m,p,i),r=rn(m,p,i-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}}function rn(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 ue(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function es(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function sn(e){let t=e.toLowerCase();if(ue(e)){if(t.length===4){let o="#";for(let r=1;r<4;r+=1)o+=t.slice(r,r+1).concat(t.slice(r,r+1));t=o}const n=[];for(let o=1;o<7;o+=2)n.push(parseInt("0x"+t.slice(o,o+2)));return"RGB("+n.join(",")+")"}return t}function ns(e){if(!ue(e))return;const[t,n,o]=sn(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*o<192}function os(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${cn(e.substring(0,2),t)}${cn(e.substring(2,4),t)}${cn(e.substring(4,6),t)}`}function rs(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${an(e.substring(0,2),t)}${an(e.substring(2,4),t)}${an(e.substring(4,6),t)}`}function an(e,t){const n=parseInt(e,16)+t,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function mo(e,t,n){const o=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}function is(e){return function(t,n){return(mo(~~t[0],~~t[1],~~t[2])+.05)/(mo(n[0],n[1],n[2])+.05)}(sn(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function cn(e,t){const n=parseInt(e,16)-t,o=n<0?0:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function ln(e){return{all:e=e||new Map,on(t,n){const o=e?.get(t);o&&o.push(n)||e?.set(t,[n])},off(t,n){const o=e?.get(t);o&&o.splice(o.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(o=>{o(n)}),(e?.get("*")||[]).slice().map(o=>{o(t,n)})}}}(function(e){e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla"})(Dt||(Dt={}));const Ut=ln(),st={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},de=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const o=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(o),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function ss(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(o),r.download=t,r.click(),n.revokeObjectURL(r.href)}const vo=(e,t)=>{const n=JSON.stringify(e,null,2);t?de(n,t+".json"):Ut.emit(st.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},as=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){de(o.data,n)}).catch(o=>{console.warn(o),Ut.emit(st.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function yo(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function cs({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((r,i)=>{if(o){const s=document.createElement("a");if(s.href=e,s.target=t,s.download!==void 0&&(s.download=n||yo(e)),document.createEvent){const c=document.createEvent("MouseEvents");return c.initEvent("click",!0,!0),s.dispatchEvent(c),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const s=document.createElement("canvas"),c=document.createElement("img");c.setAttribute("crossOrigin","Anonymous"),c.src=e,c.onload=p=>{s.width=c.width,s.height=c.height,s.getContext("2d").drawImage(c,0,0,c.width,c.height),s.toBlob(m=>{if(m){const _=document.createElement("a");_.href=window.URL.createObjectURL(m),_.download=yo(e),_.click(),URL.revokeObjectURL(_.href),r(!0)}},"image/jpeg")},c.onerror=p=>i(p)}})}function ls(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${wo}\u6BEB\u79D2`)}function wo(e){return new Promise(t=>setTimeout(t,e))}var bo,_o,hn,Gt={},hs={get exports(){return Gt},set exports(e){Gt=e}};_o=zt,hn=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function r(I,S){var u=I[S];if(typeof u.bind=="function")return u.bind(I);try{return Function.prototype.bind.call(u,I)}catch{return function(){return Function.prototype.apply.apply(u,[I,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(I){return I==="debug"&&(I="log"),typeof console!==t&&(I==="trace"&&n?i:console[I]!==void 0?r(console,I):console.log!==void 0?r(console,"log"):e)}function c(I,S){for(var u=0;u<o.length;u++){var g=o[u];this[g]=u<I?e:this.methodFactory(g,I,S)}this.log=this.debug}function p(I,S,u){return function(){typeof console!==t&&(c.call(this,S,u),this[I].apply(this,arguments))}}function m(I,S,u){return s(I)||p.apply(this,arguments)}function _(I,S,u){var g,f=this;S=S??"WARN";var d="loglevel";function y(){var T;if(typeof window!==t&&d){try{T=window.localStorage[d]}catch{}if(typeof T===t)try{var D=window.document.cookie,B=D.indexOf(encodeURIComponent(d)+"=");B!==-1&&(T=/^([^;]+)/.exec(D.slice(B))[1])}catch{}return f.levels[T]===void 0&&(T=void 0),T}}typeof I=="string"?d+=":"+I:typeof I=="symbol"&&(d=void 0),f.name=I,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=u||m,f.getLevel=function(){return g},f.setLevel=function(T,D){if(typeof T=="string"&&f.levels[T.toUpperCase()]!==void 0&&(T=f.levels[T.toUpperCase()]),!(typeof T=="number"&&T>=0&&T<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+T;if(g=T,D!==!1&&function(B){var j=(o[B]||"silent").toUpperCase();if(typeof window!==t&&d){try{return void(window.localStorage[d]=j)}catch{}try{window.document.cookie=encodeURIComponent(d)+"="+j+";"}catch{}}}(T),c.call(f,T,I),typeof console===t&&T<f.levels.SILENT)return"No console available for logging"},f.setDefaultLevel=function(T){S=T,y()||f.setLevel(T,!1)},f.resetLevel=function(){f.setLevel(S,!1),function(){if(typeof window!==t&&d){try{return void window.localStorage.removeItem(d)}catch{}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},f.enableAll=function(T){f.setLevel(f.levels.TRACE,T)},f.disableAll=function(T){f.setLevel(f.levels.SILENT,T)};var $=y();$==null&&($=S),f.setLevel($,!1)}var C=new _,M={};C.getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var S=M[I];return S||(S=M[I]=new _(I,C.getLevel(),C.methodFactory)),S};var N=typeof window!==t?window.log:void 0;return C.noConflict=function(){return typeof window!==t&&window.log===C&&(window.log=N),C},C.getLoggers=function(){return M},C.default=C,C},(bo=hs).exports?bo.exports=hn():_o.log=hn();let So=!1;const L={Config:SysConfig,EventBus:Ut,DefaultProxyClient:null,Axios:Si,Logger:e=>{So||(import.meta.env.DEV||SysConfig.UI.ProductLog?Gt.enableAll():Gt.setDefaultLevel("warn"),So=!0);const t=e||"default";return Gt.getLogger(t)}},Co="access_token",yt=new le("user",localStorage);function Mt(){return yt.get(Co)}function un(){yt.remove(Co)}function Eo(){return Mt()?.refresh}function dn(e,t,n,o="json",r){const i={baseURL:L.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(s){return Ci.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Mt()?.token},responseType:o,cancelToken:r};if(n)for(let s in n)i.headers[s]=n[s];return L.SystemID&&(i.headers.sysid=L.SystemID,L.SystemGroup&&(i.headers.sysgroup=L.SystemGroup)),t&&(i.baseURL=t),i}function wt(e,t,n,o,r="json",i,s){const c=dn(n,t,o,r,i);return s&&s>=2e4&&(c.timeout=s),L.Axios?.get(e,c).catch(function(p){pe(p,t,e,"Get")})}function pe(e,t,n,o="Get"){const r=`${t}${n}`;if(e&&e.response){let i=!1;const s=e.response.status;switch(s){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const p=e.response.data;if(p){const m=p.indexOf(":"),_=p.indexOf(`
2
- `);if(m>0&&_-m>2){const C=p.substring(m+2,_);C.indexOf("System.Exception")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(i=!0,e.message=C)}}else e.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:e.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:e.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:e.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:e.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:e.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:e.message=`\u8FDE\u63A5\u9519\u8BEF${e.response.status}`}let c={address:r,code:s,isExceptionInfo:i,message:e.message,result:e.response.data};if(L.EventBus.emit(st.AxiosRequestErrorEvent,c),i)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function xo(e,t,n,o,r,i="json",s){const c=dn(o,t,r,i);s&&s>=2e4&&(c.timeout=s),c.headers["Content-Type"]="multipart/form-data";const p=function(m){let _=new FormData;return m&&Object.keys(m).forEach(C=>{if(!m)return;let M=m[C];M!=null&&(tn(M)?M.forEach(N=>{_.append(C,Io(N))}):_.append(C,Io(M)))}),_}(n);return L.Axios?.post(e,p,c).catch(function(m){pe(m,t,e,"Post")})}function ko(e,t,n,o,r,i="json",s){const c=dn(o,t,r,i);return s&&s>=2e4&&(c.timeout=s),L.Axios?.post(e,n,c).catch(function(p){pe(p,t,e,"Post")})}function us(e,t){return wt(e,void 0,t)}function ds(e,t){return xo(e,void 0,t)}function ps(e,t){return L.Axios?.get(e,{params:t}).catch(function(n){pe(n,e,"","\u5916\u90E8Get")})}function Io(e){return e instanceof Blob?e:e.toString()}var fe={},fs={get exports(){return fe},set exports(e){fe=e}},gs=typeof window<"u"?window:zt!==void 0?zt:typeof self<"u"?self:{},ms=function(e){if(!e)return!1;var t=vs.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},vs=Object.prototype.toString,pn=function(e){return e.replace(/^\s+|\s+$/g,"")},ys=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)ws.call(n,o)&&(e[o]=n[o])}return e},ws=Object.prototype.hasOwnProperty,To=gs,bs=ms,_s=function(e){if(!e)return{};for(var t,n={},o=pn(e).split(`
3
- `),r=0;r<o.length;r++){var i=o[r],s=i.indexOf(":"),c=pn(i.slice(0,s)).toLowerCase(),p=pn(i.slice(s+1));n[c]===void 0?n[c]=p:(t=n[c],Object.prototype.toString.call(t)==="[object Array]"?n[c].push(p):n[c]=[n[c],p])}return n},Ss=ys;function Ro(e,t,n){var o=e;return bs(t)?(n=t,typeof e=="string"&&(o={uri:e})):o=Ss(t,{uri:e}),o.callback=n,o}function bt(e,t,n){return Po(t=Ro(e,t,n))}function Po(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(g,f,d){t||(t=!0,e.callback(g,f,d))};function o(){var g=void 0;if(g=p.response?p.response:p.responseText||function(f){try{if(f.responseType==="document")return f.responseXML;var d=f.responseXML&&f.responseXML.documentElement.nodeName==="parsererror";if(f.responseType===""&&!d)return f.responseXML}catch{}return null}(p),S)try{g=JSON.parse(g)}catch{}return g}function r(g){return clearTimeout(m),g instanceof Error||(g=new Error(""+(g||"Unknown XMLHttpRequest Error"))),g.statusCode=0,n(g,u)}function i(){if(!c){var g;clearTimeout(m),g=e.useXDR&&p.status===void 0?200:p.status===1223?204:p.status;var f=u,d=null;return g!==0?(f={body:o(),statusCode:g,method:C,headers:{},url:_,rawRequest:p},p.getAllResponseHeaders&&(f.headers=_s(p.getAllResponseHeaders()))):d=new Error("Internal XMLHttpRequest Error"),n(d,f,f.body)}}var s,c,p=e.xhr||null;p||(p=e.cors||e.useXDR?new bt.XDomainRequest:new bt.XMLHttpRequest);var m,_=p.url=e.uri||e.url,C=p.method=e.method||"GET",M=e.body||e.data,N=p.headers=e.headers||{},I=!!e.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:C,url:_,rawRequest:p};if("json"in e&&e.json!==!1&&(S=!0,N.accept||N.Accept||(N.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(N["content-type"]||N["Content-Type"]||(N["Content-Type"]="application/json"),M=JSON.stringify(e.json===!0?M:e.json))),p.onreadystatechange=function(){p.readyState===4&&setTimeout(i,0)},p.onload=i,p.onerror=r,p.onprogress=function(){},p.onabort=function(){c=!0},p.ontimeout=r,p.open(C,_,!I,e.username,e.password),I||(p.withCredentials=!!e.withCredentials),!I&&e.timeout>0&&(m=setTimeout(function(){if(!c){c=!0,p.abort("timeout");var g=new Error("XMLHttpRequest timeout");g.code="ETIMEDOUT",r(g)}},e.timeout)),p.setRequestHeader)for(s in N)N.hasOwnProperty(s)&&p.setRequestHeader(s,N[s]);else if(e.headers&&!function(g){for(var f in g)if(g.hasOwnProperty(f))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(p.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(p),p.send(M||null),p}fs.exports=bt,fe.default=bt,bt.XMLHttpRequest=To.XMLHttpRequest||function(){},bt.XDomainRequest="withCredentials"in new bt.XMLHttpRequest?bt.XMLHttpRequest:To.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){bt[e==="delete"?"del":e]=function(t,n,o){return(n=Ro(t,n,o)).method=e.toUpperCase(),Po(n)}});const Cs=[200,201,202,204,308],Es=[408,502,503,504];class zo{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=ln(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,o=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(o,o+n))})}xhrPromise(t){const n=o=>{o.upload.onprogress=r=>{const i=100/this.totalChunks,s=i*this.file.size,c=i*this.chunkCount,p=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(c+p,100))}};return new Promise((o,r)=>{this.currentXhr=fe({...t,beforeSend:n},(i,s)=>(this.currentXhr=void 0,i?r(i):o(s)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,o={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:o,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){console.log(this.paused,this.offline,this.success,"sendChunks this.paused || this.offline || this.success"),!(this.paused||this.offline||this.success)&&this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Cs.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Es.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;console.log(`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`),this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const xs=e=>new zo(e),ks=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}};class ee{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!ce.isNullOrEmpty(t)){if(ee.httpTransport||(ee.httpTransport=new xi),this.client=new Ei(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):Ut.emit(st.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,o){if(this.client)return await this.client.invoke(t,n,o)}encode(t,n,o){if(this.client)return this.client.codec.encode(t,n,o)}decode(t,n){if(this.client)return this.client.codec.decode(t,n)}}class Xt{hproseClient;hpProxyObj;defaultContext=new Je;constructor(t){this.hproseClient=new ee(t),this.hpProxyObj=null}getClientContext(t,n){const o={};n&&(o.requestHeaders=n);const r=Mt();o.httpRequestHeaders=t||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),L.SystemID&&(i.sysid=L.SystemID,L.SystemGroup&&(i.sysgroup=L.SystemGroup)),new Je(o)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||Ut.emit(st.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,o)}async hproseInvokeContext(t,n,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Mt();return console.log(r,"userToken3"),r&&(n||(n=new Je({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,o,n)}async hproseInvokeEncode(t){const n=new fo(t).toBytes(),o=await this.hproseClient.client?.request(n,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(t,...n){const o=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return fo.toString(o)}}class Is{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:t,duration:n});else switch(o){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn?this.message.warn(t,n):this.message.warning&&this.message.warning(t,n);break;case"error":this.message.error(t,n)}else{switch(o){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":o="dark",console.error(t)}this.eventBus&&this.eventBus.emit(st.AlertInfoEvent,{type:o,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}success(t,n=3){this.msg(t,n,"success")}}const fn=new Map,Ts=function(e,t,n){!L.Config.DefaultHproseAPI&&L.Config.ServiceURL&&(L.Config.DefaultHproseAPI=L.Config.ServiceURL.DefaultHproseAPI),L.Config.DefaultHproseAPI&&ce.isNotEmpty(L.Config.DefaultHproseAPI)&&(L.DefaultProxyClient=new Xt(L.Config.DefaultHproseAPI));const o=L.Config.UI.GrayMode;o&&ut.setGrayMode(o);const r=new Is(e,L.EventBus);L.Message=r,L.SystemID=t,L.SystemGroup=n,L.EventBus.on(st.HproseServiceErrorEvent,i=>{const s=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(st.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(st.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(st.CommonWarnEvent,i=>{r.warn(i)})};function Do(e){if(e&&ce.isNotEmpty(e)){if(fn.has(e))return fn.get(e);{const t=new Xt(e);return fn.set(e,t),t}}}function Rs(e){const t=Do(e);return t&&(L.DefaultProxyClient=t),t}const gn="is_LockScreen",Mo=yt.get(gn,!1),Vt={isLock:Mo,lockTime:Mo=="true"?Ao():0};function $o(e){Vt.isLock=e,yt.set(gn,e,10),e&&(un(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Ps(){return yt.get(gn,!1)}function Ao(){let e=3600;return L.Config.UI?.LockTime&&L.Config.UI?.LockTime>=10&&(e=L.Config.UI.LockTime),e}let mn;function vn(){clearInterval(mn),!(window.location.href.indexOf("/login")>0||Vt.isLock)&&($o(!1),Vt.lockTime=Ao(),mn=setInterval(()=>{if(Vt.lockTime--,Vt.lockTime<=0)return $o(!0),clearInterval(mn)},1e3))}function zs(){vn(),document.addEventListener("mousedown",vn)}function Ds(){document.removeEventListener("mousedown",vn)}function yn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wn={},Ms={get exports(){return wn},set exports(e){wn=e}};Ms.exports=function e(t,n,o){function r(c,p){if(!n[c]){if(!t[c]){if(!p&&yn)return yn(c);if(i)return i(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var _=n[c]={exports:{}};t[c][0].call(_.exports,function(C){var M=t[c][1][C];return r(M||C)},_,_.exports,e,t,n,o)}return n[c].exports}for(var i=yn,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(e,t,n){(function(o){var r,i,s=o.MutationObserver||o.WebKitMutationObserver;if(s){var c=0,p=new s(M),m=o.document.createTextNode("");p.observe(m,{characterData:!0}),r=function(){m.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)r="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var I=o.document.createElement("script");I.onreadystatechange=function(){M(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},o.document.documentElement.appendChild(I)}:function(){setTimeout(M,0)};else{var _=new o.MessageChannel;_.port1.onmessage=M,r=function(){_.port2.postMessage(0)}}var C=[];function M(){var I,S;i=!0;for(var u=C.length;u;){for(S=C,C=[],I=-1;++I<u;)S[I]();u=C.length}i=!1}function N(I){C.push(I)!==1||i||r()}t.exports=N}).call(this,zt!==void 0?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var o=e(1);function r(){}var i={},s=["REJECTED"],c=["FULFILLED"],p=["PENDING"];function m(d){if(typeof d!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,d!==r&&N(this,d)}function _(d,y,$){this.promise=d,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof $=="function"&&(this.onRejected=$,this.callRejected=this.otherCallRejected)}function C(d,y,$){o(function(){var T;try{T=y($)}catch(D){return i.reject(d,D)}T===d?i.reject(d,new TypeError("Cannot resolve promise with itself")):i.resolve(d,T)})}function M(d){var y=d&&d.then;if(d&&(typeof d=="object"||typeof d=="function")&&typeof y=="function")return function(){y.apply(d,arguments)}}function N(d,y){var $=!1;function T(O){$||($=!0,i.reject(d,O))}function D(O){$||($=!0,i.resolve(d,O))}function B(){y(D,T)}var j=I(B);j.status==="error"&&T(j.value)}function I(d,y){var $={};try{$.value=d(y),$.status="success"}catch(T){$.status="error",$.value=T}return $}function S(d){return d instanceof this?d:i.resolve(new this(r),d)}function u(d){var y=new this(r);return i.reject(y,d)}function g(d){var y=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=d.length,T=!1;if(!$)return this.resolve([]);for(var D=new Array($),B=0,j=-1,O=new this(r);++j<$;)F(d[j],j);return O;function F(lt,Q){function nt(Y){D[Q]=Y,++B!==$||T||(T=!0,i.resolve(O,D))}y.resolve(lt).then(nt,function(Y){T||(T=!0,i.reject(O,Y))})}}function f(d){var y=this;if(Object.prototype.toString.call(d)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=d.length,T=!1;if(!$)return this.resolve([]);for(var D=-1,B=new this(r);++D<$;)j(d[D]);return B;function j(O){y.resolve(O).then(function(F){T||(T=!0,i.resolve(B,F))},function(F){T||(T=!0,i.reject(B,F))})}}t.exports=m,m.prototype.catch=function(d){return this.then(null,d)},m.prototype.then=function(d,y){if(typeof d!="function"&&this.state===c||typeof y!="function"&&this.state===s)return this;var $=new this.constructor(r);return this.state!==p?C($,this.state===c?d:y,this.outcome):this.queue.push(new _($,d,y)),$},_.prototype.callFulfilled=function(d){i.resolve(this.promise,d)},_.prototype.otherCallFulfilled=function(d){C(this.promise,this.onFulfilled,d)},_.prototype.callRejected=function(d){i.reject(this.promise,d)},_.prototype.otherCallRejected=function(d){C(this.promise,this.onRejected,d)},i.resolve=function(d,y){var $=I(M,y);if($.status==="error")return i.reject(d,$.value);var T=$.value;if(T)N(d,T);else{d.state=c,d.outcome=y;for(var D=-1,B=d.queue.length;++D<B;)d.queue[D].callFulfilled(y)}return d},i.reject=function(d,y){d.state=s,d.outcome=y;for(var $=-1,T=d.queue.length;++$<T;)d.queue[$].callRejected(y);return d},m.resolve=S,m.reject=u,m.all=g,m.race=f},{1:1}],3:[function(e,t,n){(function(o){typeof o.Promise!="function"&&(o.Promise=e(2))}).call(this,zt!==void 0?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function r(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function i(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var s=i();function c(){try{if(!s||!s.open)return!1;var a=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),l=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||l)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function p(a,l){a=a||[],l=l||{};try{return new Blob(a,l)}catch(v){if(v.name!=="TypeError")throw v;for(var h=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),w=0;w<a.length;w+=1)h.append(a[w]);return h.getBlob(l.type)}}typeof Promise>"u"&&e(3);var m=Promise;function _(a,l){l&&a.then(function(h){l(null,h)},function(h){l(h)})}function C(a,l,h){typeof l=="function"&&a.then(l),typeof h=="function"&&a.catch(h)}function M(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="local-forage-detect-blob-support",S=void 0,u={},g=Object.prototype.toString,f="readonly",d="readwrite";function y(a){for(var l=a.length,h=new ArrayBuffer(l),w=new Uint8Array(h),v=0;v<l;v++)w[v]=a.charCodeAt(v);return h}function $(a){return new m(function(l){var h=a.transaction(I,d),w=p([""]);h.objectStore(I).put(w,"key"),h.onabort=function(v){v.preventDefault(),v.stopPropagation(),l(!1)},h.oncomplete=function(){var v=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);l(b||!v||parseInt(v[1],10)>=43)}}).catch(function(){return!1})}function T(a){return typeof S=="boolean"?m.resolve(S):$(a).then(function(l){return S=l})}function D(a){var l=u[a.name],h={};h.promise=new m(function(w,v){h.resolve=w,h.reject=v}),l.deferredOperations.push(h),l.dbReady?l.dbReady=l.dbReady.then(function(){return h.promise}):l.dbReady=h.promise}function B(a){var l=u[a.name].deferredOperations.pop();if(l)return l.resolve(),l.promise}function j(a,l){var h=u[a.name].deferredOperations.pop();if(h)return h.reject(l),h.promise}function O(a,l){return new m(function(h,w){if(u[a.name]=u[a.name]||jn(),a.db){if(!l)return h(a.db);D(a),a.db.close()}var v=[a.name];l&&v.push(a.version);var b=s.open.apply(s,v);l&&(b.onupgradeneeded=function(E){var k=b.result;try{k.createObjectStore(a.storeName),E.oldVersion<=1&&k.createObjectStore(I)}catch(R){if(R.name!=="ConstraintError")throw R;console.warn('The database "'+a.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),b.onerror=function(E){E.preventDefault(),w(b.error)},b.onsuccess=function(){var E=b.result;E.onversionchange=function(k){k.target.close()},h(E),B(a)}})}function F(a){return O(a,!1)}function lt(a){return O(a,!0)}function Q(a,l){if(!a.db)return!0;var h=!a.db.objectStoreNames.contains(a.storeName),w=a.version<a.db.version,v=a.version>a.db.version;if(w&&(a.version!==l&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),v||h){if(h){var b=a.db.version+1;b>a.version&&(a.version=b)}return!0}return!1}function nt(a){return new m(function(l,h){var w=new FileReader;w.onerror=h,w.onloadend=function(v){var b=btoa(v.target.result||"");l({__local_forage_encoded_blob:!0,data:b,type:a.type})},w.readAsBinaryString(a)})}function Y(a){return p([y(atob(a.data))],{type:a.type})}function gt(a){return a&&a.__local_forage_encoded_blob}function ne(a){var l=this,h=l._initReady().then(function(){var w=u[l._dbInfo.name];if(w&&w.dbReady)return w.dbReady});return C(h,a,a),h}function Be(a){D(a);for(var l=u[a.name],h=l.forages,w=0;w<h.length;w++){var v=h[w];v._dbInfo.db&&(v._dbInfo.db.close(),v._dbInfo.db=null)}return a.db=null,F(a).then(function(b){return a.db=b,Q(a)?lt(a):b}).then(function(b){a.db=l.db=b;for(var E=0;E<h.length;E++)h[E]._dbInfo.db=b}).catch(function(b){throw j(a,b),b})}function pt(a,l,h,w){w===void 0&&(w=1);try{var v=a.db.transaction(a.storeName,l);h(null,v)}catch(b){if(w>0&&(!a.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return m.resolve().then(function(){if(!a.db||b.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),lt(a)}).then(function(){return Be(a).then(function(){pt(a,l,h,w-1)})}).catch(h);h(b)}}function jn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function mr(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=a[w];var v=u[h.name];v||(v=jn(),u[h.name]=v),v.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=ne);var b=[];function E(){return m.resolve()}for(var k=0;k<v.forages.length;k++){var R=v.forages[k];R!==l&&b.push(R._initReady().catch(E))}var P=v.forages.slice(0);return m.all(b).then(function(){return h.db=v.db,F(h)}).then(function(z){return h.db=z,Q(h,l._defaultConfig.version)?lt(h):z}).then(function(z){h.db=v.db=z,l._dbInfo=h;for(var A=0;A<P.length;A++){var U=P[A];U!==l&&(U._dbInfo.db=h.db,U._dbInfo.version=h.version)}})}function vr(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){pt(h._dbInfo,f,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName).get(a);R.onsuccess=function(){var P=R.result;P===void 0&&(P=null),gt(P)&&(P=Y(P)),v(P)},R.onerror=function(){b(R.error)}}catch(P){b(P)}})}).catch(b)});return _(w,l),w}function yr(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){pt(h._dbInfo,f,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName).openCursor(),P=1;R.onsuccess=function(){var z=R.result;if(z){var A=z.value;gt(A)&&(A=Y(A));var U=a(A,z.key,P++);U!==void 0?v(U):z.continue()}else v()},R.onerror=function(){b(R.error)}}catch(z){b(z)}})}).catch(b)});return _(w,l),w}function wr(a,l,h){var w=this;a=M(a);var v=new m(function(b,E){var k;w.ready().then(function(){return k=w._dbInfo,g.call(l)==="[object Blob]"?T(k.db).then(function(R){return R?l:nt(l)}):l}).then(function(R){pt(w._dbInfo,d,function(P,z){if(P)return E(P);try{var A=z.objectStore(w._dbInfo.storeName);R===null&&(R=void 0);var U=A.put(R,a);z.oncomplete=function(){R===void 0&&(R=null),b(R)},z.onabort=z.onerror=function(){var H=U.error?U.error:U.transaction.error;E(H)}}catch(H){E(H)}})}).catch(E)});return _(v,h),v}function br(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){pt(h._dbInfo,d,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName).delete(a);k.oncomplete=function(){v()},k.onerror=function(){b(R.error)},k.onabort=function(){var P=R.error?R.error:R.transaction.error;b(P)}}catch(P){b(P)}})}).catch(b)});return _(w,l),w}function _r(a){var l=this,h=new m(function(w,v){l.ready().then(function(){pt(l._dbInfo,d,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).clear();E.oncomplete=function(){w()},E.onabort=E.onerror=function(){var R=k.error?k.error:k.transaction.error;v(R)}}catch(R){v(R)}})}).catch(v)});return _(h,a),h}function Sr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){pt(l._dbInfo,f,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).count();k.onsuccess=function(){w(k.result)},k.onerror=function(){v(k.error)}}catch(R){v(R)}})}).catch(v)});return _(h,a),h}function Cr(a,l){var h=this,w=new m(function(v,b){a<0?v(null):h.ready().then(function(){pt(h._dbInfo,f,function(E,k){if(E)return b(E);try{var R=k.objectStore(h._dbInfo.storeName),P=!1,z=R.openKeyCursor();z.onsuccess=function(){var A=z.result;A?a===0||P?v(A.key):(P=!0,A.advance(a)):v(null)},z.onerror=function(){b(z.error)}}catch(A){b(A)}})}).catch(b)});return _(w,l),w}function Er(a){var l=this,h=new m(function(w,v){l.ready().then(function(){pt(l._dbInfo,f,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).openKeyCursor(),R=[];k.onsuccess=function(){var P=k.result;P?(R.push(P.key),P.continue()):w(R)},k.onerror=function(){v(k.error)}}catch(P){v(P)}})}).catch(v)});return _(h,a),h}function xr(a,l){l=N.apply(this,arguments);var h=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||h.name,a.storeName=a.storeName||h.storeName);var w,v=this;if(a.name){var b=a.name===h.name&&v._dbInfo.db?m.resolve(v._dbInfo.db):F(a).then(function(E){var k=u[a.name],R=k.forages;k.db=E;for(var P=0;P<R.length;P++)R[P]._dbInfo.db=E;return E});w=a.storeName?b.then(function(E){if(E.objectStoreNames.contains(a.storeName)){var k=E.version+1;D(a);var R=u[a.name],P=R.forages;E.close();for(var z=0;z<P.length;z++){var A=P[z];A._dbInfo.db=null,A._dbInfo.version=k}var U=new m(function(H,W){var Z=s.open(a.name,k);Z.onerror=function(mt){Z.result.close(),W(mt)},Z.onupgradeneeded=function(){Z.result.deleteObjectStore(a.storeName)},Z.onsuccess=function(){var mt=Z.result;mt.close(),H(mt)}});return U.then(function(H){R.db=H;for(var W=0;W<P.length;W++){var Z=P[W];Z._dbInfo.db=H,B(Z._dbInfo)}}).catch(function(H){throw(j(a,H)||m.resolve()).catch(function(){}),H})}}):b.then(function(E){D(a);var k=u[a.name],R=k.forages;E.close();for(var P=0;P<R.length;P++)R[P]._dbInfo.db=null;var z=new m(function(A,U){var H=s.deleteDatabase(a.name);H.onerror=function(){var W=H.result;W&&W.close(),U(H.error)},H.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},H.onsuccess=function(){var W=H.result;W&&W.close(),A(W)}});return z.then(function(A){k.db=A;for(var U=0;U<R.length;U++)B(R[U]._dbInfo)}).catch(function(A){throw(j(a,A)||m.resolve()).catch(function(){}),A})})}else w=m.reject("Invalid arguments");return _(w,l),w}var kr={_driver:"asyncStorage",_initStorage:mr,_support:c(),iterate:yr,getItem:vr,setItem:wr,removeItem:br,clear:_r,length:Sr,key:Cr,keys:Er,dropInstance:xr};function Ir(){return typeof openDatabase=="function"}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tr="~~local_forage_type~",Hn=/^~~local_forage_type~([^~]+)~/,oe="__lfsc__:",Ue=oe.length,Oe="arbf",je="blob",Wn="si08",Fn="ui08",qn="uic8",Gn="si16",Xn="si32",Vn="ur16",Kn="ui32",Jn="fl32",Yn="fl64",Zn=Ue+Oe.length,Qn=Object.prototype.toString;function to(a){var l,h,w,v,b,E=.75*a.length,k=a.length,R=0;a[a.length-1]==="="&&(E--,a[a.length-2]==="="&&E--);var P=new ArrayBuffer(E),z=new Uint8Array(P);for(l=0;l<k;l+=4)h=_t.indexOf(a[l]),w=_t.indexOf(a[l+1]),v=_t.indexOf(a[l+2]),b=_t.indexOf(a[l+3]),z[R++]=h<<2|w>>4,z[R++]=(15&w)<<4|v>>2,z[R++]=(3&v)<<6|63&b;return P}function He(a){var l,h=new Uint8Array(a),w="";for(l=0;l<h.length;l+=3)w+=_t[h[l]>>2],w+=_t[(3&h[l])<<4|h[l+1]>>4],w+=_t[(15&h[l+1])<<2|h[l+2]>>6],w+=_t[63&h[l+2]];return h.length%3==2?w=w.substring(0,w.length-1)+"=":h.length%3==1&&(w=w.substring(0,w.length-2)+"=="),w}function Rr(a,l){var h="";if(a&&(h=Qn.call(a)),a&&(h==="[object ArrayBuffer]"||a.buffer&&Qn.call(a.buffer)==="[object ArrayBuffer]")){var w,v=oe;a instanceof ArrayBuffer?(w=a,v+=Oe):(w=a.buffer,h==="[object Int8Array]"?v+=Wn:h==="[object Uint8Array]"?v+=Fn:h==="[object Uint8ClampedArray]"?v+=qn:h==="[object Int16Array]"?v+=Gn:h==="[object Uint16Array]"?v+=Vn:h==="[object Int32Array]"?v+=Xn:h==="[object Uint32Array]"?v+=Kn:h==="[object Float32Array]"?v+=Jn:h==="[object Float64Array]"?v+=Yn:l(new Error("Failed to get type for BinaryArray"))),l(v+He(w))}else if(h==="[object Blob]"){var b=new FileReader;b.onload=function(){var E=Tr+a.type+"~"+He(this.result);l(oe+je+E)},b.readAsArrayBuffer(a)}else try{l(JSON.stringify(a))}catch(E){console.error("Couldn't convert value into a JSON string: ",a),l(null,E)}}function Pr(a){if(a.substring(0,Ue)!==oe)return JSON.parse(a);var l,h=a.substring(Zn),w=a.substring(Ue,Zn);if(w===je&&Hn.test(h)){var v=h.match(Hn);l=v[1],h=h.substring(v[0].length)}var b=to(h);switch(w){case Oe:return b;case je:return p([b],{type:l});case Wn:return new Int8Array(b);case Fn:return new Uint8Array(b);case qn:return new Uint8ClampedArray(b);case Gn:return new Int16Array(b);case Vn:return new Uint16Array(b);case Xn:return new Int32Array(b);case Kn:return new Uint32Array(b);case Jn:return new Float32Array(b);case Yn:return new Float64Array(b);default:throw new Error("Unkown type: "+w)}}var We={serialize:Rr,deserialize:Pr,stringToBuffer:to,bufferToString:He};function eo(a,l,h,w){a.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],h,w)}function zr(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=typeof a[w]!="string"?a[w].toString():a[w];var v=new m(function(b,E){try{h.db=openDatabase(h.name,String(h.version),h.description,h.size)}catch(k){return E(k)}h.db.transaction(function(k){eo(k,h,function(){l._dbInfo=h,b()},function(R,P){E(P)})},E)});return h.serializer=We,v}function St(a,l,h,w,v,b){a.executeSql(h,w,v,function(E,k){k.code===k.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(R,P){P.rows.length?b(R,k):eo(R,l,function(){R.executeSql(h,w,v,b)},b)},b):b(E,k)},b)}function Dr(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[a],function(R,P){var z=P.rows.length?P.rows.item(0).value:null;z&&(z=E.serializer.deserialize(z)),v(z)},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function Mr(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"SELECT * FROM "+E.storeName,[],function(R,P){for(var z=P.rows,A=z.length,U=0;U<A;U++){var H=z.item(U),W=H.value;if(W&&(W=E.serializer.deserialize(W)),(W=a(W,H.key,U+1))!==void 0)return void v(W)}v()},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function no(a,l,h,w){var v=this;a=M(a);var b=new m(function(E,k){v.ready().then(function(){l===void 0&&(l=null);var R=l,P=v._dbInfo;P.serializer.serialize(l,function(z,A){A?k(A):P.db.transaction(function(U){St(U,P,"INSERT OR REPLACE INTO "+P.storeName+" (key, value) VALUES (?, ?)",[a,z],function(){E(R)},function(H,W){k(W)})},function(U){if(U.code===U.QUOTA_ERR){if(w>0)return void E(no.apply(v,[a,R,h,w-1]));k(U)}})})}).catch(k)});return _(b,h),b}function $r(a,l,h){return no.apply(this,[a,l,h,1])}function Ar(a,l){var h=this;a=M(a);var w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[a],function(){v()},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function Lr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){St(E,b,"DELETE FROM "+b.storeName,[],function(){w()},function(k,R){v(R)})})}).catch(v)});return _(h,a),h}function Nr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){St(E,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(k,R){var P=R.rows.item(0).c;w(P)},function(k,R){v(R)})})}).catch(v)});return _(h,a),h}function Br(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){St(k,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[a+1],function(R,P){var z=P.rows.length?P.rows.item(0).key:null;v(z)},function(R,P){b(P)})})}).catch(b)});return _(w,l),w}function Ur(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){St(E,b,"SELECT key FROM "+b.storeName,[],function(k,R){for(var P=[],z=0;z<R.rows.length;z++)P.push(R.rows.item(z).key);w(P)},function(k,R){v(R)})})}).catch(v)});return _(h,a),h}function Or(a){return new m(function(l,h){a.transaction(function(w){w.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(v,b){for(var E=[],k=0;k<b.rows.length;k++)E.push(b.rows.item(k).name);l({db:a,storeNames:E})},function(v,b){h(b)})},function(w){h(w)})})}function jr(a,l){l=N.apply(this,arguments);var h=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||h.name,a.storeName=a.storeName||h.storeName);var w,v=this;return w=a.name?new m(function(b){var E;E=a.name===h.name?v._dbInfo.db:openDatabase(a.name,"","",0),a.storeName?b({db:E,storeNames:[a.storeName]}):b(Or(E))}).then(function(b){return new m(function(E,k){b.db.transaction(function(R){function P(H){return new m(function(W,Z){R.executeSql("DROP TABLE IF EXISTS "+H,[],function(){W()},function(mt,Ge){Z(Ge)})})}for(var z=[],A=0,U=b.storeNames.length;A<U;A++)z.push(P(b.storeNames[A]));m.all(z).then(function(){E()}).catch(function(H){k(H)})},function(R){k(R)})})}):m.reject("Invalid arguments"),_(w,l),w}var Hr={_driver:"webSQLStorage",_initStorage:zr,_support:Ir(),iterate:Mr,getItem:Dr,setItem:$r,removeItem:Ar,clear:Lr,length:Nr,key:Br,keys:Ur,dropInstance:jr};function Wr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function oo(a,l){var h=a.name+"/";return a.storeName!==l.storeName&&(h+=a.storeName+"/"),h}function Fr(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function qr(){return!Fr()||localStorage.length>0}function Gr(a){var l=this,h={};if(a)for(var w in a)h[w]=a[w];return h.keyPrefix=oo(a,l._defaultConfig),qr()?(l._dbInfo=h,h.serializer=We,m.resolve()):m.reject()}function Xr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo.keyPrefix,v=localStorage.length-1;v>=0;v--){var b=localStorage.key(v);b.indexOf(w)===0&&localStorage.removeItem(b)}});return _(h,a),h}function Vr(a,l){var h=this;a=M(a);var w=h.ready().then(function(){var v=h._dbInfo,b=localStorage.getItem(v.keyPrefix+a);return b&&(b=v.serializer.deserialize(b)),b});return _(w,l),w}function Kr(a,l){var h=this,w=h.ready().then(function(){for(var v=h._dbInfo,b=v.keyPrefix,E=b.length,k=localStorage.length,R=1,P=0;P<k;P++){var z=localStorage.key(P);if(z.indexOf(b)===0){var A=localStorage.getItem(z);if(A&&(A=v.serializer.deserialize(A)),(A=a(A,z.substring(E),R++))!==void 0)return A}}});return _(w,l),w}function Jr(a,l){var h=this,w=h.ready().then(function(){var v,b=h._dbInfo;try{v=localStorage.key(a)}catch{v=null}return v&&(v=v.substring(b.keyPrefix.length)),v});return _(w,l),w}function Yr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo,v=localStorage.length,b=[],E=0;E<v;E++){var k=localStorage.key(E);k.indexOf(w.keyPrefix)===0&&b.push(k.substring(w.keyPrefix.length))}return b});return _(h,a),h}function Zr(a){var l=this.keys().then(function(h){return h.length});return _(l,a),l}function Qr(a,l){var h=this;a=M(a);var w=h.ready().then(function(){var v=h._dbInfo;localStorage.removeItem(v.keyPrefix+a)});return _(w,l),w}function ti(a,l,h){var w=this;a=M(a);var v=w.ready().then(function(){l===void 0&&(l=null);var b=l;return new m(function(E,k){var R=w._dbInfo;R.serializer.serialize(l,function(P,z){if(z)k(z);else try{localStorage.setItem(R.keyPrefix+a,P),E(b)}catch(A){A.name!=="QuotaExceededError"&&A.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(A),k(A)}})})});return _(v,h),v}function ei(a,l){if(l=N.apply(this,arguments),!(a=typeof a!="function"&&a||{}).name){var h=this.config();a.name=a.name||h.name,a.storeName=a.storeName||h.storeName}var w,v=this;return w=a.name?new m(function(b){a.storeName?b(oo(a,v._defaultConfig)):b(a.name+"/")}).then(function(b){for(var E=localStorage.length-1;E>=0;E--){var k=localStorage.key(E);k.indexOf(b)===0&&localStorage.removeItem(k)}}):m.reject("Invalid arguments"),_(w,l),w}var ni={_driver:"localStorageWrapper",_initStorage:Gr,_support:Wr(),iterate:Kr,getItem:Vr,setItem:ti,removeItem:Qr,clear:Xr,length:Zr,key:Jr,keys:Yr,dropInstance:ei},oi=function(a,l){return a===l||typeof a=="number"&&typeof l=="number"&&isNaN(a)&&isNaN(l)},ri=function(a,l){for(var h=a.length,w=0;w<h;){if(oi(a[w],l))return!0;w++}return!1},ro=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},Wt={},io={},Nt={INDEXEDDB:kr,WEBSQL:Hr,LOCALSTORAGE:ni},ii=[Nt.INDEXEDDB._driver,Nt.WEBSQL._driver,Nt.LOCALSTORAGE._driver],re=["dropInstance"],Fe=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(re),si={description:"",driver:ii.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ai(a,l){a[l]=function(){var h=arguments;return a.ready().then(function(){return a[l].apply(a,h)})}}function qe(){for(var a=1;a<arguments.length;a++){var l=arguments[a];if(l)for(var h in l)l.hasOwnProperty(h)&&(ro(l[h])?arguments[0][h]=l[h].slice():arguments[0][h]=l[h])}return arguments[0]}var ci=function(){function a(l){for(var h in r(this,a),Nt)if(Nt.hasOwnProperty(h)){var w=Nt[h],v=w._driver;this[h]=v,Wt[v]||this.defineDriver(w)}this._defaultConfig=qe({},si),this._config=qe({},this._defaultConfig,l),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(l){if((l===void 0?"undefined":o(l))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var h in l){if(h==="storeName"&&(l[h]=l[h].replace(/\W/g,"_")),h==="version"&&typeof l[h]!="number")return new Error("Database version must be a number.");this._config[h]=l[h]}return!("driver"in l)||!l.driver||this.setDriver(this._config.driver)}return typeof l=="string"?this._config[l]:this._config},a.prototype.defineDriver=function(l,h,w){var v=new m(function(b,E){try{var k=l._driver,R=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!l._driver)return void E(R);for(var P=Fe.concat("_initStorage"),z=0,A=P.length;z<A;z++){var U=P[z];if((!ri(re,U)||l[U])&&typeof l[U]!="function")return void E(R)}var H=function(){for(var Z=function(hi){return function(){var ui=new Error("Method "+hi+" is not implemented by the current driver"),so=m.reject(ui);return _(so,arguments[arguments.length-1]),so}},mt=0,Ge=re.length;mt<Ge;mt++){var Xe=re[mt];l[Xe]||(l[Xe]=Z(Xe))}};H();var W=function(Z){Wt[k]&&console.info("Redefining LocalForage driver: "+k),Wt[k]=l,io[k]=Z,b()};"_support"in l?l._support&&typeof l._support=="function"?l._support().then(W,E):W(!!l._support):W(!0)}catch(Z){E(Z)}});return C(v,h,w),v},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(l,h,w){var v=Wt[l]?m.resolve(Wt[l]):m.reject(new Error("Driver not found."));return C(v,h,w),v},a.prototype.getSerializer=function(l){var h=m.resolve(We);return C(h,l),h},a.prototype.ready=function(l){var h=this,w=h._driverSet.then(function(){return h._ready===null&&(h._ready=h._initDriver()),h._ready});return C(w,l,l),w},a.prototype.setDriver=function(l,h,w){var v=this;ro(l)||(l=[l]);var b=this._getSupportedDrivers(l);function E(){v._config.driver=v.driver()}function k(z){return v._extend(z),E(),v._ready=v._initStorage(v._config),v._ready}function R(z){return function(){var A=0;function U(){for(;A<z.length;){var H=z[A];return A++,v._dbInfo=null,v._ready=null,v.getDriver(H).then(k).catch(U)}E();var W=new Error("No available storage method found.");return v._driverSet=m.reject(W),v._driverSet}return U()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=P.then(function(){var z=b[0];return v._dbInfo=null,v._ready=null,v.getDriver(z).then(function(A){v._driver=A._driver,E(),v._wrapLibraryMethodsWithReady(),v._initDriver=R(b)})}).catch(function(){E();var z=new Error("No available storage method found.");return v._driverSet=m.reject(z),v._driverSet}),C(this._driverSet,h,w),this._driverSet},a.prototype.supports=function(l){return!!io[l]},a.prototype._extend=function(l){qe(this,l)},a.prototype._getSupportedDrivers=function(l){for(var h=[],w=0,v=l.length;w<v;w++){var b=l[w];this.supports(b)&&h.push(b)}return h},a.prototype._wrapLibraryMethodsWithReady=function(){for(var l=0,h=Fe.length;l<h;l++)ai(this,Fe[l])},a.prototype.createInstance=function(l){return new a(l)},a}(),li=new ci;t.exports=li},{3:3}]},{},[4])(4);var ge=wn,bn={},$s={get exports(){return bn},set exports(e){bn=e}};/*! streamsaver. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */(function(e){((t,n)=>{e.exports=n()})(0,()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,o=!1;const r=t.WebStreamsPolyfill||{},i=t.isSecureContext;let s=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const c=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",p={createWriteStream:function(_,C,M){let N={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,S=null,u=null,g=null;if(Number.isFinite(C)?([M,C]=[C,M],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=M,N.writableStrategy=C):C&&C.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=M,N.writableStrategy=C):N=C||{},!s){n||(n=i?m(p.mitm):function($){const T="width=200,height=100",D=document.createDocumentFragment(),B={frame:t.open($,"popup",T),loaded:!1,isIframe:!1,isPopup:!0,remove(){B.frame.close()},addEventListener(...O){D.addEventListener(...O)},dispatchEvent(...O){D.dispatchEvent(...O)},removeEventListener(...O){D.removeEventListener(...O)},postMessage(...O){B.frame.postMessage(...O)}},j=O=>{O.source===B.frame&&(B.loaded=!0,t.removeEventListener("message",j),B.dispatchEvent(new Event("load")))};return t.addEventListener("message",j),B}(p.mitm)),u=new MessageChannel,_=encodeURIComponent(_.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const d={transferringReadable:o,pathname:N.pathname||Math.random().toString().slice(-6)+"/"+_,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+_}};N.size&&(d.headers["Content-Length"]=N.size);const y=[d,"*",[u.port2]];if(o){const $=c==="iframe"?void 0:{transform(D,B){if(!(D instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");I+=D.length,B.enqueue(D),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};g=new p.TransformStream($,N.writableStrategy,N.readableStrategy);const T=g.readable;u.port1.postMessage({readableStream:T},[T])}u.port1.onmessage=$=>{$.data.download?c==="navigate"?(n.remove(),n=null,I?location.href=$.data.download:S=$.data.download):(n.isPopup&&(n.remove(),n=null,c==="iframe"&&m(p.mitm)),m($.data.download)):$.data.abort&&(f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...y):n.addEventListener("load",()=>{n.postMessage(...y)},{once:!0})}let f=[];return!s&&g&&g.writable||new p.WritableStream({write(d){if(!(d instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?f.push(d):(u.port1.postMessage(d),I+=d.length,S&&(location.href=S,S=null))},close(){if(s){const d=new Blob(f,{type:"application/octet-stream; charset=utf-8"}),y=document.createElement("a");y.href=URL.createObjectURL(d),y.download=_,y.click()}else u.port1.postMessage("end")},abort(){f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},N.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function m(_){if(!_)throw new Error("meh");const C=document.createElement("iframe");return C.hidden=!0,C.src=_,C.loaded=!1,C.name="iframe",C.isIframe=!0,C.postMessage=(...M)=>C.contentWindow.postMessage(...M),C.addEventListener("load",()=>{C.loaded=!0},{once:!0}),document.body.appendChild(C),C}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(_=>{try{_()}catch{}})(()=>{const{readable:_}=new TransformStream,C=new MessageChannel;C.port1.postMessage(_,[_]),C.port1.close(),C.port2.close(),o=!0,Object.defineProperty(p,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),p})})($s);var As=bn;class Ls{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(t,n,o=3,r=6,i=6e4){this.fileID=t,this.downloadURL=n,this.chunkByteSize=o*this.ChunkUnitM,this.eventTarget=ln(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(t,n){this.eventTarget.on(t,n)}dispatch(t,n){this.eventTarget.emit(t,n)}dispatchError(t){this.eventTarget.emit("error",t)}dispatchInfo(t){this.eventTarget.emit("info",t)}async queryDownloadFileMeta(t,n="",o){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await wt(n,t,o);let i=null;return r&&r.status===200&&(i=r.data),i}async getIFileMeta(){if(this.fileMetaData===null){const t=await this.currentDB?.getItem("fileinfo");this.fileMetaData=t||null}return this.fileMetaData}initIndexDB(){this.currentDB=ge.createInstance({name:this.fileID,driver:ge.INDEXEDDB})}async init(t){if(this.finishNum=0,t){const n="fileinfo";this.fileMetaData={id:t.id,name:t.name,length:t.length,downloadID:t.downloadID,chunkSize:this.chunkByteSize},this.fileName=t.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),ge.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(t){return new Promise(n=>setTimeout(n,t))}async download(t,n){let o=t;if(!o&&this.downloadURL&&(o=this.downloadURL),!o)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const r=L.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let s=0;const c=this.cacheSize;let p=0;for(let m=0;m<this.totalChunks;m++){if(this.keys&&this.keys?.indexOf(m.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const _=m*this.chunkByteSize;let C=_+this.chunkByteSize-1;this.fileMetaData&&C>this.fileMetaData.length&&(C=this.fileMetaData.length-1);const M={range:`bytes=${_}-${C}`};for(;p>=c;)await this.sleep(200);const N=m.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${m+1}/${this.totalChunks}`),p++,wt(o,n,i,M,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async I=>{const S=I.data;p--,await this.currentDB?.setItem(N,S),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const u=parseInt(N)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(I=>{p--;const S=parseInt(N)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${S}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const t=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",t)}outputProgress(t){const n=100*t/this.totalChunks;this.dispatch("saveProgress",n)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const t=As.createWriteStream(this.fileName).getWriter();let n=0;for(let o=0;o<this.totalChunks;o++){const r=o.toString();let i=await this.currentDB?.getItem(r);if(i||(i=await this.currentDB?.getItem(r)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${o+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let s=new Response(i).body;if(s===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${o+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const c=s.getReader();for(;;){const{done:p,value:m}=await c.read();if(p)break;await t.write(m)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}t.close(),ge.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function Ns(e,t){let n="",o="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o}function Lo(e={},t={}){let n;for(n in t)Pt(t[n])?e[n]=Lo(e[n],t[n]):e[n]=t[n];return e}function Bs(e,t){const n=`${e}_${t}`;return ut.MD5(n)}function No(e){const t=function(c){if(!c)return;const p=c,m=[];if(p)for(let _ of p){const C=Bo(_);C&&m.push(C)}return m}(e.bussinessRoutes),n=function(c){if(!c)return;const p=c;if(p&&p.length>0){const m=[];return p.forEach(_=>{const C=Uo(_);C&&m.push(C)}),m}}(e.widgetMenuConfig),o=function(c){if(c&&c.length>0){const p=[];return c.forEach(m=>{const _=function(C){return C?{id:C.id,label:C.label,container:C.container,preload:C.preload,afterid:C.afterid,bindid:C.bindid,group:C.group}:void 0}(m);_&&p.push(_)}),p}}(e.widgetConfig),r=function(c){if(c&&c.length>0)return c}(e.functionList),i=e.pkgObject.version,s=e.pkgObject.name;return{id:Bs(s,i),name:L.Config.UI.SiteTitle,group:L.Config.UI.Group,product:s,version:i,routes:t,widgetMenu:n,widgets:o,functions:r}}function Bo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const o=[];for(let r of e.children){const i=Bo(r);i&&o.push(i)}o.length>0&&(n.children=o)}return n}}function Uo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach(n=>{const o=Uo(n);o&&t.children?.push(o)})),t}function Us(e,t="IconifyList.ts"){let n="",o=`const iconlist={
1
+ import{h as di,openBlock as G,createElementBlock as rt,normalizeStyle as It,renderSlot as tt,reactive as io,computed as Et,defineComponent as Ft,ref as dt,onMounted as Xe,onUpdated as pi,nextTick as Ve,normalizeClass as fi,createElementVNode as it,createCommentVNode as xt,createVNode as so,Transition as ao,withCtx as re,withModifiers as co,getCurrentInstance as gi,watch as qt,onBeforeUnmount as mi,resolveComponent as lo,createBlock as yt,withDirectives as vi,Fragment as Tt,createTextVNode as ho,toDisplayString as yi,vShow as wi,markRaw as bi,toRefs as _i,renderList as Bt,resolveDynamicComponent as Rt}from"vue";import Si from"axios";import Ci from"qs";import{Client as Ei,ClientContext as Ke}from"@hprose/rpc-core";import{ByteStream as uo}from"@hprose/io";import{HttpTransport as xi}from"@hprose/rpc-html5";var ki={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((o,r)=>(o.size=r===t?o.max:o.min,r!==t&&(n+=o.min),o)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t])},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),100*e/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(e),r),o);let s=[t,t+1],c=this.panes[s[0]]||null,d=this.panes[s[1]]||null;const m=c.max<100&&i>=c.max+n.prevPanesSize,S=d.max<100&&i<=100-(d.max+this.sumNextPanesSize(t+1));if(m||S)m?(c.size=c.max,d.size=Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,0)):(c.size=Math.max(100-d.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),d.size=d.max);else{if(this.pushOtherPanes){const C=this.doPushOtherPanes(n,i);if(!C)return;({sums:n,panesToResize:s}=C),c=this.panes[s[0]]||null,d=this.panes[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),d!==null&&(d.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,d.min),d.max))}},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((r,i)=>{i>o[0]&&i<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,i)=>{i>0&&i<=n&&(r.size=r.min,e.prevReachedMinPanes+=r.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((r,i)=>{i>n&&i<o[1]&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,i)=>{i<this.panesCount-1&&i>=n+1&&(r.size=r.min,e.nextReachedMinPanes+=r.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");if(!t&&!n)return e.parentNode.removeChild(e),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(e,t,n=!1){const o=e-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=i=>this.onMouseDown(i,o),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=i=>this.onMouseDown(i,o)),r.onclick=i=>this.onSplitterClick(i,o+1)),this.dblClickSplitter&&(r.ondblclick=i=>this.onSplitterDblClick(i,o+1)),t.parentNode.insertBefore(r,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([o,r])=>n[o]=r)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&t++,r===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((r,i)=>r.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,r)=>o.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(e={}){e.addedPane||e.removedPane?this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],o=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(e,r.max),r.min),t-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&o.push(r.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(i=>{e-=i.size,i.size!==null&&o++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)});let r=100;e>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(e/(this.panesCount-o),i.max),i.min)),r-=i.size}),r>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e}={}){let t=100/this.panesCount,n=0;const o=[],r=[];e&&e.givenSize!==null&&(t=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{n-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(i=>{e&&e.givenSize!==null&&e.id===i.id||(i.size=Math.max(Math.min(t,i.max),i.min)),n-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),n>.1&&this.readjustSizes(n,o,r))},readjustSizes(e,t,n){let o;o=e>0?e/(this.panesCount-t.length):e/(this.panesCount-n.length),this.panes.forEach(r=>{if(e>0&&!t.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;e-=s,r.size=i}else if(!n.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;e-=s,r.size=i}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return di("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},Je={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};Je.render=function(e,t,n,o,r,i){return G(),rt("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=s=>i.onPaneClick(s,e._.uid)),style:It(e.style)},[tt(e.$slots,"default")],4)},Je.__file="src/controls/splitpanes/pane.vue";const Ii=Object.prototype.toString;function st(e,t){return Ii.call(e)===`[object ${t}]`}function ie(e){return st(e,"Function")}const po=e=>typeof e<"u",Ye=e=>!po(e);function Ze(e){return e===null}function Ti(e){return Ye(e)&&Ze(e)}function Ri(e){return Ye(e)||Ze(e)}const Pt=e=>e!=null&&e!==null&&st(e,"Object");function Pi(e){return st(e,"Date")}function zi(e){return st(e,"Number")}function $i(e){return st(e,"AsyncFunction")}function Di(e){return st(e,"Promise")&&Pt(e)&&ie(e.then)&&ie(e.catch)}function se(e){return st(e,"String")}function Mi(e){return e===!0||e===!1||st(e,"Boolean")}function Qe(e){return e&&Array.isArray(e)}const Ai=()=>typeof window<"u",Li=e=>typeof window<"u"&&st(e,"Window"),Ni=e=>Pt(e)&&!!e.tagName,Bi=typeof window>"u";function Ui(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function Oi(e){return e==null||(se(e)||Qe(e)?e.length===0:!!Pt(e)&&JSON.stringify(e)==="{}")}function ji(e){return st(e,"Error")}function Wi(e){return st(e,"WeakSet")}function Hi(e){return st(e,"WeakMap")}function Fi(e){return st(e,"Symbol")}function qi(e){return st(e,"Map")}const Gi=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e);var zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xi={exports:{}},tn=ae(Xi.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(_,u){var g=_[0],f=_[1],p=_[2],y=_[3];f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&p|~f&y)+u[0]-680876936|0)<<7|g>>>25)+f|0)&f|~g&p)+u[1]-389564586|0)<<12|y>>>20)+g|0)&g|~y&f)+u[2]+606105819|0)<<17|p>>>15)+y|0)&y|~p&g)+u[3]-1044525330|0)<<22|f>>>10)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&p|~f&y)+u[4]-176418897|0)<<7|g>>>25)+f|0)&f|~g&p)+u[5]+1200080426|0)<<12|y>>>20)+g|0)&g|~y&f)+u[6]-1473231341|0)<<17|p>>>15)+y|0)&y|~p&g)+u[7]-45705983|0)<<22|f>>>10)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&p|~f&y)+u[8]+1770035416|0)<<7|g>>>25)+f|0)&f|~g&p)+u[9]-1958414417|0)<<12|y>>>20)+g|0)&g|~y&f)+u[10]-42063|0)<<17|p>>>15)+y|0)&y|~p&g)+u[11]-1990404162|0)<<22|f>>>10)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&p|~f&y)+u[12]+1804603682|0)<<7|g>>>25)+f|0)&f|~g&p)+u[13]-40341101|0)<<12|y>>>20)+g|0)&g|~y&f)+u[14]-1502002290|0)<<17|p>>>15)+y|0)&y|~p&g)+u[15]+1236535329|0)<<22|f>>>10)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&y|p&~y)+u[1]-165796510|0)<<5|g>>>27)+f|0)&p|f&~p)+u[6]-1069501632|0)<<9|y>>>23)+g|0)&f|g&~f)+u[11]+643717713|0)<<14|p>>>18)+y|0)&g|y&~g)+u[0]-373897302|0)<<20|f>>>12)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&y|p&~y)+u[5]-701558691|0)<<5|g>>>27)+f|0)&p|f&~p)+u[10]+38016083|0)<<9|y>>>23)+g|0)&f|g&~f)+u[15]-660478335|0)<<14|p>>>18)+y|0)&g|y&~g)+u[4]-405537848|0)<<20|f>>>12)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&y|p&~y)+u[9]+568446438|0)<<5|g>>>27)+f|0)&p|f&~p)+u[14]-1019803690|0)<<9|y>>>23)+g|0)&f|g&~f)+u[3]-187363961|0)<<14|p>>>18)+y|0)&g|y&~g)+u[8]+1163531501|0)<<20|f>>>12)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f&y|p&~y)+u[13]-1444681467|0)<<5|g>>>27)+f|0)&p|f&~p)+u[2]-51403784|0)<<9|y>>>23)+g|0)&f|g&~f)+u[7]+1735328473|0)<<14|p>>>18)+y|0)&g|y&~g)+u[12]-1926607734|0)<<20|f>>>12)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f^p^y)+u[5]-378558|0)<<4|g>>>28)+f|0)^f^p)+u[8]-2022574463|0)<<11|y>>>21)+g|0)^g^f)+u[11]+1839030562|0)<<16|p>>>16)+y|0)^y^g)+u[14]-35309556|0)<<23|f>>>9)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f^p^y)+u[1]-1530992060|0)<<4|g>>>28)+f|0)^f^p)+u[4]+1272893353|0)<<11|y>>>21)+g|0)^g^f)+u[7]-155497632|0)<<16|p>>>16)+y|0)^y^g)+u[10]-1094730640|0)<<23|f>>>9)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f^p^y)+u[13]+681279174|0)<<4|g>>>28)+f|0)^f^p)+u[0]-358537222|0)<<11|y>>>21)+g|0)^g^f)+u[3]-722521979|0)<<16|p>>>16)+y|0)^y^g)+u[6]+76029189|0)<<23|f>>>9)+p|0,f=((f+=((p=((p+=((y=((y+=((g=((g+=(f^p^y)+u[9]-640364487|0)<<4|g>>>28)+f|0)^f^p)+u[12]-421815835|0)<<11|y>>>21)+g|0)^g^f)+u[15]+530742520|0)<<16|p>>>16)+y|0)^y^g)+u[2]-995338651|0)<<23|f>>>9)+p|0,f=((f+=((y=((y+=(f^((g=((g+=(p^(f|~y))+u[0]-198630844|0)<<6|g>>>26)+f|0)|~p))+u[7]+1126891415|0)<<10|y>>>22)+g|0)^((p=((p+=(g^(y|~f))+u[14]-1416354905|0)<<15|p>>>17)+y|0)|~g))+u[5]-57434055|0)<<21|f>>>11)+p|0,f=((f+=((y=((y+=(f^((g=((g+=(p^(f|~y))+u[12]+1700485571|0)<<6|g>>>26)+f|0)|~p))+u[3]-1894986606|0)<<10|y>>>22)+g|0)^((p=((p+=(g^(y|~f))+u[10]-1051523|0)<<15|p>>>17)+y|0)|~g))+u[1]-2054922799|0)<<21|f>>>11)+p|0,f=((f+=((y=((y+=(f^((g=((g+=(p^(f|~y))+u[8]+1873313359|0)<<6|g>>>26)+f|0)|~p))+u[15]-30611744|0)<<10|y>>>22)+g|0)^((p=((p+=(g^(y|~f))+u[6]-1560198380|0)<<15|p>>>17)+y|0)|~g))+u[13]+1309151649|0)<<21|f>>>11)+p|0,f=((f+=((y=((y+=(f^((g=((g+=(p^(f|~y))+u[4]-145523070|0)<<6|g>>>26)+f|0)|~p))+u[11]-1120210379|0)<<10|y>>>22)+g|0)^((p=((p+=(g^(y|~f))+u[2]+718787259|0)<<15|p>>>17)+y|0)|~g))+u[9]-343485551|0)<<21|f>>>11)+p|0,_[0]=g+_[0]|0,_[1]=f+_[1]|0,_[2]=p+_[2]|0,_[3]=y+_[3]|0}function o(_){var u,g=[];for(u=0;u<64;u+=4)g[u>>2]=_.charCodeAt(u)+(_.charCodeAt(u+1)<<8)+(_.charCodeAt(u+2)<<16)+(_.charCodeAt(u+3)<<24);return g}function r(_){var u,g=[];for(u=0;u<64;u+=4)g[u>>2]=_[u]+(_[u+1]<<8)+(_[u+2]<<16)+(_[u+3]<<24);return g}function i(_){var u,g,f,p,y,M,I=_.length,$=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n($,o(_.substring(u-64,u)));for(g=(_=_.substring(u-64)).length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<g;u+=1)f[u>>2]|=_.charCodeAt(u)<<(u%4<<3);if(f[u>>2]|=128<<(u%4<<3),u>55)for(n($,f),u=0;u<16;u+=1)f[u]=0;return p=(p=8*I).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(p[2],16),M=parseInt(p[1],16)||0,f[14]=y,f[15]=M,n($,f),$}function s(_){var u,g,f,p,y,M,I=_.length,$=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n($,r(_.subarray(u-64,u)));for(g=(_=u-64<I?_.subarray(u-64):new Uint8Array(0)).length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<g;u+=1)f[u>>2]|=_[u]<<(u%4<<3);if(f[u>>2]|=128<<(u%4<<3),u>55)for(n($,f),u=0;u<16;u+=1)f[u]=0;return p=(p=8*I).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(p[2],16),M=parseInt(p[1],16)||0,f[14]=y,f[15]=M,n($,f),$}function c(_){var u,g="";for(u=0;u<4;u+=1)g+=t[_>>8*u+4&15]+t[_>>8*u&15];return g}function d(_){var u;for(u=0;u<_.length;u+=1)_[u]=c(_[u]);return _.join("")}function m(_){return/[\u0080-\uFFFF]/.test(_)&&(_=unescape(encodeURIComponent(_))),_}function S(_,u){var g,f=_.length,p=new ArrayBuffer(f),y=new Uint8Array(p);for(g=0;g<f;g+=1)y[g]=_.charCodeAt(g);return u?y:p}function C(_){return String.fromCharCode.apply(null,new Uint8Array(_))}function D(_,u,g){var f=new Uint8Array(_.byteLength+u.byteLength);return f.set(new Uint8Array(_)),f.set(new Uint8Array(u),_.byteLength),g?f:f.buffer}function N(_){var u,g=[],f=_.length;for(u=0;u<f-1;u+=2)g.push(parseInt(_.substr(u,2),16));return String.fromCharCode.apply(String,g)}function R(){this.reset()}return d(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function _(u,g){return(u=0|u||0)<0?Math.max(u+g,0):Math.min(u,g)}ArrayBuffer.prototype.slice=function(u,g){var f,p,y,M,I=this.byteLength,$=_(u,I),B=I;return g!==e&&(B=_(g,I)),$>B?new ArrayBuffer(0):(f=B-$,p=new ArrayBuffer(f),y=new Uint8Array(p),M=new Uint8Array(this,$,f),y.set(M),p)}}(),R.prototype.append=function(_){return this.appendBinary(m(_)),this},R.prototype.appendBinary=function(_){this._buff+=_,this._length+=_.length;var u,g=this._buff.length;for(u=64;u<=g;u+=64)n(this._hash,o(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},R.prototype.end=function(_){var u,g,f=this._buff,p=f.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<p;u+=1)y[u>>2]|=f.charCodeAt(u)<<(u%4<<3);return this._finish(y,p),g=d(this._hash),_&&(g=N(g)),this.reset(),g},R.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},R.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},R.prototype.setState=function(_){return this._buff=_.buff,this._length=_.length,this._hash=_.hash,this},R.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},R.prototype._finish=function(_,u){var g,f,p,y=u;if(_[y>>2]|=128<<(y%4<<3),y>55)for(n(this._hash,_),y=0;y<16;y+=1)_[y]=0;g=(g=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(g[2],16),p=parseInt(g[1],16)||0,_[14]=f,_[15]=p,n(this._hash,_)},R.hash=function(_,u){return R.hashBinary(m(_),u)},R.hashBinary=function(_,u){var g=d(i(_));return u?N(g):g},R.ArrayBuffer=function(){this.reset()},R.ArrayBuffer.prototype.append=function(_){var u,g=D(this._buff.buffer,_,!0),f=g.length;for(this._length+=_.byteLength,u=64;u<=f;u+=64)n(this._hash,r(g.subarray(u-64,u)));return this._buff=u-64<f?new Uint8Array(g.buffer.slice(u-64)):new Uint8Array(0),this},R.ArrayBuffer.prototype.end=function(_){var u,g,f=this._buff,p=f.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<p;u+=1)y[u>>2]|=f[u]<<(u%4<<3);return this._finish(y,p),g=d(this._hash),_&&(g=N(g)),this.reset(),g},R.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},R.ArrayBuffer.prototype.getState=function(){var _=R.prototype.getState.call(this);return _.buff=C(_.buff),_},R.ArrayBuffer.prototype.setState=function(_){return _.buff=S(_.buff,!0),R.prototype.setState.call(this,_)},R.ArrayBuffer.prototype.destroy=R.prototype.destroy,R.ArrayBuffer.prototype._finish=R.prototype._finish,R.ArrayBuffer.hash=function(_,u){var g=d(s(new Uint8Array(_)));return u?N(g):g},R}());const en=[];class ut{static addHandler(t,n,o){t.addEventListener?t.addEventListener(n,o,!1):t.attachEvent?t.attachEvent("on"+n,o):t["on"+n]=o}static removeHandler(t,n,o){t.removeEventListener?t.removeEventListener(n,o,!1):t.detachEvent?t.detachEvent("on"+n,o):delete t["on"+n]}static windowResizeHandler(t){ut.addHandler(window,"resize",t)}static offWindowResizeHandler(t){ut.removeHandler(window,"resize",t)}static fullscreenEnabled(){const t=window.document;return document.fullscreenEnabled||window.fullScreen||t.mozFullscreenEnabled||t.webkitIsFullScreen}static fullScreen(t,n){if(n){const o=window.document;let r=window.document.exitFullscreen||o.msExitFullscreen||o.mozCancelFullScreen||o.webkitCancelFullScreen;typeof r<"u"&&r?r.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let o=t;o||(o=window.document.documentElement);let r=o.requestFullScreen||o.webkitRequestFullScreen||o.mozRequestFullScreen||o.msRequestFullScreen;typeof r<"u"&&r?r.call(o):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(t=window.document.documentElement){let n=t;var o=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(o)o.call(n);else if(typeof window.ActiveXObject<"u"){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const t=window.document;var n=document.exitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen||t.webkitExitFullscreen;if(n)n.call(document);else if(typeof window.ActiveXObject<"u"){var o=new window.ActiveXObject("WScript.Shell");o!==null&&o.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!ut.fullScreenElement()}static onFullScreenChanged(t){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const o=ut.isFullScreen();t(o)}):document.addEventListener("MSFullscreenChange",function(){const o=ut.isFullScreen();t(o)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(en.indexOf(n)!==-1)return;en.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,ut.stringifyCircularHandler);return en.length=0,n}static jsonParse(t){const n=ut.jsonStringify(t);if(n.length>1)return JSON.parse(n)}static getObjectURL(t){let n;const o=window;return o.createObjcectURL!=null?n=o.createOjcectURL(t):window.URL!=null?n=window.URL.createObjectURL(t):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(t)),n}static getFileShortMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,c=new tn.ArrayBuffer,d=new FileReader;d.onload=function(m){c.append(m.target?.result);const S=c.end();n({isOK:!0,data:S})},d.onerror=function(){const m="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(m),n({isOK:!1,data:m})},function(){const m=0+s>=i.size?i.size:0+s;d.readAsArrayBuffer(r.call(i,0,m))}()}static getFileMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,c=Math.ceil(i.size/s);let d=0;const m=new tn.ArrayBuffer,S=new FileReader;function C(){const D=d*s,N=D+s>=i.size?i.size:D+s;S.readAsArrayBuffer(r.call(i,D,N))}S.onload=function(D){if(m.append(D.target?.result),d++,d<c)C();else{const N=m.end();n({isOK:!0,data:N})}},S.onerror=function(){const D=`${i.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(D),n({isOK:!1,data:D})},C()}static MD5(t,n=!1){return tn.hash(t,n)}static copyTextByCommand(t){return new Promise((n,o)=>{const r=document.createElement("input");r.value=t,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}static copyText=t=>navigator.clipboard?navigator.clipboard.writeText(t).then(function(){return!0},function(n){return!1}):ut.copyTextByCommand(t);static copyElementTextByCommand(t){const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(n);try{return document.execCommand("copy"),o.removeRange(n),!0}catch(r){return o.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(t){if(!navigator.clipboard)return ut.copyElementTextByCommand(t);const n=document.createRange();n.selectNode(document.getElementById(t));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(n),navigator.clipboard.writeText(o).then(function(){return o.removeRange(n),!0},function(r){return o.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(t){ut.toggleClass(t,"grayMode",document.documentElement)}static toggleClass(t,n,o){const r=o||document.body;let{className:i}=r;i=i.replace(n,""),r.className=t?`${i} ${n} `:i}static setCssVar(t,n,o=document.documentElement){o.style.setProperty(t,n)}static dispatchWindowResize(){const t=new Event("resize");window.dispatchEvent(t)}static dispatchElementEvent(t,n="click",o){let r;if(r=se(t)?document.getElementById(t):t,r){const i=new Event(n,{bubbles:!0,cancelable:!0});o&&r.addEventListener("ev",s=>{o(s)},!1),r.dispatchEvent(i)}}}class ce{static isNullOrEmpty=t=>t===null||t===""||t===void 0||t.length===0;static isNotEmpty=t=>!(t===null||t===""||t===void 0||t.length===0);static toHump(t){return t.replace(/[\-\/\_](\w)/g,(n,o)=>o.toUpperCase()).replace("views","")}}class le{prefixKey;storage;constructor(t="",n=localStorage){this.prefixKey=t,this.storage=n}getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,n,o=604800){const r=JSON.stringify({value:n,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(t),r)}get(t,n=null){const o=this.storage.getItem(this.getKey(t));if(o)try{const r=JSON.parse(o),{value:i,expire:s}=r;if(s===null||s>=Date.now())return i;this.remove(this.getKey(t))}catch{return n}return n}getJsonObject(t){const n=this.storage.getItem(this.getKey(t));if(n)try{const o=JSON.parse(n);if(o.expire===null||o.expire>=Date.now())return o;this.remove(this.getKey(t))}catch{return}}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,n,o=604800){document.cookie=`${this.getKey(t)}=${n}; Max-Age=${o}`}getCookie(t){const n=document.cookie.split("; ");for(let o=0,r=n.length;o<r;o++){const i=n[o].split("=");if(i[0]===this.getKey(t))return i[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let n=t.length;n--;)document.cookie=t[n]+"=0;expire="+new Date(0).toUTCString()}}const Vi=new le("",localStorage);function he(){let e=[];const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());e[n]=t.substring(r,r+1)}e[14]="4";const o=3&Number(e[19])|8;return e[19]=t.substring(o,o+1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}function Ki(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t}function Ji(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),r=Math.floor(n*parseInt(t[1])+255*(1-n)),i=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)}function Yi(e){var t=e.toLowerCase();if(ue(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const i=t.slice(o,o+1);n+=i.concat(i)}t=n}var r=[];for(o=1;o<7;o+=2)r.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+r.join(",")+")"}return t}function Zi(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const r=t.slice(n,n+1);o+=r.concat(r)}return o}return t}var $t;function Qi(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?$t.Hex:t==="r"||t==="("?$t.RGBA:t==="h"?$t.Hsla:$t.RGBA}function ts(e){if(e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t){var n,o,r,i=(parseFloat(t[1])%360+360)%360/360,s=parseFloat(t[2])/(/%$/.test(t[2])?100:1),c=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(s===0)n=o=r=c;else{var d=c<=.5?c*(s+1):c+s-c*s,m=2*c-d;n=nn(m,d,i+1/3),o=nn(m,d,i),r=nn(m,d,i-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${r=Math.round(255*r)},${t[4]?parseFloat(t[4]):1})`}}}function nn(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 ue(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function es(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function on(e){let t=e.toLowerCase();if(ue(e)){if(t.length===4){let o="#";for(let r=1;r<4;r+=1)o+=t.slice(r,r+1).concat(t.slice(r,r+1));t=o}const n=[];for(let o=1;o<7;o+=2)n.push(parseInt("0x"+t.slice(o,o+2)));return"RGB("+n.join(",")+")"}return t}function ns(e){if(!ue(e))return;const[t,n,o]=on(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*o<192}function os(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${sn(e.substring(0,2),t)}${sn(e.substring(2,4),t)}${sn(e.substring(4,6),t)}`}function rs(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${rn(e.substring(0,2),t)}${rn(e.substring(2,4),t)}${rn(e.substring(4,6),t)}`}function rn(e,t){const n=parseInt(e,16)+t,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function fo(e,t,n){const o=[e,t,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}function is(e){return function(t,n){return(fo(~~t[0],~~t[1],~~t[2])+.05)/(fo(n[0],n[1],n[2])+.05)}(on(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function sn(e,t){const n=parseInt(e,16)-t,o=n<0?0:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function an(e){return{all:e=e||new Map,on(t,n){const o=e?.get(t);o&&o.push(n)||e?.set(t,[n])},off(t,n){const o=e?.get(t);o&&o.splice(o.indexOf(n)>>>0,1)},emit(t,n){(e?.get(t)||[]).slice().map(o=>{o(n)}),(e?.get("*")||[]).slice().map(o=>{o(t,n)})}}}(function(e){e[e.RGBA=0]="RGBA",e[e.Hex=1]="Hex",e[e.Hsla=2]="Hsla"})($t||($t={}));const Ut=an(),ht={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},de=(e,t)=>{const n=document.createElement("a");n.download=t,n.style.display="none";const o=new Blob([e],{type:"application/octet-stream"});n.href=URL.createObjectURL(o),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function ss(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),r=document.createElement("a");r.href=n.createObjectURL(o),r.download=t,r.click(),n.revokeObjectURL(r.href)}const go=(e,t)=>{const n=JSON.stringify(e,null,2);t?de(n,t+".json"):Ut.emit(ht.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},as=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){de(o.data,n)}).catch(o=>{console.warn(o),Ut.emit(ht.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function mo(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function cs({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((r,i)=>{if(o){const s=document.createElement("a");if(s.href=e,s.target=t,s.download!==void 0&&(s.download=n||mo(e)),document.createEvent){const c=document.createEvent("MouseEvents");return c.initEvent("click",!0,!0),s.dispatchEvent(c),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const s=document.createElement("canvas"),c=document.createElement("img");c.setAttribute("crossOrigin","Anonymous"),c.src=e,c.onload=d=>{s.width=c.width,s.height=c.height,s.getContext("2d").drawImage(c,0,0,c.width,c.height),s.toBlob(m=>{if(m){const S=document.createElement("a");S.href=window.URL.createObjectURL(m),S.download=mo(e),S.click(),URL.revokeObjectURL(S.href),r(!0)}},"image/jpeg")},c.onerror=d=>i(d)}})}function ls(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${vo}\u6BEB\u79D2`)}function vo(e){return new Promise(t=>setTimeout(t,e))}var yo,wo,cn,bo={exports:{}};wo=zt,cn=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function r(R,_){var u=R[_];if(typeof u.bind=="function")return u.bind(R);try{return Function.prototype.bind.call(u,R)}catch{return function(){return Function.prototype.apply.apply(u,[R,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(R){return R==="debug"&&(R="log"),typeof console!==t&&(R==="trace"&&n?i:console[R]!==void 0?r(console,R):console.log!==void 0?r(console,"log"):e)}function c(R,_){for(var u=0;u<o.length;u++){var g=o[u];this[g]=u<R?e:this.methodFactory(g,R,_)}this.log=this.debug}function d(R,_,u){return function(){typeof console!==t&&(c.call(this,_,u),this[R].apply(this,arguments))}}function m(R,_,u){return s(R)||d.apply(this,arguments)}function S(R,_,u){var g,f=this;_=_??"WARN";var p="loglevel";function y(){var I;if(typeof window!==t&&p){try{I=window.localStorage[p]}catch{}if(typeof I===t)try{var $=window.document.cookie,B=$.indexOf(encodeURIComponent(p)+"=");B!==-1&&(I=/^([^;]+)/.exec($.slice(B))[1])}catch{}return f.levels[I]===void 0&&(I=void 0),I}}typeof R=="string"?p+=":"+R:typeof R=="symbol"&&(p=void 0),f.name=R,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=u||m,f.getLevel=function(){return g},f.setLevel=function(I,$){if(typeof I=="string"&&f.levels[I.toUpperCase()]!==void 0&&(I=f.levels[I.toUpperCase()]),!(typeof I=="number"&&I>=0&&I<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+I;if(g=I,$!==!1&&function(B){var j=(o[B]||"silent").toUpperCase();if(typeof window!==t&&p){try{return void(window.localStorage[p]=j)}catch{}try{window.document.cookie=encodeURIComponent(p)+"="+j+";"}catch{}}}(I),c.call(f,I,R),typeof console===t&&I<f.levels.SILENT)return"No console available for logging"},f.setDefaultLevel=function(I){_=I,y()||f.setLevel(I,!1)},f.resetLevel=function(){f.setLevel(_,!1),function(){if(typeof window!==t&&p){try{return void window.localStorage.removeItem(p)}catch{}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},f.enableAll=function(I){f.setLevel(f.levels.TRACE,I)},f.disableAll=function(I){f.setLevel(f.levels.SILENT,I)};var M=y();M==null&&(M=_),f.setLevel(M,!1)}var C=new S,D={};C.getLogger=function(R){if(typeof R!="symbol"&&typeof R!="string"||R==="")throw new TypeError("You must supply a name when creating a logger.");var _=D[R];return _||(_=D[R]=new S(R,C.getLevel(),C.methodFactory)),_};var N=typeof window!==t?window.log:void 0;return C.noConflict=function(){return typeof window!==t&&window.log===C&&(window.log=N),C},C.getLoggers=function(){return D},C.default=C,C},(yo=bo).exports?yo.exports=cn():wo.log=cn();var ln=bo.exports;let _o=!1;const L={Config:SysConfig,EventBus:Ut,DefaultProxyClient:null,Axios:Si,Logger:e=>{_o||(import.meta.env?.DEV||SysConfig.UI.ProductLog?ln.enableAll():ln.setDefaultLevel("warn"),_o=!0);const t=e||"default";return ln.getLogger(t)}},So="access_token",wt=new le("user",localStorage);function Dt(){return wt.get(So)}function hn(){wt.remove(So)}function Co(){return Dt()?.refresh}function un(e,t,n,o="json",r){const i={baseURL:L.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(s){return Ci.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Dt()?.token},responseType:o,cancelToken:r};if(n)for(let s in n)i.headers[s]=n[s];return L.SystemID&&(i.headers.sysid=L.SystemID,L.SystemGroup&&(i.headers.sysgroup=L.SystemGroup)),t&&(i.baseURL=t),i}function bt(e,t,n,o,r="json",i,s){const c=un(n,t,o,r,i);return s&&s>=2e4&&(c.timeout=s),L.Axios?.get(e,c).catch(function(d){pe(d,t,e,"Get")})}function pe(e,t,n,o="Get"){const r=`${t}${n}`;if(e&&e.response){let i=!1;const s=e.response.status;switch(s){case 400:e.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:e.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:e.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:e.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:e.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:e.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const d=e.response.data;if(d){const m=d.indexOf(":"),S=d.indexOf(`
2
+ `);if(m>0&&S-m>2){const C=d.substring(m+2,S);C.indexOf("System.Exception")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(i=!0,e.message=C)}else i=!0,e.message=d}else e.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:e.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:e.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:e.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:e.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:e.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:e.message=`\u8FDE\u63A5\u9519\u8BEF${e.response.status}`}let c={address:r,code:s,isExceptionInfo:i,message:e.message,result:e.response.data};if(L.EventBus.emit(ht.AxiosRequestErrorEvent,c),i)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Eo(e,t,n,o,r,i="json",s){const c=un(o,t,r,i);s&&s>=2e4&&(c.timeout=s),c.headers["Content-Type"]="multipart/form-data";const d=function(m){let S=new FormData;return m&&Object.keys(m).forEach(C=>{if(!m)return;let D=m[C];D!=null&&(Qe(D)?D.forEach(N=>{S.append(C,ko(N))}):S.append(C,ko(D)))}),S}(n);return L.Axios?.post(e,d,c).catch(function(m){pe(m,t,e,"Post")})}function xo(e,t,n,o,r,i="json",s){const c=un(o,t,r,i);return s&&s>=2e4&&(c.timeout=s),L.Axios?.post(e,n,c).catch(function(d){pe(d,t,e,"Post")})}function hs(e,t){return bt(e,void 0,t)}function us(e,t){return Eo(e,void 0,t)}function ds(e,t){return L.Axios?.get(e,{params:t}).catch(function(n){pe(n,e,"","\u5916\u90E8Get")})}function ko(e){return e instanceof Blob?e:e.toString()}var dn={exports:{}},ps=typeof window<"u"?window:zt!==void 0?zt:typeof self<"u"?self:{},fs=function(e){if(!e)return!1;var t=gs.call(e);return t==="[object Function]"||typeof e=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},gs=Object.prototype.toString,pn=function(e){return e.replace(/^\s+|\s+$/g,"")},ms=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)vs.call(n,o)&&(e[o]=n[o])}return e},vs=Object.prototype.hasOwnProperty,Io=ps,ys=fs,ws=function(e){if(!e)return{};for(var t,n={},o=pn(e).split(`
3
+ `),r=0;r<o.length;r++){var i=o[r],s=i.indexOf(":"),c=pn(i.slice(0,s)).toLowerCase(),d=pn(i.slice(s+1));n[c]===void 0?n[c]=d:(t=n[c],Object.prototype.toString.call(t)==="[object Array]"?n[c].push(d):n[c]=[n[c],d])}return n},bs=ms;function To(e,t,n){var o=e;return ys(t)?(n=t,typeof e=="string"&&(o={uri:e})):o=bs(t,{uri:e}),o.callback=n,o}function _t(e,t,n){return Ro(t=To(e,t,n))}function Ro(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(g,f,p){t||(t=!0,e.callback(g,f,p))};function o(){var g=void 0;if(g=d.response?d.response:d.responseText||function(f){try{if(f.responseType==="document")return f.responseXML;var p=f.responseXML&&f.responseXML.documentElement.nodeName==="parsererror";if(f.responseType===""&&!p)return f.responseXML}catch{}return null}(d),_)try{g=JSON.parse(g)}catch{}return g}function r(g){return clearTimeout(m),g instanceof Error||(g=new Error(""+(g||"Unknown XMLHttpRequest Error"))),g.statusCode=0,n(g,u)}function i(){if(!c){var g;clearTimeout(m),g=e.useXDR&&d.status===void 0?200:d.status===1223?204:d.status;var f=u,p=null;return g!==0?(f={body:o(),statusCode:g,method:C,headers:{},url:S,rawRequest:d},d.getAllResponseHeaders&&(f.headers=ws(d.getAllResponseHeaders()))):p=new Error("Internal XMLHttpRequest Error"),n(p,f,f.body)}}var s,c,d=e.xhr||null;d||(d=e.cors||e.useXDR?new _t.XDomainRequest:new _t.XMLHttpRequest);var m,S=d.url=e.uri||e.url,C=d.method=e.method||"GET",D=e.body||e.data,N=d.headers=e.headers||{},R=!!e.sync,_=!1,u={body:void 0,headers:{},statusCode:0,method:C,url:S,rawRequest:d};if("json"in e&&e.json!==!1&&(_=!0,N.accept||N.Accept||(N.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(N["content-type"]||N["Content-Type"]||(N["Content-Type"]="application/json"),D=JSON.stringify(e.json===!0?D:e.json))),d.onreadystatechange=function(){d.readyState===4&&setTimeout(i,0)},d.onload=i,d.onerror=r,d.onprogress=function(){},d.onabort=function(){c=!0},d.ontimeout=r,d.open(C,S,!R,e.username,e.password),R||(d.withCredentials=!!e.withCredentials),!R&&e.timeout>0&&(m=setTimeout(function(){if(!c){c=!0,d.abort("timeout");var g=new Error("XMLHttpRequest timeout");g.code="ETIMEDOUT",r(g)}},e.timeout)),d.setRequestHeader)for(s in N)N.hasOwnProperty(s)&&d.setRequestHeader(s,N[s]);else if(e.headers&&!function(g){for(var f in g)if(g.hasOwnProperty(f))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(d.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(d),d.send(D||null),d}dn.exports=_t,dn.exports.default=_t,_t.XMLHttpRequest=Io.XMLHttpRequest||function(){},_t.XDomainRequest="withCredentials"in new _t.XMLHttpRequest?_t.XMLHttpRequest:Io.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){_t[e==="delete"?"del":e]=function(t,n,o){return(n=To(t,n,o)).method=e.toUpperCase(),Ro(n)}});var _s=ae(dn.exports);const Ss=[200,201,202,204,308],Cs=[408,502,503,504];class Po{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(t){this.endpoint=t.endpoint,this.file=t.file,this.fileName=encodeURI(this.file.name),this.headers=t.headers||{},this.method=t.method||"PUT",this.chunkSize=t.chunkSize||5120,this.attempts=t.attempts||5,this.delayBeforeAttempt=t.delayBeforeAttempt||1,this.md5=t.md5||"",this.maxFileBytes=1024*(t.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=an(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{this.offline&&(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(t,n){this.eventTarget.on(t,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(t,n){this.eventTarget.emit(t,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(t=>(this.endpointValue=t,this.endpointValue))}getChunk(){return new Promise(t=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,o=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),t(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(o,o+n))})}xhrPromise(t){const n=o=>{o.upload.onprogress=r=>{const i=100/this.totalChunks,s=i*this.file.size,c=i*this.chunkCount,d=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(c+d,100))}};return new Promise((o,r)=>{this.currentXhr=_s({...t,beforeSend:n},(i,s)=>(this.currentXhr=void 0,i?r(i):o(s)))})}sendChunk(){if(!this.chunk)return;const t=this.chunkCount*this.chunkByteSize,n=t+this.chunk.size-1,o={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${t}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:o,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){console.log(this.paused,this.offline,this.success,"sendChunks this.paused || this.offline || this.success"),!(this.paused||this.offline||this.success)&&this.getChunk().then(()=>this.sendChunk()).then(t=>{if(this.attemptCount=this.attemptCount+1,t!=null&&Ss.includes(t.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:t}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(t!=null&&Cs.includes(t.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;console.log(`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`),this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${t?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(t=>{this.paused||this.offline||this.manageRetries()})}}const Es=e=>new Po(e),xs=new class{hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}addClass(e,t){this.hasClass(e,t)||(e.className+=" "+t)}removeClass(e,t){if(this.hasClass(e,t)){const n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}toggleClass(e,t){this.hasClass(e,t)?this.removeClass(e,t):this.addClass(e,t)}setCSSProperty(e,t,n){e?.style.setProperty(t,n)}};class te{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!ce.isNullOrEmpty(t)){if(te.httpTransport||(te.httpTransport=new xi),this.client=new Ei(t),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=t,this.init()}}init(){this.client&&this.client.useServiceAsync().then(t=>{this.hproseProxy=t}).catch(t=>{String(t).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):Ut.emit(ht.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(t)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(t){console.warn(t),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(t,n,o){if(this.client)return await this.client.invoke(t,n,o)}encode(t,n,o){if(this.client)return this.client.codec.encode(t,n,o)}decode(t,n){if(this.client)return this.client.codec.decode(t,n)}}class Gt{hproseClient;hpProxyObj;defaultContext=new Ke;constructor(t){this.hproseClient=new te(t),this.hpProxyObj=null}getClientContext(t,n){const o={};n&&(o.requestHeaders=n);const r=Dt();o.httpRequestHeaders=t||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),L.SystemID&&(i.sysid=L.SystemID,L.SystemGroup&&(i.sysgroup=L.SystemGroup)),new Ke(o)}async getHproseProxy(){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");if(!this.hpProxyObj){const t=await this.hproseClient.getProxy();this.hpProxyObj=t}return this.hpProxyObj||Ut.emit(ht.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(t,n,o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(t,n,o)}async hproseInvokeContext(t,n,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Dt();return console.log(r,"userToken3"),r&&(n||(n=new Ke({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,o,n)}async hproseInvokeEncode(t){const n=new uo(t).toBytes(),o=await this.hproseClient.client?.request(n,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(t,...n){const o=this.hproseClient.client?.codec?.encode(t,n,this.defaultContext);return uo.toString(o)}}class ks{message;eventBus;constructor(t,n){t&&(this.message=t),n&&(this.eventBus=n)}msg(t,n=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:t,duration:n});else switch(o){case"info":this.message.info(t,n);break;case"success":this.message.success(t,n);break;case"warning":this.message.warn?this.message.warn(t,n):this.message.warning&&this.message.warning(t,n);break;case"error":this.message.error(t,n)}else{switch(o){case"info":case"success":console.log(t);break;case"warning":console.warn(t);break;case"error":o="dark",console.error(t)}this.eventBus&&this.eventBus.emit(ht.AlertInfoEvent,{type:o,info:t})}}info(t,n=3){this.msg(t,n,"info")}warn(t,n=3){this.msg(t,n,"warning")}err(t,n=3){this.msg(t,n,"error")}success(t,n=3){this.msg(t,n,"success")}}const fn=new Map,Is=function(e,t,n){!L.Config.DefaultHproseAPI&&L.Config.ServiceURL&&(L.Config.DefaultHproseAPI=L.Config.ServiceURL.DefaultHproseAPI),L.Config.DefaultHproseAPI&&ce.isNotEmpty(L.Config.DefaultHproseAPI)&&(L.DefaultProxyClient=new Gt(L.Config.DefaultHproseAPI));const o=L.Config.UI.GrayMode;o&&ut.setGrayMode(o);const r=new ks(e,L.EventBus);L.Message=r,L.SystemID=t,L.SystemGroup=n,L.EventBus.on(ht.HproseServiceErrorEvent,i=>{const s=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(ht.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(ht.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),L.EventBus.on(ht.CommonWarnEvent,i=>{r.warn(i)})};function zo(e){if(e&&ce.isNotEmpty(e)){if(fn.has(e))return fn.get(e);{const t=new Gt(e);return fn.set(e,t),t}}}function Ts(e){const t=zo(e);return t&&(L.DefaultProxyClient=t),t}const gn="is_LockScreen",$o=wt.get(gn,!1),Xt={isLock:$o,lockTime:$o=="true"?Mo():0};function Do(e){Xt.isLock=e,wt.set(gn,e,10),e&&(hn(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Rs(){return wt.get(gn,!1)}function Mo(){let e=3600;return L.Config.UI?.LockTime&&L.Config.UI?.LockTime>=10&&(e=L.Config.UI.LockTime),e}let mn;function vn(){clearInterval(mn),!(window.location.href.indexOf("/login")>0||Xt.isLock)&&(Do(!1),Xt.lockTime=Mo(),mn=setInterval(()=>{if(Xt.lockTime--,Xt.lockTime<=0)return Do(!0),clearInterval(mn)},1e3))}function Ps(){vn(),document.addEventListener("mousedown",vn)}function zs(){document.removeEventListener("mousedown",vn)}function yn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $s={exports:{}},fe=ae($s.exports=function e(t,n,o){function r(c,d){if(!n[c]){if(!t[c]){if(!d&&yn)return yn(c);if(i)return i(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var S=n[c]={exports:{}};t[c][0].call(S.exports,function(C){var D=t[c][1][C];return r(D||C)},S,S.exports,e,t,n,o)}return n[c].exports}for(var i=yn,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(e,t,n){(function(o){var r,i,s=o.MutationObserver||o.WebKitMutationObserver;if(s){var c=0,d=new s(D),m=o.document.createTextNode("");d.observe(m,{characterData:!0}),r=function(){m.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)r="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var R=o.document.createElement("script");R.onreadystatechange=function(){D(),R.onreadystatechange=null,R.parentNode.removeChild(R),R=null},o.document.documentElement.appendChild(R)}:function(){setTimeout(D,0)};else{var S=new o.MessageChannel;S.port1.onmessage=D,r=function(){S.port2.postMessage(0)}}var C=[];function D(){var R,_;i=!0;for(var u=C.length;u;){for(_=C,C=[],R=-1;++R<u;)_[R]();u=C.length}i=!1}function N(R){C.push(R)!==1||i||r()}t.exports=N}).call(this,zt!==void 0?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var o=e(1);function r(){}var i={},s=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function m(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,p!==r&&N(this,p)}function S(p,y,M){this.promise=p,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function C(p,y,M){o(function(){var I;try{I=y(M)}catch($){return i.reject(p,$)}I===p?i.reject(p,new TypeError("Cannot resolve promise with itself")):i.resolve(p,I)})}function D(p){var y=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof y=="function")return function(){y.apply(p,arguments)}}function N(p,y){var M=!1;function I(O){M||(M=!0,i.reject(p,O))}function $(O){M||(M=!0,i.resolve(p,O))}function B(){y($,I)}var j=R(B);j.status==="error"&&I(j.value)}function R(p,y){var M={};try{M.value=p(y),M.status="success"}catch(I){M.status="error",M.value=I}return M}function _(p){return p instanceof this?p:i.resolve(new this(r),p)}function u(p){var y=new this(r);return i.reject(y,p)}function g(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=p.length,I=!1;if(!M)return this.resolve([]);for(var $=new Array(M),B=0,j=-1,O=new this(r);++j<M;)F(p[j],j);return O;function F(lt,Q){function ot(Y){$[Q]=Y,++B!==M||I||(I=!0,i.resolve(O,$))}y.resolve(lt).then(ot,function(Y){I||(I=!0,i.reject(O,Y))})}}function f(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=p.length,I=!1;if(!M)return this.resolve([]);for(var $=-1,B=new this(r);++$<M;)j(p[$]);return B;function j(O){y.resolve(O).then(function(F){I||(I=!0,i.resolve(B,F))},function(F){I||(I=!0,i.reject(B,F))})}}t.exports=m,m.prototype.catch=function(p){return this.then(null,p)},m.prototype.then=function(p,y){if(typeof p!="function"&&this.state===c||typeof y!="function"&&this.state===s)return this;var M=new this.constructor(r);return this.state!==d?C(M,this.state===c?p:y,this.outcome):this.queue.push(new S(M,p,y)),M},S.prototype.callFulfilled=function(p){i.resolve(this.promise,p)},S.prototype.otherCallFulfilled=function(p){C(this.promise,this.onFulfilled,p)},S.prototype.callRejected=function(p){i.reject(this.promise,p)},S.prototype.otherCallRejected=function(p){C(this.promise,this.onRejected,p)},i.resolve=function(p,y){var M=R(D,y);if(M.status==="error")return i.reject(p,M.value);var I=M.value;if(I)N(p,I);else{p.state=c,p.outcome=y;for(var $=-1,B=p.queue.length;++$<B;)p.queue[$].callFulfilled(y)}return p},i.reject=function(p,y){p.state=s,p.outcome=y;for(var M=-1,I=p.queue.length;++M<I;)p.queue[M].callRejected(y);return p},m.resolve=_,m.reject=u,m.all=g,m.race=f},{1:1}],3:[function(e,t,n){(function(o){typeof o.Promise!="function"&&(o.Promise=e(2))}).call(this,zt!==void 0?zt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(e,t,n){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function r(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")}function i(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var s=i();function c(){try{if(!s||!s.open)return!1;var a=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),l=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||l)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function d(a,l){a=a||[],l=l||{};try{return new Blob(a,l)}catch(v){if(v.name!=="TypeError")throw v;for(var h=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),w=0;w<a.length;w+=1)h.append(a[w]);return h.getBlob(l.type)}}typeof Promise>"u"&&e(3);var m=Promise;function S(a,l){l&&a.then(function(h){l(null,h)},function(h){l(h)})}function C(a,l,h){typeof l=="function"&&a.then(l),typeof h=="function"&&a.catch(h)}function D(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function N(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var R="local-forage-detect-blob-support",_=void 0,u={},g=Object.prototype.toString,f="readonly",p="readwrite";function y(a){for(var l=a.length,h=new ArrayBuffer(l),w=new Uint8Array(h),v=0;v<l;v++)w[v]=a.charCodeAt(v);return h}function M(a){return new m(function(l){var h=a.transaction(R,p),w=d([""]);h.objectStore(R).put(w,"key"),h.onabort=function(v){v.preventDefault(),v.stopPropagation(),l(!1)},h.oncomplete=function(){var v=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);l(b||!v||parseInt(v[1],10)>=43)}}).catch(function(){return!1})}function I(a){return typeof _=="boolean"?m.resolve(_):M(a).then(function(l){return _=l})}function $(a){var l=u[a.name],h={};h.promise=new m(function(w,v){h.resolve=w,h.reject=v}),l.deferredOperations.push(h),l.dbReady?l.dbReady=l.dbReady.then(function(){return h.promise}):l.dbReady=h.promise}function B(a){var l=u[a.name].deferredOperations.pop();if(l)return l.resolve(),l.promise}function j(a,l){var h=u[a.name].deferredOperations.pop();if(h)return h.reject(l),h.promise}function O(a,l){return new m(function(h,w){if(u[a.name]=u[a.name]||Un(),a.db){if(!l)return h(a.db);$(a),a.db.close()}var v=[a.name];l&&v.push(a.version);var b=s.open.apply(s,v);l&&(b.onupgradeneeded=function(E){var k=b.result;try{k.createObjectStore(a.storeName),E.oldVersion<=1&&k.createObjectStore(R)}catch(T){if(T.name!=="ConstraintError")throw T;console.warn('The database "'+a.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),b.onerror=function(E){E.preventDefault(),w(b.error)},b.onsuccess=function(){var E=b.result;E.onversionchange=function(k){k.target.close()},h(E),B(a)}})}function F(a){return O(a,!1)}function lt(a){return O(a,!0)}function Q(a,l){if(!a.db)return!0;var h=!a.db.objectStoreNames.contains(a.storeName),w=a.version<a.db.version,v=a.version>a.db.version;if(w&&(a.version!==l&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),v||h){if(h){var b=a.db.version+1;b>a.version&&(a.version=b)}return!0}return!1}function ot(a){return new m(function(l,h){var w=new FileReader;w.onerror=h,w.onloadend=function(v){var b=btoa(v.target.result||"");l({__local_forage_encoded_blob:!0,data:b,type:a.type})},w.readAsBinaryString(a)})}function Y(a){return d([y(atob(a.data))],{type:a.type})}function mt(a){return a&&a.__local_forage_encoded_blob}function ee(a){var l=this,h=l._initReady().then(function(){var w=u[l._dbInfo.name];if(w&&w.dbReady)return w.dbReady});return C(h,a,a),h}function Ne(a){$(a);for(var l=u[a.name],h=l.forages,w=0;w<h.length;w++){var v=h[w];v._dbInfo.db&&(v._dbInfo.db.close(),v._dbInfo.db=null)}return a.db=null,F(a).then(function(b){return a.db=b,Q(a)?lt(a):b}).then(function(b){a.db=l.db=b;for(var E=0;E<h.length;E++)h[E]._dbInfo.db=b}).catch(function(b){throw j(a,b),b})}function ft(a,l,h,w){w===void 0&&(w=1);try{var v=a.db.transaction(a.storeName,l);h(null,v)}catch(b){if(w>0&&(!a.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return m.resolve().then(function(){if(!a.db||b.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),lt(a)}).then(function(){return Ne(a).then(function(){ft(a,l,h,w-1)})}).catch(h);h(b)}}function Un(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function mr(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=a[w];var v=u[h.name];v||(v=Un(),u[h.name]=v),v.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=ee);var b=[];function E(){return m.resolve()}for(var k=0;k<v.forages.length;k++){var T=v.forages[k];T!==l&&b.push(T._initReady().catch(E))}var P=v.forages.slice(0);return m.all(b).then(function(){return h.db=v.db,F(h)}).then(function(z){return h.db=z,Q(h,l._defaultConfig.version)?lt(h):z}).then(function(z){h.db=v.db=z,l._dbInfo=h;for(var A=0;A<P.length;A++){var U=P[A];U!==l&&(U._dbInfo.db=h.db,U._dbInfo.version=h.version)}})}function vr(a,l){var h=this;a=D(a);var w=new m(function(v,b){h.ready().then(function(){ft(h._dbInfo,f,function(E,k){if(E)return b(E);try{var T=k.objectStore(h._dbInfo.storeName).get(a);T.onsuccess=function(){var P=T.result;P===void 0&&(P=null),mt(P)&&(P=Y(P)),v(P)},T.onerror=function(){b(T.error)}}catch(P){b(P)}})}).catch(b)});return S(w,l),w}function yr(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){ft(h._dbInfo,f,function(E,k){if(E)return b(E);try{var T=k.objectStore(h._dbInfo.storeName).openCursor(),P=1;T.onsuccess=function(){var z=T.result;if(z){var A=z.value;mt(A)&&(A=Y(A));var U=a(A,z.key,P++);U!==void 0?v(U):z.continue()}else v()},T.onerror=function(){b(T.error)}}catch(z){b(z)}})}).catch(b)});return S(w,l),w}function wr(a,l,h){var w=this;a=D(a);var v=new m(function(b,E){var k;w.ready().then(function(){return k=w._dbInfo,g.call(l)==="[object Blob]"?I(k.db).then(function(T){return T?l:ot(l)}):l}).then(function(T){ft(w._dbInfo,p,function(P,z){if(P)return E(P);try{var A=z.objectStore(w._dbInfo.storeName);T===null&&(T=void 0);var U=A.put(T,a);z.oncomplete=function(){T===void 0&&(T=null),b(T)},z.onabort=z.onerror=function(){var W=U.error?U.error:U.transaction.error;E(W)}}catch(W){E(W)}})}).catch(E)});return S(v,h),v}function br(a,l){var h=this;a=D(a);var w=new m(function(v,b){h.ready().then(function(){ft(h._dbInfo,p,function(E,k){if(E)return b(E);try{var T=k.objectStore(h._dbInfo.storeName).delete(a);k.oncomplete=function(){v()},k.onerror=function(){b(T.error)},k.onabort=function(){var P=T.error?T.error:T.transaction.error;b(P)}}catch(P){b(P)}})}).catch(b)});return S(w,l),w}function _r(a){var l=this,h=new m(function(w,v){l.ready().then(function(){ft(l._dbInfo,p,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).clear();E.oncomplete=function(){w()},E.onabort=E.onerror=function(){var T=k.error?k.error:k.transaction.error;v(T)}}catch(T){v(T)}})}).catch(v)});return S(h,a),h}function Sr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){ft(l._dbInfo,f,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).count();k.onsuccess=function(){w(k.result)},k.onerror=function(){v(k.error)}}catch(T){v(T)}})}).catch(v)});return S(h,a),h}function Cr(a,l){var h=this,w=new m(function(v,b){a<0?v(null):h.ready().then(function(){ft(h._dbInfo,f,function(E,k){if(E)return b(E);try{var T=k.objectStore(h._dbInfo.storeName),P=!1,z=T.openKeyCursor();z.onsuccess=function(){var A=z.result;A?a===0||P?v(A.key):(P=!0,A.advance(a)):v(null)},z.onerror=function(){b(z.error)}}catch(A){b(A)}})}).catch(b)});return S(w,l),w}function Er(a){var l=this,h=new m(function(w,v){l.ready().then(function(){ft(l._dbInfo,f,function(b,E){if(b)return v(b);try{var k=E.objectStore(l._dbInfo.storeName).openKeyCursor(),T=[];k.onsuccess=function(){var P=k.result;P?(T.push(P.key),P.continue()):w(T)},k.onerror=function(){v(k.error)}}catch(P){v(P)}})}).catch(v)});return S(h,a),h}function xr(a,l){l=N.apply(this,arguments);var h=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||h.name,a.storeName=a.storeName||h.storeName);var w,v=this;if(a.name){var b=a.name===h.name&&v._dbInfo.db?m.resolve(v._dbInfo.db):F(a).then(function(E){var k=u[a.name],T=k.forages;k.db=E;for(var P=0;P<T.length;P++)T[P]._dbInfo.db=E;return E});w=a.storeName?b.then(function(E){if(E.objectStoreNames.contains(a.storeName)){var k=E.version+1;$(a);var T=u[a.name],P=T.forages;E.close();for(var z=0;z<P.length;z++){var A=P[z];A._dbInfo.db=null,A._dbInfo.version=k}var U=new m(function(W,H){var Z=s.open(a.name,k);Z.onerror=function(vt){Z.result.close(),H(vt)},Z.onupgradeneeded=function(){Z.result.deleteObjectStore(a.storeName)},Z.onsuccess=function(){var vt=Z.result;vt.close(),W(vt)}});return U.then(function(W){T.db=W;for(var H=0;H<P.length;H++){var Z=P[H];Z._dbInfo.db=W,B(Z._dbInfo)}}).catch(function(W){throw(j(a,W)||m.resolve()).catch(function(){}),W})}}):b.then(function(E){$(a);var k=u[a.name],T=k.forages;E.close();for(var P=0;P<T.length;P++)T[P]._dbInfo.db=null;var z=new m(function(A,U){var W=s.deleteDatabase(a.name);W.onerror=function(){var H=W.result;H&&H.close(),U(W.error)},W.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},W.onsuccess=function(){var H=W.result;H&&H.close(),A(H)}});return z.then(function(A){k.db=A;for(var U=0;U<T.length;U++)B(T[U]._dbInfo)}).catch(function(A){throw(j(a,A)||m.resolve()).catch(function(){}),A})})}else w=m.reject("Invalid arguments");return S(w,l),w}var kr={_driver:"asyncStorage",_initStorage:mr,_support:c(),iterate:yr,getItem:vr,setItem:wr,removeItem:br,clear:_r,length:Sr,key:Cr,keys:Er,dropInstance:xr};function Ir(){return typeof openDatabase=="function"}var St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tr="~~local_forage_type~",On=/^~~local_forage_type~([^~]+)~/,ne="__lfsc__:",Be=ne.length,Ue="arbf",Oe="blob",jn="si08",Wn="ui08",Hn="uic8",Fn="si16",qn="si32",Gn="ur16",Xn="ui32",Vn="fl32",Kn="fl64",Jn=Be+Ue.length,Yn=Object.prototype.toString;function Zn(a){var l,h,w,v,b,E=.75*a.length,k=a.length,T=0;a[a.length-1]==="="&&(E--,a[a.length-2]==="="&&E--);var P=new ArrayBuffer(E),z=new Uint8Array(P);for(l=0;l<k;l+=4)h=St.indexOf(a[l]),w=St.indexOf(a[l+1]),v=St.indexOf(a[l+2]),b=St.indexOf(a[l+3]),z[T++]=h<<2|w>>4,z[T++]=(15&w)<<4|v>>2,z[T++]=(3&v)<<6|63&b;return P}function je(a){var l,h=new Uint8Array(a),w="";for(l=0;l<h.length;l+=3)w+=St[h[l]>>2],w+=St[(3&h[l])<<4|h[l+1]>>4],w+=St[(15&h[l+1])<<2|h[l+2]>>6],w+=St[63&h[l+2]];return h.length%3==2?w=w.substring(0,w.length-1)+"=":h.length%3==1&&(w=w.substring(0,w.length-2)+"=="),w}function Rr(a,l){var h="";if(a&&(h=Yn.call(a)),a&&(h==="[object ArrayBuffer]"||a.buffer&&Yn.call(a.buffer)==="[object ArrayBuffer]")){var w,v=ne;a instanceof ArrayBuffer?(w=a,v+=Ue):(w=a.buffer,h==="[object Int8Array]"?v+=jn:h==="[object Uint8Array]"?v+=Wn:h==="[object Uint8ClampedArray]"?v+=Hn:h==="[object Int16Array]"?v+=Fn:h==="[object Uint16Array]"?v+=Gn:h==="[object Int32Array]"?v+=qn:h==="[object Uint32Array]"?v+=Xn:h==="[object Float32Array]"?v+=Vn:h==="[object Float64Array]"?v+=Kn:l(new Error("Failed to get type for BinaryArray"))),l(v+je(w))}else if(h==="[object Blob]"){var b=new FileReader;b.onload=function(){var E=Tr+a.type+"~"+je(this.result);l(ne+Oe+E)},b.readAsArrayBuffer(a)}else try{l(JSON.stringify(a))}catch(E){console.error("Couldn't convert value into a JSON string: ",a),l(null,E)}}function Pr(a){if(a.substring(0,Be)!==ne)return JSON.parse(a);var l,h=a.substring(Jn),w=a.substring(Be,Jn);if(w===Oe&&On.test(h)){var v=h.match(On);l=v[1],h=h.substring(v[0].length)}var b=Zn(h);switch(w){case Ue:return b;case Oe:return d([b],{type:l});case jn:return new Int8Array(b);case Wn:return new Uint8Array(b);case Hn:return new Uint8ClampedArray(b);case Fn:return new Int16Array(b);case Gn:return new Uint16Array(b);case qn:return new Int32Array(b);case Xn:return new Uint32Array(b);case Vn:return new Float32Array(b);case Kn:return new Float64Array(b);default:throw new Error("Unkown type: "+w)}}var We={serialize:Rr,deserialize:Pr,stringToBuffer:Zn,bufferToString:je};function Qn(a,l,h,w){a.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],h,w)}function zr(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=typeof a[w]!="string"?a[w].toString():a[w];var v=new m(function(b,E){try{h.db=openDatabase(h.name,String(h.version),h.description,h.size)}catch(k){return E(k)}h.db.transaction(function(k){Qn(k,h,function(){l._dbInfo=h,b()},function(T,P){E(P)})},E)});return h.serializer=We,v}function Ct(a,l,h,w,v,b){a.executeSql(h,w,v,function(E,k){k.code===k.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(T,P){P.rows.length?b(T,k):Qn(T,l,function(){T.executeSql(h,w,v,b)},b)},b):b(E,k)},b)}function $r(a,l){var h=this;a=D(a);var w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){Ct(k,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[a],function(T,P){var z=P.rows.length?P.rows.item(0).value:null;z&&(z=E.serializer.deserialize(z)),v(z)},function(T,P){b(P)})})}).catch(b)});return S(w,l),w}function Dr(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){Ct(k,E,"SELECT * FROM "+E.storeName,[],function(T,P){for(var z=P.rows,A=z.length,U=0;U<A;U++){var W=z.item(U),H=W.value;if(H&&(H=E.serializer.deserialize(H)),(H=a(H,W.key,U+1))!==void 0)return void v(H)}v()},function(T,P){b(P)})})}).catch(b)});return S(w,l),w}function to(a,l,h,w){var v=this;a=D(a);var b=new m(function(E,k){v.ready().then(function(){l===void 0&&(l=null);var T=l,P=v._dbInfo;P.serializer.serialize(l,function(z,A){A?k(A):P.db.transaction(function(U){Ct(U,P,"INSERT OR REPLACE INTO "+P.storeName+" (key, value) VALUES (?, ?)",[a,z],function(){E(T)},function(W,H){k(H)})},function(U){if(U.code===U.QUOTA_ERR){if(w>0)return void E(to.apply(v,[a,T,h,w-1]));k(U)}})})}).catch(k)});return S(b,h),b}function Mr(a,l,h){return to.apply(this,[a,l,h,1])}function Ar(a,l){var h=this;a=D(a);var w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){Ct(k,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[a],function(){v()},function(T,P){b(P)})})}).catch(b)});return S(w,l),w}function Lr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){Ct(E,b,"DELETE FROM "+b.storeName,[],function(){w()},function(k,T){v(T)})})}).catch(v)});return S(h,a),h}function Nr(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){Ct(E,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(k,T){var P=T.rows.item(0).c;w(P)},function(k,T){v(T)})})}).catch(v)});return S(h,a),h}function Br(a,l){var h=this,w=new m(function(v,b){h.ready().then(function(){var E=h._dbInfo;E.db.transaction(function(k){Ct(k,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[a+1],function(T,P){var z=P.rows.length?P.rows.item(0).key:null;v(z)},function(T,P){b(P)})})}).catch(b)});return S(w,l),w}function Ur(a){var l=this,h=new m(function(w,v){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(E){Ct(E,b,"SELECT key FROM "+b.storeName,[],function(k,T){for(var P=[],z=0;z<T.rows.length;z++)P.push(T.rows.item(z).key);w(P)},function(k,T){v(T)})})}).catch(v)});return S(h,a),h}function Or(a){return new m(function(l,h){a.transaction(function(w){w.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(v,b){for(var E=[],k=0;k<b.rows.length;k++)E.push(b.rows.item(k).name);l({db:a,storeNames:E})},function(v,b){h(b)})},function(w){h(w)})})}function jr(a,l){l=N.apply(this,arguments);var h=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||h.name,a.storeName=a.storeName||h.storeName);var w,v=this;return w=a.name?new m(function(b){var E;E=a.name===h.name?v._dbInfo.db:openDatabase(a.name,"","",0),a.storeName?b({db:E,storeNames:[a.storeName]}):b(Or(E))}).then(function(b){return new m(function(E,k){b.db.transaction(function(T){function P(W){return new m(function(H,Z){T.executeSql("DROP TABLE IF EXISTS "+W,[],function(){H()},function(vt,qe){Z(qe)})})}for(var z=[],A=0,U=b.storeNames.length;A<U;A++)z.push(P(b.storeNames[A]));m.all(z).then(function(){E()}).catch(function(W){k(W)})},function(T){k(T)})})}):m.reject("Invalid arguments"),S(w,l),w}var Wr={_driver:"webSQLStorage",_initStorage:zr,_support:Ir(),iterate:Dr,getItem:$r,setItem:Mr,removeItem:Ar,clear:Lr,length:Nr,key:Br,keys:Ur,dropInstance:jr};function Hr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function eo(a,l){var h=a.name+"/";return a.storeName!==l.storeName&&(h+=a.storeName+"/"),h}function Fr(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function qr(){return!Fr()||localStorage.length>0}function Gr(a){var l=this,h={};if(a)for(var w in a)h[w]=a[w];return h.keyPrefix=eo(a,l._defaultConfig),qr()?(l._dbInfo=h,h.serializer=We,m.resolve()):m.reject()}function Xr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo.keyPrefix,v=localStorage.length-1;v>=0;v--){var b=localStorage.key(v);b.indexOf(w)===0&&localStorage.removeItem(b)}});return S(h,a),h}function Vr(a,l){var h=this;a=D(a);var w=h.ready().then(function(){var v=h._dbInfo,b=localStorage.getItem(v.keyPrefix+a);return b&&(b=v.serializer.deserialize(b)),b});return S(w,l),w}function Kr(a,l){var h=this,w=h.ready().then(function(){for(var v=h._dbInfo,b=v.keyPrefix,E=b.length,k=localStorage.length,T=1,P=0;P<k;P++){var z=localStorage.key(P);if(z.indexOf(b)===0){var A=localStorage.getItem(z);if(A&&(A=v.serializer.deserialize(A)),(A=a(A,z.substring(E),T++))!==void 0)return A}}});return S(w,l),w}function Jr(a,l){var h=this,w=h.ready().then(function(){var v,b=h._dbInfo;try{v=localStorage.key(a)}catch{v=null}return v&&(v=v.substring(b.keyPrefix.length)),v});return S(w,l),w}function Yr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo,v=localStorage.length,b=[],E=0;E<v;E++){var k=localStorage.key(E);k.indexOf(w.keyPrefix)===0&&b.push(k.substring(w.keyPrefix.length))}return b});return S(h,a),h}function Zr(a){var l=this.keys().then(function(h){return h.length});return S(l,a),l}function Qr(a,l){var h=this;a=D(a);var w=h.ready().then(function(){var v=h._dbInfo;localStorage.removeItem(v.keyPrefix+a)});return S(w,l),w}function ti(a,l,h){var w=this;a=D(a);var v=w.ready().then(function(){l===void 0&&(l=null);var b=l;return new m(function(E,k){var T=w._dbInfo;T.serializer.serialize(l,function(P,z){if(z)k(z);else try{localStorage.setItem(T.keyPrefix+a,P),E(b)}catch(A){A.name!=="QuotaExceededError"&&A.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(A),k(A)}})})});return S(v,h),v}function ei(a,l){if(l=N.apply(this,arguments),!(a=typeof a!="function"&&a||{}).name){var h=this.config();a.name=a.name||h.name,a.storeName=a.storeName||h.storeName}var w,v=this;return w=a.name?new m(function(b){a.storeName?b(eo(a,v._defaultConfig)):b(a.name+"/")}).then(function(b){for(var E=localStorage.length-1;E>=0;E--){var k=localStorage.key(E);k.indexOf(b)===0&&localStorage.removeItem(k)}}):m.reject("Invalid arguments"),S(w,l),w}var ni={_driver:"localStorageWrapper",_initStorage:Gr,_support:Hr(),iterate:Kr,getItem:Vr,setItem:ti,removeItem:Qr,clear:Xr,length:Zr,key:Jr,keys:Yr,dropInstance:ei},oi=function(a,l){return a===l||typeof a=="number"&&typeof l=="number"&&isNaN(a)&&isNaN(l)},ri=function(a,l){for(var h=a.length,w=0;w<h;){if(oi(a[w],l))return!0;w++}return!1},no=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},Ht={},oo={},Nt={INDEXEDDB:kr,WEBSQL:Wr,LOCALSTORAGE:ni},ii=[Nt.INDEXEDDB._driver,Nt.WEBSQL._driver,Nt.LOCALSTORAGE._driver],oe=["dropInstance"],He=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(oe),si={description:"",driver:ii.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ai(a,l){a[l]=function(){var h=arguments;return a.ready().then(function(){return a[l].apply(a,h)})}}function Fe(){for(var a=1;a<arguments.length;a++){var l=arguments[a];if(l)for(var h in l)l.hasOwnProperty(h)&&(no(l[h])?arguments[0][h]=l[h].slice():arguments[0][h]=l[h])}return arguments[0]}var ci=function(){function a(l){for(var h in r(this,a),Nt)if(Nt.hasOwnProperty(h)){var w=Nt[h],v=w._driver;this[h]=v,Ht[v]||this.defineDriver(w)}this._defaultConfig=Fe({},si),this._config=Fe({},this._defaultConfig,l),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(l){if((l===void 0?"undefined":o(l))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var h in l){if(h==="storeName"&&(l[h]=l[h].replace(/\W/g,"_")),h==="version"&&typeof l[h]!="number")return new Error("Database version must be a number.");this._config[h]=l[h]}return!("driver"in l)||!l.driver||this.setDriver(this._config.driver)}return typeof l=="string"?this._config[l]:this._config},a.prototype.defineDriver=function(l,h,w){var v=new m(function(b,E){try{var k=l._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!l._driver)return void E(T);for(var P=He.concat("_initStorage"),z=0,A=P.length;z<A;z++){var U=P[z];if((!ri(oe,U)||l[U])&&typeof l[U]!="function")return void E(T)}var W=function(){for(var Z=function(hi){return function(){var ui=new Error("Method "+hi+" is not implemented by the current driver"),ro=m.reject(ui);return S(ro,arguments[arguments.length-1]),ro}},vt=0,qe=oe.length;vt<qe;vt++){var Ge=oe[vt];l[Ge]||(l[Ge]=Z(Ge))}};W();var H=function(Z){Ht[k]&&console.info("Redefining LocalForage driver: "+k),Ht[k]=l,oo[k]=Z,b()};"_support"in l?l._support&&typeof l._support=="function"?l._support().then(H,E):H(!!l._support):H(!0)}catch(Z){E(Z)}});return C(v,h,w),v},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(l,h,w){var v=Ht[l]?m.resolve(Ht[l]):m.reject(new Error("Driver not found."));return C(v,h,w),v},a.prototype.getSerializer=function(l){var h=m.resolve(We);return C(h,l),h},a.prototype.ready=function(l){var h=this,w=h._driverSet.then(function(){return h._ready===null&&(h._ready=h._initDriver()),h._ready});return C(w,l,l),w},a.prototype.setDriver=function(l,h,w){var v=this;no(l)||(l=[l]);var b=this._getSupportedDrivers(l);function E(){v._config.driver=v.driver()}function k(z){return v._extend(z),E(),v._ready=v._initStorage(v._config),v._ready}function T(z){return function(){var A=0;function U(){for(;A<z.length;){var W=z[A];return A++,v._dbInfo=null,v._ready=null,v.getDriver(W).then(k).catch(U)}E();var H=new Error("No available storage method found.");return v._driverSet=m.reject(H),v._driverSet}return U()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=P.then(function(){var z=b[0];return v._dbInfo=null,v._ready=null,v.getDriver(z).then(function(A){v._driver=A._driver,E(),v._wrapLibraryMethodsWithReady(),v._initDriver=T(b)})}).catch(function(){E();var z=new Error("No available storage method found.");return v._driverSet=m.reject(z),v._driverSet}),C(this._driverSet,h,w),this._driverSet},a.prototype.supports=function(l){return!!oo[l]},a.prototype._extend=function(l){Fe(this,l)},a.prototype._getSupportedDrivers=function(l){for(var h=[],w=0,v=l.length;w<v;w++){var b=l[w];this.supports(b)&&h.push(b)}return h},a.prototype._wrapLibraryMethodsWithReady=function(){for(var l=0,h=He.length;l<h;l++)ai(this,He[l])},a.prototype.createInstance=function(l){return new a(l)},a}(),li=new ci;t.exports=li},{3:3}]},{},[4])(4)),Ao={exports:{}};/*!
4
+ localForage -- Offline Storage, Improved
5
+ Version 1.10.0
6
+ https://localforage.github.io/localForage
7
+ (c) 2013-2017 Mozilla, Apache License 2.0
8
+ */(function(e){((t,n)=>{e.exports=n()})(0,()=>{const t=typeof window=="object"?window:this;t.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,o=!1;const r=t.WebStreamsPolyfill||{},i=t.isSecureContext;let s=/constructor/i.test(t.HTMLElement)||!!t.safari||!!t.WebKitPoint;const c=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",d={createWriteStream:function(S,C,D){let N={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},R=0,_=null,u=null,g=null;if(Number.isFinite(C)?([D,C]=[C,D],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=D,N.writableStrategy=C):C&&C.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),N.size=D,N.writableStrategy=C):N=C||{},!s){n||(n=i?m(d.mitm):function(M){const I="width=200,height=100",$=document.createDocumentFragment(),B={frame:t.open(M,"popup",I),loaded:!1,isIframe:!1,isPopup:!0,remove(){B.frame.close()},addEventListener(...O){$.addEventListener(...O)},dispatchEvent(...O){$.dispatchEvent(...O)},removeEventListener(...O){$.removeEventListener(...O)},postMessage(...O){B.frame.postMessage(...O)}},j=O=>{O.source===B.frame&&(B.loaded=!0,t.removeEventListener("message",j),B.dispatchEvent(new Event("load")))};return t.addEventListener("message",j),B}(d.mitm)),u=new MessageChannel,S=encodeURIComponent(S.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const p={transferringReadable:o,pathname:N.pathname||Math.random().toString().slice(-6)+"/"+S,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+S}};N.size&&(p.headers["Content-Length"]=N.size);const y=[p,"*",[u.port2]];if(o){const M=c==="iframe"?void 0:{transform($,B){if(!($ instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");R+=$.length,B.enqueue($),_&&(location.href=_,_=null)},flush(){_&&(location.href=_)}};g=new d.TransformStream(M,N.writableStrategy,N.readableStrategy);const I=g.readable;u.port1.postMessage({readableStream:I},[I])}u.port1.onmessage=M=>{M.data.download?c==="navigate"?(n.remove(),n=null,R?location.href=M.data.download:_=M.data.download):(n.isPopup&&(n.remove(),n=null,c==="iframe"&&m(d.mitm)),m(M.data.download)):M.data.abort&&(f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...y):n.addEventListener("load",()=>{n.postMessage(...y)},{once:!0})}let f=[];return!s&&g&&g.writable||new d.WritableStream({write(p){if(!(p instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?f.push(p):(u.port1.postMessage(p),R+=p.length,_&&(location.href=_,_=null))},close(){if(s){const p=new Blob(f,{type:"application/octet-stream; charset=utf-8"}),y=document.createElement("a");y.href=URL.createObjectURL(p),y.download=S,y.click()}else u.port1.postMessage("end")},abort(){f=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},N.writableStrategy)},WritableStream:t.WritableStream||r.WritableStream,supported:!0,version:{full:"2.0.5",major:2,minor:0,dot:5},mitm:"https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0"};function m(S){if(!S)throw new Error("meh");const C=document.createElement("iframe");return C.hidden=!0,C.src=S,C.loaded=!1,C.name="iframe",C.isIframe=!0,C.postMessage=(...D)=>C.contentWindow.postMessage(...D),C.addEventListener("load",()=>{C.loaded=!0},{once:!0}),document.body.appendChild(C),C}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(S=>{try{S()}catch{}})(()=>{const{readable:S}=new TransformStream,C=new MessageChannel;C.port1.postMessage(S,[S]),C.port1.close(),C.port2.close(),o=!0,Object.defineProperty(d,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),d})})(Ao);var Ds=ae(Ao.exports);class Ms{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(t,n,o=3,r=6,i=6e4){this.fileID=t,this.downloadURL=n,this.chunkByteSize=o*this.ChunkUnitM,this.eventTarget=an(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(t,n){this.eventTarget.on(t,n)}dispatch(t,n){this.eventTarget.emit(t,n)}dispatchError(t){this.eventTarget.emit("error",t)}dispatchInfo(t){this.eventTarget.emit("info",t)}async queryDownloadFileMeta(t,n="",o){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await bt(n,t,o);let i=null;return r&&r.status===200&&(i=r.data),i}async getIFileMeta(){if(this.fileMetaData===null){const t=await this.currentDB?.getItem("fileinfo");this.fileMetaData=t||null}return this.fileMetaData}initIndexDB(){this.currentDB=fe.createInstance({name:this.fileID,driver:fe.INDEXEDDB})}async init(t){if(this.finishNum=0,t){const n="fileinfo";this.fileMetaData={id:t.id,name:t.name,length:t.length,downloadID:t.downloadID,chunkSize:this.chunkByteSize},this.fileName=t.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),fe.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(t){return new Promise(n=>setTimeout(n,t))}async download(t,n){let o=t;if(!o&&this.downloadURL&&(o=this.downloadURL),!o)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const r=L.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let s=0;const c=this.cacheSize;let d=0;for(let m=0;m<this.totalChunks;m++){if(this.keys&&this.keys?.indexOf(m.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const S=m*this.chunkByteSize;let C=S+this.chunkByteSize-1;this.fileMetaData&&C>this.fileMetaData.length&&(C=this.fileMetaData.length-1);const D={range:`bytes=${S}-${C}`};for(;d>=c;)await this.sleep(200);const N=m.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${m+1}/${this.totalChunks}`),d++,bt(o,n,i,D,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async R=>{const _=R.data;d--,await this.currentDB?.setItem(N,_),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const u=parseInt(N)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(R=>{d--;const _=parseInt(N)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${_}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const t=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",t)}outputProgress(t){const n=100*t/this.totalChunks;this.dispatch("saveProgress",n)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const t=Ds.createWriteStream(this.fileName).getWriter();let n=0;for(let o=0;o<this.totalChunks;o++){const r=o.toString();let i=await this.currentDB?.getItem(r);if(i||(i=await this.currentDB?.getItem(r)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${o+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let s=new Response(i).body;if(s===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${o+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const c=s.getReader();for(;;){const{done:d,value:m}=await c.read();if(d)break;await t.write(m)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}t.close(),fe.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function As(e,t){let n="",o="";for(const r in t)n+=r+"="+encodeURIComponent(t[r])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o}function Lo(e={},t={}){let n;for(n in t)Pt(t[n])?e[n]=Lo(e[n],t[n]):e[n]=t[n];return e}function Ls(e,t){const n=`${e}_${t}`;return ut.MD5(n)}function No(e){const t=function(c){if(!c)return;const d=c,m=[];if(d)for(let S of d){const C=Bo(S);C&&m.push(C)}return m}(e.bussinessRoutes),n=function(c){if(!c)return;const d=c;if(d&&d.length>0){const m=[];return d.forEach(S=>{const C=Uo(S);C&&m.push(C)}),m}}(e.widgetMenuConfig),o=function(c){if(c&&c.length>0){const d=[];return c.forEach(m=>{const S=function(C){return C?{id:C.id,label:C.label,container:C.container,preload:C.preload,afterid:C.afterid,bindid:C.bindid,group:C.group}:void 0}(m);S&&d.push(S)}),d}}(e.widgetConfig),r=function(c){if(c&&c.length>0)return c}(e.functionList),i=e.pkgObject.version,s=e.pkgObject.name;return{id:Ls(s,i),name:L.Config.UI.SiteTitle,group:L.Config.UI.Group,product:s,version:i,routes:t,widgetMenu:n,widgets:o,functions:r}}function Bo(e){if(e){let t=0;e.meta?.hidden&&(t=1);let n={path:e.path,name:e.name,title:e.meta?.title,type:t,index:e.meta?.index};if(e.children){const o=[];for(let r of e.children){const i=Bo(r);i&&o.push(i)}o.length>0&&(n.children=o)}return n}}function Uo(e){if(!e)return;const t={name:e.name,index:e.index,path:e.path,type:e.type};return e.children&&e.children.length>0&&(t.children=[],e.children.forEach(n=>{const o=Uo(n);o&&t.children?.push(o)})),t}function Ns(e,t="IconifyList.ts"){let n="",o=`const iconlist={
4
9
  `,r=0;e.forEach(i=>{const s=i.split(":");if(s&&s.length===2){const c="icon"+r;n+=`import ${c} from '~icons/${s[0]}/${s[1]}'
5
10
  `,o+=` '${i}':${c},
6
11
  `,r++}}),r>0&&(o+=`};
7
- `,de(n+o+"export default iconlist;","IconifyList.ts"))}function Os(e,t){const n=No(e);vo(n,t),L.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function js(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function Hs(e){let t=_n(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function _n(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function Ws(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function Fs(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function qs(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Gs(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function Xs(e){let t=_n(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Vs(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Ks(e,t="\u4EDF\u4F70\u62FE\u4EBF\u4EDF\u4F70\u62FE\u4E07\u4EDF\u4F70\u62FE\u5143\u89D2\u5206",n=""){let o=(e+="00").indexOf(".");o>=0&&(e=e.substring(0,o)+e.substr(o+1,2)),t=t.substr(t.length-e.length);for(let r=0;r<e.length;r++)n+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".substr(e.substr(r,1),1)+t.substr(r,1);return n=n.replace(/零角零分$/,"\u6574").replace(/零[仟佰拾]/g,"\u96F6").replace(/零{2,}/g,"\u96F6").replace(/零([亿|万])/g,"$1").replace(/零+元/,"\u5143").replace(/亿零{0,3}万/,"\u4EBF").replace(/^元/,"\u96F6\u5143")}function Js(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function Ys(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function Zs(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function Qs(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function ta(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function ea(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="\u5F31"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="\u4E2D"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="\u5F3A"),t}function na(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function oa(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function ra(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function ia(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function sa(e){return!!/^[1-9][0-9]{5}$/.test(e)}function aa(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function ca(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}let Oo=!0;try{String.fromCharCode.apply(String,[1,2])}catch{Oo=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var Sn=2654435769;function jo(e,t){var n=e.length,o=n<<2;if(t){var r=e[n-1];if(r<(o-=4)-3||r>o)return null;o=r}for(var i=new Uint8Array(o),s=0;s<o;++s)i[s]=e[s>>2]>>((3&s)<<3);return i}function me(e,t){var n,o=e.length,r=o>>2;3&o&&++r,t?(n=new Uint32Array(r+1))[r]=o:n=new Uint32Array(r);for(var i=0;i<o;++i)n[i>>2]|=e[i]<<((3&i)<<3);return n}function $t(e){return 4294967295&e}function ve(e,t,n,o,r,i){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(i[3&o^r]^n)}function Ho(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function ye(e){for(var t=e.length,n=new Uint8Array(3*t),o=0,r=0;r<t;r++){var i=e.charCodeAt(r);if(i<128)n[o++]=i;else if(i<2048)n[o++]=192|i>>6,n[o++]=128|63&i;else{if(!(i<55296||i>57343)){if(r+1<t){var s=e.charCodeAt(r+1);if(i<56320&&56320<=s&&s<=57343){var c=65536+((1023&i)<<10|1023&s);n[o++]=240|c>>18,n[o++]=128|c>>12&63,n[o++]=128|c>>6&63,n[o++]=128|63&c,r++;continue}}throw new Error("Malformed string")}n[o++]=224|i>>12,n[o++]=128|i>>6&63,n[o++]=128|63&i}}return n.subarray(0,o)}function Wo(e){var t=e.length;return t===0?"":t<32767?function(n,o){for(var r=new Array(o),i=0,s=0,c=n.length;i<o&&s<c;i++){var p=n[s++];switch(p>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=p;break;case 12:case 13:if(!(s<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&p)<<6|63&n[s++];break;case 14:if(!(s+1<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&p)<<12|(63&n[s++])<<6|63&n[s++];break;case 15:if(!(s+2<c))throw new Error("Unfinished UTF-8 octet sequence");var m=((7&p)<<18|(63&n[s++])<<12|(63&n[s++])<<6|63&n[s++])-65536;if(!(0<=m&&m<=1048575))throw new Error("Character outside valid Unicode range: 0x"+m.toString(16));r[i++]=m>>10&1023|55296,r[i]=1023&m|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+p.toString(16))}}return i<o&&(r.length=i),String.fromCharCode.apply(String,r)}(e,t):function(n,o){for(var r=[],i=new Array(32768),s=0,c=0,p=n.length;s<o&&c<p;s++){var m=n[c++];switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[s]=m;break;case 12:case 13:if(!(c<p))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&m)<<6|63&n[c++];break;case 14:if(!(c+1<p))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(15&m)<<12|(63&n[c++])<<6|63&n[c++];break;case 15:if(!(c+2<p))throw new Error("Unfinished UTF-8 octet sequence");var _=((7&m)<<18|(63&n[c++])<<12|(63&n[c++])<<6|63&n[c++])-65536;if(!(0<=_&&_<=1048575))throw new Error("Character outside valid Unicode range: 0x"+_.toString(16));i[s++]=_>>10&1023|55296,i[s]=1023&_|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+m.toString(16))}if(s>=32766){var C=s+1;i.length=C,r.push(String.fromCharCode.apply(String,i)),o-=C,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(e,t)}function la(e){var t=e.length;if(t===0)return"";var n=Oo?e:function(c){for(var p=c.length,m=new Array(c.length),_=0;_<p;++_)m[_]=c[_];return m}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var o=32767&t,r=t>>15,i=new Array(o?r+1:r),s=0;s<r;++s)i[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return o&&(i[r]=String.fromCharCode.apply(String,n.subarray(r<<15,t))),i.join("")}function Fo(e,t){return typeof e=="string"&&(e=ye(e)),typeof t=="string"&&(t=ye(t)),e==null||e.length===0?e:jo(function(n,o){var r,i,s,c,p,m,_=n.length,C=_-1;for(i=n[C],s=0,m=0|Math.floor(6+52/_);m>0;--m){for(c=(s=$t(s+Sn))>>>2&3,p=0;p<C;++p)r=n[p+1],i=n[p]=$t(n[p]+ve(s,r,i,p,c,o));r=n[0],i=n[C]=$t(n[C]+ve(s,r,i,C,c,o))}return n}(me(e,!0),me(Ho(t),!1)),!1)}function qo(e,t){return typeof e=="string"&&(e=function(n){for(var o=window.atob(n),r=o.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=o.charCodeAt(s);return i}(e)),typeof t=="string"&&(t=ye(t)),e==null||e.length===0?e:jo(function(n,o){var r,i,s,c,p,m=n.length,_=m-1;for(r=n[0],s=$t(Math.floor(6+52/m)*Sn);s!==0;s=$t(s-Sn)){for(c=s>>>2&3,p=_;p>0;--p)i=n[p-1],r=n[p]=$t(n[p]-ve(s,r,i,p,c,o));i=n[_],r=n[0]=$t(n[0]-ve(s,r,i,0,c,o))}return n}(me(e,!1),me(Ho(t),!1)),!0)}const Kt={toBytes:ye,toString:Wo,encrypt:Fo,encryptToString:function(e,t){return window.btoa(la(Fo(e,t)))},decrypt:qo,decryptToString:function(e,t){return Wo(qo(e,t))}},Go=e=>{const t="1.23452384164.123412416";document.getElementById(t)!==null&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const o=n.getContext("2d");o.rotate(-20*Math.PI/180),o.font="12px Vedana",o.fillStyle="rgba(200, 200, 200, 0.30)",o.textBaseline="middle",o.fillText(e,n.width/10,n.height/2);const r=document.createElement("div");return r.id=t,r.style.pointerEvents="none",r.style.top="0px",r.style.left="0px",r.style.position="fixed",r.style.zIndex="10000000",r.style.width=`${document.documentElement.clientWidth}px`,r.style.height=`${document.documentElement.clientHeight}px`,r.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(r),t},ha={set:e=>{let t=Go(e);document.getElementById(t)===null&&(t=Go(e))},del:()=>{let e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e))}};class Ot extends Error{constructor(t,n){const o=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=o}}class Cn extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class ft extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class ua extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=o}}class da extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=o}}class pa extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=o}}class fa extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class ga extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=o}}class Xo{constructor(t,n,o){this.statusCode=t,this.statusText=n,this.content=o}}class we{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var x;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(x||(x={}));class Jt{constructor(){}log(t,n){}}Jt.instance=new Jt;class V{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,o){if(!(t in n))throw new Error(`Unknown ${o} value: ${t}.`)}}class K{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&window.document===void 0}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Yt(e,t){let n="";return Zt(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${function(o){const r=new Uint8Array(o);let i="";return r.forEach(s=>{i+=`0x${s<16?"0":""}${s.toString(16)} `}),i.substr(0,i.length-1)}(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Zt(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Vo(e,t,n,o,r,i){const s={},[c,p]=jt();s[c]=p,e.log(x.Trace,`(${t} transport) sending data. ${Yt(r,i.logMessageContent)}.`);const m=Zt(r)?"arraybuffer":"text",_=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:m,timeout:i.timeout,withCredentials:i.withCredentials});e.log(x.Trace,`(${t} transport) request complete. Response status: ${_.statusCode}.`)}class ma{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class be{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const o=`[${new Date().toISOString()}] ${x[t]}: ${n}`;switch(t){case x.Critical:case x.Error:this.out.error(o);break;case x.Warning:this.out.warn(o);break;case x.Information:this.out.info(o);break;default:this.out.log(o)}}}}function jt(){let e="X-SignalR-User-Agent";return K.isNode&&(e="User-Agent"),[e,va("7.0.3",ya(),ba(),wa())]}function va(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&t!==""?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function ya(){if(!K.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function wa(){if(K.isNode)return process.versions.node}function ba(){return K.isNode?"NodeJS":"Browser"}function Ko(e){return e.stack?e.stack:e.message?e.message:`${e}`}class _a extends we{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,this._fetchType=n("node-fetch"),this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new ft;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let o;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),o=new ft});let r,i=null;if(t.timeout){const p=t.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(x.Warning,"Timeout from HTTP request."),o=new Cn},p)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Zt(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");try{r=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(p){throw o||(this._logger.log(x.Warning,`Error from HTTP request. ${p}.`),p)}finally{i&&clearTimeout(i),t.abortSignal&&(t.abortSignal.onabort=null)}if(!r.ok){const p=await Jo(r,"text");throw new Ot(p||r.statusText,r.status)}const s=Jo(r,t.responseType),c=await s;return new Xo(r.status,r.statusText,c)}getCookieString(t){let n="";return K.isNode&&this._jar&&this._jar.getCookies(t,(o,r)=>n=r.join("; ")),n}}function Jo(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class Sa extends we{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ft):t.method?t.url?new Promise((n,o)=>{const r=new XMLHttpRequest;r.open(t.method,t.url,!0),r.withCredentials=t.withCredentials===void 0||t.withCredentials,r.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(Zt(t.content)?r.setRequestHeader("Content-Type","application/octet-stream"):r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(s=>{r.setRequestHeader(s,i[s])}),t.responseType&&(r.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),o(new ft)}),t.timeout&&(r.timeout=t.timeout),r.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),r.status>=200&&r.status<300?n(new Xo(r.status,r.statusText,r.response||r.responseText)):o(new Ot(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(x.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),o(new Ot(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(x.Warning,"Timeout from HTTP request."),o(new Cn)},r.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Ca extends we{constructor(t){if(super(),typeof fetch<"u"||K.isNode)this._httpClient=new _a(t);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new Sa(t)}}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ft):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class dt{static write(t){return`${t}${dt.RecordSeparator}`}static parse(t){if(t[t.length-1]!==dt.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(dt.RecordSeparator);return n.pop(),n}}dt.RecordSeparatorCode=30,dt.RecordSeparator=String.fromCharCode(dt.RecordSeparatorCode);class Ea{writeHandshakeRequest(t){return dt.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,o;if(Zt(t)){const s=new Uint8Array(t),c=s.indexOf(dt.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const p=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,p))),o=s.byteLength>p?s.slice(p).buffer:null}else{const s=t,c=s.indexOf(dt.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const p=c+1;n=s.substring(0,p),o=s.length>p?s.substring(p):null}const r=dt.parse(n),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var q;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(q||(q={}));class xa{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new ma(this,t)}}var X;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(X||(X={}));class Bn{constructor(t,n,o,r){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(x.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},V.isRequired(t,"connection"),V.isRequired(n,"logger"),V.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=n,this._protocol=o,this.connection=t,this._reconnectPolicy=r,this._handshakeProtocol=new Ea,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=X.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:q.Ping})}static create(t,n,o,r){return new Bn(t,n,o,r)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==X.Disconnected&&this._connectionState!==X.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==X.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=X.Connecting,this._logger.log(x.Debug,"Starting HubConnection.");try{await this._startInternal(),K.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=X.Connected,this._connectionStarted=!0,this._logger.log(x.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=X.Disconnected,this._logger.log(x.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,o)=>{this._handshakeResolver=n,this._handshakeRejecter=o});await this.connection.start(this._protocol.transferFormat);try{const n={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(x.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(x.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(x.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===X.Disconnected?(this._logger.log(x.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===X.Disconnecting?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=X.Disconnecting,this._logger.log(x.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(x.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new ft("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createStreamInvocation(t,n,r);let s;const c=new xa;return c.cancelCallback=()=>{const p=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(p))},this._callbacks[i.invocationId]=(p,m)=>{m?c.error(m):p&&(p.type===q.Completion?p.error?c.error(new Error(p.error)):c.complete():c.next(p.item))},s=this._sendWithProtocol(i).catch(p=>{c.error(p),delete this._callbacks[i.invocationId]}),this._launchStreams(o,s),c}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._sendWithProtocol(this._createInvocation(t,n,!0,r));return this._launchStreams(o,i),i}invoke(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createInvocation(t,n,!1,r);return new Promise((c,p)=>{this._callbacks[i.invocationId]=(_,C)=>{C?p(C):_&&(_.type===q.Completion?_.error?p(new Error(_.error)):c(_.result):p(new Error(`Unexpected message type: ${_.type}`)))};const m=this._sendWithProtocol(i).catch(_=>{p(_),delete this._callbacks[i.invocationId]});this._launchStreams(o,m)})}on(t,n){t&&n&&(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const o=this._methods[t];if(o)if(n){const r=o.indexOf(n);r!==-1&&(o.splice(r,1),o.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const o of n)switch(o.type){case q.Invocation:this._invokeClientMethod(o);break;case q.StreamItem:case q.Completion:{const r=this._callbacks[o.invocationId];if(r){o.type===q.Completion&&delete this._callbacks[o.invocationId];try{r(o)}catch(i){this._logger.log(x.Error,`Stream callback threw error: ${Ko(i)}`)}}break}case q.Ping:break;case q.Close:{this._logger.log(x.Information,"Close message received from server.");const r=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(r):this._stopPromise=this._stopInternal(r);break}default:this._logger.log(x.Warning,`Invalid message type: ${o.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,o;try{[o,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(r){const i="Error parsing handshake response: "+r;this._logger.log(x.Error,i);const s=new Error(i);throw this._handshakeRejecter(s),s}if(n.error){const r="Server returned handshake error: "+n.error;this._logger.log(x.Error,r);const i=new Error(r);throw this._handshakeRejecter(i),i}return this._logger.log(x.Debug,"Server handshake complete."),this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle!==void 0))){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===X.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),o=this._methods[n];if(!o)return this._logger.log(x.Warning,`No client method with the name '${n}' found.`),void(t.invocationId&&(this._logger.log(x.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null))));const r=o.slice(),i=!!t.invocationId;let s,c,p;for(const m of r)try{const _=s;s=await m.apply(this,t.arguments),i&&s&&_&&(this._logger.log(x.Error,`Multiple results provided for '${n}'. Sending error to server.`),p=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),c=void 0}catch(_){c=_,this._logger.log(x.Error,`A callback for the method '${n}' threw error '${_}'.`)}p?await this._sendWithProtocol(p):i?(c?p=this._createCompletionMessage(t.invocationId,`${c}`,null):s!==void 0?p=this._createCompletionMessage(t.invocationId,null,s):(this._logger.log(x.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),p=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(p)):s&&this._logger.log(x.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(x.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new ft("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===X.Disconnecting?this._completeClose(t):this._connectionState===X.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===X.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=X.Disconnected,this._connectionStarted=!1,K.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(x.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let o=0,r=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(o++,0,r);if(i===null)return this._logger.log(x.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(t);if(this._connectionState=X.Reconnecting,t?this._logger.log(x.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(x.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[t]))}catch(s){this._logger.log(x.Error,`An onreconnecting callback called with error '${t}' threw error '${s}'.`)}if(this._connectionState!==X.Reconnecting)return void this._logger.log(x.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;i!==null;){if(this._logger.log(x.Information,`Reconnect attempt number ${o} will start in ${i} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==X.Reconnecting)return void this._logger.log(x.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=X.Connected,this._logger.log(x.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(x.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(x.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==X.Reconnecting)return this._logger.log(x.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===X.Disconnecting&&this._completeClose());r=s instanceof Error?s:new Error(s.toString()),i=this._getNextRetryDelay(o++,Date.now()-n,r)}}this._logger.log(x.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:o})}catch(r){return this._logger.log(x.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${r}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(o=>{const r=n[o];try{r(null,t)}catch(i){this._logger.log(x.Error,`Stream 'error' callback called with '${t}' threw error: ${Ko(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,o,r){if(o)return r.length!==0?{arguments:n,streamIds:r,target:t,type:q.Invocation}:{arguments:n,target:t,type:q.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:n,invocationId:i.toString(),streamIds:r,target:t,type:q.Invocation}:{arguments:n,invocationId:i.toString(),target:t,type:q.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const o in t)t[o].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:r=>{let i;i=r instanceof Error?r.message:r&&r.toString?r.toString():"Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:r=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,r)))}})}}_replaceStreamingParams(t){const n=[],o=[];for(let r=0;r<t.length;r++){const i=t[r];if(this._isObservable(i)){const s=this._invocationId;this._invocationId++,n[s]=i,o.push(s.toString()),t.splice(r,1)}}return[n,o]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,o){const r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:n,invocationId:r.toString(),streamIds:o,target:t,type:q.StreamInvocation}:{arguments:n,invocationId:r.toString(),target:t,type:q.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:q.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:q.StreamItem}}_createCompletionMessage(t,n,o){return n?{error:n,invocationId:t,type:q.Completion}:{invocationId:t,result:o,type:q.Completion}}}const ka=[0,2e3,1e4,3e4,null];class Yo{constructor(t){this._retryDelays=t!==void 0?[...t,null]:ka}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class At{}At.Authorization="Authorization",At.Cookie="Cookie";class Ia extends we{constructor(t,n){super(),this._innerClient=t,this._accessTokenFactory=n}async send(t){let n=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const o=await this._innerClient.send(t);return n&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):o}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[At.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[At.Authorization]&&delete t.headers[At.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var J,tt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(J||(J={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(tt||(tt={}));class Ta{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class Zo{constructor(t,n,o){this._httpClient=t,this._logger=n,this._pollAbort=new Ta,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,n){if(V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,tt,"transferFormat"),this._url=t,this._logger.log(x.Trace,"(LongPolling transport) Connecting."),n===tt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[o,r]=jt(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===tt.Binary&&(s.responseType="arraybuffer");const c=`${t}&_=${Date.now()}`;this._logger.log(x.Trace,`(LongPolling transport) polling: ${c}.`);const p=await this._httpClient.get(c,s);p.statusCode!==200?(this._logger.log(x.Error,`(LongPolling transport) Unexpected response code: ${p.statusCode}.`),this._closeError=new Ot(p.statusText||"",p.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(t,n){try{for(;this._running;)try{const o=`${t}&_=${Date.now()}`;this._logger.log(x.Trace,`(LongPolling transport) polling: ${o}.`);const r=await this._httpClient.get(o,n);r.statusCode===204?(this._logger.log(x.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):r.statusCode!==200?(this._logger.log(x.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new Ot(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(x.Trace,`(LongPolling transport) data received. ${Yt(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(x.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof Cn?this._logger.log(x.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(x.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(x.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Vo(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(x.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(x.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,o]=jt();t[n]=o;const r={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,r),this._logger.log(x.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(x.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(x.Trace,t),this.onclose(this._closeError)}}}class Ra{constructor(t,n,o,r){this._httpClient=t,this._accessToken=n,this._logger=o,this._options=r,this.onreceive=null,this.onclose=null}async connect(t,n){return V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,tt,"transferFormat"),this._logger.log(x.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,r)=>{let i,s=!1;if(n===tt.Text){if(K.isBrowser||K.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const c=this._httpClient.getCookieString(t),p={};p.Cookie=c;const[m,_]=jt();p[m]=_,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...p,...this._options.headers}})}try{i.onmessage=c=>{if(this.onreceive)try{this._logger.log(x.Trace,`(SSE transport) data received. ${Yt(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(p){return void this._close(p)}},i.onerror=c=>{s?this._close():r(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(x.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,o()}}catch(c){return void r(c)}}else r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})}async send(t){return this._eventSource?Vo(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class Pa{constructor(t,n,o,r,i,s){this._logger=o,this._accessTokenFactory=n,this._logMessageContent=r,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=s}async connect(t,n){let o;return V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,tt,"transferFormat"),this._logger.log(x.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(o=await this._accessTokenFactory()),new Promise((r,i)=>{let s;t=t.replace(/^http/,"ws");const c=this._httpClient.getCookieString(t);let p=!1;if(K.isNode||K.isReactNative){const m={},[_,C]=jt();m[_]=C,o&&(m[At.Authorization]=`Bearer ${o}`),c&&(m[At.Cookie]=c),s=new this._webSocketConstructor(t,void 0,{headers:{...m,...this._headers}})}else o&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(t)),n===tt.Binary&&(s.binaryType="arraybuffer"),s.onopen=m=>{this._logger.log(x.Information,`WebSocket connected to ${t}.`),this._webSocket=s,p=!0,r()},s.onerror=m=>{let _=null;_=typeof ErrorEvent<"u"&&m instanceof ErrorEvent?m.error:"There was an error with the transport",this._logger.log(x.Information,`(WebSockets transport) ${_}.`)},s.onmessage=m=>{if(this._logger.log(x.Trace,`(WebSockets transport) data received. ${Yt(m.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(m.data)}catch(_){return void this._close(_)}},s.onclose=m=>{if(p)this._close(m);else{let _=null;_=typeof ErrorEvent<"u"&&m instanceof ErrorEvent?m.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(_))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(x.Trace,`(WebSockets transport) sending data. ${Yt(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(x.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(t)||t.wasClean!==!1&&t.code===1e3?t instanceof Error?this.onclose(t):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)))}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}class za{constructor(t,n={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,V.isRequired(t,"url"),this._logger=(o=n.logger)===void 0?new be(x.Information):o===null?Jt.instance:o.log!==void 0?o:new be(o),this.baseUrl=this._resolveUrl(t),(n=n||{}).logMessageContent=n.logMessageContent!==void 0&&n.logMessageContent,typeof n.withCredentials!="boolean"&&n.withCredentials!==void 0)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.withCredentials=n.withCredentials===void 0||n.withCredentials,n.timeout=n.timeout===void 0?1e5:n.timeout;let r=null,i=null;if(K.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),i=s("eventsource")}K.isNode||typeof WebSocket>"u"||n.WebSocket?K.isNode&&!n.WebSocket&&r&&(n.WebSocket=r):n.WebSocket=WebSocket,K.isNode||typeof EventSource>"u"||n.EventSource?K.isNode&&!n.EventSource&&i!==void 0&&(n.EventSource=i):n.EventSource=EventSource,this._httpClient=new Ia(n.httpClient||new Ca(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||tt.Binary,V.isIn(t,tt,"transferFormat"),this._logger.log(x.Debug,`Starting connection with transfer format '${tt[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(x.Error,n),await this._stopPromise,Promise.reject(new ft(n))}if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(x.Error,n),Promise.reject(new ft(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Un(this.transport)),this._sendQueue.send(t))}async stop(t){return this._connectionState==="Disconnected"?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):this._connectionState==="Disconnecting"?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),void await this._stopPromise)}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(x.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(x.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==J.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(J.WebSockets),await this._startTransport(n,t)}else{let o=null,r=0;do{if(o=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ft("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(n=o.url),o.accessToken){const i=o.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}r++}while(o.url&&r<100);if(r===100&&o.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,o,t)}this.transport instanceof Zo&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(x.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(x.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}}async _getNegotiationResponse(t){const n={},[o,r]=jt();n[o]=r;const i=this._resolveNegotiateUrl(t);this._logger.log(x.Debug,`Sending negotiation request: ${i}.`);try{const s=await this._httpClient.post(i,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const c=JSON.parse(s.content);return(!c.negotiateVersion||c.negotiateVersion<1)&&(c.connectionToken=c.connectionId),c}catch(s){let c="Failed to complete negotiation with the server: "+s;return s instanceof Ot&&s.statusCode===404&&(c+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(x.Error,c),Promise.reject(new fa(c))}}_createConnectUrl(t,n){return n?t+(t.indexOf("?")===-1?"?":"&")+`id=${n}`:t}async _createTransport(t,n,o,r){let i=this._createConnectUrl(t,o.connectionToken);if(this._isITransport(n))return this._logger.log(x.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(i,r),void(this.connectionId=o.connectionId);const s=[],c=o.availableTransports||[];let p=o;for(const m of c){const _=this._resolveTransportOrError(m,n,r);if(_ instanceof Error)s.push(`${m.transport} failed:`),s.push(_);else if(this._isITransport(_)){if(this.transport=_,!p){try{p=await this._getNegotiationResponse(t)}catch(C){return Promise.reject(C)}i=this._createConnectUrl(t,p.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=p.connectionId)}catch(C){if(this._logger.log(x.Error,`Failed to start the transport '${m.transport}': ${C}`),p=void 0,s.push(new pa(`${m.transport} failed: ${C}`,J[m.transport])),this._connectionState!=="Connecting"){const M="Failed to select transport before stop() was called.";return this._logger.log(x.Debug,M),Promise.reject(new ft(M))}}}}return s.length>0?Promise.reject(new ga(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case J.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Pa(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case J.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Ra(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case J.LongPolling:return new Zo(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(t,n)}_resolveTransportOrError(t,n,o){const r=J[t.transport];if(r==null)return this._logger.log(x.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(!function(i,s){return!i||(s&i)!=0}(n,r))return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it was disabled by the client.`),new da(`'${J[r]}' is disabled by the client.`,r);{if(!(t.transferFormats.map(s=>tt[s]).indexOf(o)>=0))return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it does not support the requested transfer format '${tt[o]}'.`),new Error(`'${J[r]}' does not support ${tt[o]}.`);if(r===J.WebSockets&&!this._options.WebSocket||r===J.ServerSentEvents&&!this._options.EventSource)return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it is not supported in your environment.'`),new ua(`'${J[r]}' is not supported in your environment.`,r);this._logger.log(x.Debug,`Selecting transport '${J[r]}'.`);try{return this._constructTransport(r)}catch(s){return s}}}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(x.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState!=="Disconnected"){if(this._connectionState==="Connecting")throw this._logger.log(x.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(x.Error,`Connection disconnected with error '${t}'.`):this._logger.log(x.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(x.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(x.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}else this._logger.log(x.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!K.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(x.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=t.indexOf("?");let o=t.substring(0,n===-1?t.length:n);return o[o.length-1]!=="/"&&(o+="/"),o+="negotiate",o+=n===-1?"":t.substring(n),o.indexOf("negotiateVersion")===-1&&(o+=n===-1?"?":"&",o+="negotiateVersion="+this._negotiateVersion),o}}class Un{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new _e,this._transportResult=new _e,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new _e),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new _e;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Un._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(o){t.reject(o)}}}static _concatBuffers(t){const n=t.map(i=>i.byteLength).reduce((i,s)=>i+s),o=new Uint8Array(n);let r=0;for(const i of t)o.set(new Uint8Array(i),r),r+=i.byteLength;return o.buffer}}class _e{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}class Da{constructor(){this.name="json",this.version=1,this.transferFormat=tt.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=Jt.instance);const o=dt.parse(t),r=[];for(const i of o){const s=JSON.parse(i);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case q.Invocation:this._isInvocationMessage(s);break;case q.StreamItem:this._isStreamItemMessage(s);break;case q.Completion:this._isCompletionMessage(s);break;case q.Ping:case q.Close:break;default:n.log(x.Information,"Unknown message type '"+s.type+"' ignored.");continue}r.push(s)}return r}writeMessage(t){return dt.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const Ma={trace:x.Trace,debug:x.Debug,info:x.Information,information:x.Information,warn:x.Warning,warning:x.Warning,error:x.Error,critical:x.Critical,none:x.None};class $a{configureLogging(t){if(V.isRequired(t,"logging"),t.log!==void 0)this.logger=t;else if(typeof t=="string"){const n=function(o){const r=Ma[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(t);this.logger=new be(n)}else this.logger=new be(t);return this}withUrl(t,n){return V.isRequired(t,"url"),V.isNotEmpty(t,"url"),this.url=t,this.httpConnectionOptions=typeof n=="object"?{...this.httpConnectionOptions,...n}:{...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return V.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Yo(t):this.reconnectPolicy=t:this.reconnectPolicy=new Yo,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new za(this.url,t);return Bn.create(n,this.logger||Jt.instance,this.protocol||new Da,this.reconnectPolicy)}}let Se;function Aa(e){if(!e){if(Se)return Se;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const t=new $a().configureLogging(x.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then(()=>{L.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),t.onclose(async()=>{L.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),t.onreconnecting(()=>{L.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),t.onreconnected(()=>{L.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),Se||(Se=t),t}const at=ao({panelGroups:{}}),Qo=()=>({useGroupAccordion:e=>Et(()=>at.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{at.panelGroups[e]={...at.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>Et(()=>at.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{at.panelGroups[e]={...at.panelGroups[e],panelExpandStatus:{...at.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{at.panelGroups[e].accordion&&(at.panelGroups[e].panelExpandStatus[t]||Object.keys(at.panelGroups[e].panelExpandStatus).forEach(n=>{at.panelGroups[e].panelExpandStatus[n]=!1})),at.panelGroups[e].panelExpandStatus[t]=!at.panelGroups[e].panelExpandStatus[t]}}),En=e=>e>255?255:e<0?0:e,Ce=(e,t)=>{const n=e.replace("#",""),o=parseInt(n,16),r=En((o>>16)+t),i=En((o>>8&255)+t);return"#"+(En((255&o)+t)|i<<8|r<<16).toString(16)};var Ee=Ft({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=ht(`group-${he()}`),{setGroupAccordionStatus:n}=Qo(),o={"--base-color":e.baseColor,"--border-color":Ce(e.baseColor,180),"--bg-color-header":Ce(e.baseColor,140),"--bg-color-header-hover":Ce(e.baseColor,190),"--bg-color-header-active":Ce(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:o}}});const La=["data-id-group"];Ee.render=function(e,t,n,o,r,i){return G(),ot("div",{"data-id-group":e.idGroup,style:kt(e.cssColorVars),class:"vcpg"},[Ct(e.$slots,"default")],12,La)},Ee.__scopeId="data-v-23ab5317",Ee.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var xe=Ft({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${he()}`,o=ht(),r=ht(),i=ht(),{panelExpanded:s,togglePanelExpandedStatus:c,setPanelExpandedStatus:p}=Qo(),m=Et(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:he()})),_=Et(()=>o.value?.parentElement?.getAttribute("data-id-group")||""),C=Et(()=>s(_.value,n).value&&m.value.hasContent);return Ve(()=>{p(_.value,n,e.expanded)}),pi(()=>{(async()=>(await Ke(),r.value&&i.value&&(r.value.style.height=`${Math.min(i.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:m,panelRef:o,bodyRef:r,bodyContentRef:i,isExpanded:C,collapse:M=>{M.style.height="0"},expand:M=>{M.style.height=`${M.scrollHeight}px`},toggle:()=>{m.value.hasContent&&c(_.value,n)},toggleIcon:`
12
+ `,de(n+o+"export default iconlist;","IconifyList.ts"))}function Bs(e,t){const n=No(e);go(n,t),L.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function Us(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d]/g,""),t=t.replace(/^0/g,""),t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t}function Os(e){let t=wn(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function wn(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[^\d.]/g,""),t=t.replace(/^0{2}$/g,"0"),t=t.replace(/^\./g,""),t=t.replace(".","$#$").replace(/\./g,"").replace("$#$","."),t=t.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),t}function js(e){let t=e.replace(/(^\s*)|(\s*$)/g,"");return t=t.replace(/[\.]*/g,""),t=t.replace(/(^0[\d]*)$/g,"0"),t=t.replace(/^0\d$/g,"0"),t=t.replace(/[^\d]/g,""),t}function Ws(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Hs(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function Fs(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function qs(e){let t=wn(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function Gs(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function Xs(e,t="\u4EDF\u4F70\u62FE\u4EBF\u4EDF\u4F70\u62FE\u4E07\u4EDF\u4F70\u62FE\u5143\u89D2\u5206",n=""){let o=(e+="00").indexOf(".");o>=0&&(e=e.substring(0,o)+e.substr(o+1,2)),t=t.substr(t.length-e.length);for(let r=0;r<e.length;r++)n+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".substr(e.substr(r,1),1)+t.substr(r,1);return n=n.replace(/零角零分$/,"\u6574").replace(/零[仟佰拾]/g,"\u96F6").replace(/零{2,}/g,"\u96F6").replace(/零([亿|万])/g,"$1").replace(/零+元/,"\u5143").replace(/亿零{0,3}万/,"\u4EBF").replace(/^元/,"\u96F6\u5143")}function Vs(e){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(e)}function Ks(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function Js(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function Ys(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function Zs(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function Qs(e){let t="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(e)&&(t="\u5F31"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="\u4E2D"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)&&(t="\u5F3A"),t}function ta(e){return!!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(e)}function ea(e){return!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function na(e){return!!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(e)}function oa(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function ra(e){return!!/^[1-9][0-9]{5}$/.test(e)}function ia(e){return!!/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)}function sa(e){return!!/^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test(e)}let Oo=!0;try{String.fromCharCode.apply(String,[1,2])}catch{Oo=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var bn=2654435769;function jo(e,t){var n=e.length,o=n<<2;if(t){var r=e[n-1];if(r<(o-=4)-3||r>o)return null;o=r}for(var i=new Uint8Array(o),s=0;s<o;++s)i[s]=e[s>>2]>>((3&s)<<3);return i}function ge(e,t){var n,o=e.length,r=o>>2;3&o&&++r,t?(n=new Uint32Array(r+1))[r]=o:n=new Uint32Array(r);for(var i=0;i<o;++i)n[i>>2]|=e[i]<<((3&i)<<3);return n}function Mt(e){return 4294967295&e}function me(e,t,n,o,r,i){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(i[3&o^r]^n)}function Wo(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function ve(e){for(var t=e.length,n=new Uint8Array(3*t),o=0,r=0;r<t;r++){var i=e.charCodeAt(r);if(i<128)n[o++]=i;else if(i<2048)n[o++]=192|i>>6,n[o++]=128|63&i;else{if(!(i<55296||i>57343)){if(r+1<t){var s=e.charCodeAt(r+1);if(i<56320&&56320<=s&&s<=57343){var c=65536+((1023&i)<<10|1023&s);n[o++]=240|c>>18,n[o++]=128|c>>12&63,n[o++]=128|c>>6&63,n[o++]=128|63&c,r++;continue}}throw new Error("Malformed string")}n[o++]=224|i>>12,n[o++]=128|i>>6&63,n[o++]=128|63&i}}return n.subarray(0,o)}function Ho(e){var t=e.length;return t===0?"":t<32767?function(n,o){for(var r=new Array(o),i=0,s=0,c=n.length;i<o&&s<c;i++){var d=n[s++];switch(d>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=d;break;case 12:case 13:if(!(s<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&d)<<6|63&n[s++];break;case 14:if(!(s+1<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&d)<<12|(63&n[s++])<<6|63&n[s++];break;case 15:if(!(s+2<c))throw new Error("Unfinished UTF-8 octet sequence");var m=((7&d)<<18|(63&n[s++])<<12|(63&n[s++])<<6|63&n[s++])-65536;if(!(0<=m&&m<=1048575))throw new Error("Character outside valid Unicode range: 0x"+m.toString(16));r[i++]=m>>10&1023|55296,r[i]=1023&m|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+d.toString(16))}}return i<o&&(r.length=i),String.fromCharCode.apply(String,r)}(e,t):function(n,o){for(var r=[],i=new Array(32768),s=0,c=0,d=n.length;s<o&&c<d;s++){var m=n[c++];switch(m>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[s]=m;break;case 12:case 13:if(!(c<d))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&m)<<6|63&n[c++];break;case 14:if(!(c+1<d))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(15&m)<<12|(63&n[c++])<<6|63&n[c++];break;case 15:if(!(c+2<d))throw new Error("Unfinished UTF-8 octet sequence");var S=((7&m)<<18|(63&n[c++])<<12|(63&n[c++])<<6|63&n[c++])-65536;if(!(0<=S&&S<=1048575))throw new Error("Character outside valid Unicode range: 0x"+S.toString(16));i[s++]=S>>10&1023|55296,i[s]=1023&S|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+m.toString(16))}if(s>=32766){var C=s+1;i.length=C,r.push(String.fromCharCode.apply(String,i)),o-=C,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(e,t)}function aa(e){var t=e.length;if(t===0)return"";var n=Oo?e:function(c){for(var d=c.length,m=new Array(c.length),S=0;S<d;++S)m[S]=c[S];return m}(e);if(t<65535)return String.fromCharCode.apply(String,n);for(var o=32767&t,r=t>>15,i=new Array(o?r+1:r),s=0;s<r;++s)i[s]=String.fromCharCode.apply(String,n.subarray(s<<15,s+1<<15));return o&&(i[r]=String.fromCharCode.apply(String,n.subarray(r<<15,t))),i.join("")}function Fo(e,t){return typeof e=="string"&&(e=ve(e)),typeof t=="string"&&(t=ve(t)),e==null||e.length===0?e:jo(function(n,o){var r,i,s,c,d,m,S=n.length,C=S-1;for(i=n[C],s=0,m=0|Math.floor(6+52/S);m>0;--m){for(c=(s=Mt(s+bn))>>>2&3,d=0;d<C;++d)r=n[d+1],i=n[d]=Mt(n[d]+me(s,r,i,d,c,o));r=n[0],i=n[C]=Mt(n[C]+me(s,r,i,C,c,o))}return n}(ge(e,!0),ge(Wo(t),!1)),!1)}function qo(e,t){return typeof e=="string"&&(e=function(n){for(var o=window.atob(n),r=o.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=o.charCodeAt(s);return i}(e)),typeof t=="string"&&(t=ve(t)),e==null||e.length===0?e:jo(function(n,o){var r,i,s,c,d,m=n.length,S=m-1;for(r=n[0],s=Mt(Math.floor(6+52/m)*bn);s!==0;s=Mt(s-bn)){for(c=s>>>2&3,d=S;d>0;--d)i=n[d-1],r=n[d]=Mt(n[d]-me(s,r,i,d,c,o));i=n[S],r=n[0]=Mt(n[0]-me(s,r,i,0,c,o))}return n}(ge(e,!1),ge(Wo(t),!1)),!0)}const Vt={toBytes:ve,toString:Ho,encrypt:Fo,encryptToString:function(e,t){return window.btoa(aa(Fo(e,t)))},decrypt:qo,decryptToString:function(e,t){return Ho(qo(e,t))}},Go=e=>{const t="1.23452384164.123412416";document.getElementById(t)!==null&&document.body.removeChild(document.getElementById(t));const n=document.createElement("canvas");n.width=200,n.height=130;const o=n.getContext("2d");o.rotate(-20*Math.PI/180),o.font="12px Vedana",o.fillStyle="rgba(200, 200, 200, 0.30)",o.textBaseline="middle",o.fillText(e,n.width/10,n.height/2);const r=document.createElement("div");return r.id=t,r.style.pointerEvents="none",r.style.top="0px",r.style.left="0px",r.style.position="fixed",r.style.zIndex="10000000",r.style.width=`${document.documentElement.clientWidth}px`,r.style.height=`${document.documentElement.clientHeight}px`,r.style.background=`url(${n.toDataURL("image/png")}) left top repeat`,document.body.appendChild(r),t},ca={set:e=>{let t=Go(e);document.getElementById(t)===null&&(t=Go(e))},del:()=>{let e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e))}};class Ot extends Error{constructor(t,n){const o=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=o}}class _n extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class gt extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class la extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=o}}class ha extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=o}}class ua extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=o}}class da extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class pa extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=o}}class Xo{constructor(t,n,o){this.statusCode=t,this.statusText=n,this.content=o}}class ye{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var x;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(x||(x={}));class Kt{constructor(){}log(t,n){}}Kt.instance=new Kt;class V{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,o){if(!(t in n))throw new Error(`Unknown ${o} value: ${t}.`)}}class K{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&window.document===void 0}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Jt(e,t){let n="";return Yt(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${function(o){const r=new Uint8Array(o);let i="";return r.forEach(s=>{i+=`0x${s<16?"0":""}${s.toString(16)} `}),i.substr(0,i.length-1)}(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Yt(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Vo(e,t,n,o,r,i){const s={},[c,d]=jt();s[c]=d,e.log(x.Trace,`(${t} transport) sending data. ${Jt(r,i.logMessageContent)}.`);const m=Yt(r)?"arraybuffer":"text",S=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:m,timeout:i.timeout,withCredentials:i.withCredentials});e.log(x.Trace,`(${t} transport) request complete. Response status: ${S.statusCode}.`)}class fa{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class we{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const o=`[${new Date().toISOString()}] ${x[t]}: ${n}`;switch(t){case x.Critical:case x.Error:this.out.error(o);break;case x.Warning:this.out.warn(o);break;case x.Information:this.out.info(o);break;default:this.out.log(o)}}}}function jt(){let e="X-SignalR-User-Agent";return K.isNode&&(e="User-Agent"),[e,ga("7.0.5",ma(),ya(),va())]}function ga(e,t,n,o){let r="Microsoft SignalR/";const i=e.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${e}; `,r+=t&&t!==""?`${t}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function ma(){if(!K.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function va(){if(K.isNode)return process.versions.node}function ya(){return K.isNode?"NodeJS":"Browser"}function Ko(e){return e.stack?e.stack:e.message?e.message:`${e}`}class wa extends ye{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,this._fetchType=n("node-fetch"),this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new gt;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let o;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),o=new gt});let r,i=null;if(t.timeout){const d=t.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(x.Warning,"Timeout from HTTP request."),o=new _n},d)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Yt(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");try{r=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(d){throw o||(this._logger.log(x.Warning,`Error from HTTP request. ${d}.`),d)}finally{i&&clearTimeout(i),t.abortSignal&&(t.abortSignal.onabort=null)}if(!r.ok){const d=await Jo(r,"text");throw new Ot(d||r.statusText,r.status)}const s=Jo(r,t.responseType),c=await s;return new Xo(r.status,r.statusText,c)}getCookieString(t){let n="";return K.isNode&&this._jar&&this._jar.getCookies(t,(o,r)=>n=r.join("; ")),n}}function Jo(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class ba extends ye{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new gt):t.method?t.url?new Promise((n,o)=>{const r=new XMLHttpRequest;r.open(t.method,t.url,!0),r.withCredentials=t.withCredentials===void 0||t.withCredentials,r.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(Yt(t.content)?r.setRequestHeader("Content-Type","application/octet-stream"):r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(s=>{r.setRequestHeader(s,i[s])}),t.responseType&&(r.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),o(new gt)}),t.timeout&&(r.timeout=t.timeout),r.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),r.status>=200&&r.status<300?n(new Xo(r.status,r.statusText,r.response||r.responseText)):o(new Ot(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(x.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),o(new Ot(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(x.Warning,"Timeout from HTTP request."),o(new _n)},r.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class _a extends ye{constructor(t){if(super(),typeof fetch<"u"||K.isNode)this._httpClient=new wa(t);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new ba(t)}}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new gt):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class pt{static write(t){return`${t}${pt.RecordSeparator}`}static parse(t){if(t[t.length-1]!==pt.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(pt.RecordSeparator);return n.pop(),n}}pt.RecordSeparatorCode=30,pt.RecordSeparator=String.fromCharCode(pt.RecordSeparatorCode);class Sa{writeHandshakeRequest(t){return pt.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,o;if(Yt(t)){const s=new Uint8Array(t),c=s.indexOf(pt.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const d=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,d))),o=s.byteLength>d?s.slice(d).buffer:null}else{const s=t,c=s.indexOf(pt.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const d=c+1;n=s.substring(0,d),o=s.length>d?s.substring(d):null}const r=pt.parse(n),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var q;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(q||(q={}));class Ca{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new fa(this,t)}}var X;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(X||(X={}));class Ln{constructor(t,n,o,r){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(x.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},V.isRequired(t,"connection"),V.isRequired(n,"logger"),V.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=3e4,this.keepAliveIntervalInMilliseconds=15e3,this._logger=n,this._protocol=o,this.connection=t,this._reconnectPolicy=r,this._handshakeProtocol=new Sa,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=X.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:q.Ping})}static create(t,n,o,r){return new Ln(t,n,o,r)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==X.Disconnected&&this._connectionState!==X.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==X.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=X.Connecting,this._logger.log(x.Debug,"Starting HubConnection.");try{await this._startInternal(),K.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=X.Connected,this._connectionStarted=!0,this._logger.log(x.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=X.Disconnected,this._logger.log(x.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,o)=>{this._handshakeResolver=n,this._handshakeRejecter=o});await this.connection.start(this._protocol.transferFormat);try{const n={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(x.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(x.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(x.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===X.Disconnected?(this._logger.log(x.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===X.Disconnecting?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=X.Disconnecting,this._logger.log(x.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(x.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new gt("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createStreamInvocation(t,n,r);let s;const c=new Ca;return c.cancelCallback=()=>{const d=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(d))},this._callbacks[i.invocationId]=(d,m)=>{m?c.error(m):d&&(d.type===q.Completion?d.error?c.error(new Error(d.error)):c.complete():c.next(d.item))},s=this._sendWithProtocol(i).catch(d=>{c.error(d),delete this._callbacks[i.invocationId]}),this._launchStreams(o,s),c}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._sendWithProtocol(this._createInvocation(t,n,!0,r));return this._launchStreams(o,i),i}invoke(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createInvocation(t,n,!1,r);return new Promise((c,d)=>{this._callbacks[i.invocationId]=(S,C)=>{C?d(C):S&&(S.type===q.Completion?S.error?d(new Error(S.error)):c(S.result):d(new Error(`Unexpected message type: ${S.type}`)))};const m=this._sendWithProtocol(i).catch(S=>{d(S),delete this._callbacks[i.invocationId]});this._launchStreams(o,m)})}on(t,n){t&&n&&(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const o=this._methods[t];if(o)if(n){const r=o.indexOf(n);r!==-1&&(o.splice(r,1),o.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const o of n)switch(o.type){case q.Invocation:this._invokeClientMethod(o);break;case q.StreamItem:case q.Completion:{const r=this._callbacks[o.invocationId];if(r){o.type===q.Completion&&delete this._callbacks[o.invocationId];try{r(o)}catch(i){this._logger.log(x.Error,`Stream callback threw error: ${Ko(i)}`)}}break}case q.Ping:break;case q.Close:{this._logger.log(x.Information,"Close message received from server.");const r=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(r):this._stopPromise=this._stopInternal(r);break}default:this._logger.log(x.Warning,`Invalid message type: ${o.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,o;try{[o,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(r){const i="Error parsing handshake response: "+r;this._logger.log(x.Error,i);const s=new Error(i);throw this._handshakeRejecter(s),s}if(n.error){const r="Server returned handshake error: "+n.error;this._logger.log(x.Error,r);const i=new Error(r);throw this._handshakeRejecter(i),i}return this._logger.log(x.Debug,"Server handshake complete."),this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle!==void 0))){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===X.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),o=this._methods[n];if(!o)return this._logger.log(x.Warning,`No client method with the name '${n}' found.`),void(t.invocationId&&(this._logger.log(x.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null))));const r=o.slice(),i=!!t.invocationId;let s,c,d;for(const m of r)try{const S=s;s=await m.apply(this,t.arguments),i&&s&&S&&(this._logger.log(x.Error,`Multiple results provided for '${n}'. Sending error to server.`),d=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),c=void 0}catch(S){c=S,this._logger.log(x.Error,`A callback for the method '${n}' threw error '${S}'.`)}d?await this._sendWithProtocol(d):i?(c?d=this._createCompletionMessage(t.invocationId,`${c}`,null):s!==void 0?d=this._createCompletionMessage(t.invocationId,null,s):(this._logger.log(x.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),d=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(d)):s&&this._logger.log(x.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(x.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new gt("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===X.Disconnecting?this._completeClose(t):this._connectionState===X.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===X.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=X.Disconnected,this._connectionStarted=!1,K.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(x.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let o=0,r=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(o++,0,r);if(i===null)return this._logger.log(x.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(t);if(this._connectionState=X.Reconnecting,t?this._logger.log(x.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(x.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[t]))}catch(s){this._logger.log(x.Error,`An onreconnecting callback called with error '${t}' threw error '${s}'.`)}if(this._connectionState!==X.Reconnecting)return void this._logger.log(x.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;i!==null;){if(this._logger.log(x.Information,`Reconnect attempt number ${o} will start in ${i} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==X.Reconnecting)return void this._logger.log(x.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=X.Connected,this._logger.log(x.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(x.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(x.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==X.Reconnecting)return this._logger.log(x.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===X.Disconnecting&&this._completeClose());r=s instanceof Error?s:new Error(s.toString()),i=this._getNextRetryDelay(o++,Date.now()-n,r)}}this._logger.log(x.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:o})}catch(r){return this._logger.log(x.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${r}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(o=>{const r=n[o];try{r(null,t)}catch(i){this._logger.log(x.Error,`Stream 'error' callback called with '${t}' threw error: ${Ko(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,o,r){if(o)return r.length!==0?{arguments:n,streamIds:r,target:t,type:q.Invocation}:{arguments:n,target:t,type:q.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:n,invocationId:i.toString(),streamIds:r,target:t,type:q.Invocation}:{arguments:n,invocationId:i.toString(),target:t,type:q.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const o in t)t[o].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:r=>{let i;i=r instanceof Error?r.message:r&&r.toString?r.toString():"Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:r=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,r)))}})}}_replaceStreamingParams(t){const n=[],o=[];for(let r=0;r<t.length;r++){const i=t[r];if(this._isObservable(i)){const s=this._invocationId;this._invocationId++,n[s]=i,o.push(s.toString()),t.splice(r,1)}}return[n,o]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,o){const r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:n,invocationId:r.toString(),streamIds:o,target:t,type:q.StreamInvocation}:{arguments:n,invocationId:r.toString(),target:t,type:q.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:q.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:q.StreamItem}}_createCompletionMessage(t,n,o){return n?{error:n,invocationId:t,type:q.Completion}:{invocationId:t,result:o,type:q.Completion}}}const Ea=[0,2e3,1e4,3e4,null];class Yo{constructor(t){this._retryDelays=t!==void 0?[...t,null]:Ea}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class At{}At.Authorization="Authorization",At.Cookie="Cookie";class xa extends ye{constructor(t,n){super(),this._innerClient=t,this._accessTokenFactory=n}async send(t){let n=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const o=await this._innerClient.send(t);return n&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):o}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[At.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[At.Authorization]&&delete t.headers[At.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var J,et;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(J||(J={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(et||(et={}));class ka{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class Zo{constructor(t,n,o){this._httpClient=t,this._logger=n,this._pollAbort=new ka,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,n){if(V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,et,"transferFormat"),this._url=t,this._logger.log(x.Trace,"(LongPolling transport) Connecting."),n===et.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[o,r]=jt(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===et.Binary&&(s.responseType="arraybuffer");const c=`${t}&_=${Date.now()}`;this._logger.log(x.Trace,`(LongPolling transport) polling: ${c}.`);const d=await this._httpClient.get(c,s);d.statusCode!==200?(this._logger.log(x.Error,`(LongPolling transport) Unexpected response code: ${d.statusCode}.`),this._closeError=new Ot(d.statusText||"",d.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(t,n){try{for(;this._running;)try{const o=`${t}&_=${Date.now()}`;this._logger.log(x.Trace,`(LongPolling transport) polling: ${o}.`);const r=await this._httpClient.get(o,n);r.statusCode===204?(this._logger.log(x.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):r.statusCode!==200?(this._logger.log(x.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new Ot(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(x.Trace,`(LongPolling transport) data received. ${Jt(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(x.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof _n?this._logger.log(x.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(x.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(x.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Vo(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(x.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(x.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,o]=jt();t[n]=o;const r={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,r),this._logger.log(x.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(x.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(x.Trace,t),this.onclose(this._closeError)}}}class Ia{constructor(t,n,o,r){this._httpClient=t,this._accessToken=n,this._logger=o,this._options=r,this.onreceive=null,this.onclose=null}async connect(t,n){return V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,et,"transferFormat"),this._logger.log(x.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,r)=>{let i,s=!1;if(n===et.Text){if(K.isBrowser||K.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const c=this._httpClient.getCookieString(t),d={};d.Cookie=c;const[m,S]=jt();d[m]=S,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...d,...this._options.headers}})}try{i.onmessage=c=>{if(this.onreceive)try{this._logger.log(x.Trace,`(SSE transport) data received. ${Jt(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(d){return void this._close(d)}},i.onerror=c=>{s?this._close():r(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(x.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,o()}}catch(c){return void r(c)}}else r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})}async send(t){return this._eventSource?Vo(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class Ta{constructor(t,n,o,r,i,s){this._logger=o,this._accessTokenFactory=n,this._logMessageContent=r,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=s}async connect(t,n){let o;return V.isRequired(t,"url"),V.isRequired(n,"transferFormat"),V.isIn(n,et,"transferFormat"),this._logger.log(x.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(o=await this._accessTokenFactory()),new Promise((r,i)=>{let s;t=t.replace(/^http/,"ws");const c=this._httpClient.getCookieString(t);let d=!1;if(K.isNode||K.isReactNative){const m={},[S,C]=jt();m[S]=C,o&&(m[At.Authorization]=`Bearer ${o}`),c&&(m[At.Cookie]=c),s=new this._webSocketConstructor(t,void 0,{headers:{...m,...this._headers}})}else o&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(t)),n===et.Binary&&(s.binaryType="arraybuffer"),s.onopen=m=>{this._logger.log(x.Information,`WebSocket connected to ${t}.`),this._webSocket=s,d=!0,r()},s.onerror=m=>{let S=null;S=typeof ErrorEvent<"u"&&m instanceof ErrorEvent?m.error:"There was an error with the transport",this._logger.log(x.Information,`(WebSockets transport) ${S}.`)},s.onmessage=m=>{if(this._logger.log(x.Trace,`(WebSockets transport) data received. ${Jt(m.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(m.data)}catch(S){return void this._close(S)}},s.onclose=m=>{if(d)this._close(m);else{let S=null;S=typeof ErrorEvent<"u"&&m instanceof ErrorEvent?m.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(S))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(x.Trace,`(WebSockets transport) sending data. ${Jt(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(x.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(t)||t.wasClean!==!1&&t.code===1e3?t instanceof Error?this.onclose(t):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)))}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}class Ra{constructor(t,n={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,V.isRequired(t,"url"),this._logger=(o=n.logger)===void 0?new we(x.Information):o===null?Kt.instance:o.log!==void 0?o:new we(o),this.baseUrl=this._resolveUrl(t),(n=n||{}).logMessageContent=n.logMessageContent!==void 0&&n.logMessageContent,typeof n.withCredentials!="boolean"&&n.withCredentials!==void 0)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.withCredentials=n.withCredentials===void 0||n.withCredentials,n.timeout=n.timeout===void 0?1e5:n.timeout;let r=null,i=null;if(K.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),i=s("eventsource")}K.isNode||typeof WebSocket>"u"||n.WebSocket?K.isNode&&!n.WebSocket&&r&&(n.WebSocket=r):n.WebSocket=WebSocket,K.isNode||typeof EventSource>"u"||n.EventSource?K.isNode&&!n.EventSource&&i!==void 0&&(n.EventSource=i):n.EventSource=EventSource,this._httpClient=new xa(n.httpClient||new _a(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||et.Binary,V.isIn(t,et,"transferFormat"),this._logger.log(x.Debug,`Starting connection with transfer format '${et[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(x.Error,n),await this._stopPromise,Promise.reject(new gt(n))}if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(x.Error,n),Promise.reject(new gt(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Nn(this.transport)),this._sendQueue.send(t))}async stop(t){return this._connectionState==="Disconnected"?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):this._connectionState==="Disconnecting"?(this._logger.log(x.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),void await this._stopPromise)}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(x.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(x.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==J.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(J.WebSockets),await this._startTransport(n,t)}else{let o=null,r=0;do{if(o=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new gt("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(n=o.url),o.accessToken){const i=o.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}r++}while(o.url&&r<100);if(r===100&&o.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,o,t)}this.transport instanceof Zo&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(x.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(x.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}}async _getNegotiationResponse(t){const n={},[o,r]=jt();n[o]=r;const i=this._resolveNegotiateUrl(t);this._logger.log(x.Debug,`Sending negotiation request: ${i}.`);try{const s=await this._httpClient.post(i,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const c=JSON.parse(s.content);return(!c.negotiateVersion||c.negotiateVersion<1)&&(c.connectionToken=c.connectionId),c}catch(s){let c="Failed to complete negotiation with the server: "+s;return s instanceof Ot&&s.statusCode===404&&(c+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(x.Error,c),Promise.reject(new da(c))}}_createConnectUrl(t,n){return n?t+(t.indexOf("?")===-1?"?":"&")+`id=${n}`:t}async _createTransport(t,n,o,r){let i=this._createConnectUrl(t,o.connectionToken);if(this._isITransport(n))return this._logger.log(x.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(i,r),void(this.connectionId=o.connectionId);const s=[],c=o.availableTransports||[];let d=o;for(const m of c){const S=this._resolveTransportOrError(m,n,r);if(S instanceof Error)s.push(`${m.transport} failed:`),s.push(S);else if(this._isITransport(S)){if(this.transport=S,!d){try{d=await this._getNegotiationResponse(t)}catch(C){return Promise.reject(C)}i=this._createConnectUrl(t,d.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=d.connectionId)}catch(C){if(this._logger.log(x.Error,`Failed to start the transport '${m.transport}': ${C}`),d=void 0,s.push(new ua(`${m.transport} failed: ${C}`,J[m.transport])),this._connectionState!=="Connecting"){const D="Failed to select transport before stop() was called.";return this._logger.log(x.Debug,D),Promise.reject(new gt(D))}}}}return s.length>0?Promise.reject(new pa(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case J.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Ta(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case J.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Ia(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case J.LongPolling:return new Zo(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(t,n)}_resolveTransportOrError(t,n,o){const r=J[t.transport];if(r==null)return this._logger.log(x.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(!function(i,s){return!i||(s&i)!=0}(n,r))return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it was disabled by the client.`),new ha(`'${J[r]}' is disabled by the client.`,r);{if(!(t.transferFormats.map(s=>et[s]).indexOf(o)>=0))return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it does not support the requested transfer format '${et[o]}'.`),new Error(`'${J[r]}' does not support ${et[o]}.`);if(r===J.WebSockets&&!this._options.WebSocket||r===J.ServerSentEvents&&!this._options.EventSource)return this._logger.log(x.Debug,`Skipping transport '${J[r]}' because it is not supported in your environment.'`),new la(`'${J[r]}' is not supported in your environment.`,r);this._logger.log(x.Debug,`Selecting transport '${J[r]}'.`);try{return this._constructTransport(r)}catch(s){return s}}}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(x.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState!=="Disconnected"){if(this._connectionState==="Connecting")throw this._logger.log(x.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(x.Error,`Connection disconnected with error '${t}'.`):this._logger.log(x.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(x.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(x.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}else this._logger.log(x.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!K.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(x.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=t.indexOf("?");let o=t.substring(0,n===-1?t.length:n);return o[o.length-1]!=="/"&&(o+="/"),o+="negotiate",o+=n===-1?"":t.substring(n),o.indexOf("negotiateVersion")===-1&&(o+=n===-1?"?":"&",o+="negotiateVersion="+this._negotiateVersion),o}}class Nn{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new be,this._transportResult=new be,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new be),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new be;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Nn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(o){t.reject(o)}}}static _concatBuffers(t){const n=t.map(i=>i.byteLength).reduce((i,s)=>i+s),o=new Uint8Array(n);let r=0;for(const i of t)o.set(new Uint8Array(i),r),r+=i.byteLength;return o.buffer}}class be{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}class Pa{constructor(){this.name="json",this.version=1,this.transferFormat=et.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=Kt.instance);const o=pt.parse(t),r=[];for(const i of o){const s=JSON.parse(i);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case q.Invocation:this._isInvocationMessage(s);break;case q.StreamItem:this._isStreamItemMessage(s);break;case q.Completion:this._isCompletionMessage(s);break;case q.Ping:case q.Close:break;default:n.log(x.Information,"Unknown message type '"+s.type+"' ignored.");continue}r.push(s)}return r}writeMessage(t){return pt.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const za={trace:x.Trace,debug:x.Debug,info:x.Information,information:x.Information,warn:x.Warning,warning:x.Warning,error:x.Error,critical:x.Critical,none:x.None};class $a{configureLogging(t){if(V.isRequired(t,"logging"),t.log!==void 0)this.logger=t;else if(typeof t=="string"){const n=function(o){const r=za[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(t);this.logger=new we(n)}else this.logger=new we(t);return this}withUrl(t,n){return V.isRequired(t,"url"),V.isNotEmpty(t,"url"),this.url=t,this.httpConnectionOptions=typeof n=="object"?{...this.httpConnectionOptions,...n}:{...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return V.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new Yo(t):this.reconnectPolicy=t:this.reconnectPolicy=new Yo,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new Ra(this.url,t);return Ln.create(n,this.logger||Kt.instance,this.protocol||new Pa,this.reconnectPolicy)}}let _e;function Da(e){if(!e){if(_e)return _e;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const t=new $a().configureLogging(x.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then(()=>{L.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),t.onclose(async()=>{L.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),t.onreconnecting(()=>{L.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),t.onreconnected(()=>{L.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),_e||(_e=t),t}const at=io({panelGroups:{}}),Qo=()=>({useGroupAccordion:e=>Et(()=>at.panelGroups[e].accordion),setGroupAccordionStatus:(e,t)=>{at.panelGroups[e]={...at.panelGroups[e],accordion:t}},panelExpanded:(e,t)=>Et(()=>at.panelGroups[e]?.panelExpandStatus?.[t]||!1),setPanelExpandedStatus:(e,t,n)=>{at.panelGroups[e]={...at.panelGroups[e],panelExpandStatus:{...at.panelGroups[e]?.panelExpandStatus||{},[t]:n}}},togglePanelExpandedStatus:(e,t)=>{at.panelGroups[e].accordion&&(at.panelGroups[e].panelExpandStatus[t]||Object.keys(at.panelGroups[e].panelExpandStatus).forEach(n=>{at.panelGroups[e].panelExpandStatus[n]=!1})),at.panelGroups[e].panelExpandStatus[t]=!at.panelGroups[e].panelExpandStatus[t]}}),Sn=e=>e>255?255:e<0?0:e,Se=(e,t)=>{const n=e.replace("#",""),o=parseInt(n,16),r=Sn((o>>16)+t),i=Sn((o>>8&255)+t);return"#"+(Sn((255&o)+t)|i<<8|r<<16).toString(16)};var Ce=Ft({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(e){const t=dt(`group-${he()}`),{setGroupAccordionStatus:n}=Qo(),o={"--base-color":e.baseColor,"--border-color":Se(e.baseColor,180),"--bg-color-header":Se(e.baseColor,140),"--bg-color-header-hover":Se(e.baseColor,190),"--bg-color-header-active":Se(e.baseColor,200),"--bg-color-body":"#fff"};return n(t.value,e.accordion),{idGroup:t,cssColorVars:o}}});const Ma=["data-id-group"];Ce.render=function(e,t,n,o,r,i){return G(),rt("div",{"data-id-group":e.idGroup,style:It(e.cssColorVars),class:"vcpg"},[tt(e.$slots,"default")],12,Ma)},Ce.__scopeId="data-v-23ab5317",Ce.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var Ee=Ft({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(e,t){const n=`panel-${he()}`,o=dt(),r=dt(),i=dt(),{panelExpanded:s,togglePanelExpandedStatus:c,setPanelExpandedStatus:d}=Qo(),m=Et(()=>({hasContent:t.slots.content&&t.slots.content()[0].children.length>0,dataKey:he()})),S=Et(()=>o.value?.parentElement?.getAttribute("data-id-group")||""),C=Et(()=>s(S.value,n).value&&m.value.hasContent);return Xe(()=>{d(S.value,n,e.expanded)}),pi(()=>{(async()=>(await Ve(),r.value&&i.value&&(r.value.style.height=`${Math.min(i.value.scrollHeight,r.value.scrollHeight)}px`)))()}),{body:m,panelRef:o,bodyRef:r,bodyContentRef:i,isExpanded:C,collapse:D=>{D.style.height="0"},expand:D=>{D.style.height=`${D.scrollHeight}px`},toggle:()=>{m.value.hasContent&&c(S.value,n)},toggleIcon:`
8
13
  <svg
9
14
  width="24px"
10
15
  height="24px"
@@ -14,4 +19,4 @@ import{h as di,openBlock as G,createElementBlock as ot,normalizeStyle as kt,rend
14
19
  >
15
20
  <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
21
  </svg>
17
- `}}});const Na={class:"vcp__header-title"},Ba={key:0,class:"vcp__header-icon"},Ua=["innerHTML"],Oa={key:0,ref:"bodyRef",class:"vcp__body"},ja={ref:"bodyContentRef",class:"vcp__body-content"};function xn(e){return window.TouchEvent&&e instanceof TouchEvent}xe.render=function(e,t,n,o,r,i){return G(),ot("section",{ref:"panelRef",class:fi(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[rt("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...s)=>e.toggle&&e.toggle(...s))},[rt("div",Na,[Ct(e.$slots,"title")]),e.body.hasContent?(G(),ot("div",Ba,[Ct(e.$slots,"icon",{},()=>[rt("span",{innerHTML:e.toggleIcon},null,8,Ua)])])):It("v-if",!0)]),co(lo,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:ie(()=>[e.isExpanded?(G(),ot("div",Oa,[rt("div",ja,[Ct(e.$slots,"content")],512)],512)):It("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},xe.__scopeId="data-v-08c94cf8",xe.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class ct{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return xn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return xn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new On(this.clientX,this.clientY)}static bindDown(t,n,o,r=!1){const i=c=>{n(new ct(c))},s=c=>{c.touches.length===1&&n(new ct(c)),c.touches.length>1&&o&&o(new ct(c))};return t.addEventListener("mousedown",i,r),t.addEventListener("touchstart",s,r),()=>{t.removeEventListener("mousedown",i,r),t.removeEventListener("touchstart",s,r)}}static bindMove(t,n,o=!1){const r=s=>{n(new ct(s))},i=s=>{s.touches.length===1&&n(new ct(s))};return t.addEventListener("mousemove",r,o),t.addEventListener("touchmove",i,o),()=>{t.removeEventListener("mousemove",r,o),t.removeEventListener("touchmove",i,o)}}static bindUp(t,n,o=!1){const r=s=>{n(new ct(s))},i=s=>{s.touches.length===0&&n(new ct(s))};return t.addEventListener("mouseup",r,o),t.addEventListener("touchend",i,o),()=>{t.removeEventListener("mouseup",r,o),t.removeEventListener("touchend",i,o)}}originalEvent({mouse:t,touch:n}){xn(this.e)?n&&n(this.e):t&&t(this.e)}}class On{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new On(this.x,this.y)}}class Ha{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=ct.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=ct.bindMove(document,this.mousemove),this.unbindUp=ct.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class Wa{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=Ie(this._group),o=Ie(t);n.splice(n.indexOf(this),1),o.push(this),er()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(Ie(this._group)),er()}}const ke=new Map;function Ie(e){return ke.has(e)||ke.set(e,[]),ke.get(e)}function tr(e,t){return e>t?-tr(t,e):e<0&&t>=0?1:e-t}function er(){let e=0;for(const t of function(n){const o=[];return n.forEach((r,i)=>o.push(i)),o}(ke).sort(tr))for(const n of Ie(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function kn(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Te(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Te(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,r=t.top,i=t.left;return{width:n,height:o,top:r,left:i,bottom:r+o,right:i+n}}class Fa{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=nr.map(p=>new p(t,this));const{width:o,height:r}=kn(t),i=n.maxWidth||window.innerWidth,s=n.maxHeight||window.innerHeight;let c=!1;(o<n.minWidth||o>i)&&(t.style.width=`${or(o,n.minWidth,i)}px`,c=!0),(r<n.minHeight||r>s)&&(t.style.height=`${or(r,n.minHeight,s)}px`,c=!0),c&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const nr=[];class xt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=ct.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:o,width:r,height:i}=Te(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=r,this.height0=i,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=ct.bindMove(document,this.mousemove),this.unbindUp=ct.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:r}=Te(this.container),i=this.helper.options,s=i.maxWidth||window.innerWidth,c=i.maxHeight||window.innerHeight;this.minLeft=Math.max(o-s,0),this.maxLeft=o-i.minWidth,this.minRight=t+i.minWidth,this.maxRight=Math.min(t+s,window.innerWidth),this.minTop=Math.max(r-c,0),this.maxTop=r-i.minHeight,this.minBottom=n+i.minHeight,this.maxBottom=Math.min(n+c,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:o,top:r,right:i,bottom:s}=Te(this.container),c=this.helper.options;c&&(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${c.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):i<this.minRight?this.container.style.width=`${c.minWidth}px`:i>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${c.minHeight}px`,this.container.style.top=`${this.maxTop}px`):s<this.minBottom?this.container.style.height=`${c.minHeight}px`:s>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function or(e,t,n){return e<t?t:e>n?n:e}nr.push(class extends xt{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 xt{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 xt{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 xt{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 xt{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 xt{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 xt{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 xt{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 Re=Ft({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=ht(!1),n=ht(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const r=ct.bindUp(document,()=>{n.value=!1,r()})}}}});const qa=["disabled"];Re.render=function(e,t,n,o,r,i){return G(),ot("div",{class:"btn",style:kt(e.style()),onMouseenter:t[0]||(t[0]=s=>e.hover=!0),onMouseleave:t[1]||(t[1]=s=>e.hover=!1),onMousedown:t[2]||(t[2]=ho((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onTouchstart:t[3]||(t[3]=ho((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onMouseup:t[4]||(t[4]=(...s)=>e.mouseup&&e.mouseup(...s)),onTouchend:t[5]||(t[5]=(...s)=>e.mouseup&&e.mouseup(...s)),disabled:e.disabled},[Ct(e.$slots,"default")],44,qa)},Re.__scopeId="data-v-71662210",Re.__file="src/controls/vuewindow/window/Button.vue";const In=new Set;function rr(e){return e!==null?parseFloat(e):0}function Pe(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(rr).reduce((r,i)=>r+i)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(rr).reduce((r,i)=>r+i));return{width:n,height:o}}class ir{width;height;constructor(t,n){this.width=t,this.height=n}}function Ga(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function Xa(e,t,n,o){const r=e-n,i=t-o;return r*r+i*i}window.addEventListener("resize",e=>{In.forEach(t=>{t&&se(t.fixPosition)&&t.fixPosition()})});const ze=[];var De=Ft({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:Re},setup(e,{emit:t}){const n=gi();if(!n)return;const{proxy:o}=n;let r=0,i,s,c;const p=ht(e.isOpen),m=()=>{ze.push(o),c=new Wa(e.zGroup,_),e.isOpen&&function(T){T&&(Ke(()=>{r++==0&&(f(o),function(){const D=C.value,{width:B,height:j}=kn(D);let O,F;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")O=e.left,F=e.top;else{const lt=e.positionHint||"auto";switch(lt){case"auto":{let Q=20,nt=50,Y=0;do{if(ze.every(gt=>{if(!gt.isOpen||o==gt)return!0;const ne=Ga(gt);if(ne==null)return!0;const{left:Be,top:pt}=ne;return Xa(Be,pt,Q,nt)>16}))break;Q=(Q+40)%(window.innerWidth-200),nt=(nt+40)%(window.innerHeight-200)}while(++Y<100);O=Q,F=nt}break;case"center":O=(window.innerWidth-B)/2,F=(window.innerHeight-j)/2,console.log(O,F,window.innerWidth,window.innerHeight,"111111");break;default:try{const Q=lt.split("/").map(Number);if(Q.length!=2)throw null;const[nt,Y]=Q;if(!isFinite(nt)||!isFinite(Y))throw null;O=nt>=0?nt:window.innerWidth-B+nt,F=Y>=0?Y:window.innerHeight-j+Y}catch{throw new Error(`invalid position string: ${lt}`)}}}D&&(D.style.left=`${O}px`,D.style.top=`${F}px`)}()),e.resizable&&d(),$(),i=new Ha(M.value,C.value,{onMove:()=>$(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:D}=kn(M.value);s=new Fa(C.value,{onResize:()=>d(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+D,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+D:void 0})}()}),e.activateWhenOpen&&I())}(!0),In.add(o)};function _(T){S.value.zIndex=`${T}`}const C=ht(null),M=ht(null),N=ht(null);function I(){c.raise(),t("activate")}const S=ht({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=Et(()=>e.windowStyle.titlebar),g=Et(()=>{const T={...e.windowStyle.content};return e.resizable?T.padding="0":e.padding!=null&&(T.padding=`${e.padding}px`),e.isScrollable&&(T.overflow="auto"),T});function f(T){const{width:D,height:B,top:j,left:O}=T,F=C;if(F&&D!=null&&(F.value.style.width=`${D}px`),B!=null){const lt=M.value;if(lt){const Q=Pe(lt).height;F.value.style.height=`${B+Q}px`}}F&&O!=null&&(F.value.style.left=`${O}px`),F&&j!=null&&(F.value.style.top=`${j}px`)}function d(T=!0){const D=C.value,B=M.value,j=N.value;if(j&&D&&B){const{width:O,height:F}=Pe(j),{width:lt,height:Q}=Pe(D),nt=Pe(B).height,Y=lt-(j.offsetWidth-O),gt=Q-nt-(j.offsetHeight-F);j.style.width=`${Y}px`,j.style.height=`${gt}px`,y(),t("resize",new ir(Y,gt)),T&&(t("update:width",Y),t("update:height",gt))}}function y(){const T=C.value;if(T){const D=T.getBoundingClientRect();D.left<0&&(S.value.left="0px"),D.top<0&&(S.value.top="0px"),D.right>window.innerWidth&&(S.value.left=window.innerWidth-D.width+"px"),D.bottom>window.innerHeight&&(S.value.top=window.innerHeight-D.height+"px")}}function $(T=!0){y();const D=C.value;if(D){const{left:B,top:j}=D.getBoundingClientRect();T&&(t("update:left",B),t("update:top",j))}}return qt(()=>e.isOpen,T=>{p.value=T}),qt(()=>e.zGroup,T=>{c.group=T}),qt(()=>e.width,T=>{f({width:T}),d(!1)}),qt(()=>e.height,T=>{f({height:T}),d(!1)}),Ve(()=>{m()}),mi(()=>{In.delete(this),c.unregister(),s&&s.teardown(),i&&i.teardown(),ze.splice(ze.indexOf(o),1)}),{isOpen:p,windowEl:C,titlebar:M,content:N,activate:I,styleWindow:S,styleTitlebar:u,styleContent:g,closeButtonClick:function(){p.value=!1,t("closebuttonclick")},fixPosition:y}}});const Va={class:"title"};var sr;De.render=function(e,t,n,o,r,i){const s=uo("myButton");return G(),vt(lo,{name:"fade",onAfterLeave:t[2]||(t[2]=c=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=c=>e.$emit("open")),persisted:""},{default:ie(()=>[vi(rt("div",{class:"window",style:kt(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...c)=>e.activate&&e.activate(...c)),onTouchstart:t[1]||(t[1]=(...c)=>e.activate&&e.activate(...c))},[rt("div",{class:"titlebar",style:kt(e.styleTitlebar),ref:"titlebar"},[rt("div",Va,[e.$slots.title?Ct(e.$slots,"title",{key:0}):(G(),ot(Tt,{key:1},[po(yi(e.title),1)],64))]),e.closeButton?(G(),vt(s,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:ie(()=>[po("\xD7")]),_:1},8,["windowStyle","onClick"])):It("v-if",!0)],4),rt("div",{class:"content",style:kt(e.styleContent),ref:"content"},[Ct(e.$slots,"default")],4)],36),[[wi,e.isOpen]])]),_:3})},De.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(sr||(sr={}));const Ka={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)"}},Ja={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)"}},Ya={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)"}},Za={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Qa=De;var et;(function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"})(et||(et={}));class ar{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(t,n,o){this.layoutState=t,this._LayoutID=o,n.forEach(r=>{if(r.layoutID===o&&(this.widgetConfig.push(r),r.afterid))if(this.preConditionMap.has(r.afterid))this.preConditionMap.get(r.afterid)?.add(r);else{const i=new Set;i.add(r),this.preConditionMap.set(r.afterid,i)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return Pt(t)?n=t:ae(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=bi(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),Ke().then(()=>{L.EventBus.emit(st.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}}).catch(n=>{L.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",t),L.EventBus.emit(st.WidgetLoadedErrorEvent,t)})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const r of o)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const i=this.preConditionMap.get(t);if(i)for(const s of i)this.unloadWidget(s.id)}const o=this.getContainerComponents(n.container),r=o.value.get(t);r&&r.unmounted&&r.unmounted(),o.value.delete(t),this.widgetsLoadedSet.delete(t),L.EventBus.emit(st.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(t){switch(t){case et.top:return this.layoutState.topContainer;case et.bottom:return this.layoutState.bottomContainer;case et.left:return this.layoutState.leftContainer;case et.right:return this.layoutState.rightContainer;case et.centerBack:return this.layoutState.centerBackContainer;case et.centerMain:return this.layoutState.centerMainContainer;case et.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&L.EventBus.emit(st.WidgetVisibleChanged,{id:t,layoutID:this._LayoutID,name:o.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetConfig.find(o=>o.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=ht(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Me=Ft({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const r=e.layoutID,i=ht(e.enableRouterView);qt(()=>e.enableRouterView,()=>{i.value=e.enableRouterView});const s=ao({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),c=new ar(s,e.widgetConfig,r),p=I(et.top),m=I(et.centerBack),_=I(et.centerFront),C=I(et.left),M=I(et.right),N=I(et.bottom);function I(u){return c?.getContainerComponents(u)}const S=Et(()=>e.layoutStyle);return Ve(()=>{c&&(c.preloadWidgets(),r===void 0&&(L.LayoutManager=c),o("containerLoaded",{layoutID:r,layoutManager:c}))}),{..._i(s),topContainerComponents:p,centerbackComponents:m,centerfrontComponents:_,leftContainerComponents:C,rightContainerComponents:M,bottomContainerComponents:N,containerStyle:S,isEnableRouterView:i}}});const tc={ref:"topContainer",class:"topContainer"},ec={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},nc={ref:"centerBackContainer",class:"centerdiv backContainer"},oc={ref:"centerFrontContainer",class:"centerdiv centerContainer"},rc={ref:"leftContainer",class:"leftContainer"},ic={ref:"rightContainer",class:"rightContainer"},sc={ref:"bottomContainer",class:"bottomContainer"};Me.render=function(e,t,n,o,r,i){const s=uo("router-view");return G(),ot("div",{class:"layoutContainer",style:kt(e.containerStyle)},[rt("div",tc,[(G(!0),ot(Tt,null,Bt(e.topContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),rt("div",null,[It(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(G(),ot("div",ec,[co(s,null,{default:ie(({Component:c})=>[(G(),vt(Rt(c)))]),_:1})],512)):It("v-if",!0),It(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),rt("div",nc,[(G(!0),ot(Tt,null,Bt(e.centerbackComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),It(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),rt("div",oc,[(G(!0),ot(Tt,null,Bt(e.centerfrontComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),rt("div",rc,[(G(!0),ot(Tt,null,Bt(e.leftContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512),rt("div",ic,[(G(!0),ot(Tt,null,Bt(e.rightContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512)]),rt("div",sc,[(G(!0),ot(Tt,null,Bt(e.bottomContainerComponents,([c,p])=>(G(),vt(Rt(p),{key:c}))),128))],512)],4)},Me.__scopeId="data-v-4d081e5c",Me.__file="src/controls/layoutcontainer/layout.vue";const $e=new Map,Tn=new Map;let Ae;const ac={getDefaultClient(){if(Ae||(Ae=new Xt(SysConfig.DefaultHproseAPI)),!Ae)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Ae},registerHprose(e,t){const n=Tn.get(e);if(!n){const o=new Xt(t);$e.set(e,o)}return n},getHprose:e=>Tn?.get(e),getProxyHprose:e=>$e.get(e),unregisterHprose(e){$e.get(e)&&(Tn.delete(e),$e.delete(e))}},cc=5e3,lc=36e5,Lt={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},Rn="access_token",hc=L.Config.ServiceURL.LoginAuthURL;function Pn(){const e=Eo();e&&wt(Lt.RefreshToken,hc,{refreshToken:e}).then(t=>{zn(t.data)})}function cr(){const e=yt.getJsonObject(Rn);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Pn():setTimeout(Pn,n-5e3))}function zn(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=Mt();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},yt.set(Rn,o,n/1e3),cr()}else yt.remove(Rn)}const Le="Wm314243",Ne=L.Config.ServiceURL.LoginAuthURL;async function uc(e){const t={username:e.username,pwd:Kt.encryptToString(e.pwd,Le)},n=(await wt(Lt.Login,Ne,t))?.data;return n&&zn(n.doubletoken),n}function dc(e){const t={oldpwd:Kt.encryptToString(e.oldpwd,Le),newpwd:Kt.encryptToString(e.newpwd,Le)};return wt(Lt.ChangeMyPwd,Ne,t)}function pc(e){return Kt.encryptToString(e,Le)}function fc(){const e=Mt();e&&(ko(Lt.Logout,Ne,{token:e.token,reftoken:e.refresh}),un())}function gc(e){return wt(Lt.CheckToken,Ne,{token:e})}const Dn="ROLE_SYSTEM_RIGHT",Mn=new le("",sessionStorage);function lr(){return Mn.get(Dn)}function $n(e){Mn.set(Dn,e)}function hr(){Mn.remove(Dn)}function Ht(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(Ht(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function ur(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&ur(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function dr(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&dr(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function Qt(e,t,n,o="name"){const r=e[n],i=t[n];r?i&&dr(r,i,o):i&&(e[n]=i)}function pr(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=Pt(e[0]);const r=o?e[0]:JSON.parse(e[0]);if(t>1)for(let i=1;i<e.length;i++){const s=e[i],c=o?s:JSON.parse(s);Qt(r,c,"routes","name"),Qt(r,c,"widgetMenu","name"),Qt(r,c,"widgets","id"),Qt(r,c,"functions","id")}n=r}return n&&(Ht(n.routes),Ht(n.widgetMenu),Ht(n.widgets),Ht(n.functions)),n}}const An=[],Ln=[],Nn=[];function te(){return lr()}async function mc(e,t=!1){hr();const n=Lt.GetSystemRights,o=L.Config.ServiceURL.LoginAuthURL,r=await wt(n,o,{systemid:e});if(!r||!r.data)return void L.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const i=r.data;if(i&&i.length>0){if(t){const s=JSON.parse(i[0]);return $n(s),s}{const s=pr(i);return $n(s),s}}}function fr(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const r=e.children?.find(i=>i.path===o.path);if(r){const i=fr(r,o);i&&n.children?.push(i)}})),n}function vc(e,t=2){if(t===0)return e;const n=te();return n&&n.routes?(Nn.length>0||e.forEach(o=>{const r=n.routes?.find(i=>i.name===o.name);if(r){const i=fr(o,r);i&&Nn.push(i)}}),Nn):void 0}function gr(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const r=e.children?.find(i=>i.name===o.name);if(r){const i=gr(r,o);i&&n.children?.push(i)}})),n}function yc(e,t=2){if(t===0)return e;const n=te();return n&&n.widgetMenu?(Ln.length>0||e.forEach(o=>{const r=n.widgetMenu?.find(i=>i.name===o.name);if(r){const i=gr(o,r);i&&Ln.push(i)}}),Ln):void 0}function wc(e,t=2){if(t===0)return e;const n=te();return n&&n.widgets?(An.length>0||e?.forEach(o=>{n.widgets?.find(r=>r.id===o.id)&&An.push(o)}),An):void 0}function bc(e,t=2){if(t===0)return e;const n=te();return n?n.functions:void 0}export{Ls as BigFileDownload,de as Download,cs as DownloadByUrl,Dt as EnumColor,zo as FileUpload,Aa as GetSignalRClient,L as Global,ac as GlobalHprose,Ut as GlobalMitt,ut as H5Tool,ee as HproseClient,as as HttpDownload,vo as JsonDownload,Me as LayoutContainer,et as LayoutContainerEnum,ar as LayoutManager,Ns as ObjToUrlParams,Ye as Pane,Xt as ProxyClient,ss as SaveAs,ki as Splitpanes,le as Storage,ce as StringUtils,Ka as StyleBlack,Za as StyleGrayblue,Ya as StyleMetal,Ja as StyleWhite,st as SysEvents,cc as TOKEN_REFRESH_TIME,lc as TOKEN_VALID_TIMESPAN,Lt as USER_TOKEN_API,xe as VCollapsiblePanel,Ee as VCollapsiblePanelGroup,De as VWindow,ha as WaterMark,ir as WindowResizeEvent,Qa as WindowType,Kt as XXTEA,is as calculateBestTextColor,dc as changeMyPWD,cr as checkDoRefreshToken,gc as checkToken,un as clearLocalToken,hr as clearRight,ns as colorIsDark,xs as createFileUpload,os as darken,Lo as deepMerge,wo as delay,Pn as doRefreshToken,No as exportSystemRights,us as get,te as getCurrentSystemRight,ps as getData,pc as getEncryptPWD,bc as getFunctions,Ji as getHexColor,Mt as getLocalToken,Ps as getLockState,Zi as getLongHexColor,Do as getProxyClient,Yi as getRGBColor,ts as getRGBColorFromHSLA,Eo as getRefreshToken,lr as getRight,vc as getRoutes,mc as getSystemRoleRight,wc as getWidgetConfig,yc as getWidgetMenus,Ht as handleNodes,sn as hexToRGB,Ts as init,Rs as initDefaultProxyClient,it as is,tn as isArray,Di as isAsyncFunction,$i as isBoolean,Ai as isClient,Pi as isDate,go as isDef,Ni as isElement,Oi as isEmpty,Qi as isEnumColor,ji as isError,se as isFunction,ue as isHexColor,Ui as isImageDom,qi as isMap,Qe as isNull,Ti as isNullAndUnDef,Ri as isNullOrUnDef,zi as isNumber,Pt as isObjectX,Mi as isPromise,Bi as isServer,ae as isString,Fi as isSymbol,Ze as isUnDef,Gi as isValidURL,Wi as isWeakMap,Hi as isWeakSet,Li as isWindow,ks as jquery,rs as lighten,uc as login,fc as logout,pr as mergeFilterRoleSysRight,ur as mergeNodes,Qt as mergeNodesAll,Ki as newGuid,zs as onLockListener,ds as post,wt as requestGet,xo as requestPost,ko as requestPostBody,es as rgbToHex,zn as setLocalToken,$n as setRight,ls as sleep,Vi as storage,yt as storageHelper,Ds as unLockListener,he as uuid,Ws as verifiyNumberInteger,Zs as verifyAccount,Gs as verifyAndSpace,ca as verifyCarNum,Fs as verifyCnAndSpace,oa as verifyEmail,qs as verifyEnAndSpace,ia as verifyFullName,na as verifyIPAddress,ra as verifyIdCard,Ks as verifyNumberCnUppercase,Xs as verifyNumberComma,_n as verifyNumberIntegerAndFloat,js as verifyNumberPercentage,Hs as verifyNumberPercentageFloat,Qs as verifyPassword,ta as verifyPasswordPowerful,ea as verifyPasswordStrength,Js as verifyPhone,sa as verifyPostalCode,Ys as verifyTelPhone,Vs as verifyTextColor,aa as verifyUrl,Us as writeIconifyList,Os as writeSysRoleRight};
22
+ `}}});const Aa={class:"vcp__header-title"},La={key:0,class:"vcp__header-icon"},Na=["innerHTML"],Ba={key:0,ref:"bodyRef",class:"vcp__body"},Ua={ref:"bodyContentRef",class:"vcp__body-content"};function Cn(e){return window.TouchEvent&&e instanceof TouchEvent}Ee.render=function(e,t,n,o,r,i){return G(),rt("section",{ref:"panelRef",class:fi(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[it("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...s)=>e.toggle&&e.toggle(...s))},[it("div",Aa,[tt(e.$slots,"title")]),e.body.hasContent?(G(),rt("div",La,[tt(e.$slots,"icon",{},()=>[it("span",{innerHTML:e.toggleIcon},null,8,Na)])])):xt("v-if",!0)]),so(ao,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:re(()=>[e.isExpanded?(G(),rt("div",Ba,[it("div",Ua,[tt(e.$slots,"content")],512)],512)):xt("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},Ee.__scopeId="data-v-08c94cf8",Ee.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class ct{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Cn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Cn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Bn(this.clientX,this.clientY)}static bindDown(t,n,o,r=!1){const i=c=>{n(new ct(c))},s=c=>{c.touches.length===1&&n(new ct(c)),c.touches.length>1&&o&&o(new ct(c))};return t.addEventListener("mousedown",i,r),t.addEventListener("touchstart",s,r),()=>{t.removeEventListener("mousedown",i,r),t.removeEventListener("touchstart",s,r)}}static bindMove(t,n,o=!1){const r=s=>{n(new ct(s))},i=s=>{s.touches.length===1&&n(new ct(s))};return t.addEventListener("mousemove",r,o),t.addEventListener("touchmove",i,o),()=>{t.removeEventListener("mousemove",r,o),t.removeEventListener("touchmove",i,o)}}static bindUp(t,n,o=!1){const r=s=>{n(new ct(s))},i=s=>{s.touches.length===0&&n(new ct(s))};return t.addEventListener("mouseup",r,o),t.addEventListener("touchend",i,o),()=>{t.removeEventListener("mouseup",r,o),t.removeEventListener("touchend",i,o)}}originalEvent({mouse:t,touch:n}){Cn(this.e)?n&&n(this.e):t&&t(this.e)}}class Bn{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Bn(this.x,this.y)}}class Oa{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=ct.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=ct.bindMove(document,this.mousemove),this.unbindUp=ct.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class ja{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=ke(this._group),o=ke(t);n.splice(n.indexOf(this),1),o.push(this),er()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(ke(this._group)),er()}}const xe=new Map;function ke(e){return xe.has(e)||xe.set(e,[]),xe.get(e)}function tr(e,t){return e>t?-tr(t,e):e<0&&t>=0?1:e-t}function er(){let e=0;for(const t of function(n){const o=[];return n.forEach((r,i)=>o.push(i)),o}(xe).sort(tr))for(const n of ke(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function En(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Ie(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ie(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,r=t.top,i=t.left;return{width:n,height:o,top:r,left:i,bottom:r+o,right:i+n}}class Wa{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=nr.map(d=>new d(t,this));const{width:o,height:r}=En(t),i=n.maxWidth||window.innerWidth,s=n.maxHeight||window.innerHeight;let c=!1;(o<n.minWidth||o>i)&&(t.style.width=`${or(o,n.minWidth,i)}px`,c=!0),(r<n.minHeight||r>s)&&(t.style.height=`${or(r,n.minHeight,s)}px`,c=!0),c&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const nr=[];class kt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=ct.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:o,width:r,height:i}=Ie(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=r,this.height0=i,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=ct.bindMove(document,this.mousemove),this.unbindUp=ct.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:r}=Ie(this.container),i=this.helper.options,s=i.maxWidth||window.innerWidth,c=i.maxHeight||window.innerHeight;this.minLeft=Math.max(o-s,0),this.maxLeft=o-i.minWidth,this.minRight=t+i.minWidth,this.maxRight=Math.min(t+s,window.innerWidth),this.minTop=Math.max(r-c,0),this.maxTop=r-i.minHeight,this.minBottom=n+i.minHeight,this.maxBottom=Math.min(n+c,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:o,top:r,right:i,bottom:s}=Ie(this.container),c=this.helper.options;c&&(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${c.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):i<this.minRight?this.container.style.width=`${c.minWidth}px`:i>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),r<this.minTop?(this.container.style.height=n+r-this.minTop+"px",this.container.style.top=`${this.minTop}px`):r>this.maxTop?(this.container.style.height=`${c.minHeight}px`,this.container.style.top=`${this.maxTop}px`):s<this.minBottom?this.container.style.height=`${c.minHeight}px`:s>this.maxBottom&&(this.container.style.height=this.maxBottom-r+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function or(e,t,n){return e<t?t:e>n?n:e}nr.push(class extends kt{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 kt{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 kt{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 kt{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 kt{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 kt{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 kt{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 kt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Te=Ft({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=dt(!1),n=dt(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const r=ct.bindUp(document,()=>{n.value=!1,r()})}}}});const Ha=["disabled"];Te.render=function(e,t,n,o,r,i){return G(),rt("div",{class:"btn",style:It(e.style()),onMouseenter:t[0]||(t[0]=s=>e.hover=!0),onMouseleave:t[1]||(t[1]=s=>e.hover=!1),onMousedown:t[2]||(t[2]=co((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onTouchstart:t[3]||(t[3]=co((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onMouseup:t[4]||(t[4]=(...s)=>e.mouseup&&e.mouseup(...s)),onTouchend:t[5]||(t[5]=(...s)=>e.mouseup&&e.mouseup(...s)),disabled:e.disabled},[tt(e.$slots,"default")],44,Ha)},Te.__scopeId="data-v-71662210",Te.__file="src/controls/vuewindow/window/Button.vue";const xn=new Set;function rr(e){return e!==null?parseFloat(e):0}function Re(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(rr).reduce((r,i)=>r+i)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(rr).reduce((r,i)=>r+i));return{width:n,height:o}}class ir{width;height;constructor(t,n){this.width=t,this.height=n}}function Fa(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function qa(e,t,n,o){const r=e-n,i=t-o;return r*r+i*i}window.addEventListener("resize",e=>{xn.forEach(t=>{t&&ie(t.fixPosition)&&t.fixPosition()})});const Pe=[];var ze=Ft({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:Te},setup(e,{emit:t}){const n=gi();if(!n)return;const{proxy:o}=n;let r=0,i,s,c;const d=dt(e.isOpen),m=()=>{Pe.push(o),c=new ja(e.zGroup,S),e.isOpen&&function(I){I&&(Ve(()=>{r++==0&&(f(o),function(){const $=C.value,{width:B,height:j}=En($);let O,F;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")O=e.left,F=e.top;else{const lt=e.positionHint||"auto";switch(lt){case"auto":{let Q=20,ot=50,Y=0;do{if(Pe.every(mt=>{if(!mt.isOpen||o==mt)return!0;const ee=Fa(mt);if(ee==null)return!0;const{left:Ne,top:ft}=ee;return qa(Ne,ft,Q,ot)>16}))break;Q=(Q+40)%(window.innerWidth-200),ot=(ot+40)%(window.innerHeight-200)}while(++Y<100);O=Q,F=ot}break;case"center":O=(window.innerWidth-B)/2,F=(window.innerHeight-j)/2,console.log(O,F,window.innerWidth,window.innerHeight,"111111");break;default:try{const Q=lt.split("/").map(Number);if(Q.length!=2)throw null;const[ot,Y]=Q;if(!isFinite(ot)||!isFinite(Y))throw null;O=ot>=0?ot:window.innerWidth-B+ot,F=Y>=0?Y:window.innerHeight-j+Y}catch{throw new Error(`invalid position string: ${lt}`)}}}$&&($.style.left=`${O}px`,$.style.top=`${F}px`)}()),e.resizable&&p(),M(),i=new Oa(D.value,C.value,{onMove:()=>M(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:$}=En(D.value);s=new Wa(C.value,{onResize:()=>p(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+$,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+$:void 0})}()}),e.activateWhenOpen&&R())}(!0),xn.add(o)};function S(I){_.value.zIndex=`${I}`}const C=dt(null),D=dt(null),N=dt(null);function R(){c.raise(),t("activate")}const _=dt({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=Et(()=>e.windowStyle.titlebar),g=Et(()=>{const I={...e.windowStyle.content};return e.resizable?I.padding="0":e.padding!=null&&(I.padding=`${e.padding}px`),e.isScrollable&&(I.overflow="auto"),I});function f(I){const{width:$,height:B,top:j,left:O}=I,F=C;if(F&&$!=null&&(F.value.style.width=`${$}px`),B!=null){const lt=D.value;if(lt){const Q=Re(lt).height;F.value.style.height=`${B+Q}px`}}F&&O!=null&&(F.value.style.left=`${O}px`),F&&j!=null&&(F.value.style.top=`${j}px`)}function p(I=!0){const $=C.value,B=D.value,j=N.value;if(j&&$&&B){const{width:O,height:F}=Re(j),{width:lt,height:Q}=Re($),ot=Re(B).height,Y=lt-(j.offsetWidth-O),mt=Q-ot-(j.offsetHeight-F);j.style.width=`${Y}px`,j.style.height=`${mt}px`,y(),t("resize",new ir(Y,mt)),I&&(t("update:width",Y),t("update:height",mt))}}function y(){const I=C.value;if(I){const $=I.getBoundingClientRect();$.left<0&&(_.value.left="0px"),$.top<0&&(_.value.top="0px"),$.right>window.innerWidth&&(_.value.left=window.innerWidth-$.width+"px"),$.bottom>window.innerHeight&&(_.value.top=window.innerHeight-$.height+"px")}}function M(I=!0){y();const $=C.value;if($){const{left:B,top:j}=$.getBoundingClientRect();I&&(t("update:left",B),t("update:top",j))}}return qt(()=>e.isOpen,I=>{d.value=I}),qt(()=>e.zGroup,I=>{c.group=I}),qt(()=>e.width,I=>{f({width:I}),p(!1)}),qt(()=>e.height,I=>{f({height:I}),p(!1)}),Xe(()=>{m()}),mi(()=>{xn.delete(this),c.unregister(),s&&s.teardown(),i&&i.teardown(),Pe.splice(Pe.indexOf(o),1)}),{isOpen:d,windowEl:C,titlebar:D,content:N,activate:R,styleWindow:_,styleTitlebar:u,styleContent:g,closeButtonClick:function(){d.value=!1,t("closebuttonclick")},fixPosition:y}}});const Ga={class:"title"};var sr;ze.render=function(e,t,n,o,r,i){const s=lo("myButton");return G(),yt(ao,{name:"fade",onAfterLeave:t[2]||(t[2]=c=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=c=>e.$emit("open")),persisted:""},{default:re(()=>[vi(it("div",{class:"window",style:It(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...c)=>e.activate&&e.activate(...c)),onTouchstart:t[1]||(t[1]=(...c)=>e.activate&&e.activate(...c))},[it("div",{class:"titlebar",style:It(e.styleTitlebar),ref:"titlebar"},[it("div",Ga,[e.$slots.title?tt(e.$slots,"title",{key:0}):(G(),rt(Tt,{key:1},[ho(yi(e.title),1)],64))]),e.closeButton?(G(),yt(s,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:re(()=>[ho("\xD7")]),_:1},8,["windowStyle","onClick"])):xt("v-if",!0)],4),it("div",{class:"content",style:It(e.styleContent),ref:"content"},[tt(e.$slots,"default")],4)],36),[[wi,e.isOpen]])]),_:3})},ze.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(sr||(sr={}));const Xa={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)"}},Va={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)"}},Ka={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)"}},Ja={window:{color:"#fff",fontSize:"14px",boxShadow:"0 0 3pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(4,51,81,0.6)",borderRadius:"5px"},titlebar:{backgroundColor:"rgba(4,51,81,0.8)",border:"1px solid rgba(153, 153, 153, 0.5)",borderRadius:"5px",fontSize:"16px",fontWeight:400,color:"#fff"},content:{},button:{color:"white",fontSize:"18px"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},Ya=ze;var nt;(function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"})(nt||(nt={}));class ar{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;_mapItemRefs;constructor(t,n,o,r){this.layoutState=t,this._LayoutID=o,this._mapItemRefs=r,n.forEach(i=>{if(i.layoutID===o&&(this.widgetConfig.push(i),i.afterid))if(this.preConditionMap.has(i.afterid))this.preConditionMap.get(i.afterid)?.add(i);else{const s=new Set;s.add(i),this.preConditionMap.set(i.afterid,s)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return Pt(t)?n=t:se(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=bi(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),Ve().then(()=>{L.EventBus.emit(ht.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}}).catch(n=>{L.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",t),L.EventBus.emit(ht.WidgetLoadedErrorEvent,t)})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const r of o)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o)for(const r of o)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(t),this.widgetsLoadedSet.delete(t),this._mapItemRefs&&this._mapItemRefs.delete(t),L.EventBus.emit(ht.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(t){switch(t){case nt.top:return this.layoutState.topContainer;case nt.bottom:return this.layoutState.bottomContainer;case nt.left:return this.layoutState.leftContainer;case nt.right:return this.layoutState.rightContainer;case nt.centerBack:return this.layoutState.centerBackContainer;case nt.centerMain:return this.layoutState.centerMainContainer;case nt.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&o.changeVisible&&o.changeVisible(n)}isWidgetVisible(t){const n=this.getWidgetComponent(t);return!!n&&(!n.isShow||n.isShow.value)}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)&&this._mapItemRefs)return this._mapItemRefs.get(t)}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=dt(new Map);return this.layoutMap.set(t,n),n}}getWidgetLoadedIDList(){const t=[];return this.widgetsLoadedSet.forEach(n=>{t.push(n)}),t}unloadAllWidgets(t){const n=[];this.widgetsLoadedSet.forEach(o=>{t&&t.length>0?t.findIndex(r=>r===o)<0&&n.push(o):n.push(o)}),n.forEach(o=>this.unloadWidget(o))}unloadWidgets(t){t&&t.length>0&&t.forEach(n=>{this.unloadWidget(n)})}}var $e=Ft({name:"LayoutContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const r=e.layoutID,i=dt(e.enableRouterView);qt(()=>e.enableRouterView,()=>{i.value=e.enableRouterView});const s=io({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),c=new Map,d=new ar(s,e.widgetConfig,r,c),m=_(nt.top),S=_(nt.centerBack),C=_(nt.centerFront),D=_(nt.left),N=_(nt.right),R=_(nt.bottom);function _(g){return d?.getContainerComponents(g)}const u=Et(()=>e.layoutStyle);return Xe(()=>{d&&(d.preloadWidgets(),r===void 0&&(L.LayoutManager=d),o("containerLoaded",{layoutID:r,layoutManager:d}))}),{..._i(s),topContainerComponents:m,centerbackComponents:S,centerfrontComponents:C,leftContainerComponents:D,rightContainerComponents:N,bottomContainerComponents:R,containerStyle:u,isEnableRouterView:i,setItemRef:(g,f)=>{g&&c.set(f,g)}}}});const Za={ref:"topContainer",class:"topContainer"},Qa={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},tc={ref:"centerBackContainer",class:"centerdiv backContainer"},ec={ref:"centerFrontContainer",class:"centerdiv centerFrontContainer"},nc={ref:"leftContainer",class:"leftContainer"},oc={ref:"rightContainer",class:"rightContainer"},rc={ref:"bottomContainer",class:"bottomContainer"};$e.render=function(e,t,n,o,r,i){const s=lo("router-view");return G(),rt("div",{class:"layoutContainer",style:It(e.containerStyle)},[it("div",Za,[tt(e.$slots,"top"),(G(!0),rt(Tt,null,Bt(e.topContainerComponents,([c,d])=>(G(),yt(Rt(d),{ref_for:!0,ref:m=>e.setItemRef(m,c),key:c}))),128))],512),it("div",null,[xt(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(G(),rt("div",Qa,[so(s,null,{default:re(({Component:c})=>[(G(),yt(Rt(c)))]),_:1}),tt(e.$slots,"main")],512)):xt("v-if",!0),xt(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),it("div",tc,[tt(e.$slots,"back"),(G(!0),rt(Tt,null,Bt(e.centerbackComponents,([c,d])=>(G(),yt(Rt(d),{ref_for:!0,ref:m=>e.setItemRef(m,c),key:c}))),128))],512),xt(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),it("div",ec,[tt(e.$slots,"front"),(G(!0),rt(Tt,null,Bt(e.centerfrontComponents,([c,d])=>(G(),yt(Rt(d),{ref_for:!0,ref:m=>e.setItemRef(m,c),key:c}))),128))],512),it("div",nc,[tt(e.$slots,"left"),(G(!0),rt(Tt,null,Bt(e.leftContainerComponents,([c,d])=>(G(),yt(Rt(d),{ref_for:!0,ref:m=>e.setItemRef(m,c),key:c}))),128))],512),it("div",oc,[tt(e.$slots,"right"),(G(!0),rt(Tt,null,Bt(e.rightContainerComponents,([c,d])=>(G(),yt(Rt(d),{ref_for:!0,ref:m=>e.setItemRef(m,c),key:c}))),128))],512)]),it("div",rc,[tt(e.$slots,"bottom"),(G(!0),rt(Tt,null,Bt(e.bottomContainerComponents,([c,d])=>(G(),yt(Rt(d),{ref_for:!0,ref:m=>e.setItemRef(m,c),key:c}))),128))],512),xt(" \u589E\u52A0\u9ED8\u8BA4\u63D2\u69FD "),tt(e.$slots,"default")],4)},$e.__scopeId="data-v-4d081e5c",$e.__file="src/controls/layoutcontainer/layout.vue";const De=new Map,kn=new Map;let Me;const ic={getDefaultClient(){if(Me||(Me=new Gt(SysConfig.DefaultHproseAPI)),!Me)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Me},registerHprose(e,t){const n=kn.get(e);if(!n){const o=new Gt(t);De.set(e,o)}return n},getHprose:e=>kn?.get(e),getProxyHprose:e=>De.get(e),unregisterHprose(e){De.get(e)&&(kn.delete(e),De.delete(e))}},sc=5e3,ac=36e5,Lt={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},In="access_token",cc=L.Config.ServiceURL.LoginAuthURL;function Tn(){const e=Co();e&&bt(Lt.RefreshToken,cc,{refreshToken:e}).then(t=>{Rn(t.data)})}function cr(){const e=wt.getJsonObject(In);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Tn():setTimeout(Tn,n-5e3))}function Rn(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=Dt();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},wt.set(In,o,n/1e3),cr()}else wt.remove(In)}const Ae="Wm314243",Le=L.Config.ServiceURL.LoginAuthURL;async function lc(e){const t={username:e.username,pwd:Vt.encryptToString(e.pwd,Ae)},n=(await bt(Lt.Login,Le,t))?.data;return n&&Rn(n.doubletoken),n}function hc(e){const t={oldpwd:Vt.encryptToString(e.oldpwd,Ae),newpwd:Vt.encryptToString(e.newpwd,Ae)};return bt(Lt.ChangeMyPwd,Le,t)}function uc(e){return Vt.encryptToString(e,Ae)}function dc(){const e=Dt();e&&(xo(Lt.Logout,Le,{token:e.token,reftoken:e.refresh}),hn())}function pc(e){return bt(Lt.CheckToken,Le,{token:e})}const Pn="ROLE_SYSTEM_RIGHT",zn=new le("",sessionStorage);function lr(){return zn.get(Pn)}function $n(e){zn.set(Pn,e)}function hr(){zn.remove(Pn)}function Wt(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(Wt(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function ur(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&ur(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function dr(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&dr(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function Zt(e,t,n,o="name"){const r=e[n],i=t[n];r?i&&dr(r,i,o):i&&(e[n]=i)}function pr(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=Pt(e[0]);const r=o?e[0]:JSON.parse(e[0]);if(t>1)for(let i=1;i<e.length;i++){const s=e[i],c=o?s:JSON.parse(s);Zt(r,c,"routes","name"),Zt(r,c,"widgetMenu","name"),Zt(r,c,"widgets","id"),Zt(r,c,"functions","id")}n=r}return n&&(Wt(n.routes),Wt(n.widgetMenu),Wt(n.widgets),Wt(n.functions)),n}}const Dn=[],Mn=[],An=[];function Qt(){return lr()}async function fc(e,t=!1){hr();const n=Lt.GetSystemRights,o=L.Config.ServiceURL.LoginAuthURL,r=await bt(n,o,{systemid:e});if(!r||!r.data)return void L.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const i=r.data;if(i&&i.length>0){if(t){const s=JSON.parse(i[0]);return $n(s),s}{const s=pr(i);return $n(s),s}}}function fr(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const r=e.children?.find(i=>i.path===o.path);if(r){const i=fr(r,o);i&&n.children?.push(i)}})),n}function gc(e,t=2){if(t===0)return e;const n=Qt();return n&&n.routes?(An.length>0||e.forEach(o=>{const r=n.routes?.find(i=>i.name===o.name);if(r){const i=fr(o,r);i&&An.push(i)}}),An):void 0}function gr(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const r=e.children?.find(i=>i.name===o.name);if(r){const i=gr(r,o);i&&n.children?.push(i)}})),n}function mc(e,t=2){if(t===0)return e;const n=Qt();return n&&n.widgetMenu?(Mn.length>0||e.forEach(o=>{const r=n.widgetMenu?.find(i=>i.name===o.name);if(r){const i=gr(o,r);i&&Mn.push(i)}}),Mn):void 0}function vc(e,t=2){if(t===0)return e;const n=Qt();return n&&n.widgets?(Dn.length>0||e?.forEach(o=>{n.widgets?.find(r=>r.id===o.id)&&Dn.push(o)}),Dn):void 0}function yc(e,t=2){if(t===0)return e;const n=Qt();return n?n.functions:void 0}export{Ms as BigFileDownload,de as Download,cs as DownloadByUrl,$t as EnumColor,Po as FileUpload,Da as GetSignalRClient,L as Global,ic as GlobalHprose,Ut as GlobalMitt,ut as H5Tool,te as HproseClient,as as HttpDownload,go as JsonDownload,$e as LayoutContainer,nt as LayoutContainerEnum,ar as LayoutManager,As as ObjToUrlParams,Je as Pane,Gt as ProxyClient,ss as SaveAs,ki as Splitpanes,le as Storage,ce as StringUtils,Xa as StyleBlack,Ja as StyleGrayblue,Ka as StyleMetal,Va as StyleWhite,ht as SysEvents,sc as TOKEN_REFRESH_TIME,ac as TOKEN_VALID_TIMESPAN,Lt as USER_TOKEN_API,Ee as VCollapsiblePanel,Ce as VCollapsiblePanelGroup,ze as VWindow,ca as WaterMark,ir as WindowResizeEvent,Ya as WindowType,Vt as XXTEA,is as calculateBestTextColor,hc as changeMyPWD,cr as checkDoRefreshToken,pc as checkToken,hn as clearLocalToken,hr as clearRight,ns as colorIsDark,Es as createFileUpload,os as darken,Lo as deepMerge,vo as delay,Tn as doRefreshToken,No as exportSystemRights,hs as get,Qt as getCurrentSystemRight,ds as getData,uc as getEncryptPWD,yc as getFunctions,Ji as getHexColor,Dt as getLocalToken,Rs as getLockState,Zi as getLongHexColor,zo as getProxyClient,Yi as getRGBColor,ts as getRGBColorFromHSLA,Co as getRefreshToken,lr as getRight,gc as getRoutes,fc as getSystemRoleRight,vc as getWidgetConfig,mc as getWidgetMenus,Wt as handleNodes,on as hexToRGB,Is as init,Ts as initDefaultProxyClient,st as is,Qe as isArray,$i as isAsyncFunction,Mi as isBoolean,Ai as isClient,Pi as isDate,po as isDef,Ni as isElement,Oi as isEmpty,Qi as isEnumColor,ji as isError,ie as isFunction,ue as isHexColor,Ui as isImageDom,qi as isMap,Ze as isNull,Ti as isNullAndUnDef,Ri as isNullOrUnDef,zi as isNumber,Pt as isObjectX,Di as isPromise,Bi as isServer,se as isString,Fi as isSymbol,Ye as isUnDef,Gi as isValidURL,Hi as isWeakMap,Wi as isWeakSet,Li as isWindow,xs as jquery,rs as lighten,lc as login,dc as logout,pr as mergeFilterRoleSysRight,ur as mergeNodes,Zt as mergeNodesAll,Ki as newGuid,Ps as onLockListener,us as post,bt as requestGet,Eo as requestPost,xo as requestPostBody,es as rgbToHex,Rn as setLocalToken,$n as setRight,ls as sleep,Vi as storage,wt as storageHelper,zs as unLockListener,he as uuid,js as verifiyNumberInteger,Js as verifyAccount,Fs as verifyAndSpace,sa as verifyCarNum,Ws as verifyCnAndSpace,ea as verifyEmail,Hs as verifyEnAndSpace,oa as verifyFullName,ta as verifyIPAddress,na as verifyIdCard,Xs as verifyNumberCnUppercase,qs as verifyNumberComma,wn as verifyNumberIntegerAndFloat,Us as verifyNumberPercentage,Os as verifyNumberPercentageFloat,Ys as verifyPassword,Zs as verifyPasswordPowerful,Qs as verifyPasswordStrength,Vs as verifyPhone,ra as verifyPostalCode,Ks as verifyTelPhone,Gs as verifyTextColor,ia as verifyUrl,Ns as writeIconifyList,Bs as writeSysRoleRight};