xframelib 0.7.7 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,22 +1,12 @@
1
- import{h as vi,openBlock as G,createElementBlock as ie,normalizeStyle as Re,renderSlot as J,reactive as fo,computed as Ee,defineComponent as Pe,ref as he,onMounted as Jt,onUpdated as yi,nextTick as Yt,normalizeClass as wi,createElementVNode as se,createCommentVNode as ke,createVNode as it,Transition as Zt,withCtx as xe,withModifiers as po,getCurrentInstance as bi,watch as Xe,onBeforeUnmount as _i,resolveComponent as Qt,createBlock as fe,withDirectives as Si,Fragment as ze,createTextVNode as en,toDisplayString as go,vShow as Ci,markRaw as Ei,onErrorCaptured as ki,Suspense as xi,KeepAlive as Ii,resolveDynamicComponent as Ie,toRefs as Ti,renderList as He}from"vue";import Ri from"axios";import Pi from"qs";import{Client as zi,ClientContext as tn}from"@hprose/rpc-core";import{ByteStream as st,Writer as Mi,Reader as $i}from"@hprose/io";import{HttpTransport as Ai}from"@hprose/rpc-html5";var Di={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((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.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(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let n=0;this.panes=this.panes.map((o,r)=>(o.size=r===e?o.max:o.min,r!==e&&(n+=o.min),o)),this.panes[e].size-=n,this.$emit("pane-maximize",this.panes[e])},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:n,clientY:o}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:n-e.left,y:o-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),100*t/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),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(t),r),o);let s=[e,e+1],c=this.panes[s[0]]||null,f=this.panes[s[1]]||null;const m=c.max<100&&i>=c.max+n.prevPanesSize,S=f.max<100&&i<=100-(f.max+this.sumNextPanesSize(e+1));if(m||S)m?(c.size=c.max,f.size=Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,0)):(c.size=Math.max(100-f.max-n.prevPanesSize-this.sumNextPanesSize(e+1),0),f.size=f.max);else{if(this.pushOtherPanes){const E=this.doPushOtherPanes(n,i);if(!E)return;({sums:n,panesToResize:s}=E),c=this.panes[s[0]]||null,f=this.panes[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),f!==null&&(f.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,f.min),f.max))}},doPushOtherPanes(t,e){const n=this.touch.activeSplitter,o=[n,n+1];return e<t.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,t.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((r,i)=>{i>o[0]&&i<=n&&(r.size=r.min,t.prevReachedMinPanes+=r.min)}),t.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,i)=>{i>0&&i<=n&&(r.size=r.min,t.prevReachedMinPanes+=r.min)}),this.panes[o[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,t.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((r,i)=>{i>n&&i<o[1]&&(r.size=r.min,t.nextReachedMinPanes+=r.min)}),t.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(t.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,t.nextReachedMinPanes+=r.min)}),this.panes[o[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:o}},sumPrevPanesSize(t){return this.panes.reduce((e,n,o)=>e+(o<t?n.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((e,n,o)=>e+(o>t+1?n.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.index<t&&e.size>e.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),n=t.classList.contains("splitpanes__splitter");if(!e&&!n)return t.parentNode.removeChild(t),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(t,e,n=!1){const o=t-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)),e.parentNode.insertBefore(r,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let e=0;t.forEach(n=>{n.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,n,!0):e&&this.addSplitter(e,n),e++)})},requestUpdate({target:t,...e}){const n=this.indexedPanes[t._.uid];Object.entries(e).forEach(([o,r])=>n[o]=r)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&e++,r===t.$el));const n=parseFloat(t.minSize),o=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((r,i)=>r.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(o=>o.id===t._.uid),n=this.panes.splice(e,1)[0];this.panes.forEach((o,r)=>o.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:e}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(t={}){t.addedPane||t.removedPane?this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const n=[],o=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(t,r.max),r.min),e-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&o.push(r.id)}),e>.1&&this.readjustSizes(e,n,o)},initialPanesSizing(){let t=100;const e=[],n=[];let o=0;this.panes.forEach(i=>{t-=i.size,i.size!==null&&o++,i.size>=i.max&&e.push(i.id),i.size<=i.min&&n.push(i.id)});let r=100;t>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(t/(this.panesCount-o),i.max),i.min)),r-=i.size}),r>.1&&this.readjustSizes(t,e,n))},equalizeAfterAddOrRemove({addedPane:t}={}){let e=100/this.panesCount,n=0;const o=[],r=[];t&&t.givenSize!==null&&(e=(100-t.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=>{t&&t.givenSize!==null&&t.id===i.id||(i.size=Math.max(Math.min(e,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(t,e,n){let o;o=t>0?t/(this.panesCount-e.length):t/(this.panesCount-n.length),this.panes.forEach(r=>{if(t>0&&!e.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;t-=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;t-=s,r.size=i}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(t)>.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(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,n)=>{e.ondblclick=t?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 vi("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},nn={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(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};nn.render=function(t,e,n,o,r,i){return G(),ie("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=s=>i.onPaneClick(s,t._.uid)),style:Re(t.style)},[J(t.$slots,"default")],4)},nn.__file="src/controls/splitpanes/pane.vue";const Li=Object.prototype.toString;function ae(t,e){return Li.call(t)===`[object ${e}]`}function at(t){return ae(t,"Function")}const mo=t=>typeof t<"u",on=t=>!mo(t);function rn(t){return t===null}function Ni(t){return on(t)&&rn(t)}function Bi(t){return on(t)||rn(t)}const Me=t=>t!=null&&t!==null&&ae(t,"Object");function Ui(t){return ae(t,"Date")}function ji(t){return ae(t,"Number")}function Oi(t){return ae(t,"AsyncFunction")}function Wi(t){return ae(t,"Promise")&&Me(t)&&at(t.then)&&at(t.catch)}function ct(t){return ae(t,"String")}function Hi(t){return t===!0||t===!1||ae(t,"Boolean")}function sn(t){return t&&Array.isArray(t)}const Fi=()=>typeof window<"u",qi=t=>typeof window<"u"&&ae(t,"Window"),Gi=t=>Me(t)&&!!t.tagName,Xi=typeof window>"u";function Vi(t){return t&&["IMAGE","IMG"].includes(t.tagName)}function Ki(t){return t==null||(ct(t)||sn(t)?t.length===0:!!Me(t)&&JSON.stringify(t)==="{}")}function Ji(t){return ae(t,"Error")}function Yi(t){return ae(t,"WeakSet")}function Zi(t){return ae(t,"WeakMap")}function Qi(t){return ae(t,"Symbol")}function es(t){return ae(t,"Map")}const ts=t=>/^(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(t);var $e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ns={exports:{}},an=lt(ns.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(_,d){var p=_[0],g=_[1],u=_[2],v=_[3];g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&u|~g&v)+d[0]-680876936|0)<<7|p>>>25)+g|0)&g|~p&u)+d[1]-389564586|0)<<12|v>>>20)+p|0)&p|~v&g)+d[2]+606105819|0)<<17|u>>>15)+v|0)&v|~u&p)+d[3]-1044525330|0)<<22|g>>>10)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&u|~g&v)+d[4]-176418897|0)<<7|p>>>25)+g|0)&g|~p&u)+d[5]+1200080426|0)<<12|v>>>20)+p|0)&p|~v&g)+d[6]-1473231341|0)<<17|u>>>15)+v|0)&v|~u&p)+d[7]-45705983|0)<<22|g>>>10)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&u|~g&v)+d[8]+1770035416|0)<<7|p>>>25)+g|0)&g|~p&u)+d[9]-1958414417|0)<<12|v>>>20)+p|0)&p|~v&g)+d[10]-42063|0)<<17|u>>>15)+v|0)&v|~u&p)+d[11]-1990404162|0)<<22|g>>>10)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&u|~g&v)+d[12]+1804603682|0)<<7|p>>>25)+g|0)&g|~p&u)+d[13]-40341101|0)<<12|v>>>20)+p|0)&p|~v&g)+d[14]-1502002290|0)<<17|u>>>15)+v|0)&v|~u&p)+d[15]+1236535329|0)<<22|g>>>10)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&v|u&~v)+d[1]-165796510|0)<<5|p>>>27)+g|0)&u|g&~u)+d[6]-1069501632|0)<<9|v>>>23)+p|0)&g|p&~g)+d[11]+643717713|0)<<14|u>>>18)+v|0)&p|v&~p)+d[0]-373897302|0)<<20|g>>>12)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&v|u&~v)+d[5]-701558691|0)<<5|p>>>27)+g|0)&u|g&~u)+d[10]+38016083|0)<<9|v>>>23)+p|0)&g|p&~g)+d[15]-660478335|0)<<14|u>>>18)+v|0)&p|v&~p)+d[4]-405537848|0)<<20|g>>>12)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&v|u&~v)+d[9]+568446438|0)<<5|p>>>27)+g|0)&u|g&~u)+d[14]-1019803690|0)<<9|v>>>23)+p|0)&g|p&~g)+d[3]-187363961|0)<<14|u>>>18)+v|0)&p|v&~p)+d[8]+1163531501|0)<<20|g>>>12)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g&v|u&~v)+d[13]-1444681467|0)<<5|p>>>27)+g|0)&u|g&~u)+d[2]-51403784|0)<<9|v>>>23)+p|0)&g|p&~g)+d[7]+1735328473|0)<<14|u>>>18)+v|0)&p|v&~p)+d[12]-1926607734|0)<<20|g>>>12)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g^u^v)+d[5]-378558|0)<<4|p>>>28)+g|0)^g^u)+d[8]-2022574463|0)<<11|v>>>21)+p|0)^p^g)+d[11]+1839030562|0)<<16|u>>>16)+v|0)^v^p)+d[14]-35309556|0)<<23|g>>>9)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g^u^v)+d[1]-1530992060|0)<<4|p>>>28)+g|0)^g^u)+d[4]+1272893353|0)<<11|v>>>21)+p|0)^p^g)+d[7]-155497632|0)<<16|u>>>16)+v|0)^v^p)+d[10]-1094730640|0)<<23|g>>>9)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g^u^v)+d[13]+681279174|0)<<4|p>>>28)+g|0)^g^u)+d[0]-358537222|0)<<11|v>>>21)+p|0)^p^g)+d[3]-722521979|0)<<16|u>>>16)+v|0)^v^p)+d[6]+76029189|0)<<23|g>>>9)+u|0,g=((g+=((u=((u+=((v=((v+=((p=((p+=(g^u^v)+d[9]-640364487|0)<<4|p>>>28)+g|0)^g^u)+d[12]-421815835|0)<<11|v>>>21)+p|0)^p^g)+d[15]+530742520|0)<<16|u>>>16)+v|0)^v^p)+d[2]-995338651|0)<<23|g>>>9)+u|0,g=((g+=((v=((v+=(g^((p=((p+=(u^(g|~v))+d[0]-198630844|0)<<6|p>>>26)+g|0)|~u))+d[7]+1126891415|0)<<10|v>>>22)+p|0)^((u=((u+=(p^(v|~g))+d[14]-1416354905|0)<<15|u>>>17)+v|0)|~p))+d[5]-57434055|0)<<21|g>>>11)+u|0,g=((g+=((v=((v+=(g^((p=((p+=(u^(g|~v))+d[12]+1700485571|0)<<6|p>>>26)+g|0)|~u))+d[3]-1894986606|0)<<10|v>>>22)+p|0)^((u=((u+=(p^(v|~g))+d[10]-1051523|0)<<15|u>>>17)+v|0)|~p))+d[1]-2054922799|0)<<21|g>>>11)+u|0,g=((g+=((v=((v+=(g^((p=((p+=(u^(g|~v))+d[8]+1873313359|0)<<6|p>>>26)+g|0)|~u))+d[15]-30611744|0)<<10|v>>>22)+p|0)^((u=((u+=(p^(v|~g))+d[6]-1560198380|0)<<15|u>>>17)+v|0)|~p))+d[13]+1309151649|0)<<21|g>>>11)+u|0,g=((g+=((v=((v+=(g^((p=((p+=(u^(g|~v))+d[4]-145523070|0)<<6|p>>>26)+g|0)|~u))+d[11]-1120210379|0)<<10|v>>>22)+p|0)^((u=((u+=(p^(v|~g))+d[2]+718787259|0)<<15|u>>>17)+v|0)|~p))+d[9]-343485551|0)<<21|g>>>11)+u|0,_[0]=p+_[0]|0,_[1]=g+_[1]|0,_[2]=u+_[2]|0,_[3]=v+_[3]|0}function o(_){var d,p=[];for(d=0;d<64;d+=4)p[d>>2]=_.charCodeAt(d)+(_.charCodeAt(d+1)<<8)+(_.charCodeAt(d+2)<<16)+(_.charCodeAt(d+3)<<24);return p}function r(_){var d,p=[];for(d=0;d<64;d+=4)p[d>>2]=_[d]+(_[d+1]<<8)+(_[d+2]<<16)+(_[d+3]<<24);return p}function i(_){var d,p,g,u,v,A,P=_.length,$=[1732584193,-271733879,-1732584194,271733878];for(d=64;d<=P;d+=64)n($,o(_.substring(d-64,d)));for(p=(_=_.substring(d-64)).length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d=0;d<p;d+=1)g[d>>2]|=_.charCodeAt(d)<<(d%4<<3);if(g[d>>2]|=128<<(d%4<<3),d>55)for(n($,g),d=0;d<16;d+=1)g[d]=0;return u=(u=8*P).toString(16).match(/(.*?)(.{0,8})$/),v=parseInt(u[2],16),A=parseInt(u[1],16)||0,g[14]=v,g[15]=A,n($,g),$}function s(_){var d,p,g,u,v,A,P=_.length,$=[1732584193,-271733879,-1732584194,271733878];for(d=64;d<=P;d+=64)n($,r(_.subarray(d-64,d)));for(p=(_=d-64<P?_.subarray(d-64):new Uint8Array(0)).length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d=0;d<p;d+=1)g[d>>2]|=_[d]<<(d%4<<3);if(g[d>>2]|=128<<(d%4<<3),d>55)for(n($,g),d=0;d<16;d+=1)g[d]=0;return u=(u=8*P).toString(16).match(/(.*?)(.{0,8})$/),v=parseInt(u[2],16),A=parseInt(u[1],16)||0,g[14]=v,g[15]=A,n($,g),$}function c(_){var d,p="";for(d=0;d<4;d+=1)p+=e[_>>8*d+4&15]+e[_>>8*d&15];return p}function f(_){var d;for(d=0;d<_.length;d+=1)_[d]=c(_[d]);return _.join("")}function m(_){return/[\u0080-\uFFFF]/.test(_)&&(_=unescape(encodeURIComponent(_))),_}function S(_,d){var p,g=_.length,u=new ArrayBuffer(g),v=new Uint8Array(u);for(p=0;p<g;p+=1)v[p]=_.charCodeAt(p);return d?v:u}function E(_){return String.fromCharCode.apply(null,new Uint8Array(_))}function M(_,d,p){var g=new Uint8Array(_.byteLength+d.byteLength);return g.set(new Uint8Array(_)),g.set(new Uint8Array(d),_.byteLength),p?g:g.buffer}function B(_){var d,p=[],g=_.length;for(d=0;d<g-1;d+=2)p.push(parseInt(_.substr(d,2),16));return String.fromCharCode.apply(String,p)}function T(){this.reset()}return f(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function _(d,p){return(d=0|d||0)<0?Math.max(d+p,0):Math.min(d,p)}ArrayBuffer.prototype.slice=function(d,p){var g,u,v,A,P=this.byteLength,$=_(d,P),D=P;return p!==t&&(D=_(p,P)),$>D?new ArrayBuffer(0):(g=D-$,u=new ArrayBuffer(g),v=new Uint8Array(u),A=new Uint8Array(this,$,g),v.set(A),u)}}(),T.prototype.append=function(_){return this.appendBinary(m(_)),this},T.prototype.appendBinary=function(_){this._buff+=_,this._length+=_.length;var d,p=this._buff.length;for(d=64;d<=p;d+=64)n(this._hash,o(this._buff.substring(d-64,d)));return this._buff=this._buff.substring(d-64),this},T.prototype.end=function(_){var d,p,g=this._buff,u=g.length,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(d=0;d<u;d+=1)v[d>>2]|=g.charCodeAt(d)<<(d%4<<3);return this._finish(v,u),p=f(this._hash),_&&(p=B(p)),this.reset(),p},T.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},T.prototype.setState=function(_){return this._buff=_.buff,this._length=_.length,this._hash=_.hash,this},T.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},T.prototype._finish=function(_,d){var p,g,u,v=d;if(_[v>>2]|=128<<(v%4<<3),v>55)for(n(this._hash,_),v=0;v<16;v+=1)_[v]=0;p=(p=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(p[2],16),u=parseInt(p[1],16)||0,_[14]=g,_[15]=u,n(this._hash,_)},T.hash=function(_,d){return T.hashBinary(m(_),d)},T.hashBinary=function(_,d){var p=f(i(_));return d?B(p):p},T.ArrayBuffer=function(){this.reset()},T.ArrayBuffer.prototype.append=function(_){var d,p=M(this._buff.buffer,_,!0),g=p.length;for(this._length+=_.byteLength,d=64;d<=g;d+=64)n(this._hash,r(p.subarray(d-64,d)));return this._buff=d-64<g?new Uint8Array(p.buffer.slice(d-64)):new Uint8Array(0),this},T.ArrayBuffer.prototype.end=function(_){var d,p,g=this._buff,u=g.length,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(d=0;d<u;d+=1)v[d>>2]|=g[d]<<(d%4<<3);return this._finish(v,u),p=f(this._hash),_&&(p=B(p)),this.reset(),p},T.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.ArrayBuffer.prototype.getState=function(){var _=T.prototype.getState.call(this);return _.buff=E(_.buff),_},T.ArrayBuffer.prototype.setState=function(_){return _.buff=S(_.buff,!0),T.prototype.setState.call(this,_)},T.ArrayBuffer.prototype.destroy=T.prototype.destroy,T.ArrayBuffer.prototype._finish=T.prototype._finish,T.ArrayBuffer.hash=function(_,d){var p=f(s(new Uint8Array(_)));return d?B(p):p},T}());const cn=[];class de{static addHandler(e,n,o){e.addEventListener?e.addEventListener(n,o,!1):e.attachEvent?e.attachEvent("on"+n,o):e["on"+n]=o}static removeHandler(e,n,o){e.removeEventListener?e.removeEventListener(n,o,!1):e.detachEvent?e.detachEvent("on"+n,o):delete e["on"+n]}static windowResizeHandler(e){de.addHandler(window,"resize",e)}static offWindowResizeHandler(e){de.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=window.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,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=e;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(e=window.document.documentElement){let n=e;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 e=window.document;var n=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.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!!de.fullScreenElement()}static onFullScreenChanged(e){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=de.isFullScreen();e(o)}):document.addEventListener("MSFullscreenChange",function(){const o=de.isFullScreen();e(o)})}static stringifyCircularHandler(e,n){if(typeof n=="object"&&n!==null){if(cn.indexOf(n)!==-1)return;cn.push(n)}return n}static jsonStringify(e){if(!e)return"";const n=JSON.stringify(e,de.stringifyCircularHandler);return cn.length=0,n}static jsonParse(e){const n=de.jsonStringify(e);if(n.length>1)return JSON.parse(n)}static getObjectURL(e){let n;const o=window;return o.createObjcectURL!=null?n=o.createOjcectURL(e):window.URL!=null?n=window.URL.createObjectURL(e):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(e)),n}static getFileShortMD5(e,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=e,s=2097152,c=new an.ArrayBuffer,f=new FileReader;f.onload=function(m){c.append(m.target?.result);const S=c.end();n({isOK:!0,data:S})},f.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;f.readAsArrayBuffer(r.call(i,0,m))}()}static getFileMD5(e,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=e,s=2097152,c=Math.ceil(i.size/s);let f=0;const m=new an.ArrayBuffer,S=new FileReader;function E(){const M=f*s,B=M+s>=i.size?i.size:M+s;S.readAsArrayBuffer(r.call(i,M,B))}S.onload=function(M){if(m.append(M.target?.result),f++,f<c)E();else{const B=m.end();n({isOK:!0,data:B})}},S.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})},E()}static MD5(e,n=!1){return an.hash(e,n)}static copyTextByCommand(e){return new Promise((n,o)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then(function(){return!0},function(n){return!1}):de.copyTextByCommand(e);static copyElementTextByCommand(e){const n=document.createRange();n.selectNode(document.getElementById(e));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(e){if(!navigator.clipboard)return de.copyElementTextByCommand(e);const n=document.createRange();n.selectNode(document.getElementById(e));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(e){de.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,n,o){const r=o||document.body;let{className:i}=r;i=i.replace(n,""),r.className=e?`${i} ${n} `:i}static setCssVar(e,n,o=document.documentElement){o.style.setProperty(e,n)}static dispatchWindowResize(){const e=new Event("resize");window.dispatchEvent(e)}static dispatchElementEvent(e,n="click",o){let r;if(r=ct(e)?document.getElementById(e):e,r){const i=new Event(n,{bubbles:!0,cancelable:!0});o&&r.addEventListener("ev",s=>{o(s)},!1),r.dispatchEvent(i)}}}class ht{static isNullOrEmpty=e=>e===null||e===""||e===void 0||e.length===0;static isNotEmpty=e=>!(e===null||e===""||e===void 0||e.length===0);static toHump(e){return e.replace(/[\-\/\_](\w)/g,(n,o)=>o.toUpperCase()).replace("views","")}}class ut{prefixKey;storage;constructor(e="",n=localStorage){this.prefixKey=e,this.storage=n}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,n,o=604800){const r=JSON.stringify({value:n,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(e),r)}get(e,n=null){const o=this.storage.getItem(this.getKey(e));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(e))}catch{return n}return n}getJsonObject(e){const n=this.storage.getItem(this.getKey(e));if(n)try{const o=JSON.parse(n);if(o.expire===null||o.expire>=Date.now())return o;this.remove(this.getKey(e))}catch{return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,n,o=604800){document.cookie=`${this.getKey(e)}=${n}; Max-Age=${o}`}getCookie(e){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(e))return i[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let n=e.length;n--;)document.cookie=e[n]+"=0;expire="+new Date(0).toUTCString()}}const os=new ut("",localStorage);function dt(){let t=[];const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());t[n]=e.substring(r,r+1)}t[14]="4";const o=3&Number(t[19])|8;return t[19]=e.substring(o,o+1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function rs(){var t=new Date().getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(t+16*Math.random())%16|0;return t=Math.floor(t/16),(n==="x"?o:3&o|8).toString(16)});return e}function is(t){const e=t.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(e[3]||"1"),o=Math.floor(n*parseInt(e[0])+255*(1-n)),r=Math.floor(n*parseInt(e[1])+255*(1-n)),i=Math.floor(n*parseInt(e[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)}function ss(t){var e=t.toLowerCase();if(ft(t)){if(e.length===4){for(var n="#",o=1;o<4;o+=1){const i=e.slice(o,o+1);n+=i.concat(i)}e=n}var r=[];for(o=1;o<7;o+=2)r.push(parseInt("0x"+e.slice(o,o+2)));return"rgb("+r.join(",")+")"}return e}function as(t){const e=t;if(e.length===4){let o="#";for(var n=1;n<4;n+=1){const r=e.slice(n,n+1);o+=r.concat(r)}return o}return e}var Ae;function cs(t){if(typeof t=="object"||!t)return;const e=t.toLowerCase().substring(0,1);return e==="#"?Ae.Hex:e==="r"||e==="("?Ae.RGBA:e==="h"?Ae.Hsla:Ae.RGBA}function ls(t){if(t){var e=t.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(e){var n,o,r,i=(parseFloat(e[1])%360+360)%360/360,s=parseFloat(e[2])/(/%$/.test(e[2])?100:1),c=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(s===0)n=o=r=c;else{var f=c<=.5?c*(s+1):c+s-c*s,m=2*c-f;n=ln(m,f,i+1/3),o=ln(m,f,i),r=ln(m,f,i-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${r=Math.round(255*r)},${e[4]?parseFloat(e[4]):1})`}}}function ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ft(t){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(t)}function hs(t,e,n){const o=(t<<16|e<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function hn(t){let e=t.toLowerCase();if(ft(t)){if(e.length===4){let o="#";for(let r=1;r<4;r+=1)o+=e.slice(r,r+1).concat(e.slice(r,r+1));e=o}const n=[];for(let o=1;o<7;o+=2)n.push(parseInt("0x"+e.slice(o,o+2)));return"RGB("+n.join(",")+")"}return e}function us(t){if(!ft(t))return;const[e,n,o]=hn(t).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*e+.578*n+.114*o<192}function ds(t,e){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=Math.trunc(255*e/100),`#${dn(t.substring(0,2),e)}${dn(t.substring(2,4),e)}${dn(t.substring(4,6),e)}`}function fs(t,e){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=Math.trunc(255*e/100),`#${un(t.substring(0,2),e)}${un(t.substring(2,4),e)}${un(t.substring(4,6),e)}`}function un(t,e){const n=parseInt(t,16)+e,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function vo(t,e,n){const o=[t,e,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 ps(t){return function(e,n){return(vo(~~e[0],~~e[1],~~e[2])+.05)/(vo(n[0],n[1],n[2])+.05)}(hn(t.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function dn(t,e){const n=parseInt(t,16)-e,o=n<0?0:n;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function fn(t){return{all:t=t||new Map,on(e,n){const o=t?.get(e);o&&o.push(n)||t?.set(e,[n])},off(e,n){const o=t?.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit(e,n){(t?.get(e)||[]).slice().map(o=>{o(n)}),(t?.get("*")||[]).slice().map(o=>{o(e,n)})}}}(function(t){t[t.RGBA=0]="RGBA",t[t.Hex=1]="Hex",t[t.Hsla=2]="Hsla"})(Ae||(Ae={}));const De=fn(),ue={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},pt=(t,e)=>{const n=document.createElement("a");n.download=e,n.style.display="none";const o=new Blob([t],{type:"application/octet-stream"});n.href=URL.createObjectURL(o),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function gs(t,e){const n=window.URL||window.webkitURL||window,o=new Blob([t]),r=document.createElement("a");r.href=n.createObjectURL(o),r.download=e,r.click(),n.revokeObjectURL(r.href)}const yo=(t,e)=>{const n=JSON.stringify(t,null,2);e?pt(n,e+".json"):De.emit(ue.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},ms=(t,e,n)=>{t.get(e,{responseType:"blob"}).then(function(o){pt(o.data,n)}).catch(o=>{console.warn(o),De.emit(ue.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function wo(t){const e=t.lastIndexOf("/")+1;let n=t.substring(e);return n=decodeURI(n.split("?")[0]),n}function vs({url:t,target:e="_blank",fileName:n}){const o=new URL(t).host==location.host;return new Promise((r,i)=>{if(o){const s=document.createElement("a");if(s.href=t,s.target=e,s.download!==void 0&&(s.download=n||wo(t)),document.createEvent){const c=document.createEvent("MouseEvents");return c.initEvent("click",!0,!0),s.dispatchEvent(c),r(!0)}return t.indexOf("?")===-1&&(t+="?download"),window.open(t,e),r(!0)}{const s=document.createElement("canvas"),c=document.createElement("img");c.setAttribute("crossOrigin","Anonymous"),c.src=t,c.onload=f=>{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=wo(t),S.click(),URL.revokeObjectURL(S.href),r(!0)}},"image/jpeg")},c.onerror=f=>i(f)}})}function ys(t){const e=new Date().getTime();let n=new Date().getTime();for(;n-e<t;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${bo}\u6BEB\u79D2`)}function bo(t){return new Promise(e=>setTimeout(e,t))}var _o,So,pn,Co={exports:{}};So=$e,pn=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],r={},i=null;function s(T,_){var d=T[_];if(typeof d.bind=="function")return d.bind(T);try{return Function.prototype.bind.call(d,T)}catch{return function(){return Function.prototype.apply.apply(d,[T,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function f(T){return T==="debug"&&(T="log"),typeof console!==e&&(T==="trace"&&n?c:console[T]!==void 0?s(console,T):console.log!==void 0?s(console,"log"):t)}function m(){for(var T=this.getLevel(),_=0;_<o.length;_++){var d=o[_];this[d]=_<T?t:this.methodFactory(d,T,this.name)}if(this.log=this.debug,typeof console===e&&T<this.levels.SILENT)return"No console available for logging"}function S(T){return function(){typeof console!==e&&(m.call(this),this[T].apply(this,arguments))}}function E(T,_,d){return f(T)||S.apply(this,arguments)}function M(T,_){var d,p,g,u=this,v="loglevel";function A(){var D;if(typeof window!==e&&v){try{D=window.localStorage[v]}catch{}if(typeof D===e)try{var U=window.document.cookie,O=encodeURIComponent(v),H=U.indexOf(O+"=");H!==-1&&(D=/^([^;]+)/.exec(U.slice(H+O.length+1))[1])}catch{}return u.levels[D]===void 0&&(D=void 0),D}}function P(D){var U=D;if(typeof U=="string"&&u.levels[U.toUpperCase()]!==void 0&&(U=u.levels[U.toUpperCase()]),typeof U=="number"&&U>=0&&U<=u.levels.SILENT)return U;throw new TypeError("log.setLevel() called with invalid level: "+D)}typeof T=="string"?v+=":"+T:typeof T=="symbol"&&(v=void 0),u.name=T,u.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},u.methodFactory=_||E,u.getLevel=function(){return g??p??d},u.setLevel=function(D,U){return g=P(D),U!==!1&&function(O){var H=(o[O]||"silent").toUpperCase();if(typeof window!==e&&v){try{return void(window.localStorage[v]=H)}catch{}try{window.document.cookie=encodeURIComponent(v)+"="+H+";"}catch{}}}(g),m.call(u)},u.setDefaultLevel=function(D){p=P(D),A()||u.setLevel(D,!1)},u.resetLevel=function(){g=null,function(){if(typeof window!==e&&v){try{window.localStorage.removeItem(v)}catch{}try{window.document.cookie=encodeURIComponent(v)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}(),m.call(u)},u.enableAll=function(D){u.setLevel(u.levels.TRACE,D)},u.disableAll=function(D){u.setLevel(u.levels.SILENT,D)},u.rebuild=function(){if(i!==u&&(d=P(i.getLevel())),m.call(u),i===u)for(var D in r)r[D].rebuild()},d=P(i?i.getLevel():"WARN");var $=A();$!=null&&(g=P($)),m.call(u)}(i=new M).getLogger=function(T){if(typeof T!="symbol"&&typeof T!="string"||T==="")throw new TypeError("You must supply a name when creating a logger.");var _=r[T];return _||(_=r[T]=new M(T,i.methodFactory)),_};var B=typeof window!==e?window.log:void 0;return i.noConflict=function(){return typeof window!==e&&window.log===i&&(window.log=B),i},i.getLoggers=function(){return r},i.default=i,i},(_o=Co).exports?_o.exports=pn():So.log=pn();var gn=Co.exports;class Eo{message;eventBus;constructor(e,n){e&&(this.message=e),n&&(this.eventBus=n)}msg(e,n=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:e,duration:n});else switch(o){case"info":this.message.info(e,n);break;case"success":this.message.success(e,n);break;case"warning":this.message.warn?this.message.warn(e,n):this.message.warning&&this.message.warning(e,n);break;case"error":this.message.error(e,n)}else{switch(o){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":o="dark",console.error(e)}this.eventBus&&this.eventBus.emit(ue.AlertInfoEvent,{type:o,info:e})}}info(e,n=3){this.msg(e,n,"info")}warn(e,n=3){this.msg(e,n,"warning")}err(e,n=3){this.msg(e,n,"error")}success(e,n=3){this.msg(e,n,"success")}}let ko=!1;const N={Config:SysConfig,EventBus:De,DefaultProxyClient:null,Axios:Ri,Message:new Eo(void 0,De),LayoutMap:new Map,Logger:t=>{ko||(import.meta.env?.DEV||SysConfig.UI.ProductLog?gn.enableAll():gn.setDefaultLevel("warn"),ko=!0);const e=t||"default";return gn.getLogger(e)}},xo="access_token",we=new ut("user",localStorage);function Le(){return we.get(xo)}function mn(){we.remove(xo)}function Io(){return Le()?.refresh}function vn(t,e,n,o="json",r){const i={baseURL:N.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:t,paramsSerializer:{serialize:function(s){return Pi.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Le()?.token},responseType:o,cancelToken:r};if(n)for(let s in n)i.headers[s]=n[s];return N.SystemID&&(i.headers.sysid=N.SystemID,N.SystemGroup&&(i.headers.sysgroup=N.SystemGroup)),e&&(i.baseURL=e),i}function be(t,e,n,o,r="json",i,s){const c=vn(n,e,o,r,i);return s&&s>=2e4&&(c.timeout=s),N.Axios?.get(t,c).catch(function(f){gt(f,e,t,"Get")})}function gt(t,e,n,o="Get"){const r=`${e}${n}`;if(t&&t.response){let i=!1;const s=t.response.status;switch(s){case 400:t.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:t.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:t.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:t.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:t.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:t.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const f=t.response.data;if(f){const m=f.indexOf(":"),S=f.indexOf(`
2
- `);if(m>0&&S-m>2){const E=f.substring(m+2,S);E.indexOf("System.Exception")>0?t.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(i=!0,t.message=E)}else i=!0,t.message=f}else t.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:t.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:t.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:t.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:t.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:t.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:t.message=`\u8FDE\u63A5\u9519\u8BEF${t.response.status}`}let c={address:r,code:s,isExceptionInfo:i,message:t.message,result:t.response.data};if(N.EventBus.emit(ue.AxiosRequestErrorEvent,c),i)throw new Error(t.message)}else{if(t?.message)throw new Error(t.message);console.error(t,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function To(t,e,n,o,r,i="json",s){const c=vn(o,e,r,i);s&&s>=2e4&&(c.timeout=s),c.headers["Content-Type"]="multipart/form-data";const f=function(m){let S=new FormData;return m&&Object.keys(m).forEach(E=>{if(!m)return;let M=m[E];M!=null&&(sn(M)?M.forEach(B=>{S.append(E,Po(B))}):S.append(E,Po(M)))}),S}(n);return N.Axios?.post(t,f,c).catch(function(m){gt(m,e,t,"Post")})}function Ro(t,e,n,o,r,i="json",s){const c=vn(o,e,r,i);return s&&s>=2e4&&(c.timeout=s),N.Axios?.post(t,n,c).catch(function(f){gt(f,e,t,"Post")})}function ws(t,e){return be(t,void 0,e)}function bs(t,e){return To(t,void 0,e)}function _s(t,e){return N.Axios?.get(t,{params:e}).catch(function(n){gt(n,t,"","\u5916\u90E8Get")})}function Po(t){return t instanceof Blob?t:t.toString()}var yn={exports:{}},Ss=typeof window<"u"?window:$e!==void 0?$e:typeof self<"u"?self:{},Cs=function(t){if(!t)return!1;var e=Es.call(t);return e==="[object Function]"||typeof t=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},Es=Object.prototype.toString,wn=function(t){return t.replace(/^\s+|\s+$/g,"")},ks=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var o in n)xs.call(n,o)&&(t[o]=n[o])}return t},xs=Object.prototype.hasOwnProperty,zo=Ss,Is=Cs,Ts=function(t){if(!t)return{};for(var e,n={},o=wn(t).split(`
3
- `),r=0;r<o.length;r++){var i=o[r],s=i.indexOf(":"),c=wn(i.slice(0,s)).toLowerCase(),f=wn(i.slice(s+1));n[c]===void 0?n[c]=f:(e=n[c],Object.prototype.toString.call(e)==="[object Array]"?n[c].push(f):n[c]=[n[c],f])}return n},Rs=ks;function Mo(t,e,n){var o=t;return Is(e)?(n=e,typeof t=="string"&&(o={uri:t})):o=Rs(e,{uri:t}),o.callback=n,o}function _e(t,e,n){return $o(e=Mo(t,e,n))}function $o(t){if(t.callback===void 0)throw new Error("callback argument missing");var e=!1,n=function(p,g,u){e||(e=!0,t.callback(p,g,u))};function o(){var p=void 0;if(p=f.response?f.response:f.responseText||function(g){try{if(g.responseType==="document")return g.responseXML;var u=g.responseXML&&g.responseXML.documentElement.nodeName==="parsererror";if(g.responseType===""&&!u)return g.responseXML}catch{}return null}(f),_)try{p=JSON.parse(p)}catch{}return p}function r(p){return clearTimeout(m),p instanceof Error||(p=new Error(""+(p||"Unknown XMLHttpRequest Error"))),p.statusCode=0,n(p,d)}function i(){if(!c){var p;clearTimeout(m),p=t.useXDR&&f.status===void 0?200:f.status===1223?204:f.status;var g=d,u=null;return p!==0?(g={body:o(),statusCode:p,method:E,headers:{},url:S,rawRequest:f},f.getAllResponseHeaders&&(g.headers=Ts(f.getAllResponseHeaders()))):u=new Error("Internal XMLHttpRequest Error"),n(u,g,g.body)}}var s,c,f=t.xhr||null;f||(f=t.cors||t.useXDR?new _e.XDomainRequest:new _e.XMLHttpRequest);var m,S=f.url=t.uri||t.url,E=f.method=t.method||"GET",M=t.body||t.data,B=f.headers=t.headers||{},T=!!t.sync,_=!1,d={body:void 0,headers:{},statusCode:0,method:E,url:S,rawRequest:f};if("json"in t&&t.json!==!1&&(_=!0,B.accept||B.Accept||(B.Accept="application/json"),E!=="GET"&&E!=="HEAD"&&(B["content-type"]||B["Content-Type"]||(B["Content-Type"]="application/json"),M=JSON.stringify(t.json===!0?M:t.json))),f.onreadystatechange=function(){f.readyState===4&&setTimeout(i,0)},f.onload=i,f.onerror=r,f.onprogress=function(){},f.onabort=function(){c=!0},f.ontimeout=r,f.open(E,S,!T,t.username,t.password),T||(f.withCredentials=!!t.withCredentials),!T&&t.timeout>0&&(m=setTimeout(function(){if(!c){c=!0,f.abort("timeout");var p=new Error("XMLHttpRequest timeout");p.code="ETIMEDOUT",r(p)}},t.timeout)),f.setRequestHeader)for(s in B)B.hasOwnProperty(s)&&f.setRequestHeader(s,B[s]);else if(t.headers&&!function(p){for(var g in p)if(p.hasOwnProperty(g))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(f.responseType=t.responseType),"beforeSend"in t&&typeof t.beforeSend=="function"&&t.beforeSend(f),f.send(M||null),f}yn.exports=_e,yn.exports.default=_e,_e.XMLHttpRequest=zo.XMLHttpRequest||function(){},_e.XDomainRequest="withCredentials"in new _e.XMLHttpRequest?_e.XMLHttpRequest:zo.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){_e[t==="delete"?"del":t]=function(e,n,o){return(n=Mo(e,n,o)).method=t.toUpperCase(),$o(n)}});var Ps=lt(yn.exports);const zs=[200,201,202,204,308],Ms=[408,502,503,504];class Ao{endpoint;file;headers;method;chunkSize;attempts;delayBeforeAttempt;md5;chunk;chunkCount;chunkByteSize;maxFileBytes;endpointValue;totalChunks;attemptCount;offline;paused;success;currentXhr;reader;eventTarget;fileName;constructor(e){this.endpoint=e.endpoint,this.file=e.file,this.fileName=encodeURI(this.file.name),this.headers=e.headers||{},this.method=e.method||"PUT",this.chunkSize=e.chunkSize||5120,this.attempts=e.attempts||5,this.delayBeforeAttempt=e.delayBeforeAttempt||1,this.md5=e.md5||"",this.maxFileBytes=1024*(e.maxFileSize||0),this.chunkCount=0,this.chunkByteSize=1024*this.chunkSize,this.totalChunks=Math.ceil(this.file.size/this.chunkByteSize),this.attemptCount=0,this.offline=!1,this.paused=!1,this.success=!1,this.reader=new FileReader,this.eventTarget=fn(),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(e,n){this.eventTarget.on(e,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(e,n){this.eventTarget.emit(e,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(e=>(this.endpointValue=e,this.endpointValue))}getChunk(){return new Promise(e=>{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"})),e(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(o,o+n))})}xhrPromise(e){const n=o=>{o.upload.onprogress=r=>{const i=100/this.totalChunks,s=i*this.file.size,c=i*this.chunkCount,f=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(c+f,100))}};return new Promise((o,r)=>{this.currentXhr=Ps({...e,beforeSend:n},(i,s)=>(this.currentXhr=void 0,i?r(i):o(s)))})}sendChunk(){if(!this.chunk)return;const e=this.chunkCount*this.chunkByteSize,n=e+this.chunk.size-1,o={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${e}-${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(e=>{if(this.attemptCount=this.attemptCount+1,e!=null&&zs.includes(e.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:e}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(e!=null&&Ms.includes(e.statusCode)){if(this.paused||this.offline)return;this.manageRetries()}else{if(this.paused||this.offline)return;console.log(`\u670D\u52A1\u5668\u9519\u8BEF:${e?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`),this.dispatch("error",{message:`\u670D\u52A1\u5668\u9519\u8BEF:${e?.statusCode}\uFF0C\u505C\u6B62\u4E0A\u4F20\u3002`,chunkNumber:this.chunkCount,attempts:this.attemptCount})}}).catch(e=>{this.paused||this.offline||this.manageRetries()})}}const $s=t=>new Ao(t),As=new class{hasClass(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}addClass(t,e){this.hasClass(t,e)||(t.className+=" "+e)}removeClass(t,e){if(this.hasClass(t,e)){const n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ")}}toggleClass(t,e){this.hasClass(t,e)?this.removeClass(t,e):this.addClass(t,e)}setCSSProperty(t,e,n){t?.style.setProperty(e,n)}};class tt{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!ht.isNullOrEmpty(e)){if(tt.httpTransport||(tt.httpTransport=new Ai),this.client=new zi(e),!this.client)throw Error("Hprose Client\u521D\u59CB\u5316\u9519\u8BEF");this.hproseURL=e,this.init()}}init(){this.client&&this.client.useServiceAsync().then(e=>{this.hproseProxy=e}).catch(e=>{String(e).indexOf("find this method ~")>0?(this.hproseProxy=this.client?.useService(),console.warn("\u65E7\u7248\u672C\u4E0D\u652F\u6301useServiceAsync")):De.emit(ue.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(e)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,n,o){if(this.client)return await this.client.invoke(e,n,o)}encode(e,n,o){if(this.client)return this.client.codec.encode(e,n,o)}decode(e,n){if(this.client)return this.client.codec.decode(e,n)}}class Ve{hproseClient;hpProxyObj;defaultContext=new tn;constructor(e){this.hproseClient=new tt(e),this.hpProxyObj=null}getClientContext(e,n){const o={};n&&(o.requestHeaders=n);const r=Le();o.httpRequestHeaders=e||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),N.SystemID&&(i.sysid=N.SystemID,N.SystemGroup&&(i.sysgroup=N.SystemGroup)),new tn(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 e=await this.hproseClient.getProxy();this.hpProxyObj=e}return this.hpProxyObj||De.emit(ue.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(e,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(e,n,o)}async hproseInvokeContext(e,n,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Le();return console.log(r,"userToken3"),r&&(n||(n=new tn({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,o,n)}async hproseInvokeEncode(e){const n=new st(e).toBytes(),o=await this.hproseClient.client?.request(n,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(e,...n){const o=this.hproseClient.client?.codec?.encode(e,n,this.defaultContext);return st.toString(o)}}const bn=new Map,Ds=function(t,e,n){!N.Config.DefaultHproseAPI&&N.Config.ServiceURL&&(N.Config.DefaultHproseAPI=N.Config.ServiceURL.DefaultHproseAPI),N.Config.DefaultHproseAPI&&ht.isNotEmpty(N.Config.DefaultHproseAPI)&&(N.DefaultProxyClient=new Ve(N.Config.DefaultHproseAPI));const o=N.Config.UI.GrayMode;o&&de.setGrayMode(o);const r=new Eo(t,N.EventBus);N.Message=r,N.SystemID=e,N.SystemGroup=n,N.EventBus.on(ue.HproseServiceErrorEvent,i=>{const s=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",s)}),N.EventBus.on(ue.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),N.EventBus.on(ue.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),N.EventBus.on(ue.CommonWarnEvent,i=>{r.warn(i)})};function Do(t){if(t&&ht.isNotEmpty(t)){if(bn.has(t))return bn.get(t);{const e=new Ve(t);return bn.set(t,e),e}}}function Ls(t){const e=Do(t);return e&&(N.DefaultProxyClient=e),e}const _n="is_LockScreen",Lo=we.get(_n,!1),Ke={isLock:Lo,lockTime:Lo=="true"?Bo():0};function No(t){Ke.isLock=t,we.set(_n,t,10),t&&(mn(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Ns(){return we.get(_n,!1)}function Bo(){let t=3600;return N.Config.UI?.LockTime&&N.Config.UI?.LockTime>=10&&(t=N.Config.UI.LockTime),t}let Sn;function Cn(){clearInterval(Sn),!(window.location.href.indexOf("/login")>0||Ke.isLock)&&(No(!1),Ke.lockTime=Bo(),Sn=setInterval(()=>{if(Ke.lockTime--,Ke.lockTime<=0)return No(!0),clearInterval(Sn)},1e3))}function Bs(){Cn(),document.addEventListener("mousedown",Cn)}function Us(){document.removeEventListener("mousedown",Cn)}function En(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var js={exports:{}},mt=lt(js.exports=function t(e,n,o){function r(c,f){if(!n[c]){if(!e[c]){if(!f&&En)return En(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:{}};e[c][0].call(S.exports,function(E){var M=e[c][1][E];return r(M||E)},S,S.exports,t,e,n,o)}return n[c].exports}for(var i=En,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(t,e,n){(function(o){var r,i,s=o.MutationObserver||o.WebKitMutationObserver;if(s){var c=0,f=new s(M),m=o.document.createTextNode("");f.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 T=o.document.createElement("script");T.onreadystatechange=function(){M(),T.onreadystatechange=null,T.parentNode.removeChild(T),T=null},o.document.documentElement.appendChild(T)}:function(){setTimeout(M,0)};else{var S=new o.MessageChannel;S.port1.onmessage=M,r=function(){S.port2.postMessage(0)}}var E=[];function M(){var T,_;i=!0;for(var d=E.length;d;){for(_=E,E=[],T=-1;++T<d;)_[T]();d=E.length}i=!1}function B(T){E.push(T)!==1||i||r()}e.exports=B}).call(this,$e!==void 0?$e:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(t,e,n){var o=t(1);function r(){}var i={},s=["REJECTED"],c=["FULFILLED"],f=["PENDING"];function m(u){if(typeof u!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,u!==r&&B(this,u)}function S(u,v,A){this.promise=u,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof A=="function"&&(this.onRejected=A,this.callRejected=this.otherCallRejected)}function E(u,v,A){o(function(){var P;try{P=v(A)}catch($){return i.reject(u,$)}P===u?i.reject(u,new TypeError("Cannot resolve promise with itself")):i.resolve(u,P)})}function M(u){var v=u&&u.then;if(u&&(typeof u=="object"||typeof u=="function")&&typeof v=="function")return function(){v.apply(u,arguments)}}function B(u,v){var A=!1;function P(O){A||(A=!0,i.reject(u,O))}function $(O){A||(A=!0,i.resolve(u,O))}function D(){v($,P)}var U=T(D);U.status==="error"&&P(U.value)}function T(u,v){var A={};try{A.value=u(v),A.status="success"}catch(P){A.status="error",A.value=P}return A}function _(u){return u instanceof this?u:i.resolve(new this(r),u)}function d(u){var v=new this(r);return i.reject(v,u)}function p(u){var v=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=u.length,P=!1;if(!A)return this.resolve([]);for(var $=new Array(A),D=0,U=-1,O=new this(r);++U<A;)H(u[U],U);return O;function H(Z,te){function re(Q){$[te]=Q,++D!==A||P||(P=!0,i.resolve(O,$))}v.resolve(Z).then(re,function(Q){P||(P=!0,i.reject(O,Q))})}}function g(u){var v=this;if(Object.prototype.toString.call(u)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=u.length,P=!1;if(!A)return this.resolve([]);for(var $=-1,D=new this(r);++$<A;)U(u[$]);return D;function U(O){v.resolve(O).then(function(H){P||(P=!0,i.resolve(D,H))},function(H){P||(P=!0,i.reject(D,H))})}}e.exports=m,m.prototype.catch=function(u){return this.then(null,u)},m.prototype.then=function(u,v){if(typeof u!="function"&&this.state===c||typeof v!="function"&&this.state===s)return this;var A=new this.constructor(r);return this.state!==f?E(A,this.state===c?u:v,this.outcome):this.queue.push(new S(A,u,v)),A},S.prototype.callFulfilled=function(u){i.resolve(this.promise,u)},S.prototype.otherCallFulfilled=function(u){E(this.promise,this.onFulfilled,u)},S.prototype.callRejected=function(u){i.reject(this.promise,u)},S.prototype.otherCallRejected=function(u){E(this.promise,this.onRejected,u)},i.resolve=function(u,v){var A=T(M,v);if(A.status==="error")return i.reject(u,A.value);var P=A.value;if(P)B(u,P);else{u.state=c,u.outcome=v;for(var $=-1,D=u.queue.length;++$<D;)u.queue[$].callFulfilled(v)}return u},i.reject=function(u,v){u.state=s,u.outcome=v;for(var A=-1,P=u.queue.length;++A<P;)u.queue[A].callRejected(v);return u},m.resolve=_,m.reject=d,m.all=p,m.race=g},{1:1}],3:[function(t,e,n){(function(o){typeof o.Promise!="function"&&(o.Promise=t(2))}).call(this,$e!==void 0?$e:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(t,e,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 f(a,l){a=a||[],l=l||{};try{return new Blob(a,l)}catch(y){if(y.name!=="TypeError")throw y;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"&&t(3);var m=Promise;function S(a,l){l&&a.then(function(h){l(null,h)},function(h){l(h)})}function E(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 B(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var T="local-forage-detect-blob-support",_=void 0,d={},p=Object.prototype.toString,g="readonly",u="readwrite";function v(a){for(var l=a.length,h=new ArrayBuffer(l),w=new Uint8Array(h),y=0;y<l;y++)w[y]=a.charCodeAt(y);return h}function A(a){return new m(function(l){var h=a.transaction(T,u),w=f([""]);h.objectStore(T).put(w,"key"),h.onabort=function(y){y.preventDefault(),y.stopPropagation(),l(!1)},h.oncomplete=function(){var y=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);l(b||!y||parseInt(y[1],10)>=43)}}).catch(function(){return!1})}function P(a){return typeof _=="boolean"?m.resolve(_):A(a).then(function(l){return _=l})}function $(a){var l=d[a.name],h={};h.promise=new m(function(w,y){h.resolve=w,h.reject=y}),l.deferredOperations.push(h),l.dbReady?l.dbReady=l.dbReady.then(function(){return h.promise}):l.dbReady=h.promise}function D(a){var l=d[a.name].deferredOperations.pop();if(l)return l.resolve(),l.promise}function U(a,l){var h=d[a.name].deferredOperations.pop();if(h)return h.reject(l),h.promise}function O(a,l){return new m(function(h,w){if(d[a.name]=d[a.name]||Gn(),a.db){if(!l)return h(a.db);$(a),a.db.close()}var y=[a.name];l&&y.push(a.version);var b=s.open.apply(s,y);l&&(b.onupgradeneeded=function(C){var x=b.result;try{x.createObjectStore(a.storeName),C.oldVersion<=1&&x.createObjectStore(T)}catch(I){if(I.name!=="ConstraintError")throw I;console.warn('The database "'+a.name+'" has been upgraded from version '+C.oldVersion+" to version "+C.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),b.onerror=function(C){C.preventDefault(),w(b.error)},b.onsuccess=function(){var C=b.result;C.onversionchange=function(x){x.target.close()},h(C),D(a)}})}function H(a){return O(a,!1)}function Z(a){return O(a,!0)}function te(a,l){if(!a.db)return!0;var h=!a.db.objectStoreNames.contains(a.storeName),w=a.version<a.db.version,y=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),y||h){if(h){var b=a.db.version+1;b>a.version&&(a.version=b)}return!0}return!1}function re(a){return new m(function(l,h){var w=new FileReader;w.onerror=h,w.onloadend=function(y){var b=btoa(y.target.result||"");l({__local_forage_encoded_blob:!0,data:b,type:a.type})},w.readAsBinaryString(a)})}function Q(a){return f([v(atob(a.data))],{type:a.type})}function ve(a){return a&&a.__local_forage_encoded_blob}function nt(a){var l=this,h=l._initReady().then(function(){var w=d[l._dbInfo.name];if(w&&w.dbReady)return w.dbReady});return E(h,a,a),h}function jt(a){$(a);for(var l=d[a.name],h=l.forages,w=0;w<h.length;w++){var y=h[w];y._dbInfo.db&&(y._dbInfo.db.close(),y._dbInfo.db=null)}return a.db=null,H(a).then(function(b){return a.db=b,te(a)?Z(a):b}).then(function(b){a.db=l.db=b;for(var C=0;C<h.length;C++)h[C]._dbInfo.db=b}).catch(function(b){throw U(a,b),b})}function ge(a,l,h,w){w===void 0&&(w=1);try{var y=a.db.transaction(a.storeName,l);h(null,y)}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),Z(a)}).then(function(){return jt(a).then(function(){ge(a,l,h,w-1)})}).catch(h);h(b)}}function Gn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function _r(a){var l=this,h={db:null};if(a)for(var w in a)h[w]=a[w];var y=d[h.name];y||(y=Gn(),d[h.name]=y),y.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=nt);var b=[];function C(){return m.resolve()}for(var x=0;x<y.forages.length;x++){var I=y.forages[x];I!==l&&b.push(I._initReady().catch(C))}var R=y.forages.slice(0);return m.all(b).then(function(){return h.db=y.db,H(h)}).then(function(z){return h.db=z,te(h,l._defaultConfig.version)?Z(h):z}).then(function(z){h.db=y.db=z,l._dbInfo=h;for(var L=0;L<R.length;L++){var W=R[L];W!==l&&(W._dbInfo.db=h.db,W._dbInfo.version=h.version)}})}function Sr(a,l){var h=this;a=M(a);var w=new m(function(y,b){h.ready().then(function(){ge(h._dbInfo,g,function(C,x){if(C)return b(C);try{var I=x.objectStore(h._dbInfo.storeName).get(a);I.onsuccess=function(){var R=I.result;R===void 0&&(R=null),ve(R)&&(R=Q(R)),y(R)},I.onerror=function(){b(I.error)}}catch(R){b(R)}})}).catch(b)});return S(w,l),w}function Cr(a,l){var h=this,w=new m(function(y,b){h.ready().then(function(){ge(h._dbInfo,g,function(C,x){if(C)return b(C);try{var I=x.objectStore(h._dbInfo.storeName).openCursor(),R=1;I.onsuccess=function(){var z=I.result;if(z){var L=z.value;ve(L)&&(L=Q(L));var W=a(L,z.key,R++);W!==void 0?y(W):z.continue()}else y()},I.onerror=function(){b(I.error)}}catch(z){b(z)}})}).catch(b)});return S(w,l),w}function Er(a,l,h){var w=this;a=M(a);var y=new m(function(b,C){var x;w.ready().then(function(){return x=w._dbInfo,p.call(l)==="[object Blob]"?P(x.db).then(function(I){return I?l:re(l)}):l}).then(function(I){ge(w._dbInfo,u,function(R,z){if(R)return C(R);try{var L=z.objectStore(w._dbInfo.storeName);I===null&&(I=void 0);var W=L.put(I,a);z.oncomplete=function(){I===void 0&&(I=null),b(I)},z.onabort=z.onerror=function(){var F=W.error?W.error:W.transaction.error;C(F)}}catch(F){C(F)}})}).catch(C)});return S(y,h),y}function kr(a,l){var h=this;a=M(a);var w=new m(function(y,b){h.ready().then(function(){ge(h._dbInfo,u,function(C,x){if(C)return b(C);try{var I=x.objectStore(h._dbInfo.storeName).delete(a);x.oncomplete=function(){y()},x.onerror=function(){b(I.error)},x.onabort=function(){var R=I.error?I.error:I.transaction.error;b(R)}}catch(R){b(R)}})}).catch(b)});return S(w,l),w}function xr(a){var l=this,h=new m(function(w,y){l.ready().then(function(){ge(l._dbInfo,u,function(b,C){if(b)return y(b);try{var x=C.objectStore(l._dbInfo.storeName).clear();C.oncomplete=function(){w()},C.onabort=C.onerror=function(){var I=x.error?x.error:x.transaction.error;y(I)}}catch(I){y(I)}})}).catch(y)});return S(h,a),h}function Ir(a){var l=this,h=new m(function(w,y){l.ready().then(function(){ge(l._dbInfo,g,function(b,C){if(b)return y(b);try{var x=C.objectStore(l._dbInfo.storeName).count();x.onsuccess=function(){w(x.result)},x.onerror=function(){y(x.error)}}catch(I){y(I)}})}).catch(y)});return S(h,a),h}function Tr(a,l){var h=this,w=new m(function(y,b){a<0?y(null):h.ready().then(function(){ge(h._dbInfo,g,function(C,x){if(C)return b(C);try{var I=x.objectStore(h._dbInfo.storeName),R=!1,z=I.openKeyCursor();z.onsuccess=function(){var L=z.result;L?a===0||R?y(L.key):(R=!0,L.advance(a)):y(null)},z.onerror=function(){b(z.error)}}catch(L){b(L)}})}).catch(b)});return S(w,l),w}function Rr(a){var l=this,h=new m(function(w,y){l.ready().then(function(){ge(l._dbInfo,g,function(b,C){if(b)return y(b);try{var x=C.objectStore(l._dbInfo.storeName).openKeyCursor(),I=[];x.onsuccess=function(){var R=x.result;R?(I.push(R.key),R.continue()):w(I)},x.onerror=function(){y(x.error)}}catch(R){y(R)}})}).catch(y)});return S(h,a),h}function Pr(a,l){l=B.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,y=this;if(a.name){var b=a.name===h.name&&y._dbInfo.db?m.resolve(y._dbInfo.db):H(a).then(function(C){var x=d[a.name],I=x.forages;x.db=C;for(var R=0;R<I.length;R++)I[R]._dbInfo.db=C;return C});w=a.storeName?b.then(function(C){if(C.objectStoreNames.contains(a.storeName)){var x=C.version+1;$(a);var I=d[a.name],R=I.forages;C.close();for(var z=0;z<R.length;z++){var L=R[z];L._dbInfo.db=null,L._dbInfo.version=x}var W=new m(function(F,q){var ee=s.open(a.name,x);ee.onerror=function(ye){ee.result.close(),q(ye)},ee.onupgradeneeded=function(){ee.result.deleteObjectStore(a.storeName)},ee.onsuccess=function(){var ye=ee.result;ye.close(),F(ye)}});return W.then(function(F){I.db=F;for(var q=0;q<R.length;q++){var ee=R[q];ee._dbInfo.db=F,D(ee._dbInfo)}}).catch(function(F){throw(U(a,F)||m.resolve()).catch(function(){}),F})}}):b.then(function(C){$(a);var x=d[a.name],I=x.forages;C.close();for(var R=0;R<I.length;R++)I[R]._dbInfo.db=null;var z=new m(function(L,W){var F=s.deleteDatabase(a.name);F.onerror=function(){var q=F.result;q&&q.close(),W(F.error)},F.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},F.onsuccess=function(){var q=F.result;q&&q.close(),L(q)}});return z.then(function(L){x.db=L;for(var W=0;W<I.length;W++)D(I[W]._dbInfo)}).catch(function(L){throw(U(a,L)||m.resolve()).catch(function(){}),L})})}else w=m.reject("Invalid arguments");return S(w,l),w}var zr={_driver:"asyncStorage",_initStorage:_r,_support:c(),iterate:Cr,getItem:Sr,setItem:Er,removeItem:kr,clear:xr,length:Ir,key:Tr,keys:Rr,dropInstance:Pr};function Mr(){return typeof openDatabase=="function"}var Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$r="~~local_forage_type~",Xn=/^~~local_forage_type~([^~]+)~/,ot="__lfsc__:",Ot=ot.length,Wt="arbf",Ht="blob",Vn="si08",Kn="ui08",Jn="uic8",Yn="si16",Zn="si32",Qn="ur16",eo="ui32",to="fl32",no="fl64",oo=Ot+Wt.length,ro=Object.prototype.toString;function io(a){var l,h,w,y,b,C=.75*a.length,x=a.length,I=0;a[a.length-1]==="="&&(C--,a[a.length-2]==="="&&C--);var R=new ArrayBuffer(C),z=new Uint8Array(R);for(l=0;l<x;l+=4)h=Se.indexOf(a[l]),w=Se.indexOf(a[l+1]),y=Se.indexOf(a[l+2]),b=Se.indexOf(a[l+3]),z[I++]=h<<2|w>>4,z[I++]=(15&w)<<4|y>>2,z[I++]=(3&y)<<6|63&b;return R}function Ft(a){var l,h=new Uint8Array(a),w="";for(l=0;l<h.length;l+=3)w+=Se[h[l]>>2],w+=Se[(3&h[l])<<4|h[l+1]>>4],w+=Se[(15&h[l+1])<<2|h[l+2]>>6],w+=Se[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 Ar(a,l){var h="";if(a&&(h=ro.call(a)),a&&(h==="[object ArrayBuffer]"||a.buffer&&ro.call(a.buffer)==="[object ArrayBuffer]")){var w,y=ot;a instanceof ArrayBuffer?(w=a,y+=Wt):(w=a.buffer,h==="[object Int8Array]"?y+=Vn:h==="[object Uint8Array]"?y+=Kn:h==="[object Uint8ClampedArray]"?y+=Jn:h==="[object Int16Array]"?y+=Yn:h==="[object Uint16Array]"?y+=Qn:h==="[object Int32Array]"?y+=Zn:h==="[object Uint32Array]"?y+=eo:h==="[object Float32Array]"?y+=to:h==="[object Float64Array]"?y+=no:l(new Error("Failed to get type for BinaryArray"))),l(y+Ft(w))}else if(h==="[object Blob]"){var b=new FileReader;b.onload=function(){var C=$r+a.type+"~"+Ft(this.result);l(ot+Ht+C)},b.readAsArrayBuffer(a)}else try{l(JSON.stringify(a))}catch(C){console.error("Couldn't convert value into a JSON string: ",a),l(null,C)}}function Dr(a){if(a.substring(0,Ot)!==ot)return JSON.parse(a);var l,h=a.substring(oo),w=a.substring(Ot,oo);if(w===Ht&&Xn.test(h)){var y=h.match(Xn);l=y[1],h=h.substring(y[0].length)}var b=io(h);switch(w){case Wt:return b;case Ht:return f([b],{type:l});case Vn:return new Int8Array(b);case Kn:return new Uint8Array(b);case Jn:return new Uint8ClampedArray(b);case Yn:return new Int16Array(b);case Qn:return new Uint16Array(b);case Zn:return new Int32Array(b);case eo:return new Uint32Array(b);case to:return new Float32Array(b);case no:return new Float64Array(b);default:throw new Error("Unkown type: "+w)}}var qt={serialize:Ar,deserialize:Dr,stringToBuffer:io,bufferToString:Ft};function so(a,l,h,w){a.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],h,w)}function Lr(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 y=new m(function(b,C){try{h.db=openDatabase(h.name,String(h.version),h.description,h.size)}catch(x){return C(x)}h.db.transaction(function(x){so(x,h,function(){l._dbInfo=h,b()},function(I,R){C(R)})},C)});return h.serializer=qt,y}function Ce(a,l,h,w,y,b){a.executeSql(h,w,y,function(C,x){x.code===x.SYNTAX_ERR?C.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(I,R){R.rows.length?b(I,x):so(I,l,function(){I.executeSql(h,w,y,b)},b)},b):b(C,x)},b)}function Nr(a,l){var h=this;a=M(a);var w=new m(function(y,b){h.ready().then(function(){var C=h._dbInfo;C.db.transaction(function(x){Ce(x,C,"SELECT * FROM "+C.storeName+" WHERE key = ? LIMIT 1",[a],function(I,R){var z=R.rows.length?R.rows.item(0).value:null;z&&(z=C.serializer.deserialize(z)),y(z)},function(I,R){b(R)})})}).catch(b)});return S(w,l),w}function Br(a,l){var h=this,w=new m(function(y,b){h.ready().then(function(){var C=h._dbInfo;C.db.transaction(function(x){Ce(x,C,"SELECT * FROM "+C.storeName,[],function(I,R){for(var z=R.rows,L=z.length,W=0;W<L;W++){var F=z.item(W),q=F.value;if(q&&(q=C.serializer.deserialize(q)),(q=a(q,F.key,W+1))!==void 0)return void y(q)}y()},function(I,R){b(R)})})}).catch(b)});return S(w,l),w}function ao(a,l,h,w){var y=this;a=M(a);var b=new m(function(C,x){y.ready().then(function(){l===void 0&&(l=null);var I=l,R=y._dbInfo;R.serializer.serialize(l,function(z,L){L?x(L):R.db.transaction(function(W){Ce(W,R,"INSERT OR REPLACE INTO "+R.storeName+" (key, value) VALUES (?, ?)",[a,z],function(){C(I)},function(F,q){x(q)})},function(W){if(W.code===W.QUOTA_ERR){if(w>0)return void C(ao.apply(y,[a,I,h,w-1]));x(W)}})})}).catch(x)});return S(b,h),b}function Ur(a,l,h){return ao.apply(this,[a,l,h,1])}function jr(a,l){var h=this;a=M(a);var w=new m(function(y,b){h.ready().then(function(){var C=h._dbInfo;C.db.transaction(function(x){Ce(x,C,"DELETE FROM "+C.storeName+" WHERE key = ?",[a],function(){y()},function(I,R){b(R)})})}).catch(b)});return S(w,l),w}function Or(a){var l=this,h=new m(function(w,y){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(C){Ce(C,b,"DELETE FROM "+b.storeName,[],function(){w()},function(x,I){y(I)})})}).catch(y)});return S(h,a),h}function Wr(a){var l=this,h=new m(function(w,y){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(C){Ce(C,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(x,I){var R=I.rows.item(0).c;w(R)},function(x,I){y(I)})})}).catch(y)});return S(h,a),h}function Hr(a,l){var h=this,w=new m(function(y,b){h.ready().then(function(){var C=h._dbInfo;C.db.transaction(function(x){Ce(x,C,"SELECT key FROM "+C.storeName+" WHERE id = ? LIMIT 1",[a+1],function(I,R){var z=R.rows.length?R.rows.item(0).key:null;y(z)},function(I,R){b(R)})})}).catch(b)});return S(w,l),w}function Fr(a){var l=this,h=new m(function(w,y){l.ready().then(function(){var b=l._dbInfo;b.db.transaction(function(C){Ce(C,b,"SELECT key FROM "+b.storeName,[],function(x,I){for(var R=[],z=0;z<I.rows.length;z++)R.push(I.rows.item(z).key);w(R)},function(x,I){y(I)})})}).catch(y)});return S(h,a),h}function qr(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(y,b){for(var C=[],x=0;x<b.rows.length;x++)C.push(b.rows.item(x).name);l({db:a,storeNames:C})},function(y,b){h(b)})},function(w){h(w)})})}function Gr(a,l){l=B.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,y=this;return w=a.name?new m(function(b){var C;C=a.name===h.name?y._dbInfo.db:openDatabase(a.name,"","",0),a.storeName?b({db:C,storeNames:[a.storeName]}):b(qr(C))}).then(function(b){return new m(function(C,x){b.db.transaction(function(I){function R(F){return new m(function(q,ee){I.executeSql("DROP TABLE IF EXISTS "+F,[],function(){q()},function(ye,Vt){ee(Vt)})})}for(var z=[],L=0,W=b.storeNames.length;L<W;L++)z.push(R(b.storeNames[L]));m.all(z).then(function(){C()}).catch(function(F){x(F)})},function(I){x(I)})})}):m.reject("Invalid arguments"),S(w,l),w}var Xr={_driver:"webSQLStorage",_initStorage:Lr,_support:Mr(),iterate:Br,getItem:Nr,setItem:Ur,removeItem:jr,clear:Or,length:Wr,key:Hr,keys:Fr,dropInstance:Gr};function Vr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function co(a,l){var h=a.name+"/";return a.storeName!==l.storeName&&(h+=a.storeName+"/"),h}function Kr(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function Jr(){return!Kr()||localStorage.length>0}function Yr(a){var l=this,h={};if(a)for(var w in a)h[w]=a[w];return h.keyPrefix=co(a,l._defaultConfig),Jr()?(l._dbInfo=h,h.serializer=qt,m.resolve()):m.reject()}function Zr(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo.keyPrefix,y=localStorage.length-1;y>=0;y--){var b=localStorage.key(y);b.indexOf(w)===0&&localStorage.removeItem(b)}});return S(h,a),h}function Qr(a,l){var h=this;a=M(a);var w=h.ready().then(function(){var y=h._dbInfo,b=localStorage.getItem(y.keyPrefix+a);return b&&(b=y.serializer.deserialize(b)),b});return S(w,l),w}function ei(a,l){var h=this,w=h.ready().then(function(){for(var y=h._dbInfo,b=y.keyPrefix,C=b.length,x=localStorage.length,I=1,R=0;R<x;R++){var z=localStorage.key(R);if(z.indexOf(b)===0){var L=localStorage.getItem(z);if(L&&(L=y.serializer.deserialize(L)),(L=a(L,z.substring(C),I++))!==void 0)return L}}});return S(w,l),w}function ti(a,l){var h=this,w=h.ready().then(function(){var y,b=h._dbInfo;try{y=localStorage.key(a)}catch{y=null}return y&&(y=y.substring(b.keyPrefix.length)),y});return S(w,l),w}function ni(a){var l=this,h=l.ready().then(function(){for(var w=l._dbInfo,y=localStorage.length,b=[],C=0;C<y;C++){var x=localStorage.key(C);x.indexOf(w.keyPrefix)===0&&b.push(x.substring(w.keyPrefix.length))}return b});return S(h,a),h}function oi(a){var l=this.keys().then(function(h){return h.length});return S(l,a),l}function ri(a,l){var h=this;a=M(a);var w=h.ready().then(function(){var y=h._dbInfo;localStorage.removeItem(y.keyPrefix+a)});return S(w,l),w}function ii(a,l,h){var w=this;a=M(a);var y=w.ready().then(function(){l===void 0&&(l=null);var b=l;return new m(function(C,x){var I=w._dbInfo;I.serializer.serialize(l,function(R,z){if(z)x(z);else try{localStorage.setItem(I.keyPrefix+a,R),C(b)}catch(L){L.name!=="QuotaExceededError"&&L.name!=="NS_ERROR_DOM_QUOTA_REACHED"||x(L),x(L)}})})});return S(y,h),y}function si(a,l){if(l=B.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,y=this;return w=a.name?new m(function(b){a.storeName?b(co(a,y._defaultConfig)):b(a.name+"/")}).then(function(b){for(var C=localStorage.length-1;C>=0;C--){var x=localStorage.key(C);x.indexOf(b)===0&&localStorage.removeItem(x)}}):m.reject("Invalid arguments"),S(w,l),w}var ai={_driver:"localStorageWrapper",_initStorage:Yr,_support:Vr(),iterate:ei,getItem:Qr,setItem:ii,removeItem:ri,clear:Zr,length:oi,key:ti,keys:ni,dropInstance:si},ci=function(a,l){return a===l||typeof a=="number"&&typeof l=="number"&&isNaN(a)&&isNaN(l)},li=function(a,l){for(var h=a.length,w=0;w<h;){if(ci(a[w],l))return!0;w++}return!1},lo=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},Ge={},ho={},We={INDEXEDDB:zr,WEBSQL:Xr,LOCALSTORAGE:ai},hi=[We.INDEXEDDB._driver,We.WEBSQL._driver,We.LOCALSTORAGE._driver],rt=["dropInstance"],Gt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(rt),ui={description:"",driver:hi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function di(a,l){a[l]=function(){var h=arguments;return a.ready().then(function(){return a[l].apply(a,h)})}}function Xt(){for(var a=1;a<arguments.length;a++){var l=arguments[a];if(l)for(var h in l)l.hasOwnProperty(h)&&(lo(l[h])?arguments[0][h]=l[h].slice():arguments[0][h]=l[h])}return arguments[0]}var fi=function(){function a(l){for(var h in r(this,a),We)if(We.hasOwnProperty(h)){var w=We[h],y=w._driver;this[h]=y,Ge[y]||this.defineDriver(w)}this._defaultConfig=Xt({},ui),this._config=Xt({},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 y=new m(function(b,C){try{var x=l._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!l._driver)return void C(I);for(var R=Gt.concat("_initStorage"),z=0,L=R.length;z<L;z++){var W=R[z];if((!li(rt,W)||l[W])&&typeof l[W]!="function")return void C(I)}var F=function(){for(var ee=function(gi){return function(){var mi=new Error("Method "+gi+" is not implemented by the current driver"),uo=m.reject(mi);return S(uo,arguments[arguments.length-1]),uo}},ye=0,Vt=rt.length;ye<Vt;ye++){var Kt=rt[ye];l[Kt]||(l[Kt]=ee(Kt))}};F();var q=function(ee){Ge[x]&&console.info("Redefining LocalForage driver: "+x),Ge[x]=l,ho[x]=ee,b()};"_support"in l?l._support&&typeof l._support=="function"?l._support().then(q,C):q(!!l._support):q(!0)}catch(ee){C(ee)}});return E(y,h,w),y},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(l,h,w){var y=Ge[l]?m.resolve(Ge[l]):m.reject(new Error("Driver not found."));return E(y,h,w),y},a.prototype.getSerializer=function(l){var h=m.resolve(qt);return E(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 E(w,l,l),w},a.prototype.setDriver=function(l,h,w){var y=this;lo(l)||(l=[l]);var b=this._getSupportedDrivers(l);function C(){y._config.driver=y.driver()}function x(z){return y._extend(z),C(),y._ready=y._initStorage(y._config),y._ready}function I(z){return function(){var L=0;function W(){for(;L<z.length;){var F=z[L];return L++,y._dbInfo=null,y._ready=null,y.getDriver(F).then(x).catch(W)}C();var q=new Error("No available storage method found.");return y._driverSet=m.reject(q),y._driverSet}return W()}}var R=this._driverSet!==null?this._driverSet.catch(function(){return m.resolve()}):m.resolve();return this._driverSet=R.then(function(){var z=b[0];return y._dbInfo=null,y._ready=null,y.getDriver(z).then(function(L){y._driver=L._driver,C(),y._wrapLibraryMethodsWithReady(),y._initDriver=I(b)})}).catch(function(){C();var z=new Error("No available storage method found.");return y._driverSet=m.reject(z),y._driverSet}),E(this._driverSet,h,w),this._driverSet},a.prototype.supports=function(l){return!!ho[l]},a.prototype._extend=function(l){Xt(this,l)},a.prototype._getSupportedDrivers=function(l){for(var h=[],w=0,y=l.length;w<y;w++){var b=l[w];this.supports(b)&&h.push(b)}return h},a.prototype._wrapLibraryMethodsWithReady=function(){for(var l=0,h=Gt.length;l<h;l++)di(this,Gt[l])},a.prototype.createInstance=function(l){return new a(l)},a}(),pi=new fi;e.exports=pi},{3:3}]},{},[4])(4)),Uo={exports:{}};/*!
1
+ import{h as yn,openBlock as X,createElementBlock as pt,normalizeStyle as Xt,renderSlot as st,defineComponent as Mt,ref as K,withModifiers as er,getCurrentInstance as ws,computed as Vt,watch as Pt,onMounted as wn,onBeforeUnmount as bs,nextTick as nr,resolveComponent as bn,createBlock as at,Transition as _n,withCtx as It,withDirectives as or,createElementVNode as Y,Fragment as zt,createTextVNode as Sn,toDisplayString as Cn,createCommentVNode as mt,vShow as rr,markRaw as _s,onErrorCaptured as Ss,Suspense as Cs,createVNode as En,KeepAlive as Es,resolveDynamicComponent as Tt,reactive as xs,toRefs as ks,renderList as Gt,onUnmounted as Is,normalizeClass as Ts,unref as xn,pushScopeId as Rs,popScopeId as Ms}from"vue";import Ps from"axios";import zs from"qs";import{Client as Ls,ClientContext as kn}from"@hprose/rpc-core";import{ByteStream as _e,Writer as As,Reader as Ds}from"@hprose/io";import{HttpTransport as $s}from"@hprose/rpc-html5";var Ns={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],a=this.panes[s[0]]||null,l=this.panes[s[1]]||null;const d=a.max<100&&i>=a.max+n.prevPanesSize,w=l.max<100&&i<=100-(l.max+this.sumNextPanesSize(t+1));if(d||w)d?(a.size=a.max,l.size=Math.max(100-a.max-n.prevPanesSize-n.nextPanesSize,0)):(a.size=Math.max(100-l.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),l.size=l.max);else{if(this.pushOtherPanes){const _=this.doPushOtherPanes(n,i);if(!_)return;({sums:n,panesToResize:s}=_),a=this.panes[s[0]]||null,l=this.panes[s[1]]||null}a!==null&&(a.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,a.min),a.max)),l!==null&&(l.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.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 yn("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},In={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})}}};function Tn(e){return window.TouchEvent&&e instanceof TouchEvent}In.render=function(e,t,n,o,r,i){return X(),pt("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=s=>i.onPaneClick(s,e._.uid)),style:Xt(e.style)},[st(e.$slots,"default")],4)},In.__file="src/controls/splitpanes/pane.vue";class ft{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Tn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Tn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Lo(this.clientX,this.clientY)}static bindDown(t,n,o,r=!1){const i=a=>{n(new ft(a))},s=a=>{a.touches.length===1&&n(new ft(a)),a.touches.length>1&&o&&o(new ft(a))};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 ft(s))},i=s=>{s.touches.length===1&&n(new ft(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 ft(s))},i=s=>{s.touches.length===0&&n(new ft(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}){Tn(this.e)?n&&n(this.e):t&&t(this.e)}}class Lo{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Lo(this.x,this.y)}}class Bs{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=ft.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=ft.bindMove(document,this.mousemove),this.unbindUp=ft.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 js{_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=Ce(this._group),o=Ce(t);n.splice(n.indexOf(this),1),o.push(this),sr()}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(Ce(this._group)),sr()}}const Se=new Map;function Ce(e){return Se.has(e)||Se.set(e,[]),Se.get(e)}function ir(e,t){return e>t?-ir(t,e):e<0&&t>=0?1:e-t}function sr(){let e=0;for(const t of function(n){const o=[];return n.forEach((r,i)=>o.push(i)),o}(Se).sort(ir))for(const n of Ce(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Rn(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Ee(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 Ee(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 Os{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=ar.map(l=>new l(t,this));const{width:o,height:r}=Rn(t),i=n.maxWidth||window.innerWidth,s=n.maxHeight||window.innerHeight;let a=!1;(o<n.minWidth||o>i)&&(t.style.width=`${cr(o,n.minWidth,i)}px`,a=!0),(r<n.minHeight||r>s)&&(t.style.height=`${cr(r,n.minHeight,s)}px`,a=!0),a&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const ar=[];class Rt{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=ft.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}=Ee(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=ft.bindMove(document,this.mousemove),this.unbindUp=ft.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}=Ee(this.container),i=this.helper.options,s=i.maxWidth||window.innerWidth,a=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-a,0),this.maxTop=r-i.minHeight,this.minBottom=n+i.minHeight,this.maxBottom=Math.min(n+a,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}=Ee(this.container),a=this.helper.options;a&&(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=`${a.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):i<this.minRight?this.container.style.width=`${a.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=`${a.minHeight}px`,this.container.style.top=`${this.maxTop}px`):s<this.minBottom?this.container.style.height=`${a.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 cr(e,t,n){return e<t?t:e>n?n:e}ar.push(class extends Rt{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 Rt{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 Rt{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 Rt{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 Rt{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 Rt{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 Rt{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 Rt{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var xe=Mt({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=K(!1),n=K(!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=ft.bindUp(document,()=>{n.value=!1,r()})}}}});const Ws=["disabled"];xe.render=function(e,t,n,o,r,i){return X(),pt("div",{class:"btn",style:Xt(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]=er((...s)=>e.mousedown&&e.mousedown(...s),["stop"])),onTouchstart:t[3]||(t[3]=er((...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},[st(e.$slots,"default")],44,Ws)},xe.__scopeId="data-v-71662210",xe.__file="src/controls/vuewindow/window/Button.vue";const Us=Object.prototype.toString;function ht(e,t){return Us.call(e)===`[object ${t}]`}function ke(e){return ht(e,"Function")}const lr=e=>typeof e<"u",Mn=e=>!lr(e);function Pn(e){return e===null}function Fs(e){return Mn(e)&&Pn(e)}function Hs(e){return Mn(e)||Pn(e)}const Lt=e=>e!=null&&e!==null&&ht(e,"Object");function qs(e){return ht(e,"Date")}function zn(e){return ht(e,"Number")}function Xs(e){return ht(e,"AsyncFunction")}function Vs(e){return ht(e,"Promise")&&Lt(e)&&ke(e.then)&&ke(e.catch)}function Ie(e){return ht(e,"String")}function Gs(e){return e===!0||e===!1||ht(e,"Boolean")}function Ln(e){return e&&Array.isArray(e)}const Ks=()=>typeof window<"u",Ys=e=>typeof window<"u"&&ht(e,"Window"),Js=e=>Lt(e)&&!!e.tagName,Zs=typeof window>"u";function Qs(e){return e&&["IMAGE","IMG"].includes(e.tagName)}function ta(e){return e==null||(Ie(e)||Ln(e)?e.length===0:!!Lt(e)&&JSON.stringify(e)==="{}")}function ea(e){return ht(e,"Error")}function na(e){return ht(e,"WeakSet")}function oa(e){return ht(e,"WeakMap")}function ra(e){return ht(e,"Symbol")}function ia(e){return ht(e,"Map")}const sa=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 At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aa={exports:{}},An=Te(aa.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(y,u){var p=y[0],v=y[1],h=y[2],f=y[3];v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&h|~v&f)+u[0]-680876936|0)<<7|p>>>25)+v|0)&v|~p&h)+u[1]-389564586|0)<<12|f>>>20)+p|0)&p|~f&v)+u[2]+606105819|0)<<17|h>>>15)+f|0)&f|~h&p)+u[3]-1044525330|0)<<22|v>>>10)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&h|~v&f)+u[4]-176418897|0)<<7|p>>>25)+v|0)&v|~p&h)+u[5]+1200080426|0)<<12|f>>>20)+p|0)&p|~f&v)+u[6]-1473231341|0)<<17|h>>>15)+f|0)&f|~h&p)+u[7]-45705983|0)<<22|v>>>10)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&h|~v&f)+u[8]+1770035416|0)<<7|p>>>25)+v|0)&v|~p&h)+u[9]-1958414417|0)<<12|f>>>20)+p|0)&p|~f&v)+u[10]-42063|0)<<17|h>>>15)+f|0)&f|~h&p)+u[11]-1990404162|0)<<22|v>>>10)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&h|~v&f)+u[12]+1804603682|0)<<7|p>>>25)+v|0)&v|~p&h)+u[13]-40341101|0)<<12|f>>>20)+p|0)&p|~f&v)+u[14]-1502002290|0)<<17|h>>>15)+f|0)&f|~h&p)+u[15]+1236535329|0)<<22|v>>>10)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&f|h&~f)+u[1]-165796510|0)<<5|p>>>27)+v|0)&h|v&~h)+u[6]-1069501632|0)<<9|f>>>23)+p|0)&v|p&~v)+u[11]+643717713|0)<<14|h>>>18)+f|0)&p|f&~p)+u[0]-373897302|0)<<20|v>>>12)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&f|h&~f)+u[5]-701558691|0)<<5|p>>>27)+v|0)&h|v&~h)+u[10]+38016083|0)<<9|f>>>23)+p|0)&v|p&~v)+u[15]-660478335|0)<<14|h>>>18)+f|0)&p|f&~p)+u[4]-405537848|0)<<20|v>>>12)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&f|h&~f)+u[9]+568446438|0)<<5|p>>>27)+v|0)&h|v&~h)+u[14]-1019803690|0)<<9|f>>>23)+p|0)&v|p&~v)+u[3]-187363961|0)<<14|h>>>18)+f|0)&p|f&~p)+u[8]+1163531501|0)<<20|v>>>12)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v&f|h&~f)+u[13]-1444681467|0)<<5|p>>>27)+v|0)&h|v&~h)+u[2]-51403784|0)<<9|f>>>23)+p|0)&v|p&~v)+u[7]+1735328473|0)<<14|h>>>18)+f|0)&p|f&~p)+u[12]-1926607734|0)<<20|v>>>12)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v^h^f)+u[5]-378558|0)<<4|p>>>28)+v|0)^v^h)+u[8]-2022574463|0)<<11|f>>>21)+p|0)^p^v)+u[11]+1839030562|0)<<16|h>>>16)+f|0)^f^p)+u[14]-35309556|0)<<23|v>>>9)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v^h^f)+u[1]-1530992060|0)<<4|p>>>28)+v|0)^v^h)+u[4]+1272893353|0)<<11|f>>>21)+p|0)^p^v)+u[7]-155497632|0)<<16|h>>>16)+f|0)^f^p)+u[10]-1094730640|0)<<23|v>>>9)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v^h^f)+u[13]+681279174|0)<<4|p>>>28)+v|0)^v^h)+u[0]-358537222|0)<<11|f>>>21)+p|0)^p^v)+u[3]-722521979|0)<<16|h>>>16)+f|0)^f^p)+u[6]+76029189|0)<<23|v>>>9)+h|0,v=((v+=((h=((h+=((f=((f+=((p=((p+=(v^h^f)+u[9]-640364487|0)<<4|p>>>28)+v|0)^v^h)+u[12]-421815835|0)<<11|f>>>21)+p|0)^p^v)+u[15]+530742520|0)<<16|h>>>16)+f|0)^f^p)+u[2]-995338651|0)<<23|v>>>9)+h|0,v=((v+=((f=((f+=(v^((p=((p+=(h^(v|~f))+u[0]-198630844|0)<<6|p>>>26)+v|0)|~h))+u[7]+1126891415|0)<<10|f>>>22)+p|0)^((h=((h+=(p^(f|~v))+u[14]-1416354905|0)<<15|h>>>17)+f|0)|~p))+u[5]-57434055|0)<<21|v>>>11)+h|0,v=((v+=((f=((f+=(v^((p=((p+=(h^(v|~f))+u[12]+1700485571|0)<<6|p>>>26)+v|0)|~h))+u[3]-1894986606|0)<<10|f>>>22)+p|0)^((h=((h+=(p^(f|~v))+u[10]-1051523|0)<<15|h>>>17)+f|0)|~p))+u[1]-2054922799|0)<<21|v>>>11)+h|0,v=((v+=((f=((f+=(v^((p=((p+=(h^(v|~f))+u[8]+1873313359|0)<<6|p>>>26)+v|0)|~h))+u[15]-30611744|0)<<10|f>>>22)+p|0)^((h=((h+=(p^(f|~v))+u[6]-1560198380|0)<<15|h>>>17)+f|0)|~p))+u[13]+1309151649|0)<<21|v>>>11)+h|0,v=((v+=((f=((f+=(v^((p=((p+=(h^(v|~f))+u[4]-145523070|0)<<6|p>>>26)+v|0)|~h))+u[11]-1120210379|0)<<10|f>>>22)+p|0)^((h=((h+=(p^(f|~v))+u[2]+718787259|0)<<15|h>>>17)+f|0)|~p))+u[9]-343485551|0)<<21|v>>>11)+h|0,y[0]=p+y[0]|0,y[1]=v+y[1]|0,y[2]=h+y[2]|0,y[3]=f+y[3]|0}function o(y){var u,p=[];for(u=0;u<64;u+=4)p[u>>2]=y.charCodeAt(u)+(y.charCodeAt(u+1)<<8)+(y.charCodeAt(u+2)<<16)+(y.charCodeAt(u+3)<<24);return p}function r(y){var u,p=[];for(u=0;u<64;u+=4)p[u>>2]=y[u]+(y[u+1]<<8)+(y[u+2]<<16)+(y[u+3]<<24);return p}function i(y){var u,p,v,h,f,L,A=y.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=A;u+=64)n(D,o(y.substring(u-64,u)));for(p=(y=y.substring(u-64)).length,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<p;u+=1)v[u>>2]|=y.charCodeAt(u)<<(u%4<<3);if(v[u>>2]|=128<<(u%4<<3),u>55)for(n(D,v),u=0;u<16;u+=1)v[u]=0;return h=(h=8*A).toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(h[2],16),L=parseInt(h[1],16)||0,v[14]=f,v[15]=L,n(D,v),D}function s(y){var u,p,v,h,f,L,A=y.length,D=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=A;u+=64)n(D,r(y.subarray(u-64,u)));for(p=(y=u-64<A?y.subarray(u-64):new Uint8Array(0)).length,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<p;u+=1)v[u>>2]|=y[u]<<(u%4<<3);if(v[u>>2]|=128<<(u%4<<3),u>55)for(n(D,v),u=0;u<16;u+=1)v[u]=0;return h=(h=8*A).toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(h[2],16),L=parseInt(h[1],16)||0,v[14]=f,v[15]=L,n(D,v),D}function a(y){var u,p="";for(u=0;u<4;u+=1)p+=t[y>>8*u+4&15]+t[y>>8*u&15];return p}function l(y){var u;for(u=0;u<y.length;u+=1)y[u]=a(y[u]);return y.join("")}function d(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function w(y,u){var p,v=y.length,h=new ArrayBuffer(v),f=new Uint8Array(h);for(p=0;p<v;p+=1)f[p]=y.charCodeAt(p);return u?f:h}function _(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function x(y,u,p){var v=new Uint8Array(y.byteLength+u.byteLength);return v.set(new Uint8Array(y)),v.set(new Uint8Array(u),y.byteLength),p?v:v.buffer}function P(y){var u,p=[],v=y.length;for(u=0;u<v-1;u+=2)p.push(parseInt(y.substr(u,2),16));return String.fromCharCode.apply(String,p)}function I(){this.reset()}return l(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function y(u,p){return(u=0|u||0)<0?Math.max(u+p,0):Math.min(u,p)}ArrayBuffer.prototype.slice=function(u,p){var v,h,f,L,A=this.byteLength,D=y(u,A),$=A;return p!==e&&($=y(p,A)),D>$?new ArrayBuffer(0):(v=$-D,h=new ArrayBuffer(v),f=new Uint8Array(h),L=new Uint8Array(this,D,v),f.set(L),h)}}(),I.prototype.append=function(y){return this.appendBinary(d(y)),this},I.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var u,p=this._buff.length;for(u=64;u<=p;u+=64)n(this._hash,o(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},I.prototype.end=function(y){var u,p,v=this._buff,h=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)f[u>>2]|=v.charCodeAt(u)<<(u%4<<3);return this._finish(f,h),p=l(this._hash),y&&(p=P(p)),this.reset(),p},I.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},I.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},I.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},I.prototype._finish=function(y,u){var p,v,h,f=u;if(y[f>>2]|=128<<(f%4<<3),f>55)for(n(this._hash,y),f=0;f<16;f+=1)y[f]=0;p=(p=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),v=parseInt(p[2],16),h=parseInt(p[1],16)||0,y[14]=v,y[15]=h,n(this._hash,y)},I.hash=function(y,u){return I.hashBinary(d(y),u)},I.hashBinary=function(y,u){var p=l(i(y));return u?P(p):p},I.ArrayBuffer=function(){this.reset()},I.ArrayBuffer.prototype.append=function(y){var u,p=x(this._buff.buffer,y,!0),v=p.length;for(this._length+=y.byteLength,u=64;u<=v;u+=64)n(this._hash,r(p.subarray(u-64,u)));return this._buff=u-64<v?new Uint8Array(p.buffer.slice(u-64)):new Uint8Array(0),this},I.ArrayBuffer.prototype.end=function(y){var u,p,v=this._buff,h=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)f[u>>2]|=v[u]<<(u%4<<3);return this._finish(f,h),p=l(this._hash),y&&(p=P(p)),this.reset(),p},I.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},I.ArrayBuffer.prototype.getState=function(){var y=I.prototype.getState.call(this);return y.buff=_(y.buff),y},I.ArrayBuffer.prototype.setState=function(y){return y.buff=w(y.buff,!0),I.prototype.setState.call(this,y)},I.ArrayBuffer.prototype.destroy=I.prototype.destroy,I.ArrayBuffer.prototype._finish=I.prototype._finish,I.ArrayBuffer.hash=function(y,u){var p=l(s(new Uint8Array(y)));return u?P(p):p},I}());const Dn=[];class dt{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){dt.addHandler(window,"resize",t)}static offWindowResizeHandler(t){dt.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!!dt.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=dt.isFullScreen();t(o)}):document.addEventListener("MSFullscreenChange",function(){const o=dt.isFullScreen();t(o)})}static stringifyCircularHandler(t,n){if(typeof n=="object"&&n!==null){if(Dn.indexOf(n)!==-1)return;Dn.push(n)}return n}static jsonStringify(t){if(!t)return"";const n=JSON.stringify(t,dt.stringifyCircularHandler);return Dn.length=0,n}static jsonParse(t){const n=dt.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,a=new An.ArrayBuffer,l=new FileReader;l.onload=function(d){a.append(d.target?.result);const w=a.end();n({isOK:!0,data:w})},l.onerror=function(){const d="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(d),n({isOK:!1,data:d})},function(){const d=0+s>=i.size?i.size:0+s;l.readAsArrayBuffer(r.call(i,0,d))}()}static getFileMD5(t,n){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=t,s=2097152,a=Math.ceil(i.size/s);let l=0;const d=new An.ArrayBuffer,w=new FileReader;function _(){const x=l*s,P=x+s>=i.size?i.size:x+s;w.readAsArrayBuffer(r.call(i,x,P))}w.onload=function(x){if(d.append(x.target?.result),l++,l<a)_();else{const P=d.end();n({isOK:!0,data:P})}},w.onerror=function(){const x=`${i.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(x),n({isOK:!1,data:x})},_()}static MD5(t,n=!1){return An.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}):dt.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 dt.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){dt.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=Ie(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)}}static getRandomNum(t,n){var o=n-t,r=Math.random();return t+Math.round(r*o)}static merge(t={},n={}){let o,r,i,s;for(t||(t={}),r=0,i=n.length;r<i;r++)for(o in s=n[r],s)t[o]=s[o];return t}static setOptions(t,n){t.hasOwnProperty("options")||(t.options=t.options?Object.create(t.options):{});for(let o in n)t.options[o]=n[o];return t.options}static formatNum(t,n){let o=Math.pow(10,n===void 0?6:n);return Math.round(t*o)/o}static trim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}static splitWords(t){return this.trim(t).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(t,n){let o=null;return function(){o&&clearTimeout(o),o=setTimeout(t,n)}}static throttle(t,n){let o=!0;return function(){if(!o)return!1;o=!1,setTimeout(()=>{t(),o=!0},n)}}static dataURLtoBlob(t){let n=t.split(",");if(!n||n.length===0)return;let o=n[0].match(/:(.*?);/)[1],r=atob(n[1]),i=r.length,s=new Uint8Array(i);for(;i--;)s[i]=r.charCodeAt(i);return new Blob([s],{type:o})}static getElement(t){return typeof t=="string"?document.getElementById(t):t}static getStyle(t,n){let o=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!o||o==="auto")&&document.defaultView){let r=document.defaultView.getComputedStyle(t,null);o=r?r[n]:null}return o==="auto"?null:o}static create(t,n,o){let r=document.createElement(t);return r.className=n||"",o&&o.appendChild(r),r}static removeElement(t){let n=t.parentNode;n&&n.removeChild(t)}static emptyElement(t){for(;t.firstChild;)t.removeChild(t.firstChild)}static hasClass(t,n){if(t.classList!==void 0)return t.classList.contains(n);let o=this.getClass(t);return o.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(o)}static addClass(t,n){if(t.classList!==void 0){let o=this.splitWords(n);for(let r=0,i=o.length;r<i;r++)t.classList.add(o[r])}else if(!this.hasClass(t,n)){let o=this.getClass(t);this.setClass(t,(o?o+" ":"")+n)}}static removeClass(t,n){t.classList!==void 0?t.classList.remove(n):this.setClass(t,this.trim((" "+this.getClass(t)+" ").replace(" "+n+" "," ")))}static setClass(t,n){t.className.baseVal===void 0?t.className=n:t.className.baseVal=n}static getClass(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}static createSvgElement(t,n,o,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",t),i.setAttribute("height",n),i.setAttribute("viewBox",`0 0 ${t} ${n}`);let s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",o),i.appendChild(s),r&&r.appendChild(i),i}static parseDom(t,n=!0,o=""){n=n??!1;let r=document.createElement("div");return r.className=o||"",r.innerHTML=t,n?r:r.childNodes}static createVideoHTML(t,n,o){let r=this.create("video",n,o),i=this.create("source","",r);i.setAttribute("src",t),i.setAttribute("type","video/map4");let s=this.create("source","",r);return s.setAttribute("src",t),s.setAttribute("type","video/quicktime"),r}}class Re{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 Me{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 ca=new Me("",localStorage);function ur(){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 la(){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 ua(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 ha(e){var t=e.toLowerCase();if(Pe(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 da(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 fa(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 pa(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),a=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(s===0)n=o=r=a;else{var l=a<=.5?a*(s+1):a+s-a*s,d=2*a-l;n=$n(d,l,i+1/3),o=$n(d,l,i),r=$n(d,l,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 $n(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 Pe(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(e)}function ga(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function Nn(e){let t=e.toLowerCase();if(Pe(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 ma(e){if(!Pe(e))return;const[t,n,o]=Nn(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*t+.578*n+.114*o<192}function va(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${jn(e.substring(0,2),t)}${jn(e.substring(2,4),t)}${jn(e.substring(4,6),t)}`}function ya(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Bn(e.substring(0,2),t)}${Bn(e.substring(2,4),t)}${Bn(e.substring(4,6),t)}`}function Bn(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 hr(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 wa(e){return function(t,n){return(hr(~~t[0],~~t[1],~~t[2])+.05)/(hr(n[0],n[1],n[2])+.05)}(Nn(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function jn(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 On(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 $t=On(),ct={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded"},ze=(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 ba(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 dr=(e,t)=>{const n=JSON.stringify(e,null,2);t?ze(n,t+".json"):$t.emit(ct.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},_a=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){ze(o.data,n)}).catch(o=>{console.warn(o),$t.emit(ct.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function fr(e){const t=e.lastIndexOf("/")+1;let n=e.substring(t);return n=decodeURI(n.split("?")[0]),n}function Sa({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||fr(e)),document.createEvent){const a=document.createEvent("MouseEvents");return a.initEvent("click",!0,!0),s.dispatchEvent(a),r(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),r(!0)}{const s=document.createElement("canvas"),a=document.createElement("img");a.setAttribute("crossOrigin","Anonymous"),a.src=e,a.onload=l=>{s.width=a.width,s.height=a.height,s.getContext("2d").drawImage(a,0,0,a.width,a.height),s.toBlob(d=>{if(d){const w=document.createElement("a");w.href=window.URL.createObjectURL(d),w.download=fr(e),w.click(),URL.revokeObjectURL(w.href),r(!0)}},"image/jpeg")},a.onerror=l=>i(l)}})}function Ca(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${pr}\u6BEB\u79D2`)}function pr(e){return new Promise(t=>setTimeout(t,e))}var gr,mr,Wn,vr={exports:{}};mr=At,Wn=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"],r={},i=null;function s(I,y){var u=I[y];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 a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(I){return I==="debug"&&(I="log"),typeof console!==t&&(I==="trace"&&n?a:console[I]!==void 0?s(console,I):console.log!==void 0?s(console,"log"):e)}function d(){for(var I=this.getLevel(),y=0;y<o.length;y++){var u=o[y];this[u]=y<I?e:this.methodFactory(u,I,this.name)}if(this.log=this.debug,typeof console===t&&I<this.levels.SILENT)return"No console available for logging"}function w(I){return function(){typeof console!==t&&(d.call(this),this[I].apply(this,arguments))}}function _(I,y,u){return l(I)||w.apply(this,arguments)}function x(I,y){var u,p,v,h=this,f="loglevel";function L(){var $;if(typeof window!==t&&f){try{$=window.localStorage[f]}catch{}if(typeof $===t)try{var j=window.document.cookie,U=encodeURIComponent(f),T=j.indexOf(U+"=");T!==-1&&($=/^([^;]+)/.exec(j.slice(T+U.length+1))[1])}catch{}return h.levels[$]===void 0&&($=void 0),$}}function A($){var j=$;if(typeof j=="string"&&h.levels[j.toUpperCase()]!==void 0&&(j=h.levels[j.toUpperCase()]),typeof j=="number"&&j>=0&&j<=h.levels.SILENT)return j;throw new TypeError("log.setLevel() called with invalid level: "+$)}typeof I=="string"?f+=":"+I:typeof I=="symbol"&&(f=void 0),h.name=I,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=y||_,h.getLevel=function(){return v??p??u},h.setLevel=function($,j){return v=A($),j!==!1&&function(U){var T=(o[U]||"silent").toUpperCase();if(typeof window!==t&&f){try{return void(window.localStorage[f]=T)}catch{}try{window.document.cookie=encodeURIComponent(f)+"="+T+";"}catch{}}}(v),d.call(h)},h.setDefaultLevel=function($){p=A($),L()||h.setLevel($,!1)},h.resetLevel=function(){v=null,function(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}(),d.call(h)},h.enableAll=function($){h.setLevel(h.levels.TRACE,$)},h.disableAll=function($){h.setLevel(h.levels.SILENT,$)},h.rebuild=function(){if(i!==h&&(u=A(i.getLevel())),d.call(h),i===h)for(var $ in r)r[$].rebuild()},u=A(i?i.getLevel():"WARN");var D=L();D!=null&&(v=A(D)),d.call(h)}(i=new x).getLogger=function(I){if(typeof I!="symbol"&&typeof I!="string"||I==="")throw new TypeError("You must supply a name when creating a logger.");var y=r[I];return y||(y=r[I]=new x(I,i.methodFactory)),y};var P=typeof window!==t?window.log:void 0;return i.noConflict=function(){return typeof window!==t&&window.log===i&&(window.log=P),i},i.getLoggers=function(){return r},i.default=i,i},(gr=vr).exports?gr.exports=Wn():mr.log=Wn();var Un=vr.exports;class yr{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(ct.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")}}let wr=!1;const B={Config:SysConfig,EventBus:$t,DefaultProxyClient:null,Axios:Ps,Message:new yr(void 0,$t),LayoutMap:new Map,getLayoutManager:e=>{if(!B.WidgetConfigList||B.WidgetConfigList.length===0)return;const t=B.WidgetConfigList.find(n=>n.id===e);if(t){const n=t.layoutID;if(n&&B.LayoutMap.has(n))return B.LayoutMap.get(n)}},Logger:e=>{wr||(import.meta.env?.DEV||SysConfig.UI.ProductLog?Un.enableAll():Un.setDefaultLevel("warn"),wr=!0);const t=e||"default";return Un.getLogger(t)}},br="access_token",Ct=new Me("user",localStorage);function Nt(){return Ct.get(br)}function Fn(){Ct.remove(br)}function _r(){return Nt()?.refresh}function Hn(e,t,n,o="json",r){const i={baseURL:B.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:e,paramsSerializer:{serialize:function(s){return zs.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Nt()?.token},responseType:o,cancelToken:r};if(n)for(let s in n)i.headers[s]=n[s];return B.SystemID&&(i.headers.sysid=B.SystemID,B.SystemGroup&&(i.headers.sysgroup=B.SystemGroup)),t&&(i.baseURL=t),i}function Et(e,t,n,o,r="json",i,s){const a=Hn(n,t,o,r,i);return s&&s>=2e4&&(a.timeout=s),B.Axios?.get(e,a).catch(function(l){Le(l,t,e,"Get")})}function Le(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 l=e.response.data;if(l){const d=l.indexOf(":"),w=l.indexOf(`
2
+ `);if(d>0&&w-d>2){const _=l.substring(d+2,w);_.indexOf("System.Exception")>0?e.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(i=!0,e.message=_)}else i=!0,e.message=l}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 a={address:r,code:s,isExceptionInfo:i,message:e.message,result:e.response.data};if(B.EventBus.emit(ct.AxiosRequestErrorEvent,a),i)throw new Error(e.message)}else{if(e?.message)throw new Error(e.message);console.error(e,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Sr(e,t,n,o,r,i="json",s){const a=Hn(o,t,r,i);s&&s>=2e4&&(a.timeout=s),a.headers["Content-Type"]="multipart/form-data";const l=function(d){let w=new FormData;return d&&Object.keys(d).forEach(_=>{if(!d)return;let x=d[_];x!=null&&(Ln(x)?x.forEach(P=>{w.append(_,Er(P))}):w.append(_,Er(x)))}),w}(n);return B.Axios?.post(e,l,a).catch(function(d){Le(d,t,e,"Post")})}function Cr(e,t,n,o,r,i="json",s){const a=Hn(o,t,r,i);return s&&s>=2e4&&(a.timeout=s),B.Axios?.post(e,n,a).catch(function(l){Le(l,t,e,"Post")})}function Ea(e,t){return Et(e,void 0,t)}function xa(e,t){return Sr(e,void 0,t)}function ka(e,t){return B.Axios?.get(e,{params:t}).catch(function(n){Le(n,e,"","\u5916\u90E8Get")})}function Er(e){return e instanceof Blob?e:e.toString()}var qn={exports:{}},Ia=typeof window<"u"?window:At!==void 0?At:typeof self<"u"?self:{},Ta=function(e){if(!e)return!1;var t=Ra.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)},Ra=Object.prototype.toString,Xn=function(e){return e.replace(/^\s+|\s+$/g,"")},Ma=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)Pa.call(n,o)&&(e[o]=n[o])}return e},Pa=Object.prototype.hasOwnProperty,xr=Ia,za=Ta,La=function(e){if(!e)return{};for(var t,n={},o=Xn(e).split(`
3
+ `),r=0;r<o.length;r++){var i=o[r],s=i.indexOf(":"),a=Xn(i.slice(0,s)).toLowerCase(),l=Xn(i.slice(s+1));n[a]===void 0?n[a]=l:(t=n[a],Object.prototype.toString.call(t)==="[object Array]"?n[a].push(l):n[a]=[n[a],l])}return n},Aa=Ma;function kr(e,t,n){var o=e;return za(t)?(n=t,typeof e=="string"&&(o={uri:e})):o=Aa(t,{uri:e}),o.callback=n,o}function xt(e,t,n){return Ir(t=kr(e,t,n))}function Ir(e){if(e.callback===void 0)throw new Error("callback argument missing");var t=!1,n=function(p,v,h){t||(t=!0,e.callback(p,v,h))};function o(){var p=void 0;if(p=l.response?l.response:l.responseText||function(v){try{if(v.responseType==="document")return v.responseXML;var h=v.responseXML&&v.responseXML.documentElement.nodeName==="parsererror";if(v.responseType===""&&!h)return v.responseXML}catch{}return null}(l),y)try{p=JSON.parse(p)}catch{}return p}function r(p){return clearTimeout(d),p instanceof Error||(p=new Error(""+(p||"Unknown XMLHttpRequest Error"))),p.statusCode=0,n(p,u)}function i(){if(!a){var p;clearTimeout(d),p=e.useXDR&&l.status===void 0?200:l.status===1223?204:l.status;var v=u,h=null;return p!==0?(v={body:o(),statusCode:p,method:_,headers:{},url:w,rawRequest:l},l.getAllResponseHeaders&&(v.headers=La(l.getAllResponseHeaders()))):h=new Error("Internal XMLHttpRequest Error"),n(h,v,v.body)}}var s,a,l=e.xhr||null;l||(l=e.cors||e.useXDR?new xt.XDomainRequest:new xt.XMLHttpRequest);var d,w=l.url=e.uri||e.url,_=l.method=e.method||"GET",x=e.body||e.data,P=l.headers=e.headers||{},I=!!e.sync,y=!1,u={body:void 0,headers:{},statusCode:0,method:_,url:w,rawRequest:l};if("json"in e&&e.json!==!1&&(y=!0,P.accept||P.Accept||(P.Accept="application/json"),_!=="GET"&&_!=="HEAD"&&(P["content-type"]||P["Content-Type"]||(P["Content-Type"]="application/json"),x=JSON.stringify(e.json===!0?x:e.json))),l.onreadystatechange=function(){l.readyState===4&&setTimeout(i,0)},l.onload=i,l.onerror=r,l.onprogress=function(){},l.onabort=function(){a=!0},l.ontimeout=r,l.open(_,w,!I,e.username,e.password),I||(l.withCredentials=!!e.withCredentials),!I&&e.timeout>0&&(d=setTimeout(function(){if(!a){a=!0,l.abort("timeout");var p=new Error("XMLHttpRequest timeout");p.code="ETIMEDOUT",r(p)}},e.timeout)),l.setRequestHeader)for(s in P)P.hasOwnProperty(s)&&l.setRequestHeader(s,P[s]);else if(e.headers&&!function(p){for(var v in p)if(p.hasOwnProperty(v))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&typeof e.beforeSend=="function"&&e.beforeSend(l),l.send(x||null),l}qn.exports=xt,qn.exports.default=xt,xt.XMLHttpRequest=xr.XMLHttpRequest||function(){},xt.XDomainRequest="withCredentials"in new xt.XMLHttpRequest?xt.XMLHttpRequest:xr.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){xt[e==="delete"?"del":e]=function(t,n,o){return(n=kr(t,n,o)).method=e.toUpperCase(),Ir(n)}});var Da=Te(qn.exports);const $a=[200,201,202,204,308],Na=[408,502,503,504];class Tr{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=On(),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,a=i*this.chunkCount,l=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(a+l,100))}};return new Promise((o,r)=>{this.currentXhr=Da({...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&&$a.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&&Na.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 Ba=e=>new Tr(e),ja=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 pe{hproseURL;client;hproseProxy;static httpTransport;constructor(t){if(t&&!Re.isNullOrEmpty(t)){if(pe.httpTransport||(pe.httpTransport=new $s),this.client=new Ls(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")):$t.emit(ct.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 oe{hproseClient;hpProxyObj;defaultContext=new kn;constructor(t){this.hproseClient=new pe(t),this.hpProxyObj=null}getClientContext(t,n){const o={};n&&(o.requestHeaders=n);const r=Nt();o.httpRequestHeaders=t||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),B.SystemID&&(i.sysid=B.SystemID,B.SystemGroup&&(i.sysgroup=B.SystemGroup)),new kn(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||$t.emit(ct.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=Nt();return console.log(r,"userToken3"),r&&(n||(n=new kn({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(t,o,n)}async hproseInvokeEncode(t){const n=new _e(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 _e.toString(o)}}const Vn=new Map,Oa=function(e,t,n){!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),B.Config.DefaultHproseAPI&&Re.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new oe(B.Config.DefaultHproseAPI));const o=B.Config.UI.GrayMode;o&&dt.setGrayMode(o);const r=new yr(e,B.EventBus);B.Message=r,B.SystemID=t,B.SystemGroup=n,B.EventBus.on(ct.HproseServiceErrorEvent,i=>{const s=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(ct.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(ct.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(ct.CommonWarnEvent,i=>{r.warn(i)})};function Rr(e){if(e&&Re.isNotEmpty(e)){if(Vn.has(e))return Vn.get(e);{const t=new oe(e);return Vn.set(e,t),t}}}function Wa(e){const t=Rr(e);return t&&(B.DefaultProxyClient=t),t}const Gn="is_LockScreen",Mr=Ct.get(Gn,!1),re={isLock:Mr,lockTime:Mr=="true"?zr():0};function Pr(e){re.isLock=e,Ct.set(Gn,e,10),e&&(Fn(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Ua(){return Ct.get(Gn,!1)}function zr(){let e=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(e=B.Config.UI.LockTime),e}let Kn;function Yn(){clearInterval(Kn),!(window.location.href.indexOf("/login")>0||re.isLock)&&(Pr(!1),re.lockTime=zr(),Kn=setInterval(()=>{if(re.lockTime--,re.lockTime<=0)return Pr(!0),clearInterval(Kn)},1e3))}function Fa(){Yn(),document.addEventListener("mousedown",Yn)}function Ha(){document.removeEventListener("mousedown",Yn)}function Jn(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 qa={exports:{}},Ae=Te(qa.exports=function e(t,n,o){function r(a,l){if(!n[a]){if(!t[a]){if(!l&&Jn)return Jn(a);if(i)return i(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var w=n[a]={exports:{}};t[a][0].call(w.exports,function(_){var x=t[a][1][_];return r(x||_)},w,w.exports,e,t,n,o)}return n[a].exports}for(var i=Jn,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 a=0,l=new s(x),d=o.document.createTextNode("");l.observe(d,{characterData:!0}),r=function(){d.data=a=++a%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(){x(),I.onreadystatechange=null,I.parentNode.removeChild(I),I=null},o.document.documentElement.appendChild(I)}:function(){setTimeout(x,0)};else{var w=new o.MessageChannel;w.port1.onmessage=x,r=function(){w.port2.postMessage(0)}}var _=[];function x(){var I,y;i=!0;for(var u=_.length;u;){for(y=_,_=[],I=-1;++I<u;)y[I]();u=_.length}i=!1}function P(I){_.push(I)!==1||i||r()}t.exports=P}).call(this,At!==void 0?At:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(e,t,n){var o=e(1);function r(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function d(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,h!==r&&P(this,h)}function w(h,f,L){this.promise=h,typeof f=="function"&&(this.onFulfilled=f,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}function _(h,f,L){o(function(){var A;try{A=f(L)}catch(D){return i.reject(h,D)}A===h?i.reject(h,new TypeError("Cannot resolve promise with itself")):i.resolve(h,A)})}function x(h){var f=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof f=="function")return function(){f.apply(h,arguments)}}function P(h,f){var L=!1;function A(U){L||(L=!0,i.reject(h,U))}function D(U){L||(L=!0,i.resolve(h,U))}function $(){f(D,A)}var j=I($);j.status==="error"&&A(j.value)}function I(h,f){var L={};try{L.value=h(f),L.status="success"}catch(A){L.status="error",L.value=A}return L}function y(h){return h instanceof this?h:i.resolve(new this(r),h)}function u(h){var f=new this(r);return i.reject(f,h)}function p(h){var f=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=h.length,A=!1;if(!L)return this.resolve([]);for(var D=new Array(L),$=0,j=-1,U=new this(r);++j<L;)T(h[j],j);return U;function T(O,q){function rt(Z){D[q]=Z,++$!==L||A||(A=!0,i.resolve(U,D))}f.resolve(O).then(rt,function(Z){A||(A=!0,i.reject(U,Z))})}}function v(h){var f=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=h.length,A=!1;if(!L)return this.resolve([]);for(var D=-1,$=new this(r);++D<L;)j(h[D]);return $;function j(U){f.resolve(U).then(function(T){A||(A=!0,i.resolve($,T))},function(T){A||(A=!0,i.reject($,T))})}}t.exports=d,d.prototype.catch=function(h){return this.then(null,h)},d.prototype.then=function(h,f){if(typeof h!="function"&&this.state===a||typeof f!="function"&&this.state===s)return this;var L=new this.constructor(r);return this.state!==l?_(L,this.state===a?h:f,this.outcome):this.queue.push(new w(L,h,f)),L},w.prototype.callFulfilled=function(h){i.resolve(this.promise,h)},w.prototype.otherCallFulfilled=function(h){_(this.promise,this.onFulfilled,h)},w.prototype.callRejected=function(h){i.reject(this.promise,h)},w.prototype.otherCallRejected=function(h){_(this.promise,this.onRejected,h)},i.resolve=function(h,f){var L=I(x,f);if(L.status==="error")return i.reject(h,L.value);var A=L.value;if(A)P(h,A);else{h.state=a,h.outcome=f;for(var D=-1,$=h.queue.length;++D<$;)h.queue[D].callFulfilled(f)}return h},i.reject=function(h,f){h.state=s,h.outcome=f;for(var L=-1,A=h.queue.length;++L<A;)h.queue[L].callRejected(f);return h},d.resolve=y,d.reject=u,d.all=p,d.race=v},{1:1}],3:[function(e,t,n){(function(o){typeof o.Promise!="function"&&(o.Promise=e(2))}).call(this,At!==void 0?At: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(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};function r(c,g){if(!(c instanceof g))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 a(){try{if(!s||!s.open)return!1;var c=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),g=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!c||g)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function l(c,g){c=c||[],g=g||{};try{return new Blob(c,g)}catch(b){if(b.name!=="TypeError")throw b;for(var m=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),S=0;S<c.length;S+=1)m.append(c[S]);return m.getBlob(g.type)}}typeof Promise>"u"&&e(3);var d=Promise;function w(c,g){g&&c.then(function(m){g(null,m)},function(m){g(m)})}function _(c,g,m){typeof g=="function"&&c.then(g),typeof m=="function"&&c.catch(m)}function x(c){return typeof c!="string"&&(console.warn(c+" used as a key, but it is not a string."),c=String(c)),c}function P(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var I="local-forage-detect-blob-support",y=void 0,u={},p=Object.prototype.toString,v="readonly",h="readwrite";function f(c){for(var g=c.length,m=new ArrayBuffer(g),S=new Uint8Array(m),b=0;b<g;b++)S[b]=c.charCodeAt(b);return m}function L(c){return new d(function(g){var m=c.transaction(I,h),S=l([""]);m.objectStore(I).put(S,"key"),m.onabort=function(b){b.preventDefault(),b.stopPropagation(),g(!1)},m.oncomplete=function(){var b=navigator.userAgent.match(/Chrome\/(\d+)/),C=navigator.userAgent.match(/Edge\//);g(C||!b||parseInt(b[1],10)>=43)}}).catch(function(){return!1})}function A(c){return typeof y=="boolean"?d.resolve(y):L(c).then(function(g){return y=g})}function D(c){var g=u[c.name],m={};m.promise=new d(function(S,b){m.resolve=S,m.reject=b}),g.deferredOperations.push(m),g.dbReady?g.dbReady=g.dbReady.then(function(){return m.promise}):g.dbReady=m.promise}function $(c){var g=u[c.name].deferredOperations.pop();if(g)return g.resolve(),g.promise}function j(c,g){var m=u[c.name].deferredOperations.pop();if(m)return m.reject(g),m.promise}function U(c,g){return new d(function(m,S){if(u[c.name]=u[c.name]||_t(),c.db){if(!g)return m(c.db);D(c),c.db.close()}var b=[c.name];g&&b.push(c.version);var C=s.open.apply(s,b);g&&(C.onupgradeneeded=function(E){var R=C.result;try{R.createObjectStore(c.storeName),E.oldVersion<=1&&R.createObjectStore(I)}catch(M){if(M.name!=="ConstraintError")throw M;console.warn('The database "'+c.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+c.storeName+'" already exists.')}}),C.onerror=function(E){E.preventDefault(),S(C.error)},C.onsuccess=function(){var E=C.result;E.onversionchange=function(R){R.target.close()},m(E),$(c)}})}function T(c){return U(c,!1)}function O(c){return U(c,!0)}function q(c,g){if(!c.db)return!0;var m=!c.db.objectStoreNames.contains(c.storeName),S=c.version<c.db.version,b=c.version>c.db.version;if(S&&(c.version!==g&&console.warn('The database "'+c.name+`" can't be downgraded from version `+c.db.version+" to version "+c.version+"."),c.version=c.db.version),b||m){if(m){var C=c.db.version+1;C>c.version&&(c.version=C)}return!0}return!1}function rt(c){return new d(function(g,m){var S=new FileReader;S.onerror=m,S.onloadend=function(b){var C=btoa(b.target.result||"");g({__local_forage_encoded_blob:!0,data:C,type:c.type})},S.readAsBinaryString(c)})}function Z(c){return l([f(atob(c.data))],{type:c.type})}function Q(c){return c&&c.__local_forage_encoded_blob}function bt(c){var g=this,m=g._initReady().then(function(){var S=u[g._dbInfo.name];if(S&&S.dbReady)return S.dbReady});return _(m,c,c),m}function Ht(c){D(c);for(var g=u[c.name],m=g.forages,S=0;S<m.length;S++){var b=m[S];b._dbInfo.db&&(b._dbInfo.db.close(),b._dbInfo.db=null)}return c.db=null,T(c).then(function(C){return c.db=C,q(c)?O(c):C}).then(function(C){c.db=g.db=C;for(var E=0;E<m.length;E++)m[E]._dbInfo.db=C}).catch(function(C){throw j(c,C),C})}function et(c,g,m,S){S===void 0&&(S=1);try{var b=c.db.transaction(c.storeName,g);m(null,b)}catch(C){if(S>0&&(!c.db||C.name==="InvalidStateError"||C.name==="NotFoundError"))return d.resolve().then(function(){if(!c.db||C.name==="NotFoundError"&&!c.db.objectStoreNames.contains(c.storeName)&&c.version<=c.db.version)return c.db&&(c.version=c.db.version+1),O(c)}).then(function(){return Ht(c).then(function(){et(c,g,m,S-1)})}).catch(m);m(C)}}function _t(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function sn(c){var g=this,m={db:null};if(c)for(var S in c)m[S]=c[S];var b=u[m.name];b||(b=_t(),u[m.name]=b),b.forages.push(g),g._initReady||(g._initReady=g.ready,g.ready=bt);var C=[];function E(){return d.resolve()}for(var R=0;R<b.forages.length;R++){var M=b.forages[R];M!==g&&C.push(M._initReady().catch(E))}var z=b.forages.slice(0);return d.all(C).then(function(){return m.db=b.db,T(m)}).then(function(N){return m.db=N,q(m,g._defaultConfig.version)?O(m):N}).then(function(N){m.db=b.db=N,g._dbInfo=m;for(var W=0;W<z.length;W++){var H=z[W];H!==g&&(H._dbInfo.db=m.db,H._dbInfo.version=m.version)}})}function an(c,g){var m=this;c=x(c);var S=new d(function(b,C){m.ready().then(function(){et(m._dbInfo,v,function(E,R){if(E)return C(E);try{var M=R.objectStore(m._dbInfo.storeName).get(c);M.onsuccess=function(){var z=M.result;z===void 0&&(z=null),Q(z)&&(z=Z(z)),b(z)},M.onerror=function(){C(M.error)}}catch(z){C(z)}})}).catch(C)});return w(S,g),S}function cn(c,g){var m=this,S=new d(function(b,C){m.ready().then(function(){et(m._dbInfo,v,function(E,R){if(E)return C(E);try{var M=R.objectStore(m._dbInfo.storeName).openCursor(),z=1;M.onsuccess=function(){var N=M.result;if(N){var W=N.value;Q(W)&&(W=Z(W));var H=c(W,N.key,z++);H!==void 0?b(H):N.continue()}else b()},M.onerror=function(){C(M.error)}}catch(N){C(N)}})}).catch(C)});return w(S,g),S}function ge(c,g,m){var S=this;c=x(c);var b=new d(function(C,E){var R;S.ready().then(function(){return R=S._dbInfo,p.call(g)==="[object Blob]"?A(R.db).then(function(M){return M?g:rt(g)}):g}).then(function(M){et(S._dbInfo,h,function(z,N){if(z)return E(z);try{var W=N.objectStore(S._dbInfo.storeName);M===null&&(M=void 0);var H=W.put(M,c);N.oncomplete=function(){M===void 0&&(M=null),C(M)},N.onabort=N.onerror=function(){var V=H.error?H.error:H.transaction.error;E(V)}}catch(V){E(V)}})}).catch(E)});return w(b,m),b}function Zt(c,g){var m=this;c=x(c);var S=new d(function(b,C){m.ready().then(function(){et(m._dbInfo,h,function(E,R){if(E)return C(E);try{var M=R.objectStore(m._dbInfo.storeName).delete(c);R.oncomplete=function(){b()},R.onerror=function(){C(M.error)},R.onabort=function(){var z=M.error?M.error:M.transaction.error;C(z)}}catch(z){C(z)}})}).catch(C)});return w(S,g),S}function Qt(c){var g=this,m=new d(function(S,b){g.ready().then(function(){et(g._dbInfo,h,function(C,E){if(C)return b(C);try{var R=E.objectStore(g._dbInfo.storeName).clear();E.oncomplete=function(){S()},E.onabort=E.onerror=function(){var M=R.error?R.error:R.transaction.error;b(M)}}catch(M){b(M)}})}).catch(b)});return w(m,c),m}function vt(c){var g=this,m=new d(function(S,b){g.ready().then(function(){et(g._dbInfo,v,function(C,E){if(C)return b(C);try{var R=E.objectStore(g._dbInfo.storeName).count();R.onsuccess=function(){S(R.result)},R.onerror=function(){b(R.error)}}catch(M){b(M)}})}).catch(b)});return w(m,c),m}function me(c,g){var m=this,S=new d(function(b,C){c<0?b(null):m.ready().then(function(){et(m._dbInfo,v,function(E,R){if(E)return C(E);try{var M=R.objectStore(m._dbInfo.storeName),z=!1,N=M.openKeyCursor();N.onsuccess=function(){var W=N.result;W?c===0||z?b(W.key):(z=!0,W.advance(c)):b(null)},N.onerror=function(){C(N.error)}}catch(W){C(W)}})}).catch(C)});return w(S,g),S}function ve(c){var g=this,m=new d(function(S,b){g.ready().then(function(){et(g._dbInfo,v,function(C,E){if(C)return b(C);try{var R=E.objectStore(g._dbInfo.storeName).openKeyCursor(),M=[];R.onsuccess=function(){var z=R.result;z?(M.push(z.key),z.continue()):S(M)},R.onerror=function(){b(R.error)}}catch(z){b(z)}})}).catch(b)});return w(m,c),m}function te(c,g){g=P.apply(this,arguments);var m=this.config();(c=typeof c!="function"&&c||{}).name||(c.name=c.name||m.name,c.storeName=c.storeName||m.storeName);var S,b=this;if(c.name){var C=c.name===m.name&&b._dbInfo.db?d.resolve(b._dbInfo.db):T(c).then(function(E){var R=u[c.name],M=R.forages;R.db=E;for(var z=0;z<M.length;z++)M[z]._dbInfo.db=E;return E});S=c.storeName?C.then(function(E){if(E.objectStoreNames.contains(c.storeName)){var R=E.version+1;D(c);var M=u[c.name],z=M.forages;E.close();for(var N=0;N<z.length;N++){var W=z[N];W._dbInfo.db=null,W._dbInfo.version=R}var H=new d(function(V,G){var it=s.open(c.name,R);it.onerror=function(St){it.result.close(),G(St)},it.onupgradeneeded=function(){it.result.deleteObjectStore(c.storeName)},it.onsuccess=function(){var St=it.result;St.close(),V(St)}});return H.then(function(V){M.db=V;for(var G=0;G<z.length;G++){var it=z[G];it._dbInfo.db=V,$(it._dbInfo)}}).catch(function(V){throw(j(c,V)||d.resolve()).catch(function(){}),V})}}):C.then(function(E){D(c);var R=u[c.name],M=R.forages;E.close();for(var z=0;z<M.length;z++)M[z]._dbInfo.db=null;var N=new d(function(W,H){var V=s.deleteDatabase(c.name);V.onerror=function(){var G=V.result;G&&G.close(),H(V.error)},V.onblocked=function(){console.warn('dropInstance blocked for database "'+c.name+'" until all open connections are closed')},V.onsuccess=function(){var G=V.result;G&&G.close(),W(G)}});return N.then(function(W){R.db=W;for(var H=0;H<M.length;H++)$(M[H]._dbInfo)}).catch(function(W){throw(j(c,W)||d.resolve()).catch(function(){}),W})})}else S=d.reject("Invalid arguments");return w(S,g),S}var ye={_driver:"asyncStorage",_initStorage:sn,_support:a(),iterate:cn,getItem:an,setItem:ge,removeItem:Zt,clear:Qt,length:vt,key:me,keys:ve,dropInstance:te};function ee(){return typeof openDatabase=="function"}var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Di="~~local_forage_type~",$o=/^~~local_forage_type~([^~]+)~/,we="__lfsc__:",ln=we.length,un="arbf",hn="blob",No="si08",Bo="ui08",jo="uic8",Oo="si16",Wo="si32",Uo="ur16",Fo="ui32",Ho="fl32",qo="fl64",Xo=ln+un.length,Vo=Object.prototype.toString;function Go(c){var g,m,S,b,C,E=.75*c.length,R=c.length,M=0;c[c.length-1]==="="&&(E--,c[c.length-2]==="="&&E--);var z=new ArrayBuffer(E),N=new Uint8Array(z);for(g=0;g<R;g+=4)m=yt.indexOf(c[g]),S=yt.indexOf(c[g+1]),b=yt.indexOf(c[g+2]),C=yt.indexOf(c[g+3]),N[M++]=m<<2|S>>4,N[M++]=(15&S)<<4|b>>2,N[M++]=(3&b)<<6|63&C;return z}function dn(c){var g,m=new Uint8Array(c),S="";for(g=0;g<m.length;g+=3)S+=yt[m[g]>>2],S+=yt[(3&m[g])<<4|m[g+1]>>4],S+=yt[(15&m[g+1])<<2|m[g+2]>>6],S+=yt[63&m[g+2]];return m.length%3==2?S=S.substring(0,S.length-1)+"=":m.length%3==1&&(S=S.substring(0,S.length-2)+"=="),S}function $i(c,g){var m="";if(c&&(m=Vo.call(c)),c&&(m==="[object ArrayBuffer]"||c.buffer&&Vo.call(c.buffer)==="[object ArrayBuffer]")){var S,b=we;c instanceof ArrayBuffer?(S=c,b+=un):(S=c.buffer,m==="[object Int8Array]"?b+=No:m==="[object Uint8Array]"?b+=Bo:m==="[object Uint8ClampedArray]"?b+=jo:m==="[object Int16Array]"?b+=Oo:m==="[object Uint16Array]"?b+=Uo:m==="[object Int32Array]"?b+=Wo:m==="[object Uint32Array]"?b+=Fo:m==="[object Float32Array]"?b+=Ho:m==="[object Float64Array]"?b+=qo:g(new Error("Failed to get type for BinaryArray"))),g(b+dn(S))}else if(m==="[object Blob]"){var C=new FileReader;C.onload=function(){var E=Di+c.type+"~"+dn(this.result);g(we+hn+E)},C.readAsArrayBuffer(c)}else try{g(JSON.stringify(c))}catch(E){console.error("Couldn't convert value into a JSON string: ",c),g(null,E)}}function Ni(c){if(c.substring(0,ln)!==we)return JSON.parse(c);var g,m=c.substring(Xo),S=c.substring(ln,Xo);if(S===hn&&$o.test(m)){var b=m.match($o);g=b[1],m=m.substring(b[0].length)}var C=Go(m);switch(S){case un:return C;case hn:return l([C],{type:g});case No:return new Int8Array(C);case Bo:return new Uint8Array(C);case jo:return new Uint8ClampedArray(C);case Oo:return new Int16Array(C);case Uo:return new Uint16Array(C);case Wo:return new Int32Array(C);case Fo:return new Uint32Array(C);case Ho:return new Float32Array(C);case qo:return new Float64Array(C);default:throw new Error("Unkown type: "+S)}}var fn={serialize:$i,deserialize:Ni,stringToBuffer:Go,bufferToString:dn};function Ko(c,g,m,S){c.executeSql("CREATE TABLE IF NOT EXISTS "+g.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],m,S)}function Bi(c){var g=this,m={db:null};if(c)for(var S in c)m[S]=typeof c[S]!="string"?c[S].toString():c[S];var b=new d(function(C,E){try{m.db=openDatabase(m.name,String(m.version),m.description,m.size)}catch(R){return E(R)}m.db.transaction(function(R){Ko(R,m,function(){g._dbInfo=m,C()},function(M,z){E(z)})},E)});return m.serializer=fn,b}function kt(c,g,m,S,b,C){c.executeSql(m,S,b,function(E,R){R.code===R.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[g.storeName],function(M,z){z.rows.length?C(M,R):Ko(M,g,function(){M.executeSql(m,S,b,C)},C)},C):C(E,R)},C)}function ji(c,g){var m=this;c=x(c);var S=new d(function(b,C){m.ready().then(function(){var E=m._dbInfo;E.db.transaction(function(R){kt(R,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[c],function(M,z){var N=z.rows.length?z.rows.item(0).value:null;N&&(N=E.serializer.deserialize(N)),b(N)},function(M,z){C(z)})})}).catch(C)});return w(S,g),S}function Oi(c,g){var m=this,S=new d(function(b,C){m.ready().then(function(){var E=m._dbInfo;E.db.transaction(function(R){kt(R,E,"SELECT * FROM "+E.storeName,[],function(M,z){for(var N=z.rows,W=N.length,H=0;H<W;H++){var V=N.item(H),G=V.value;if(G&&(G=E.serializer.deserialize(G)),(G=c(G,V.key,H+1))!==void 0)return void b(G)}b()},function(M,z){C(z)})})}).catch(C)});return w(S,g),S}function Yo(c,g,m,S){var b=this;c=x(c);var C=new d(function(E,R){b.ready().then(function(){g===void 0&&(g=null);var M=g,z=b._dbInfo;z.serializer.serialize(g,function(N,W){W?R(W):z.db.transaction(function(H){kt(H,z,"INSERT OR REPLACE INTO "+z.storeName+" (key, value) VALUES (?, ?)",[c,N],function(){E(M)},function(V,G){R(G)})},function(H){if(H.code===H.QUOTA_ERR){if(S>0)return void E(Yo.apply(b,[c,M,m,S-1]));R(H)}})})}).catch(R)});return w(C,m),C}function Wi(c,g,m){return Yo.apply(this,[c,g,m,1])}function Ui(c,g){var m=this;c=x(c);var S=new d(function(b,C){m.ready().then(function(){var E=m._dbInfo;E.db.transaction(function(R){kt(R,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[c],function(){b()},function(M,z){C(z)})})}).catch(C)});return w(S,g),S}function Fi(c){var g=this,m=new d(function(S,b){g.ready().then(function(){var C=g._dbInfo;C.db.transaction(function(E){kt(E,C,"DELETE FROM "+C.storeName,[],function(){S()},function(R,M){b(M)})})}).catch(b)});return w(m,c),m}function Hi(c){var g=this,m=new d(function(S,b){g.ready().then(function(){var C=g._dbInfo;C.db.transaction(function(E){kt(E,C,"SELECT COUNT(key) as c FROM "+C.storeName,[],function(R,M){var z=M.rows.item(0).c;S(z)},function(R,M){b(M)})})}).catch(b)});return w(m,c),m}function qi(c,g){var m=this,S=new d(function(b,C){m.ready().then(function(){var E=m._dbInfo;E.db.transaction(function(R){kt(R,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[c+1],function(M,z){var N=z.rows.length?z.rows.item(0).key:null;b(N)},function(M,z){C(z)})})}).catch(C)});return w(S,g),S}function Xi(c){var g=this,m=new d(function(S,b){g.ready().then(function(){var C=g._dbInfo;C.db.transaction(function(E){kt(E,C,"SELECT key FROM "+C.storeName,[],function(R,M){for(var z=[],N=0;N<M.rows.length;N++)z.push(M.rows.item(N).key);S(z)},function(R,M){b(M)})})}).catch(b)});return w(m,c),m}function Vi(c){return new d(function(g,m){c.transaction(function(S){S.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(b,C){for(var E=[],R=0;R<C.rows.length;R++)E.push(C.rows.item(R).name);g({db:c,storeNames:E})},function(b,C){m(C)})},function(S){m(S)})})}function Gi(c,g){g=P.apply(this,arguments);var m=this.config();(c=typeof c!="function"&&c||{}).name||(c.name=c.name||m.name,c.storeName=c.storeName||m.storeName);var S,b=this;return S=c.name?new d(function(C){var E;E=c.name===m.name?b._dbInfo.db:openDatabase(c.name,"","",0),c.storeName?C({db:E,storeNames:[c.storeName]}):C(Vi(E))}).then(function(C){return new d(function(E,R){C.db.transaction(function(M){function z(V){return new d(function(G,it){M.executeSql("DROP TABLE IF EXISTS "+V,[],function(){G()},function(St,mn){it(mn)})})}for(var N=[],W=0,H=C.storeNames.length;W<H;W++)N.push(z(C.storeNames[W]));d.all(N).then(function(){E()}).catch(function(V){R(V)})},function(M){R(M)})})}):d.reject("Invalid arguments"),w(S,g),S}var Ki={_driver:"webSQLStorage",_initStorage:Bi,_support:ee(),iterate:Oi,getItem:ji,setItem:Wi,removeItem:Ui,clear:Fi,length:Hi,key:qi,keys:Xi,dropInstance:Gi};function Yi(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Jo(c,g){var m=c.name+"/";return c.storeName!==g.storeName&&(m+=c.storeName+"/"),m}function Ji(){var c="_localforage_support_test";try{return localStorage.setItem(c,!0),localStorage.removeItem(c),!1}catch{return!0}}function Zi(){return!Ji()||localStorage.length>0}function Qi(c){var g=this,m={};if(c)for(var S in c)m[S]=c[S];return m.keyPrefix=Jo(c,g._defaultConfig),Zi()?(g._dbInfo=m,m.serializer=fn,d.resolve()):d.reject()}function ts(c){var g=this,m=g.ready().then(function(){for(var S=g._dbInfo.keyPrefix,b=localStorage.length-1;b>=0;b--){var C=localStorage.key(b);C.indexOf(S)===0&&localStorage.removeItem(C)}});return w(m,c),m}function es(c,g){var m=this;c=x(c);var S=m.ready().then(function(){var b=m._dbInfo,C=localStorage.getItem(b.keyPrefix+c);return C&&(C=b.serializer.deserialize(C)),C});return w(S,g),S}function ns(c,g){var m=this,S=m.ready().then(function(){for(var b=m._dbInfo,C=b.keyPrefix,E=C.length,R=localStorage.length,M=1,z=0;z<R;z++){var N=localStorage.key(z);if(N.indexOf(C)===0){var W=localStorage.getItem(N);if(W&&(W=b.serializer.deserialize(W)),(W=c(W,N.substring(E),M++))!==void 0)return W}}});return w(S,g),S}function os(c,g){var m=this,S=m.ready().then(function(){var b,C=m._dbInfo;try{b=localStorage.key(c)}catch{b=null}return b&&(b=b.substring(C.keyPrefix.length)),b});return w(S,g),S}function rs(c){var g=this,m=g.ready().then(function(){for(var S=g._dbInfo,b=localStorage.length,C=[],E=0;E<b;E++){var R=localStorage.key(E);R.indexOf(S.keyPrefix)===0&&C.push(R.substring(S.keyPrefix.length))}return C});return w(m,c),m}function is(c){var g=this.keys().then(function(m){return m.length});return w(g,c),g}function ss(c,g){var m=this;c=x(c);var S=m.ready().then(function(){var b=m._dbInfo;localStorage.removeItem(b.keyPrefix+c)});return w(S,g),S}function as(c,g,m){var S=this;c=x(c);var b=S.ready().then(function(){g===void 0&&(g=null);var C=g;return new d(function(E,R){var M=S._dbInfo;M.serializer.serialize(g,function(z,N){if(N)R(N);else try{localStorage.setItem(M.keyPrefix+c,z),E(C)}catch(W){W.name!=="QuotaExceededError"&&W.name!=="NS_ERROR_DOM_QUOTA_REACHED"||R(W),R(W)}})})});return w(b,m),b}function cs(c,g){if(g=P.apply(this,arguments),!(c=typeof c!="function"&&c||{}).name){var m=this.config();c.name=c.name||m.name,c.storeName=c.storeName||m.storeName}var S,b=this;return S=c.name?new d(function(C){c.storeName?C(Jo(c,b._defaultConfig)):C(c.name+"/")}).then(function(C){for(var E=localStorage.length-1;E>=0;E--){var R=localStorage.key(E);R.indexOf(C)===0&&localStorage.removeItem(R)}}):d.reject("Invalid arguments"),w(S,g),S}var ls={_driver:"localStorageWrapper",_initStorage:Qi,_support:Yi(),iterate:ns,getItem:es,setItem:as,removeItem:ss,clear:ts,length:is,key:os,keys:rs,dropInstance:cs},us=function(c,g){return c===g||typeof c=="number"&&typeof g=="number"&&isNaN(c)&&isNaN(g)},hs=function(c,g){for(var m=c.length,S=0;S<m;){if(us(c[S],g))return!0;S++}return!1},Zo=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},ne={},Qo={},qt={INDEXEDDB:ye,WEBSQL:Ki,LOCALSTORAGE:ls},ds=[qt.INDEXEDDB._driver,qt.WEBSQL._driver,qt.LOCALSTORAGE._driver],be=["dropInstance"],pn=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(be),fs={description:"",driver:ds.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ps(c,g){c[g]=function(){var m=arguments;return c.ready().then(function(){return c[g].apply(c,m)})}}function gn(){for(var c=1;c<arguments.length;c++){var g=arguments[c];if(g)for(var m in g)g.hasOwnProperty(m)&&(Zo(g[m])?arguments[0][m]=g[m].slice():arguments[0][m]=g[m])}return arguments[0]}var gs=function(){function c(g){for(var m in r(this,c),qt)if(qt.hasOwnProperty(m)){var S=qt[m],b=S._driver;this[m]=b,ne[b]||this.defineDriver(S)}this._defaultConfig=gn({},fs),this._config=gn({},this._defaultConfig,g),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return c.prototype.config=function(g){if((g===void 0?"undefined":o(g))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in g){if(m==="storeName"&&(g[m]=g[m].replace(/\W/g,"_")),m==="version"&&typeof g[m]!="number")return new Error("Database version must be a number.");this._config[m]=g[m]}return!("driver"in g)||!g.driver||this.setDriver(this._config.driver)}return typeof g=="string"?this._config[g]:this._config},c.prototype.defineDriver=function(g,m,S){var b=new d(function(C,E){try{var R=g._driver,M=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!g._driver)return void E(M);for(var z=pn.concat("_initStorage"),N=0,W=z.length;N<W;N++){var H=z[N];if((!hs(be,H)||g[H])&&typeof g[H]!="function")return void E(M)}var V=function(){for(var it=function(vs){return function(){var ys=new Error("Method "+vs+" is not implemented by the current driver"),tr=d.reject(ys);return w(tr,arguments[arguments.length-1]),tr}},St=0,mn=be.length;St<mn;St++){var vn=be[St];g[vn]||(g[vn]=it(vn))}};V();var G=function(it){ne[R]&&console.info("Redefining LocalForage driver: "+R),ne[R]=g,Qo[R]=it,C()};"_support"in g?g._support&&typeof g._support=="function"?g._support().then(G,E):G(!!g._support):G(!0)}catch(it){E(it)}});return _(b,m,S),b},c.prototype.driver=function(){return this._driver||null},c.prototype.getDriver=function(g,m,S){var b=ne[g]?d.resolve(ne[g]):d.reject(new Error("Driver not found."));return _(b,m,S),b},c.prototype.getSerializer=function(g){var m=d.resolve(fn);return _(m,g),m},c.prototype.ready=function(g){var m=this,S=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return _(S,g,g),S},c.prototype.setDriver=function(g,m,S){var b=this;Zo(g)||(g=[g]);var C=this._getSupportedDrivers(g);function E(){b._config.driver=b.driver()}function R(N){return b._extend(N),E(),b._ready=b._initStorage(b._config),b._ready}function M(N){return function(){var W=0;function H(){for(;W<N.length;){var V=N[W];return W++,b._dbInfo=null,b._ready=null,b.getDriver(V).then(R).catch(H)}E();var G=new Error("No available storage method found.");return b._driverSet=d.reject(G),b._driverSet}return H()}}var z=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=z.then(function(){var N=C[0];return b._dbInfo=null,b._ready=null,b.getDriver(N).then(function(W){b._driver=W._driver,E(),b._wrapLibraryMethodsWithReady(),b._initDriver=M(C)})}).catch(function(){E();var N=new Error("No available storage method found.");return b._driverSet=d.reject(N),b._driverSet}),_(this._driverSet,m,S),this._driverSet},c.prototype.supports=function(g){return!!Qo[g]},c.prototype._extend=function(g){gn(this,g)},c.prototype._getSupportedDrivers=function(g){for(var m=[],S=0,b=g.length;S<b;S++){var C=g[S];this.supports(C)&&m.push(C)}return m},c.prototype._wrapLibraryMethodsWithReady=function(){for(var g=0,m=pn.length;g<m;g++)ps(this,pn[g])},c.prototype.createInstance=function(g){return new c(g)},c}(),ms=new gs;t.exports=ms},{3:3}]},{},[4])(4)),Lr={exports:{}};/*!
4
4
  localForage -- Offline Storage, Improved
5
5
  Version 1.10.0
6
6
  https://localforage.github.io/localForage
7
7
  (c) 2013-2017 Mozilla, Apache License 2.0
8
- */(function(t){((e,n)=>{t.exports=n()})(0,()=>{const e=typeof window=="object"?window:this;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,o=!1;const r=e.WebStreamsPolyfill||{},i=e.isSecureContext;let s=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const c=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",f={createWriteStream:function(S,E,M){let B={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},T=0,_=null,d=null,p=null;if(Number.isFinite(E)?([M,E]=[E,M],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),B.size=M,B.writableStrategy=E):E&&E.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),B.size=M,B.writableStrategy=E):B=E||{},!s){n||(n=i?m(f.mitm):function(A){const P="width=200,height=100",$=document.createDocumentFragment(),D={frame:e.open(A,"popup",P),loaded:!1,isIframe:!1,isPopup:!0,remove(){D.frame.close()},addEventListener(...O){$.addEventListener(...O)},dispatchEvent(...O){$.dispatchEvent(...O)},removeEventListener(...O){$.removeEventListener(...O)},postMessage(...O){D.frame.postMessage(...O)}},U=O=>{O.source===D.frame&&(D.loaded=!0,e.removeEventListener("message",U),D.dispatchEvent(new Event("load")))};return e.addEventListener("message",U),D}(f.mitm)),d=new MessageChannel,S=encodeURIComponent(S.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const u={transferringReadable:o,pathname:B.pathname||Math.random().toString().slice(-6)+"/"+S,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+S}};B.size&&(u.headers["Content-Length"]=B.size);const v=[u,"*",[d.port2]];if(o){const A=c==="iframe"?void 0:{transform($,D){if(!($ instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");T+=$.length,D.enqueue($),_&&(location.href=_,_=null)},flush(){_&&(location.href=_)}};p=new f.TransformStream(A,B.writableStrategy,B.readableStrategy);const P=p.readable;d.port1.postMessage({readableStream:P},[P])}d.port1.onmessage=A=>{A.data.download?c==="navigate"?(n.remove(),n=null,T?location.href=A.data.download:_=A.data.download):(n.isPopup&&(n.remove(),n=null,c==="iframe"&&m(f.mitm)),m(A.data.download)):A.data.abort&&(g=[],d.port1.postMessage("abort"),d.port1.onmessage=null,d.port1.close(),d.port2.close(),d=null)},n.loaded?n.postMessage(...v):n.addEventListener("load",()=>{n.postMessage(...v)},{once:!0})}let g=[];return!s&&p&&p.writable||new f.WritableStream({write(u){if(!(u instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?g.push(u):(d.port1.postMessage(u),T+=u.length,_&&(location.href=_,_=null))},close(){if(s){const u=new Blob(g,{type:"application/octet-stream; charset=utf-8"}),v=document.createElement("a");v.href=URL.createObjectURL(u),v.download=S,v.click()}else d.port1.postMessage("end")},abort(){g=[],d.port1.postMessage("abort"),d.port1.onmessage=null,d.port1.close(),d.port2.close(),d=null}},B.writableStrategy)},WritableStream:e.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 E=document.createElement("iframe");return E.hidden=!0,E.src=S,E.loaded=!1,E.name="iframe",E.isIframe=!0,E.postMessage=(...M)=>E.contentWindow.postMessage(...M),E.addEventListener("load",()=>{E.loaded=!0},{once:!0}),document.body.appendChild(E),E}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(S=>{try{S()}catch{}})(()=>{const{readable:S}=new TransformStream,E=new MessageChannel;E.port1.postMessage(S,[S]),E.port1.close(),E.port2.close(),o=!0,Object.defineProperty(f,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),f})})(Uo);var Os=lt(Uo.exports);class Ws{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,n,o=3,r=6,i=6e4){this.fileID=e,this.downloadURL=n,this.chunkByteSize=o*this.ChunkUnitM,this.eventTarget=fn(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(e,n){this.eventTarget.on(e,n)}dispatch(e,n){this.eventTarget.emit(e,n)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,n="",o){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await be(n,e,o);let i=null;return r&&r.status===200&&(i=r.data),i}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=mt.createInstance({name:this.fileID,driver:mt.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const n="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(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(),mt.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(n=>setTimeout(n,e))}async download(e,n){let o=e;if(!o&&this.downloadURL&&(o=this.downloadURL),!o)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const r=N.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let s=0;const c=this.cacheSize;let f=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 E=S+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const M={range:`bytes=${S}-${E}`};for(;f>=c;)await this.sleep(200);const B=m.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${m+1}/${this.totalChunks}`),f++,be(o,n,i,M,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async T=>{const _=T.data;f--,await this.currentDB?.setItem(B,_),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const d=parseInt(B)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${d}/${this.totalChunks}`),this.savefile()}).catch(T=>{f--;const _=parseInt(B)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${_}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const n=100*e/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 e=Os.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:f,value:m}=await c.read();if(f)break;await e.write(m)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),mt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function Hs(t,e){let n="",o="";for(const r in e)n+=r+"="+encodeURIComponent(e[r])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(t)?t+n:t.replace(/\/?$/,"?")+n,o}function jo(t={},e={}){let n;for(n in e)Me(e[n])?t[n]=jo(t[n],e[n]):t[n]=e[n];return t}function Fs(t,e){const n=`${t}_${e}`;return de.MD5(n)}function Oo(t){const e=function(c){if(!c)return;const f=c,m=[];if(f)for(let S of f){const E=Wo(S);E&&m.push(E)}return m}(t.bussinessRoutes),n=function(c){if(!c)return;const f=c;if(f&&f.length>0){const m=[];return f.forEach(S=>{const E=Ho(S);E&&m.push(E)}),m}}(t.widgetMenuConfig),o=function(c){if(c&&c.length>0){const f=[];return c.forEach(m=>{const S=function(E){return E?{id:E.id,label:E.label,container:E.container,preload:E.preload,afterid:E.afterid,bindid:E.bindid,group:E.group}:void 0}(m);S&&f.push(S)}),f}}(t.widgetConfig),r=function(c){if(c&&c.length>0)return c}(t.functionList),i=t.pkgObject.version,s=t.pkgObject.name;return{id:Fs(s,i),name:N.Config.UI.SiteTitle,group:N.Config.UI.Group,product:s,version:i,routes:e,widgetMenu:n,widgets:o,functions:r}}function Wo(t){if(t){let e=0;t.meta?.hidden&&(e=1);let n={path:t.path,name:t.name,title:t.meta?.title,type:e,index:t.meta?.index};if(t.children){const o=[];for(let r of t.children){const i=Wo(r);i&&o.push(i)}o.length>0&&(n.children=o)}return n}}function Ho(t){if(!t)return;const e={name:t.name,index:t.index,path:t.path,type:t.type};return t.children&&t.children.length>0&&(e.children=[],t.children.forEach(n=>{const o=Ho(n);o&&e.children?.push(o)})),e}function qs(t,e="IconifyList.ts"){let n="",o=`const iconlist={
9
- `,r=0;t.forEach(i=>{const s=i.split(":");if(s&&s.length===2){const c="icon"+r;n+=`import ${c} from '~icons/${s[0]}/${s[1]}'
10
- `,o+=` '${i}':${c},
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 a=i||"MozAppearance"in document.documentElement.style?"iframe":"navigate",l={createWriteStream:function(w,_,x){let P={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},I=0,y=null,u=null,p=null;if(Number.isFinite(_)?([x,_]=[_,x],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),P.size=x,P.writableStrategy=_):_&&_.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),P.size=x,P.writableStrategy=_):P=_||{},!s){n||(n=i?d(l.mitm):function(L){const A="width=200,height=100",D=document.createDocumentFragment(),$={frame:t.open(L,"popup",A),loaded:!1,isIframe:!1,isPopup:!0,remove(){$.frame.close()},addEventListener(...U){D.addEventListener(...U)},dispatchEvent(...U){D.dispatchEvent(...U)},removeEventListener(...U){D.removeEventListener(...U)},postMessage(...U){$.frame.postMessage(...U)}},j=U=>{U.source===$.frame&&($.loaded=!0,t.removeEventListener("message",j),$.dispatchEvent(new Event("load")))};return t.addEventListener("message",j),$}(l.mitm)),u=new MessageChannel,w=encodeURIComponent(w.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const h={transferringReadable:o,pathname:P.pathname||Math.random().toString().slice(-6)+"/"+w,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+w}};P.size&&(h.headers["Content-Length"]=P.size);const f=[h,"*",[u.port2]];if(o){const L=a==="iframe"?void 0:{transform(D,$){if(!(D instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");I+=D.length,$.enqueue(D),y&&(location.href=y,y=null)},flush(){y&&(location.href=y)}};p=new l.TransformStream(L,P.writableStrategy,P.readableStrategy);const A=p.readable;u.port1.postMessage({readableStream:A},[A])}u.port1.onmessage=L=>{L.data.download?a==="navigate"?(n.remove(),n=null,I?location.href=L.data.download:y=L.data.download):(n.isPopup&&(n.remove(),n=null,a==="iframe"&&d(l.mitm)),d(L.data.download)):L.data.abort&&(v=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...f):n.addEventListener("load",()=>{n.postMessage(...f)},{once:!0})}let v=[];return!s&&p&&p.writable||new l.WritableStream({write(h){if(!(h instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?v.push(h):(u.port1.postMessage(h),I+=h.length,y&&(location.href=y,y=null))},close(){if(s){const h=new Blob(v,{type:"application/octet-stream; charset=utf-8"}),f=document.createElement("a");f.href=URL.createObjectURL(h),f.download=w,f.click()}else u.port1.postMessage("end")},abort(){v=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null}},P.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 d(w){if(!w)throw new Error("meh");const _=document.createElement("iframe");return _.hidden=!0,_.src=w,_.loaded=!1,_.name="iframe",_.isIframe=!0,_.postMessage=(...x)=>_.contentWindow.postMessage(...x),_.addEventListener("load",()=>{_.loaded=!0},{once:!0}),document.body.appendChild(_),_}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(w=>{try{w()}catch{}})(()=>{const{readable:w}=new TransformStream,_=new MessageChannel;_.port1.postMessage(w,[w]),_.port1.close(),_.port2.close(),o=!0,Object.defineProperty(l,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),l})})(Lr);var Xa=Te(Lr.exports);class Va{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=On(),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 Et(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=Ae.createInstance({name:this.fileID,driver:Ae.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(),Ae.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=B.Axios.CancelToken;this.cancelSource=r.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let s=0;const a=this.cacheSize;let l=0;for(let d=0;d<this.totalChunks;d++){if(this.keys&&this.keys?.indexOf(d.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const w=d*this.chunkByteSize;let _=w+this.chunkByteSize-1;this.fileMetaData&&_>this.fileMetaData.length&&(_=this.fileMetaData.length-1);const x={range:`bytes=${w}-${_}`};for(;l>=a;)await this.sleep(200);const P=d.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${d+1}/${this.totalChunks}`),l++,Et(o,n,i,x,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async I=>{const y=I.data;l--,await this.currentDB?.setItem(P,y),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const u=parseInt(P)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(I=>{l--;const y=parseInt(P)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${y}\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=Xa.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 a=s.getReader();for(;;){const{done:l,value:d}=await a.read();if(l)break;await t.write(d)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}t.close(),Ae.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function Ga(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 Ar(e={},t={}){let n;for(n in t)Lt(t[n])?e[n]=Ar(e[n],t[n]):e[n]=t[n];return e}function Ka(e,t){const n=`${e}_${t}`;return dt.MD5(n)}function Dr(e){const t=function(a){if(!a)return;const l=a,d=[];if(l)for(let w of l){const _=$r(w);_&&d.push(_)}return d}(e.bussinessRoutes),n=function(a){if(!a)return;const l=a;if(l&&l.length>0){const d=[];return l.forEach(w=>{const _=Nr(w);_&&d.push(_)}),d}}(e.widgetMenuConfig),o=function(a){if(a&&a.length>0){const l=[];return a.forEach(d=>{const w=function(_){return _?{id:_.id,label:_.label,container:_.container,preload:_.preload,afterid:_.afterid,bindid:_.bindid,group:_.group}:void 0}(d);w&&l.push(w)}),l}}(e.widgetConfig),r=function(a){if(a&&a.length>0)return a}(e.functionList),i=e.pkgObject.version,s=e.pkgObject.name;return{id:Ka(s,i),name:B.Config.UI.SiteTitle,group:B.Config.UI.Group,product:s,version:i,routes:t,widgetMenu:n,widgets:o,functions:r}}function $r(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=$r(r);i&&o.push(i)}o.length>0&&(n.children=o)}return n}}function Nr(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=Nr(n);o&&t.children?.push(o)})),t}function Ya(e,t="IconifyList.ts"){let n="",o=`const iconlist={
9
+ `,r=0;e.forEach(i=>{const s=i.split(":");if(s&&s.length===2){const a="icon"+r;n+=`import ${a} from '~icons/${s[0]}/${s[1]}'
10
+ `,o+=` '${i}':${a},
11
11
  `,r++}}),r>0&&(o+=`};
12
- `,pt(n+o+"export default iconlist;","IconifyList.ts"))}function Gs(t,e){const n=Oo(t);yo(n,e),N.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function Xs(t){let e=t.replace(/(^\s*)|(\s*$)/g,"");return e=e.replace(/[^\d]/g,""),e=e.replace(/^0/g,""),e=e.replace(/^[1-9]\d\d{1,3}$/,"100"),e}function Vs(t){let e=kn(t);return e=e.replace(/^[1-9]\d\d{1,3}$/,"100"),e=e.replace(/^100\.$/,"100"),e}function kn(t){let e=t.replace(/(^\s*)|(\s*$)/g,"");return e=e.replace(/[^\d.]/g,""),e=e.replace(/^0{2}$/g,"0"),e=e.replace(/^\./g,""),e=e.replace(".","$#$").replace(/\./g,"").replace("$#$","."),e=e.replace(/^(\-)*(\d+)\.(\d\d).*$/,"$1$2.$3"),e}function Ks(t){let e=t.replace(/(^\s*)|(\s*$)/g,"");return e=e.replace(/[\.]*/g,""),e=e.replace(/(^0[\d]*)$/g,"0"),e=e.replace(/^0\d$/g,"0"),e=e.replace(/[^\d]/g,""),e}function Js(t){let e=t.replace(/[\u4e00-\u9fa5\s]+/g,"");return e=e.replace(/(^\s*)|(\s*$)/g,""),e}function Ys(t){let e=t.replace(/[a-zA-Z]+/g,"");return e=e.replace(/(^\s*)|(\s*$)/g,""),e}function Zs(t){return t.replace(/(^\s*)|(\s*$)/g,"")}function Qs(t){let e=kn(t);return e=e.toString().split("."),e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e=e.join("."),e}function ea(t,e="",n="red"){return e.replace(new RegExp(t,"gi"),`<span style='color: ${n}'>${t}</span>`)}function ta(t,e="\u4EDF\u4F70\u62FE\u4EBF\u4EDF\u4F70\u62FE\u4E07\u4EDF\u4F70\u62FE\u5143\u89D2\u5206",n=""){let o=(t+="00").indexOf(".");o>=0&&(t=t.substring(0,o)+t.substr(o+1,2)),e=e.substr(e.length-t.length);for(let r=0;r<t.length;r++)n+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".substr(t.substr(r,1),1)+e.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 na(t){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(t)}function oa(t){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(t)}function ra(t){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(t)}function ia(t){return!!/^[a-zA-Z]\w{5,15}$/.test(t)}function sa(t){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(t)}function aa(t){let e="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(t)&&(e="\u5F31"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(t)&&(e="\u4E2D"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(t)&&(e="\u5F3A"),e}function ca(t){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(t)}function la(t){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(t)}function ha(t){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(t)}function ua(t){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(t)}function da(t){return!!/^[1-9][0-9]{5}$/.test(t)}function fa(t){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(t)}function pa(t){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(t)}let Fo=!0;try{String.fromCharCode.apply(String,[1,2])}catch{Fo=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var xn=2654435769;function qo(t,e){var n=t.length,o=n<<2;if(e){var r=t[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]=t[s>>2]>>((3&s)<<3);return i}function vt(t,e){var n,o=t.length,r=o>>2;3&o&&++r,e?(n=new Uint32Array(r+1))[r]=o:n=new Uint32Array(r);for(var i=0;i<o;++i)n[i>>2]|=t[i]<<((3&i)<<3);return n}function Ne(t){return 4294967295&t}function yt(t,e,n,o,r,i){return(n>>>5^e<<2)+(e>>>3^n<<4)^(t^e)+(i[3&o^r]^n)}function Go(t){if(t.length<16){var e=new Uint8Array(16);e.set(t),t=e}return t}function wt(t){for(var e=t.length,n=new Uint8Array(3*e),o=0,r=0;r<e;r++){var i=t.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<e){var s=t.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 Xo(t){var e=t.length;return e===0?"":e<32767?function(n,o){for(var r=new Array(o),i=0,s=0,c=n.length;i<o&&s<c;i++){var f=n[s++];switch(f>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=f;break;case 12:case 13:if(!(s<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&f)<<6|63&n[s++];break;case 14:if(!(s+1<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&f)<<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&f)<<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"+f.toString(16))}}return i<o&&(r.length=i),String.fromCharCode.apply(String,r)}(t,e):function(n,o){for(var r=[],i=new Array(32768),s=0,c=0,f=n.length;s<o&&c<f;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<f))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&m)<<6|63&n[c++];break;case 14:if(!(c+1<f))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<f))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 E=s+1;i.length=E,r.push(String.fromCharCode.apply(String,i)),o-=E,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(t,e)}function ga(t){var e=t.length;if(e===0)return"";var n=Fo?t:function(c){for(var f=c.length,m=new Array(c.length),S=0;S<f;++S)m[S]=c[S];return m}(t);if(e<65535)return String.fromCharCode.apply(String,n);for(var o=32767&e,r=e>>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,e))),i.join("")}function Vo(t,e){return typeof t=="string"&&(t=wt(t)),typeof e=="string"&&(e=wt(e)),t==null||t.length===0?t:qo(function(n,o){var r,i,s,c,f,m,S=n.length,E=S-1;for(i=n[E],s=0,m=0|Math.floor(6+52/S);m>0;--m){for(c=(s=Ne(s+xn))>>>2&3,f=0;f<E;++f)r=n[f+1],i=n[f]=Ne(n[f]+yt(s,r,i,f,c,o));r=n[0],i=n[E]=Ne(n[E]+yt(s,r,i,E,c,o))}return n}(vt(t,!0),vt(Go(e),!1)),!1)}function Ko(t,e){return typeof t=="string"&&(t=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}(t)),typeof e=="string"&&(e=wt(e)),t==null||t.length===0?t:qo(function(n,o){var r,i,s,c,f,m=n.length,S=m-1;for(r=n[0],s=Ne(Math.floor(6+52/m)*xn);s!==0;s=Ne(s-xn)){for(c=s>>>2&3,f=S;f>0;--f)i=n[f-1],r=n[f]=Ne(n[f]-yt(s,r,i,f,c,o));i=n[S],r=n[0]=Ne(n[0]-yt(s,r,i,0,c,o))}return n}(vt(t,!1),vt(Go(e),!1)),!0)}const Je={toBytes:wt,toString:Xo,encrypt:Vo,encryptToString:function(t,e){return window.btoa(ga(Vo(t,e)))},decrypt:Ko,decryptToString:function(t,e){return Xo(Ko(t,e))}},Jo=t=>{const e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e));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(t,n.width/10,n.height/2);const r=document.createElement("div");return r.id=e,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),e},ma={set:t=>{let e=Jo(t);document.getElementById(e)===null&&(e=Jo(t))},del:()=>{let t="1.23452384164.123412416";document.getElementById(t)!==null&&document.body.removeChild(document.getElementById(t))}};class Be extends Error{constructor(e,n){const o=new.target.prototype;super(`${e}: Status code '${n}'`),this.statusCode=n,this.__proto__=o}}class In extends Error{constructor(e="A timeout occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class me extends Error{constructor(e="An abort occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class va extends Error{constructor(e,n){const o=new.target.prototype;super(e),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=o}}class ya extends Error{constructor(e,n){const o=new.target.prototype;super(e),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=o}}class wa extends Error{constructor(e,n){const o=new.target.prototype;super(e),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=o}}class Yo extends Error{constructor(e){const n=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class ba extends Error{constructor(e,n){const o=new.target.prototype;super(e),this.innerErrors=n,this.__proto__=o}}class Zo{constructor(e,n,o){this.statusCode=e,this.statusText=n,this.content=o}}class bt{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}var k;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"})(k||(k={}));class Ye{constructor(){}log(e,n){}}Ye.instance=new Ye;class K{static isRequired(e,n){if(e==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(e,n){if(!e||e.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(e,n,o){if(!(e in n))throw new Error(`Unknown ${o} value: ${e}.`)}}class V{static get isBrowser(){return!V.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!V.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!V.isNode&&typeof window=="object"&&window.document===void 0}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Ze(t,e){let n="";return Ue(t)?(n=`Binary data of length ${t.byteLength}`,e&&(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)}(t)}'`)):typeof t=="string"&&(n=`String data of length ${t.length}`,e&&(n+=`. Content: '${t}'`)),n}function Ue(t){return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||t.constructor&&t.constructor.name==="ArrayBuffer")}async function Qo(t,e,n,o,r,i){const s={},[c,f]=Fe();s[c]=f,t.log(k.Trace,`(${e} transport) sending data. ${Ze(r,i.logMessageContent)}.`);const m=Ue(r)?"arraybuffer":"text",S=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:m,timeout:i.timeout,withCredentials:i.withCredentials});t.log(k.Trace,`(${e} transport) request complete. Response status: ${S.statusCode}.`)}class _a{constructor(e,n){this._subject=e,this._observer=n}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class _t{constructor(e){this._minLevel=e,this.out=console}log(e,n){if(e>=this._minLevel){const o=`[${new Date().toISOString()}] ${k[e]}: ${n}`;switch(e){case k.Critical:case k.Error:this.out.error(o);break;case k.Warning:this.out.warn(o);break;case k.Information:this.out.info(o);break;default:this.out.log(o)}}}}function Fe(){let t="X-SignalR-User-Agent";return V.isNode&&(t="User-Agent"),[t,Sa("8.0.0",Ca(),ka(),Ea())]}function Sa(t,e,n,o){let r="Microsoft SignalR/";const i=t.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${t}; `,r+=e&&e!==""?`${e}; `:"Unknown OS; ",r+=`${n}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function Ca(){if(!V.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function Ea(){if(V.isNode)return process.versions.node}function ka(){return V.isNode?"NodeJS":"Browser"}function er(t){return t.stack?t.stack:t.message?t.message:`${t}`}class xa extends bt{constructor(e){super(),this._logger=e;const n={_fetchType:void 0,_jar:void 0};var o;o=n,(typeof fetch>"u"||V.isNode)&&(o._jar=new(require("tough-cookie")).CookieJar,typeof fetch>"u"?o._fetchType=require("node-fetch"):o._fetchType=fetch,o._fetchType=require("fetch-cookie")(o._fetchType,o._jar),1)?(this._fetchType=n._fetchType,this._jar=n._jar):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")}()),this._abortControllerType=AbortController;const r={_abortControllerType:this._abortControllerType};(function(i){return typeof AbortController>"u"&&(i._abortControllerType=require("abort-controller"),!0)})(r)&&(this._abortControllerType=r._abortControllerType)}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new me;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let o;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),o=new me});let r,i=null;if(e.timeout){const f=e.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(k.Warning,"Timeout from HTTP request."),o=new In},f)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Ue(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{r=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(f){throw o||(this._logger.log(k.Warning,`Error from HTTP request. ${f}.`),f)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){const f=await tr(r,"text");throw new Be(f||r.statusText,r.status)}const s=tr(r,e.responseType),c=await s;return new Zo(r.status,r.statusText,c)}getCookieString(e){let n="";return V.isNode&&this._jar&&this._jar.getCookies(e,(o,r)=>n=r.join("; ")),n}}function tr(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":default:n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`)}return n}class Ia extends bt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new me):e.method?e.url?new Promise((n,o)=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),r.withCredentials=e.withCredentials===void 0||e.withCredentials,r.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(Ue(e.content)?r.setRequestHeader("Content-Type","application/octet-stream"):r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=e.headers;i&&Object.keys(i).forEach(s=>{r.setRequestHeader(s,i[s])}),e.responseType&&(r.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{r.abort(),o(new me)}),e.timeout&&(r.timeout=e.timeout),r.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),r.status>=200&&r.status<300?n(new Zo(r.status,r.statusText,r.response||r.responseText)):o(new Be(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(k.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),o(new Be(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(k.Warning,"Timeout from HTTP request."),o(new In)},r.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Ta extends bt{constructor(e){if(super(),typeof fetch<"u"||V.isNode)this._httpClient=new xa(e);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new Ia(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new me):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class pe{static write(e){return`${e}${pe.RecordSeparator}`}static parse(e){if(e[e.length-1]!==pe.RecordSeparator)throw new Error("Message is incomplete.");const n=e.split(pe.RecordSeparator);return n.pop(),n}}pe.RecordSeparatorCode=30,pe.RecordSeparator=String.fromCharCode(pe.RecordSeparatorCode);class Ra{writeHandshakeRequest(e){return pe.write(JSON.stringify(e))}parseHandshakeResponse(e){let n,o;if(Ue(e)){const s=new Uint8Array(e),c=s.indexOf(pe.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const f=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,f))),o=s.byteLength>f?s.slice(f).buffer:null}else{const s=e,c=s.indexOf(pe.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const f=c+1;n=s.substring(0,f),o=s.length>f?s.substring(f):null}const r=pe.parse(n),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var j;(function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close",t[t.Ack=8]="Ack",t[t.Sequence=9]="Sequence"})(j||(j={}));class Pa{constructor(){this.observers=[]}next(e){for(const n of this.observers)n.next(e)}error(e){for(const n of this.observers)n.error&&n.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new _a(this,e)}}class za{constructor(e,n,o){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=n,this._bufferSize=o}async _send(e){const n=this._protocol.writeMessage(e);let o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let r=()=>{},i=()=>{};Ue(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((s,c)=>{r=s,i=c})),this._messages.push(new Ma(n,this._totalMessageCount,r,i))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await o}_ack(e){let n=-1;for(let o=0;o<this._messages.length;o++){const r=this._messages[o];if(r._id<=e.sequenceId)n=o,Ue(r._message)?this._bufferedByteCount-=r._message.byteLength:this._bufferedByteCount-=r._message.length,r._resolver();else{if(!(this._bufferedByteCount<this._bufferSize))break;r._resolver()}}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type===j.Sequence&&(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(e){e.sequenceId>this._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:j.Sequence,sequenceId:e}));const n=this._messages;for(const o of n)await this._connection.send(o._message);this._reconnectInProgress=!1}_dispose(e){e!=null||(e=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(e)}_isInvocationMessage(e){switch(e.type){case j.Invocation:case j.StreamItem:case j.Completion:case j.StreamInvocation:case j.CancelInvocation:return!0;case j.Close:case j.Sequence:case j.Ping:case j.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:j.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class Ma{constructor(e,n,o,r){this._message=e,this._id=n,this._resolver=o,this._rejector=r}}var X;(function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"})(X||(X={}));class Hn{static create(e,n,o,r,i,s,c){return new Hn(e,n,o,r,i,s,c)}constructor(e,n,o,r,i,s,c){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(k.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://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},K.isRequired(e,"connection"),K.isRequired(n,"logger"),K.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=i??3e4,this.keepAliveIntervalInMilliseconds=s??15e3,this._statefulReconnectBufferSize=c??1e5,this._logger=n,this._protocol=o,this.connection=e,this._reconnectPolicy=r,this._handshakeProtocol=new Ra,this.connection.onreceive=f=>this._processIncomingData(f),this.connection.onclose=f=>this._connectionClosed(f),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:j.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){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(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}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(k.Debug,"Starting HubConnection.");try{await this._startInternal(),V.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=X.Connected,this._connectionStarted=!0,this._logger.log(k.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=X.Disconnected,this._logger.log(k.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((n,o)=>{this._handshakeResolver=n,this._handshakeRejecter=o});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const o={protocol:this._protocol.name,version:n};if(this._logger.log(k.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)),this._logger.log(k.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.reconnect&&(this._messageBuffer=new za(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(k.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===X.Disconnected)return this._logger.log(k.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===X.Disconnecting)return this._logger.log(k.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=X.Disconnecting,this._logger.log(k.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(k.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===X.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new me("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createStreamInvocation(e,n,r);let s;const c=new Pa;return c.cancelCallback=()=>{const f=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(f))},this._callbacks[i.invocationId]=(f,m)=>{m?c.error(m):f&&(f.type===j.Completion?f.error?c.error(new Error(f.error)):c.complete():c.next(f.item))},s=this._sendWithProtocol(i).catch(f=>{c.error(f),delete this._callbacks[i.invocationId]}),this._launchStreams(o,s),c}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...n){const[o,r]=this._replaceStreamingParams(n),i=this._sendWithProtocol(this._createInvocation(e,n,!0,r));return this._launchStreams(o,i),i}invoke(e,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createInvocation(e,n,!1,r);return new Promise((c,f)=>{this._callbacks[i.invocationId]=(S,E)=>{E?f(E):S&&(S.type===j.Completion?S.error?f(new Error(S.error)):c(S.result):f(new Error(`Unexpected message type: ${S.type}`)))};const m=this._sendWithProtocol(i).catch(S=>{f(S),delete this._callbacks[i.invocationId]});this._launchStreams(o,m)})}on(e,n){e&&n&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(n)===-1&&this._methods[e].push(n))}off(e,n){if(!e)return;e=e.toLowerCase();const o=this._methods[e];if(o)if(n){const r=o.indexOf(n);r!==-1&&(o.splice(r,1),o.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const n=this._protocol.parseMessages(e,this._logger);for(const o of n)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(o))switch(o.type){case j.Invocation:this._invokeClientMethod(o);break;case j.StreamItem:case j.Completion:{const r=this._callbacks[o.invocationId];if(r){o.type===j.Completion&&delete this._callbacks[o.invocationId];try{r(o)}catch(i){this._logger.log(k.Error,`Stream callback threw error: ${er(i)}`)}}break}case j.Ping:break;case j.Close:{this._logger.log(k.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}case j.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case j.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(k.Warning,`Invalid message type: ${o.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let n,o;try{[o,n]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(r){const i="Error parsing handshake response: "+r;this._logger.log(k.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(k.Error,r);const i=new Error(r);throw this._handshakeRejecter(i),i}return this._logger.log(k.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 e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===X.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const n=e.target.toLowerCase(),o=this._methods[n];if(!o)return this._logger.log(k.Warning,`No client method with the name '${n}' found.`),void(e.invocationId&&(this._logger.log(k.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const r=o.slice(),i=!!e.invocationId;let s,c,f;for(const m of r)try{const S=s;s=await m.apply(this,e.arguments),i&&s&&S&&(this._logger.log(k.Error,`Multiple results provided for '${n}'. Sending error to server.`),f=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),c=void 0}catch(S){c=S,this._logger.log(k.Error,`A callback for the method '${n}' threw error '${S}'.`)}f?await this._sendWithProtocol(f):i?(c?f=this._createCompletionMessage(e.invocationId,`${c}`,null):s!==void 0?f=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(k.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),f=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(f)):s&&this._logger.log(k.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(k.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new me("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===X.Disconnecting?this._completeClose(e):this._connectionState===X.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===X.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=X.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),V.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[e]))}catch(n){this._logger.log(k.Error,`An onclose callback called with error '${e}' threw error '${n}'.`)}}}async _reconnect(e){const n=Date.now();let o=0,r=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(o++,0,r);if(i===null)return this._logger.log(k.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=X.Reconnecting,e?this._logger.log(k.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(k.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[e]))}catch(s){this._logger.log(k.Error,`An onreconnecting callback called with error '${e}' threw error '${s}'.`)}if(this._connectionState!==X.Reconnecting)return void this._logger.log(k.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;i!==null;){if(this._logger.log(k.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(k.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=X.Connected,this._logger.log(k.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(k.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(k.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==X.Reconnecting)return this._logger.log(k.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(k.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,n,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:e,retryReason:o})}catch(r){return this._logger.log(k.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${r}'.`),null}}_cancelCallbacksWithError(e){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(o=>{const r=n[o];try{r(null,e)}catch(i){this._logger.log(k.Error,`Stream 'error' callback called with '${e}' threw error: ${er(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,n,o,r){if(o)return r.length!==0?{arguments:n,streamIds:r,target:e,type:j.Invocation}:{arguments:n,target:e,type:j.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:n,invocationId:i.toString(),streamIds:r,target:e,type:j.Invocation}:{arguments:n,invocationId:i.toString(),target:e,type:j.Invocation}}}_launchStreams(e,n){if(e.length!==0){n||(n=Promise.resolve());for(const o in e)e[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(e){const n=[],o=[];for(let r=0;r<e.length;r++){const i=e[r];if(this._isObservable(i)){const s=this._invocationId;this._invocationId++,n[s]=i,o.push(s.toString()),e.splice(r,1)}}return[n,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,n,o){const r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:n,invocationId:r.toString(),streamIds:o,target:e,type:j.StreamInvocation}:{arguments:n,invocationId:r.toString(),target:e,type:j.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:j.CancelInvocation}}_createStreamItemMessage(e,n){return{invocationId:e,item:n,type:j.StreamItem}}_createCompletionMessage(e,n,o){return n?{error:n,invocationId:e,type:j.Completion}:{invocationId:e,result:o,type:j.Completion}}_createCloseMessage(){return{type:j.Close}}}const $a=[0,2e3,1e4,3e4,null];class nr{constructor(e){this._retryDelays=e!==void 0?[...e,null]:$a}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class je{}je.Authorization="Authorization",je.Cookie="Cookie";class Aa extends bt{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const o=await this._innerClient.send(e);return n&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):o}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[je.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[je.Authorization]&&delete e.headers[je.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var Y,ne;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(Y||(Y={})),function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"}(ne||(ne={}));class Da{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 or{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,o){this._httpClient=e,this._logger=n,this._pollAbort=new Da,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(K.isRequired(e,"url"),K.isRequired(n,"transferFormat"),K.isIn(n,ne,"transferFormat"),this._url=e,this._logger.log(k.Trace,"(LongPolling transport) Connecting."),n===ne.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]=Fe(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===ne.Binary&&(s.responseType="arraybuffer");const c=`${e}&_=${Date.now()}`;this._logger.log(k.Trace,`(LongPolling transport) polling: ${c}.`);const f=await this._httpClient.get(c,s);f.statusCode!==200?(this._logger.log(k.Error,`(LongPolling transport) Unexpected response code: ${f.statusCode}.`),this._closeError=new Be(f.statusText||"",f.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,n){try{for(;this._running;)try{const o=`${e}&_=${Date.now()}`;this._logger.log(k.Trace,`(LongPolling transport) polling: ${o}.`);const r=await this._httpClient.get(o,n);r.statusCode===204?(this._logger.log(k.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):r.statusCode!==200?(this._logger.log(k.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new Be(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(k.Trace,`(LongPolling transport) data received. ${Ze(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(k.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof In?this._logger.log(k.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(k.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(k.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Qo(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(k.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(k.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,o]=Fe();e[n]=o;const r={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let i;try{await this._httpClient.delete(this._url,r)}catch(s){i=s}i?i instanceof Be&&(i.statusCode===404?this._logger.log(k.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(k.Trace,`(LongPolling transport) Error sending a DELETE request: ${i}`)):this._logger.log(k.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(k.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(k.Trace,e),this.onclose(this._closeError)}}}class La{constructor(e,n,o,r){this._httpClient=e,this._accessToken=n,this._logger=o,this._options=r,this.onreceive=null,this.onclose=null}async connect(e,n){return K.isRequired(e,"url"),K.isRequired(n,"transferFormat"),K.isIn(n,ne,"transferFormat"),this._logger.log(k.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,r)=>{let i,s=!1;if(n===ne.Text){if(V.isBrowser||V.isWebWorker)i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const c=this._httpClient.getCookieString(e),f={};f.Cookie=c;const[m,S]=Fe();f[m]=S,i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...f,...this._options.headers}})}try{i.onmessage=c=>{if(this.onreceive)try{this._logger.log(k.Trace,`(SSE transport) data received. ${Ze(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(f){return void this._close(f)}},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(k.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(e){return this._eventSource?Qo(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class Na{constructor(e,n,o,r,i,s){this._logger=o,this._accessTokenFactory=n,this._logMessageContent=r,this._webSocketConstructor=i,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,n){let o;return K.isRequired(e,"url"),K.isRequired(n,"transferFormat"),K.isIn(n,ne,"transferFormat"),this._logger.log(k.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(o=await this._accessTokenFactory()),new Promise((r,i)=>{let s;e=e.replace(/^http/,"ws");const c=this._httpClient.getCookieString(e);let f=!1;if(V.isNode||V.isReactNative){const m={},[S,E]=Fe();m[S]=E,o&&(m[je.Authorization]=`Bearer ${o}`),c&&(m[je.Cookie]=c),s=new this._webSocketConstructor(e,void 0,{headers:{...m,...this._headers}})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(e)),n===ne.Binary&&(s.binaryType="arraybuffer"),s.onopen=m=>{this._logger.log(k.Information,`WebSocket connected to ${e}.`),this._webSocket=s,f=!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(k.Information,`(WebSockets transport) ${S}.`)},s.onmessage=m=>{if(this._logger.log(k.Trace,`(WebSockets transport) data received. ${Ze(m.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(m.data)}catch(S){return void this._close(S)}},s.onclose=m=>{if(f)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(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(k.Trace,`(WebSockets transport) sending data. ${Ze(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(k.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||e.wasClean!==!1&&e.code===1e3?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}class Ba{constructor(e,n={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,K.isRequired(e,"url"),this._logger=(o=n.logger)===void 0?new _t(k.Information):o===null?Ye.instance:o.log!==void 0?o:new _t(o),this.baseUrl=this._resolveUrl(e),(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;V.isNode&&typeof require<"u"&&(r=require("ws"),i=require("eventsource")),V.isNode||typeof WebSocket>"u"||n.WebSocket?V.isNode&&!n.WebSocket&&r&&(n.WebSocket=r):n.WebSocket=WebSocket,V.isNode||typeof EventSource>"u"||n.EventSource?V.isNode&&!n.EventSource&&i!==void 0&&(n.EventSource=i):n.EventSource=EventSource,this._httpClient=new Aa(n.httpClient||new Ta(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||ne.Binary,K.isIn(e,ne,"transferFormat"),this._logger.log(k.Debug,`Starting connection with transfer format '${ne[e]}'.`),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(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(k.Error,n),await this._stopPromise,Promise.reject(new me(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(k.Error,n),Promise.reject(new me(n))}this._connectionStarted=!0}send(e){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 Fn(this.transport)),this._sendQueue.send(e))}async stop(e){return this._connectionState==="Disconnected"?(this._logger.log(k.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):this._connectionState==="Disconnecting"?(this._logger.log(k.Debug,`Call to HttpConnection.stop(${e}) 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(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(k.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(k.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==Y.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(Y.WebSockets),await this._startTransport(n,e)}else{let o=null,r=0;do{if(o=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new me("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,e)}this.transport instanceof or&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(k.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(k.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}}async _getNegotiationResponse(e){const n={},[o,r]=Fe();n[o]=r;const i=this._resolveNegotiateUrl(e);this._logger.log(k.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.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new Yo("Client didn't negotiate Stateful Reconnect but the server did.")):c}catch(s){let c="Failed to complete negotiation with the server: "+s;return s instanceof Be&&s.statusCode===404&&(c+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(k.Error,c),Promise.reject(new Yo(c))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,o,r){let i=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(n))return this._logger.log(k.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 f=o;for(const m of c){const S=this._resolveTransportOrError(m,n,r,f?.useStatefulReconnect===!0);if(S instanceof Error)s.push(`${m.transport} failed:`),s.push(S);else if(this._isITransport(S)){if(this.transport=S,!f){try{f=await this._getNegotiationResponse(e)}catch(E){return Promise.reject(E)}i=this._createConnectUrl(e,f.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=f.connectionId)}catch(E){if(this._logger.log(k.Error,`Failed to start the transport '${m.transport}': ${E}`),f=void 0,s.push(new wa(`${m.transport} failed: ${E}`,Y[m.transport])),this._connectionState!=="Connecting"){const M="Failed to select transport before stop() was called.";return this._logger.log(k.Debug,M),Promise.reject(new me(M))}}}}return s.length>0?Promise.reject(new ba(`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(e){switch(e){case Y.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Na(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Y.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new La(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Y.LongPolling:return new or(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async o=>{let r=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{r=!0}r&&this._stopConnection(o)}else this._stopConnection(o)}:this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(e,n)}_resolveTransportOrError(e,n,o,r){const i=Y[e.transport];if(i==null)return this._logger.log(k.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(!function(s,c){return!s||(c&s)!=0}(n,i))return this._logger.log(k.Debug,`Skipping transport '${Y[i]}' because it was disabled by the client.`),new ya(`'${Y[i]}' is disabled by the client.`,i);{if(!(e.transferFormats.map(c=>ne[c]).indexOf(o)>=0))return this._logger.log(k.Debug,`Skipping transport '${Y[i]}' because it does not support the requested transfer format '${ne[o]}'.`),new Error(`'${Y[i]}' does not support ${ne[o]}.`);if(i===Y.WebSockets&&!this._options.WebSocket||i===Y.ServerSentEvents&&!this._options.EventSource)return this._logger.log(k.Debug,`Skipping transport '${Y[i]}' because it is not supported in your environment.'`),new va(`'${Y[i]}' is not supported in your environment.`,i);this._logger.log(k.Debug,`Selecting transport '${Y[i]}'.`);try{return this.features.reconnect=i===Y.WebSockets?r:void 0,this._constructTransport(i)}catch(c){return c}}}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(k.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState!=="Disconnected"){if(this._connectionState==="Connecting")throw this._logger.log(k.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(k.Error,`Connection disconnected with error '${e}'.`):this._logger.log(k.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(k.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(e)}catch(n){this._logger.log(k.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}else this._logger.log(k.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!V.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(k.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const o=new URLSearchParams(n.searchParams);return o.has("negotiateVersion")||o.append("negotiateVersion",this._negotiateVersion.toString()),o.has("useStatefulReconnect")?o.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&o.append("useStatefulReconnect","true"),n.search=o.toString(),n.toString()}}class Fn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new St,this._transportResult=new St,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new St),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new St;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Fn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(o){e.reject(o)}}}static _concatBuffers(e){const n=e.map(i=>i.byteLength).reduce((i,s)=>i+s),o=new Uint8Array(n);let r=0;for(const i of e)o.set(new Uint8Array(i),r),r+=i.byteLength;return o.buffer}}class St{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class Ua{constructor(){this.name="json",this.version=2,this.transferFormat=ne.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=Ye.instance);const o=pe.parse(e),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 j.Invocation:this._isInvocationMessage(s);break;case j.StreamItem:this._isStreamItemMessage(s);break;case j.Completion:this._isCompletionMessage(s);break;case j.Ping:case j.Close:break;case j.Ack:this._isAckMessage(s);break;case j.Sequence:this._isSequenceMessage(s);break;default:n.log(k.Information,"Unknown message type '"+s.type+"' ignored.");continue}r.push(s)}return r}writeMessage(e){return pe.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const ja={trace:k.Trace,debug:k.Debug,info:k.Information,information:k.Information,warn:k.Warning,warning:k.Warning,error:k.Error,critical:k.Critical,none:k.None};class Oa{configureLogging(e){if(K.isRequired(e,"logging"),e.log!==void 0)this.logger=e;else if(typeof e=="string"){const n=function(o){const r=ja[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(e);this.logger=new _t(n)}else this.logger=new _t(e);return this}withUrl(e,n){return K.isRequired(e,"url"),K.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions=typeof n=="object"?{...this.httpConnectionOptions,...n}:{...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return K.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new nr(e):this.reconnectPolicy=e:this.reconnectPolicy=new nr,this}withServerTimeout(e){return K.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return K.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new Ba(this.url,e);return Hn.create(n,this.logger||Ye.instance,this.protocol||new Ua,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}let Ct;function Wa(t){if(!t){if(Ct)return Ct;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const e=new Oa().configureLogging(k.Information).withUrl(t).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return e.keepAliveIntervalInMilliseconds=15e3,e.serverTimeoutInMilliseconds=18e5,e.start().then(()=>{N.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),e.onclose(async()=>{N.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),e.onreconnecting(()=>{N.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),e.onreconnected(()=>{N.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),Ct||(Ct=e),e}const ce=fo({panelGroups:{}}),rr=()=>({useGroupAccordion:t=>Ee(()=>ce.panelGroups[t].accordion),setGroupAccordionStatus:(t,e)=>{ce.panelGroups[t]={...ce.panelGroups[t],accordion:e}},panelExpanded:(t,e)=>Ee(()=>ce.panelGroups[t]?.panelExpandStatus?.[e]||!1),setPanelExpandedStatus:(t,e,n)=>{ce.panelGroups[t]={...ce.panelGroups[t],panelExpandStatus:{...ce.panelGroups[t]?.panelExpandStatus||{},[e]:n}}},togglePanelExpandedStatus:(t,e)=>{ce.panelGroups[t].accordion&&(ce.panelGroups[t].panelExpandStatus[e]||Object.keys(ce.panelGroups[t].panelExpandStatus).forEach(n=>{ce.panelGroups[t].panelExpandStatus[n]=!1})),ce.panelGroups[t].panelExpandStatus[e]=!ce.panelGroups[t].panelExpandStatus[e]}}),Tn=t=>t>255?255:t<0?0:t,Et=(t,e)=>{const n=t.replace("#",""),o=parseInt(n,16),r=Tn((o>>16)+e),i=Tn((o>>8&255)+e);return"#"+(Tn((255&o)+e)|i<<8|r<<16).toString(16)};var kt=Pe({name:"VueCollapsiblePanelGroup",props:{accordion:{type:Boolean,default:!1},baseColor:{type:String,default:"#333333"}},setup(t){const e=he(`group-${dt()}`),{setGroupAccordionStatus:n}=rr(),o={"--base-color":t.baseColor,"--border-color":Et(t.baseColor,180),"--bg-color-header":Et(t.baseColor,140),"--bg-color-header-hover":Et(t.baseColor,190),"--bg-color-header-active":Et(t.baseColor,200),"--bg-color-body":"#fff"};return n(e.value,t.accordion),{idGroup:e,cssColorVars:o}}});const Ha=["data-id-group"];kt.render=function(t,e,n,o,r,i){return G(),ie("div",{"data-id-group":t.idGroup,style:Re(t.cssColorVars),class:"vcpg"},[J(t.$slots,"default")],12,Ha)},kt.__scopeId="data-v-23ab5317",kt.__file="src/controls/collapsepanel/VCollapsiblePanelGroup.vue";var xt=Pe({name:"VueCollapsiblePanel",props:{expanded:{type:Boolean,default:!0}},setup(t,e){const n=`panel-${dt()}`,o=he(),r=he(),i=he(),{panelExpanded:s,togglePanelExpandedStatus:c,setPanelExpandedStatus:f}=rr(),m=Ee(()=>({hasContent:e.slots.content&&e.slots.content()[0].children.length>0,dataKey:dt()})),S=Ee(()=>o.value?.parentElement?.getAttribute("data-id-group")||""),E=Ee(()=>s(S.value,n).value&&m.value.hasContent);return Jt(()=>{f(S.value,n,t.expanded)}),yi(()=>{(async()=>(await Yt(),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:E,collapse:M=>{M.style.height="0"},expand:M=>{M.style.height=`${M.scrollHeight}px`},toggle:()=>{m.value.hasContent&&c(S.value,n)},toggleIcon:`
13
- <svg
14
- width="24px"
15
- height="24px"
16
- viewBox="0 0 24 24"
17
- fill="currentColor"
18
- xmlns="http://www.w3.org/2000/svg"
19
- >
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"/>
21
- </svg>
22
- `}}});const Fa={class:"vcp__header-title"},qa={key:0,class:"vcp__header-icon"},Ga=["innerHTML"],Xa={key:0,ref:"bodyRef",class:"vcp__body"},Va={ref:"bodyContentRef",class:"vcp__body-content"};function Rn(t){return window.TouchEvent&&t instanceof TouchEvent}xt.render=function(t,e,n,o,r,i){return G(),ie("section",{ref:"panelRef",class:wi(["vcp",{"vcp--expanded":t.isExpanded,"vcp--expandable":t.body.hasContent}])},[se("header",{class:"vcp__header",onClick:e[0]||(e[0]=(...s)=>t.toggle&&t.toggle(...s))},[se("div",Fa,[J(t.$slots,"title")]),t.body.hasContent?(G(),ie("div",qa,[J(t.$slots,"icon",{},()=>[se("span",{innerHTML:t.toggleIcon},null,8,Ga)])])):ke("v-if",!0)]),it(Zt,{"data-key":t.body.dataKey,name:"slide",onBeforeEnter:t.collapse,onEnter:t.expand,onBeforeLeave:t.expand,onLeave:t.collapse},{default:xe(()=>[t.isExpanded?(G(),ie("div",Xa,[se("div",Va,[J(t.$slots,"content")],512)],512)):ke("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},xt.__scopeId="data-v-08c94cf8",xt.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class le{e;constructor(e){this.e=e}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Rn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Rn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new qn(this.clientX,this.clientY)}static bindDown(e,n,o,r=!1){const i=c=>{n(new le(c))},s=c=>{c.touches.length===1&&n(new le(c)),c.touches.length>1&&o&&o(new le(c))};return e.addEventListener("mousedown",i,r),e.addEventListener("touchstart",s,r),()=>{e.removeEventListener("mousedown",i,r),e.removeEventListener("touchstart",s,r)}}static bindMove(e,n,o=!1){const r=s=>{n(new le(s))},i=s=>{s.touches.length===1&&n(new le(s))};return e.addEventListener("mousemove",r,o),e.addEventListener("touchmove",i,o),()=>{e.removeEventListener("mousemove",r,o),e.removeEventListener("touchmove",i,o)}}static bindUp(e,n,o=!1){const r=s=>{n(new le(s))},i=s=>{s.touches.length===0&&n(new le(s))};return e.addEventListener("mouseup",r,o),e.addEventListener("touchend",i,o),()=>{e.removeEventListener("mouseup",r,o),e.removeEventListener("touchend",i,o)}}originalEvent({mouse:e,touch:n}){Rn(this.e)?n&&n(this.e):e&&e(this.e)}}class qn{x;y;constructor(e,n){this.x=e,this.y=n}clone(){return new qn(this.x,this.y)}}class Ka{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(e,n,o={}){this.handle=e,this.container=n,this.options=o,e&&(this.unbindDown=le.bindDown(e,this.mousedown),e.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=e=>{if(e.preventDefault(),this.handle){const{left:n,top:o}=this.handle.getBoundingClientRect();this.offsetX=e.clientX-n,this.offsetY=e.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=le.bindMove(document,this.mousemove),this.unbindUp=le.bindUp(document,this.mouseup)};mousemove=e=>{this.container&&(this.container.style.left=e.clientX-this.offsetX+"px",this.container.style.top=e.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=e=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class Ja{_group;onChange;zIndex;constructor(e,n){this._group=e,this.onChange=n,this.a(o=>o.push(this))}set group(e){this._group=e;const n=Tt(this._group),o=Tt(e);n.splice(n.indexOf(this),1),o.push(this),sr()}get group(){return this._group}unregister(){this.a(e=>e.splice(e.indexOf(this),1))}raise(){this.a(e=>{e.splice(e.indexOf(this),1),e.push(this)})}a(e){e(Tt(this._group)),sr()}}const It=new Map;function Tt(t){return It.has(t)||It.set(t,[]),It.get(t)}function ir(t,e){return t>e?-ir(e,t):t<0&&e>=0?1:t-e}function sr(){let t=0;for(const e of function(n){const o=[];return n.forEach((r,i)=>o.push(i)),o}(It).sort(ir))for(const n of Tt(e))t!=n.zIndex&&(n.zIndex=t,n.onChange(t)),t++}function Pn(t){if(t){const{width:e,height:n}=t.style;t.style.width="auto",t.style.height="auto";const o=Rt(t);return t.style.width=e,t.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Rt(t){const e=t.getBoundingClientRect(),n=e.width,o=e.height,r=e.top,i=e.left;return{width:n,height:o,top:r,left:i,bottom:r+o,right:i+n}}class Ya{container;options;handles;constructor(e,n){if(this.container=e,this.options=n,e&&n){this.handles=ar.map(f=>new f(e,this));const{width:o,height:r}=Pn(e),i=n.maxWidth||window.innerWidth,s=n.maxHeight||window.innerHeight;let c=!1;(o<n.minWidth||o>i)&&(e.style.width=`${cr(o,n.minWidth,i)}px`,c=!0),(r<n.minHeight||r>s)&&(e.style.height=`${cr(r,n.minHeight,s)}px`,c=!0),c&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(e=>e.teardown())}}const ar=[];class Te{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(e,n){this.container=e,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=le.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=e=>{e.preventDefault(),e.stopPropagation();const{left:n,top:o,width:r,height:i}=Rt(this.container);this.x0=e.clientX,this.y0=e.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=le.bindMove(document,this.mousemove),this.unbindUp=le.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:e,top:n,right:o,bottom:r}=Rt(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=e+i.minWidth,this.maxRight=Math.min(e+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=e=>{e.preventDefault(),e.stopPropagation(),this.setPosition(e),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:e,height:n,left:o,top:r,right:i,bottom:s}=Rt(this.container),c=this.helper.options;c&&(o<this.minLeft?(this.container.style.width=e+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=e=>{e.preventDefault(),e.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const e=document.createElement("div"),n=e.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(e),e}}function cr(t,e,n){return t<e?e:t>n?n:t}ar.push(class extends Te{setPosition(t){this.container.style.width=this.width0+t.clientX-this.x0+"px",this.container.style.height=this.height0+t.clientY-this.y0+"px"}applyStyle(t){t.width=2*this.handleSize+"px",t.height=2*this.handleSize+"px",t.right=-this.handleSize+"px",t.bottom=-this.handleSize+"px",t.cursor="nwse-resize"}},class extends Te{setPosition(t){this.container.style.height=this.height0+t.clientY-this.y0+"px"}applyStyle(t){t.right=`${this.handleSize}px`,t.left=`${this.handleSize}px`,t.height=2*this.handleSize+"px",t.bottom=-this.handleSize+"px",t.cursor="ns-resize"}},class extends Te{setPosition(t){this.container.style.left=this.left0+t.clientX-this.x0+"px",this.container.style.width=this.width0-(t.clientX-this.x0)+"px",this.container.style.height=this.height0+t.clientY-this.y0+"px"}applyStyle(t){t.left=-this.handleSize+"px",t.bottom=-this.handleSize+"px",t.width=2*this.handleSize+"px",t.height=2*this.handleSize+"px",t.cursor="nesw-resize"}},class extends Te{setPosition(t){this.container.style.left=this.left0+t.clientX-this.x0+"px",this.container.style.width=this.width0-(t.clientX-this.x0)+"px"}applyStyle(t){t.left=-this.handleSize+"px",t.bottom=`${this.handleSize}px`,t.width=2*this.handleSize+"px",t.top=`${this.handleSize}px`,t.cursor="ew-resize"}},class extends Te{setPosition(t){this.container.style.left=this.left0+t.clientX-this.x0+"px",this.container.style.width=this.width0-(t.clientX-this.x0)+"px",this.container.style.top=this.top0+t.clientY-this.y0+"px",this.container.style.height=this.height0-(t.clientY-this.y0)+"px"}applyStyle(t){t.left=-this.handleSize+"px",t.top=-this.handleSize+"px",t.width=2*this.handleSize+"px",t.height=2*this.handleSize+"px",t.cursor="nwse-resize"}},class extends Te{setPosition(t){this.container.style.top=this.top0+t.clientY-this.y0+"px",this.container.style.height=this.height0-(t.clientY-this.y0)+"px"}applyStyle(t){t.left=`${this.handleSize}px`,t.right=`${this.handleSize}px`,t.height=2*this.handleSize+"px",t.top=-this.handleSize+"px",t.cursor="ns-resize"}},class extends Te{setPosition(t){this.container.style.top=this.top0+t.clientY-this.y0+"px",this.container.style.height=this.height0-(t.clientY-this.y0)+"px",this.container.style.width=this.width0+t.clientX-this.x0+"px"}applyStyle(t){t.right=-this.handleSize+"px",t.top=-this.handleSize+"px",t.height=2*this.handleSize+"px",t.width=2*this.handleSize+"px",t.cursor="nesw-resize"}},class extends Te{setPosition(t){this.container.style.width=this.width0+t.clientX-this.x0+"px"}applyStyle(t){t.right=-this.handleSize+"px",t.top=`${this.handleSize}px`,t.bottom=`${this.handleSize}px`,t.width=2*this.handleSize+"px",t.cursor="ew-resize"}});var Pt=Pe({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(t){const e=he(!1),n=he(!1);return{hover:e,active:n,style:function(){let o=t.windowStyle.button;return e.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=le.bindUp(document,()=>{n.value=!1,r()})}}}});const Za=["disabled"];Pt.render=function(t,e,n,o,r,i){return G(),ie("div",{class:"btn",style:Re(t.style()),onMouseenter:e[0]||(e[0]=s=>t.hover=!0),onMouseleave:e[1]||(e[1]=s=>t.hover=!1),onMousedown:e[2]||(e[2]=po((...s)=>t.mousedown&&t.mousedown(...s),["stop"])),onTouchstart:e[3]||(e[3]=po((...s)=>t.mousedown&&t.mousedown(...s),["stop"])),onMouseup:e[4]||(e[4]=(...s)=>t.mouseup&&t.mouseup(...s)),onTouchend:e[5]||(e[5]=(...s)=>t.mouseup&&t.mouseup(...s)),disabled:t.disabled},[J(t.$slots,"default")],44,Za)},Pt.__scopeId="data-v-71662210",Pt.__file="src/controls/vuewindow/window/Button.vue";const zn=new Set;function lr(t){return t!==null?parseFloat(t):0}function zt(t){const e=window.getComputedStyle(t),n=Math.ceil([e.paddingLeft,e.width,e.paddingRight].map(lr).reduce((r,i)=>r+i)),o=Math.ceil([e.paddingTop,e.height,e.paddingBottom].map(lr).reduce((r,i)=>r+i));return{width:n,height:o}}class hr{width;height;constructor(e,n){this.width=e,this.height=n}}function Qa(t){const e=t.windowEl;if(e){const n=parseFloat(e.style.left||"NaN"),o=parseFloat(e.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function ec(t,e,n,o){const r=t-n,i=e-o;return r*r+i*i}window.addEventListener("resize",t=>{zn.forEach(e=>{e&&at(e.fixPosition)&&e.fixPosition()})});const Mt=[];var $t=Pe({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:Pt},setup(t,{emit:e}){const n=bi();if(!n)return;const{proxy:o}=n;let r=0,i,s,c;const f=he(t.isOpen),m=()=>{Mt.push(o),c=new Ja(t.zGroup,S),t.isOpen&&function(P){P&&(Yt(()=>{r++==0&&(g(o),function(){const $=E.value,{width:D,height:U}=Pn($);let O,H;if(t.left!==void 0!=(t.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof t.left=="number")O=t.left,H=t.top;else{const Z=t.positionHint||"auto";switch(Z){case"auto":{let te=20,re=50,Q=0;do{if(Mt.every(ve=>{if(!ve.isOpen||o==ve)return!0;const nt=Qa(ve);if(nt==null)return!0;const{left:jt,top:ge}=nt;return ec(jt,ge,te,re)>16}))break;te=(te+40)%(window.innerWidth-200),re=(re+40)%(window.innerHeight-200)}while(++Q<100);O=te,H=re}break;case"center":O=(window.innerWidth-D)/2,H=(window.innerHeight-U)/2,console.log(O,H,window.innerWidth,window.innerHeight,"111111");break;default:try{const te=Z.split("/").map(Number);if(te.length!=2)throw null;const[re,Q]=te;if(!isFinite(re)||!isFinite(Q))throw null;O=re>=0?re:window.innerWidth-D+re,H=Q>=0?Q:window.innerHeight-U+Q}catch{throw new Error(`invalid position string: ${Z}`)}}}$&&($.style.left=`${O}px`,$.style.top=`${H}px`)}()),t.resizable&&u(),A(),i=new Ka(M.value,E.value,{onMove:()=>A(),onMoveStart:()=>e("move-start"),onMoveEnd:()=>e("move-end")}),t.resizable&&function(){const{height:$}=Pn(M.value);s=new Ya(E.value,{onResize:()=>u(),onResizeStart:()=>e("resize-start"),onResizeEnd:()=>e("resize-end"),minWidth:t.minWidth,minHeight:t.minHeight+$,maxWidth:t.maxWidth,maxHeight:t.maxHeight?t.maxHeight+$:void 0})}()}),t.activateWhenOpen&&T())}(!0),zn.add(o)};function S(P){_.value.zIndex=`${P}`}const E=he(null),M=he(null),B=he(null);function T(){c.raise(),e("activate")}const _=he({...t.windowStyle.window,zIndex:"auto",overflow:t.overflow}),d=Ee(()=>t.windowStyle.titlebar),p=Ee(()=>{const P={...t.windowStyle.content};return t.resizable?P.padding="0":t.padding!=null&&(P.padding=`${t.padding}px`),t.isScrollable&&(P.overflow="auto"),P});function g(P){const{width:$,height:D,top:U,left:O}=P,H=E;if(H&&$!=null&&(H.value.style.width=`${$}px`),D!=null){const Z=M.value;if(Z){const te=zt(Z).height;H.value.style.height=`${D+te}px`}}H&&O!=null&&(H.value.style.left=`${O}px`),H&&U!=null&&(H.value.style.top=`${U}px`)}function u(P=!0){const $=E.value,D=M.value,U=B.value;if(U&&$&&D){const{width:O,height:H}=zt(U),{width:Z,height:te}=zt($),re=zt(D).height,Q=Z-(U.offsetWidth-O),ve=te-re-(U.offsetHeight-H);U.style.width=`${Q}px`,U.style.height=`${ve}px`,v(),e("resize",new hr(Q,ve)),P&&(e("update:width",Q),e("update:height",ve))}}function v(){const P=E.value;if(P){const $=P.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 A(P=!0){v();const $=E.value;if($){const{left:D,top:U}=$.getBoundingClientRect();P&&(e("update:left",D),e("update:top",U))}}return Xe(()=>t.isOpen,P=>{f.value=P}),Xe(()=>t.zGroup,P=>{c.group=P}),Xe(()=>t.width,P=>{g({width:P}),u(!1)}),Xe(()=>t.height,P=>{g({height:P}),u(!1)}),Jt(()=>{m()}),_i(()=>{zn.delete(this),c.unregister(),s&&s.teardown(),i&&i.teardown(),Mt.splice(Mt.indexOf(o),1)}),{isOpen:f,windowEl:E,titlebar:M,content:B,activate:T,styleWindow:_,styleTitlebar:d,styleContent:p,closeButtonClick:function(){f.value=!1,e("closebuttonclick")},fixPosition:v}}});const tc={class:"title"};var ur;$t.render=function(t,e,n,o,r,i){const s=Qt("myButton");return G(),fe(Zt,{name:"fade",onAfterLeave:e[2]||(e[2]=c=>t.$emit("close")),onAfterEnter:e[3]||(e[3]=c=>t.$emit("open")),persisted:""},{default:xe(()=>[Si(se("div",{class:"window",style:Re(t.styleWindow),ref:"windowEl",onMousedown:e[0]||(e[0]=(...c)=>t.activate&&t.activate(...c)),onTouchstart:e[1]||(e[1]=(...c)=>t.activate&&t.activate(...c))},[se("div",{class:"titlebar",style:Re(t.styleTitlebar),ref:"titlebar"},[se("div",tc,[t.$slots.title?J(t.$slots,"title",{key:0}):(G(),ie(ze,{key:1},[en(go(t.title),1)],64))]),t.closeButton?(G(),fe(s,{key:0,windowStyle:t.windowStyle,onClick:t.closeButtonClick},{default:xe(()=>[en("\xD7")]),_:1},8,["windowStyle","onClick"])):ke("v-if",!0)],4),se("div",{class:"content",style:Re(t.styleContent),ref:"content"},[J(t.$slots,"default")],4)],36),[[Ci,t.isOpen]])]),_:3})},$t.__file="src/controls/vuewindow/window/index.vue",function(t){t[t.StyleBlack=0]="StyleBlack",t[t.StyleWhite=1]="StyleWhite",t[t.StyleMetal=2]="StyleMetal",t[t.StyleGrayblue=3]="StyleGrayblue"}(ur||(ur={}));const nc={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)"}},oc={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)"}},rc={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)"}},ic={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)"}},sc=$t;var oe;(function(t){t[t.top=0]="top",t[t.bottom=1]="bottom",t[t.centerBack=2]="centerBack",t[t.centerMain=3]="centerMain",t[t.centerFront=4]="centerFront",t[t.left=5]="left",t[t.right=6]="right"})(oe||(oe={}));class dr{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;_mapItemRefs;constructor(e,n,o,r){this.layoutState=e,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(e=>e.preload&&!e.afterid).forEach(e=>{this._loadWidget(e)})}async loadWidget(e){if(!e)return;let n;return Me(e)?n=e:ct(e)&&(n=this.widgetConfig.find(o=>o.id===e)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component().then(n=>{if(n.default){const o=Ei(n.default);this.getContainerComponents(e.container).value.set(e.id,o),this.widgetsLoadedSet.add(e.id),Yt().then(()=>{N.EventBus.emit(ue.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)})}}).catch(n=>{N.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",e),N.EventBus.emit(ue.WidgetLoadedErrorEvent,e)})}hasDependentWidgets(e){let n=!1;if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o){for(const r of o)if(this.isWidgetLoaded(r.id)){n=!0;break}}}return n}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const n=this.widgetConfig.find(o=>o.id===e);if(n){if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o)for(const r of o)this.unloadWidget(r.id)}this.getContainerComponents(n.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&this._mapItemRefs.delete(e),N.EventBus.emit(ue.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;e?(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(e){switch(e){case oe.top:return this.layoutState.topContainer;case oe.bottom:return this.layoutState.bottomContainer;case oe.left:return this.layoutState.leftContainer;case oe.right:return this.layoutState.rightContainer;case oe.centerBack:return this.layoutState.centerBackContainer;case oe.centerMain:return this.layoutState.centerMainContainer;case oe.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,n=!1){const o=this.getLayoutContainer(e);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(e,n=!1){const o=this.getWidgetComponent(e);o&&o.changeVisible&&o.changeVisible(n)}isWidgetVisible(e){const n=this.getWidgetComponent(e);return!!n&&(!n.isShow||n.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfig.find(n=>n.id===e)}getGroupWigetItems(e){return this.widgetConfig.filter(n=>n.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const n=he(new Map);return this.layoutMap.set(e,n),n}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach(n=>{e.push(n)}),e}unloadAllWidgets(e){const n=[];this.widgetsLoadedSet.forEach(o=>{e&&e.length>0?e.findIndex(r=>r===o)<0&&n.push(o):n.push(o)}),n.forEach(o=>this.unloadWidget(o))}unloadWidgets(e){e&&e.length>0&&e.forEach(n=>{this.unloadWidget(n)})}static getLayoutManager(e,n){if(n){const o=n.find(r=>r.id===e);if(o&&o.layoutID)return N.LayoutMap.get(o.layoutID)}}}var At=Pe({name:"SuspenseWithError",setup(){const t=he(null);return ki(e=>(t.value="\u5F53\u524D\u9875\u9762\u5B58\u5728\u95EE\u9898\uFF0C\u65E0\u6CD5\u6E32\u67D3\u2026\u2026",console.error("onErrorCaptured",e),!0)),{error:t}}});At.render=function(t,e,n,o,r,i){return t.error?J(t.$slots,"error",{key:0},()=>[en(go(t.error),1)]):(G(),fe(xi,{key:1},{default:xe(()=>[J(t.$slots,"default")]),fallback:xe(()=>[J(t.$slots,"fallback")]),_:3}))},At.__file="src/controls/routertransition/SuspenseWithError.vue";var Mn=Pe({name:"RouterTransition",__name:"RouterTransition",setup:t=>(e,n)=>{const o=Qt("router-view");return G(),fe(At,null,{default:xe(()=>[it(o,null,{default:xe(({Component:r,route:i})=>[it(Zt,null,{default:xe(()=>[i.meta.keepAlive?(G(),fe(Ii,{key:0},[(G(),fe(Ie(r),{key:i.name}))],1024)):(G(),fe(Ie(r),{key:i.name}))]),_:2},1024)]),_:1})]),_:1})}});Mn.__file="src/controls/routertransition/RouterTransition.vue";var Dt=Pe({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"],components:{RouterTransition:Mn},setup(t,{attrs:e,slots:n,emit:o}){const r=t.layoutID,i=he(t.enableRouterView);Xe(()=>t.enableRouterView,()=>{i.value=t.enableRouterView});const s=fo({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),c=new Map,f=new dr(s,t.widgetConfig,r,c),m=_(oe.top),S=_(oe.centerBack),E=_(oe.centerFront),M=_(oe.left),B=_(oe.right),T=_(oe.bottom);function _(p){return f?.getContainerComponents(p)}const d=Ee(()=>t.layoutStyle);return Jt(()=>{f&&(f.preloadWidgets(),r===void 0&&(N.LayoutManager=f),o("containerLoaded",{layoutID:r,layoutManager:f}))}),{...Ti(s),topContainerComponents:m,centerbackComponents:S,centerfrontComponents:E,leftContainerComponents:M,rightContainerComponents:B,bottomContainerComponents:T,containerStyle:d,isEnableRouterView:i,setItemRef:(p,g)=>{p&&c.set(g,p)}}}});const ac={ref:"topContainer",class:"topContainer"},cc={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},lc={ref:"centerBackContainer",class:"centerdiv backContainer"},hc={ref:"centerFrontContainer",class:"centerdiv centerFrontContainer"},uc={ref:"leftContainer",class:"leftContainer"},dc={ref:"rightContainer",class:"rightContainer"},fc={ref:"bottomContainer",class:"bottomContainer"};function pc(t){const e=new Mi(new st);return e.serialize(t),e.stream.toString()}function gc(t){return t==null||t===""?t:new $i(new st(t)).deserialize()}Dt.render=function(t,e,n,o,r,i){const s=Qt("router-transition");return G(),ie("div",{class:"layoutContainer",style:Re(t.containerStyle)},[se("div",ac,[J(t.$slots,"top"),(G(!0),ie(ze,null,He(t.topContainerComponents,([c,f])=>(G(),fe(Ie(f),{ref_for:!0,ref:m=>t.setItemRef(m,c),key:c}))),128))],512),se("div",null,[ke(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),t.isEnableRouterView?(G(),ie("div",cc,[J(t.$slots,"main",{},()=>[it(s)])],512)):ke("v-if",!0),ke(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),se("div",lc,[J(t.$slots,"back"),(G(!0),ie(ze,null,He(t.centerbackComponents,([c,f])=>(G(),fe(Ie(f),{ref_for:!0,ref:m=>t.setItemRef(m,c),key:c}))),128))],512),ke(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),se("div",hc,[J(t.$slots,"front"),(G(!0),ie(ze,null,He(t.centerfrontComponents,([c,f])=>(G(),fe(Ie(f),{ref_for:!0,ref:m=>t.setItemRef(m,c),key:c}))),128))],512),se("div",uc,[J(t.$slots,"left"),(G(!0),ie(ze,null,He(t.leftContainerComponents,([c,f])=>(G(),fe(Ie(f),{ref_for:!0,ref:m=>t.setItemRef(m,c),key:c}))),128))],512),se("div",dc,[J(t.$slots,"right"),(G(!0),ie(ze,null,He(t.rightContainerComponents,([c,f])=>(G(),fe(Ie(f),{ref_for:!0,ref:m=>t.setItemRef(m,c),key:c}))),128))],512)]),se("div",fc,[J(t.$slots,"bottom"),(G(!0),ie(ze,null,He(t.bottomContainerComponents,([c,f])=>(G(),fe(Ie(f),{ref_for:!0,ref:m=>t.setItemRef(m,c),key:c}))),128))],512),ke(" \u589E\u52A0\u9ED8\u8BA4\u63D2\u69FD "),J(t.$slots,"default")],4)},Dt.__scopeId="data-v-4d081e5c",Dt.__file="src/controls/layoutcontainer/layout.vue";const Lt=new Map,$n=new Map;let Nt;const mc={getDefaultClient(){if(Nt||(Nt=new Ve(SysConfig.DefaultHproseAPI)),!Nt)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Nt},registerHprose(t,e){const n=$n.get(t);if(!n){const o=new Ve(e);Lt.set(t,o)}return n},getHprose:t=>$n?.get(t),getProxyHprose:t=>Lt.get(t),unregisterHprose(t){Lt.get(t)&&($n.delete(t),Lt.delete(t))}},vc=5e3,yc=36e5,Oe={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},An="access_token",wc=N.Config.ServiceURL.LoginAuthURL;function Dn(){const t=Io();t&&be(Oe.RefreshToken,wc,{refreshToken:t}).then(e=>{Ln(e.data)})}function fr(){const t=we.getJsonObject(An);if(!t)return;const e=new Date().getTime(),n=new Date(t.expire).getTime()-e;n>0&&(n<=5e3?Dn():setTimeout(Dn,n-5e3))}function Ln(t){const e=new Date().getTime();let n=new Date(t.accessToken.expires).getTime()-e;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=Le();o?(o.token=t.accessToken.tokenContent,o.expire=t.accessToken.expires,o.refresh=t.refreshToken.tokenContent):o={token:t.accessToken.tokenContent,expire:t.accessToken.expires,refresh:t.refreshToken.tokenContent},we.set(An,o,n/1e3),fr()}else we.remove(An)}const Bt="Wm314243",Ut=N.Config.ServiceURL.LoginAuthURL;async function bc(t){const e={username:t.username,pwd:Je.encryptToString(t.pwd,Bt)},n=(await be(Oe.Login,Ut,e))?.data;return n&&Ln(n.doubletoken),n}function _c(t){const e={oldpwd:Je.encryptToString(t.oldpwd,Bt),newpwd:Je.encryptToString(t.newpwd,Bt)};return be(Oe.ChangeMyPwd,Ut,e)}function Sc(t){return Je.encryptToString(t,Bt)}function Cc(){const t=Le();t&&(Ro(Oe.Logout,Ut,{token:t.token,reftoken:t.refresh}),mn())}function Ec(t){return be(Oe.CheckToken,Ut,{token:t})}const Nn="ROLE_SYSTEM_RIGHT",Bn=new ut("",sessionStorage);function pr(){return Bn.get(Nn)}function Un(t){Bn.set(Nn,t)}function gr(){Bn.remove(Nn)}function qe(t){if(t)for(let e=0;e<t.length;e++){const n=t[e];n.children&&n.children.length>0?(qe(n.children),n.children.length===0&&(t.splice(e,1),e--)):n.selected||(t.splice(e,1),e--)}}function mr(t,e,n="name"){t&&e&&t.forEach(o=>{const r=e.find(i=>i[n]===o[n]);r&&(o.children?r.children&&mr(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function vr(t,e,n="name"){t&&e&&t.forEach(o=>{const r=e.find(i=>i[n]===o[n]);r&&(o.children?r.children&&vr(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function Qe(t,e,n,o="name"){const r=t[n],i=e[n];r?i&&vr(r,i,o):i&&(t[n]=i)}function yr(t){if(t&&t.length>0){const e=t.length;let n,o=!1;if(e>0){o=Me(t[0]);const r=o?t[0]:JSON.parse(t[0]);if(e>1)for(let i=1;i<t.length;i++){const s=t[i],c=o?s:JSON.parse(s);Qe(r,c,"routes","name"),Qe(r,c,"widgetMenu","name"),Qe(r,c,"widgets","id"),Qe(r,c,"functions","id")}n=r}return n&&(qe(n.routes),qe(n.widgetMenu),qe(n.widgets),qe(n.functions)),n}}const jn=[],On=[],Wn=[];function et(){return pr()}async function kc(t,e=!1){gr();const n=Oe.GetSystemRights,o=N.Config.ServiceURL.LoginAuthURL,r=await be(n,o,{systemid:t});if(!r||!r.data)return void N.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const i=r.data;if(i&&i.length>0){if(e){const s=JSON.parse(i[0]);return Un(s),s}{const s=yr(i);return Un(s),s}}}function wr(t,e){const n={...t};return n.meta||(n.meta={}),e.index!=null&&(n.meta.index=e.index),e.title!=null&&(n.meta.title=e.title),t.children&&(n.children=[],e.children&&e.children.forEach(o=>{const r=t.children?.find(i=>i.path===o.path);if(r){const i=wr(r,o);i&&n.children?.push(i)}})),n}function xc(t,e=2){if(e===0)return t;const n=et();return n&&n.routes?(Wn.length>0||t.forEach(o=>{const r=n.routes?.find(i=>i.name===o.name);if(r){const i=wr(o,r);i&&Wn.push(i)}}),Wn):void 0}function br(t,e){const n={...t};return e.index!=null&&(n.index=e.index),t.children&&(n.children=[],e.children&&e.children.forEach(o=>{const r=t.children?.find(i=>i.name===o.name);if(r){const i=br(r,o);i&&n.children?.push(i)}})),n}function Ic(t,e=2){if(e===0)return t;const n=et();return n&&n.widgetMenu?(On.length>0||t.forEach(o=>{const r=n.widgetMenu?.find(i=>i.name===o.name);if(r){const i=br(o,r);i&&On.push(i)}}),On):void 0}function Tc(t,e=2){if(e===0)return t;const n=et();return n&&n.widgets?(jn.length>0||t?.forEach(o=>{n.widgets?.find(r=>r.id===o.id)&&jn.push(o)}),jn):void 0}function Rc(t,e=2){if(e===0)return t;const n=et();return n?n.functions:void 0}export{Ws as BigFileDownload,pt as Download,vs as DownloadByUrl,Ae as EnumColor,Ao as FileUpload,Wa as GetSignalRClient,N as Global,mc as GlobalHprose,De as GlobalMitt,de as H5Tool,tt as HproseClient,ms as HttpDownload,yo as JsonDownload,Dt as LayoutContainer,oe as LayoutContainerEnum,dr as LayoutManager,Hs as ObjToUrlParams,nn as Pane,Ve as ProxyClient,Mn as RouterTransition,gs as SaveAs,Di as Splitpanes,ut as Storage,ht as StringUtils,nc as StyleBlack,ic as StyleGrayblue,rc as StyleMetal,oc as StyleWhite,At as SuspenseWithError,ue as SysEvents,vc as TOKEN_REFRESH_TIME,yc as TOKEN_VALID_TIMESPAN,Oe as USER_TOKEN_API,xt as VCollapsiblePanel,kt as VCollapsiblePanelGroup,$t as VWindow,ma as WaterMark,hr as WindowResizeEvent,sc as WindowType,Je as XXTEA,ps as calculateBestTextColor,_c as changeMyPWD,fr as checkDoRefreshToken,Ec as checkToken,mn as clearLocalToken,gr as clearRight,us as colorIsDark,$s as createFileUpload,ds as darken,jo as deepMerge,bo as delay,gc as deserialize,Dn as doRefreshToken,Oo as exportSystemRights,ws as get,et as getCurrentSystemRight,_s as getData,Sc as getEncryptPWD,Rc as getFunctions,is as getHexColor,Le as getLocalToken,Ns as getLockState,as as getLongHexColor,Do as getProxyClient,ss as getRGBColor,ls as getRGBColorFromHSLA,Io as getRefreshToken,pr as getRight,xc as getRoutes,kc as getSystemRoleRight,Tc as getWidgetConfig,Ic as getWidgetMenus,qe as handleNodes,hn as hexToRGB,Ds as init,Ls as initDefaultProxyClient,ae as is,sn as isArray,Oi as isAsyncFunction,Hi as isBoolean,Fi as isClient,Ui as isDate,mo as isDef,Gi as isElement,Ki as isEmpty,cs as isEnumColor,Ji as isError,at as isFunction,ft as isHexColor,Vi as isImageDom,es as isMap,rn as isNull,Ni as isNullAndUnDef,Bi as isNullOrUnDef,ji as isNumber,Me as isObjectX,Wi as isPromise,Xi as isServer,ct as isString,Qi as isSymbol,on as isUnDef,ts as isValidURL,Zi as isWeakMap,Yi as isWeakSet,qi as isWindow,As as jquery,fs as lighten,bc as login,Cc as logout,yr as mergeFilterRoleSysRight,mr as mergeNodes,Qe as mergeNodesAll,rs as newGuid,Bs as onLockListener,bs as post,be as requestGet,To as requestPost,Ro as requestPostBody,hs as rgbToHex,pc as serialize,Ln as setLocalToken,Un as setRight,ys as sleep,os as storage,we as storageHelper,Us as unLockListener,dt as uuid,Ks as verifiyNumberInteger,ra as verifyAccount,Zs as verifyAndSpace,pa as verifyCarNum,Js as verifyCnAndSpace,la as verifyEmail,Ys as verifyEnAndSpace,ua as verifyFullName,ca as verifyIPAddress,ha as verifyIdCard,ta as verifyNumberCnUppercase,Qs as verifyNumberComma,kn as verifyNumberIntegerAndFloat,Xs as verifyNumberPercentage,Vs as verifyNumberPercentageFloat,ia as verifyPassword,sa as verifyPasswordPowerful,aa as verifyPasswordStrength,na as verifyPhone,da as verifyPostalCode,oa as verifyTelPhone,ea as verifyTextColor,fa as verifyUrl,qs as writeIconifyList,Gs as writeSysRoleRight};
12
+ `,ze(n+o+"export default iconlist;","IconifyList.ts"))}function Ja(e,t){const n=Dr(e);dr(n,t),B.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function Za(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 Qa(e){let t=Zn(e);return t=t.replace(/^[1-9]\d\d{1,3}$/,"100"),t=t.replace(/^100\.$/,"100"),t}function Zn(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 tc(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 ec(e){let t=e.replace(/[\u4e00-\u9fa5\s]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function nc(e){let t=e.replace(/[a-zA-Z]+/g,"");return t=t.replace(/(^\s*)|(\s*$)/g,""),t}function oc(e){return e.replace(/(^\s*)|(\s*$)/g,"")}function rc(e){let t=Zn(e);return t=t.toString().split("."),t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t=t.join("."),t}function ic(e,t="",n="red"){return t.replace(new RegExp(e,"gi"),`<span style='color: ${n}'>${e}</span>`)}function sc(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 ac(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 cc(e){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(e)}function lc(e){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(e)}function uc(e){return!!/^[a-zA-Z]\w{5,15}$/.test(e)}function hc(e){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(e)}function dc(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 fc(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 pc(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 gc(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 mc(e){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(e)}function vc(e){return!!/^[1-9][0-9]{5}$/.test(e)}function yc(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 wc(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 Br=!0;try{String.fromCharCode.apply(String,[1,2])}catch{Br=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var Qn=2654435769;function jr(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 De(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 Bt(e){return 4294967295&e}function $e(e,t,n,o,r,i){return(n>>>5^t<<2)+(t>>>3^n<<4)^(e^t)+(i[3&o^r]^n)}function Or(e){if(e.length<16){var t=new Uint8Array(16);t.set(e),e=t}return e}function Ne(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 a=65536+((1023&i)<<10|1023&s);n[o++]=240|a>>18,n[o++]=128|a>>12&63,n[o++]=128|a>>6&63,n[o++]=128|63&a,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 Wr(e){var t=e.length;return t===0?"":t<32767?function(n,o){for(var r=new Array(o),i=0,s=0,a=n.length;i<o&&s<a;i++){var l=n[s++];switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=l;break;case 12:case 13:if(!(s<a))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&l)<<6|63&n[s++];break;case 14:if(!(s+1<a))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&l)<<12|(63&n[s++])<<6|63&n[s++];break;case 15:if(!(s+2<a))throw new Error("Unfinished UTF-8 octet sequence");var d=((7&l)<<18|(63&n[s++])<<12|(63&n[s++])<<6|63&n[s++])-65536;if(!(0<=d&&d<=1048575))throw new Error("Character outside valid Unicode range: 0x"+d.toString(16));r[i++]=d>>10&1023|55296,r[i]=1023&d|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+l.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,a=0,l=n.length;s<o&&a<l;s++){var d=n[a++];switch(d>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[s]=d;break;case 12:case 13:if(!(a<l))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&d)<<6|63&n[a++];break;case 14:if(!(a+1<l))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(15&d)<<12|(63&n[a++])<<6|63&n[a++];break;case 15:if(!(a+2<l))throw new Error("Unfinished UTF-8 octet sequence");var w=((7&d)<<18|(63&n[a++])<<12|(63&n[a++])<<6|63&n[a++])-65536;if(!(0<=w&&w<=1048575))throw new Error("Character outside valid Unicode range: 0x"+w.toString(16));i[s++]=w>>10&1023|55296,i[s]=1023&w|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+d.toString(16))}if(s>=32766){var _=s+1;i.length=_,r.push(String.fromCharCode.apply(String,i)),o-=_,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(e,t)}function bc(e){var t=e.length;if(t===0)return"";var n=Br?e:function(a){for(var l=a.length,d=new Array(a.length),w=0;w<l;++w)d[w]=a[w];return d}(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 Ur(e,t){return typeof e=="string"&&(e=Ne(e)),typeof t=="string"&&(t=Ne(t)),e==null||e.length===0?e:jr(function(n,o){var r,i,s,a,l,d,w=n.length,_=w-1;for(i=n[_],s=0,d=0|Math.floor(6+52/w);d>0;--d){for(a=(s=Bt(s+Qn))>>>2&3,l=0;l<_;++l)r=n[l+1],i=n[l]=Bt(n[l]+$e(s,r,i,l,a,o));r=n[0],i=n[_]=Bt(n[_]+$e(s,r,i,_,a,o))}return n}(De(e,!0),De(Or(t),!1)),!1)}function Fr(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=Ne(t)),e==null||e.length===0?e:jr(function(n,o){var r,i,s,a,l,d=n.length,w=d-1;for(r=n[0],s=Bt(Math.floor(6+52/d)*Qn);s!==0;s=Bt(s-Qn)){for(a=s>>>2&3,l=w;l>0;--l)i=n[l-1],r=n[l]=Bt(n[l]-$e(s,r,i,l,a,o));i=n[w],r=n[0]=Bt(n[0]-$e(s,r,i,0,a,o))}return n}(De(e,!1),De(Or(t),!1)),!0)}const ie={toBytes:Ne,toString:Wr,encrypt:Ur,encryptToString:function(e,t){return window.btoa(bc(Ur(e,t)))},decrypt:Fr,decryptToString:function(e,t){return Wr(Fr(e,t))}},Hr=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},_c={set:e=>{let t=Hr(e);document.getElementById(t)===null&&(t=Hr(e))},del:()=>{let e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e))}};class jt extends Error{constructor(t,n){const o=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=o}}class to extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class wt extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class Sc extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=o}}class Cc extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=o}}class Ec extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=o}}class qr extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class xc extends Error{constructor(t,n){const o=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=o}}class Xr{constructor(t,n,o){this.statusCode=t,this.statusText=n,this.content=o}}class Be{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 k;(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"})(k||(k={}));class se{constructor(){}log(t,n){}}se.instance=new se;class nt{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 tt{static get isBrowser(){return!tt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!tt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!tt.isNode&&typeof window=="object"&&window.document===void 0}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function ae(e,t){let n="";return Ot(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 Ot(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function Vr(e,t,n,o,r,i){const s={},[a,l]=Kt();s[a]=l,e.log(k.Trace,`(${t} transport) sending data. ${ae(r,i.logMessageContent)}.`);const d=Ot(r)?"arraybuffer":"text",w=await n.post(o,{content:r,headers:{...s,...i.headers},responseType:d,timeout:i.timeout,withCredentials:i.withCredentials});e.log(k.Trace,`(${t} transport) request complete. Response status: ${w.statusCode}.`)}class kc{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 je{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const o=`[${new Date().toISOString()}] ${k[t]}: ${n}`;switch(t){case k.Critical:case k.Error:this.out.error(o);break;case k.Warning:this.out.warn(o);break;case k.Information:this.out.info(o);break;default:this.out.log(o)}}}}function Kt(){let e="X-SignalR-User-Agent";return tt.isNode&&(e="User-Agent"),[e,Ic("8.0.7",Tc(),Mc(),Rc())]}function Ic(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 Tc(){if(!tt.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function Rc(){if(tt.isNode)return process.versions.node}function Mc(){return tt.isNode?"NodeJS":"Browser"}function eo(e){return e.stack?e.stack:e.message?e.message:`${e}`}class Pc extends Be{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||tt.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=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 wt;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 wt});let r,i=null;if(t.timeout){const l=t.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(k.Warning,"Timeout from HTTP request."),o=new to},l)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Ot(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(l){throw o||(this._logger.log(k.Warning,`Error from HTTP request. ${l}.`),l)}finally{i&&clearTimeout(i),t.abortSignal&&(t.abortSignal.onabort=null)}if(!r.ok){const l=await Gr(r,"text");throw new jt(l||r.statusText,r.status)}const s=Gr(r,t.responseType),a=await s;return new Xr(r.status,r.statusText,a)}getCookieString(t){let n="";return tt.isNode&&this._jar&&this._jar.getCookies(t,(o,r)=>n=r.join("; ")),n}}function Gr(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 zc extends Be{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new wt):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&&(Ot(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 wt)}),t.timeout&&(r.timeout=t.timeout),r.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),r.status>=200&&r.status<300?n(new Xr(r.status,r.statusText,r.response||r.responseText)):o(new jt(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(k.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),o(new jt(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(k.Warning,"Timeout from HTTP request."),o(new to)},r.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Lc extends Be{constructor(t){if(super(),typeof fetch<"u"||tt.isNode)this._httpClient=new Pc(t);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new zc(t)}}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new wt):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 gt{static write(t){return`${t}${gt.RecordSeparator}`}static parse(t){if(t[t.length-1]!==gt.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(gt.RecordSeparator);return n.pop(),n}}gt.RecordSeparatorCode=30,gt.RecordSeparator=String.fromCharCode(gt.RecordSeparatorCode);class Ac{writeHandshakeRequest(t){return gt.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,o;if(Ot(t)){const s=new Uint8Array(t),a=s.indexOf(gt.RecordSeparatorCode);if(a===-1)throw new Error("Message is incomplete.");const l=a+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,l))),o=s.byteLength>l?s.slice(l).buffer:null}else{const s=t,a=s.indexOf(gt.RecordSeparator);if(a===-1)throw new Error("Message is incomplete.");const l=a+1;n=s.substring(0,l),o=s.length>l?s.substring(l):null}const r=gt.parse(n),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var F;(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",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(F||(F={}));class Dc{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 kc(this,t)}}class $c{constructor(t,n,o){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=n,this._bufferSize=o}async _send(t){const n=this._protocol.writeMessage(t);let o=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let r=()=>{},i=()=>{};Ot(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((s,a)=>{r=s,i=a})),this._messages.push(new Nc(n,this._totalMessageCount,r,i))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await o}_ack(t){let n=-1;for(let o=0;o<this._messages.length;o++){const r=this._messages[o];if(r._id<=t.sequenceId)n=o,Ot(r._message)?this._bufferedByteCount-=r._message.byteLength:this._bufferedByteCount-=r._message.length,r._resolver();else{if(!(this._bufferedByteCount<this._bufferSize))break;r._resolver()}}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type===F.Sequence&&(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(t){t.sequenceId>this._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:F.Sequence,sequenceId:t}));const n=this._messages;for(const o of n)await this._connection.send(o._message);this._reconnectInProgress=!1}_dispose(t){t!=null||(t=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(t)}_isInvocationMessage(t){switch(t.type){case F.Invocation:case F.StreamItem:case F.Completion:case F.StreamInvocation:case F.CancelInvocation:return!0;case F.Close:case F.Sequence:case F.Ping:case F.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:F.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class Nc{constructor(t,n,o,r){this._message=t,this._id=n,this._resolver=o,this._rejector=r}}var J;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(J||(J={}));class Ao{static create(t,n,o,r,i,s,a){return new Ao(t,n,o,r,i,s,a)}constructor(t,n,o,r,i,s,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(k.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://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},nt.isRequired(t,"connection"),nt.isRequired(n,"logger"),nt.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=i??3e4,this.keepAliveIntervalInMilliseconds=s??15e3,this._statefulReconnectBufferSize=a??1e5,this._logger=n,this._protocol=o,this.connection=t,this._reconnectPolicy=r,this._handshakeProtocol=new Ac,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=J.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:F.Ping})}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!==J.Disconnected&&this._connectionState!==J.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!==J.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=J.Connecting,this._logger.log(k.Debug,"Starting HubConnection.");try{await this._startInternal(),tt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=J.Connected,this._connectionStarted=!0,this._logger.log(k.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=J.Disconnected,this._logger.log(k.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{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const o={protocol:this._protocol.name,version:n};if(this._logger.log(k.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)),this._logger.log(k.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.reconnect&&(this._messageBuffer=new $c(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(k.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.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===J.Disconnected)return this._logger.log(k.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===J.Disconnecting)return this._logger.log(k.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=J.Disconnecting,this._logger.log(k.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(k.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===J.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new wt("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...n){const[o,r]=this._replaceStreamingParams(n),i=this._createStreamInvocation(t,n,r);let s;const a=new Dc;return a.cancelCallback=()=>{const l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,d)=>{d?a.error(d):l&&(l.type===F.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},s=this._sendWithProtocol(i).catch(l=>{a.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(o,s),a}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):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((a,l)=>{this._callbacks[i.invocationId]=(w,_)=>{_?l(_):w&&(w.type===F.Completion?w.error?l(new Error(w.error)):a(w.result):l(new Error(`Unexpected message type: ${w.type}`)))};const d=this._sendWithProtocol(i).catch(w=>{l(w),delete this._callbacks[i.invocationId]});this._launchStreams(o,d)})}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)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(o))switch(o.type){case F.Invocation:this._invokeClientMethod(o).catch(r=>{this._logger.log(k.Error,`Invoke client method threw error: ${eo(r)}`)});break;case F.StreamItem:case F.Completion:{const r=this._callbacks[o.invocationId];if(r){o.type===F.Completion&&delete this._callbacks[o.invocationId];try{r(o)}catch(i){this._logger.log(k.Error,`Stream callback threw error: ${eo(i)}`)}}break}case F.Ping:break;case F.Close:{this._logger.log(k.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}case F.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case F.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(k.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(k.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(k.Error,r);const i=new Error(r);throw this._handshakeRejecter(i),i}return this._logger.log(k.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===J.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(k.Warning,`No client method with the name '${n}' found.`),void(t.invocationId&&(this._logger.log(k.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,a,l;for(const d of r)try{const w=s;s=await d.apply(this,t.arguments),i&&s&&w&&(this._logger.log(k.Error,`Multiple results provided for '${n}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),a=void 0}catch(w){a=w,this._logger.log(k.Error,`A callback for the method '${n}' threw error '${w}'.`)}l?await this._sendWithProtocol(l):i?(a?l=this._createCompletionMessage(t.invocationId,`${a}`,null):s!==void 0?l=this._createCompletionMessage(t.invocationId,null,s):(this._logger.log(k.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):s&&this._logger.log(k.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(k.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new wt("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===J.Disconnecting?this._completeClose(t):this._connectionState===J.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===J.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=J.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),tt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(k.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(k.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(t);if(this._connectionState=J.Reconnecting,t?this._logger.log(k.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(k.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[t]))}catch(s){this._logger.log(k.Error,`An onreconnecting callback called with error '${t}' threw error '${s}'.`)}if(this._connectionState!==J.Reconnecting)return void this._logger.log(k.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;i!==null;){if(this._logger.log(k.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!==J.Reconnecting)return void this._logger.log(k.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=J.Connected,this._logger.log(k.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(k.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(k.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==J.Reconnecting)return this._logger.log(k.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===J.Disconnecting&&this._completeClose());r=s instanceof Error?s:new Error(s.toString()),i=this._getNextRetryDelay(o++,Date.now()-n,r)}}this._logger.log(k.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(k.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(k.Error,`Stream 'error' callback called with '${t}' threw error: ${eo(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:F.Invocation}:{arguments:n,target:t,type:F.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:n,invocationId:i.toString(),streamIds:r,target:t,type:F.Invocation}:{arguments:n,invocationId:i.toString(),target:t,type:F.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:F.StreamInvocation}:{arguments:n,invocationId:r.toString(),target:t,type:F.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:F.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:F.StreamItem}}_createCompletionMessage(t,n,o){return n?{error:n,invocationId:t,type:F.Completion}:{invocationId:t,result:o,type:F.Completion}}_createCloseMessage(){return{type:F.Close}}}const Bc=[0,2e3,1e4,3e4,null];class Kr{constructor(t){this._retryDelays=t!==void 0?[...t,null]:Bc}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Wt{}Wt.Authorization="Authorization",Wt.Cookie="Cookie";class jc extends Be{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[Wt.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Wt.Authorization]&&delete t.headers[Wt.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var ot,lt;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(ot||(ot={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(lt||(lt={}));class Oc{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 Yr{get pollAborted(){return this._pollAbort.aborted}constructor(t,n,o){this._httpClient=t,this._logger=n,this._pollAbort=new Oc,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,n){if(nt.isRequired(t,"url"),nt.isRequired(n,"transferFormat"),nt.isIn(n,lt,"transferFormat"),this._url=t,this._logger.log(k.Trace,"(LongPolling transport) Connecting."),n===lt.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]=Kt(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};n===lt.Binary&&(s.responseType="arraybuffer");const a=`${t}&_=${Date.now()}`;this._logger.log(k.Trace,`(LongPolling transport) polling: ${a}.`);const l=await this._httpClient.get(a,s);l.statusCode!==200?(this._logger.log(k.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new jt(l.statusText||"",l.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(k.Trace,`(LongPolling transport) polling: ${o}.`);const r=await this._httpClient.get(o,n);r.statusCode===204?(this._logger.log(k.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):r.statusCode!==200?(this._logger.log(k.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new jt(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(k.Trace,`(LongPolling transport) data received. ${ae(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(k.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof to?this._logger.log(k.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(k.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(k.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?Vr(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(k.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(k.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,o]=Kt();t[n]=o;const r={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let i;try{await this._httpClient.delete(this._url,r)}catch(s){i=s}i?i instanceof jt&&(i.statusCode===404?this._logger.log(k.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(k.Trace,`(LongPolling transport) Error sending a DELETE request: ${i}`)):this._logger.log(k.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(k.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(k.Trace,t),this.onclose(this._closeError)}}}class Wc{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 nt.isRequired(t,"url"),nt.isRequired(n,"transferFormat"),nt.isIn(n,lt,"transferFormat"),this._logger.log(k.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===lt.Text){if(tt.isBrowser||tt.isWebWorker)i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(t),l={};l.Cookie=a;const[d,w]=Kt();l[d]=w,i=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...l,...this._options.headers}})}try{i.onmessage=a=>{if(this.onreceive)try{this._logger.log(k.Trace,`(SSE transport) data received. ${ae(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){return void this._close(l)}},i.onerror=a=>{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(k.Information,`SSE connected to ${this._url}`),this._eventSource=i,s=!0,o()}}catch(a){return void r(a)}}else r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})}async send(t){return this._eventSource?Vr(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 Uc{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 nt.isRequired(t,"url"),nt.isRequired(n,"transferFormat"),nt.isIn(n,lt,"transferFormat"),this._logger.log(k.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(o=await this._accessTokenFactory()),new Promise((r,i)=>{let s;t=t.replace(/^http/,"ws");const a=this._httpClient.getCookieString(t);let l=!1;if(tt.isNode||tt.isReactNative){const d={},[w,_]=Kt();d[w]=_,o&&(d[Wt.Authorization]=`Bearer ${o}`),a&&(d[Wt.Cookie]=a),s=new this._webSocketConstructor(t,void 0,{headers:{...d,...this._headers}})}else o&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(t)),n===lt.Binary&&(s.binaryType="arraybuffer"),s.onopen=d=>{this._logger.log(k.Information,`WebSocket connected to ${t}.`),this._webSocket=s,l=!0,r()},s.onerror=d=>{let w=null;w=typeof ErrorEvent<"u"&&d instanceof ErrorEvent?d.error:"There was an error with the transport",this._logger.log(k.Information,`(WebSockets transport) ${w}.`)},s.onmessage=d=>{if(this._logger.log(k.Trace,`(WebSockets transport) data received. ${ae(d.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(d.data)}catch(w){return void this._close(w)}},s.onclose=d=>{if(l)this._close(d);else{let w=null;w=typeof ErrorEvent<"u"&&d instanceof ErrorEvent?d.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(w))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(k.Trace,`(WebSockets transport) sending data. ${ae(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(k.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 Fc{constructor(t,n={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,nt.isRequired(t,"url"),this._logger=(o=n.logger)===void 0?new je(k.Information):o===null?se.instance:o.log!==void 0?o:new je(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(tt.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),i=s("eventsource")}tt.isNode||typeof WebSocket>"u"||n.WebSocket?tt.isNode&&!n.WebSocket&&r&&(n.WebSocket=r):n.WebSocket=WebSocket,tt.isNode||typeof EventSource>"u"||n.EventSource?tt.isNode&&!n.EventSource&&i!==void 0&&(n.EventSource=i):n.EventSource=EventSource,this._httpClient=new jc(n.httpClient||new Lc(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||lt.Binary,nt.isIn(t,lt,"transferFormat"),this._logger.log(k.Debug,`Starting connection with transfer format '${lt[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(k.Error,n),await this._stopPromise,Promise.reject(new wt(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(k.Error,n),Promise.reject(new wt(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 Do(this.transport)),this._sendQueue.send(t))}async stop(t){return this._connectionState==="Disconnected"?(this._logger.log(k.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):this._connectionState==="Disconnecting"?(this._logger.log(k.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(k.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(k.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!==ot.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(ot.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 wt("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 Yr&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(k.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(k.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]=Kt();n[o]=r;const i=this._resolveNegotiateUrl(t);this._logger.log(k.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 a=JSON.parse(s.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new qr("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(s){let a="Failed to complete negotiation with the server: "+s;return s instanceof jt&&s.statusCode===404&&(a+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(k.Error,a),Promise.reject(new qr(a))}}_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(k.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=[],a=o.availableTransports||[];let l=o;for(const d of a){const w=this._resolveTransportOrError(d,n,r,l?.useStatefulReconnect===!0);if(w instanceof Error)s.push(`${d.transport} failed:`),s.push(w);else if(this._isITransport(w)){if(this.transport=w,!l){try{l=await this._getNegotiationResponse(t)}catch(_){return Promise.reject(_)}i=this._createConnectUrl(t,l.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=l.connectionId)}catch(_){if(this._logger.log(k.Error,`Failed to start the transport '${d.transport}': ${_}`),l=void 0,s.push(new Ec(`${d.transport} failed: ${_}`,ot[d.transport])),this._connectionState!=="Connecting"){const x="Failed to select transport before stop() was called.";return this._logger.log(k.Debug,x),Promise.reject(new wt(x))}}}}return s.length>0?Promise.reject(new xc(`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 ot.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Uc(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case ot.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Wc(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case ot.LongPolling:return new Yr(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async o=>{let r=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(t,n),await this.features.resend()}catch{r=!0}r&&this._stopConnection(o)}else this._stopConnection(o)}:this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(t,n)}_resolveTransportOrError(t,n,o,r){const i=ot[t.transport];if(i==null)return this._logger.log(k.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(s,a){return!s||(a&s)!=0}(n,i))return this._logger.log(k.Debug,`Skipping transport '${ot[i]}' because it was disabled by the client.`),new Cc(`'${ot[i]}' is disabled by the client.`,i);{if(!(t.transferFormats.map(a=>lt[a]).indexOf(o)>=0))return this._logger.log(k.Debug,`Skipping transport '${ot[i]}' because it does not support the requested transfer format '${lt[o]}'.`),new Error(`'${ot[i]}' does not support ${lt[o]}.`);if(i===ot.WebSockets&&!this._options.WebSocket||i===ot.ServerSentEvents&&!this._options.EventSource)return this._logger.log(k.Debug,`Skipping transport '${ot[i]}' because it is not supported in your environment.'`),new Sc(`'${ot[i]}' is not supported in your environment.`,i);this._logger.log(k.Debug,`Selecting transport '${ot[i]}'.`);try{return this.features.reconnect=i===ot.WebSockets?r:void 0,this._constructTransport(i)}catch(a){return a}}}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(k.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(k.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(k.Error,`Connection disconnected with error '${t}'.`):this._logger.log(k.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(k.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(k.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}else this._logger.log(k.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(!tt.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(k.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=new URL(t);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const o=new URLSearchParams(n.searchParams);return o.has("negotiateVersion")||o.append("negotiateVersion",this._negotiateVersion.toString()),o.has("useStatefulReconnect")?o.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&o.append("useStatefulReconnect","true"),n.search=o.toString(),n.toString()}}class Do{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Oe,this._transportResult=new Oe,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Oe),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 Oe;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Do._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 Oe{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}class Hc{constructor(){this.name="json",this.version=2,this.transferFormat=lt.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=se.instance);const o=gt.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 F.Invocation:this._isInvocationMessage(s);break;case F.StreamItem:this._isStreamItemMessage(s);break;case F.Completion:this._isCompletionMessage(s);break;case F.Ping:case F.Close:break;case F.Ack:this._isAckMessage(s);break;case F.Sequence:this._isSequenceMessage(s);break;default:n.log(k.Information,"Unknown message type '"+s.type+"' ignored.");continue}r.push(s)}return r}writeMessage(t){return gt.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.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const qc={trace:k.Trace,debug:k.Debug,info:k.Information,information:k.Information,warn:k.Warning,warning:k.Warning,error:k.Error,critical:k.Critical,none:k.None};class Xc{configureLogging(t){if(nt.isRequired(t,"logging"),t.log!==void 0)this.logger=t;else if(typeof t=="string"){const n=function(o){const r=qc[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(t);this.logger=new je(n)}else this.logger=new je(t);return this}withUrl(t,n){return nt.isRequired(t,"url"),nt.isNotEmpty(t,"url"),this.url=t,this.httpConnectionOptions=typeof n=="object"?{...this.httpConnectionOptions,...n}:{...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return nt.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 Kr(t):this.reconnectPolicy=t:this.reconnectPolicy=new Kr,this}withServerTimeout(t){return nt.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return nt.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,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 Fc(this.url,t);return Ao.create(n,this.logger||se.instance,this.protocol||new Hc,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}let We;function Vc(e){if(!e){if(We)return We;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const t=new Xc().configureLogging(k.Information).withUrl(e).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return t.keepAliveIntervalInMilliseconds=15e3,t.serverTimeoutInMilliseconds=18e5,t.start().then(()=>{B.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),t.onclose(async()=>{B.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),t.onreconnecting(()=>{B.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),t.onreconnected(()=>{B.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),We||(We=t),t}const no=new Set;function Jr(e){return e!==null?parseFloat(e):0}function Ue(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(Jr).reduce((r,i)=>r+i)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(Jr).reduce((r,i)=>r+i));return{width:n,height:o}}class Zr{width;height;constructor(t,n){this.width=t,this.height=n}}function Gc(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 Kc(e,t,n,o){const r=e-n,i=t-o;return r*r+i*i}window.addEventListener("resize",e=>{no.forEach(t=>{t&&ke(t.fixPosition)&&t.fixPosition()})});const Fe=[];var He=Mt({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:xe},setup(e,{emit:t}){const n=ws();if(!n)return;const{proxy:o}=n;let r=0,i,s,a;const l=K(e.isOpen),d=()=>{Fe.push(o),a=new js(e.zGroup,w),e.isOpen&&function(A){A&&(nr(()=>{r++==0&&(v(o),function(){const D=_.value,{width:$,height:j}=Rn(D);let U,T;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")U=e.left,T=e.top;else{const O=e.positionHint||"auto";switch(O){case"auto":{let q=20,rt=50,Z=0;do{if(Fe.every(Q=>{if(!Q.isOpen||o==Q)return!0;const bt=Gc(Q);if(bt==null)return!0;const{left:Ht,top:et}=bt;return Kc(Ht,et,q,rt)>16}))break;q=(q+40)%(window.innerWidth-200),rt=(rt+40)%(window.innerHeight-200)}while(++Z<100);U=q,T=rt}break;case"center":U=(window.innerWidth-$)/2,T=(window.innerHeight-j)/2,console.log(U,T,window.innerWidth,window.innerHeight,"111111");break;default:try{const q=O.split("/").map(Number);if(q.length!=2)throw null;const[rt,Z]=q;if(!isFinite(rt)||!isFinite(Z))throw null;U=rt>=0?rt:window.innerWidth-$+rt,T=Z>=0?Z:window.innerHeight-j+Z}catch{throw new Error(`invalid position string: ${O}`)}}}D&&(D.style.left=`${U}px`,D.style.top=`${T}px`)}()),e.resizable&&h(),L(),i=new Bs(x.value,_.value,{onMove:()=>L(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:D}=Rn(x.value);s=new Os(_.value,{onResize:()=>h(),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),no.add(o)};function w(A){y.value.zIndex=`${A}`}const _=K(null),x=K(null),P=K(null);function I(){a.raise(),t("activate")}const y=K({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=Vt(()=>e.windowStyle.titlebar),p=Vt(()=>{const A={...e.windowStyle.content};return e.resizable?A.padding="0":e.padding!=null&&(A.padding=`${e.padding}px`),e.isScrollable&&(A.overflow="auto"),A});function v(A){const{width:D,height:$,top:j,left:U}=A,T=_;if(T&&D!=null&&(T.value.style.width=`${D}px`),$!=null){const O=x.value;if(O){const q=Ue(O).height;T.value.style.height=`${$+q}px`}}T&&U!=null&&(T.value.style.left=`${U}px`),T&&j!=null&&(T.value.style.top=`${j}px`)}function h(A=!0){const D=_.value,$=x.value,j=P.value;if(j&&D&&$){const{width:U,height:T}=Ue(j),{width:O,height:q}=Ue(D),rt=Ue($).height,Z=O-(j.offsetWidth-U),Q=q-rt-(j.offsetHeight-T);j.style.width=`${Z}px`,j.style.height=`${Q}px`,f(),t("resize",new Zr(Z,Q)),A&&(t("update:width",Z),t("update:height",Q))}}function f(){const A=_.value;if(A){const D=A.getBoundingClientRect();D.left<0&&(y.value.left="0px"),D.top<0&&(y.value.top="0px"),D.right>window.innerWidth&&(y.value.left=window.innerWidth-D.width+"px"),D.bottom>window.innerHeight&&(y.value.top=window.innerHeight-D.height+"px")}}function L(A=!0){f();const D=_.value;if(D){const{left:$,top:j}=D.getBoundingClientRect();A&&(t("update:left",$),t("update:top",j))}}return Pt(()=>e.isOpen,A=>{l.value=A}),Pt(()=>e.zGroup,A=>{a.group=A}),Pt(()=>e.width,A=>{v({width:A}),h(!1)}),Pt(()=>e.height,A=>{v({height:A}),h(!1)}),wn(()=>{d()}),bs(()=>{no.delete(this),a.unregister(),s&&s.teardown(),i&&i.teardown(),Fe.splice(Fe.indexOf(o),1)}),{isOpen:l,windowEl:_,titlebar:x,content:P,activate:I,styleWindow:y,styleTitlebar:u,styleContent:p,closeButtonClick:function(){l.value=!1,t("closebuttonclick")},fixPosition:f}}});const Yc={class:"title"};var Qr;He.render=function(e,t,n,o,r,i){const s=bn("myButton");return X(),at(_n,{name:"fade",onAfterLeave:t[2]||(t[2]=a=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=a=>e.$emit("open")),persisted:""},{default:It(()=>[or(Y("div",{class:"window",style:Xt(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...a)=>e.activate&&e.activate(...a)),onTouchstart:t[1]||(t[1]=(...a)=>e.activate&&e.activate(...a))},[Y("div",{class:"titlebar",style:Xt(e.styleTitlebar),ref:"titlebar"},[Y("div",Yc,[e.$slots.title?st(e.$slots,"title",{key:0}):(X(),pt(zt,{key:1},[Sn(Cn(e.title),1)],64))]),e.closeButton?(X(),at(s,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:It(()=>[Sn("\xD7")]),_:1},8,["windowStyle","onClick"])):mt("v-if",!0)],4),Y("div",{class:"content",style:Xt(e.styleContent),ref:"content"},[st(e.$slots,"default")],4)],36),[[rr,e.isOpen]])]),_:3})},He.__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"}(Qr||(Qr={}));const Jc={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)"}},Zc={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)"}},Qc={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)"}},tl={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)"}},el=He;var ut;(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"})(ut||(ut={}));class ti{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;if(Lt(t)?n=t:Ie(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n){if(n.afterid){if(this.isWidgetLoaded(n.afterid))return this._loadWidget(n);{let o=function(a){a.layoutID===r._LayoutID&&a.widgetID===i&&(r._loadWidget(s),B.EventBus.off(ct.WidgetLoadedEvent,o))};const r=this,i=n.afterid,s=n;return B.EventBus.on(ct.WidgetLoadedEvent,o),this.loadWidget(n.afterid)}}return this._loadWidget(n)}}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=_s(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),nr().then(()=>{B.EventBus.emit(ct.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}}).catch(n=>{B.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",t),B.EventBus.emit(ct.WidgetLoadedErrorEvent,t)});this.changeWidgetVisible(t.id,!0)}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),B.EventBus.emit(ct.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 ut.top:return this.layoutState.topContainer;case ut.bottom:return this.layoutState.bottomContainer;case ut.left:return this.layoutState.leftContainer;case ut.right:return this.layoutState.rightContainer;case ut.centerBack:return this.layoutState.centerBackContainer;case ut.centerMain:return this.layoutState.centerMainContainer;case ut.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=K(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)})}static getLayoutManager(t,n){if(n){const o=n.find(r=>r.id===t);if(o&&o.layoutID)return B.LayoutMap.get(o.layoutID)}}}var qe=Mt({name:"SuspenseWithError",setup(){const e=K(null);return Ss(t=>(e.value="\u5F53\u524D\u9875\u9762\u5B58\u5728\u95EE\u9898\uFF0C\u65E0\u6CD5\u6E32\u67D3\u2026\u2026",console.error("onErrorCaptured",t),!0)),{error:e}}});qe.render=function(e,t,n,o,r,i){return e.error?st(e.$slots,"error",{key:0},()=>[Sn(Cn(e.error),1)]):(X(),at(Cs,{key:1},{default:It(()=>[st(e.$slots,"default")]),fallback:It(()=>[st(e.$slots,"fallback")]),_:3}))},qe.__file="src/controls/routertransition/SuspenseWithError.vue";var oo=Mt({name:"RouterTransition",__name:"RouterTransition",setup:e=>(t,n)=>{const o=bn("router-view");return X(),at(qe,null,{default:It(()=>[En(o,null,{default:It(({Component:r,route:i})=>[En(_n,null,{default:It(()=>[i.meta.keepAlive?(X(),at(Es,{key:0},[(X(),at(Tt(r),{key:i.name}))],1024)):(X(),at(Tt(r),{key:i.name}))]),_:2},1024)]),_:1})]),_:1})}});oo.__file="src/controls/routertransition/RouterTransition.vue";var Xe=Mt({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"],components:{RouterTransition:oo},setup(e,{attrs:t,slots:n,emit:o}){const r=e.layoutID,i=K(e.enableRouterView);Pt(()=>e.enableRouterView,()=>{i.value=e.enableRouterView});const s=xs({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),a=new Map,l=new ti(s,e.widgetConfig,r,a),d=y(ut.top),w=y(ut.centerBack),_=y(ut.centerFront),x=y(ut.left),P=y(ut.right),I=y(ut.bottom);function y(p){return l?.getContainerComponents(p)}const u=Vt(()=>e.layoutStyle);return wn(()=>{l&&(r?B.LayoutMap.set(r,l):(B.LayoutManager=l,B.LayoutMap.set("",l)),l.preloadWidgets(),o("containerLoaded",{layoutID:r,layoutManager:l}),B.EventBus.emit(ct.LayoutContainerLoaded,{layoutID:r,layoutManager:l}))}),{...ks(s),topContainerComponents:d,centerbackComponents:w,centerfrontComponents:_,leftContainerComponents:x,rightContainerComponents:P,bottomContainerComponents:I,containerStyle:u,isEnableRouterView:i,setItemRef:(p,v)=>{p&&a.set(v,p)}}}});const nl={ref:"topContainer",class:"topContainer"},ol={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},rl={ref:"centerBackContainer",class:"centerdiv backContainer"},il={ref:"centerFrontContainer",class:"centerdiv centerFrontContainer"},sl={ref:"leftContainer",class:"leftContainer"},al={ref:"rightContainer",class:"rightContainer"},cl={ref:"bottomContainer",class:"bottomContainer"};Xe.render=function(e,t,n,o,r,i){const s=bn("router-transition");return X(),pt("div",{class:"layoutContainer",style:Xt(e.containerStyle)},[Y("div",nl,[st(e.$slots,"top"),(X(!0),pt(zt,null,Gt(e.topContainerComponents,([a,l])=>(X(),at(Tt(l),{ref_for:!0,ref:d=>e.setItemRef(d,a),key:a}))),128))],512),Y("div",null,[mt(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(X(),pt("div",ol,[st(e.$slots,"main",{},()=>[En(s)])],512)):mt("v-if",!0),mt(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),Y("div",rl,[st(e.$slots,"back"),(X(!0),pt(zt,null,Gt(e.centerbackComponents,([a,l])=>(X(),at(Tt(l),{ref_for:!0,ref:d=>e.setItemRef(d,a),key:a}))),128))],512),mt(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),Y("div",il,[st(e.$slots,"front"),(X(!0),pt(zt,null,Gt(e.centerfrontComponents,([a,l])=>(X(),at(Tt(l),{ref_for:!0,ref:d=>e.setItemRef(d,a),key:a}))),128))],512),Y("div",sl,[st(e.$slots,"left"),(X(!0),pt(zt,null,Gt(e.leftContainerComponents,([a,l])=>(X(),at(Tt(l),{ref_for:!0,ref:d=>e.setItemRef(d,a),key:a}))),128))],512),Y("div",al,[st(e.$slots,"right"),(X(!0),pt(zt,null,Gt(e.rightContainerComponents,([a,l])=>(X(),at(Tt(l),{ref_for:!0,ref:d=>e.setItemRef(d,a),key:a}))),128))],512)]),Y("div",cl,[st(e.$slots,"bottom"),(X(!0),pt(zt,null,Gt(e.bottomContainerComponents,([a,l])=>(X(),at(Tt(l),{ref_for:!0,ref:d=>e.setItemRef(d,a),key:a}))),128))],512),mt(" \u589E\u52A0\u9ED8\u8BA4\u63D2\u69FD "),st(e.$slots,"default")],4)},Xe.__scopeId="data-v-4d081e5c",Xe.__file="src/controls/layoutcontainer/layout.vue";const ce=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ve=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const a=r.pop(),l=r.pop(),d={provider:r.length>0?r[0]:o,prefix:l,name:a};return t&&!Ge(d)?null:d}const i=r[0],s=i.split("-");if(s.length>1){const a={provider:o,prefix:s.shift(),name:s.join("-")};return t&&!Ge(a)?null:a}if(n&&o===""){const a={provider:o,prefix:"",name:i};return t&&!Ge(a,n)?null:a}return null},Ge=(e,t)=>!!e&&!(e.provider!==""&&!e.provider.match(ce)||!(t&&e.prefix===""||e.prefix.match(ce))||!e.name.match(ce)),ei=Object.freeze({left:0,top:0,width:16,height:16}),Ke=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ye=Object.freeze({...ei,...Ke}),ro=Object.freeze({...Ye,body:"",hidden:!1});function ni(e,t){const n=function(o,r){const i={};!o.hFlip!=!r.hFlip&&(i.hFlip=!0),!o.vFlip!=!r.vFlip&&(i.vFlip=!0);const s=((o.rotate||0)+(r.rotate||0))%4;return s&&(i.rotate=s),i}(e,t);for(const o in ro)o in Ke?o in e&&!(o in n)&&(n[o]=Ke[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function ll(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function s(a){i=ni(o[a]||r[a],i)}return s(t),n.forEach(s),ni(e,i)}function oi(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=function(r,i){const s=r.icons,a=r.aliases||Object.create(null),l=Object.create(null);return(i||Object.keys(s).concat(Object.keys(a))).forEach(function d(w){if(s[w])return l[w]=[];if(!(w in l)){l[w]=null;const _=a[w]&&a[w].parent,x=_&&d(_);x&&(l[w]=[_].concat(x))}return l[w]}),l}(e);for(const r in o){const i=o[r];i&&(t(r,ll(e,r,i)),n.push(r))}return n}const ul={provider:"",aliases:{},not_found:{},...ei};function io(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ri(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!io(e,ul))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r.match(ce)||typeof i.body!="string"||!io(i,ro))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],s=i.parent;if(!r.match(ce)||typeof s!="string"||!n[s]&&!o[s]||!io(i,ro))return null}return t}const ii=Object.create(null);function Ut(e,t){const n=ii[e]||(ii[e]=Object.create(null));return n[t]||(n[t]=function(o,r){return{provider:o,prefix:r,icons:Object.create(null),missing:new Set}}(e,t))}function so(e,t){return ri(t)?oi(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}let le=!1;function si(e){return typeof e=="boolean"&&(le=e),le}function hl(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),le&&!t&&!e.prefix){let o=!1;return ri(e)&&(e.prefix="",oi(e,(r,i)=>{i&&function(s,a){const l=Ve(s,!0,le);return!!l&&function(d,w,_){try{if(typeof _.body=="string")return d.icons[w]={..._},!0}catch{}return!1}(Ut(l.provider,l.prefix),l.name,a)}(r,i)&&(o=!0)})),o}const n=e.prefix;return Ge({provider:t,prefix:n,name:"a"})?!!so(Ut(t,n),e):!1}const ai=Object.freeze({width:null,height:null}),ci=Object.freeze({...ai,...Ke}),dl=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fl=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function li(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(dl);if(o===null||!o.length)return e;const r=[];let i=o.shift(),s=fl.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");s=!s}}const pl=/\sid="(\S+)"/g,gl="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let ml=0;const ao=Object.create(null);function co(e){return ao[e]||ao[""]}function lo(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array&&t.length))return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const uo=Object.create(null),Je=["https://api.simplesvg.com","https://api.unisvg.com"],ho=[];for(;Je.length>0;)Je.length===1||Math.random()>.5?ho.push(Je.shift()):ho.push(Je.pop());function vl(e,t){const n=lo(t);return n!==null&&(uo[e]=n,!0)}function fo(e){return uo[e]}uo[""]=lo({resources:["https://api.iconify.design"].concat(ho)});let ui=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();const yl={prepare:(e,t,n)=>{const o=[],r=function(l,d){const w=fo(l);if(!w)return 0;let _;if(w.maxURL){let x=0;w.resources.forEach(I=>{x=Math.max(x,I.length)});const P=d+".json?icons=";_=w.maxURL-x-w.path.length-P.length}else _=0;return _}(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,d)=>{a+=l.length+1,a>=r&&d>0&&(o.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),o.push(s),o},send:(e,t,n)=>{if(!ui)return void n("abort",424);let o=function(i){if(typeof i=="string"){const s=fo(i);if(s)return s.path}return"/"}(t.provider);switch(t.type){case"icons":{const i=t.prefix,s=t.icons.join(",");o+=i+".json?"+new URLSearchParams({icons:s}).toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:return void n("abort",400)}let r=503;ui(e+o).then(i=>{const s=i.status;if(s===200)return r=501,i.json();setTimeout(()=>{n(function(a){return a===404}(s)?"abort":"next",s)})}).then(i=>{setTimeout(typeof i=="object"&&i!==null?()=>{n("success",i)}:()=>{i===404?n("abort",i):n("next",r)})}).catch(()=>{n("next",r)})}};function hi(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}let wl=0;var bl={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _l(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let s;if(e.random){let f=e.resources.slice(0);for(s=[];f.length>1;){const L=Math.floor(Math.random()*f.length);s.push(f[L]),f=f.slice(0,L).concat(f.slice(L+1))}s=s.concat(f)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l,d="pending",w=0,_=null,x=[],P=[];function I(){_&&(clearTimeout(_),_=null)}function y(){d==="pending"&&(d="aborted"),I(),x.forEach(f=>{f.status==="pending"&&(f.status="aborted")}),x=[]}function u(f,L){L&&(P=[]),typeof f=="function"&&P.push(f)}function p(){d="failed",P.forEach(f=>{f(void 0,l)})}function v(){x.forEach(f=>{f.status==="pending"&&(f.status="aborted")}),x=[]}function h(){if(d!=="pending")return;I();const f=s.shift();if(f===void 0)return x.length?void(_=setTimeout(()=>{I(),d==="pending"&&(v(),p())},e.timeout)):void p();const L={status:"pending",resource:f,callback:(A,D)=>{(function($,j,U){const T=j!=="success";switch(x=x.filter(O=>O!==$),d){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(j==="abort")return l=U,void p();if(T)return l=U,void(x.length||(s.length?h():p()));if(I(),v(),!e.random){const O=e.resources.indexOf($.resource);O!==-1&&O!==e.index&&(e.index=O)}d="completed",P.forEach(O=>{O(U)})})(L,A,D)}};x.push(L),w++,_=setTimeout(h,e.rotate),n(f,t,L.callback)}return typeof o=="function"&&P.push(o),setTimeout(h),function(){return{startTime:a,payload:t,status:d,queriesSent:w,queriesPending:x.length,subscribe:u,abort:y}}}function di(e){const t={...bl,...e};let n=[];function o(){n=n.filter(r=>r().status==="pending")}return{query:function(r,i,s){const a=_l(t,r,i,(l,d)=>{o(),s&&s(l,d)});return n.push(a),a},find:function(r){return n.find(i=>r(i))||null},setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:o}}function fi(){}const po=Object.create(null);function Sl(e,t,n){let o,r;if(typeof e=="string"){const i=co(e);if(!i)return n(void 0,424),fi;r=i.send;const s=function(a){if(!po[a]){const l=fo(a);if(!l)return;const d={config:l,redundancy:di(l)};po[a]=d}return po[a]}(e);s&&(o=s.redundancy)}else{const i=lo(e);if(i){o=di(i);const s=co(e.resources?e.resources[0]:"");s&&(r=s.send)}}return o&&r?o.query(t,r,n)().abort:(n(void 0,424),fi)}function go(e,t){try{return e.getItem(t)}catch{}}function mo(e,t,n){try{return e.setItem(t,n),!0}catch{}}function pi(e,t){try{e.removeItem(t)}catch{}}function vo(e,t){return mo(e,"iconify-count",t.toString())}function yo(e){return parseInt(go(e,"iconify-count"))||0}const Ze={local:!0,session:!0},gi={local:new Set,session:new Set};let wo=!1,Qe=typeof window>"u"?{}:window;function mi(e){const t=e+"Storage";try{if(Qe&&Qe[t]&&typeof Qe[t].length=="number")return Qe[t]}catch{}Ze[e]=!1}function vi(e,t){const n=mi(e);if(!n)return;const o=go(n,"iconify-version");if(o!=="iconify2"){if(o){const a=yo(n);for(let l=0;l<a;l++)pi(n,"iconify"+l.toString())}return mo(n,"iconify-version","iconify2"),void vo(n,0)}const r=Math.floor(Date.now()/36e5)-168,i=a=>{const l="iconify"+a.toString(),d=go(n,l);if(typeof d=="string"){try{const w=JSON.parse(d);if(typeof w=="object"&&typeof w.cached=="number"&&w.cached>r&&typeof w.provider=="string"&&typeof w.data=="object"&&typeof w.data.prefix=="string"&&t(w,a))return!0}catch{}pi(n,l)}};let s=yo(n);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,vo(n,s)):gi[e].add(a))}function yi(){if(!wo){wo=!0;for(const e in Ze)vi(e,t=>{const n=t.data,o=Ut(t.provider,n.prefix);if(!so(o,n).length)return!1;const r=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,r):r,!0})}}function Cl(e,t){function n(o){let r;if(!Ze[o]||!(r=mi(o)))return;const i=gi[o];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=yo(r),s>=50||!vo(r,s+1))return;const a={cached:Math.floor(Date.now()/36e5),provider:e.provider,data:t};return mo(r,"iconify"+s.toString(),JSON.stringify(a))}wo||yi(),t.lastModified&&!function(o,r){const i=o.lastModifiedCached;if(i&&i>=r)return i===r;if(o.lastModifiedCached=r,i)for(const s in Ze)vi(s,a=>{const l=a.data;return a.provider!==o.provider||l.prefix!==o.prefix||l.lastModified===r});return!0}(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&delete(t=Object.assign({},t)).not_found,n("local")||n("session"))}function wi(){}function El(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const n=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!n.length)return;let o=!1;const r=t.provider,i=t.prefix;n.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==i)return!0;const w=d.name;if(t.icons[w])a.loaded.push({provider:r,prefix:i,name:w});else{if(!t.missing.has(w))return o=!0,!0;a.missing.push({provider:r,prefix:i,name:w})}return!1}),a.pending.length!==l&&(o||hi([t],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}(e)}))}const xl=(e,t)=>{const n=function(l,d=!0,w=!1){const _=[];return l.forEach(x=>{const P=typeof x=="string"?Ve(x,d,w):x;P&&_.push(P)}),_}(e,!0,si()),o=function(l){const d={loaded:[],missing:[],pending:[]},w=Object.create(null);l.sort((x,P)=>x.provider!==P.provider?x.provider.localeCompare(P.provider):x.prefix!==P.prefix?x.prefix.localeCompare(P.prefix):x.name.localeCompare(P.name));let _={provider:"",prefix:"",name:""};return l.forEach(x=>{if(_.name===x.name&&_.prefix===x.prefix&&_.provider===x.provider)return;_=x;const P=x.provider,I=x.prefix,y=x.name,u=w[P]||(w[P]=Object.create(null)),p=u[I]||(u[I]=Ut(P,I));let v;v=y in p.icons?d.loaded:I===""||p.missing.has(y)?d.missing:d.pending;const h={provider:P,prefix:I,name:y};v.push(h)}),d}(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,wi)}),()=>{l=!1}}const r=Object.create(null),i=[];let s,a;return o.pending.forEach(l=>{const{provider:d,prefix:w}=l;if(w===a&&d===s)return;s=d,a=w,i.push(Ut(d,w));const _=r[d]||(r[d]=Object.create(null));_[w]||(_[w]=[])}),o.pending.forEach(l=>{const{provider:d,prefix:w,name:_}=l,x=Ut(d,w),P=x.pendingIcons||(x.pendingIcons=new Set);P.has(_)||(P.add(_),r[d][w].push(_))}),i.forEach(l=>{const{provider:d,prefix:w}=l;r[d][w].length&&function(_,x){_.iconsToLoad?_.iconsToLoad=_.iconsToLoad.concat(x).sort():_.iconsToLoad=x,_.iconsQueueFlag||(_.iconsQueueFlag=!0,setTimeout(()=>{_.iconsQueueFlag=!1;const{provider:P,prefix:I}=_,y=_.iconsToLoad;let u;delete _.iconsToLoad,y&&(u=co(P))&&u.prepare(P,I,y).forEach(p=>{Sl(P,p,v=>{if(typeof v!="object")p.icons.forEach(h=>{_.missing.add(h)});else try{const h=so(_,v);if(!h.length)return;const f=_.pendingIcons;f&&h.forEach(L=>{f.delete(L)}),Cl(_,v)}catch(h){console.error(h)}El(_)})})}))}(l,r[d][w])}),t?function(l,d,w){const _=wl++,x=hi.bind(null,w,_);if(!d.pending.length)return x;const P={id:_,icons:d,callback:l,abort:x};return w.forEach(I=>{(I.loaderCallbacks||(I.loaderCallbacks=[])).push(P)}),x}(t,o,i):wi},kl=/[\s,]+/;function Il(e,t){t.split(kl).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function Tl(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=r,i%1==0?o(i):0)}}return t}const bi={...ci,inline:!1},Rl={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ml={display:"inline-block"},bo={backgroundColor:"currentColor"},_i={backgroundColor:"transparent"},Si={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ci={webkitMask:bo,mask:bo,background:_i};for(const e in Ci){const t=Ci[e];for(const n in Si)t[e+n]=Si[n]}const tn={};function Ei(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";tn[e+"-flip"]=t,tn[e.slice(0,1)+"-flip"]=t,tn[e+"Flip"]=t});const xi=(e,t)=>{const n=function(u,p){const v={...u};for(const h in p){const f=p[h],L=typeof f;h in ai?(f===null||f&&(L==="string"||L==="number"))&&(v[h]=f):L===typeof v[h]&&(v[h]=h==="rotate"?f%4:f)}return v}(bi,t),o={...Rl},r=t.mode||"svg",i={},s=t.style,a=typeof s!="object"||s instanceof Array?{}:s;for(let u in t){const p=t[u];if(p!==void 0)switch(u){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[u]=p===!0||p==="true"||p===1;break;case"flip":typeof p=="string"&&Il(n,p);break;case"color":i.color=p;break;case"rotate":typeof p=="string"?n[u]=Tl(p):typeof p=="number"&&(n[u]=p);break;case"ariaHidden":case"aria-hidden":p!==!0&&p!=="true"&&delete o["aria-hidden"];break;default:{const v=tn[u];v?p!==!0&&p!=="true"&&p!==1||(n[v]=!0):bi[u]===void 0&&(o[u]=p)}}}const l=function(u,p){const v={...Ye,...u},h={...ci,...p},f={left:v.left,top:v.top,width:v.width,height:v.height};let L=v.body;[v,h].forEach(Z=>{const Q=[],bt=Z.hFlip,Ht=Z.vFlip;let et,_t=Z.rotate;switch(bt?Ht?_t+=2:(Q.push("translate("+(f.width+f.left).toString()+" "+(0-f.top).toString()+")"),Q.push("scale(-1 1)"),f.top=f.left=0):Ht&&(Q.push("translate("+(0-f.left).toString()+" "+(f.height+f.top).toString()+")"),Q.push("scale(1 -1)"),f.top=f.left=0),_t<0&&(_t-=4*Math.floor(_t/4)),_t%=4,_t){case 1:et=f.height/2+f.top,Q.unshift("rotate(90 "+et.toString()+" "+et.toString()+")");break;case 2:Q.unshift("rotate(180 "+(f.width/2+f.left).toString()+" "+(f.height/2+f.top).toString()+")");break;case 3:et=f.width/2+f.left,Q.unshift("rotate(-90 "+et.toString()+" "+et.toString()+")")}_t%2==1&&(f.left!==f.top&&(et=f.left,f.left=f.top,f.top=et),f.width!==f.height&&(et=f.width,f.width=f.height,f.height=et)),Q.length&&(L=function(sn,an,cn){const ge=function(vt,me="defs"){let ve="";const te=vt.indexOf("<"+me);for(;te>=0;){const ye=vt.indexOf(">",te),ee=vt.indexOf("</"+me);if(ye===-1||ee===-1)break;const yt=vt.indexOf(">",ee);if(yt===-1)break;ve+=vt.slice(ye+1,ee).trim(),vt=vt.slice(0,te).trim()+vt.slice(yt+1)}return{defs:ve,content:vt}}(sn);return Zt=ge.defs,Qt=an+ge.content+cn,Zt?"<defs>"+Zt+"</defs>"+Qt:Qt;var Zt,Qt}(L,'<g transform="'+Q.join(" ")+'">',"</g>"))});const A=h.width,D=h.height,$=f.width,j=f.height;let U,T;A===null?(T=D===null?"1em":D==="auto"?j:D,U=li(T,$/j)):(U=A==="auto"?$:A,T=D===null?li(U,j/$):D==="auto"?j:D);const O={},q=(Z,Q)=>{(bt=>bt==="unset"||bt==="undefined"||bt==="none")(Q)||(O[Z]=Q.toString())};q("width",U),q("height",T);const rt=[f.left,f.top,$,j];return O.viewBox=rt.join(" "),{attributes:O,viewBox:rt,body:L}}(e,n),d=l.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),r==="svg"){o.style={...i,...a},Object.assign(o,d);let u=0,p=t.id;return typeof p=="string"&&(p=p.replace(/-/g,"_")),o.innerHTML=function(v,h=gl){const f=[];let L;for(;L=pl.exec(v);)f.push(L[1]);if(!f.length)return v;const A="suffix"+(16777216*Math.random()|Date.now()).toString(16);return f.forEach(D=>{const $=typeof h=="function"?h(D):h+(ml++).toString(),j=D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");v=v.replace(new RegExp('([#;"])('+j+')([")]|\\.[a-z])',"g"),"$1"+$+A+"$3")}),v=v.replace(new RegExp(A,"g"),"")}(l.body,p?()=>p+"ID"+u++:"iconifyVue"),yn("svg",o)}const{body:w,width:_,height:x}=e,P=r==="mask"||r!=="bg"&&w.indexOf("currentColor")!==-1,I=function(u,p){let v=u.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const h in p)v+=" "+h+'="'+p[h]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+v+">"+u+"</svg>"}(w,{...d,width:_+"",height:x+""});var y;return o.style={...i,"--svg":(y=I,'url("'+function(u){return"data:image/svg+xml,"+function(p){return p.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(u)}(y)+'")'),width:Ei(d.width),height:Ei(d.height),...Ml,...P?bo:_i,...a},yn("span",o)};var ki;if(si(!0),ki=yl,ao[""]=ki,typeof document<"u"&&typeof window<"u"){yi();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!hl(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;vl(n,r)||console.error(o)}catch{console.error(o)}}}}const Pl={...Ye,body:""},_o=Mt({inheritAttrs:!1,data:()=>({_name:"",_loadingIcon:null,iconMounted:!1,counter:0}),mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let n;if(typeof e!="string"||(n=Ve(e,!1,!0))===null)return this.abortLoading(),null;const o=function(i){const s=typeof i=="string"?Ve(i,!0,le):i;if(s){const a=Ut(s.provider,s.prefix),l=s.name;return a.icons[l]||(a.missing.has(l)?null:void 0)}}(n);if(!o)return this._loadingIcon&&this._loadingIcon.name===e||(this.abortLoading(),this._name="",o!==null&&(this._loadingIcon={name:e,abort:xl([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e));const r=["iconify"];return n.prefix!==""&&r.push("iconify--"+n.prefix),n.provider!==""&&r.push("iconify--"+n.provider),{data:o,classes:r}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad):null;if(!t)return xi(Pl,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),xi({...Ye,...t.data},n)}}),Yt=new Map,ue=K(new Map);class he{static addWindowPanel(t){Yt.set(t.id,t)}static removeWindowPanel(t){Yt.has(t)&&(Yt.delete(t),ue.value.delete(t))}static minimizeWindowPanel(t){Yt.has(t)&&ue.value.set(t,-1)}static openWindowPanel(t){Yt.has(t)&&ue.value.set(t,1)}}const zl=["src"],Ll={key:1,class:"paneltitle"},Al={class:"dragPanelBar"},Dl={class:"dragPanelContent"},$l={class:"drag-pointer-group"},Nl=(e=>(Rs("data-v-39ea9741"),e=e(),Ms(),e))(()=>Y("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1));var So=Mt({__name:"XWindow",props:{top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},nWidth:{type:[String,Number],default:"300px"},nHeight:{type:[String,Number],default:"400px"},icon:{type:String,default:"img/logo.png"},title:{type:String,default:""},titleHeight:{type:[String,Number],default:"40px"},hasMin:{type:Boolean,default:!0},hasMax:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},pid:{type:String,default:""},tag:{type:[String,Array,Object,Number],default:""}},emits:["close","open","loaded","minimize"],setup(e,{expose:t,emit:n}){const o=ur(),r=e,i=n,s=K(),a=K(),l=Vt(()=>r.isDark),d=K({x:0,y:0}),w=250,_=100,x=K({width:0,height:0}),P=T=>{s.value&&(s.value.style.left=`${T.x}px`,s.value.style.top=`${T.y}px`)};Pt(()=>d.value,T=>{P(T)});const I=T=>{s.value&&(s.value.style.width=`${T.width}px`,s.value.style.height=`${T.height}px`)};Pt(()=>x.value,T=>{I(T)});const y={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(y.refs).forEach(([T,O])=>{O.value&&O.value.addEventListener("mousedown",q=>{y.mouseDown(q,T)})})},mouseDown:(T,O)=>{T.button==0&&(T.preventDefault(),y.startingEdges={left:d.value.x,top:d.value.y,right:d.value.x+x.value.width,bottom:d.value.y+x.value.height},y.newEdges={...y.startingEdges},y.clickStart={x:T.clientX,y:T.clientY},y.eventListenerController=new AbortController,document.addEventListener("mousemove",q=>{y.mouseMove(q,O)},{signal:y.eventListenerController.signal}),document.addEventListener("mouseup",q=>{y.mouseUp(q,O)},{signal:y.eventListenerController.signal}))},mouseMove:(T,O)=>{if(y.startingEdges!=null&&y.newEdges!=null&&y.clickStart!=null&&y.refs[O].value){if(T.preventDefault(),console.log("mouseMove",O),O.toLowerCase().includes("north")){y.newEdges.top=Math.max(y.startingEdges.top+T.clientY-y.clickStart.y,0);const q=y.newEdges.bottom-y.newEdges.top-_;q<0&&(y.newEdges.top+=q)}else O.toLowerCase().includes("south")&&(y.newEdges.bottom=Math.min(y.startingEdges.bottom+T.clientY-y.clickStart.y,document.body.clientHeight));if(O.toLowerCase().includes("west")){y.newEdges.left=Math.max(y.startingEdges.left+T.clientX-y.clickStart.x,0);const q=y.newEdges.right-y.newEdges.left-w;q<0&&(y.newEdges.left+=q)}else O.toLowerCase().includes("east")&&(y.newEdges.right=Math.min(y.startingEdges.right+T.clientX-y.clickStart.x,document.body.clientWidth));y.update()}},update:()=>{y.newEdges==null||y.startingEdges==null||(d.value={x:Math.max(y.newEdges.left,0),y:Math.max(y.newEdges.top,0)},x.value={width:Math.min(Math.max(y.newEdges.right-y.newEdges.left,w),document.body.clientWidth),height:Math.min(Math.max(y.newEdges.bottom-y.newEdges.top,_),document.body.clientHeight)})},mouseUp:(T,O)=>{T.button!=0||y.startingEdges==null||(console.log("mouseUp",O),T.preventDefault(),y.startingEdges=null,y.newEdges=null,y.clickStart=null,y.eventListenerController&&(y.eventListenerController.abort(),y.eventListenerController=null))},refs:{northWest:K(null),north:K(null),northEast:K(null),west:K(null),east:K(null),southWest:K(null),south:K(null),southEast:K(null)}},u={startingMouse:null,startingPosition:null,mouseDown:T=>{T.button==0&&(T.preventDefault(),console.log("mouseDown"),u.startingMouse={x:T.clientX,y:T.clientY},u.startingPosition=d.value,document.addEventListener("mousemove",u.mouseMove),document.addEventListener("mouseup",u.mouseUp))},mouseMove:T=>{!u.startingMouse||!u.startingPosition||(T.preventDefault(),d.value={x:Math.min(Math.max(u.startingPosition.x+T.clientX-u.startingMouse.x,0),document.body.clientWidth-x.value.width),y:Math.min(Math.max(u.startingPosition.y+T.clientY-u.startingMouse.y,0),document.body.clientHeight-x.value.height)})},mouseUp:T=>{T.button!=0||!u.startingMouse||!u.startingPosition||(T.preventDefault(),u.startingMouse=null,u.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",u.mouseMove),document.removeEventListener("mouseup",u.mouseUp))}};function p(T){return{id:o,icon:r.icon,title:r.title,pid:r.pid,data:T??r.tag}}const v=Vt(()=>ue.value.get(o)!==-1),h=K(!1),f=K(!0);function L(){i("minimize",p()),he.minimizeWindowPanel(o)}function A(){h.value=!h.value}function D(){i("close",p(!1)),he.removeWindowPanel(o),f.value=!1}const $=Vt(()=>h.value?"heroicons-outline:square-2-stack":"ant-design:border-outlined"),j={id:o,isShow:v,close:D,open:function(){i("open",p(!0)),f.value=!0},showHidePanel:L};function U(T){if(zn(T))return T;{const O=Number(T);if(O==O)return O;if(T.endsWith("px")){const q=T.substring(0,T.length-2);return Number(q)}if(T.endsWith("%")){const q=T.substring(0,T.length-1);return Number(q)/100*document.body.clientWidth}return 300}}return t(j),wn(()=>{(function(){let T=90;if(r.hasMin||(T-=30),r.hasMax||(T-=30),r.hasClose||(T-=30),dt.setCssVar("--right-bar-width",T+"px",a.value),!a.value)return;const O=zn(r.titleHeight)?r.titleHeight+"px":r.titleHeight;a.value.style.height=O,a.value.style.lineHeight=O})(),function(){const T=p(j);he.addWindowPanel(T),i("loaded",T)}(),d.value.x=U(r.left),d.value.y=U(r.top),P(d.value),x.value={width:U(r.nWidth),height:U(r.nHeight)},I(x.value),y.mount()}),Is(()=>{he.removeWindowPanel(o)}),(T,O)=>(X(),at(_n,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:It(()=>[f.value?or((X(),pt("div",{key:0,ref_key:"dragPanelRef",ref:s,class:Ts(["dragWindowPanel",{maxPanel:h.value,dragWindowPanel_dark:l.value}])},[Y("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:a,onMousedown:O[0]||(O[0]=(...q)=>u.mouseDown&&u.mouseDown(...q))},[st(T.$slots,"title",{},()=>[r.icon?(X(),pt("img",{key:0,src:r.icon,width:"24",height:"24"},null,8,zl)):mt("v-if",!0),r.title?(X(),pt("span",Ll,Cn(r.title),1)):mt("v-if",!0)]),Y("div",Al,[e.hasMin?(X(),at(xn(_o),{key:0,icon:"ant-design:minus-outlined",onClick:L})):mt("v-if",!0),e.hasMax?(X(),at(xn(_o),{key:1,icon:$.value,onClick:A},null,8,["icon"])):mt("v-if",!0),e.hasClose?(X(),at(xn(_o),{key:2,icon:"ant-design:close-outlined",onClick:D})):mt("v-if",!0)])],544),Y("div",Dl,[st(T.$slots,"default")]),Y("div",$l,[Y("div",{class:"cursor-nw-resize",ref:y.refs.northWest},null,512),Y("div",{class:"cursor-n-resize",ref:y.refs.north},null,512),Y("div",{class:"cursor-ne-resize",ref:y.refs.northEast},null,512),Y("div",{class:"cursor-w-resize",ref:y.refs.west},null,512),Nl,Y("div",{class:"cursor-e-resize",ref:y.refs.east},null,512),Y("div",{class:"cursor-sw-resize",ref:y.refs.southWest},null,512),Y("div",{class:"cursor-s-resize",ref:y.refs.south},null,512),Y("div",{class:"cursor-se-resize",ref:y.refs.southEast},null,512)])],2)),[[rr,v.value]]):mt("v-if",!0)]),_:3}))}});function Bl(e){const t=new As(new _e);return t.serialize(e),t.stream.toString()}function jl(e){return e==null||e===""?e:new Ds(new _e(e)).deserialize()}So.__scopeId="data-v-39ea9741",So.__file="src/controls/xwindow/XWindow.vue";const en=new Map,Co=new Map;let nn;const Ol={getDefaultClient(){if(nn||(nn=new oe(SysConfig.DefaultHproseAPI)),!nn)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return nn},registerHprose(e,t){const n=Co.get(e);if(!n){const o=new oe(t);en.set(e,o)}return n},getHprose:e=>Co?.get(e),getProxyHprose:e=>en.get(e),unregisterHprose(e){en.get(e)&&(Co.delete(e),en.delete(e))}},Wl=5e3,Ul=36e5,Ft={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},Eo="access_token",Fl=B.Config.ServiceURL.LoginAuthURL;function xo(){const e=_r();e&&Et(Ft.RefreshToken,Fl,{refreshToken:e}).then(t=>{ko(t.data)})}function Ii(){const e=Ct.getJsonObject(Eo);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?xo():setTimeout(xo,n-5e3))}function ko(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=Nt();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},Ct.set(Eo,o,n/1e3),Ii()}else Ct.remove(Eo)}const on="Wm314243",rn=B.Config.ServiceURL.LoginAuthURL;async function Hl(e){const t={username:e.username,pwd:ie.encryptToString(e.pwd,on)},n=(await Et(Ft.Login,rn,t))?.data;return n&&ko(n.doubletoken),n}function ql(e){const t={oldpwd:ie.encryptToString(e.oldpwd,on),newpwd:ie.encryptToString(e.newpwd,on)};return Et(Ft.ChangeMyPwd,rn,t)}function Xl(e){return ie.encryptToString(e,on)}function Vl(){const e=Nt();e&&(Cr(Ft.Logout,rn,{token:e.token,reftoken:e.refresh}),Fn())}function Gl(e){return Et(Ft.CheckToken,rn,{token:e})}const Io="ROLE_SYSTEM_RIGHT",To=new Me("",sessionStorage);function Ti(){return To.get(Io)}function Ro(e){To.set(Io,e)}function Ri(){To.remove(Io)}function Jt(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(Jt(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function Mi(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&Mi(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function Pi(e,t,n="name"){e&&t&&e.forEach(o=>{const r=t.find(i=>i[n]===o[n]);r&&(o.children?r.children&&Pi(o.children,r.children,n):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function de(e,t,n,o="name"){const r=e[n],i=t[n];r?i&&Pi(r,i,o):i&&(e[n]=i)}function zi(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=Lt(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],a=o?s:JSON.parse(s);de(r,a,"routes","name"),de(r,a,"widgetMenu","name"),de(r,a,"widgets","id"),de(r,a,"functions","id")}n=r}return n&&(Jt(n.routes),Jt(n.widgetMenu),Jt(n.widgets),Jt(n.functions)),n}}const Mo=[],Po=[],zo=[];function fe(){return Ti()}async function Kl(e,t=!1){Ri();const n=Ft.GetSystemRights,o=B.Config.ServiceURL.LoginAuthURL,r=await Et(n,o,{systemid:e});if(!r||!r.data)return void B.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 Ro(s),s}{const s=zi(i);return Ro(s),s}}}function Li(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=Li(r,o);i&&n.children?.push(i)}})),n}function Yl(e,t=2){if(t===0)return e;const n=fe();return n&&n.routes?(zo.length>0||e.forEach(o=>{const r=n.routes?.find(i=>i.name===o.name);if(r){const i=Li(o,r);i&&zo.push(i)}}),zo):void 0}function Ai(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=Ai(r,o);i&&n.children?.push(i)}})),n}function Jl(e,t=2){if(t===0)return e;const n=fe();return n&&n.widgetMenu?(Po.length>0||e.forEach(o=>{const r=n.widgetMenu?.find(i=>i.name===o.name);if(r){const i=Ai(o,r);i&&Po.push(i)}}),Po):void 0}function Zl(e,t=2){if(t===0)return e;const n=fe();return n&&n.widgets?(Mo.length>0||e?.forEach(o=>{n.widgets?.find(r=>r.id===o.id)&&Mo.push(o)}),Mo):void 0}function Ql(e,t=2){if(t===0)return e;const n=fe();return n?n.functions:void 0}export{Va as BigFileDownload,ze as Download,Sa as DownloadByUrl,Dt as EnumColor,Tr as FileUpload,Vc as GetSignalRClient,B as Global,Ol as GlobalHprose,$t as GlobalMitt,dt as H5Tool,pe as HproseClient,_a as HttpDownload,dr as JsonDownload,Xe as LayoutContainer,ut as LayoutContainerEnum,ti as LayoutManager,ue as MinWindowMap,Ga as ObjToUrlParams,In as Pane,oe as ProxyClient,oo as RouterTransition,ba as SaveAs,Ns as Splitpanes,Me as Storage,Re as StringUtils,Jc as StyleBlack,tl as StyleGrayblue,Qc as StyleMetal,Zc as StyleWhite,qe as SuspenseWithError,ct as SysEvents,Wl as TOKEN_REFRESH_TIME,Ul as TOKEN_VALID_TIMESPAN,Ft as USER_TOKEN_API,He as VWindow,_c as WaterMark,Zr as WindowResizeEvent,el as WindowType,Yt as WindowsMap,So as XWindow,he as XWindowManager,ie as XXTEA,wa as calculateBestTextColor,ql as changeMyPWD,Ii as checkDoRefreshToken,Gl as checkToken,Fn as clearLocalToken,Ri as clearRight,ma as colorIsDark,Ba as createFileUpload,va as darken,Ar as deepMerge,pr as delay,jl as deserialize,xo as doRefreshToken,Dr as exportSystemRights,Ea as get,fe as getCurrentSystemRight,ka as getData,Xl as getEncryptPWD,Ql as getFunctions,ua as getHexColor,Nt as getLocalToken,Ua as getLockState,da as getLongHexColor,Rr as getProxyClient,ha as getRGBColor,pa as getRGBColorFromHSLA,_r as getRefreshToken,Ti as getRight,Yl as getRoutes,Kl as getSystemRoleRight,Zl as getWidgetConfig,Jl as getWidgetMenus,Jt as handleNodes,Nn as hexToRGB,Oa as init,Wa as initDefaultProxyClient,ht as is,Ln as isArray,Xs as isAsyncFunction,Gs as isBoolean,Ks as isClient,qs as isDate,lr as isDef,Js as isElement,ta as isEmpty,fa as isEnumColor,ea as isError,ke as isFunction,Pe as isHexColor,Qs as isImageDom,ia as isMap,Pn as isNull,Fs as isNullAndUnDef,Hs as isNullOrUnDef,zn as isNumber,Lt as isObjectX,Vs as isPromise,Zs as isServer,Ie as isString,ra as isSymbol,Mn as isUnDef,sa as isValidURL,oa as isWeakMap,na as isWeakSet,Ys as isWindow,ja as jquery,ya as lighten,Hl as login,Vl as logout,zi as mergeFilterRoleSysRight,Mi as mergeNodes,de as mergeNodesAll,la as newGuid,Fa as onLockListener,xa as post,Et as requestGet,Sr as requestPost,Cr as requestPostBody,ga as rgbToHex,Bl as serialize,ko as setLocalToken,Ro as setRight,Ca as sleep,ca as storage,Ct as storageHelper,Ha as unLockListener,ur as uuid,tc as verifiyNumberInteger,lc as verifyAccount,oc as verifyAndSpace,wc as verifyCarNum,ec as verifyCnAndSpace,pc as verifyEmail,nc as verifyEnAndSpace,mc as verifyFullName,fc as verifyIPAddress,gc as verifyIdCard,sc as verifyNumberCnUppercase,rc as verifyNumberComma,Zn as verifyNumberIntegerAndFloat,Za as verifyNumberPercentage,Qa as verifyNumberPercentageFloat,uc as verifyPassword,hc as verifyPasswordPowerful,dc as verifyPasswordStrength,ac as verifyPhone,vc as verifyPostalCode,cc as verifyTelPhone,ic as verifyTextColor,yc as verifyUrl,Ya as writeIconifyList,Ja as writeSysRoleRight};