xframelib 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/core/IModel.d.ts +1 -1
- package/dist/core/MsgHelper.d.ts +1 -1
- package/dist/core/SysEvents.d.ts +7 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/package.json +68 -68
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{h as Di,openBlock as F,createElementBlock as fe,normalizeStyle as ge,renderSlot as ie,defineComponent as Ie,ref as K,withModifiers as _o,reactive as So,getCurrentInstance as Li,computed as He,watch as Te,onMounted as Zt,onBeforeUnmount as $i,nextTick as Co,resolveComponent as ut,createBlock as Q,Transition as Eo,withCtx as we,withDirectives as ko,createElementVNode as J,Fragment as Re,createTextVNode as Qt,toDisplayString as en,createCommentVNode as ne,vShow as xo,markRaw as Ni,onErrorCaptured as Bi,Suspense as Wi,createVNode as ht,KeepAlive as Io,resolveDynamicComponent as be,toRefs as Ui,renderList as je,normalizeClass as Pe,TransitionGroup as Oi,onUnmounted as Hi,unref as tn}from"vue";import ji from"axios";import qi from"qs";import{Client as Fi,ClientContext as nn}from"@hprose/rpc-core";import{ByteStream as ke,Writer as on,Reader as rn,ValueReader as Xi}from"@hprose/io";import{HttpTransport as Vi}from"@hprose/rpc-html5";import{Icon as sn}from"@iconify/vue";var Gi={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((n,e)=>(n[e.id]=e)&&n,{})}},methods:{updatePaneComponents(){this.panes.forEach(n=>{n.update&&n.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[n.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(n,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(n){this.touch.mouseDown&&(n.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(n)),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(n=>({min:n.min,max:n.max,size:n.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(n,e){"ontouchstart"in window&&(n.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(n,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(n,e){let t=0;this.panes=this.panes.map((o,r)=>(o.size=r===e?o.max:o.min,r!==e&&(t+=o.min),o)),this.panes[e].size-=t,this.$emit("pane-maximize",this.panes[e])},onPaneClick(n,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(n){const e=this.container.getBoundingClientRect(),{clientX:t,clientY:o}="ontouchstart"in window&&n.touches?n.touches[0]:n;return{x:t-e.left,y:o-e.top}},getCurrentDragPercentage(n){n=n[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(n=e-n),100*n/e},calculatePanesSize(n){const e=this.touch.activeSplitter;let t={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:t.prevPanesSize),r=100-(this.pushOtherPanes?0:t.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(n),r),o);let s=[e,e+1],c=this.panes[s[0]]||null,u=this.panes[s[1]]||null;const g=c.max<100&&i>=c.max+t.prevPanesSize,S=u.max<100&&i<=100-(u.max+this.sumNextPanesSize(e+1));if(g||S)g?(c.size=c.max,u.size=Math.max(100-c.max-t.prevPanesSize-t.nextPanesSize,0)):(c.size=Math.max(100-u.max-t.prevPanesSize-this.sumNextPanesSize(e+1),0),u.size=u.max);else{if(this.pushOtherPanes){const C=this.doPushOtherPanes(t,i);if(!C)return;({sums:t,panesToResize:s}=C),c=this.panes[s[0]]||null,u=this.panes[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(i-t.prevPanesSize-t.prevReachedMinPanes,c.min),c.max)),u!==null&&(u.size=Math.min(Math.max(100-i-t.nextPanesSize-t.nextReachedMinPanes,u.min),u.max))}},doPushOtherPanes(n,e){const t=this.touch.activeSplitter,o=[t,t+1];return e<n.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(t).index,n.prevReachedMinPanes=0,o[0]<t&&this.panes.forEach((r,i)=>{i>o[0]&&i<=t&&(r.size=r.min,n.prevReachedMinPanes+=r.min)}),n.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(n.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,i)=>{i>0&&i<=t&&(r.size=r.min,n.prevReachedMinPanes+=r.min)}),this.panes[o[1]].size=100-n.prevReachedMinPanes-this.panes[0].min-n.prevPanesSize-n.nextPanesSize,null):e>100-n.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(t).index,n.nextReachedMinPanes=0,o[1]>t+1&&this.panes.forEach((r,i)=>{i>t&&i<o[1]&&(r.size=r.min,n.nextReachedMinPanes+=r.min)}),n.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(n.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,i)=>{i<this.panesCount-1&&i>=t+1&&(r.size=r.min,n.nextReachedMinPanes+=r.min)}),this.panes[o[0]].size=100-n.prevPanesSize-n.nextReachedMinPanes-this.panes[this.panesCount-1].min-n.nextPanesSize,null):{sums:n,panesToResize:o}},sumPrevPanesSize(n){return this.panes.reduce((e,t,o)=>e+(o<n?t.size:0),0)},sumNextPanesSize(n){return this.panes.reduce((e,t,o)=>e+(o>n+1?t.size:0),0)},findPrevExpandedPane(n){return[...this.panes].reverse().find(e=>e.index<n&&e.size>e.min)||{}},findNextExpandedPane(n){return this.panes.find(e=>e.index>n+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(n=>{const e=n.classList.contains("splitpanes__pane"),t=n.classList.contains("splitpanes__splitter");if(!e&&!t)return n.parentNode.removeChild(n),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(n,e,t=!1){const o=n-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),t||(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(n){n.onmousedown=void 0,n.onclick=void 0,n.ondblclick=void 0,n.parentNode.removeChild(n)},redoSplitters(){const n=Array.from(this.container.children);n.forEach(t=>{t.className.includes("splitpanes__splitter")&&this.removeSplitter(t)});let e=0;n.forEach(t=>{t.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,t,!0):e&&this.addSplitter(e,t),e++)})},requestUpdate({target:n,...e}){const t=this.indexedPanes[n._.uid];Object.entries(e).forEach(([o,r])=>t[o]=r)},onPaneAdd(n){let e=-1;Array.from(n.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&e++,r===n.$el));const t=parseFloat(n.minSize),o=parseFloat(n.maxSize);this.panes.splice(e,0,{id:n._.uid,index:e,min:isNaN(t)?0:t,max:isNaN(o)?100:o,size:n.size===null?null:parseFloat(n.size),givenSize:n.size,update:n.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(n){const e=this.panes.findIndex(o=>o.id===n._.uid),t=this.panes.splice(e,1)[0];this.panes.forEach((o,r)=>o.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...t,index:e}}),this.$emit("pane-remove",{removed:t,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(n={}){n.addedPane||n.removedPane?this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(n):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const n=100/this.panesCount;let e=0;const t=[],o=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(n,r.max),r.min),e-=r.size,r.size>=r.max&&t.push(r.id),r.size<=r.min&&o.push(r.id)}),e>.1&&this.readjustSizes(e,t,o)},initialPanesSizing(){let n=100;const e=[],t=[];let o=0;this.panes.forEach(i=>{n-=i.size,i.size!==null&&o++,i.size>=i.max&&e.push(i.id),i.size<=i.min&&t.push(i.id)});let r=100;n>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(n/(this.panesCount-o),i.max),i.min)),r-=i.size}),r>.1&&this.readjustSizes(n,e,t))},equalizeAfterAddOrRemove({addedPane:n}={}){let e=100/this.panesCount,t=0;const o=[],r=[];n&&n.givenSize!==null&&(e=(100-n.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{t-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),!(Math.abs(t)<.1)&&(this.panes.forEach(i=>{n&&n.givenSize!==null&&n.id===i.id||(i.size=Math.max(Math.min(e,i.max),i.min)),t-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),t>.1&&this.readjustSizes(t,o,r))},readjustSizes(n,e,t){let o;o=n>0?n/(this.panesCount-e.length):n/(this.panesCount-t.length),this.panes.forEach(r=>{if(n>0&&!e.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;n-=s,r.size=i}else if(!t.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;n-=s,r.size=i}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(n)>.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(n){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,t)=>{e.ondblclick=n?o=>this.onSplitterDblClick(o,t):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return Di("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},an={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(n){this.style=n}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(n){this.requestUpdate({target:this,size:n})},minSizeNumber(n){this.requestUpdate({target:this,min:n})},maxSizeNumber(n){this.requestUpdate({target:this,max:n})}}};function cn(n){return window.TouchEvent&&n instanceof TouchEvent}an.render=function(n,e,t,o,r,i){return F(),fe("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=s=>i.onPaneClick(s,n._.uid)),style:ge(n.style)},[ie(n.$slots,"default")],4)},an.__file="src/controls/splitpanes/pane.vue";class de{e;constructor(e){this.e=e}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return cn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return cn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Jn(this.clientX,this.clientY)}static bindDown(e,t,o,r=!1){const i=c=>{t(new de(c))},s=c=>{c.touches.length===1&&t(new de(c)),c.touches.length>1&&o&&o(new de(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,t,o=!1){const r=s=>{t(new de(s))},i=s=>{s.touches.length===1&&t(new de(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,t,o=!1){const r=s=>{t(new de(s))},i=s=>{s.touches.length===0&&t(new de(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:t}){cn(this.e)?t&&t(this.e):e&&e(this.e)}}class Jn{x;y;constructor(e,t){this.x=e,this.y=t}clone(){return new Jn(this.x,this.y)}}class Ki{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(e,t,o={}){this.handle=e,this.container=t,this.options=o,e&&(this.unbindDown=de.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=>{e.preventDefault(),this.handle&&(this.offsetX=e.clientX,this.offsetY=e.clientY),this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=de.bindMove(document,this.mousemove),this.unbindUp=de.bindUp(document,this.mouseup)};mousemove=e=>{this.container&&(this.container.style.left=`calc(${e.clientX-this.offsetX}px + ${this.container.style.left})`,this.container.style.top=`calc(${e.clientY-this.offsetY}px + ${this.container.style.top})`,this.offsetX=e.clientX,this.offsetY=e.clientY),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 Ji{_group;onChange;zIndex;constructor(e,t){this._group=e,this.onChange=t,this.a(o=>o.push(this))}set group(e){this._group=e;const t=ft(this._group),o=ft(e);t.splice(t.indexOf(this),1),o.push(this),Ro()}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(ft(this._group)),Ro()}}const dt=new Map,Yi=0;function ft(n){return dt.has(n)||dt.set(n,[]),dt.get(n)}function To(n,e){return n>e?-To(e,n):n<0&&e>=0?1:n-e}function Ro(){let n=Yi;for(const e of function(t){const o=[];return t.forEach((r,i)=>o.push(i)),o}(dt).sort(To))for(const t of ft(e))n!=t.zIndex&&(t.zIndex=n,t.onChange(n)),n++}function ln(n){if(n){const{width:e,height:t}=n.style;n.style.width="auto",n.style.height="auto";const o=pt(n);return n.style.width=e,n.style.height=t,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function pt(n){const e=n.getBoundingClientRect(),t=e.width,o=e.height,r=e.top,i=e.left;return{width:t,height:o,top:r,left:i,bottom:r+o,right:i+t}}class Zi{container;options;handles;constructor(e,t){if(this.container=e,this.options=t,e&&t){this.handles=Po.map(u=>new u(e,this));const{width:o,height:r}=ln(e),i=t.maxWidth||window.innerWidth,s=t.maxHeight||window.innerHeight;let c=!1;(o<t.minWidth||o>i)&&(e.style.width=`${Mo(o,t.minWidth,i)}px`,c=!0),(r<t.minHeight||r>s)&&(e.style.height=`${Mo(r,t.minHeight,s)}px`,c=!0),c&&t.onResize&&t.onResize()}}teardown(){this.handles?.forEach(e=>e.teardown())}}const Po=[];class xe{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(e,t){this.container=e,this.helper=t,this.handle=this.createHandleElement(),this.unbindDown=de.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:t,top:o,width:r,height:i}=pt(this.container);this.x0=e.clientX,this.y0=e.clientY,this.left0=t,this.top0=o,this.width0=r,this.height0=i,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=de.bindMove(document,this.mousemove),this.unbindUp=de.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:e,top:t,right:o,bottom:r}=pt(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=t+i.minHeight,this.maxBottom=Math.min(t+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:t,left:o,top:r,right:i,bottom:s}=pt(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=t+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"),t=e.style;return t.position="absolute",this.applyStyle(t),this.container.appendChild(e),e}}function Mo(n,e,t){return n<e?e:n>t?t:n}Po.push(class extends xe{setPosition(n){this.container.style.width=this.width0+n.clientX-this.x0+"px",this.container.style.height=this.height0+n.clientY-this.y0+"px"}applyStyle(n){n.width=2*this.handleSize+"px",n.height=2*this.handleSize+"px",n.right=-this.handleSize+"px",n.bottom=-this.handleSize+"px",n.cursor="nwse-resize"}},class extends xe{setPosition(n){this.container.style.height=this.height0+n.clientY-this.y0+"px"}applyStyle(n){n.right=`${this.handleSize}px`,n.left=`${this.handleSize}px`,n.height=2*this.handleSize+"px",n.bottom=-this.handleSize+"px",n.cursor="ns-resize"}},class extends xe{setPosition(n){this.container.style.left=this.left0+n.clientX-this.x0+"px",this.container.style.width=this.width0-(n.clientX-this.x0)+"px",this.container.style.height=this.height0+n.clientY-this.y0+"px"}applyStyle(n){n.left=-this.handleSize+"px",n.bottom=-this.handleSize+"px",n.width=2*this.handleSize+"px",n.height=2*this.handleSize+"px",n.cursor="nesw-resize"}},class extends xe{setPosition(n){this.container.style.left=this.left0+n.clientX-this.x0+"px",this.container.style.width=this.width0-(n.clientX-this.x0)+"px"}applyStyle(n){n.left=-this.handleSize+"px",n.bottom=`${this.handleSize}px`,n.width=2*this.handleSize+"px",n.top=`${this.handleSize}px`,n.cursor="ew-resize"}},class extends xe{setPosition(n){this.container.style.left=this.left0+n.clientX-this.x0+"px",this.container.style.width=this.width0-(n.clientX-this.x0)+"px",this.container.style.top=this.top0+n.clientY-this.y0+"px",this.container.style.height=this.height0-(n.clientY-this.y0)+"px"}applyStyle(n){n.left=-this.handleSize+"px",n.top=-this.handleSize+"px",n.width=2*this.handleSize+"px",n.height=2*this.handleSize+"px",n.cursor="nwse-resize"}},class extends xe{setPosition(n){this.container.style.top=this.top0+n.clientY-this.y0+"px",this.container.style.height=this.height0-(n.clientY-this.y0)+"px"}applyStyle(n){n.left=`${this.handleSize}px`,n.right=`${this.handleSize}px`,n.height=2*this.handleSize+"px",n.top=-this.handleSize+"px",n.cursor="ns-resize"}},class extends xe{setPosition(n){this.container.style.top=this.top0+n.clientY-this.y0+"px",this.container.style.height=this.height0-(n.clientY-this.y0)+"px",this.container.style.width=this.width0+n.clientX-this.x0+"px"}applyStyle(n){n.right=-this.handleSize+"px",n.top=-this.handleSize+"px",n.height=2*this.handleSize+"px",n.width=2*this.handleSize+"px",n.cursor="nesw-resize"}},class extends xe{setPosition(n){this.container.style.width=this.width0+n.clientX-this.x0+"px"}applyStyle(n){n.right=-this.handleSize+"px",n.top=`${this.handleSize}px`,n.bottom=`${this.handleSize}px`,n.width=2*this.handleSize+"px",n.cursor="ew-resize"}});var gt=Ie({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(n){const e=K(!1),t=K(!1);return{hover:e,active:t,style:function(){let o=n.windowStyle.button;return e.value&&(o={...o,...this.windowStyle.buttonHover}),t.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),t.value=!0;const r=de.bindUp(document,()=>{t.value=!1,r()})}}}});const Qi=["disabled"];gt.render=function(n,e,t,o,r,i){return F(),fe("div",{class:"btn",style:ge(n.style()),onMouseenter:e[0]||(e[0]=s=>n.hover=!0),onMouseleave:e[1]||(e[1]=s=>n.hover=!1),onMousedown:e[2]||(e[2]=_o((...s)=>n.mousedown&&n.mousedown(...s),["stop"])),onTouchstart:e[3]||(e[3]=_o((...s)=>n.mousedown&&n.mousedown(...s),["stop"])),onMouseup:e[4]||(e[4]=(...s)=>n.mouseup&&n.mouseup(...s)),onTouchend:e[5]||(e[5]=(...s)=>n.mouseup&&n.mouseup(...s)),disabled:n.disabled},[ie(n.$slots,"default")],44,Qi)},gt.__scopeId="data-v-71662210",gt.__file="src/controls/vuewindow/window/Button.vue";const es=Object.prototype.toString;function ue(n,e){return es.call(n)===`[object ${e}]`}function mt(n){return ue(n,"Function")}const zo=n=>typeof n<"u",un=n=>!zo(n);function hn(n){return n===null}function ts(n){return un(n)&&hn(n)}function ns(n){return un(n)||hn(n)}const Me=n=>n!=null&&n!==null&&ue(n,"Object");function os(n){return ue(n,"Date")}function dn(n){return ue(n,"Number")}function rs(n){return ue(n,"AsyncFunction")}function is(n){return ue(n,"Promise")&&Me(n)&&mt(n.then)&&mt(n.catch)}function vt(n){return ue(n,"String")}function ss(n){return n===!0||n===!1||ue(n,"Boolean")}function fn(n){return n&&Array.isArray(n)}const as=()=>typeof window<"u",cs=n=>typeof window<"u"&&ue(n,"Window"),ls=n=>Me(n)&&!!n.tagName,us=typeof window>"u";function hs(n){return n&&["IMAGE","IMG"].includes(n.tagName)}function ds(n){return n==null||(vt(n)||fn(n)?n.length===0:!!Me(n)&&JSON.stringify(n)==="{}")}function fs(n){return ue(n,"Error")}function ps(n){return ue(n,"WeakSet")}function gs(n){return ue(n,"WeakMap")}function ms(n){return ue(n,"Symbol")}function vs(n){return ue(n,"Map")}const ys=n=>/^(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(n);var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ao,Do={exports:{}},ws=(Ao||(Ao=1,Do.exports=function(n){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(f,l){var v=f[0],m=f[1],p=f[2],y=f[3];m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[0]-680876936|0)<<7|v>>>25)+m|0)&m|~v&p)+l[1]-389564586|0)<<12|y>>>20)+v|0)&v|~y&m)+l[2]+606105819|0)<<17|p>>>15)+y|0)&y|~p&v)+l[3]-1044525330|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[4]-176418897|0)<<7|v>>>25)+m|0)&m|~v&p)+l[5]+1200080426|0)<<12|y>>>20)+v|0)&v|~y&m)+l[6]-1473231341|0)<<17|p>>>15)+y|0)&y|~p&v)+l[7]-45705983|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[8]+1770035416|0)<<7|v>>>25)+m|0)&m|~v&p)+l[9]-1958414417|0)<<12|y>>>20)+v|0)&v|~y&m)+l[10]-42063|0)<<17|p>>>15)+y|0)&y|~p&v)+l[11]-1990404162|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[12]+1804603682|0)<<7|v>>>25)+m|0)&m|~v&p)+l[13]-40341101|0)<<12|y>>>20)+v|0)&v|~y&m)+l[14]-1502002290|0)<<17|p>>>15)+y|0)&y|~p&v)+l[15]+1236535329|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[1]-165796510|0)<<5|v>>>27)+m|0)&p|m&~p)+l[6]-1069501632|0)<<9|y>>>23)+v|0)&m|v&~m)+l[11]+643717713|0)<<14|p>>>18)+y|0)&v|y&~v)+l[0]-373897302|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[5]-701558691|0)<<5|v>>>27)+m|0)&p|m&~p)+l[10]+38016083|0)<<9|y>>>23)+v|0)&m|v&~m)+l[15]-660478335|0)<<14|p>>>18)+y|0)&v|y&~v)+l[4]-405537848|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[9]+568446438|0)<<5|v>>>27)+m|0)&p|m&~p)+l[14]-1019803690|0)<<9|y>>>23)+v|0)&m|v&~m)+l[3]-187363961|0)<<14|p>>>18)+y|0)&v|y&~v)+l[8]+1163531501|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[13]-1444681467|0)<<5|v>>>27)+m|0)&p|m&~p)+l[2]-51403784|0)<<9|y>>>23)+v|0)&m|v&~m)+l[7]+1735328473|0)<<14|p>>>18)+y|0)&v|y&~v)+l[12]-1926607734|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[5]-378558|0)<<4|v>>>28)+m|0)^m^p)+l[8]-2022574463|0)<<11|y>>>21)+v|0)^v^m)+l[11]+1839030562|0)<<16|p>>>16)+y|0)^y^v)+l[14]-35309556|0)<<23|m>>>9)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[1]-1530992060|0)<<4|v>>>28)+m|0)^m^p)+l[4]+1272893353|0)<<11|y>>>21)+v|0)^v^m)+l[7]-155497632|0)<<16|p>>>16)+y|0)^y^v)+l[10]-1094730640|0)<<23|m>>>9)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[13]+681279174|0)<<4|v>>>28)+m|0)^m^p)+l[0]-358537222|0)<<11|y>>>21)+v|0)^v^m)+l[3]-722521979|0)<<16|p>>>16)+y|0)^y^v)+l[6]+76029189|0)<<23|m>>>9)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[9]-640364487|0)<<4|v>>>28)+m|0)^m^p)+l[12]-421815835|0)<<11|y>>>21)+v|0)^v^m)+l[15]+530742520|0)<<16|p>>>16)+y|0)^y^v)+l[2]-995338651|0)<<23|m>>>9)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[0]-198630844|0)<<6|v>>>26)+m|0)|~p))+l[7]+1126891415|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[14]-1416354905|0)<<15|p>>>17)+y|0)|~v))+l[5]-57434055|0)<<21|m>>>11)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[12]+1700485571|0)<<6|v>>>26)+m|0)|~p))+l[3]-1894986606|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[10]-1051523|0)<<15|p>>>17)+y|0)|~v))+l[1]-2054922799|0)<<21|m>>>11)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[8]+1873313359|0)<<6|v>>>26)+m|0)|~p))+l[15]-30611744|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[6]-1560198380|0)<<15|p>>>17)+y|0)|~v))+l[13]+1309151649|0)<<21|m>>>11)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[4]-145523070|0)<<6|v>>>26)+m|0)|~p))+l[11]-1120210379|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[2]+718787259|0)<<15|p>>>17)+y|0)|~v))+l[9]-343485551|0)<<21|m>>>11)+p|0,f[0]=v+f[0]|0,f[1]=m+f[1]|0,f[2]=p+f[2]|0,f[3]=y+f[3]|0}function o(f){var l,v=[];for(l=0;l<64;l+=4)v[l>>2]=f.charCodeAt(l)+(f.charCodeAt(l+1)<<8)+(f.charCodeAt(l+2)<<16)+(f.charCodeAt(l+3)<<24);return v}function r(f){var l,v=[];for(l=0;l<64;l+=4)v[l>>2]=f[l]+(f[l+1]<<8)+(f[l+2]<<16)+(f[l+3]<<24);return v}function i(f){var l,v,m,p,y,L,A=f.length,T=[1732584193,-271733879,-1732584194,271733878];for(l=64;l<=A;l+=64)t(T,o(f.substring(l-64,l)));for(v=(f=f.substring(l-64)).length,m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=0;l<v;l+=1)m[l>>2]|=f.charCodeAt(l)<<(l%4<<3);if(m[l>>2]|=128<<(l%4<<3),l>55)for(t(T,m),l=0;l<16;l+=1)m[l]=0;return p=(p=8*A).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(p[2],16),L=parseInt(p[1],16)||0,m[14]=y,m[15]=L,t(T,m),T}function s(f){var l,v,m,p,y,L,A=f.length,T=[1732584193,-271733879,-1732584194,271733878];for(l=64;l<=A;l+=64)t(T,r(f.subarray(l-64,l)));for(v=(f=l-64<A?f.subarray(l-64):new Uint8Array(0)).length,m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=0;l<v;l+=1)m[l>>2]|=f[l]<<(l%4<<3);if(m[l>>2]|=128<<(l%4<<3),l>55)for(t(T,m),l=0;l<16;l+=1)m[l]=0;return p=(p=8*A).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(p[2],16),L=parseInt(p[1],16)||0,m[14]=y,m[15]=L,t(T,m),T}function c(f){var l,v="";for(l=0;l<4;l+=1)v+=e[f>>8*l+4&15]+e[f>>8*l&15];return v}function u(f){var l;for(l=0;l<f.length;l+=1)f[l]=c(f[l]);return f.join("")}function g(f){return/[\u0080-\uFFFF]/.test(f)&&(f=unescape(encodeURIComponent(f))),f}function S(f,l){var v,m=f.length,p=new ArrayBuffer(m),y=new Uint8Array(p);for(v=0;v<m;v+=1)y[v]=f.charCodeAt(v);return l?y:p}function C(f){return String.fromCharCode.apply(null,new Uint8Array(f))}function N(f,l,v){var m=new Uint8Array(f.byteLength+l.byteLength);return m.set(new Uint8Array(f)),m.set(new Uint8Array(l),f.byteLength),v?m:m.buffer}function D(f){var l,v=[],m=f.length;for(l=0;l<m-1;l+=2)v.push(parseInt(f.substr(l,2),16));return String.fromCharCode.apply(String,v)}function M(){this.reset()}return u(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function f(l,v){return(l=0|l||0)<0?Math.max(l+v,0):Math.min(l,v)}ArrayBuffer.prototype.slice=function(l,v){var m,p,y,L,A=this.byteLength,T=f(l,A),z=A;return v!==n&&(z=f(v,A)),T>z?new ArrayBuffer(0):(m=z-T,p=new ArrayBuffer(m),y=new Uint8Array(p),L=new Uint8Array(this,T,m),y.set(L),p)}}(),M.prototype.append=function(f){return this.appendBinary(g(f)),this},M.prototype.appendBinary=function(f){this._buff+=f,this._length+=f.length;var l,v=this._buff.length;for(l=64;l<=v;l+=64)t(this._hash,o(this._buff.substring(l-64,l)));return this._buff=this._buff.substring(l-64),this},M.prototype.end=function(f){var l,v,m=this._buff,p=m.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<p;l+=1)y[l>>2]|=m.charCodeAt(l)<<(l%4<<3);return this._finish(y,p),v=u(this._hash),f&&(v=D(v)),this.reset(),v},M.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},M.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},M.prototype.setState=function(f){return this._buff=f.buff,this._length=f.length,this._hash=f.hash,this},M.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},M.prototype._finish=function(f,l){var v,m,p,y=l;if(f[y>>2]|=128<<(y%4<<3),y>55)for(t(this._hash,f),y=0;y<16;y+=1)f[y]=0;v=(v=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),m=parseInt(v[2],16),p=parseInt(v[1],16)||0,f[14]=m,f[15]=p,t(this._hash,f)},M.hash=function(f,l){return M.hashBinary(g(f),l)},M.hashBinary=function(f,l){var v=u(i(f));return l?D(v):v},M.ArrayBuffer=function(){this.reset()},M.ArrayBuffer.prototype.append=function(f){var l,v=N(this._buff.buffer,f,!0),m=v.length;for(this._length+=f.byteLength,l=64;l<=m;l+=64)t(this._hash,r(v.subarray(l-64,l)));return this._buff=l-64<m?new Uint8Array(v.buffer.slice(l-64)):new Uint8Array(0),this},M.ArrayBuffer.prototype.end=function(f){var l,v,m=this._buff,p=m.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<p;l+=1)y[l>>2]|=m[l]<<(l%4<<3);return this._finish(y,p),v=u(this._hash),f&&(v=D(v)),this.reset(),v},M.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},M.ArrayBuffer.prototype.getState=function(){var f=M.prototype.getState.call(this);return f.buff=C(f.buff),f},M.ArrayBuffer.prototype.setState=function(f){return f.buff=S(f.buff,!0),M.prototype.setState.call(this,f)},M.ArrayBuffer.prototype.destroy=M.prototype.destroy,M.ArrayBuffer.prototype._finish=M.prototype._finish,M.ArrayBuffer.hash=function(f,l){var v=u(s(new Uint8Array(f)));return l?D(v):v},M}()),Do.exports),pn=yt(ws);const gn=[];class he{static addHandler(e,t,o){e.addEventListener?e.addEventListener(t,o,!1):e.attachEvent?e.attachEvent("on"+t,o):e["on"+t]=o}static removeHandler(e,t,o){e.removeEventListener?e.removeEventListener(t,o,!1):e.detachEvent?e.detachEvent("on"+t,o):delete e["on"+t]}static windowResizeHandler(e){he.addHandler(window,"resize",e)}static offWindowResizeHandler(e){he.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=window.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const 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 t=e;var o=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(o)o.call(t);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 t=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(t)t.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!!he.fullScreenElement()}static onFullScreenChanged(e){let t;"onfullscreenchange"in window.document?t="fullscreenchange":"onwebkitfullscreenchange"in window.document?t="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(t="mozfullscreenchange"),t?document.addEventListener(t,function(){const o=he.isFullScreen();e(o)}):document.addEventListener("MSFullscreenChange",function(){const o=he.isFullScreen();e(o)})}static stringifyCircularHandler(e,t){if(typeof t=="object"&&t!==null){if(gn.indexOf(t)!==-1)return;gn.push(t)}return t}static jsonStringify(e){if(!e)return"";const t=JSON.stringify(e,he.stringifyCircularHandler);return gn.length=0,t}static jsonParse(e){const t=he.jsonStringify(e);if(t.length>1)return JSON.parse(t)}static getObjectURL(e){let t;const o=window;return o.createObjcectURL!=null?t=o.createOjcectURL(e):window.URL!=null?t=window.URL.createObjectURL(e):window.webkitURL!=null&&(t=window.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=e,s=2097152,c=new pn.ArrayBuffer,u=new FileReader;u.onload=function(g){c.append(g.target?.result);const S=c.end();t({isOK:!0,data:S})},u.onerror=function(){const g="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(g),t({isOK:!1,data:g})},function(){const g=0+s>=i.size?i.size:0+s;u.readAsArrayBuffer(r.call(i,0,g))}()}static getFileMD5(e,t){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=e,s=2097152,c=Math.ceil(i.size/s);let u=0;const g=new pn.ArrayBuffer,S=new FileReader;function C(){const N=u*s,D=N+s>=i.size?i.size:N+s;S.readAsArrayBuffer(r.call(i,N,D))}S.onload=function(N){if(g.append(N.target?.result),u++,u<c)C();else{const D=g.end();t({isOK:!0,data:D})}},S.onerror=function(){const N=`${i.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(N),t({isOK:!1,data:N})},C()}static MD5(e,t=!1){return pn.hash(e,t)}static copyTextByCommand(e){return new Promise((t,o)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),t(!0)})}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then(function(){return!0},function(t){return!1}):he.copyTextByCommand(e);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(t);try{return document.execCommand("copy"),o.removeRange(t),!0}catch(r){return o.removeRange(t),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(e){if(!navigator.clipboard)return he.copyElementTextByCommand(e);const t=document.createRange();t.selectNode(document.getElementById(e));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(t),navigator.clipboard.writeText(o).then(function(){return o.removeRange(t),!0},function(r){return o.removeRange(t),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(e){he.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,t,o){const r=o||document.body;let{className:i}=r;i=i.replace(t,""),r.className=e?`${i} ${t} `:i}static setCssVar(e,t,o=document.documentElement){o.style.setProperty(e,t)}static dispatchWindowResize(){const e=new Event("resize");window.dispatchEvent(e)}static dispatchElementEvent(e,t="click",o){let r;if(r=vt(e)?document.getElementById(e):e,r){const i=new Event(t,{bubbles:!0,cancelable:!0});o&&r.addEventListener("ev",s=>{o(s)},!1),r.dispatchEvent(i)}}static getRandomNum(e,t){var o=t-e,r=Math.random();return e+Math.round(r*o)}static merge(e={},t={}){let o,r,i,s;for(e||(e={}),r=0,i=t.length;r<i;r++)for(o in s=t[r],s)e[o]=s[o];return e}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let o in t)e.options[o]=t[o];return e.options}static formatNum(e,t){let o=Math.pow(10,t===void 0?6:t);return Math.round(e*o)/o}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static splitWords(e){return this.trim(e).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(e,t){let o=null;return function(){o&&clearTimeout(o),o=setTimeout(e,t)}}static throttle(e,t){let o=!0;return function(){if(!o)return!1;o=!1,setTimeout(()=>{e(),o=!0},t)}}static dataURLtoBlob(e){let t=e.split(",");if(!t||t.length===0)return;let o=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,s=new Uint8Array(i);for(;i--;)s[i]=r.charCodeAt(i);return new Blob([s],{type:o})}static getElement(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let o=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!o||o==="auto")&&document.defaultView){let r=document.defaultView.getComputedStyle(e,null);o=r?r[t]:null}return o==="auto"?null:o}static create(e,t,o){let r=document.createElement(e);return r.className=t||"",o&&o.appendChild(r),r}static removeElement(e){let t=e.parentNode;t&&t.removeChild(e)}static emptyElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let o=this.getClass(e);return o.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(o)}static addClass(e,t){if(e.classList!==void 0){let o=this.splitWords(t);for(let r=0,i=o.length;r<i;r++)e.classList.add(o[r])}else if(!this.hasClass(e,t)){let o=this.getClass(e);this.setClass(e,(o?o+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,this.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvgElement(e,t,o,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",e),i.setAttribute("height",t),i.setAttribute("viewBox",`0 0 ${e} ${t}`);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(e,t=!0,o=""){t=t??!1;let r=document.createElement("div");return r.className=o||"",r.innerHTML=e,t?r:r.childNodes}static createVideoHTML(e,t,o){let r=this.create("video",t,o),i=this.create("source","",r);i.setAttribute("src",e),i.setAttribute("type","video/map4");let s=this.create("source","",r);return s.setAttribute("src",e),s.setAttribute("type","video/quicktime"),r}static readFileBytes(e){return new Promise((t,o)=>{const r=new FileReader;r.onload=function(i){const s=r.result,c=s.indexOf("64,"),u=s.substring(c+3);t(u)},r.readAsDataURL(e)})}}class wt{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,(t,o)=>o.toUpperCase()).replace("views","")}}class bt{prefixKey;storage;constructor(e="",t=localStorage){this.prefixKey=e,this.storage=t}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,t,o=604800){const r=JSON.stringify({value:t,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(e),r)}get(e,t=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 t}return t}getJsonObject(e){const t=this.storage.getItem(this.getKey(e));if(t)try{const o=JSON.parse(t);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,t,o=604800){document.cookie=`${this.getKey(e)}=${t}; Max-Age=${o}`}getCookie(e){const t=document.cookie.split("; ");for(let o=0,r=t.length;o<r;o++){const i=t[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 t=e.length;t--;)document.cookie=e[t]+"=0;expire="+new Date(0).toUTCString()}}const bs=new bt("",localStorage);function Lo(){let n=[];const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var t=0;t<36;t++){const r=Math.floor(16*Math.random());n[t]=e.substring(r,r+1)}n[14]="4";const o=3&Number(n[19])|8;return n[19]=e.substring(o,o+1),n[8]=n[13]=n[18]=n[23]="-",n.join("")}function _s(){var n=new Date().getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var o=(n+16*Math.random())%16|0;return n=Math.floor(n/16),(t==="x"?o:3&o|8).toString(16)});return e}function Ss(n){const e=n.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),t=parseFloat(e[3]||"1"),o=Math.floor(t*parseInt(e[0])+255*(1-t)),r=Math.floor(t*parseInt(e[1])+255*(1-t)),i=Math.floor(t*parseInt(e[2])+255*(1-t));return"#"+("0"+o.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)}function Cs(n){var e=n.toLowerCase();if(_t(n)){if(e.length===4){for(var t="#",o=1;o<4;o+=1){const i=e.slice(o,o+1);t+=i.concat(i)}e=t}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 Es(n){const e=n;if(e.length===4){let o="#";for(var t=1;t<4;t+=1){const r=e.slice(t,t+1);o+=r.concat(r)}return o}return e}var ze;function ks(n){if(typeof n=="object"||!n)return;const e=n.toLowerCase().substring(0,1);return e==="#"?ze.Hex:e==="r"||e==="("?ze.RGBA:e==="h"?ze.Hsla:ze.RGBA}function xs(n){if(n){var e=n.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 t,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)t=o=r=c;else{var u=c<=.5?c*(s+1):c+s-c*s,g=2*c-u;t=mn(g,u,i+1/3),o=mn(g,u,i),r=mn(g,u,i-1/3)}return`rgba(${t=Math.round(255*t)},${o=Math.round(255*o)},${r=Math.round(255*r)},${e[4]?parseFloat(e[4]):1})`}}}function mn(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+6*(e-n)*t:t<.5?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function _t(n){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(n)}function Is(n,e,t){const o=(n<<16|e<<8|t).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function vn(n){let e=n.toLowerCase();if(_t(n)){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 t=[];for(let o=1;o<7;o+=2)t.push(parseInt("0x"+e.slice(o,o+2)));return"RGB("+t.join(",")+")"}return e}function Ts(n){if(!_t(n))return;const[e,t,o]=vn(n).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*e+.578*t+.114*o<192}function Rs(n,e){return n=n.indexOf("#")>=0?n.substring(1,n.length):n,e=Math.trunc(255*e/100),`#${wn(n.substring(0,2),e)}${wn(n.substring(2,4),e)}${wn(n.substring(4,6),e)}`}function Ps(n,e){return n=n.indexOf("#")>=0?n.substring(1,n.length):n,e=Math.trunc(255*e/100),`#${yn(n.substring(0,2),e)}${yn(n.substring(2,4),e)}${yn(n.substring(4,6),e)}`}function yn(n,e){const t=parseInt(n,16)+e,o=t>255?255:t;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function $o(n,e,t){const o=[n,e,t].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 Ms(n){return function(e,t){return($o(~~e[0],~~e[1],~~e[2])+.05)/($o(t[0],t[1],t[2])+.05)}(vn(n.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function wn(n,e){const t=parseInt(n,16)-e,o=t<0?0:t;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function bn(n){return{all:n=n||new Map,on(e,t){const o=n.get(e);o?o.push(t):n.set(e,[t])},off(e,t){const o=n.get(e);o&&(t?o.splice(o.indexOf(t)>>>0,1):n.set(e,[]))},emit(e,t){let o=n.get(e);o&&o.slice().map(r=>{r(t)}),o=n.get("*"),o&&o.slice().map(r=>{r(e,t)})}}}(function(n){n[n.RGBA=0]="RGBA",n[n.Hex=1]="Hex",n[n.Hsla=2]="Hsla"})(ze||(ze={}));const Ae=bn(),se={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded"},St=(n,e)=>{const t=document.createElement("a");t.download=e,t.style.display="none";const o=new Blob([n],{type:"application/octet-stream"});t.href=URL.createObjectURL(o),document.body.appendChild(t),t.click(),document.body.removeChild(t)};function zs(n,e){const t=window.URL||window.webkitURL||window,o=new Blob([n]),r=document.createElement("a");r.href=t.createObjectURL(o),r.download=e,r.click(),t.revokeObjectURL(r.href)}const No=(n,e)=>{const t=JSON.stringify(n,null,2);e?St(t,e+".json"):Ae.emit(se.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},As=(n,e,t)=>{n.get(e,{responseType:"blob"}).then(function(o){St(o.data,t)}).catch(o=>{console.warn(o),Ae.emit(se.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function Ds(n){const e=new Date().getTime();let t=new Date().getTime();for(;t-e<n;)t=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${Bo}\u6BEB\u79D2`)}function Bo(n){return new Promise(e=>setTimeout(e,n))}var Wo,_n={exports:{}},Uo,Oo,Sn,Cn=(Wo||(Wo=1,Oo=_n.exports,Sn=function(){var n=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],r={},i=null;function s(D,M){var f=D[M];if(typeof f.bind=="function")return f.bind(D);try{return Function.prototype.bind.call(f,D)}catch{return function(){return Function.prototype.apply.apply(f,[D,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 u(){for(var D=this.getLevel(),M=0;M<o.length;M++){var f=o[M];this[f]=M<D?n:this.methodFactory(f,D,this.name)}if(this.log=this.debug,typeof console===e&&D<this.levels.SILENT)return"No console available for logging"}function g(D){return function(){typeof console!==e&&(u.call(this),this[D].apply(this,arguments))}}function S(D,M,f){return function(l){return l==="debug"&&(l="log"),typeof console!==e&&(l==="trace"&&t?c:console[l]!==void 0?s(console,l):console.log!==void 0?s(console,"log"):n)}(D)||g.apply(this,arguments)}function C(D,M){var f,l,v,m=this,p="loglevel";function y(){var T;if(typeof window!==e&&p){try{T=window.localStorage[p]}catch{}if(typeof T===e)try{var z=window.document.cookie,W=encodeURIComponent(p),O=z.indexOf(W+"=");O!==-1&&(T=/^([^;]+)/.exec(z.slice(O+W.length+1))[1])}catch{}return m.levels[T]===void 0&&(T=void 0),T}}function L(T){var z=T;if(typeof z=="string"&&m.levels[z.toUpperCase()]!==void 0&&(z=m.levels[z.toUpperCase()]),typeof z=="number"&&z>=0&&z<=m.levels.SILENT)return z;throw new TypeError("log.setLevel() called with invalid level: "+T)}typeof D=="string"?p+=":"+D:typeof D=="symbol"&&(p=void 0),m.name=D,m.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},m.methodFactory=M||S,m.getLevel=function(){return v??l??f},m.setLevel=function(T,z){return v=L(T),z!==!1&&function(W){var O=(o[W]||"silent").toUpperCase();if(typeof window!==e&&p){try{return void(window.localStorage[p]=O)}catch{}try{window.document.cookie=encodeURIComponent(p)+"="+O+";"}catch{}}}(v),u.call(m)},m.setDefaultLevel=function(T){l=L(T),y()||m.setLevel(T,!1)},m.resetLevel=function(){v=null,function(){if(typeof window!==e&&p){try{window.localStorage.removeItem(p)}catch{}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}(),u.call(m)},m.enableAll=function(T){m.setLevel(m.levels.TRACE,T)},m.disableAll=function(T){m.setLevel(m.levels.SILENT,T)},m.rebuild=function(){if(i!==m&&(f=L(i.getLevel())),u.call(m),i===m)for(var T in r)r[T].rebuild()},f=L(i?i.getLevel():"WARN");var A=y();A!=null&&(v=L(A)),u.call(m)}(i=new C).getLogger=function(D){if(typeof D!="symbol"&&typeof D!="string"||D==="")throw new TypeError("You must supply a name when creating a logger.");var M=r[D];return M||(M=r[D]=new C(D,i.methodFactory)),M};var N=typeof window!==e?window.log:void 0;return i.noConflict=function(){return typeof window!==e&&window.log===i&&(window.log=N),i},i.getLoggers=function(){return r},i.default=i,i},(Uo=_n).exports?Uo.exports=Sn():Oo.log=Sn()),_n.exports);class Ho{message;eventBus;constructor(e,t=void 0){e&&(this.message=e),t&&(this.eventBus=t)}msg(e,t=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:e,duration:t});else switch(o){case"info":this.message.info(e,t);break;case"success":this.message.success(e,t);break;case"warning":this.message.warn?this.message.warn(e,t):this.message.warning&&this.message.warning(e,t);break;case"error":this.message.error(e,t)}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(se.AlertInfoEvent,{type:o,info:e})}}info(e,t=3){this.msg(e,t,"info")}warn(e,t=3){this.msg(e,t,"warning")}err(e,t=3){this.msg(e,t,"error")}success(e,t=3){this.msg(e,t,"success")}}let jo=!1;const B={Config:SysConfig,EventBus:Ae,DefaultProxyClient:null,Axios:ji,Message:new Ho(void 0,Ae),LayoutMap:new Map,getLayoutManager:n=>{if(!B.WidgetConfigList||B.WidgetConfigList.length===0)return;const e=B.WidgetConfigList.find(t=>t.id===n);if(e){const t=e.layoutID;if(t&&B.LayoutMap.has(t))return B.LayoutMap.get(t)}},Logger:n=>{jo||(import.meta.env?.DEV||SysConfig.UI.ProductLog?Cn.enableAll():Cn.setDefaultLevel("warn"),jo=!0);const e=n||"default";return Cn.getLogger(e)}},qo="access_token",Fe=new bt("user",localStorage);function De(){return Fe.get(qo)}function En(){Fe.remove(qo)}function Fo(){return De()?.refresh}function kn(n,e,t,o="json",r){const i={baseURL:B.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:n,paramsSerializer:{serialize:function(s){return qi.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+De()?.token},responseType:o,cancelToken:r};if(t)for(let s in t)i.headers[s]=t[s];return B.SystemID&&(i.headers.sysid=B.SystemID,B.SystemGroup&&(i.headers.sysgroup=B.SystemGroup)),e&&(i.baseURL=e),i}function Se(n,e,t,o,r="json",i,s){const c=kn(t,e,o,r,i);return s&&s>=2e4&&(c.timeout=s),B.Axios?.get(n,c).catch(function(u){Ct(u,e,n,"Get")})}function Ct(n,e,t,o="Get"){const r=`${e}${t}`;if(n&&n.response){let i=!1;const s=n.response.status;switch(s){case 400:n.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:n.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:n.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:n.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:n.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:n.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const u=n.response.data;if(u){const g=u.indexOf(":"),S=u.indexOf(`
|
|
1
|
+
import{h as Di,openBlock as F,createElementBlock as fe,normalizeStyle as ge,renderSlot as ie,defineComponent as Ie,ref as K,withModifiers as _o,reactive as So,getCurrentInstance as Li,computed as je,watch as Te,onMounted as Zt,onBeforeUnmount as $i,nextTick as Co,resolveComponent as ut,createBlock as Q,Transition as Eo,withCtx as we,withDirectives as ko,createElementVNode as J,Fragment as Re,createTextVNode as Qt,toDisplayString as en,createCommentVNode as ne,vShow as xo,markRaw as Ni,onErrorCaptured as Bi,Suspense as Wi,createVNode as ht,KeepAlive as Io,resolveDynamicComponent as be,toRefs as Ui,renderList as He,normalizeClass as Pe,TransitionGroup as Oi,onUnmounted as ji,unref as tn}from"vue";import Hi from"axios";import qi from"qs";import{Client as Fi,ClientContext as nn}from"@hprose/rpc-core";import{ByteStream as ke,Writer as on,Reader as rn,ValueReader as Xi}from"@hprose/io";import{HttpTransport as Vi}from"@hprose/rpc-html5";import{Icon as sn}from"@iconify/vue";var Gi={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((n,e)=>(n[e.id]=e)&&n,{})}},methods:{updatePaneComponents(){this.panes.forEach(n=>{n.update&&n.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[n.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(n,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(n){this.touch.mouseDown&&(n.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(n)),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(n=>({min:n.min,max:n.max,size:n.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(n,e){"ontouchstart"in window&&(n.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(n,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(n,e){let t=0;this.panes=this.panes.map((o,r)=>(o.size=r===e?o.max:o.min,r!==e&&(t+=o.min),o)),this.panes[e].size-=t,this.$emit("pane-maximize",this.panes[e])},onPaneClick(n,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(n){const e=this.container.getBoundingClientRect(),{clientX:t,clientY:o}="ontouchstart"in window&&n.touches?n.touches[0]:n;return{x:t-e.left,y:o-e.top}},getCurrentDragPercentage(n){n=n[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(n=e-n),100*n/e},calculatePanesSize(n){const e=this.touch.activeSplitter;let t={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:t.prevPanesSize),r=100-(this.pushOtherPanes?0:t.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(n),r),o);let s=[e,e+1],c=this.panes[s[0]]||null,u=this.panes[s[1]]||null;const g=c.max<100&&i>=c.max+t.prevPanesSize,S=u.max<100&&i<=100-(u.max+this.sumNextPanesSize(e+1));if(g||S)g?(c.size=c.max,u.size=Math.max(100-c.max-t.prevPanesSize-t.nextPanesSize,0)):(c.size=Math.max(100-u.max-t.prevPanesSize-this.sumNextPanesSize(e+1),0),u.size=u.max);else{if(this.pushOtherPanes){const C=this.doPushOtherPanes(t,i);if(!C)return;({sums:t,panesToResize:s}=C),c=this.panes[s[0]]||null,u=this.panes[s[1]]||null}c!==null&&(c.size=Math.min(Math.max(i-t.prevPanesSize-t.prevReachedMinPanes,c.min),c.max)),u!==null&&(u.size=Math.min(Math.max(100-i-t.nextPanesSize-t.nextReachedMinPanes,u.min),u.max))}},doPushOtherPanes(n,e){const t=this.touch.activeSplitter,o=[t,t+1];return e<n.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(t).index,n.prevReachedMinPanes=0,o[0]<t&&this.panes.forEach((r,i)=>{i>o[0]&&i<=t&&(r.size=r.min,n.prevReachedMinPanes+=r.min)}),n.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(n.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,i)=>{i>0&&i<=t&&(r.size=r.min,n.prevReachedMinPanes+=r.min)}),this.panes[o[1]].size=100-n.prevReachedMinPanes-this.panes[0].min-n.prevPanesSize-n.nextPanesSize,null):e>100-n.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(t).index,n.nextReachedMinPanes=0,o[1]>t+1&&this.panes.forEach((r,i)=>{i>t&&i<o[1]&&(r.size=r.min,n.nextReachedMinPanes+=r.min)}),n.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(n.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,i)=>{i<this.panesCount-1&&i>=t+1&&(r.size=r.min,n.nextReachedMinPanes+=r.min)}),this.panes[o[0]].size=100-n.prevPanesSize-n.nextReachedMinPanes-this.panes[this.panesCount-1].min-n.nextPanesSize,null):{sums:n,panesToResize:o}},sumPrevPanesSize(n){return this.panes.reduce((e,t,o)=>e+(o<n?t.size:0),0)},sumNextPanesSize(n){return this.panes.reduce((e,t,o)=>e+(o>n+1?t.size:0),0)},findPrevExpandedPane(n){return[...this.panes].reverse().find(e=>e.index<n&&e.size>e.min)||{}},findNextExpandedPane(n){return this.panes.find(e=>e.index>n+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(n=>{const e=n.classList.contains("splitpanes__pane"),t=n.classList.contains("splitpanes__splitter");if(!e&&!t)return n.parentNode.removeChild(n),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(n,e,t=!1){const o=n-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),t||(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(n){n.onmousedown=void 0,n.onclick=void 0,n.ondblclick=void 0,n.parentNode.removeChild(n)},redoSplitters(){const n=Array.from(this.container.children);n.forEach(t=>{t.className.includes("splitpanes__splitter")&&this.removeSplitter(t)});let e=0;n.forEach(t=>{t.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,t,!0):e&&this.addSplitter(e,t),e++)})},requestUpdate({target:n,...e}){const t=this.indexedPanes[n._.uid];Object.entries(e).forEach(([o,r])=>t[o]=r)},onPaneAdd(n){let e=-1;Array.from(n.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&e++,r===n.$el));const t=parseFloat(n.minSize),o=parseFloat(n.maxSize);this.panes.splice(e,0,{id:n._.uid,index:e,min:isNaN(t)?0:t,max:isNaN(o)?100:o,size:n.size===null?null:parseFloat(n.size),givenSize:n.size,update:n.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(n){const e=this.panes.findIndex(o=>o.id===n._.uid),t=this.panes.splice(e,1)[0];this.panes.forEach((o,r)=>o.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...t,index:e}}),this.$emit("pane-remove",{removed:t,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(n={}){n.addedPane||n.removedPane?this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(n):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const n=100/this.panesCount;let e=0;const t=[],o=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(n,r.max),r.min),e-=r.size,r.size>=r.max&&t.push(r.id),r.size<=r.min&&o.push(r.id)}),e>.1&&this.readjustSizes(e,t,o)},initialPanesSizing(){let n=100;const e=[],t=[];let o=0;this.panes.forEach(i=>{n-=i.size,i.size!==null&&o++,i.size>=i.max&&e.push(i.id),i.size<=i.min&&t.push(i.id)});let r=100;n>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(n/(this.panesCount-o),i.max),i.min)),r-=i.size}),r>.1&&this.readjustSizes(n,e,t))},equalizeAfterAddOrRemove({addedPane:n}={}){let e=100/this.panesCount,t=0;const o=[],r=[];n&&n.givenSize!==null&&(e=(100-n.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{t-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),!(Math.abs(t)<.1)&&(this.panes.forEach(i=>{n&&n.givenSize!==null&&n.id===i.id||(i.size=Math.max(Math.min(e,i.max),i.min)),t-=i.size,i.size>=i.max&&o.push(i.id),i.size<=i.min&&r.push(i.id)}),t>.1&&this.readjustSizes(t,o,r))},readjustSizes(n,e,t){let o;o=n>0?n/(this.panesCount-e.length):n/(this.panesCount-t.length),this.panes.forEach(r=>{if(n>0&&!e.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;n-=s,r.size=i}else if(!t.includes(r.id)){const i=Math.max(Math.min(r.size+o,r.max),r.min),s=i-r.size;n-=s,r.size=i}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(n)>.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(n){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,t)=>{e.ondblclick=n?o=>this.onSplitterDblClick(o,t):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return Di("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},an={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(n){this.style=n}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(n){this.requestUpdate({target:this,size:n})},minSizeNumber(n){this.requestUpdate({target:this,min:n})},maxSizeNumber(n){this.requestUpdate({target:this,max:n})}}};function cn(n){return window.TouchEvent&&n instanceof TouchEvent}an.render=function(n,e,t,o,r,i){return F(),fe("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=s=>i.onPaneClick(s,n._.uid)),style:ge(n.style)},[ie(n.$slots,"default")],4)},an.__file="src/controls/splitpanes/pane.vue";class de{e;constructor(e){this.e=e}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return cn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return cn(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Jn(this.clientX,this.clientY)}static bindDown(e,t,o,r=!1){const i=c=>{t(new de(c))},s=c=>{c.touches.length===1&&t(new de(c)),c.touches.length>1&&o&&o(new de(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,t,o=!1){const r=s=>{t(new de(s))},i=s=>{s.touches.length===1&&t(new de(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,t,o=!1){const r=s=>{t(new de(s))},i=s=>{s.touches.length===0&&t(new de(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:t}){cn(this.e)?t&&t(this.e):e&&e(this.e)}}class Jn{x;y;constructor(e,t){this.x=e,this.y=t}clone(){return new Jn(this.x,this.y)}}class Ki{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(e,t,o={}){this.handle=e,this.container=t,this.options=o,e&&(this.unbindDown=de.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=>{e.preventDefault(),this.handle&&(this.offsetX=e.clientX,this.offsetY=e.clientY),this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=de.bindMove(document,this.mousemove),this.unbindUp=de.bindUp(document,this.mouseup)};mousemove=e=>{this.container&&(this.container.style.left=`calc(${e.clientX-this.offsetX}px + ${this.container.style.left})`,this.container.style.top=`calc(${e.clientY-this.offsetY}px + ${this.container.style.top})`,this.offsetX=e.clientX,this.offsetY=e.clientY),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 Ji{_group;onChange;zIndex;constructor(e,t){this._group=e,this.onChange=t,this.a(o=>o.push(this))}set group(e){this._group=e;const t=ft(this._group),o=ft(e);t.splice(t.indexOf(this),1),o.push(this),Ro()}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(ft(this._group)),Ro()}}const dt=new Map,Yi=0;function ft(n){return dt.has(n)||dt.set(n,[]),dt.get(n)}function To(n,e){return n>e?-To(e,n):n<0&&e>=0?1:n-e}function Ro(){let n=Yi;for(const e of function(t){const o=[];return t.forEach((r,i)=>o.push(i)),o}(dt).sort(To))for(const t of ft(e))n!=t.zIndex&&(t.zIndex=n,t.onChange(n)),n++}function ln(n){if(n){const{width:e,height:t}=n.style;n.style.width="auto",n.style.height="auto";const o=pt(n);return n.style.width=e,n.style.height=t,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function pt(n){const e=n.getBoundingClientRect(),t=e.width,o=e.height,r=e.top,i=e.left;return{width:t,height:o,top:r,left:i,bottom:r+o,right:i+t}}class Zi{container;options;handles;constructor(e,t){if(this.container=e,this.options=t,e&&t){this.handles=Po.map(u=>new u(e,this));const{width:o,height:r}=ln(e),i=t.maxWidth||window.innerWidth,s=t.maxHeight||window.innerHeight;let c=!1;(o<t.minWidth||o>i)&&(e.style.width=`${Mo(o,t.minWidth,i)}px`,c=!0),(r<t.minHeight||r>s)&&(e.style.height=`${Mo(r,t.minHeight,s)}px`,c=!0),c&&t.onResize&&t.onResize()}}teardown(){this.handles?.forEach(e=>e.teardown())}}const Po=[];class xe{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(e,t){this.container=e,this.helper=t,this.handle=this.createHandleElement(),this.unbindDown=de.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:t,top:o,width:r,height:i}=pt(this.container);this.x0=e.clientX,this.y0=e.clientY,this.left0=t,this.top0=o,this.width0=r,this.height0=i,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=de.bindMove(document,this.mousemove),this.unbindUp=de.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:e,top:t,right:o,bottom:r}=pt(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=t+i.minHeight,this.maxBottom=Math.min(t+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:t,left:o,top:r,right:i,bottom:s}=pt(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=t+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"),t=e.style;return t.position="absolute",this.applyStyle(t),this.container.appendChild(e),e}}function Mo(n,e,t){return n<e?e:n>t?t:n}Po.push(class extends xe{setPosition(n){this.container.style.width=this.width0+n.clientX-this.x0+"px",this.container.style.height=this.height0+n.clientY-this.y0+"px"}applyStyle(n){n.width=2*this.handleSize+"px",n.height=2*this.handleSize+"px",n.right=-this.handleSize+"px",n.bottom=-this.handleSize+"px",n.cursor="nwse-resize"}},class extends xe{setPosition(n){this.container.style.height=this.height0+n.clientY-this.y0+"px"}applyStyle(n){n.right=`${this.handleSize}px`,n.left=`${this.handleSize}px`,n.height=2*this.handleSize+"px",n.bottom=-this.handleSize+"px",n.cursor="ns-resize"}},class extends xe{setPosition(n){this.container.style.left=this.left0+n.clientX-this.x0+"px",this.container.style.width=this.width0-(n.clientX-this.x0)+"px",this.container.style.height=this.height0+n.clientY-this.y0+"px"}applyStyle(n){n.left=-this.handleSize+"px",n.bottom=-this.handleSize+"px",n.width=2*this.handleSize+"px",n.height=2*this.handleSize+"px",n.cursor="nesw-resize"}},class extends xe{setPosition(n){this.container.style.left=this.left0+n.clientX-this.x0+"px",this.container.style.width=this.width0-(n.clientX-this.x0)+"px"}applyStyle(n){n.left=-this.handleSize+"px",n.bottom=`${this.handleSize}px`,n.width=2*this.handleSize+"px",n.top=`${this.handleSize}px`,n.cursor="ew-resize"}},class extends xe{setPosition(n){this.container.style.left=this.left0+n.clientX-this.x0+"px",this.container.style.width=this.width0-(n.clientX-this.x0)+"px",this.container.style.top=this.top0+n.clientY-this.y0+"px",this.container.style.height=this.height0-(n.clientY-this.y0)+"px"}applyStyle(n){n.left=-this.handleSize+"px",n.top=-this.handleSize+"px",n.width=2*this.handleSize+"px",n.height=2*this.handleSize+"px",n.cursor="nwse-resize"}},class extends xe{setPosition(n){this.container.style.top=this.top0+n.clientY-this.y0+"px",this.container.style.height=this.height0-(n.clientY-this.y0)+"px"}applyStyle(n){n.left=`${this.handleSize}px`,n.right=`${this.handleSize}px`,n.height=2*this.handleSize+"px",n.top=-this.handleSize+"px",n.cursor="ns-resize"}},class extends xe{setPosition(n){this.container.style.top=this.top0+n.clientY-this.y0+"px",this.container.style.height=this.height0-(n.clientY-this.y0)+"px",this.container.style.width=this.width0+n.clientX-this.x0+"px"}applyStyle(n){n.right=-this.handleSize+"px",n.top=-this.handleSize+"px",n.height=2*this.handleSize+"px",n.width=2*this.handleSize+"px",n.cursor="nesw-resize"}},class extends xe{setPosition(n){this.container.style.width=this.width0+n.clientX-this.x0+"px"}applyStyle(n){n.right=-this.handleSize+"px",n.top=`${this.handleSize}px`,n.bottom=`${this.handleSize}px`,n.width=2*this.handleSize+"px",n.cursor="ew-resize"}});var gt=Ie({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(n){const e=K(!1),t=K(!1);return{hover:e,active:t,style:function(){let o=n.windowStyle.button;return e.value&&(o={...o,...this.windowStyle.buttonHover}),t.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),t.value=!0;const r=de.bindUp(document,()=>{t.value=!1,r()})}}}});const Qi=["disabled"];gt.render=function(n,e,t,o,r,i){return F(),fe("div",{class:"btn",style:ge(n.style()),onMouseenter:e[0]||(e[0]=s=>n.hover=!0),onMouseleave:e[1]||(e[1]=s=>n.hover=!1),onMousedown:e[2]||(e[2]=_o((...s)=>n.mousedown&&n.mousedown(...s),["stop"])),onTouchstart:e[3]||(e[3]=_o((...s)=>n.mousedown&&n.mousedown(...s),["stop"])),onMouseup:e[4]||(e[4]=(...s)=>n.mouseup&&n.mouseup(...s)),onTouchend:e[5]||(e[5]=(...s)=>n.mouseup&&n.mouseup(...s)),disabled:n.disabled},[ie(n.$slots,"default")],44,Qi)},gt.__scopeId="data-v-71662210",gt.__file="src/controls/vuewindow/window/Button.vue";const es=Object.prototype.toString;function ue(n,e){return es.call(n)===`[object ${e}]`}function mt(n){return ue(n,"Function")}const zo=n=>typeof n<"u",un=n=>!zo(n);function hn(n){return n===null}function ts(n){return un(n)&&hn(n)}function ns(n){return un(n)||hn(n)}const Me=n=>n!=null&&n!==null&&ue(n,"Object");function os(n){return ue(n,"Date")}function dn(n){return ue(n,"Number")}function rs(n){return ue(n,"AsyncFunction")}function is(n){return ue(n,"Promise")&&Me(n)&&mt(n.then)&&mt(n.catch)}function vt(n){return ue(n,"String")}function ss(n){return n===!0||n===!1||ue(n,"Boolean")}function fn(n){return n&&Array.isArray(n)}const as=()=>typeof window<"u",cs=n=>typeof window<"u"&&ue(n,"Window"),ls=n=>Me(n)&&!!n.tagName,us=typeof window>"u";function hs(n){return n&&["IMAGE","IMG"].includes(n.tagName)}function ds(n){return n==null||(vt(n)||fn(n)?n.length===0:!!Me(n)&&JSON.stringify(n)==="{}")}function fs(n){return ue(n,"Error")}function ps(n){return ue(n,"WeakSet")}function gs(n){return ue(n,"WeakMap")}function ms(n){return ue(n,"Symbol")}function vs(n){return ue(n,"Map")}const ys=n=>/^(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(n);var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ao,Do={exports:{}},ws=(Ao||(Ao=1,Do.exports=function(n){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(f,l){var v=f[0],m=f[1],p=f[2],y=f[3];m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[0]-680876936|0)<<7|v>>>25)+m|0)&m|~v&p)+l[1]-389564586|0)<<12|y>>>20)+v|0)&v|~y&m)+l[2]+606105819|0)<<17|p>>>15)+y|0)&y|~p&v)+l[3]-1044525330|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[4]-176418897|0)<<7|v>>>25)+m|0)&m|~v&p)+l[5]+1200080426|0)<<12|y>>>20)+v|0)&v|~y&m)+l[6]-1473231341|0)<<17|p>>>15)+y|0)&y|~p&v)+l[7]-45705983|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[8]+1770035416|0)<<7|v>>>25)+m|0)&m|~v&p)+l[9]-1958414417|0)<<12|y>>>20)+v|0)&v|~y&m)+l[10]-42063|0)<<17|p>>>15)+y|0)&y|~p&v)+l[11]-1990404162|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&p|~m&y)+l[12]+1804603682|0)<<7|v>>>25)+m|0)&m|~v&p)+l[13]-40341101|0)<<12|y>>>20)+v|0)&v|~y&m)+l[14]-1502002290|0)<<17|p>>>15)+y|0)&y|~p&v)+l[15]+1236535329|0)<<22|m>>>10)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[1]-165796510|0)<<5|v>>>27)+m|0)&p|m&~p)+l[6]-1069501632|0)<<9|y>>>23)+v|0)&m|v&~m)+l[11]+643717713|0)<<14|p>>>18)+y|0)&v|y&~v)+l[0]-373897302|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[5]-701558691|0)<<5|v>>>27)+m|0)&p|m&~p)+l[10]+38016083|0)<<9|y>>>23)+v|0)&m|v&~m)+l[15]-660478335|0)<<14|p>>>18)+y|0)&v|y&~v)+l[4]-405537848|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[9]+568446438|0)<<5|v>>>27)+m|0)&p|m&~p)+l[14]-1019803690|0)<<9|y>>>23)+v|0)&m|v&~m)+l[3]-187363961|0)<<14|p>>>18)+y|0)&v|y&~v)+l[8]+1163531501|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m&y|p&~y)+l[13]-1444681467|0)<<5|v>>>27)+m|0)&p|m&~p)+l[2]-51403784|0)<<9|y>>>23)+v|0)&m|v&~m)+l[7]+1735328473|0)<<14|p>>>18)+y|0)&v|y&~v)+l[12]-1926607734|0)<<20|m>>>12)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[5]-378558|0)<<4|v>>>28)+m|0)^m^p)+l[8]-2022574463|0)<<11|y>>>21)+v|0)^v^m)+l[11]+1839030562|0)<<16|p>>>16)+y|0)^y^v)+l[14]-35309556|0)<<23|m>>>9)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[1]-1530992060|0)<<4|v>>>28)+m|0)^m^p)+l[4]+1272893353|0)<<11|y>>>21)+v|0)^v^m)+l[7]-155497632|0)<<16|p>>>16)+y|0)^y^v)+l[10]-1094730640|0)<<23|m>>>9)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[13]+681279174|0)<<4|v>>>28)+m|0)^m^p)+l[0]-358537222|0)<<11|y>>>21)+v|0)^v^m)+l[3]-722521979|0)<<16|p>>>16)+y|0)^y^v)+l[6]+76029189|0)<<23|m>>>9)+p|0,m=((m+=((p=((p+=((y=((y+=((v=((v+=(m^p^y)+l[9]-640364487|0)<<4|v>>>28)+m|0)^m^p)+l[12]-421815835|0)<<11|y>>>21)+v|0)^v^m)+l[15]+530742520|0)<<16|p>>>16)+y|0)^y^v)+l[2]-995338651|0)<<23|m>>>9)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[0]-198630844|0)<<6|v>>>26)+m|0)|~p))+l[7]+1126891415|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[14]-1416354905|0)<<15|p>>>17)+y|0)|~v))+l[5]-57434055|0)<<21|m>>>11)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[12]+1700485571|0)<<6|v>>>26)+m|0)|~p))+l[3]-1894986606|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[10]-1051523|0)<<15|p>>>17)+y|0)|~v))+l[1]-2054922799|0)<<21|m>>>11)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[8]+1873313359|0)<<6|v>>>26)+m|0)|~p))+l[15]-30611744|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[6]-1560198380|0)<<15|p>>>17)+y|0)|~v))+l[13]+1309151649|0)<<21|m>>>11)+p|0,m=((m+=((y=((y+=(m^((v=((v+=(p^(m|~y))+l[4]-145523070|0)<<6|v>>>26)+m|0)|~p))+l[11]-1120210379|0)<<10|y>>>22)+v|0)^((p=((p+=(v^(y|~m))+l[2]+718787259|0)<<15|p>>>17)+y|0)|~v))+l[9]-343485551|0)<<21|m>>>11)+p|0,f[0]=v+f[0]|0,f[1]=m+f[1]|0,f[2]=p+f[2]|0,f[3]=y+f[3]|0}function o(f){var l,v=[];for(l=0;l<64;l+=4)v[l>>2]=f.charCodeAt(l)+(f.charCodeAt(l+1)<<8)+(f.charCodeAt(l+2)<<16)+(f.charCodeAt(l+3)<<24);return v}function r(f){var l,v=[];for(l=0;l<64;l+=4)v[l>>2]=f[l]+(f[l+1]<<8)+(f[l+2]<<16)+(f[l+3]<<24);return v}function i(f){var l,v,m,p,y,L,A=f.length,T=[1732584193,-271733879,-1732584194,271733878];for(l=64;l<=A;l+=64)t(T,o(f.substring(l-64,l)));for(v=(f=f.substring(l-64)).length,m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=0;l<v;l+=1)m[l>>2]|=f.charCodeAt(l)<<(l%4<<3);if(m[l>>2]|=128<<(l%4<<3),l>55)for(t(T,m),l=0;l<16;l+=1)m[l]=0;return p=(p=8*A).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(p[2],16),L=parseInt(p[1],16)||0,m[14]=y,m[15]=L,t(T,m),T}function s(f){var l,v,m,p,y,L,A=f.length,T=[1732584193,-271733879,-1732584194,271733878];for(l=64;l<=A;l+=64)t(T,r(f.subarray(l-64,l)));for(v=(f=l-64<A?f.subarray(l-64):new Uint8Array(0)).length,m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=0;l<v;l+=1)m[l>>2]|=f[l]<<(l%4<<3);if(m[l>>2]|=128<<(l%4<<3),l>55)for(t(T,m),l=0;l<16;l+=1)m[l]=0;return p=(p=8*A).toString(16).match(/(.*?)(.{0,8})$/),y=parseInt(p[2],16),L=parseInt(p[1],16)||0,m[14]=y,m[15]=L,t(T,m),T}function c(f){var l,v="";for(l=0;l<4;l+=1)v+=e[f>>8*l+4&15]+e[f>>8*l&15];return v}function u(f){var l;for(l=0;l<f.length;l+=1)f[l]=c(f[l]);return f.join("")}function g(f){return/[\u0080-\uFFFF]/.test(f)&&(f=unescape(encodeURIComponent(f))),f}function S(f,l){var v,m=f.length,p=new ArrayBuffer(m),y=new Uint8Array(p);for(v=0;v<m;v+=1)y[v]=f.charCodeAt(v);return l?y:p}function C(f){return String.fromCharCode.apply(null,new Uint8Array(f))}function N(f,l,v){var m=new Uint8Array(f.byteLength+l.byteLength);return m.set(new Uint8Array(f)),m.set(new Uint8Array(l),f.byteLength),v?m:m.buffer}function D(f){var l,v=[],m=f.length;for(l=0;l<m-1;l+=2)v.push(parseInt(f.substr(l,2),16));return String.fromCharCode.apply(String,v)}function M(){this.reset()}return u(i("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function f(l,v){return(l=0|l||0)<0?Math.max(l+v,0):Math.min(l,v)}ArrayBuffer.prototype.slice=function(l,v){var m,p,y,L,A=this.byteLength,T=f(l,A),z=A;return v!==n&&(z=f(v,A)),T>z?new ArrayBuffer(0):(m=z-T,p=new ArrayBuffer(m),y=new Uint8Array(p),L=new Uint8Array(this,T,m),y.set(L),p)}}(),M.prototype.append=function(f){return this.appendBinary(g(f)),this},M.prototype.appendBinary=function(f){this._buff+=f,this._length+=f.length;var l,v=this._buff.length;for(l=64;l<=v;l+=64)t(this._hash,o(this._buff.substring(l-64,l)));return this._buff=this._buff.substring(l-64),this},M.prototype.end=function(f){var l,v,m=this._buff,p=m.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<p;l+=1)y[l>>2]|=m.charCodeAt(l)<<(l%4<<3);return this._finish(y,p),v=u(this._hash),f&&(v=D(v)),this.reset(),v},M.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},M.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},M.prototype.setState=function(f){return this._buff=f.buff,this._length=f.length,this._hash=f.hash,this},M.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},M.prototype._finish=function(f,l){var v,m,p,y=l;if(f[y>>2]|=128<<(y%4<<3),y>55)for(t(this._hash,f),y=0;y<16;y+=1)f[y]=0;v=(v=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),m=parseInt(v[2],16),p=parseInt(v[1],16)||0,f[14]=m,f[15]=p,t(this._hash,f)},M.hash=function(f,l){return M.hashBinary(g(f),l)},M.hashBinary=function(f,l){var v=u(i(f));return l?D(v):v},M.ArrayBuffer=function(){this.reset()},M.ArrayBuffer.prototype.append=function(f){var l,v=N(this._buff.buffer,f,!0),m=v.length;for(this._length+=f.byteLength,l=64;l<=m;l+=64)t(this._hash,r(v.subarray(l-64,l)));return this._buff=l-64<m?new Uint8Array(v.buffer.slice(l-64)):new Uint8Array(0),this},M.ArrayBuffer.prototype.end=function(f){var l,v,m=this._buff,p=m.length,y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<p;l+=1)y[l>>2]|=m[l]<<(l%4<<3);return this._finish(y,p),v=u(this._hash),f&&(v=D(v)),this.reset(),v},M.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},M.ArrayBuffer.prototype.getState=function(){var f=M.prototype.getState.call(this);return f.buff=C(f.buff),f},M.ArrayBuffer.prototype.setState=function(f){return f.buff=S(f.buff,!0),M.prototype.setState.call(this,f)},M.ArrayBuffer.prototype.destroy=M.prototype.destroy,M.ArrayBuffer.prototype._finish=M.prototype._finish,M.ArrayBuffer.hash=function(f,l){var v=u(s(new Uint8Array(f)));return l?D(v):v},M}()),Do.exports),pn=yt(ws);const gn=[];class he{static addHandler(e,t,o){e.addEventListener?e.addEventListener(t,o,!1):e.attachEvent?e.attachEvent("on"+t,o):e["on"+t]=o}static removeHandler(e,t,o){e.removeEventListener?e.removeEventListener(t,o,!1):e.detachEvent?e.detachEvent("on"+t,o):delete e["on"+t]}static windowResizeHandler(e){he.addHandler(window,"resize",e)}static offWindowResizeHandler(e){he.removeHandler(window,"resize",e)}static fullscreenEnabled(){const e=window.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,t){if(t){const 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 t=e;var o=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;if(o)o.call(t);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 t=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(t)t.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!!he.fullScreenElement()}static onFullScreenChanged(e){let t;"onfullscreenchange"in window.document?t="fullscreenchange":"onwebkitfullscreenchange"in window.document?t="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(t="mozfullscreenchange"),t?document.addEventListener(t,function(){const o=he.isFullScreen();e(o)}):document.addEventListener("MSFullscreenChange",function(){const o=he.isFullScreen();e(o)})}static stringifyCircularHandler(e,t){if(typeof t=="object"&&t!==null){if(gn.indexOf(t)!==-1)return;gn.push(t)}return t}static jsonStringify(e){if(!e)return"";const t=JSON.stringify(e,he.stringifyCircularHandler);return gn.length=0,t}static jsonParse(e){const t=he.jsonStringify(e);if(t.length>1)return JSON.parse(t)}static getObjectURL(e){let t;const o=window;return o.createObjcectURL!=null?t=o.createOjcectURL(e):window.URL!=null?t=window.URL.createObjectURL(e):window.webkitURL!=null&&(t=window.webkitURL.createObjectURL(e)),t}static getFileShortMD5(e,t){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=e,s=2097152,c=new pn.ArrayBuffer,u=new FileReader;u.onload=function(g){c.append(g.target?.result);const S=c.end();t({isOK:!0,data:S})},u.onerror=function(){const g="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(g),t({isOK:!1,data:g})},function(){const g=0+s>=i.size?i.size:0+s;u.readAsArrayBuffer(r.call(i,0,g))}()}static getFileMD5(e,t){const o=File.prototype,r=o.slice||o.mozSlice||o.webkitSlice,i=e,s=2097152,c=Math.ceil(i.size/s);let u=0;const g=new pn.ArrayBuffer,S=new FileReader;function C(){const N=u*s,D=N+s>=i.size?i.size:N+s;S.readAsArrayBuffer(r.call(i,N,D))}S.onload=function(N){if(g.append(N.target?.result),u++,u<c)C();else{const D=g.end();t({isOK:!0,data:D})}},S.onerror=function(){const N=`${i.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(N),t({isOK:!1,data:N})},C()}static MD5(e,t=!1){return pn.hash(e,t)}static copyTextByCommand(e){return new Promise((t,o)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),t(!0)})}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then(function(){return!0},function(t){return!1}):he.copyTextByCommand(e);static copyElementTextByCommand(e){const t=document.createRange();t.selectNode(document.getElementById(e));const o=window.getSelection();o.rangeCount>0&&o.removeAllRanges(),o.addRange(t);try{return document.execCommand("copy"),o.removeRange(t),!0}catch(r){return o.removeRange(t),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(e){if(!navigator.clipboard)return he.copyElementTextByCommand(e);const t=document.createRange();t.selectNode(document.getElementById(e));const o=window.getSelection();return o.rangeCount>0&&o.removeAllRanges(),o.addRange(t),navigator.clipboard.writeText(o).then(function(){return o.removeRange(t),!0},function(r){return o.removeRange(t),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(e){he.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,t,o){const r=o||document.body;let{className:i}=r;i=i.replace(t,""),r.className=e?`${i} ${t} `:i}static setCssVar(e,t,o=document.documentElement){o.style.setProperty(e,t)}static dispatchWindowResize(){const e=new Event("resize");window.dispatchEvent(e)}static dispatchElementEvent(e,t="click",o){let r;if(r=vt(e)?document.getElementById(e):e,r){const i=new Event(t,{bubbles:!0,cancelable:!0});o&&r.addEventListener("ev",s=>{o(s)},!1),r.dispatchEvent(i)}}static getRandomNum(e,t){var o=t-e,r=Math.random();return e+Math.round(r*o)}static merge(e={},t={}){let o,r,i,s;for(e||(e={}),r=0,i=t.length;r<i;r++)for(o in s=t[r],s)e[o]=s[o];return e}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let o in t)e.options[o]=t[o];return e.options}static formatNum(e,t){let o=Math.pow(10,t===void 0?6:t);return Math.round(e*o)/o}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static splitWords(e){return this.trim(e).split(/\s+/)}static emptyImageUrl(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}static debounce(e,t){let o=null;return function(){o&&clearTimeout(o),o=setTimeout(e,t)}}static throttle(e,t){let o=!0;return function(){if(!o)return!1;o=!1,setTimeout(()=>{e(),o=!0},t)}}static dataURLtoBlob(e){let t=e.split(",");if(!t||t.length===0)return;let o=t[0].match(/:(.*?);/)[1],r=atob(t[1]),i=r.length,s=new Uint8Array(i);for(;i--;)s[i]=r.charCodeAt(i);return new Blob([s],{type:o})}static getElement(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let o=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!o||o==="auto")&&document.defaultView){let r=document.defaultView.getComputedStyle(e,null);o=r?r[t]:null}return o==="auto"?null:o}static create(e,t,o){let r=document.createElement(e);return r.className=t||"",o&&o.appendChild(r),r}static removeElement(e){let t=e.parentNode;t&&t.removeChild(e)}static emptyElement(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let o=this.getClass(e);return o.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(o)}static addClass(e,t){if(e.classList!==void 0){let o=this.splitWords(t);for(let r=0,i=o.length;r<i;r++)e.classList.add(o[r])}else if(!this.hasClass(e,t)){let o=this.getClass(e);this.setClass(e,(o?o+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,this.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvgElement(e,t,o,r){let i=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");i.setAttribute("class","svg-path"),i.setAttribute("width",e),i.setAttribute("height",t),i.setAttribute("viewBox",`0 0 ${e} ${t}`);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(e,t=!0,o=""){t=t??!1;let r=document.createElement("div");return r.className=o||"",r.innerHTML=e,t?r:r.childNodes}static createVideoHTML(e,t,o){let r=this.create("video",t,o),i=this.create("source","",r);i.setAttribute("src",e),i.setAttribute("type","video/map4");let s=this.create("source","",r);return s.setAttribute("src",e),s.setAttribute("type","video/quicktime"),r}static readFileBytes(e){return new Promise((t,o)=>{const r=new FileReader;r.onload=function(i){const s=r.result,c=s.indexOf("64,"),u=s.substring(c+3);t(u)},r.readAsDataURL(e)})}}class wt{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,(t,o)=>o.toUpperCase()).replace("views","")}}class bt{prefixKey;storage;constructor(e="",t=localStorage){this.prefixKey=e,this.storage=t}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,t,o=604800){const r=JSON.stringify({value:t,expire:o!==null?new Date().getTime()+1e3*o:null});this.storage.setItem(this.getKey(e),r)}get(e,t=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 t}return t}getJsonObject(e){const t=this.storage.getItem(this.getKey(e));if(t)try{const o=JSON.parse(t);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,t,o=604800){document.cookie=`${this.getKey(e)}=${t}; Max-Age=${o}`}getCookie(e){const t=document.cookie.split("; ");for(let o=0,r=t.length;o<r;o++){const i=t[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 t=e.length;t--;)document.cookie=e[t]+"=0;expire="+new Date(0).toUTCString()}}const bs=new bt("",localStorage);function Lo(){let n=[];const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var t=0;t<36;t++){const r=Math.floor(16*Math.random());n[t]=e.substring(r,r+1)}n[14]="4";const o=3&Number(n[19])|8;return n[19]=e.substring(o,o+1),n[8]=n[13]=n[18]=n[23]="-",n.join("")}function _s(){var n=new Date().getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var o=(n+16*Math.random())%16|0;return n=Math.floor(n/16),(t==="x"?o:3&o|8).toString(16)});return e}function Ss(n){const e=n.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),t=parseFloat(e[3]||"1"),o=Math.floor(t*parseInt(e[0])+255*(1-t)),r=Math.floor(t*parseInt(e[1])+255*(1-t)),i=Math.floor(t*parseInt(e[2])+255*(1-t));return"#"+("0"+o.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)}function Cs(n){var e=n.toLowerCase();if(_t(n)){if(e.length===4){for(var t="#",o=1;o<4;o+=1){const i=e.slice(o,o+1);t+=i.concat(i)}e=t}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 Es(n){const e=n;if(e.length===4){let o="#";for(var t=1;t<4;t+=1){const r=e.slice(t,t+1);o+=r.concat(r)}return o}return e}var ze;function ks(n){if(typeof n=="object"||!n)return;const e=n.toLowerCase().substring(0,1);return e==="#"?ze.Hex:e==="r"||e==="("?ze.RGBA:e==="h"?ze.Hsla:ze.RGBA}function xs(n){if(n){var e=n.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 t,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)t=o=r=c;else{var u=c<=.5?c*(s+1):c+s-c*s,g=2*c-u;t=mn(g,u,i+1/3),o=mn(g,u,i),r=mn(g,u,i-1/3)}return`rgba(${t=Math.round(255*t)},${o=Math.round(255*o)},${r=Math.round(255*r)},${e[4]?parseFloat(e[4]):1})`}}}function mn(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+6*(e-n)*t:t<.5?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function _t(n){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(n)}function Is(n,e,t){const o=(n<<16|e<<8|t).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o}function vn(n){let e=n.toLowerCase();if(_t(n)){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 t=[];for(let o=1;o<7;o+=2)t.push(parseInt("0x"+e.slice(o,o+2)));return"RGB("+t.join(",")+")"}return e}function Ts(n){if(!_t(n))return;const[e,t,o]=vn(n).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*e+.578*t+.114*o<192}function Rs(n,e){return n=n.indexOf("#")>=0?n.substring(1,n.length):n,e=Math.trunc(255*e/100),`#${wn(n.substring(0,2),e)}${wn(n.substring(2,4),e)}${wn(n.substring(4,6),e)}`}function Ps(n,e){return n=n.indexOf("#")>=0?n.substring(1,n.length):n,e=Math.trunc(255*e/100),`#${yn(n.substring(0,2),e)}${yn(n.substring(2,4),e)}${yn(n.substring(4,6),e)}`}function yn(n,e){const t=parseInt(n,16)+e,o=t>255?255:t;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function $o(n,e,t){const o=[n,e,t].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 Ms(n){return function(e,t){return($o(~~e[0],~~e[1],~~e[2])+.05)/($o(t[0],t[1],t[2])+.05)}(vn(n.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function wn(n,e){const t=parseInt(n,16)-e,o=t<0?0:t;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function bn(n){return{all:n=n||new Map,on(e,t){const o=n.get(e);o?o.push(t):n.set(e,[t])},off(e,t){const o=n.get(e);o&&(t?o.splice(o.indexOf(t)>>>0,1):n.set(e,[]))},emit(e,t){let o=n.get(e);o&&o.slice().map(r=>{r(t)}),o=n.get("*"),o&&o.slice().map(r=>{r(e,t)})}}}(function(n){n[n.RGBA=0]="RGBA",n[n.Hex=1]="Hex",n[n.Hsla=2]="Hsla"})(ze||(ze={}));const Ae=bn(),se={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetLoaded:"WidgetLoaded",WidgetToUnloadEvent:"WidgetToUnloadEvent",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetLoadedErrorEvent:"WidgetLoadedError",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent",LayoutContainerLoaded:"LayoutContainerLoaded"},St=(n,e)=>{const t=document.createElement("a");t.download=e,t.style.display="none";const o=new Blob([n],{type:"application/octet-stream"});t.href=URL.createObjectURL(o),document.body.appendChild(t),t.click(),document.body.removeChild(t)};function zs(n,e){const t=window.URL||window.webkitURL||window,o=new Blob([n]),r=document.createElement("a");r.href=t.createObjectURL(o),r.download=e,r.click(),t.revokeObjectURL(r.href)}const No=(n,e)=>{const t=JSON.stringify(n,null,2);e?St(t,e+".json"):Ae.emit(se.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},As=(n,e,t)=>{n.get(e,{responseType:"blob"}).then(function(o){St(o.data,t)}).catch(o=>{console.warn(o),Ae.emit(se.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function Ds(n){const e=new Date().getTime();let t=new Date().getTime();for(;t-e<n;)t=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${Bo}\u6BEB\u79D2`)}function Bo(n){return new Promise(e=>setTimeout(e,n))}var Wo,_n={exports:{}},Uo,Oo,Sn,Cn=(Wo||(Wo=1,Oo=_n.exports,Sn=function(){var n=function(){},e="undefined",t=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"],r={},i=null;function s(D,M){var f=D[M];if(typeof f.bind=="function")return f.bind(D);try{return Function.prototype.bind.call(f,D)}catch{return function(){return Function.prototype.apply.apply(f,[D,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 u(){for(var D=this.getLevel(),M=0;M<o.length;M++){var f=o[M];this[f]=M<D?n:this.methodFactory(f,D,this.name)}if(this.log=this.debug,typeof console===e&&D<this.levels.SILENT)return"No console available for logging"}function g(D){return function(){typeof console!==e&&(u.call(this),this[D].apply(this,arguments))}}function S(D,M,f){return function(l){return l==="debug"&&(l="log"),typeof console!==e&&(l==="trace"&&t?c:console[l]!==void 0?s(console,l):console.log!==void 0?s(console,"log"):n)}(D)||g.apply(this,arguments)}function C(D,M){var f,l,v,m=this,p="loglevel";function y(){var T;if(typeof window!==e&&p){try{T=window.localStorage[p]}catch{}if(typeof T===e)try{var z=window.document.cookie,W=encodeURIComponent(p),O=z.indexOf(W+"=");O!==-1&&(T=/^([^;]+)/.exec(z.slice(O+W.length+1))[1])}catch{}return m.levels[T]===void 0&&(T=void 0),T}}function L(T){var z=T;if(typeof z=="string"&&m.levels[z.toUpperCase()]!==void 0&&(z=m.levels[z.toUpperCase()]),typeof z=="number"&&z>=0&&z<=m.levels.SILENT)return z;throw new TypeError("log.setLevel() called with invalid level: "+T)}typeof D=="string"?p+=":"+D:typeof D=="symbol"&&(p=void 0),m.name=D,m.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},m.methodFactory=M||S,m.getLevel=function(){return v??l??f},m.setLevel=function(T,z){return v=L(T),z!==!1&&function(W){var O=(o[W]||"silent").toUpperCase();if(typeof window!==e&&p){try{return void(window.localStorage[p]=O)}catch{}try{window.document.cookie=encodeURIComponent(p)+"="+O+";"}catch{}}}(v),u.call(m)},m.setDefaultLevel=function(T){l=L(T),y()||m.setLevel(T,!1)},m.resetLevel=function(){v=null,function(){if(typeof window!==e&&p){try{window.localStorage.removeItem(p)}catch{}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}(),u.call(m)},m.enableAll=function(T){m.setLevel(m.levels.TRACE,T)},m.disableAll=function(T){m.setLevel(m.levels.SILENT,T)},m.rebuild=function(){if(i!==m&&(f=L(i.getLevel())),u.call(m),i===m)for(var T in r)r[T].rebuild()},f=L(i?i.getLevel():"WARN");var A=y();A!=null&&(v=L(A)),u.call(m)}(i=new C).getLogger=function(D){if(typeof D!="symbol"&&typeof D!="string"||D==="")throw new TypeError("You must supply a name when creating a logger.");var M=r[D];return M||(M=r[D]=new C(D,i.methodFactory)),M};var N=typeof window!==e?window.log:void 0;return i.noConflict=function(){return typeof window!==e&&window.log===i&&(window.log=N),i},i.getLoggers=function(){return r},i.default=i,i},(Uo=_n).exports?Uo.exports=Sn():Oo.log=Sn()),_n.exports);class jo{message;eventBus;constructor(e,t=void 0){e&&(this.message=e),t&&(this.eventBus=t)}msg(e,t=3,o="success"){if(this.message)if(typeof this.message=="function")this.message({type:o,message:e,duration:t});else switch(o){case"info":this.message.info(e,t);break;case"success":this.message.success(e,t);break;case"warning":this.message.warn?this.message.warn(e,t):this.message.warning&&this.message.warning(e,t);break;case"error":this.message.error(e,t)}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(se.AlertInfoEvent,{type:o,info:e})}}info(e,t=3){this.msg(e,t,"info")}warn(e,t=3){this.msg(e,t,"warning")}err(e,t=3){this.msg(e,t,"error")}success(e,t=3){this.msg(e,t,"success")}}let Ho=!1;const B={Config:SysConfig,EventBus:Ae,DefaultProxyClient:null,Axios:Hi,Message:new jo(void 0,Ae),LayoutMap:new Map,getLayoutManager:n=>{if(!B.WidgetConfigList||B.WidgetConfigList.length===0)return;const e=B.WidgetConfigList.find(t=>t.id===n);if(e){const t=e.layoutID;if(t&&B.LayoutMap.has(t))return B.LayoutMap.get(t)}},Logger:n=>{Ho||(import.meta.env?.DEV||SysConfig.UI.ProductLog?Cn.enableAll():Cn.setDefaultLevel("warn"),Ho=!0);const e=n||"default";return Cn.getLogger(e)}},qo="access_token",Fe=new bt("user",localStorage);function De(){return Fe.get(qo)}function En(){Fe.remove(qo)}function Fo(){return De()?.refresh}function kn(n,e,t,o="json",r){const i={baseURL:B.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:n,paramsSerializer:{serialize:function(s){return qi.stringify(s,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+De()?.token},responseType:o,cancelToken:r};if(t)for(let s in t)i.headers[s]=t[s];return B.SystemID&&(i.headers.sysid=B.SystemID,B.SystemGroup&&(i.headers.sysgroup=B.SystemGroup)),e&&(i.baseURL=e),i}function Se(n,e,t,o,r="json",i,s){const c=kn(t,e,o,r,i);return s&&s>=2e4&&(c.timeout=s),B.Axios?.get(n,c).catch(function(u){Ct(u,e,n,"Get")})}function Ct(n,e,t,o="Get"){const r=`${e}${t}`;if(n&&n.response){let i=!1;const s=n.response.status;switch(s){case 400:n.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:n.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:n.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:n.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:n.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:n.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const u=n.response.data;if(u){const g=u.indexOf(":"),S=u.indexOf(`
|
|
2
2
|
`);if(g>0&&S-g>2){const C=u.substring(g+2,S);C.indexOf("System.Exception")>0?n.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(i=!0,n.message=C)}else i=!0,n.message=u}else n.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:n.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:n.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:n.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:n.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:n.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:n.message=`\u8FDE\u63A5\u9519\u8BEF${n.response.status}`}let c={address:r,code:s,isExceptionInfo:i,message:n.message,result:n.response.data};if(B.EventBus.emit(se.AxiosRequestErrorEvent,c),i)throw new Error(n.message)}else{if(n?.message)throw new Error(n.message);console.error(n,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Xo(n,e,t,o,r,i="json",s){const c=kn(o,e,r,i);s&&s>=2e4&&(c.timeout=s),c.headers["Content-Type"]="multipart/form-data";const u=function(g){let S=new FormData;return g&&Object.keys(g).forEach(C=>{if(!g)return;let N=g[C];N!=null&&(fn(N)?N.forEach(D=>{S.append(C,Go(D))}):S.append(C,Go(N)))}),S}(t);return B.Axios?.post(n,u,c).catch(function(g){Ct(g,e,n,"Post")})}function Vo(n,e,t,o,r,i="json",s){const c=kn(o,e,r,i);return s&&s>=2e4&&(c.timeout=s),B.Axios?.post(n,t,c).catch(function(u){Ct(u,e,n,"Post")})}function Ls(n,e){return Se(n,void 0,e)}function $s(n,e){return Xo(n,void 0,e)}function Ns(n,e){return B.Axios?.get(n,{params:e}).catch(function(t){Ct(t,n,"","\u5916\u90E8Get")})}function Go(n){return n instanceof Blob?n:n.toString()}var Ko,Jo,xn,Yo,In,Zo,Tn,Qo,er,Et={exports:{}};function Bs(){return Jo?Ko:(Jo=1,n=typeof window<"u"?window:qe!==void 0?qe:typeof self<"u"?self:{},Ko=n);var n}function Ws(){if(Yo)return xn;Yo=1,xn=function(e){if(!e)return!1;var t=n.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)};var n=Object.prototype.toString;return xn}function Us(){if(Zo)return In;Zo=1;var n=function(e){return e.replace(/^\s+|\s+$/g,"")};return In=function(e){if(!e)return{};for(var t,o={},r=n(e).split(`
|
|
3
|
-
`),i=0;i<r.length;i++){var s=r[i],c=s.indexOf(":"),u=n(s.slice(0,c)).toLowerCase(),g=n(s.slice(c+1));o[u]===void 0?o[u]=g:(t=o[u],Object.prototype.toString.call(t)==="[object Array]"?o[u].push(g):o[u]=[o[u],g])}return o},In}var Os=function(){if(er)return Et.exports;er=1;var n=Bs(),e=Ws(),t=Us(),o=function(){if(Qo)return Tn;Qo=1,Tn=function(){for(var u={},g=0;g<arguments.length;g++){var S=arguments[g];for(var C in S)c.call(S,C)&&(u[C]=S[C])}return u};var c=Object.prototype.hasOwnProperty;return Tn}();function r(c,u,g){var S=c;return e(u)?(g=u,typeof c=="string"&&(S={uri:c})):S=o(u,{uri:c}),S.callback=g,S}function i(c,u,g){return s(u=r(c,u,g))}function s(c){if(c.callback===void 0)throw new Error("callback argument missing");var u=!1,g=function(z,W,O){u||(u=!0,c.callback(z,W,O))};function S(){var z=void 0;if(z=f.response?f.response:f.responseText||function(W){try{if(W.responseType==="document")return W.responseXML;var O=W.responseXML&&W.responseXML.documentElement.nodeName==="parsererror";if(W.responseType===""&&!O)return W.responseXML}catch{}return null}(f),A)try{z=JSON.parse(z)}catch{}return z}function C(z){return clearTimeout(l),z instanceof Error||(z=new Error(""+(z||"Unknown XMLHttpRequest Error"))),z.statusCode=0,g(z,T)}function N(){if(!M){var z;clearTimeout(l),z=c.useXDR&&f.status===void 0?200:f.status===1223?204:f.status;var W=T,O=null;return z!==0?(W={body:S(),statusCode:z,method:m,headers:{},url:v,rawRequest:f},f.getAllResponseHeaders&&(W.headers=t(f.getAllResponseHeaders()))):O=new Error("Internal XMLHttpRequest Error"),g(O,W,W.body)}}var D,M,f=c.xhr||null;f||(f=c.cors||c.useXDR?new i.XDomainRequest:new i.XMLHttpRequest);var l,v=f.url=c.uri||c.url,m=f.method=c.method||"GET",p=c.body||c.data,y=f.headers=c.headers||{},L=!!c.sync,A=!1,T={body:void 0,headers:{},statusCode:0,method:m,url:v,rawRequest:f};if("json"in c&&c.json!==!1&&(A=!0,y.accept||y.Accept||(y.Accept="application/json"),m!=="GET"&&m!=="HEAD"&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),p=JSON.stringify(c.json===!0?p:c.json))),f.onreadystatechange=function(){f.readyState===4&&setTimeout(N,0)},f.onload=N,f.onerror=C,f.onprogress=function(){},f.onabort=function(){M=!0},f.ontimeout=C,f.open(m,v,!L,c.username,c.password),L||(f.withCredentials=!!c.withCredentials),!L&&c.timeout>0&&(l=setTimeout(function(){if(!M){M=!0,f.abort("timeout");var z=new Error("XMLHttpRequest timeout");z.code="ETIMEDOUT",C(z)}},c.timeout)),f.setRequestHeader)for(D in y)y.hasOwnProperty(D)&&f.setRequestHeader(D,y[D]);else if(c.headers&&!function(z){for(var W in z)if(z.hasOwnProperty(W))return!1;return!0}(c.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in c&&(f.responseType=c.responseType),"beforeSend"in c&&typeof c.beforeSend=="function"&&c.beforeSend(f),f.send(p||null),f}return Et.exports=i,Et.exports.default=i,i.XMLHttpRequest=n.XMLHttpRequest||function(){},i.XDomainRequest="withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:n.XDomainRequest,function(c,u){for(var g=0;g<c.length;g++)u(c[g])}(["get","put","post","patch","head","delete"],function(c){i[c==="delete"?"del":c]=function(u,g,S){return(g=r(u,g,S)).method=c.toUpperCase(),s(g)}}),Et.exports}(),Hs=yt(Os);const js=[200,201,202,204,308],qs=[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(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=bn(),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,t){this.eventTarget.on(e,t)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(e,t){this.eventTarget.emit(e,t)}validateOptions(){if(!this.endpoint||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 t=this.totalChunks===1?this.file.size:this.chunkByteSize,o=t*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+t))})}xhrPromise(e){const t=o=>{o.upload.onprogress=r=>{const i=100/this.totalChunks,s=i*this.file.size,c=i*this.chunkCount,u=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(c+u,100))}};return new Promise((o,r)=>{this.currentXhr=Hs({...e,beforeSend:t},(i,s)=>(this.currentXhr=void 0,i?r(i):o(s)))})}sendChunk(){if(!this.chunk)return;const e=this.chunkCount*this.chunkByteSize,t=e+this.chunk.size-1,o={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${e}-${t}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers: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&&js.includes(e.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:e}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const t=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",t)}else if(e!=null&&qs.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 Fs=n=>new tr(n),Xs=new class{hasClass(n,e){return n.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}addClass(n,e){this.hasClass(n,e)||(n.className+=" "+e)}removeClass(n,e){if(this.hasClass(n,e)){const t=new RegExp("(\\s|^)"+e+"(\\s|$)");n.className=n.className.replace(t," ")}}toggleClass(n,e){this.hasClass(n,e)?this.removeClass(n,e):this.addClass(n,e)}setCSSProperty(n,e,t){n?.style.setProperty(e,t)}};class st{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!wt.isNullOrEmpty(e)){if(st.httpTransport||(st.httpTransport=new Vi),this.client=new Fi(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")):Ae.emit(se.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,t,o){if(this.client)return await this.client.invoke(e,t,o)}encode(e,t,o){if(this.client)return this.client.codec.encode(e,t,o)}decode(e,t){if(this.client)return this.client.codec.decode(e,t)}}class Je{hproseClient;hpProxyObj;defaultContext=new nn;constructor(e){this.hproseClient=new st(e),this.hpProxyObj=null}getClientContext(e,t){const o={};t&&(o.requestHeaders=t);const r=De();o.httpRequestHeaders=e||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),B.SystemID&&(i.sysid=B.SystemID,B.SystemGroup&&(i.sysgroup=B.SystemGroup)),new nn(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||Ae.emit(se.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(e,t,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,t,o)}async hproseInvokeContext(e,t,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=De();return console.log(r,"userToken3"),r&&(t||(t=new nn({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,o,t)}async hproseInvokeEncode(e){const t=new ke(e).toBytes(),o=await this.hproseClient.client?.request(t,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(e,...t){const o=this.hproseClient.client?.codec?.encode(e,t,this.defaultContext);return ke.toString(o)}}const Rn=new Map,Vs=function(n,e,t){!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),B.Config.DefaultHproseAPI&&wt.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new Je(B.Config.DefaultHproseAPI));const o=B.Config.UI.GrayMode;o&&he.setGrayMode(o);const r=new Ho(n,B.EventBus);B.Message=r,B.SystemID=e,B.SystemGroup=t,B.EventBus.on(se.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(se.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(se.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(se.CommonWarnEvent,i=>{r.warn(i)})};function nr(n){if(n&&wt.isNotEmpty(n)){if(Rn.has(n))return Rn.get(n);{const e=new Je(n);return Rn.set(n,e),e}}}function Gs(n){const e=nr(n);return e&&(B.DefaultProxyClient=e),e}const Le=So({isLock:!1,lockTime:0});function kt(n){Le.isLock=n,n&&(En(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Ks(){return Le.isLock}let Pn;function Ye(){clearInterval(Pn),!(window.location.href.indexOf("/login")>0||Le.isLock)&&(kt(!1),Le.lockTime=function(){let n=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(n=B.Config.UI.LockTime),n}(),Pn=setInterval(()=>{if(Le.lockTime--,Le.lockTime<=0)return kt(!0),clearInterval(Pn)},1e3))}function Js(){Ye(),document.addEventListener("mousedown",Ye),document.addEventListener("mousemove",Ye)}function Ys(){document.removeEventListener("mousedown",Ye),document.removeEventListener("mousemove",Ye)}function Mn(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var or,rr={exports:{}};/*!
|
|
3
|
+
`),i=0;i<r.length;i++){var s=r[i],c=s.indexOf(":"),u=n(s.slice(0,c)).toLowerCase(),g=n(s.slice(c+1));o[u]===void 0?o[u]=g:(t=o[u],Object.prototype.toString.call(t)==="[object Array]"?o[u].push(g):o[u]=[o[u],g])}return o},In}var Os=function(){if(er)return Et.exports;er=1;var n=Bs(),e=Ws(),t=Us(),o=function(){if(Qo)return Tn;Qo=1,Tn=function(){for(var u={},g=0;g<arguments.length;g++){var S=arguments[g];for(var C in S)c.call(S,C)&&(u[C]=S[C])}return u};var c=Object.prototype.hasOwnProperty;return Tn}();function r(c,u,g){var S=c;return e(u)?(g=u,typeof c=="string"&&(S={uri:c})):S=o(u,{uri:c}),S.callback=g,S}function i(c,u,g){return s(u=r(c,u,g))}function s(c){if(c.callback===void 0)throw new Error("callback argument missing");var u=!1,g=function(z,W,O){u||(u=!0,c.callback(z,W,O))};function S(){var z=void 0;if(z=f.response?f.response:f.responseText||function(W){try{if(W.responseType==="document")return W.responseXML;var O=W.responseXML&&W.responseXML.documentElement.nodeName==="parsererror";if(W.responseType===""&&!O)return W.responseXML}catch{}return null}(f),A)try{z=JSON.parse(z)}catch{}return z}function C(z){return clearTimeout(l),z instanceof Error||(z=new Error(""+(z||"Unknown XMLHttpRequest Error"))),z.statusCode=0,g(z,T)}function N(){if(!M){var z;clearTimeout(l),z=c.useXDR&&f.status===void 0?200:f.status===1223?204:f.status;var W=T,O=null;return z!==0?(W={body:S(),statusCode:z,method:m,headers:{},url:v,rawRequest:f},f.getAllResponseHeaders&&(W.headers=t(f.getAllResponseHeaders()))):O=new Error("Internal XMLHttpRequest Error"),g(O,W,W.body)}}var D,M,f=c.xhr||null;f||(f=c.cors||c.useXDR?new i.XDomainRequest:new i.XMLHttpRequest);var l,v=f.url=c.uri||c.url,m=f.method=c.method||"GET",p=c.body||c.data,y=f.headers=c.headers||{},L=!!c.sync,A=!1,T={body:void 0,headers:{},statusCode:0,method:m,url:v,rawRequest:f};if("json"in c&&c.json!==!1&&(A=!0,y.accept||y.Accept||(y.Accept="application/json"),m!=="GET"&&m!=="HEAD"&&(y["content-type"]||y["Content-Type"]||(y["Content-Type"]="application/json"),p=JSON.stringify(c.json===!0?p:c.json))),f.onreadystatechange=function(){f.readyState===4&&setTimeout(N,0)},f.onload=N,f.onerror=C,f.onprogress=function(){},f.onabort=function(){M=!0},f.ontimeout=C,f.open(m,v,!L,c.username,c.password),L||(f.withCredentials=!!c.withCredentials),!L&&c.timeout>0&&(l=setTimeout(function(){if(!M){M=!0,f.abort("timeout");var z=new Error("XMLHttpRequest timeout");z.code="ETIMEDOUT",C(z)}},c.timeout)),f.setRequestHeader)for(D in y)y.hasOwnProperty(D)&&f.setRequestHeader(D,y[D]);else if(c.headers&&!function(z){for(var W in z)if(z.hasOwnProperty(W))return!1;return!0}(c.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in c&&(f.responseType=c.responseType),"beforeSend"in c&&typeof c.beforeSend=="function"&&c.beforeSend(f),f.send(p||null),f}return Et.exports=i,Et.exports.default=i,i.XMLHttpRequest=n.XMLHttpRequest||function(){},i.XDomainRequest="withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:n.XDomainRequest,function(c,u){for(var g=0;g<c.length;g++)u(c[g])}(["get","put","post","patch","head","delete"],function(c){i[c==="delete"?"del":c]=function(u,g,S){return(g=r(u,g,S)).method=c.toUpperCase(),s(g)}}),Et.exports}(),js=yt(Os);const Hs=[200,201,202,204,308],qs=[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(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=bn(),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,t){this.eventTarget.on(e,t)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(e,t){this.eventTarget.emit(e,t)}validateOptions(){if(!this.endpoint||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 t=this.totalChunks===1?this.file.size:this.chunkByteSize,o=t*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+t))})}xhrPromise(e){const t=o=>{o.upload.onprogress=r=>{const i=100/this.totalChunks,s=i*this.file.size,c=i*this.chunkCount,u=r.loaded/(r.total??s)*i;this.dispatch("progress",Math.min(c+u,100))}};return new Promise((o,r)=>{this.currentXhr=js({...e,beforeSend:t},(i,s)=>(this.currentXhr=void 0,i?r(i):o(s)))})}sendChunk(){if(!this.chunk)return;const e=this.chunkCount*this.chunkByteSize,t=e+this.chunk.size-1,o={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${e}-${t}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers: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&&Hs.includes(e.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:e}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const t=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",t)}else if(e!=null&&qs.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 Fs=n=>new tr(n),Xs=new class{hasClass(n,e){return n.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}addClass(n,e){this.hasClass(n,e)||(n.className+=" "+e)}removeClass(n,e){if(this.hasClass(n,e)){const t=new RegExp("(\\s|^)"+e+"(\\s|$)");n.className=n.className.replace(t," ")}}toggleClass(n,e){this.hasClass(n,e)?this.removeClass(n,e):this.addClass(n,e)}setCSSProperty(n,e,t){n?.style.setProperty(e,t)}};class st{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!wt.isNullOrEmpty(e)){if(st.httpTransport||(st.httpTransport=new Vi),this.client=new Fi(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")):Ae.emit(se.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,t,o){if(this.client)return await this.client.invoke(e,t,o)}encode(e,t,o){if(this.client)return this.client.codec.encode(e,t,o)}decode(e,t){if(this.client)return this.client.codec.decode(e,t)}}class Je{hproseClient;hpProxyObj;defaultContext=new nn;constructor(e){this.hproseClient=new st(e),this.hpProxyObj=null}getClientContext(e,t){const o={};t&&(o.requestHeaders=t);const r=De();o.httpRequestHeaders=e||{};const i=o.httpRequestHeaders;return r&&(i.token=r.token),B.SystemID&&(i.sysid=B.SystemID,B.SystemGroup&&(i.sysgroup=B.SystemGroup)),new nn(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||Ae.emit(se.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(e,t,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,t,o)}async hproseInvokeContext(e,t,...o){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=De();return console.log(r,"userToken3"),r&&(t||(t=new nn({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,o,t)}async hproseInvokeEncode(e){const t=new ke(e).toBytes(),o=await this.hproseClient.client?.request(t,this.defaultContext);return o&&this.hproseClient.client?.codec.decode(o,this.defaultContext)}encodeRequest(e,...t){const o=this.hproseClient.client?.codec?.encode(e,t,this.defaultContext);return ke.toString(o)}}const Rn=new Map,Vs=function(n,e,t){!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),B.Config.DefaultHproseAPI&&wt.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new Je(B.Config.DefaultHproseAPI));const o=B.Config.UI.GrayMode;o&&he.setGrayMode(o);const r=new jo(n,B.EventBus);B.Message=r,B.SystemID=e,B.SystemGroup=t,B.EventBus.on(se.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(se.WebAPIErrorEvent,i=>{const s=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${i}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(se.AxiosRequestErrorEvent,i=>{const s=`Http\u8BF7\u6C42'${i.code}'\u9519\u8BEF: ${i.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",s)}),B.EventBus.on(se.CommonWarnEvent,i=>{r.warn(i)})};function nr(n){if(n&&wt.isNotEmpty(n)){if(Rn.has(n))return Rn.get(n);{const e=new Je(n);return Rn.set(n,e),e}}}function Gs(n){const e=nr(n);return e&&(B.DefaultProxyClient=e),e}const Le=So({isLock:!1,lockTime:0});function kt(n){Le.isLock=n,n&&(En(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Ks(){return Le.isLock}let Pn;function Ye(){clearInterval(Pn),!(window.location.href.indexOf("/login")>0||Le.isLock)&&(kt(!1),Le.lockTime=function(){let n=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(n=B.Config.UI.LockTime),n}(),Pn=setInterval(()=>{if(Le.lockTime--,Le.lockTime<=0)return kt(!0),clearInterval(Pn)},1e3))}function Js(){Ye(),document.addEventListener("mousedown",Ye),document.addEventListener("mousemove",Ye)}function Ys(){document.removeEventListener("mousedown",Ye),document.removeEventListener("mousemove",Ye)}function Mn(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var or,rr={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
|
-
*/var ir,Zs=(or||(or=1,rr.exports=function n(e,t,o){function r(c,u){if(!t[c]){if(!e[c]){if(!u&&Mn)return Mn(c);if(i)return i(c,!0);var g=new Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g}var S=t[c]={exports:{}};e[c][0].call(S.exports,function(C){var N=e[c][1][C];return r(N||C)},S,S.exports,n,e,t,o)}return t[c].exports}for(var i=Mn,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(n,e,t){(function(o){var r,i,s=o.MutationObserver||o.WebKitMutationObserver;if(s){var c=0,u=new s(N),g=o.document.createTextNode("");u.observe(g,{characterData:!0}),r=function(){g.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)r="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var M=o.document.createElement("script");M.onreadystatechange=function(){N(),M.onreadystatechange=null,M.parentNode.removeChild(M),M=null},o.document.documentElement.appendChild(M)}:function(){setTimeout(N,0)};else{var S=new o.MessageChannel;S.port1.onmessage=N,r=function(){S.port2.postMessage(0)}}var C=[];function N(){var M,f;i=!0;for(var l=C.length;l;){for(f=C,C=[],M=-1;++M<l;)f[M]();l=C.length}i=!1}function D(M){C.push(M)!==1||i||r()}e.exports=D}).call(this,qe!==void 0?qe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,e,t){var o=n(1);function r(){}var i={},s=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function g(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,p!==r&&D(this,p)}function S(p,y,L){this.promise=p,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}function C(p,y,L){o(function(){var A;try{A=y(L)}catch(T){return i.reject(p,T)}A===p?i.reject(p,new TypeError("Cannot resolve promise with itself")):i.resolve(p,A)})}function N(p){var y=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof y=="function")return function(){y.apply(p,arguments)}}function D(p,y){var L=!1;function A(O){L||(L=!0,i.reject(p,O))}function T(O){L||(L=!0,i.resolve(p,O))}function z(){y(T,A)}var W=M(z);W.status==="error"&&A(W.value)}function M(p,y){var L={};try{L.value=p(y),L.status="success"}catch(A){L.status="error",L.value=A}return L}function f(p){return p instanceof this?p:i.resolve(new this(r),p)}function l(p){var y=new this(r);return i.reject(y,p)}function v(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=p.length,A=!1;if(!L)return this.resolve([]);for(var T=new Array(L),z=0,W=-1,O=new this(r);++W<L;)R(p[W],W);return O;function R(j,X){function le(oe){T[X]=oe,++z!==L||A||(A=!0,i.resolve(O,T))}y.resolve(j).then(le,function(oe){A||(A=!0,i.reject(O,oe))})}}function m(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=p.length,A=!1;if(!L)return this.resolve([]);for(var T=-1,z=new this(r);++T<L;)W(p[T]);return z;function W(O){y.resolve(O).then(function(R){A||(A=!0,i.resolve(z,R))},function(R){A||(A=!0,i.reject(z,R))})}}e.exports=g,g.prototype.catch=function(p){return this.then(null,p)},g.prototype.then=function(p,y){if(typeof p!="function"&&this.state===c||typeof y!="function"&&this.state===s)return this;var L=new this.constructor(r);return this.state!==u?C(L,this.state===c?p:y,this.outcome):this.queue.push(new S(L,p,y)),L},S.prototype.callFulfilled=function(p){i.resolve(this.promise,p)},S.prototype.otherCallFulfilled=function(p){C(this.promise,this.onFulfilled,p)},S.prototype.callRejected=function(p){i.reject(this.promise,p)},S.prototype.otherCallRejected=function(p){C(this.promise,this.onRejected,p)},i.resolve=function(p,y){var L=M(N,y);if(L.status==="error")return i.reject(p,L.value);var A=L.value;if(A)D(p,A);else{p.state=c,p.outcome=y;for(var T=-1,z=p.queue.length;++T<z;)p.queue[T].callFulfilled(y)}return p},i.reject=function(p,y){p.state=s,p.outcome=y;for(var L=-1,A=p.queue.length;++L<A;)p.queue[L].callRejected(y);return p},g.resolve=f,g.reject=l,g.all=v,g.race=m},{1:1}],3:[function(n,e,t){(function(o){typeof o.Promise!="function"&&(o.Promise=n(2))}).call(this,qe!==void 0?qe:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,e,t){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,h){if(!(a instanceof h))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),h=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||h)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function u(a,h){a=a||[],h=h||{};try{return new Blob(a,h)}catch(w){if(w.name!=="TypeError")throw w;for(var d=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),b=0;b<a.length;b+=1)d.append(a[b]);return d.getBlob(h.type)}}typeof Promise>"u"&&n(3);var g=Promise;function S(a,h){h&&a.then(function(d){h(null,d)},function(d){h(d)})}function C(a,h,d){typeof h=="function"&&a.then(h),typeof d=="function"&&a.catch(d)}function N(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var M="local-forage-detect-blob-support",f=void 0,l={},v=Object.prototype.toString,m="readonly",p="readwrite";function y(a){for(var h=a.length,d=new ArrayBuffer(h),b=new Uint8Array(d),w=0;w<h;w++)b[w]=a.charCodeAt(w);return d}function L(a){return new g(function(h){var d=a.transaction(M,p),b=u([""]);d.objectStore(M).put(b,"key"),d.onabort=function(w){w.preventDefault(),w.stopPropagation(),h(!1)},d.oncomplete=function(){var w=navigator.userAgent.match(/Chrome\/(\d+)/),_=navigator.userAgent.match(/Edge\//);h(_||!w||parseInt(w[1],10)>=43)}}).catch(function(){return!1})}function A(a){return typeof f=="boolean"?g.resolve(f):L(a).then(function(h){return f=h})}function T(a){var h=l[a.name],d={};d.promise=new g(function(b,w){d.resolve=b,d.reject=w}),h.deferredOperations.push(d),h.dbReady?h.dbReady=h.dbReady.then(function(){return d.promise}):h.dbReady=d.promise}function z(a){var h=l[a.name].deferredOperations.pop();if(h)return h.resolve(),h.promise}function W(a,h){var d=l[a.name].deferredOperations.pop();if(d)return d.reject(h),d.promise}function O(a,h){return new g(function(d,b){if(l[a.name]=l[a.name]||eo(),a.db){if(!h)return d(a.db);T(a),a.db.close()}var w=[a.name];h&&w.push(a.version);var _=s.open.apply(s,w);h&&(_.onupgradeneeded=function(E){var x=_.result;try{x.createObjectStore(a.storeName),E.oldVersion<=1&&x.createObjectStore(M)}catch(I){if(I.name!=="ConstraintError")throw I;console.warn('The database "'+a.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),_.onerror=function(E){E.preventDefault(),b(_.error)},_.onsuccess=function(){var E=_.result;E.onversionchange=function(x){x.target.close()},d(E),z(a)}})}function R(a){return O(a,!1)}function j(a){return O(a,!0)}function X(a,h){if(!a.db)return!0;var d=!a.db.objectStoreNames.contains(a.storeName),b=a.version<a.db.version,w=a.version>a.db.version;if(b&&(a.version!==h&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),w||d){if(d){var _=a.db.version+1;_>a.version&&(a.version=_)}return!0}return!1}function le(a){return new g(function(h,d){var b=new FileReader;b.onerror=d,b.onloadend=function(w){var _=btoa(w.target.result||"");h({__local_forage_encoded_blob:!0,data:_,type:a.type})},b.readAsBinaryString(a)})}function oe(a){return u([y(atob(a.data))],{type:a.type})}function ye(a){return a&&a.__local_forage_encoded_blob}function at(a){var h=this,d=h._initReady().then(function(){var b=l[h._dbInfo.name];if(b&&b.dbReady)return b.dbReady});return C(d,a,a),d}function Ht(a){T(a);for(var h=l[a.name],d=h.forages,b=0;b<d.length;b++){var w=d[b];w._dbInfo.db&&(w._dbInfo.db.close(),w._dbInfo.db=null)}return a.db=null,R(a).then(function(_){return a.db=_,X(a)?j(a):_}).then(function(_){a.db=h.db=_;for(var E=0;E<d.length;E++)d[E]._dbInfo.db=_}).catch(function(_){throw W(a,_),_})}function me(a,h,d,b){b===void 0&&(b=1);try{var w=a.db.transaction(a.storeName,h);d(null,w)}catch(_){if(b>0&&(!a.db||_.name==="InvalidStateError"||_.name==="NotFoundError"))return g.resolve().then(function(){if(!a.db||_.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),j(a)}).then(function(){return Ht(a).then(function(){me(a,h,d,b-1)})}).catch(d);d(_)}}function eo(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Br(a){var h=this,d={db:null};if(a)for(var b in a)d[b]=a[b];var w=l[d.name];w||(w=eo(),l[d.name]=w),w.forages.push(h),h._initReady||(h._initReady=h.ready,h.ready=at);var _=[];function E(){return g.resolve()}for(var x=0;x<w.forages.length;x++){var I=w.forages[x];I!==h&&_.push(I._initReady().catch(E))}var P=w.forages.slice(0);return g.all(_).then(function(){return d.db=w.db,R(d)}).then(function($){return d.db=$,X(d,h._defaultConfig.version)?j(d):$}).then(function($){d.db=w.db=$,h._dbInfo=d;for(var U=0;U<P.length;U++){var q=P[U];q!==h&&(q._dbInfo.db=d.db,q._dbInfo.version=d.version)}})}function Wr(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){me(d._dbInfo,m,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName).get(a);I.onsuccess=function(){var P=I.result;P===void 0&&(P=null),ye(P)&&(P=oe(P)),w(P)},I.onerror=function(){_(I.error)}}catch(P){_(P)}})}).catch(_)});return S(b,h),b}function Ur(a,h){var d=this,b=new g(function(w,_){d.ready().then(function(){me(d._dbInfo,m,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName).openCursor(),P=1;I.onsuccess=function(){var $=I.result;if($){var U=$.value;ye(U)&&(U=oe(U));var q=a(U,$.key,P++);q!==void 0?w(q):$.continue()}else w()},I.onerror=function(){_(I.error)}}catch($){_($)}})}).catch(_)});return S(b,h),b}function Or(a,h,d){var b=this;a=N(a);var w=new g(function(_,E){var x;b.ready().then(function(){return x=b._dbInfo,v.call(h)==="[object Blob]"?A(x.db).then(function(I){return I?h:le(h)}):h}).then(function(I){me(b._dbInfo,p,function(P,$){if(P)return E(P);try{var U=$.objectStore(b._dbInfo.storeName);I===null&&(I=void 0);var q=U.put(I,a);$.oncomplete=function(){I===void 0&&(I=null),_(I)},$.onabort=$.onerror=function(){var V=q.error?q.error:q.transaction.error;E(V)}}catch(V){E(V)}})}).catch(E)});return S(w,d),w}function Hr(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){me(d._dbInfo,p,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName).delete(a);x.oncomplete=function(){w()},x.onerror=function(){_(I.error)},x.onabort=function(){var P=I.error?I.error:I.transaction.error;_(P)}}catch(P){_(P)}})}).catch(_)});return S(b,h),b}function jr(a){var h=this,d=new g(function(b,w){h.ready().then(function(){me(h._dbInfo,p,function(_,E){if(_)return w(_);try{var x=E.objectStore(h._dbInfo.storeName).clear();E.oncomplete=function(){b()},E.onabort=E.onerror=function(){var I=x.error?x.error:x.transaction.error;w(I)}}catch(I){w(I)}})}).catch(w)});return S(d,a),d}function qr(a){var h=this,d=new g(function(b,w){h.ready().then(function(){me(h._dbInfo,m,function(_,E){if(_)return w(_);try{var x=E.objectStore(h._dbInfo.storeName).count();x.onsuccess=function(){b(x.result)},x.onerror=function(){w(x.error)}}catch(I){w(I)}})}).catch(w)});return S(d,a),d}function Fr(a,h){var d=this,b=new g(function(w,_){a<0?w(null):d.ready().then(function(){me(d._dbInfo,m,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName),P=!1,$=I.openKeyCursor();$.onsuccess=function(){var U=$.result;U?a===0||P?w(U.key):(P=!0,U.advance(a)):w(null)},$.onerror=function(){_($.error)}}catch(U){_(U)}})}).catch(_)});return S(b,h),b}function Xr(a){var h=this,d=new g(function(b,w){h.ready().then(function(){me(h._dbInfo,m,function(_,E){if(_)return w(_);try{var x=E.objectStore(h._dbInfo.storeName).openKeyCursor(),I=[];x.onsuccess=function(){var P=x.result;P?(I.push(P.key),P.continue()):b(I)},x.onerror=function(){w(x.error)}}catch(P){w(P)}})}).catch(w)});return S(d,a),d}function Vr(a,h){h=D.apply(this,arguments);var d=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||d.name,a.storeName=a.storeName||d.storeName);var b,w=this;if(a.name){var _=a.name===d.name&&w._dbInfo.db?g.resolve(w._dbInfo.db):R(a).then(function(E){var x=l[a.name],I=x.forages;x.db=E;for(var P=0;P<I.length;P++)I[P]._dbInfo.db=E;return E});b=a.storeName?_.then(function(E){if(E.objectStoreNames.contains(a.storeName)){var x=E.version+1;T(a);var I=l[a.name],P=I.forages;E.close();for(var $=0;$<P.length;$++){var U=P[$];U._dbInfo.db=null,U._dbInfo.version=x}var q=new g(function(V,G){var re=s.open(a.name,x);re.onerror=function(_e){re.result.close(),G(_e)},re.onupgradeneeded=function(){re.result.deleteObjectStore(a.storeName)},re.onsuccess=function(){var _e=re.result;_e.close(),V(_e)}});return q.then(function(V){I.db=V;for(var G=0;G<P.length;G++){var re=P[G];re._dbInfo.db=V,z(re._dbInfo)}}).catch(function(V){throw(W(a,V)||g.resolve()).catch(function(){}),V})}}):_.then(function(E){T(a);var x=l[a.name],I=x.forages;E.close();for(var P=0;P<I.length;P++)I[P]._dbInfo.db=null;var $=new g(function(U,q){var V=s.deleteDatabase(a.name);V.onerror=function(){var G=V.result;G&&G.close(),q(V.error)},V.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},V.onsuccess=function(){var G=V.result;G&&G.close(),U(G)}});return $.then(function(U){x.db=U;for(var q=0;q<I.length;q++)z(I[q]._dbInfo)}).catch(function(U){throw(W(a,U)||g.resolve()).catch(function(){}),U})})}else b=g.reject("Invalid arguments");return S(b,h),b}var Gr={_driver:"asyncStorage",_initStorage:Br,_support:c(),iterate:Ur,getItem:Wr,setItem:Or,removeItem:Hr,clear:jr,length:qr,key:Fr,keys:Xr,dropInstance:Vr};function Kr(){return typeof openDatabase=="function"}var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jr="~~local_forage_type~",to=/^~~local_forage_type~([^~]+)~/,ct="__lfsc__:",jt=ct.length,qt="arbf",Ft="blob",no="si08",oo="ui08",ro="uic8",io="si16",so="si32",ao="ur16",co="ui32",lo="fl32",uo="fl64",ho=jt+qt.length,fo=Object.prototype.toString;function po(a){var h,d,b,w,_,E=.75*a.length,x=a.length,I=0;a[a.length-1]==="="&&(E--,a[a.length-2]==="="&&E--);var P=new ArrayBuffer(E),$=new Uint8Array(P);for(h=0;h<x;h+=4)d=Ce.indexOf(a[h]),b=Ce.indexOf(a[h+1]),w=Ce.indexOf(a[h+2]),_=Ce.indexOf(a[h+3]),$[I++]=d<<2|b>>4,$[I++]=(15&b)<<4|w>>2,$[I++]=(3&w)<<6|63&_;return P}function Xt(a){var h,d=new Uint8Array(a),b="";for(h=0;h<d.length;h+=3)b+=Ce[d[h]>>2],b+=Ce[(3&d[h])<<4|d[h+1]>>4],b+=Ce[(15&d[h+1])<<2|d[h+2]>>6],b+=Ce[63&d[h+2]];return d.length%3==2?b=b.substring(0,b.length-1)+"=":d.length%3==1&&(b=b.substring(0,b.length-2)+"=="),b}function Yr(a,h){var d="";if(a&&(d=fo.call(a)),a&&(d==="[object ArrayBuffer]"||a.buffer&&fo.call(a.buffer)==="[object ArrayBuffer]")){var b,w=ct;a instanceof ArrayBuffer?(b=a,w+=qt):(b=a.buffer,d==="[object Int8Array]"?w+=no:d==="[object Uint8Array]"?w+=oo:d==="[object Uint8ClampedArray]"?w+=ro:d==="[object Int16Array]"?w+=io:d==="[object Uint16Array]"?w+=ao:d==="[object Int32Array]"?w+=so:d==="[object Uint32Array]"?w+=co:d==="[object Float32Array]"?w+=lo:d==="[object Float64Array]"?w+=uo:h(new Error("Failed to get type for BinaryArray"))),h(w+Xt(b))}else if(d==="[object Blob]"){var _=new FileReader;_.onload=function(){var E=Jr+a.type+"~"+Xt(this.result);h(ct+Ft+E)},_.readAsArrayBuffer(a)}else try{h(JSON.stringify(a))}catch(E){console.error("Couldn't convert value into a JSON string: ",a),h(null,E)}}function Zr(a){if(a.substring(0,jt)!==ct)return JSON.parse(a);var h,d=a.substring(ho),b=a.substring(jt,ho);if(b===Ft&&to.test(d)){var w=d.match(to);h=w[1],d=d.substring(w[0].length)}var _=po(d);switch(b){case qt:return _;case Ft:return u([_],{type:h});case no:return new Int8Array(_);case oo:return new Uint8Array(_);case ro:return new Uint8ClampedArray(_);case io:return new Int16Array(_);case ao:return new Uint16Array(_);case so:return new Int32Array(_);case co:return new Uint32Array(_);case lo:return new Float32Array(_);case uo:return new Float64Array(_);default:throw new Error("Unkown type: "+b)}}var Vt={serialize:Yr,deserialize:Zr,stringToBuffer:po,bufferToString:Xt};function go(a,h,d,b){a.executeSql("CREATE TABLE IF NOT EXISTS "+h.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],d,b)}function Qr(a){var h=this,d={db:null};if(a)for(var b in a)d[b]=typeof a[b]!="string"?a[b].toString():a[b];var w=new g(function(_,E){try{d.db=openDatabase(d.name,String(d.version),d.description,d.size)}catch(x){return E(x)}d.db.transaction(function(x){go(x,d,function(){h._dbInfo=d,_()},function(I,P){E(P)})},E)});return d.serializer=Vt,w}function Ee(a,h,d,b,w,_){a.executeSql(d,b,w,function(E,x){x.code===x.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[h.storeName],function(I,P){P.rows.length?_(I,x):go(I,h,function(){I.executeSql(d,b,w,_)},_)},_):_(E,x)},_)}function ei(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[a],function(I,P){var $=P.rows.length?P.rows.item(0).value:null;$&&($=E.serializer.deserialize($)),w($)},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function ti(a,h){var d=this,b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"SELECT * FROM "+E.storeName,[],function(I,P){for(var $=P.rows,U=$.length,q=0;q<U;q++){var V=$.item(q),G=V.value;if(G&&(G=E.serializer.deserialize(G)),(G=a(G,V.key,q+1))!==void 0)return void w(G)}w()},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function mo(a,h,d,b){var w=this;a=N(a);var _=new g(function(E,x){w.ready().then(function(){h===void 0&&(h=null);var I=h,P=w._dbInfo;P.serializer.serialize(h,function($,U){U?x(U):P.db.transaction(function(q){Ee(q,P,"INSERT OR REPLACE INTO "+P.storeName+" (key, value) VALUES (?, ?)",[a,$],function(){E(I)},function(V,G){x(G)})},function(q){if(q.code===q.QUOTA_ERR){if(b>0)return void E(mo.apply(w,[a,I,d,b-1]));x(q)}})})}).catch(x)});return S(_,d),_}function ni(a,h,d){return mo.apply(this,[a,h,d,1])}function oi(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[a],function(){w()},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function ri(a){var h=this,d=new g(function(b,w){h.ready().then(function(){var _=h._dbInfo;_.db.transaction(function(E){Ee(E,_,"DELETE FROM "+_.storeName,[],function(){b()},function(x,I){w(I)})})}).catch(w)});return S(d,a),d}function ii(a){var h=this,d=new g(function(b,w){h.ready().then(function(){var _=h._dbInfo;_.db.transaction(function(E){Ee(E,_,"SELECT COUNT(key) as c FROM "+_.storeName,[],function(x,I){var P=I.rows.item(0).c;b(P)},function(x,I){w(I)})})}).catch(w)});return S(d,a),d}function si(a,h){var d=this,b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[a+1],function(I,P){var $=P.rows.length?P.rows.item(0).key:null;w($)},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function ai(a){var h=this,d=new g(function(b,w){h.ready().then(function(){var _=h._dbInfo;_.db.transaction(function(E){Ee(E,_,"SELECT key FROM "+_.storeName,[],function(x,I){for(var P=[],$=0;$<I.rows.length;$++)P.push(I.rows.item($).key);b(P)},function(x,I){w(I)})})}).catch(w)});return S(d,a),d}function ci(a){return new g(function(h,d){a.transaction(function(b){b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(w,_){for(var E=[],x=0;x<_.rows.length;x++)E.push(_.rows.item(x).name);h({db:a,storeNames:E})},function(w,_){d(_)})},function(b){d(b)})})}function li(a,h){h=D.apply(this,arguments);var d=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||d.name,a.storeName=a.storeName||d.storeName);var b,w=this;return b=a.name?new g(function(_){var E;E=a.name===d.name?w._dbInfo.db:openDatabase(a.name,"","",0),a.storeName?_({db:E,storeNames:[a.storeName]}):_(ci(E))}).then(function(_){return new g(function(E,x){_.db.transaction(function(I){function P(V){return new g(function(G,re){I.executeSql("DROP TABLE IF EXISTS "+V,[],function(){G()},function(_e,Jt){re(Jt)})})}for(var $=[],U=0,q=_.storeNames.length;U<q;U++)$.push(P(_.storeNames[U]));g.all($).then(function(){E()}).catch(function(V){x(V)})},function(I){x(I)})})}):g.reject("Invalid arguments"),S(b,h),b}var ui={_driver:"webSQLStorage",_initStorage:Qr,_support:Kr(),iterate:ti,getItem:ei,setItem:ni,removeItem:oi,clear:ri,length:ii,key:si,keys:ai,dropInstance:li};function hi(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function vo(a,h){var d=a.name+"/";return a.storeName!==h.storeName&&(d+=a.storeName+"/"),d}function di(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function fi(){return!di()||localStorage.length>0}function pi(a){var h=this,d={};if(a)for(var b in a)d[b]=a[b];return d.keyPrefix=vo(a,h._defaultConfig),fi()?(h._dbInfo=d,d.serializer=Vt,g.resolve()):g.reject()}function gi(a){var h=this,d=h.ready().then(function(){for(var b=h._dbInfo.keyPrefix,w=localStorage.length-1;w>=0;w--){var _=localStorage.key(w);_.indexOf(b)===0&&localStorage.removeItem(_)}});return S(d,a),d}function mi(a,h){var d=this;a=N(a);var b=d.ready().then(function(){var w=d._dbInfo,_=localStorage.getItem(w.keyPrefix+a);return _&&(_=w.serializer.deserialize(_)),_});return S(b,h),b}function vi(a,h){var d=this,b=d.ready().then(function(){for(var w=d._dbInfo,_=w.keyPrefix,E=_.length,x=localStorage.length,I=1,P=0;P<x;P++){var $=localStorage.key(P);if($.indexOf(_)===0){var U=localStorage.getItem($);if(U&&(U=w.serializer.deserialize(U)),(U=a(U,$.substring(E),I++))!==void 0)return U}}});return S(b,h),b}function yi(a,h){var d=this,b=d.ready().then(function(){var w,_=d._dbInfo;try{w=localStorage.key(a)}catch{w=null}return w&&(w=w.substring(_.keyPrefix.length)),w});return S(b,h),b}function wi(a){var h=this,d=h.ready().then(function(){for(var b=h._dbInfo,w=localStorage.length,_=[],E=0;E<w;E++){var x=localStorage.key(E);x.indexOf(b.keyPrefix)===0&&_.push(x.substring(b.keyPrefix.length))}return _});return S(d,a),d}function bi(a){var h=this.keys().then(function(d){return d.length});return S(h,a),h}function _i(a,h){var d=this;a=N(a);var b=d.ready().then(function(){var w=d._dbInfo;localStorage.removeItem(w.keyPrefix+a)});return S(b,h),b}function Si(a,h,d){var b=this;a=N(a);var w=b.ready().then(function(){h===void 0&&(h=null);var _=h;return new g(function(E,x){var I=b._dbInfo;I.serializer.serialize(h,function(P,$){if($)x($);else try{localStorage.setItem(I.keyPrefix+a,P),E(_)}catch(U){U.name!=="QuotaExceededError"&&U.name!=="NS_ERROR_DOM_QUOTA_REACHED"||x(U),x(U)}})})});return S(w,d),w}function Ci(a,h){if(h=D.apply(this,arguments),!(a=typeof a!="function"&&a||{}).name){var d=this.config();a.name=a.name||d.name,a.storeName=a.storeName||d.storeName}var b,w=this;return b=a.name?new g(function(_){a.storeName?_(vo(a,w._defaultConfig)):_(a.name+"/")}).then(function(_){for(var E=localStorage.length-1;E>=0;E--){var x=localStorage.key(E);x.indexOf(_)===0&&localStorage.removeItem(x)}}):g.reject("Invalid arguments"),S(b,h),b}var Ei={_driver:"localStorageWrapper",_initStorage:pi,_support:hi(),iterate:vi,getItem:mi,setItem:Si,removeItem:_i,clear:gi,length:bi,key:yi,keys:wi,dropInstance:Ci},ki=function(a,h){return a===h||typeof a=="number"&&typeof h=="number"&&isNaN(a)&&isNaN(h)},xi=function(a,h){for(var d=a.length,b=0;b<d;){if(ki(a[b],h))return!0;b++}return!1},yo=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},Ke={},wo={},Oe={INDEXEDDB:Gr,WEBSQL:ui,LOCALSTORAGE:Ei},Ii=[Oe.INDEXEDDB._driver,Oe.WEBSQL._driver,Oe.LOCALSTORAGE._driver],lt=["dropInstance"],Gt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(lt),Ti={description:"",driver:Ii.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ri(a,h){a[h]=function(){var d=arguments;return a.ready().then(function(){return a[h].apply(a,d)})}}function Kt(){for(var a=1;a<arguments.length;a++){var h=arguments[a];if(h)for(var d in h)h.hasOwnProperty(d)&&(yo(h[d])?arguments[0][d]=h[d].slice():arguments[0][d]=h[d])}return arguments[0]}var Pi=function(){function a(h){for(var d in r(this,a),Oe)if(Oe.hasOwnProperty(d)){var b=Oe[d],w=b._driver;this[d]=w,Ke[w]||this.defineDriver(b)}this._defaultConfig=Kt({},Ti),this._config=Kt({},this._defaultConfig,h),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(h){if((h===void 0?"undefined":o(h))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var d in h){if(d==="storeName"&&(h[d]=h[d].replace(/\W/g,"_")),d==="version"&&typeof h[d]!="number")return new Error("Database version must be a number.");this._config[d]=h[d]}return!("driver"in h)||!h.driver||this.setDriver(this._config.driver)}return typeof h=="string"?this._config[h]:this._config},a.prototype.defineDriver=function(h,d,b){var w=new g(function(_,E){try{var x=h._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!h._driver)return void E(I);for(var P=Gt.concat("_initStorage"),$=0,U=P.length;$<U;$++){var q=P[$];if((!xi(lt,q)||h[q])&&typeof h[q]!="function")return void E(I)}var V=function(){for(var re=function(zi){return function(){var Ai=new Error("Method "+zi+" is not implemented by the current driver"),bo=g.reject(Ai);return S(bo,arguments[arguments.length-1]),bo}},_e=0,Jt=lt.length;_e<Jt;_e++){var Yt=lt[_e];h[Yt]||(h[Yt]=re(Yt))}};V();var G=function(re){Ke[x]&&console.info("Redefining LocalForage driver: "+x),Ke[x]=h,wo[x]=re,_()};"_support"in h?h._support&&typeof h._support=="function"?h._support().then(G,E):G(!!h._support):G(!0)}catch(re){E(re)}});return C(w,d,b),w},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(h,d,b){var w=Ke[h]?g.resolve(Ke[h]):g.reject(new Error("Driver not found."));return C(w,d,b),w},a.prototype.getSerializer=function(h){var d=g.resolve(Vt);return C(d,h),d},a.prototype.ready=function(h){var d=this,b=d._driverSet.then(function(){return d._ready===null&&(d._ready=d._initDriver()),d._ready});return C(b,h,h),b},a.prototype.setDriver=function(h,d,b){var w=this;yo(h)||(h=[h]);var _=this._getSupportedDrivers(h);function E(){w._config.driver=w.driver()}function x($){return w._extend($),E(),w._ready=w._initStorage(w._config),w._ready}function I($){return function(){var U=0;function q(){for(;U<$.length;){var V=$[U];return U++,w._dbInfo=null,w._ready=null,w.getDriver(V).then(x).catch(q)}E();var G=new Error("No available storage method found.");return w._driverSet=g.reject(G),w._driverSet}return q()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return g.resolve()}):g.resolve();return this._driverSet=P.then(function(){var $=_[0];return w._dbInfo=null,w._ready=null,w.getDriver($).then(function(U){w._driver=U._driver,E(),w._wrapLibraryMethodsWithReady(),w._initDriver=I(_)})}).catch(function(){E();var $=new Error("No available storage method found.");return w._driverSet=g.reject($),w._driverSet}),C(this._driverSet,d,b),this._driverSet},a.prototype.supports=function(h){return!!wo[h]},a.prototype._extend=function(h){Kt(this,h)},a.prototype._getSupportedDrivers=function(h){for(var d=[],b=0,w=h.length;b<w;b++){var _=h[b];this.supports(_)&&d.push(_)}return d},a.prototype._wrapLibraryMethodsWithReady=function(){for(var h=0,d=Gt.length;h<d;h++)Ri(this,Gt[h])},a.prototype.createInstance=function(h){return new a(h)},a}(),Mi=new Pi;e.exports=Mi},{3:3}]},{},[4])(4)),rr.exports),xt=yt(Zs),sr={exports:{}},Qs=(ir||(ir=1,function(n){((e,t)=>{n.exports=t()})(0,()=>{const e=typeof window=="object"?window:this;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let t=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",u={createWriteStream:function(S,C,N){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},M=0,f=null,l=null,v=null;if(Number.isFinite(C)?([N,C]=[C,N],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=N,D.writableStrategy=C):C&&C.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=N,D.writableStrategy=C):D=C||{},!s){t||(t=i?g(u.mitm):function(L){const A="width=200,height=100",T=document.createDocumentFragment(),z={frame:e.open(L,"popup",A),loaded:!1,isIframe:!1,isPopup:!0,remove(){z.frame.close()},addEventListener(...O){T.addEventListener(...O)},dispatchEvent(...O){T.dispatchEvent(...O)},removeEventListener(...O){T.removeEventListener(...O)},postMessage(...O){z.frame.postMessage(...O)}},W=O=>{O.source===z.frame&&(z.loaded=!0,e.removeEventListener("message",W),z.dispatchEvent(new Event("load")))};return e.addEventListener("message",W),z}(u.mitm)),l=new MessageChannel,S=encodeURIComponent(S.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const p={transferringReadable:o,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+S,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+S}};D.size&&(p.headers["Content-Length"]=D.size);const y=[p,"*",[l.port2]];if(o){const L=c==="iframe"?void 0:{transform(T,z){if(!(T instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");M+=T.length,z.enqueue(T),f&&(location.href=f,f=null)},flush(){f&&(location.href=f)}};v=new u.TransformStream(L,D.writableStrategy,D.readableStrategy);const A=v.readable;l.port1.postMessage({readableStream:A},[A])}l.port1.onmessage=L=>{L.data.download?c==="navigate"?(t.remove(),t=null,M?location.href=L.data.download:f=L.data.download):(t.isPopup&&(t.remove(),t=null,c==="iframe"&&g(u.mitm)),g(L.data.download)):L.data.abort&&(m=[],l.port1.postMessage("abort"),l.port1.onmessage=null,l.port1.close(),l.port2.close(),l=null)},t.loaded?t.postMessage(...y):t.addEventListener("load",()=>{t.postMessage(...y)},{once:!0})}let m=[];return!s&&v&&v.writable||new u.WritableStream({write(p){if(!(p instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?m.push(p):(l.port1.postMessage(p),M+=p.length,f&&(location.href=f,f=null))},close(){if(s){const p=new Blob(m,{type:"application/octet-stream; charset=utf-8"}),y=document.createElement("a");y.href=URL.createObjectURL(p),y.download=S,y.click()}else l.port1.postMessage("end")},abort(){m=[],l.port1.postMessage("abort"),l.port1.onmessage=null,l.port1.close(),l.port2.close(),l=null}},D.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 g(S){if(!S)throw new Error("meh");const C=document.createElement("iframe");return C.hidden=!0,C.src=S,C.loaded=!1,C.name="iframe",C.isIframe=!0,C.postMessage=(...N)=>C.contentWindow.postMessage(...N),C.addEventListener("load",()=>{C.loaded=!0},{once:!0}),document.body.appendChild(C),C}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(S=>{try{S()}catch{}})(()=>{const{readable:S}=new TransformStream,C=new MessageChannel;C.port1.postMessage(S,[S]),C.port1.close(),C.port2.close(),o=!0,Object.defineProperty(u,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),u})}(sr)),sr.exports),ea=yt(Qs);class ta{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,o=3,r=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=o*this.ChunkUnitM,this.eventTarget=bn(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",o){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await Se(t,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=xt.createInstance({name:this.fileID,driver:xt.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),xt.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let o=e;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 c=this.cacheSize;let u=0;for(let g=0;g<this.totalChunks;g++){if(this.keys&&this.keys?.indexOf(g.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const S=g*this.chunkByteSize;let C=S+this.chunkByteSize-1;this.fileMetaData&&C>this.fileMetaData.length&&(C=this.fileMetaData.length-1);const N={range:`bytes=${S}-${C}`};for(;u>=c;)await this.sleep(200);const D=g.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${g+1}/${this.totalChunks}`),u++,Se(o,t,i,N,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async M=>{const f=M.data;u--,await this.currentDB?.setItem(D,f),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const l=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${l}/${this.totalChunks}`),this.savefile()}).catch(M=>{u--;const f=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${f}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=ea.createWriteStream(this.fileName).getWriter();let t=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:u,value:g}=await c.read();if(u)break;await e.write(g)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),xt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function na(n,e){let t="",o="";for(const r in e)t+=r+"="+encodeURIComponent(e[r])+"&";return t=t.replace(/&$/,""),o=/\?$/.test(n)?n+t:n.replace(/\/?$/,"?")+t,o}function ar(n={},e={}){let t;for(t in e)Me(e[t])?n[t]=ar(n[t],e[t]):n[t]=e[t];return n}function oa(n,e){const t=`${n}_${e}`;return he.MD5(t)}function cr(n){const e=function(c){if(!c)return;const u=c,g=[];if(u)for(let S of u){const C=lr(S);C&&g.push(C)}return g}(n.bussinessRoutes),t=function(c){if(!c)return;const u=c;if(u&&u.length>0){const g=[];return u.forEach(S=>{const C=ur(S);C&&g.push(C)}),g}}(n.widgetMenuConfig),o=function(c){if(c&&c.length>0){const u=[];return c.forEach(g=>{const S=function(C){return C?{id:C.id,label:C.label,layoutID:C.layoutID,container:C.container,preload:C.preload,afterid:C.afterid,bindid:C.bindid,group:C.group}:void 0}(g);S&&u.push(S)}),u}}(n.widgetConfig),r=function(c){if(c&&c.length>0)return c}(n.functionList),i=n.pkgObject.version,s=n.pkgObject.name;return{id:oa(s,i),name:B.Config.UI.SiteTitle,group:B.Config.UI.Group,product:s,version:i,routes:e,widgetMenu:t,widgets:o,functions:r}}function lr(n){if(n){let e=0;n.meta?.hidden&&(e=1);let t={path:n.path,name:n.name,title:n.meta?.title,type:e,index:n.meta?.index};if(n.children){const o=[];for(let r of n.children){const i=lr(r);i&&o.push(i)}o.length>0&&(t.children=o)}return t}}function ur(n){if(!n)return;const e={name:n.name,index:n.index,path:n.path,type:n.type};return n.children&&n.children.length>0&&(e.children=[],n.children.forEach(t=>{const o=ur(t);o&&e.children?.push(o)})),e}function ra(n,e="IconifyList.ts"){let t="",o=`const iconlist={
|
|
8
|
+
*/var ir,Zs=(or||(or=1,rr.exports=function n(e,t,o){function r(c,u){if(!t[c]){if(!e[c]){if(!u&&Mn)return Mn(c);if(i)return i(c,!0);var g=new Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g}var S=t[c]={exports:{}};e[c][0].call(S.exports,function(C){var N=e[c][1][C];return r(N||C)},S,S.exports,n,e,t,o)}return t[c].exports}for(var i=Mn,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(n,e,t){(function(o){var r,i,s=o.MutationObserver||o.WebKitMutationObserver;if(s){var c=0,u=new s(N),g=o.document.createTextNode("");u.observe(g,{characterData:!0}),r=function(){g.data=c=++c%2}}else if(o.setImmediate||o.MessageChannel===void 0)r="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var M=o.document.createElement("script");M.onreadystatechange=function(){N(),M.onreadystatechange=null,M.parentNode.removeChild(M),M=null},o.document.documentElement.appendChild(M)}:function(){setTimeout(N,0)};else{var S=new o.MessageChannel;S.port1.onmessage=N,r=function(){S.port2.postMessage(0)}}var C=[];function N(){var M,f;i=!0;for(var l=C.length;l;){for(f=C,C=[],M=-1;++M<l;)f[M]();l=C.length}i=!1}function D(M){C.push(M)!==1||i||r()}e.exports=D}).call(this,qe!==void 0?qe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,e,t){var o=n(1);function r(){}var i={},s=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function g(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,p!==r&&D(this,p)}function S(p,y,L){this.promise=p,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}function C(p,y,L){o(function(){var A;try{A=y(L)}catch(T){return i.reject(p,T)}A===p?i.reject(p,new TypeError("Cannot resolve promise with itself")):i.resolve(p,A)})}function N(p){var y=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof y=="function")return function(){y.apply(p,arguments)}}function D(p,y){var L=!1;function A(O){L||(L=!0,i.reject(p,O))}function T(O){L||(L=!0,i.resolve(p,O))}function z(){y(T,A)}var W=M(z);W.status==="error"&&A(W.value)}function M(p,y){var L={};try{L.value=p(y),L.status="success"}catch(A){L.status="error",L.value=A}return L}function f(p){return p instanceof this?p:i.resolve(new this(r),p)}function l(p){var y=new this(r);return i.reject(y,p)}function v(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=p.length,A=!1;if(!L)return this.resolve([]);for(var T=new Array(L),z=0,W=-1,O=new this(r);++W<L;)R(p[W],W);return O;function R(H,X){function le(oe){T[X]=oe,++z!==L||A||(A=!0,i.resolve(O,T))}y.resolve(H).then(le,function(oe){A||(A=!0,i.reject(O,oe))})}}function m(p){var y=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=p.length,A=!1;if(!L)return this.resolve([]);for(var T=-1,z=new this(r);++T<L;)W(p[T]);return z;function W(O){y.resolve(O).then(function(R){A||(A=!0,i.resolve(z,R))},function(R){A||(A=!0,i.reject(z,R))})}}e.exports=g,g.prototype.catch=function(p){return this.then(null,p)},g.prototype.then=function(p,y){if(typeof p!="function"&&this.state===c||typeof y!="function"&&this.state===s)return this;var L=new this.constructor(r);return this.state!==u?C(L,this.state===c?p:y,this.outcome):this.queue.push(new S(L,p,y)),L},S.prototype.callFulfilled=function(p){i.resolve(this.promise,p)},S.prototype.otherCallFulfilled=function(p){C(this.promise,this.onFulfilled,p)},S.prototype.callRejected=function(p){i.reject(this.promise,p)},S.prototype.otherCallRejected=function(p){C(this.promise,this.onRejected,p)},i.resolve=function(p,y){var L=M(N,y);if(L.status==="error")return i.reject(p,L.value);var A=L.value;if(A)D(p,A);else{p.state=c,p.outcome=y;for(var T=-1,z=p.queue.length;++T<z;)p.queue[T].callFulfilled(y)}return p},i.reject=function(p,y){p.state=s,p.outcome=y;for(var L=-1,A=p.queue.length;++L<A;)p.queue[L].callRejected(y);return p},g.resolve=f,g.reject=l,g.all=v,g.race=m},{1:1}],3:[function(n,e,t){(function(o){typeof o.Promise!="function"&&(o.Promise=n(2))}).call(this,qe!==void 0?qe:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,e,t){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,h){if(!(a instanceof h))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),h=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!a||h)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function u(a,h){a=a||[],h=h||{};try{return new Blob(a,h)}catch(w){if(w.name!=="TypeError")throw w;for(var d=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),b=0;b<a.length;b+=1)d.append(a[b]);return d.getBlob(h.type)}}typeof Promise>"u"&&n(3);var g=Promise;function S(a,h){h&&a.then(function(d){h(null,d)},function(d){h(d)})}function C(a,h,d){typeof h=="function"&&a.then(h),typeof d=="function"&&a.catch(d)}function N(a){return typeof a!="string"&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var M="local-forage-detect-blob-support",f=void 0,l={},v=Object.prototype.toString,m="readonly",p="readwrite";function y(a){for(var h=a.length,d=new ArrayBuffer(h),b=new Uint8Array(d),w=0;w<h;w++)b[w]=a.charCodeAt(w);return d}function L(a){return new g(function(h){var d=a.transaction(M,p),b=u([""]);d.objectStore(M).put(b,"key"),d.onabort=function(w){w.preventDefault(),w.stopPropagation(),h(!1)},d.oncomplete=function(){var w=navigator.userAgent.match(/Chrome\/(\d+)/),_=navigator.userAgent.match(/Edge\//);h(_||!w||parseInt(w[1],10)>=43)}}).catch(function(){return!1})}function A(a){return typeof f=="boolean"?g.resolve(f):L(a).then(function(h){return f=h})}function T(a){var h=l[a.name],d={};d.promise=new g(function(b,w){d.resolve=b,d.reject=w}),h.deferredOperations.push(d),h.dbReady?h.dbReady=h.dbReady.then(function(){return d.promise}):h.dbReady=d.promise}function z(a){var h=l[a.name].deferredOperations.pop();if(h)return h.resolve(),h.promise}function W(a,h){var d=l[a.name].deferredOperations.pop();if(d)return d.reject(h),d.promise}function O(a,h){return new g(function(d,b){if(l[a.name]=l[a.name]||eo(),a.db){if(!h)return d(a.db);T(a),a.db.close()}var w=[a.name];h&&w.push(a.version);var _=s.open.apply(s,w);h&&(_.onupgradeneeded=function(E){var x=_.result;try{x.createObjectStore(a.storeName),E.oldVersion<=1&&x.createObjectStore(M)}catch(I){if(I.name!=="ConstraintError")throw I;console.warn('The database "'+a.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),_.onerror=function(E){E.preventDefault(),b(_.error)},_.onsuccess=function(){var E=_.result;E.onversionchange=function(x){x.target.close()},d(E),z(a)}})}function R(a){return O(a,!1)}function H(a){return O(a,!0)}function X(a,h){if(!a.db)return!0;var d=!a.db.objectStoreNames.contains(a.storeName),b=a.version<a.db.version,w=a.version>a.db.version;if(b&&(a.version!==h&&console.warn('The database "'+a.name+`" can't be downgraded from version `+a.db.version+" to version "+a.version+"."),a.version=a.db.version),w||d){if(d){var _=a.db.version+1;_>a.version&&(a.version=_)}return!0}return!1}function le(a){return new g(function(h,d){var b=new FileReader;b.onerror=d,b.onloadend=function(w){var _=btoa(w.target.result||"");h({__local_forage_encoded_blob:!0,data:_,type:a.type})},b.readAsBinaryString(a)})}function oe(a){return u([y(atob(a.data))],{type:a.type})}function ye(a){return a&&a.__local_forage_encoded_blob}function at(a){var h=this,d=h._initReady().then(function(){var b=l[h._dbInfo.name];if(b&&b.dbReady)return b.dbReady});return C(d,a,a),d}function jt(a){T(a);for(var h=l[a.name],d=h.forages,b=0;b<d.length;b++){var w=d[b];w._dbInfo.db&&(w._dbInfo.db.close(),w._dbInfo.db=null)}return a.db=null,R(a).then(function(_){return a.db=_,X(a)?H(a):_}).then(function(_){a.db=h.db=_;for(var E=0;E<d.length;E++)d[E]._dbInfo.db=_}).catch(function(_){throw W(a,_),_})}function me(a,h,d,b){b===void 0&&(b=1);try{var w=a.db.transaction(a.storeName,h);d(null,w)}catch(_){if(b>0&&(!a.db||_.name==="InvalidStateError"||_.name==="NotFoundError"))return g.resolve().then(function(){if(!a.db||_.name==="NotFoundError"&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),H(a)}).then(function(){return jt(a).then(function(){me(a,h,d,b-1)})}).catch(d);d(_)}}function eo(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Br(a){var h=this,d={db:null};if(a)for(var b in a)d[b]=a[b];var w=l[d.name];w||(w=eo(),l[d.name]=w),w.forages.push(h),h._initReady||(h._initReady=h.ready,h.ready=at);var _=[];function E(){return g.resolve()}for(var x=0;x<w.forages.length;x++){var I=w.forages[x];I!==h&&_.push(I._initReady().catch(E))}var P=w.forages.slice(0);return g.all(_).then(function(){return d.db=w.db,R(d)}).then(function($){return d.db=$,X(d,h._defaultConfig.version)?H(d):$}).then(function($){d.db=w.db=$,h._dbInfo=d;for(var U=0;U<P.length;U++){var q=P[U];q!==h&&(q._dbInfo.db=d.db,q._dbInfo.version=d.version)}})}function Wr(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){me(d._dbInfo,m,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName).get(a);I.onsuccess=function(){var P=I.result;P===void 0&&(P=null),ye(P)&&(P=oe(P)),w(P)},I.onerror=function(){_(I.error)}}catch(P){_(P)}})}).catch(_)});return S(b,h),b}function Ur(a,h){var d=this,b=new g(function(w,_){d.ready().then(function(){me(d._dbInfo,m,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName).openCursor(),P=1;I.onsuccess=function(){var $=I.result;if($){var U=$.value;ye(U)&&(U=oe(U));var q=a(U,$.key,P++);q!==void 0?w(q):$.continue()}else w()},I.onerror=function(){_(I.error)}}catch($){_($)}})}).catch(_)});return S(b,h),b}function Or(a,h,d){var b=this;a=N(a);var w=new g(function(_,E){var x;b.ready().then(function(){return x=b._dbInfo,v.call(h)==="[object Blob]"?A(x.db).then(function(I){return I?h:le(h)}):h}).then(function(I){me(b._dbInfo,p,function(P,$){if(P)return E(P);try{var U=$.objectStore(b._dbInfo.storeName);I===null&&(I=void 0);var q=U.put(I,a);$.oncomplete=function(){I===void 0&&(I=null),_(I)},$.onabort=$.onerror=function(){var V=q.error?q.error:q.transaction.error;E(V)}}catch(V){E(V)}})}).catch(E)});return S(w,d),w}function jr(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){me(d._dbInfo,p,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName).delete(a);x.oncomplete=function(){w()},x.onerror=function(){_(I.error)},x.onabort=function(){var P=I.error?I.error:I.transaction.error;_(P)}}catch(P){_(P)}})}).catch(_)});return S(b,h),b}function Hr(a){var h=this,d=new g(function(b,w){h.ready().then(function(){me(h._dbInfo,p,function(_,E){if(_)return w(_);try{var x=E.objectStore(h._dbInfo.storeName).clear();E.oncomplete=function(){b()},E.onabort=E.onerror=function(){var I=x.error?x.error:x.transaction.error;w(I)}}catch(I){w(I)}})}).catch(w)});return S(d,a),d}function qr(a){var h=this,d=new g(function(b,w){h.ready().then(function(){me(h._dbInfo,m,function(_,E){if(_)return w(_);try{var x=E.objectStore(h._dbInfo.storeName).count();x.onsuccess=function(){b(x.result)},x.onerror=function(){w(x.error)}}catch(I){w(I)}})}).catch(w)});return S(d,a),d}function Fr(a,h){var d=this,b=new g(function(w,_){a<0?w(null):d.ready().then(function(){me(d._dbInfo,m,function(E,x){if(E)return _(E);try{var I=x.objectStore(d._dbInfo.storeName),P=!1,$=I.openKeyCursor();$.onsuccess=function(){var U=$.result;U?a===0||P?w(U.key):(P=!0,U.advance(a)):w(null)},$.onerror=function(){_($.error)}}catch(U){_(U)}})}).catch(_)});return S(b,h),b}function Xr(a){var h=this,d=new g(function(b,w){h.ready().then(function(){me(h._dbInfo,m,function(_,E){if(_)return w(_);try{var x=E.objectStore(h._dbInfo.storeName).openKeyCursor(),I=[];x.onsuccess=function(){var P=x.result;P?(I.push(P.key),P.continue()):b(I)},x.onerror=function(){w(x.error)}}catch(P){w(P)}})}).catch(w)});return S(d,a),d}function Vr(a,h){h=D.apply(this,arguments);var d=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||d.name,a.storeName=a.storeName||d.storeName);var b,w=this;if(a.name){var _=a.name===d.name&&w._dbInfo.db?g.resolve(w._dbInfo.db):R(a).then(function(E){var x=l[a.name],I=x.forages;x.db=E;for(var P=0;P<I.length;P++)I[P]._dbInfo.db=E;return E});b=a.storeName?_.then(function(E){if(E.objectStoreNames.contains(a.storeName)){var x=E.version+1;T(a);var I=l[a.name],P=I.forages;E.close();for(var $=0;$<P.length;$++){var U=P[$];U._dbInfo.db=null,U._dbInfo.version=x}var q=new g(function(V,G){var re=s.open(a.name,x);re.onerror=function(_e){re.result.close(),G(_e)},re.onupgradeneeded=function(){re.result.deleteObjectStore(a.storeName)},re.onsuccess=function(){var _e=re.result;_e.close(),V(_e)}});return q.then(function(V){I.db=V;for(var G=0;G<P.length;G++){var re=P[G];re._dbInfo.db=V,z(re._dbInfo)}}).catch(function(V){throw(W(a,V)||g.resolve()).catch(function(){}),V})}}):_.then(function(E){T(a);var x=l[a.name],I=x.forages;E.close();for(var P=0;P<I.length;P++)I[P]._dbInfo.db=null;var $=new g(function(U,q){var V=s.deleteDatabase(a.name);V.onerror=function(){var G=V.result;G&&G.close(),q(V.error)},V.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')},V.onsuccess=function(){var G=V.result;G&&G.close(),U(G)}});return $.then(function(U){x.db=U;for(var q=0;q<I.length;q++)z(I[q]._dbInfo)}).catch(function(U){throw(W(a,U)||g.resolve()).catch(function(){}),U})})}else b=g.reject("Invalid arguments");return S(b,h),b}var Gr={_driver:"asyncStorage",_initStorage:Br,_support:c(),iterate:Ur,getItem:Wr,setItem:Or,removeItem:jr,clear:Hr,length:qr,key:Fr,keys:Xr,dropInstance:Vr};function Kr(){return typeof openDatabase=="function"}var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jr="~~local_forage_type~",to=/^~~local_forage_type~([^~]+)~/,ct="__lfsc__:",Ht=ct.length,qt="arbf",Ft="blob",no="si08",oo="ui08",ro="uic8",io="si16",so="si32",ao="ur16",co="ui32",lo="fl32",uo="fl64",ho=Ht+qt.length,fo=Object.prototype.toString;function po(a){var h,d,b,w,_,E=.75*a.length,x=a.length,I=0;a[a.length-1]==="="&&(E--,a[a.length-2]==="="&&E--);var P=new ArrayBuffer(E),$=new Uint8Array(P);for(h=0;h<x;h+=4)d=Ce.indexOf(a[h]),b=Ce.indexOf(a[h+1]),w=Ce.indexOf(a[h+2]),_=Ce.indexOf(a[h+3]),$[I++]=d<<2|b>>4,$[I++]=(15&b)<<4|w>>2,$[I++]=(3&w)<<6|63&_;return P}function Xt(a){var h,d=new Uint8Array(a),b="";for(h=0;h<d.length;h+=3)b+=Ce[d[h]>>2],b+=Ce[(3&d[h])<<4|d[h+1]>>4],b+=Ce[(15&d[h+1])<<2|d[h+2]>>6],b+=Ce[63&d[h+2]];return d.length%3==2?b=b.substring(0,b.length-1)+"=":d.length%3==1&&(b=b.substring(0,b.length-2)+"=="),b}function Yr(a,h){var d="";if(a&&(d=fo.call(a)),a&&(d==="[object ArrayBuffer]"||a.buffer&&fo.call(a.buffer)==="[object ArrayBuffer]")){var b,w=ct;a instanceof ArrayBuffer?(b=a,w+=qt):(b=a.buffer,d==="[object Int8Array]"?w+=no:d==="[object Uint8Array]"?w+=oo:d==="[object Uint8ClampedArray]"?w+=ro:d==="[object Int16Array]"?w+=io:d==="[object Uint16Array]"?w+=ao:d==="[object Int32Array]"?w+=so:d==="[object Uint32Array]"?w+=co:d==="[object Float32Array]"?w+=lo:d==="[object Float64Array]"?w+=uo:h(new Error("Failed to get type for BinaryArray"))),h(w+Xt(b))}else if(d==="[object Blob]"){var _=new FileReader;_.onload=function(){var E=Jr+a.type+"~"+Xt(this.result);h(ct+Ft+E)},_.readAsArrayBuffer(a)}else try{h(JSON.stringify(a))}catch(E){console.error("Couldn't convert value into a JSON string: ",a),h(null,E)}}function Zr(a){if(a.substring(0,Ht)!==ct)return JSON.parse(a);var h,d=a.substring(ho),b=a.substring(Ht,ho);if(b===Ft&&to.test(d)){var w=d.match(to);h=w[1],d=d.substring(w[0].length)}var _=po(d);switch(b){case qt:return _;case Ft:return u([_],{type:h});case no:return new Int8Array(_);case oo:return new Uint8Array(_);case ro:return new Uint8ClampedArray(_);case io:return new Int16Array(_);case ao:return new Uint16Array(_);case so:return new Int32Array(_);case co:return new Uint32Array(_);case lo:return new Float32Array(_);case uo:return new Float64Array(_);default:throw new Error("Unkown type: "+b)}}var Vt={serialize:Yr,deserialize:Zr,stringToBuffer:po,bufferToString:Xt};function go(a,h,d,b){a.executeSql("CREATE TABLE IF NOT EXISTS "+h.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],d,b)}function Qr(a){var h=this,d={db:null};if(a)for(var b in a)d[b]=typeof a[b]!="string"?a[b].toString():a[b];var w=new g(function(_,E){try{d.db=openDatabase(d.name,String(d.version),d.description,d.size)}catch(x){return E(x)}d.db.transaction(function(x){go(x,d,function(){h._dbInfo=d,_()},function(I,P){E(P)})},E)});return d.serializer=Vt,w}function Ee(a,h,d,b,w,_){a.executeSql(d,b,w,function(E,x){x.code===x.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[h.storeName],function(I,P){P.rows.length?_(I,x):go(I,h,function(){I.executeSql(d,b,w,_)},_)},_):_(E,x)},_)}function ei(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[a],function(I,P){var $=P.rows.length?P.rows.item(0).value:null;$&&($=E.serializer.deserialize($)),w($)},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function ti(a,h){var d=this,b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"SELECT * FROM "+E.storeName,[],function(I,P){for(var $=P.rows,U=$.length,q=0;q<U;q++){var V=$.item(q),G=V.value;if(G&&(G=E.serializer.deserialize(G)),(G=a(G,V.key,q+1))!==void 0)return void w(G)}w()},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function mo(a,h,d,b){var w=this;a=N(a);var _=new g(function(E,x){w.ready().then(function(){h===void 0&&(h=null);var I=h,P=w._dbInfo;P.serializer.serialize(h,function($,U){U?x(U):P.db.transaction(function(q){Ee(q,P,"INSERT OR REPLACE INTO "+P.storeName+" (key, value) VALUES (?, ?)",[a,$],function(){E(I)},function(V,G){x(G)})},function(q){if(q.code===q.QUOTA_ERR){if(b>0)return void E(mo.apply(w,[a,I,d,b-1]));x(q)}})})}).catch(x)});return S(_,d),_}function ni(a,h,d){return mo.apply(this,[a,h,d,1])}function oi(a,h){var d=this;a=N(a);var b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[a],function(){w()},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function ri(a){var h=this,d=new g(function(b,w){h.ready().then(function(){var _=h._dbInfo;_.db.transaction(function(E){Ee(E,_,"DELETE FROM "+_.storeName,[],function(){b()},function(x,I){w(I)})})}).catch(w)});return S(d,a),d}function ii(a){var h=this,d=new g(function(b,w){h.ready().then(function(){var _=h._dbInfo;_.db.transaction(function(E){Ee(E,_,"SELECT COUNT(key) as c FROM "+_.storeName,[],function(x,I){var P=I.rows.item(0).c;b(P)},function(x,I){w(I)})})}).catch(w)});return S(d,a),d}function si(a,h){var d=this,b=new g(function(w,_){d.ready().then(function(){var E=d._dbInfo;E.db.transaction(function(x){Ee(x,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[a+1],function(I,P){var $=P.rows.length?P.rows.item(0).key:null;w($)},function(I,P){_(P)})})}).catch(_)});return S(b,h),b}function ai(a){var h=this,d=new g(function(b,w){h.ready().then(function(){var _=h._dbInfo;_.db.transaction(function(E){Ee(E,_,"SELECT key FROM "+_.storeName,[],function(x,I){for(var P=[],$=0;$<I.rows.length;$++)P.push(I.rows.item($).key);b(P)},function(x,I){w(I)})})}).catch(w)});return S(d,a),d}function ci(a){return new g(function(h,d){a.transaction(function(b){b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(w,_){for(var E=[],x=0;x<_.rows.length;x++)E.push(_.rows.item(x).name);h({db:a,storeNames:E})},function(w,_){d(_)})},function(b){d(b)})})}function li(a,h){h=D.apply(this,arguments);var d=this.config();(a=typeof a!="function"&&a||{}).name||(a.name=a.name||d.name,a.storeName=a.storeName||d.storeName);var b,w=this;return b=a.name?new g(function(_){var E;E=a.name===d.name?w._dbInfo.db:openDatabase(a.name,"","",0),a.storeName?_({db:E,storeNames:[a.storeName]}):_(ci(E))}).then(function(_){return new g(function(E,x){_.db.transaction(function(I){function P(V){return new g(function(G,re){I.executeSql("DROP TABLE IF EXISTS "+V,[],function(){G()},function(_e,Jt){re(Jt)})})}for(var $=[],U=0,q=_.storeNames.length;U<q;U++)$.push(P(_.storeNames[U]));g.all($).then(function(){E()}).catch(function(V){x(V)})},function(I){x(I)})})}):g.reject("Invalid arguments"),S(b,h),b}var ui={_driver:"webSQLStorage",_initStorage:Qr,_support:Kr(),iterate:ti,getItem:ei,setItem:ni,removeItem:oi,clear:ri,length:ii,key:si,keys:ai,dropInstance:li};function hi(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function vo(a,h){var d=a.name+"/";return a.storeName!==h.storeName&&(d+=a.storeName+"/"),d}function di(){var a="_localforage_support_test";try{return localStorage.setItem(a,!0),localStorage.removeItem(a),!1}catch{return!0}}function fi(){return!di()||localStorage.length>0}function pi(a){var h=this,d={};if(a)for(var b in a)d[b]=a[b];return d.keyPrefix=vo(a,h._defaultConfig),fi()?(h._dbInfo=d,d.serializer=Vt,g.resolve()):g.reject()}function gi(a){var h=this,d=h.ready().then(function(){for(var b=h._dbInfo.keyPrefix,w=localStorage.length-1;w>=0;w--){var _=localStorage.key(w);_.indexOf(b)===0&&localStorage.removeItem(_)}});return S(d,a),d}function mi(a,h){var d=this;a=N(a);var b=d.ready().then(function(){var w=d._dbInfo,_=localStorage.getItem(w.keyPrefix+a);return _&&(_=w.serializer.deserialize(_)),_});return S(b,h),b}function vi(a,h){var d=this,b=d.ready().then(function(){for(var w=d._dbInfo,_=w.keyPrefix,E=_.length,x=localStorage.length,I=1,P=0;P<x;P++){var $=localStorage.key(P);if($.indexOf(_)===0){var U=localStorage.getItem($);if(U&&(U=w.serializer.deserialize(U)),(U=a(U,$.substring(E),I++))!==void 0)return U}}});return S(b,h),b}function yi(a,h){var d=this,b=d.ready().then(function(){var w,_=d._dbInfo;try{w=localStorage.key(a)}catch{w=null}return w&&(w=w.substring(_.keyPrefix.length)),w});return S(b,h),b}function wi(a){var h=this,d=h.ready().then(function(){for(var b=h._dbInfo,w=localStorage.length,_=[],E=0;E<w;E++){var x=localStorage.key(E);x.indexOf(b.keyPrefix)===0&&_.push(x.substring(b.keyPrefix.length))}return _});return S(d,a),d}function bi(a){var h=this.keys().then(function(d){return d.length});return S(h,a),h}function _i(a,h){var d=this;a=N(a);var b=d.ready().then(function(){var w=d._dbInfo;localStorage.removeItem(w.keyPrefix+a)});return S(b,h),b}function Si(a,h,d){var b=this;a=N(a);var w=b.ready().then(function(){h===void 0&&(h=null);var _=h;return new g(function(E,x){var I=b._dbInfo;I.serializer.serialize(h,function(P,$){if($)x($);else try{localStorage.setItem(I.keyPrefix+a,P),E(_)}catch(U){U.name!=="QuotaExceededError"&&U.name!=="NS_ERROR_DOM_QUOTA_REACHED"||x(U),x(U)}})})});return S(w,d),w}function Ci(a,h){if(h=D.apply(this,arguments),!(a=typeof a!="function"&&a||{}).name){var d=this.config();a.name=a.name||d.name,a.storeName=a.storeName||d.storeName}var b,w=this;return b=a.name?new g(function(_){a.storeName?_(vo(a,w._defaultConfig)):_(a.name+"/")}).then(function(_){for(var E=localStorage.length-1;E>=0;E--){var x=localStorage.key(E);x.indexOf(_)===0&&localStorage.removeItem(x)}}):g.reject("Invalid arguments"),S(b,h),b}var Ei={_driver:"localStorageWrapper",_initStorage:pi,_support:hi(),iterate:vi,getItem:mi,setItem:Si,removeItem:_i,clear:gi,length:bi,key:yi,keys:wi,dropInstance:Ci},ki=function(a,h){return a===h||typeof a=="number"&&typeof h=="number"&&isNaN(a)&&isNaN(h)},xi=function(a,h){for(var d=a.length,b=0;b<d;){if(ki(a[b],h))return!0;b++}return!1},yo=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},Ke={},wo={},Oe={INDEXEDDB:Gr,WEBSQL:ui,LOCALSTORAGE:Ei},Ii=[Oe.INDEXEDDB._driver,Oe.WEBSQL._driver,Oe.LOCALSTORAGE._driver],lt=["dropInstance"],Gt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(lt),Ti={description:"",driver:Ii.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Ri(a,h){a[h]=function(){var d=arguments;return a.ready().then(function(){return a[h].apply(a,d)})}}function Kt(){for(var a=1;a<arguments.length;a++){var h=arguments[a];if(h)for(var d in h)h.hasOwnProperty(d)&&(yo(h[d])?arguments[0][d]=h[d].slice():arguments[0][d]=h[d])}return arguments[0]}var Pi=function(){function a(h){for(var d in r(this,a),Oe)if(Oe.hasOwnProperty(d)){var b=Oe[d],w=b._driver;this[d]=w,Ke[w]||this.defineDriver(b)}this._defaultConfig=Kt({},Ti),this._config=Kt({},this._defaultConfig,h),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(h){if((h===void 0?"undefined":o(h))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var d in h){if(d==="storeName"&&(h[d]=h[d].replace(/\W/g,"_")),d==="version"&&typeof h[d]!="number")return new Error("Database version must be a number.");this._config[d]=h[d]}return!("driver"in h)||!h.driver||this.setDriver(this._config.driver)}return typeof h=="string"?this._config[h]:this._config},a.prototype.defineDriver=function(h,d,b){var w=new g(function(_,E){try{var x=h._driver,I=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!h._driver)return void E(I);for(var P=Gt.concat("_initStorage"),$=0,U=P.length;$<U;$++){var q=P[$];if((!xi(lt,q)||h[q])&&typeof h[q]!="function")return void E(I)}var V=function(){for(var re=function(zi){return function(){var Ai=new Error("Method "+zi+" is not implemented by the current driver"),bo=g.reject(Ai);return S(bo,arguments[arguments.length-1]),bo}},_e=0,Jt=lt.length;_e<Jt;_e++){var Yt=lt[_e];h[Yt]||(h[Yt]=re(Yt))}};V();var G=function(re){Ke[x]&&console.info("Redefining LocalForage driver: "+x),Ke[x]=h,wo[x]=re,_()};"_support"in h?h._support&&typeof h._support=="function"?h._support().then(G,E):G(!!h._support):G(!0)}catch(re){E(re)}});return C(w,d,b),w},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(h,d,b){var w=Ke[h]?g.resolve(Ke[h]):g.reject(new Error("Driver not found."));return C(w,d,b),w},a.prototype.getSerializer=function(h){var d=g.resolve(Vt);return C(d,h),d},a.prototype.ready=function(h){var d=this,b=d._driverSet.then(function(){return d._ready===null&&(d._ready=d._initDriver()),d._ready});return C(b,h,h),b},a.prototype.setDriver=function(h,d,b){var w=this;yo(h)||(h=[h]);var _=this._getSupportedDrivers(h);function E(){w._config.driver=w.driver()}function x($){return w._extend($),E(),w._ready=w._initStorage(w._config),w._ready}function I($){return function(){var U=0;function q(){for(;U<$.length;){var V=$[U];return U++,w._dbInfo=null,w._ready=null,w.getDriver(V).then(x).catch(q)}E();var G=new Error("No available storage method found.");return w._driverSet=g.reject(G),w._driverSet}return q()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return g.resolve()}):g.resolve();return this._driverSet=P.then(function(){var $=_[0];return w._dbInfo=null,w._ready=null,w.getDriver($).then(function(U){w._driver=U._driver,E(),w._wrapLibraryMethodsWithReady(),w._initDriver=I(_)})}).catch(function(){E();var $=new Error("No available storage method found.");return w._driverSet=g.reject($),w._driverSet}),C(this._driverSet,d,b),this._driverSet},a.prototype.supports=function(h){return!!wo[h]},a.prototype._extend=function(h){Kt(this,h)},a.prototype._getSupportedDrivers=function(h){for(var d=[],b=0,w=h.length;b<w;b++){var _=h[b];this.supports(_)&&d.push(_)}return d},a.prototype._wrapLibraryMethodsWithReady=function(){for(var h=0,d=Gt.length;h<d;h++)Ri(this,Gt[h])},a.prototype.createInstance=function(h){return new a(h)},a}(),Mi=new Pi;e.exports=Mi},{3:3}]},{},[4])(4)),rr.exports),xt=yt(Zs),sr={exports:{}},Qs=(ir||(ir=1,function(n){((e,t)=>{n.exports=t()})(0,()=>{const e=typeof window=="object"?window:this;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let t=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",u={createWriteStream:function(S,C,N){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},M=0,f=null,l=null,v=null;if(Number.isFinite(C)?([N,C]=[C,N],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=N,D.writableStrategy=C):C&&C.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=N,D.writableStrategy=C):D=C||{},!s){t||(t=i?g(u.mitm):function(L){const A="width=200,height=100",T=document.createDocumentFragment(),z={frame:e.open(L,"popup",A),loaded:!1,isIframe:!1,isPopup:!0,remove(){z.frame.close()},addEventListener(...O){T.addEventListener(...O)},dispatchEvent(...O){T.dispatchEvent(...O)},removeEventListener(...O){T.removeEventListener(...O)},postMessage(...O){z.frame.postMessage(...O)}},W=O=>{O.source===z.frame&&(z.loaded=!0,e.removeEventListener("message",W),z.dispatchEvent(new Event("load")))};return e.addEventListener("message",W),z}(u.mitm)),l=new MessageChannel,S=encodeURIComponent(S.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const p={transferringReadable:o,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+S,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+S}};D.size&&(p.headers["Content-Length"]=D.size);const y=[p,"*",[l.port2]];if(o){const L=c==="iframe"?void 0:{transform(T,z){if(!(T instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");M+=T.length,z.enqueue(T),f&&(location.href=f,f=null)},flush(){f&&(location.href=f)}};v=new u.TransformStream(L,D.writableStrategy,D.readableStrategy);const A=v.readable;l.port1.postMessage({readableStream:A},[A])}l.port1.onmessage=L=>{L.data.download?c==="navigate"?(t.remove(),t=null,M?location.href=L.data.download:f=L.data.download):(t.isPopup&&(t.remove(),t=null,c==="iframe"&&g(u.mitm)),g(L.data.download)):L.data.abort&&(m=[],l.port1.postMessage("abort"),l.port1.onmessage=null,l.port1.close(),l.port2.close(),l=null)},t.loaded?t.postMessage(...y):t.addEventListener("load",()=>{t.postMessage(...y)},{once:!0})}let m=[];return!s&&v&&v.writable||new u.WritableStream({write(p){if(!(p instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");s?m.push(p):(l.port1.postMessage(p),M+=p.length,f&&(location.href=f,f=null))},close(){if(s){const p=new Blob(m,{type:"application/octet-stream; charset=utf-8"}),y=document.createElement("a");y.href=URL.createObjectURL(p),y.download=S,y.click()}else l.port1.postMessage("end")},abort(){m=[],l.port1.postMessage("abort"),l.port1.onmessage=null,l.port1.close(),l.port2.close(),l=null}},D.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 g(S){if(!S)throw new Error("meh");const C=document.createElement("iframe");return C.hidden=!0,C.src=S,C.loaded=!1,C.name="iframe",C.isIframe=!0,C.postMessage=(...N)=>C.contentWindow.postMessage(...N),C.addEventListener("load",()=>{C.loaded=!0},{once:!0}),document.body.appendChild(C),C}try{new Response(new ReadableStream),i&&!("serviceWorker"in navigator)&&(s=!0)}catch{s=!0}return(S=>{try{S()}catch{}})(()=>{const{readable:S}=new TransformStream,C=new MessageChannel;C.port1.postMessage(S,[S]),C.port1.close(),C.port2.close(),o=!0,Object.defineProperty(u,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),u})}(sr)),sr.exports),ea=yt(Qs);class ta{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,t,o=3,r=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=o*this.ChunkUnitM,this.eventTarget=bn(),this.initIndexDB(),r>=3&&(this.cacheSize=r),i>this.requestTimeout&&(this.requestTimeout=i)}on(e,t){this.eventTarget.on(e,t)}dispatch(e,t){this.eventTarget.emit(e,t)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,t="",o){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await Se(t,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=xt.createInstance({name:this.fileID,driver:xt.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const t="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(t,this.fileMetaData)}if(this.fileMetaData!=null){const t=this.fileMetaData.chunkSize;t!=null&&t>0&&(this.chunkByteSize=t)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),xt.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(t=>setTimeout(t,e))}async download(e,t){let o=e;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 c=this.cacheSize;let u=0;for(let g=0;g<this.totalChunks;g++){if(this.keys&&this.keys?.indexOf(g.toString())>=0){s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());continue}const S=g*this.chunkByteSize;let C=S+this.chunkByteSize-1;this.fileMetaData&&C>this.fileMetaData.length&&(C=this.fileMetaData.length-1);const N={range:`bytes=${S}-${C}`};for(;u>=c;)await this.sleep(200);const D=g.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${g+1}/${this.totalChunks}`),u++,Se(o,t,i,N,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async M=>{const f=M.data;u--,await this.currentDB?.setItem(D,f),s++,s>this.finishNum&&(this.finishNum=s,this.downloadProgress());const l=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${l}/${this.totalChunks}`),this.savefile()}).catch(M=>{u--;const f=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${f}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const t=100*e/this.totalChunks;this.dispatch("saveProgress",t)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=ea.createWriteStream(this.fileName).getWriter();let t=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:u,value:g}=await c.read();if(u)break;await e.write(g)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${o+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),xt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function na(n,e){let t="",o="";for(const r in e)t+=r+"="+encodeURIComponent(e[r])+"&";return t=t.replace(/&$/,""),o=/\?$/.test(n)?n+t:n.replace(/\/?$/,"?")+t,o}function ar(n={},e={}){let t;for(t in e)Me(e[t])?n[t]=ar(n[t],e[t]):n[t]=e[t];return n}function oa(n,e){const t=`${n}_${e}`;return he.MD5(t)}function cr(n){const e=function(c){if(!c)return;const u=c,g=[];if(u)for(let S of u){const C=lr(S);C&&g.push(C)}return g}(n.bussinessRoutes),t=function(c){if(!c)return;const u=c;if(u&&u.length>0){const g=[];return u.forEach(S=>{const C=ur(S);C&&g.push(C)}),g}}(n.widgetMenuConfig),o=function(c){if(c&&c.length>0){const u=[];return c.forEach(g=>{const S=function(C){return C?{id:C.id,label:C.label,layoutID:C.layoutID,container:C.container,preload:C.preload,afterid:C.afterid,bindid:C.bindid,group:C.group}:void 0}(g);S&&u.push(S)}),u}}(n.widgetConfig),r=function(c){if(c&&c.length>0)return c}(n.functionList),i=n.pkgObject.version,s=n.pkgObject.name;return{id:oa(s,i),name:B.Config.UI.SiteTitle,group:B.Config.UI.Group,product:s,version:i,routes:e,widgetMenu:t,widgets:o,functions:r}}function lr(n){if(n){let e=0;n.meta?.hidden&&(e=1);let t={path:n.path,name:n.name,title:n.meta?.title,type:e,index:n.meta?.index};if(n.children){const o=[];for(let r of n.children){const i=lr(r);i&&o.push(i)}o.length>0&&(t.children=o)}return t}}function ur(n){if(!n)return;const e={name:n.name,index:n.index,path:n.path,type:n.type};return n.children&&n.children.length>0&&(e.children=[],n.children.forEach(t=>{const o=ur(t);o&&e.children?.push(o)})),e}function ra(n,e="IconifyList.ts"){let t="",o=`const iconlist={
|
|
9
9
|
`,r=0;n.forEach(i=>{const s=i.split(":");if(s&&s.length===2){const c="icon"+r;t+=`import ${c} from '~icons/${s[0]}/${s[1]}'
|
|
10
10
|
`,o+=` '${i}':${c},
|
|
11
11
|
`,r++}}),r>0&&(o+=`};
|
|
12
|
-
`,St(t+o+"export default iconlist;","IconifyList.ts"))}function ia(n,e){const t=cr(n);No(t,e),B.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function sa(n){let e=n.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 aa(n){let e=zn(n);return e=e.replace(/^[1-9]\d\d{1,3}$/,"100"),e=e.replace(/^100\.$/,"100"),e}function zn(n){let e=n.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 ca(n){let e=n.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 la(n){let e=n.replace(/[\u4e00-\u9fa5\s]+/g,"");return e=e.replace(/(^\s*)|(\s*$)/g,""),e}function ua(n){let e=n.replace(/[a-zA-Z]+/g,"");return e=e.replace(/(^\s*)|(\s*$)/g,""),e}function ha(n){return n.replace(/(^\s*)|(\s*$)/g,"")}function da(n){let e=zn(n);return e=e.toString().split("."),e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e=e.join("."),e}function fa(n,e="",t="red"){return e.replace(new RegExp(n,"gi"),`<span style='color: ${t}'>${n}</span>`)}function pa(n,e="\u4EDF\u4F70\u62FE\u4EBF\u4EDF\u4F70\u62FE\u4E07\u4EDF\u4F70\u62FE\u5143\u89D2\u5206",t=""){let o=(n+="00").indexOf(".");o>=0&&(n=n.substring(0,o)+n.substr(o+1,2)),e=e.substr(e.length-n.length);for(let r=0;r<n.length;r++)t+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".substr(n.substr(r,1),1)+e.substr(r,1);return t=t.replace(/零角零分$/,"\u6574").replace(/零[仟佰拾]/g,"\u96F6").replace(/零{2,}/g,"\u96F6").replace(/零([亿|万])/g,"$1").replace(/零+元/,"\u5143").replace(/亿零{0,3}万/,"\u4EBF").replace(/^元/,"\u96F6\u5143")}function ga(n){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(n)}function ma(n){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(n)}function va(n){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(n)}function ya(n){return!!/^[a-zA-Z]\w{5,15}$/.test(n)}function wa(n){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(n)}function ba(n){let e="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(n)&&(e="\u5F31"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(n)&&(e="\u4E2D"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(n)&&(e="\u5F3A"),e}function _a(n){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(n)}function Sa(n){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(n)}function Ca(n){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(n)}function Ea(n){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(n)}function ka(n){return!!/^[1-9][0-9]{5}$/.test(n)}function xa(n){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(n)}function Ia(n){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(n)}let hr=!0;try{String.fromCharCode.apply(String,[1,2])}catch{hr=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var An=2654435769;function dr(n,e){var t=n.length,o=t<<2;if(e){var r=n[t-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]=n[s>>2]>>((3&s)<<3);return i}function It(n,e){var t,o=n.length,r=o>>2;3&o&&++r,e?(t=new Uint32Array(r+1))[r]=o:t=new Uint32Array(r);for(var i=0;i<o;++i)t[i>>2]|=n[i]<<((3&i)<<3);return t}function $e(n){return 4294967295&n}function Tt(n,e,t,o,r,i){return(t>>>5^e<<2)+(e>>>3^t<<4)^(n^e)+(i[3&o^r]^t)}function fr(n){if(n.length<16){var e=new Uint8Array(16);e.set(n),n=e}return n}function Rt(n){for(var e=n.length,t=new Uint8Array(3*e),o=0,r=0;r<e;r++){var i=n.charCodeAt(r);if(i<128)t[o++]=i;else if(i<2048)t[o++]=192|i>>6,t[o++]=128|63&i;else{if(!(i<55296||i>57343)){if(r+1<e){var s=n.charCodeAt(r+1);if(i<56320&&56320<=s&&s<=57343){var c=65536+((1023&i)<<10|1023&s);t[o++]=240|c>>18,t[o++]=128|c>>12&63,t[o++]=128|c>>6&63,t[o++]=128|63&c,r++;continue}}throw new Error("Malformed string")}t[o++]=224|i>>12,t[o++]=128|i>>6&63,t[o++]=128|63&i}}return t.subarray(0,o)}function pr(n){var e=n.length;return e===0?"":e<32767?function(t,o){for(var r=new Array(o),i=0,s=0,c=t.length;i<o&&s<c;i++){var u=t[s++];switch(u>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=u;break;case 12:case 13:if(!(s<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&u)<<6|63&t[s++];break;case 14:if(!(s+1<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&u)<<12|(63&t[s++])<<6|63&t[s++];break;case 15:if(!(s+2<c))throw new Error("Unfinished UTF-8 octet sequence");var g=((7&u)<<18|(63&t[s++])<<12|(63&t[s++])<<6|63&t[s++])-65536;if(!(0<=g&&g<=1048575))throw new Error("Character outside valid Unicode range: 0x"+g.toString(16));r[i++]=g>>10&1023|55296,r[i]=1023&g|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+u.toString(16))}}return i<o&&(r.length=i),String.fromCharCode.apply(String,r)}(n,e):function(t,o){for(var r=[],i=new Array(32768),s=0,c=0,u=t.length;s<o&&c<u;s++){var g=t[c++];switch(g>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[s]=g;break;case 12:case 13:if(!(c<u))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&g)<<6|63&t[c++];break;case 14:if(!(c+1<u))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(15&g)<<12|(63&t[c++])<<6|63&t[c++];break;case 15:if(!(c+2<u))throw new Error("Unfinished UTF-8 octet sequence");var S=((7&g)<<18|(63&t[c++])<<12|(63&t[c++])<<6|63&t[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"+g.toString(16))}if(s>=32766){var C=s+1;i.length=C,r.push(String.fromCharCode.apply(String,i)),o-=C,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(n,e)}function Ta(n){var e=n.length;if(e===0)return"";var t=hr?n:function(c){for(var u=c.length,g=new Array(c.length),S=0;S<u;++S)g[S]=c[S];return g}(n);if(e<65535)return String.fromCharCode.apply(String,t);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,t.subarray(s<<15,s+1<<15));return o&&(i[r]=String.fromCharCode.apply(String,t.subarray(r<<15,e))),i.join("")}function gr(n,e){return typeof n=="string"&&(n=Rt(n)),typeof e=="string"&&(e=Rt(e)),n==null||n.length===0?n:dr(function(t,o){var r,i,s,c,u,g,S=t.length,C=S-1;for(i=t[C],s=0,g=0|Math.floor(6+52/S);g>0;--g){for(c=(s=$e(s+An))>>>2&3,u=0;u<C;++u)r=t[u+1],i=t[u]=$e(t[u]+Tt(s,r,i,u,c,o));r=t[0],i=t[C]=$e(t[C]+Tt(s,r,i,C,c,o))}return t}(It(n,!0),It(fr(e),!1)),!1)}function mr(n,e){return typeof n=="string"&&(n=function(t){for(var o=window.atob(t),r=o.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=o.charCodeAt(s);return i}(n)),typeof e=="string"&&(e=Rt(e)),n==null||n.length===0?n:dr(function(t,o){var r,i,s,c,u,g=t.length,S=g-1;for(r=t[0],s=$e(Math.floor(6+52/g)*An);s!==0;s=$e(s-An)){for(c=s>>>2&3,u=S;u>0;--u)i=t[u-1],r=t[u]=$e(t[u]-Tt(s,r,i,u,c,o));i=t[S],r=t[0]=$e(t[0]-Tt(s,r,i,0,c,o))}return t}(It(n,!1),It(fr(e),!1)),!0)}const Ze={toBytes:Rt,toString:pr,encrypt:gr,encryptToString:function(n,e){return window.btoa(Ta(gr(n,e)))},decrypt:mr,decryptToString:function(n,e){return pr(mr(n,e))}},vr=n=>{const e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e));const t=document.createElement("canvas");t.width=200,t.height=130;const o=t.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(n,t.width/10,t.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(${t.toDataURL("image/png")}) left top repeat`,document.body.appendChild(r),e},Ra={set:n=>{let e=vr(n);document.getElementById(e)===null&&(e=vr(n))},del:()=>{let n="1.23452384164.123412416";document.getElementById(n)!==null&&document.body.removeChild(document.getElementById(n))}};class Ne extends Error{constructor(e,t){const o=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=o}}class Dn extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class ve extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Pa extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=o}}class Ma extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=o}}class za extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=o}}class yr extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class Aa extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=o}}class wr{constructor(e,t,o){this.statusCode=e,this.statusText=t,this.content=o}}class Pt{get(e,t){return this.send({...t,method:"GET",url:e})}post(e,t){return this.send({...t,method:"POST",url:e})}delete(e,t){return this.send({...t,method:"DELETE",url:e})}getCookieString(e){return""}}var k;(function(n){n[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Information=2]="Information",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.None=6]="None"})(k||(k={}));class Qe{constructor(){}log(e,t){}}Qe.instance=new Qe;class ee{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,o){if(!(e in t))throw new Error(`Unknown ${o} value: ${e}.`)}}class Z{static get isBrowser(){return!Z.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Z.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Z.isNode&&typeof window=="object"&&window.document===void 0}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function et(n,e){let t="";return Be(n)?(t=`Binary data of length ${n.byteLength}`,e&&(t+=`. 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)}(n)}'`)):typeof n=="string"&&(t=`String data of length ${n.length}`,e&&(t+=`. Content: '${n}'`)),t}function Be(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}async function br(n,e,t,o,r,i){const s={},[c,u]=Xe();s[c]=u,n.log(k.Trace,`(${e} transport) sending data. ${et(r,i.logMessageContent)}.`);const g=Be(r)?"arraybuffer":"text",S=await t.post(o,{content:r,headers:{...s,...i.headers},responseType:g,timeout:i.timeout,withCredentials:i.withCredentials});n.log(k.Trace,`(${e} transport) request complete. Response status: ${S.statusCode}.`)}class Da{constructor(e,t){this._subject=e,this._observer=t}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(t=>{})}}class Mt{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const o=`[${new Date().toISOString()}] ${k[e]}: ${t}`;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 Xe(){let n="X-SignalR-User-Agent";return Z.isNode&&(n="User-Agent"),[n,La("8.0.7",$a(),Ba(),Na())]}function La(n,e,t,o){let r="Microsoft SignalR/";const i=n.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${n}; `,r+=e&&e!==""?`${e}; `:"Unknown OS; ",r+=`${t}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function $a(){if(!Z.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function Na(){if(Z.isNode)return process.versions.node}function Ba(){return Z.isNode?"NodeJS":"Browser"}function Ln(n){return n.stack?n.stack:n.message?n.message:`${n}`}class Wa extends Pt{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||Z.isNode){const t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("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 t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new ve;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let o;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),o=new ve});let r,i=null;if(e.timeout){const u=e.timeout;i=setTimeout(()=>{t.abort(),this._logger.log(k.Warning,"Timeout from HTTP request."),o=new Dn},u)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Be(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:t.signal})}catch(u){throw o||(this._logger.log(k.Warning,`Error from HTTP request. ${u}.`),u)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){const u=await _r(r,"text");throw new Ne(u||r.statusText,r.status)}const s=_r(r,e.responseType),c=await s;return new wr(r.status,r.statusText,c)}getCookieString(e){let t="";return Z.isNode&&this._jar&&this._jar.getCookies(e,(o,r)=>t=r.join("; ")),t}}function _r(n,e){let t;switch(e){case"arraybuffer":t=n.arrayBuffer();break;case"text":default:t=n.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`)}return t}class Ua extends Pt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new ve):e.method?e.url?new Promise((t,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&&(Be(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 ve)}),e.timeout&&(r.timeout=e.timeout),r.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),r.status>=200&&r.status<300?t(new wr(r.status,r.statusText,r.response||r.responseText)):o(new Ne(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 Ne(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(k.Warning,"Timeout from HTTP request."),o(new Dn)},r.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Oa extends Pt{constructor(e){if(super(),typeof fetch<"u"||Z.isNode)this._httpClient=new Wa(e);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new Ua(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new ve):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 t=e.split(pe.RecordSeparator);return t.pop(),t}}pe.RecordSeparatorCode=30,pe.RecordSeparator=String.fromCharCode(pe.RecordSeparatorCode);class Ha{writeHandshakeRequest(e){return pe.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,o;if(Be(e)){const s=new Uint8Array(e),c=s.indexOf(pe.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),o=s.byteLength>u?s.slice(u).buffer:null}else{const s=e,c=s.indexOf(pe.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;t=s.substring(0,u),o=s.length>u?s.substring(u):null}const r=pe.parse(t),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var H;(function(n){n[n.Invocation=1]="Invocation",n[n.StreamItem=2]="StreamItem",n[n.Completion=3]="Completion",n[n.StreamInvocation=4]="StreamInvocation",n[n.CancelInvocation=5]="CancelInvocation",n[n.Ping=6]="Ping",n[n.Close=7]="Close",n[n.Ack=8]="Ack",n[n.Sequence=9]="Sequence"})(H||(H={}));class ja{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Da(this,e)}}class qa{constructor(e,t,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=t,this._bufferSize=o}async _send(e){const t=this._protocol.writeMessage(e);let o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let r=()=>{},i=()=>{};Be(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((s,c)=>{r=s,i=c})),this._messages.push(new Fa(t,this._totalMessageCount,r,i))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await o}_ack(e){let t=-1;for(let o=0;o<this._messages.length;o++){const r=this._messages[o];if(r._id<=e.sequenceId)t=o,Be(r._message)?this._bufferedByteCount-=r._message.byteLength:this._bufferedByteCount-=r._message.length,r._resolver();else{if(!(this._bufferedByteCount<this._bufferSize))break;r._resolver()}}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type===H.Sequence&&(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,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:H.Sequence,sequenceId:e}));const t=this._messages;for(const o of t)await this._connection.send(o._message);this._reconnectInProgress=!1}_dispose(e){e!=null||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case H.Invocation:case H.StreamItem:case H.Completion:case H.StreamInvocation:case H.CancelInvocation:return!0;case H.Close:case H.Sequence:case H.Ping:case H.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:H.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class Fa{constructor(e,t,o,r){this._message=e,this._id=t,this._resolver=o,this._rejector=r}}var Y;(function(n){n.Disconnected="Disconnected",n.Connecting="Connecting",n.Connected="Connected",n.Disconnecting="Disconnecting",n.Reconnecting="Reconnecting"})(Y||(Y={}));class Yn{static create(e,t,o,r,i,s,c){return new Yn(e,t,o,r,i,s,c)}constructor(e,t,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")},ee.isRequired(e,"connection"),ee.isRequired(t,"logger"),ee.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=i??3e4,this.keepAliveIntervalInMilliseconds=s??15e3,this._statefulReconnectBufferSize=c??1e5,this._logger=t,this._protocol=o,this.connection=e,this._reconnectPolicy=r,this._handshakeProtocol=new Ha,this.connection.onreceive=u=>this._processIncomingData(u),this.connection.onclose=u=>this._connectionClosed(u),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Y.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:H.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!==Y.Disconnected&&this._connectionState!==Y.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!==Y.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Y.Connecting,this._logger.log(k.Debug,"Starting HubConnection.");try{await this._startInternal(),Z.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Y.Connected,this._connectionStarted=!0,this._logger.log(k.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Y.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((t,o)=>{this._handshakeResolver=t,this._handshakeRejecter=o});await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const o={protocol:this._protocol.name,version:t};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 qa(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(t){throw this._logger.log(k.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(t),t}}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===Y.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===Y.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 t=this._connectionState;return this._connectionState=Y.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()):(t===Y.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new ve("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,...t){const[o,r]=this._replaceStreamingParams(t),i=this._createStreamInvocation(e,t,r);let s;const c=new ja;return c.cancelCallback=()=>{const u=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(u))},this._callbacks[i.invocationId]=(u,g)=>{g?c.error(g):u&&(u.type===H.Completion?u.error?c.error(new Error(u.error)):c.complete():c.next(u.item))},s=this._sendWithProtocol(i).catch(u=>{c.error(u),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,...t){const[o,r]=this._replaceStreamingParams(t),i=this._sendWithProtocol(this._createInvocation(e,t,!0,r));return this._launchStreams(o,i),i}invoke(e,...t){const[o,r]=this._replaceStreamingParams(t),i=this._createInvocation(e,t,!1,r);return new Promise((c,u)=>{this._callbacks[i.invocationId]=(S,C)=>{C?u(C):S&&(S.type===H.Completion?S.error?u(new Error(S.error)):c(S.result):u(new Error(`Unexpected message type: ${S.type}`)))};const g=this._sendWithProtocol(i).catch(S=>{u(S),delete this._callbacks[i.invocationId]});this._launchStreams(o,g)})}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const o=this._methods[e];if(o)if(t){const r=o.indexOf(t);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 t=this._protocol.parseMessages(e,this._logger);for(const o of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(o))switch(o.type){case H.Invocation:this._invokeClientMethod(o).catch(r=>{this._logger.log(k.Error,`Invoke client method threw error: ${Ln(r)}`)});break;case H.StreamItem:case H.Completion:{const r=this._callbacks[o.invocationId];if(r){o.type===H.Completion&&delete this._callbacks[o.invocationId];try{r(o)}catch(i){this._logger.log(k.Error,`Stream callback threw error: ${Ln(i)}`)}}break}case H.Ping:break;case H.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 H.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case H.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(k.Warning,`Invalid message type: ${o.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,o;try{[o,t]=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(t.error){const r="Server returned handshake error: "+t.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===Y.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 t=e.target.toLowerCase(),o=this._methods[t];if(!o)return this._logger.log(k.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(k.Warning,`No result given for '${t}' 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,u;for(const g of r)try{const S=s;s=await g.apply(this,e.arguments),i&&s&&S&&(this._logger.log(k.Error,`Multiple results provided for '${t}'. Sending error to server.`),u=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 '${t}' threw error '${S}'.`)}u?await this._sendWithProtocol(u):i?(c?u=this._createCompletionMessage(e.invocationId,`${c}`,null):s!==void 0?u=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(k.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),u=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(u)):s&&this._logger.log(k.Error,`Result given for '${t}' 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 ve("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===Y.Disconnecting?this._completeClose(e):this._connectionState===Y.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Y.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Y.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),Z.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(k.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=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=Y.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!==Y.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!==Y.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=Y.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!==Y.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===Y.Disconnecting&&this._completeClose());r=s instanceof Error?s:new Error(s.toString()),i=this._getNextRetryDelay(o++,Date.now()-t,r)}}this._logger.log(k.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:o})}catch(r){return this._logger.log(k.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${r}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach(o=>{const r=t[o];try{r(null,e)}catch(i){this._logger.log(k.Error,`Stream 'error' callback called with '${e}' threw error: ${Ln(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,o,r){if(o)return r.length!==0?{arguments:t,streamIds:r,target:e,type:H.Invocation}:{arguments:t,target:e,type:H.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:t,invocationId:i.toString(),streamIds:r,target:e,type:H.Invocation}:{arguments:t,invocationId:i.toString(),target:e,type:H.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(const o in e)e[o].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:r=>{let i;i=r instanceof Error?r.message:r&&r.toString?r.toString():"Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:r=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,r)))}})}}_replaceStreamingParams(e){const t=[],o=[];for(let r=0;r<e.length;r++){const i=e[r];if(this._isObservable(i)){const s=this._invocationId;this._invocationId++,t[s]=i,o.push(s.toString()),e.splice(r,1)}}return[t,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,o){const r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:r.toString(),streamIds:o,target:e,type:H.StreamInvocation}:{arguments:t,invocationId:r.toString(),target:e,type:H.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:H.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:H.StreamItem}}_createCompletionMessage(e,t,o){return t?{error:t,invocationId:e,type:H.Completion}:{invocationId:e,result:o,type:H.Completion}}_createCloseMessage(){return{type:H.Close}}}const Xa=[0,2e3,1e4,3e4,null];class Sr{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Xa}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class We{}We.Authorization="Authorization",We.Cookie="Cookie";class Va extends Pt{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}async send(e){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const o=await this._innerClient.send(e);return t&&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[We.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[We.Authorization]&&delete e.headers[We.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var te,ae;(function(n){n[n.None=0]="None",n[n.WebSockets=1]="WebSockets",n[n.ServerSentEvents=2]="ServerSentEvents",n[n.LongPolling=4]="LongPolling"})(te||(te={})),function(n){n[n.Text=1]="Text",n[n.Binary=2]="Binary"}(ae||(ae={}));class Ga{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 Cr{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,o){this._httpClient=e,this._logger=t,this._pollAbort=new Ga,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(ee.isRequired(e,"url"),ee.isRequired(t,"transferFormat"),ee.isIn(t,ae,"transferFormat"),this._url=e,this._logger.log(k.Trace,"(LongPolling transport) Connecting."),t===ae.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]=Xe(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};t===ae.Binary&&(s.responseType="arraybuffer");const c=`${e}&_=${Date.now()}`;this._logger.log(k.Trace,`(LongPolling transport) polling: ${c}.`);const u=await this._httpClient.get(c,s);u.statusCode!==200?(this._logger.log(k.Error,`(LongPolling transport) Unexpected response code: ${u.statusCode}.`),this._closeError=new Ne(u.statusText||"",u.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,t){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,t);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 Ne(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(k.Trace,`(LongPolling transport) data received. ${et(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 Dn?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?br(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={},[t,o]=Xe();e[t]=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 Ne&&(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 Ka{constructor(e,t,o,r){this._httpClient=e,this._accessToken=t,this._logger=o,this._options=r,this.onreceive=null,this.onclose=null}async connect(e,t){return ee.isRequired(e,"url"),ee.isRequired(t,"transferFormat"),ee.isIn(t,ae,"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(t===ae.Text){if(Z.isBrowser||Z.isWebWorker)i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const c=this._httpClient.getCookieString(e),u={};u.Cookie=c;const[g,S]=Xe();u[g]=S,i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...u,...this._options.headers}})}try{i.onmessage=c=>{if(this.onreceive)try{this._logger.log(k.Trace,`(SSE transport) data received. ${et(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(u){return void this._close(u)}},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?br(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 Ja{constructor(e,t,o,r,i,s){this._logger=o,this._accessTokenFactory=t,this._logMessageContent=r,this._webSocketConstructor=i,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,t){let o;return ee.isRequired(e,"url"),ee.isRequired(t,"transferFormat"),ee.isIn(t,ae,"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 u=!1;if(Z.isNode||Z.isReactNative){const g={},[S,C]=Xe();g[S]=C,o&&(g[We.Authorization]=`Bearer ${o}`),c&&(g[We.Cookie]=c),s=new this._webSocketConstructor(e,void 0,{headers:{...g,...this._headers}})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(e)),t===ae.Binary&&(s.binaryType="arraybuffer"),s.onopen=g=>{this._logger.log(k.Information,`WebSocket connected to ${e}.`),this._webSocket=s,u=!0,r()},s.onerror=g=>{let S=null;S=typeof ErrorEvent<"u"&&g instanceof ErrorEvent?g.error:"There was an error with the transport",this._logger.log(k.Information,`(WebSockets transport) ${S}.`)},s.onmessage=g=>{if(this._logger.log(k.Trace,`(WebSockets transport) data received. ${et(g.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(g.data)}catch(S){return void this._close(S)}},s.onclose=g=>{if(u)this._close(g);else{let S=null;S=typeof ErrorEvent<"u"&&g instanceof ErrorEvent?g.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. ${et(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 Ya{constructor(e,t={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,ee.isRequired(e,"url"),this._logger=(o=t.logger)===void 0?new Mt(k.Information):o===null?Qe.instance:o.log!==void 0?o:new Mt(o),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=t.logMessageContent!==void 0&&t.logMessageContent,typeof t.withCredentials!="boolean"&&t.withCredentials!==void 0)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=t.withCredentials===void 0||t.withCredentials,t.timeout=t.timeout===void 0?1e5:t.timeout;let r=null,i=null;if(Z.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),i=s("eventsource")}Z.isNode||typeof WebSocket>"u"||t.WebSocket?Z.isNode&&!t.WebSocket&&r&&(t.WebSocket=r):t.WebSocket=WebSocket,Z.isNode||typeof EventSource>"u"||t.EventSource?Z.isNode&&!t.EventSource&&i!==void 0&&(t.EventSource=i):t.EventSource=EventSource,this._httpClient=new Va(t.httpClient||new Oa(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||ae.Binary,ee.isIn(e,ae,"transferFormat"),this._logger.log(k.Debug,`Starting connection with transfer format '${ae[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 t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(k.Error,t),await this._stopPromise,Promise.reject(new ve(t))}if(this._connectionState!=="Connected"){const t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(k.Error,t),Promise.reject(new ve(t))}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 Zn(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(t=>{this._stopPromiseResolver=t}),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(t){this._logger.log(k.Error,`HttpConnection.transport.stop() threw error '${t}'.`),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 t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==te.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(te.WebSockets),await this._startTransport(t,e)}else{let o=null,r=0;do{if(o=await this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ve("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&&(t=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(t,this._options.transport,o,e)}this.transport instanceof Cr&&(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 t={},[o,r]=Xe();t[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:{...t,...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 yr("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 Ne&&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 yr(c))}}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}async _createTransport(e,t,o,r){let i=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(t))return this._logger.log(k.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(i,r),void(this.connectionId=o.connectionId);const s=[],c=o.availableTransports||[];let u=o;for(const g of c){const S=this._resolveTransportOrError(g,t,r,u?.useStatefulReconnect===!0);if(S instanceof Error)s.push(`${g.transport} failed:`),s.push(S);else if(this._isITransport(S)){if(this.transport=S,!u){try{u=await this._getNegotiationResponse(e)}catch(C){return Promise.reject(C)}i=this._createConnectUrl(e,u.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=u.connectionId)}catch(C){if(this._logger.log(k.Error,`Failed to start the transport '${g.transport}': ${C}`),u=void 0,s.push(new za(`${g.transport} failed: ${C}`,te[g.transport])),this._connectionState!=="Connecting"){const N="Failed to select transport before stop() was called.";return this._logger.log(k.Debug,N),Promise.reject(new ve(N))}}}}return s.length>0?Promise.reject(new Aa(`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 te.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Ja(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case te.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Ka(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case te.LongPolling:return new Cr(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){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,t),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,t)}_resolveTransportOrError(e,t,o,r){const i=te[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)}(t,i))return this._logger.log(k.Debug,`Skipping transport '${te[i]}' because it was disabled by the client.`),new Ma(`'${te[i]}' is disabled by the client.`,i);{if(!(e.transferFormats.map(c=>ae[c]).indexOf(o)>=0))return this._logger.log(k.Debug,`Skipping transport '${te[i]}' because it does not support the requested transfer format '${ae[o]}'.`),new Error(`'${te[i]}' does not support ${ae[o]}.`);if(i===te.WebSockets&&!this._options.WebSocket||i===te.ServerSentEvents&&!this._options.EventSource)return this._logger.log(k.Debug,`Skipping transport '${te[i]}' because it is not supported in your environment.'`),new Pa(`'${te[i]}' is not supported in your environment.`,i);this._logger.log(k.Debug,`Selecting transport '${te[i]}'.`);try{return this.features.reconnect=i===te.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(t=>{this._logger.log(k.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(k.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}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(!Z.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(k.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const o=new URLSearchParams(t.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"),t.search=o.toString(),t.toString()}}class Zn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new zt,this._transportResult=new zt,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new zt),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 zt;const e=this._transportResult;this._transportResult=void 0;const t=typeof this._buffer[0]=="string"?this._buffer.join(""):Zn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(o){e.reject(o)}}}static _concatBuffers(e){const t=e.map(i=>i.byteLength).reduce((i,s)=>i+s),o=new Uint8Array(t);let r=0;for(const i of e)o.set(new Uint8Array(i),r),r+=i.byteLength;return o.buffer}}class zt{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class Za{constructor(){this.name="json",this.version=2,this.transferFormat=ae.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=Qe.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 H.Invocation:this._isInvocationMessage(s);break;case H.StreamItem:this._isStreamItemMessage(s);break;case H.Completion:this._isCompletionMessage(s);break;case H.Ping:case H.Close:break;case H.Ack:this._isAckMessage(s);break;case H.Sequence:this._isSequenceMessage(s);break;default:t.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,t){if(typeof e!="string"||e==="")throw new Error(t)}}const Qa={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 ec{configureLogging(e){if(ee.isRequired(e,"logging"),e.log!==void 0)this.logger=e;else if(typeof e=="string"){const t=function(o){const r=Qa[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(e);this.logger=new Mt(t)}else this.logger=new Mt(e);return this}withUrl(e,t){return ee.isRequired(e,"url"),ee.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions=typeof t=="object"?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return ee.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 Sr(e):this.reconnectPolicy=e:this.reconnectPolicy=new Sr,this}withServerTimeout(e){return ee.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return ee.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 t=new Ya(this.url,e);return Yn.create(t,this.logger||Qe.instance,this.protocol||new Za,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}let At;function tc(n){if(!n){if(At)return At;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const e=new ec().configureLogging(k.Information).withUrl(n).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return e.keepAliveIntervalInMilliseconds=15e3,e.serverTimeoutInMilliseconds=18e5,e.start().then(()=>{B.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),e.onclose(async()=>{B.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),e.onreconnecting(()=>{B.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),e.onreconnected(()=>{B.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),At||(At=e),e}const $n=new Set;function Er(n){return n!==null?parseFloat(n):0}function Dt(n){const e=window.getComputedStyle(n),t=Math.ceil([e.paddingLeft,e.width,e.paddingRight].map(Er).reduce((r,i)=>r+i)),o=Math.ceil([e.paddingTop,e.height,e.paddingBottom].map(Er).reduce((r,i)=>r+i));return{width:t,height:o}}class kr{width;height;constructor(e,t){this.width=e,this.height=t}}function nc(n){const e=n.windowEl;if(e){const t=parseFloat(e.style.left||"NaN"),o=parseFloat(e.style.top||"NaN");if(!isNaN(t)&&!isNaN(o))return{left:t,top:o}}return null}function oc(n,e,t,o){const r=n-t,i=e-o;return r*r+i*i}window.addEventListener("resize",n=>{$n.forEach(e=>{e&&mt(e.fixPosition)&&e.fixPosition()})});const Lt=[];var $t=Ie({name:"VWindow",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:gt},setup(n,{emit:e}){const t=Li();if(!t)return;const{proxy:o}=t;let r=0,i,s,c;const u=K(n.isOpen),g=()=>{Lt.push(o),c=new Ji(n.zGroup,S),n.isOpen&&function(A){A&&(Co(()=>{r++==0&&(m(o),function(){const T=C.value,{width:z,height:W}=ln(T);let O,R;if(n.left!==void 0!=(n.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof n.left=="number")O=n.left,R=n.top;else{const j=n.positionHint||"auto";switch(j){case"auto":{let X=20,le=50,oe=0;do{if(Lt.every(ye=>{if(!ye.isOpen||o==ye)return!0;const at=nc(ye);if(at==null)return!0;const{left:Ht,top:me}=at;return oc(Ht,me,X,le)>16}))break;X=(X+40)%(window.innerWidth-200),le=(le+40)%(window.innerHeight-200)}while(++oe<100);O=X,R=le}break;case"center":O=(window.innerWidth-z)/2,R=(window.innerHeight-W)/2,console.log(O,R,window.innerWidth,window.innerHeight,"111111");break;default:try{const X=j.split("/").map(Number);if(X.length!=2)throw null;const[le,oe]=X;if(!isFinite(le)||!isFinite(oe))throw null;O=le>=0?le:window.innerWidth-z+le,R=oe>=0?oe:window.innerHeight-W+oe}catch{throw new Error(`invalid position string: ${j}`)}}}T&&(T.style.left=`${O}px`,T.style.top=`${R}px`)}()),n.resizable&&p(),L(),i=new Ki(N.value,C.value,{onMove:()=>L(),onMoveStart:()=>e("move-start"),onMoveEnd:()=>e("move-end")}),n.resizable&&function(){const{height:T}=ln(N.value);s=new Zi(C.value,{onResize:()=>p(),onResizeStart:()=>e("resize-start"),onResizeEnd:()=>e("resize-end"),minWidth:n.minWidth,minHeight:n.minHeight+T,maxWidth:n.maxWidth,maxHeight:n.maxHeight?n.maxHeight+T:void 0})}()}),n.activateWhenOpen&&M())}(!0),$n.add(o)};function S(A){f.value.zIndex=`${A}`}const C=K(null),N=K(null),D=K(null);function M(){c.raise(),e("activate")}const f=K({...n.windowStyle.window,zIndex:"auto",overflow:n.overflow}),l=He(()=>n.windowStyle.titlebar),v=He(()=>{const A={...n.windowStyle.content};return n.resizable?A.padding="0":n.padding!=null&&(A.padding=`${n.padding}px`),n.isScrollable&&(A.overflow="auto"),A});function m(A){const{width:T,height:z,top:W,left:O}=A,R=C;if(R&&T!=null&&(R.value.style.width=`${T}px`),z!=null){const j=N.value;if(j){const X=Dt(j).height;R.value.style.height=`${z+X}px`}}R&&O!=null&&(R.value.style.left=`${O}px`),R&&W!=null&&(R.value.style.top=`${W}px`)}function p(A=!0){const T=C.value,z=N.value,W=D.value;if(W&&T&&z){const{width:O,height:R}=Dt(W),{width:j,height:X}=Dt(T),le=Dt(z).height,oe=j-(W.offsetWidth-O),ye=X-le-(W.offsetHeight-R);W.style.width=`${oe}px`,W.style.height=`${ye}px`,y(),e("resize",new kr(oe,ye)),A&&(e("update:width",oe),e("update:height",ye))}}function y(){const A=C.value;if(A){const T=A.getBoundingClientRect();T.left<0&&(f.value.left="0px"),T.top<0&&(f.value.top="0px"),T.right>window.innerWidth&&(f.value.left=window.innerWidth-T.width+"px"),T.bottom>window.innerHeight&&(f.value.top=window.innerHeight-T.height+"px")}}function L(A=!0){y();const T=C.value;if(T){const{left:z,top:W}=T.getBoundingClientRect();A&&(e("update:left",z),e("update:top",W))}}return Te(()=>n.isOpen,A=>{u.value=A}),Te(()=>n.zGroup,A=>{c.group=A}),Te(()=>n.width,A=>{m({width:A}),p(!1)}),Te(()=>n.height,A=>{m({height:A}),p(!1)}),Zt(()=>{g()}),$i(()=>{$n.delete(this),c.unregister(),s&&s.teardown(),i&&i.teardown(),Lt.splice(Lt.indexOf(o),1)}),{isOpen:u,windowEl:C,titlebar:N,content:D,activate:M,styleWindow:f,styleTitlebar:l,styleContent:v,closeButtonClick:function(){u.value=!1,e("closebuttonclick")},fixPosition:y}}});const rc={class:"title"};var xr;$t.render=function(n,e,t,o,r,i){const s=ut("myButton");return F(),Q(Eo,{name:"fade",onAfterLeave:e[2]||(e[2]=c=>n.$emit("close")),onAfterEnter:e[3]||(e[3]=c=>n.$emit("open")),persisted:""},{default:we(()=>[ko(J("div",{class:"window",style:ge(n.styleWindow),ref:"windowEl",onMousedown:e[0]||(e[0]=(...c)=>n.activate&&n.activate(...c)),onTouchstart:e[1]||(e[1]=(...c)=>n.activate&&n.activate(...c))},[J("div",{class:"titlebar",style:ge(n.styleTitlebar),ref:"titlebar"},[J("div",rc,[n.$slots.title?ie(n.$slots,"title",{key:0}):(F(),fe(Re,{key:1},[Qt(en(n.title),1)],64))]),n.closeButton?(F(),Q(s,{key:0,windowStyle:n.windowStyle,onClick:n.closeButtonClick},{default:we(()=>e[4]||(e[4]=[Qt("\xD7")])),_:1},8,["windowStyle","onClick"])):ne("v-if",!0)],4),J("div",{class:"content",style:ge(n.styleContent),ref:"content"},[ie(n.$slots,"default")],4)],36),[[xo,n.isOpen]])]),_:3})},$t.__file="src/controls/vuewindow/window/index.vue",function(n){n[n.StyleBlack=0]="StyleBlack",n[n.StyleWhite=1]="StyleWhite",n[n.StyleMetal=2]="StyleMetal",n[n.StyleGrayblue=3]="StyleGrayblue"}(xr||(xr={}));const ic={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)"}},sc={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)"}},ac={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)"}},cc={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)"}},lc=$t;var ce;(function(n){n[n.top=0]="top",n[n.bottom=1]="bottom",n[n.centerBack=2]="centerBack",n[n.centerMain=3]="centerMain",n[n.centerFront=4]="centerFront",n[n.left=5]="left",n[n.right=6]="right"})(ce||(ce={}));class Ir{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;_mapItemRefs;constructor(e,t,o,r){this.layoutState=e,this._LayoutID=o,this._mapItemRefs=r,t.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 t;if(Me(e)?t=e:vt(e)&&(t=this.widgetConfig.find(o=>o.id===e)),t){if(t.afterid){if(this.isWidgetLoaded(t.afterid))return this._loadWidget(t);{let o=function(c){c.layoutID===r._LayoutID&&c.widgetID===i&&(r._loadWidget(s),B.EventBus.off(se.WidgetLoadedEvent,o))};const r=this,i=t.afterid,s=t;return B.EventBus.on(se.WidgetLoadedEvent,o),this.loadWidget(t.afterid)}}return this._loadWidget(t)}}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component?e.component().then(t=>{if(t.default){const o=Ni(t.default);e.layout&&(o.style=e.layout),e.cssClass&&(o.cssClass=e.cssClass),this.getContainerComponents(e.container).value.set(e.id,o),this.widgetsLoadedSet.add(e.id),Co().then(()=>{B.EventBus.emit(se.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)})}}).catch(t=>{B.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",e),B.EventBus.emit(se.WidgetLoadedErrorEvent,e)}):void 0;this.changeWidgetVisible(e.id,!0)}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o){for(const r of o)if(this.isWidgetLoaded(r.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetConfig.find(o=>o.id===e);if(t){if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o)for(const r of o)this.unloadWidget(r.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&this._mapItemRefs.delete(e),B.EventBus.emit(se.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;e?(t&&(t.style.left="0",t.style.width="100%"),o&&(o.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(e){switch(e){case ce.top:return this.layoutState.topContainer;case ce.bottom:return this.layoutState.bottomContainer;case ce.left:return this.layoutState.leftContainer;case ce.right:return this.layoutState.rightContainer;case ce.centerBack:return this.layoutState.centerBackContainer;case ce.centerMain:return this.layoutState.centerMainContainer;case ce.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,t=!1){const o=this.getLayoutContainer(e);o&&(o.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const o=this.getWidgetComponent(e);o&&o.changeVisible&&o.changeVisible(t)}isWidgetVisible(e){const t=this.getWidgetComponent(e);return!!t&&(!t.isShow||t.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetConfig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=K(new Map);return this.layoutMap.set(e,t),t}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach(t=>{e.push(t)}),e}unloadAllWidgets(e){const t=[];this.widgetsLoadedSet.forEach(o=>{e&&e.length>0?e.findIndex(r=>r===o)<0&&t.push(o):t.push(o)}),t.forEach(o=>this.unloadWidget(o))}unloadWidgets(e){e&&e.length>0&&e.forEach(t=>{this.unloadWidget(t)})}static getLayoutManager(e,t){if(t){const o=t.find(r=>r.id===e);if(o&&o.layoutID)return B.LayoutMap.get(o.layoutID)}}}var tt=Ie({name:"SuspenseWithError",setup(){const n=K(null);return Bi(e=>(n.value="\u5F53\u524D\u9875\u9762\u5B58\u5728\u95EE\u9898\uFF0C\u65E0\u6CD5\u6E32\u67D3\u2026\u2026",console.error("onErrorCaptured",e),!0)),{error:n}}});tt.render=function(n,e,t,o,r,i){return n.error?ie(n.$slots,"error",{key:0},()=>[Qt(en(n.error),1)]):(F(),Q(Wi,{key:1},{default:we(()=>[ie(n.$slots,"default")]),fallback:we(()=>[ie(n.$slots,"fallback")]),_:3}))},tt.__file="src/controls/routertransition/SuspenseWithError.vue";var Nn=Ie({name:"RouterTransition",__name:"RouterTransition",setup:n=>(e,t)=>{const o=ut("router-view");return F(),Q(tt,null,{default:we(()=>[ht(o,null,{default:we(({Component:r,route:i})=>[ne(" <transition> "),(F(),Q(Io,null,[i.meta.keepAlive?(F(),Q(be(r),{key:i.name})):ne("v-if",!0)],1024)),i.meta.keepAlive?ne("v-if",!0):(F(),Q(be(r),{key:i.name})),ne(" </transition> ")]),_:1})]),_:1})}});Nn.__file="src/controls/routertransition/RouterTransition.vue";var Nt=Ie({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:Nn},setup(n,{attrs:e,slots:t,emit:o}){const r=n.layoutID,i=K(n.enableRouterView);Te(()=>n.enableRouterView,()=>{i.value=n.enableRouterView});const s=So({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),c=new Map,u=new Ir(s,n.widgetConfig,r,c),g=f(ce.top),S=f(ce.centerBack),C=f(ce.centerFront),N=f(ce.left),D=f(ce.right),M=f(ce.bottom);function f(v){return u?.getContainerComponents(v)}const l=He(()=>n.layoutStyle);return Zt(()=>{u&&(r?B.LayoutMap.set(r,u):(B.LayoutManager=u,B.LayoutMap.set("",u)),u.preloadWidgets(),o("containerLoaded",{layoutID:r,layoutManager:u}),B.EventBus.emit(se.LayoutContainerLoaded,{layoutID:r,layoutManager:u}))}),{...Ui(s),topContainerComponents:g,centerbackComponents:S,centerfrontComponents:C,leftContainerComponents:N,rightContainerComponents:D,bottomContainerComponents:M,containerStyle:l,isEnableRouterView:i,setItemRef:(v,m)=>{v&&c.set(m,v)}}}});const uc={ref:"topContainer",class:"topContainer"},hc={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},dc={ref:"centerBackContainer",class:"centerdiv backContainer"},fc={ref:"centerFrontContainer",class:"centerdiv centerFrontContainer"},pc={ref:"leftContainer",class:"leftContainer"},gc={ref:"rightContainer",class:"rightContainer"},mc={ref:"bottomContainer",class:"bottomContainer"};Nt.render=function(n,e,t,o,r,i){const s=ut("router-transition");return F(),fe("div",{class:"layoutContainer",style:ge(n.containerStyle)},[J("div",uc,[ie(n.$slots,"top"),(F(!0),fe(Re,null,je(n.topContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),J("div",null,[ne(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),n.isEnableRouterView?(F(),fe("div",hc,[ie(n.$slots,"main",{},()=>[ht(s)])],512)):ne("v-if",!0),ne(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),J("div",dc,[ie(n.$slots,"back"),(F(!0),fe(Re,null,je(n.centerbackComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),ne(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),J("div",fc,[ie(n.$slots,"front"),(F(!0),fe(Re,null,je(n.centerfrontComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),J("div",pc,[ie(n.$slots,"left"),(F(!0),fe(Re,null,je(n.leftContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),J("div",gc,[ie(n.$slots,"right"),(F(!0),fe(Re,null,je(n.rightContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512)]),J("div",mc,[ie(n.$slots,"bottom"),(F(!0),fe(Re,null,je(n.bottomContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),ne(" \u589E\u52A0\u9ED8\u8BA4\u63D2\u69FD "),ie(n.$slots,"default")],4)},Nt.__scopeId="data-v-4d081e5c",Nt.__file="src/controls/layoutcontainer/layout.vue";var Tr=Ie({name:"RouterTransition",__name:"RouterTransitionAnimate",props:{enterActive:{type:String,required:!1,default:"animated fadeIn"},leaveActive:{type:String,required:!1,default:"animated fadeOut"}},setup:n=>(e,t)=>{const o=ut("router-view");return F(),Q(tt,null,{default:we(()=>[ht(o,null,{default:we(({Component:r,route:i})=>[ht(Oi,{appear:"","enter-active-class":e.enterActive,"leave-active-class":e.leaveActive},{default:we(()=>[(F(),Q(Io,null,[i.meta.keepAlive?(F(),Q(be(r),{key:i.name})):ne("v-if",!0)],1024)),i.meta.keepAlive?ne("v-if",!0):(F(),Q(be(r),{key:i.name}))]),_:2},1032,["enter-active-class","leave-active-class"])]),_:1})]),_:1})}});Tr.__file="src/controls/routertransition/RouterTransitionAnimate.vue";const Ve=new Map,nt=K(new Map);class ot{static addWindowPanel(e){Ve.set(e.id,e)}static removeWindowPanel(e){Ve.has(e)&&(Ve.delete(e),nt.value.delete(e))}static minimizeWindowPanel(e){Ve.has(e)&&nt.value.set(e,-1)}static openWindowPanel(e){Ve.has(e)&&nt.value.set(e,1)}}const vc=["src"],yc={key:1,class:"paneltitle"},wc={class:"dragPanelBar"},bc={class:"dragPanelContent"},_c={class:"drag-pointer-group"};var Bn=Ie({__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(n,{expose:e,emit:t}){const o=Lo(),r=n,i=t,s=K(),c=K(),u=He(()=>r.isDark),g=K({x:0,y:0}),S=250,C=100,N=K({width:0,height:0}),D=R=>{s.value&&(s.value.style.left=`${R.x}px`,s.value.style.top=`${R.y}px`)};Te(()=>g.value,R=>{D(R)});const M=R=>{s.value&&(s.value.style.width=`${R.width}px`,s.value.style.height=`${R.height}px`)};Te(()=>N.value,R=>{M(R)});const f={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(f.refs).forEach(([R,j])=>{j.value&&j.value.addEventListener("mousedown",X=>{f.mouseDown(X,R)})})},mouseDown:(R,j)=>{R.button==0&&(R.preventDefault(),f.startingEdges={left:g.value.x,top:g.value.y,right:g.value.x+N.value.width,bottom:g.value.y+N.value.height},f.newEdges={...f.startingEdges},f.clickStart={x:R.clientX,y:R.clientY},f.eventListenerController=new AbortController,document.addEventListener("mousemove",X=>{f.mouseMove(X,j)},{signal:f.eventListenerController.signal}),document.addEventListener("mouseup",X=>{f.mouseUp(X,j)},{signal:f.eventListenerController.signal}))},mouseMove:(R,j)=>{if(f.startingEdges!=null&&f.newEdges!=null&&f.clickStart!=null&&f.refs[j].value){if(R.preventDefault(),console.log("mouseMove",j),j.toLowerCase().includes("north")){f.newEdges.top=Math.max(f.startingEdges.top+R.clientY-f.clickStart.y,0);const X=f.newEdges.bottom-f.newEdges.top-C;X<0&&(f.newEdges.top+=X)}else j.toLowerCase().includes("south")&&(f.newEdges.bottom=Math.min(f.startingEdges.bottom+R.clientY-f.clickStart.y,document.body.clientHeight));if(j.toLowerCase().includes("west")){f.newEdges.left=Math.max(f.startingEdges.left+R.clientX-f.clickStart.x,0);const X=f.newEdges.right-f.newEdges.left-S;X<0&&(f.newEdges.left+=X)}else j.toLowerCase().includes("east")&&(f.newEdges.right=Math.min(f.startingEdges.right+R.clientX-f.clickStart.x,document.body.clientWidth));f.update()}},update:()=>{f.newEdges==null||f.startingEdges==null||(g.value={x:Math.max(f.newEdges.left,0),y:Math.max(f.newEdges.top,0)},N.value={width:Math.min(Math.max(f.newEdges.right-f.newEdges.left,S),document.body.clientWidth),height:Math.min(Math.max(f.newEdges.bottom-f.newEdges.top,C),document.body.clientHeight)})},mouseUp:(R,j)=>{R.button!=0||f.startingEdges==null||(console.log("mouseUp",j),R.preventDefault(),f.startingEdges=null,f.newEdges=null,f.clickStart=null,f.eventListenerController&&(f.eventListenerController.abort(),f.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)}},l={startingMouse:null,startingPosition:null,mouseDown:R=>{R.button==0&&(R.preventDefault(),console.log("mouseDown"),l.startingMouse={x:R.clientX,y:R.clientY},l.startingPosition=g.value,document.addEventListener("mousemove",l.mouseMove),document.addEventListener("mouseup",l.mouseUp))},mouseMove:R=>{!l.startingMouse||!l.startingPosition||(R.preventDefault(),g.value={x:Math.min(Math.max(l.startingPosition.x+R.clientX-l.startingMouse.x,0),document.body.clientWidth-N.value.width),y:Math.min(Math.max(l.startingPosition.y+R.clientY-l.startingMouse.y,0),document.body.clientHeight-N.value.height)})},mouseUp:R=>{R.button!=0||!l.startingMouse||!l.startingPosition||(R.preventDefault(),l.startingMouse=null,l.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",l.mouseMove),document.removeEventListener("mouseup",l.mouseUp))}};function v(R){return{id:o,icon:r.icon,title:r.title,pid:r.pid,data:R??r.tag}}const m=He(()=>nt.value.get(o)!==-1),p=K(!1),y=K(!0);function L(){i("minimize",v()),ot.minimizeWindowPanel(o)}function A(){p.value=!p.value}function T(){i("close",v(!1)),ot.removeWindowPanel(o),y.value=!1}const z=He(()=>p.value?"heroicons-outline:square-2-stack":"ant-design:border-outlined"),W={id:o,isShow:m,close:T,open:function(){i("open",v(!0)),y.value=!0},showHidePanel:L};function O(R){if(dn(R))return R;{const j=Number(R);if(j==j)return j;if(R.endsWith("px")){const X=R.substring(0,R.length-2);return Number(X)}if(R.endsWith("%")){const X=R.substring(0,R.length-1);return Number(X)/100*document.body.clientWidth}return 300}}return e(W),Zt(()=>{(function(){let R=90;if(r.hasMin||(R-=30),r.hasMax||(R-=30),r.hasClose||(R-=30),he.setCssVar("--right-bar-width",R+"px",c.value),!c.value)return;const j=dn(r.titleHeight)?r.titleHeight+"px":r.titleHeight;c.value.style.height=j,c.value.style.lineHeight=j})(),function(){const R=v(W);ot.addWindowPanel(R),i("loaded",R)}(),g.value.x=O(r.left),g.value.y=O(r.top),D(g.value),N.value={width:O(r.nWidth),height:O(r.nHeight)},M(N.value),f.mount()}),Hi(()=>{ot.removeWindowPanel(o)}),(R,j)=>(F(),Q(Eo,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:we(()=>[y.value?ko((F(),fe("div",{key:0,ref_key:"dragPanelRef",ref:s,class:Pe(["dragWindowPanel",{maxPanel:p.value,dragWindowPanel_dark:u.value}])},[J("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:c,onMousedown:j[0]||(j[0]=(...X)=>l.mouseDown&&l.mouseDown(...X))},[ie(R.$slots,"title",{},()=>[r.icon?(F(),fe("img",{key:0,src:r.icon,width:"24",height:"24"},null,8,vc)):ne("v-if",!0),r.title?(F(),fe("span",yc,en(r.title),1)):ne("v-if",!0)]),J("div",wc,[n.hasMin?(F(),Q(tn(sn),{key:0,icon:"ant-design:minus-outlined",onClick:L})):ne("v-if",!0),n.hasMax?(F(),Q(tn(sn),{key:1,icon:z.value,onClick:A},null,8,["icon"])):ne("v-if",!0),n.hasClose?(F(),Q(tn(sn),{key:2,icon:"ant-design:close-outlined",onClick:T})):ne("v-if",!0)])],544),J("div",bc,[ie(R.$slots,"default")]),J("div",_c,[J("div",{class:"cursor-nw-resize",ref:f.refs.northWest},null,512),J("div",{class:"cursor-n-resize",ref:f.refs.north},null,512),J("div",{class:"cursor-ne-resize",ref:f.refs.northEast},null,512),J("div",{class:"cursor-w-resize",ref:f.refs.west},null,512),j[1]||(j[1]=J("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1)),J("div",{class:"cursor-e-resize",ref:f.refs.east},null,512),J("div",{class:"cursor-sw-resize",ref:f.refs.southWest},null,512),J("div",{class:"cursor-s-resize",ref:f.refs.south},null,512),J("div",{class:"cursor-se-resize",ref:f.refs.southEast},null,512)])],2)),[[xo,m.value]]):ne("v-if",!0)]),_:3}))}});function Sc(n){const e=new on(new ke);return e.serialize(n),e.stream.toString()}function Cc(n){return n==null||n===""?n:new rn(new ke(n)).deserialize()}Bn.__scopeId="data-v-39ea9741",Bn.__file="src/controls/xwindow/XWindow.vue";class Qn{debug=!1;simple=!1;utc=!1;longType="number";dictType="object";nullType=void 0;static Instance=new Qn;textEncoder=new TextEncoder;textDecoder=new TextDecoder;constructor(){}encodeResponse(e,t={}){var o=new ke,r=new on(o,this.simple,this.utc),i=t;this.simple;var s=0;for(var c in i)s++;s>0&&(o.writeByte(72),r.serialize(i),r.reset()),e instanceof Error?(o.writeByte(69),r.serialize(this.debug&&e.stack?e.stack:e.message)):(o.writeByte(82),r.serialize(e)),o.writeByte(122);const u=o.takeBytes();return this.textDecoder.decode(u)}decodeRequest(e,t={}){const o=this.textEncoder.encode(e);if(o.length===0)return["~",[]];var r=new ke(o),i=new rn(r,!1);i.longType=this.longType,i.dictType=this.dictType;var s=r.readByte();if(console.log("tag",s),s===72){var c=i.deserialize(this.nullType);for(var u in c)t[u]=c[u];i.reset(),s=r.readByte()}switch(s){case 67:return[i.deserialize(String),this.decodeArguments(i)];case 122:return["~",[]];default:throw new Error(`Invalid request:\r
|
|
12
|
+
`,St(t+o+"export default iconlist;","IconifyList.ts"))}function ia(n,e){const t=cr(n);No(t,e),B.Message?.msg("\u5BFC\u51FA\u7CFB\u7EDF\u529F\u80FD\u6743\u9650\u6587\u4EF6\u6210\u529F\uFF01")}function sa(n){let e=n.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 aa(n){let e=zn(n);return e=e.replace(/^[1-9]\d\d{1,3}$/,"100"),e=e.replace(/^100\.$/,"100"),e}function zn(n){let e=n.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 ca(n){let e=n.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 la(n){let e=n.replace(/[\u4e00-\u9fa5\s]+/g,"");return e=e.replace(/(^\s*)|(\s*$)/g,""),e}function ua(n){let e=n.replace(/[a-zA-Z]+/g,"");return e=e.replace(/(^\s*)|(\s*$)/g,""),e}function ha(n){return n.replace(/(^\s*)|(\s*$)/g,"")}function da(n){let e=zn(n);return e=e.toString().split("."),e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e=e.join("."),e}function fa(n,e="",t="red"){return e.replace(new RegExp(n,"gi"),`<span style='color: ${t}'>${n}</span>`)}function pa(n,e="\u4EDF\u4F70\u62FE\u4EBF\u4EDF\u4F70\u62FE\u4E07\u4EDF\u4F70\u62FE\u5143\u89D2\u5206",t=""){let o=(n+="00").indexOf(".");o>=0&&(n=n.substring(0,o)+n.substr(o+1,2)),e=e.substr(e.length-n.length);for(let r=0;r<n.length;r++)t+="\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396".substr(n.substr(r,1),1)+e.substr(r,1);return t=t.replace(/零角零分$/,"\u6574").replace(/零[仟佰拾]/g,"\u96F6").replace(/零{2,}/g,"\u96F6").replace(/零([亿|万])/g,"$1").replace(/零+元/,"\u5143").replace(/亿零{0,3}万/,"\u4EBF").replace(/^元/,"\u96F6\u5143")}function ga(n){return!!/^((12[0-9])|(13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0|1,5-9]))\d{8}$/.test(n)}function ma(n){return!!/\d{3}-\d{8}|\d{4}-\d{7}/.test(n)}function va(n){return!!/^[a-zA-Z][a-zA-Z0-9_]{4,15}$/.test(n)}function ya(n){return!!/^[a-zA-Z]\w{5,15}$/.test(n)}function wa(n){return!!/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(n)}function ba(n){let e="";return/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,16}$/.test(n)&&(e="\u5F31"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(n)&&(e="\u4E2D"),/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,16}$/.test(n)&&(e="\u5F3A"),e}function _a(n){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(n)}function Sa(n){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(n)}function Ca(n){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(n)}function Ea(n){return!!/^[\u4e00-\u9fa5]{1,6}(·[\u4e00-\u9fa5]{1,6}){0,2}$/.test(n)}function ka(n){return!!/^[1-9][0-9]{5}$/.test(n)}function xa(n){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(n)}function Ia(n){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(n)}let hr=!0;try{String.fromCharCode.apply(String,[1,2])}catch{hr=!1,Object.defineProperty(Array.prototype,"subarray",{value:Array.prototype.slice})}var An=2654435769;function dr(n,e){var t=n.length,o=t<<2;if(e){var r=n[t-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]=n[s>>2]>>((3&s)<<3);return i}function It(n,e){var t,o=n.length,r=o>>2;3&o&&++r,e?(t=new Uint32Array(r+1))[r]=o:t=new Uint32Array(r);for(var i=0;i<o;++i)t[i>>2]|=n[i]<<((3&i)<<3);return t}function $e(n){return 4294967295&n}function Tt(n,e,t,o,r,i){return(t>>>5^e<<2)+(e>>>3^t<<4)^(n^e)+(i[3&o^r]^t)}function fr(n){if(n.length<16){var e=new Uint8Array(16);e.set(n),n=e}return n}function Rt(n){for(var e=n.length,t=new Uint8Array(3*e),o=0,r=0;r<e;r++){var i=n.charCodeAt(r);if(i<128)t[o++]=i;else if(i<2048)t[o++]=192|i>>6,t[o++]=128|63&i;else{if(!(i<55296||i>57343)){if(r+1<e){var s=n.charCodeAt(r+1);if(i<56320&&56320<=s&&s<=57343){var c=65536+((1023&i)<<10|1023&s);t[o++]=240|c>>18,t[o++]=128|c>>12&63,t[o++]=128|c>>6&63,t[o++]=128|63&c,r++;continue}}throw new Error("Malformed string")}t[o++]=224|i>>12,t[o++]=128|i>>6&63,t[o++]=128|63&i}}return t.subarray(0,o)}function pr(n){var e=n.length;return e===0?"":e<32767?function(t,o){for(var r=new Array(o),i=0,s=0,c=t.length;i<o&&s<c;i++){var u=t[s++];switch(u>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r[i]=u;break;case 12:case 13:if(!(s<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(31&u)<<6|63&t[s++];break;case 14:if(!(s+1<c))throw new Error("Unfinished UTF-8 octet sequence");r[i]=(15&u)<<12|(63&t[s++])<<6|63&t[s++];break;case 15:if(!(s+2<c))throw new Error("Unfinished UTF-8 octet sequence");var g=((7&u)<<18|(63&t[s++])<<12|(63&t[s++])<<6|63&t[s++])-65536;if(!(0<=g&&g<=1048575))throw new Error("Character outside valid Unicode range: 0x"+g.toString(16));r[i++]=g>>10&1023|55296,r[i]=1023&g|56320;break;default:throw new Error("Bad UTF-8 encoding 0x"+u.toString(16))}}return i<o&&(r.length=i),String.fromCharCode.apply(String,r)}(n,e):function(t,o){for(var r=[],i=new Array(32768),s=0,c=0,u=t.length;s<o&&c<u;s++){var g=t[c++];switch(g>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i[s]=g;break;case 12:case 13:if(!(c<u))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(31&g)<<6|63&t[c++];break;case 14:if(!(c+1<u))throw new Error("Unfinished UTF-8 octet sequence");i[s]=(15&g)<<12|(63&t[c++])<<6|63&t[c++];break;case 15:if(!(c+2<u))throw new Error("Unfinished UTF-8 octet sequence");var S=((7&g)<<18|(63&t[c++])<<12|(63&t[c++])<<6|63&t[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"+g.toString(16))}if(s>=32766){var C=s+1;i.length=C,r.push(String.fromCharCode.apply(String,i)),o-=C,s=-1}}return s>0&&(i.length=s,r.push(String.fromCharCode.apply(String,i))),r.join("")}(n,e)}function Ta(n){var e=n.length;if(e===0)return"";var t=hr?n:function(c){for(var u=c.length,g=new Array(c.length),S=0;S<u;++S)g[S]=c[S];return g}(n);if(e<65535)return String.fromCharCode.apply(String,t);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,t.subarray(s<<15,s+1<<15));return o&&(i[r]=String.fromCharCode.apply(String,t.subarray(r<<15,e))),i.join("")}function gr(n,e){return typeof n=="string"&&(n=Rt(n)),typeof e=="string"&&(e=Rt(e)),n==null||n.length===0?n:dr(function(t,o){var r,i,s,c,u,g,S=t.length,C=S-1;for(i=t[C],s=0,g=0|Math.floor(6+52/S);g>0;--g){for(c=(s=$e(s+An))>>>2&3,u=0;u<C;++u)r=t[u+1],i=t[u]=$e(t[u]+Tt(s,r,i,u,c,o));r=t[0],i=t[C]=$e(t[C]+Tt(s,r,i,C,c,o))}return t}(It(n,!0),It(fr(e),!1)),!1)}function mr(n,e){return typeof n=="string"&&(n=function(t){for(var o=window.atob(t),r=o.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=o.charCodeAt(s);return i}(n)),typeof e=="string"&&(e=Rt(e)),n==null||n.length===0?n:dr(function(t,o){var r,i,s,c,u,g=t.length,S=g-1;for(r=t[0],s=$e(Math.floor(6+52/g)*An);s!==0;s=$e(s-An)){for(c=s>>>2&3,u=S;u>0;--u)i=t[u-1],r=t[u]=$e(t[u]-Tt(s,r,i,u,c,o));i=t[S],r=t[0]=$e(t[0]-Tt(s,r,i,0,c,o))}return t}(It(n,!1),It(fr(e),!1)),!0)}const Ze={toBytes:Rt,toString:pr,encrypt:gr,encryptToString:function(n,e){return window.btoa(Ta(gr(n,e)))},decrypt:mr,decryptToString:function(n,e){return pr(mr(n,e))}},vr=n=>{const e="1.23452384164.123412416";document.getElementById(e)!==null&&document.body.removeChild(document.getElementById(e));const t=document.createElement("canvas");t.width=200,t.height=130;const o=t.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(n,t.width/10,t.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(${t.toDataURL("image/png")}) left top repeat`,document.body.appendChild(r),e},Ra={set:n=>{let e=vr(n);document.getElementById(e)===null&&(e=vr(n))},del:()=>{let n="1.23452384164.123412416";document.getElementById(n)!==null&&document.body.removeChild(document.getElementById(n))}};class Ne extends Error{constructor(e,t){const o=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=o}}class Dn extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class ve extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Pa extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=o}}class Ma extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=o}}class za extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=o}}class yr extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class Aa extends Error{constructor(e,t){const o=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=o}}class wr{constructor(e,t,o){this.statusCode=e,this.statusText=t,this.content=o}}class Pt{get(e,t){return this.send({...t,method:"GET",url:e})}post(e,t){return this.send({...t,method:"POST",url:e})}delete(e,t){return this.send({...t,method:"DELETE",url:e})}getCookieString(e){return""}}var k;(function(n){n[n.Trace=0]="Trace",n[n.Debug=1]="Debug",n[n.Information=2]="Information",n[n.Warning=3]="Warning",n[n.Error=4]="Error",n[n.Critical=5]="Critical",n[n.None=6]="None"})(k||(k={}));class Qe{constructor(){}log(e,t){}}Qe.instance=new Qe;class ee{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,o){if(!(e in t))throw new Error(`Unknown ${o} value: ${e}.`)}}class Z{static get isBrowser(){return!Z.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!Z.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!Z.isNode&&typeof window=="object"&&window.document===void 0}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function et(n,e){let t="";return Be(n)?(t=`Binary data of length ${n.byteLength}`,e&&(t+=`. 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)}(n)}'`)):typeof n=="string"&&(t=`String data of length ${n.length}`,e&&(t+=`. Content: '${n}'`)),t}function Be(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}async function br(n,e,t,o,r,i){const s={},[c,u]=Xe();s[c]=u,n.log(k.Trace,`(${e} transport) sending data. ${et(r,i.logMessageContent)}.`);const g=Be(r)?"arraybuffer":"text",S=await t.post(o,{content:r,headers:{...s,...i.headers},responseType:g,timeout:i.timeout,withCredentials:i.withCredentials});n.log(k.Trace,`(${e} transport) request complete. Response status: ${S.statusCode}.`)}class Da{constructor(e,t){this._subject=e,this._observer=t}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(t=>{})}}class Mt{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const o=`[${new Date().toISOString()}] ${k[e]}: ${t}`;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 Xe(){let n="X-SignalR-User-Agent";return Z.isNode&&(n="User-Agent"),[n,La("8.0.7",$a(),Ba(),Na())]}function La(n,e,t,o){let r="Microsoft SignalR/";const i=n.split(".");return r+=`${i[0]}.${i[1]}`,r+=` (${n}; `,r+=e&&e!==""?`${e}; `:"Unknown OS; ",r+=`${t}`,r+=o?`; ${o}`:"; Unknown Runtime Version",r+=")",r}function $a(){if(!Z.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function Na(){if(Z.isNode)return process.versions.node}function Ba(){return Z.isNode?"NodeJS":"Browser"}function Ln(n){return n.stack?n.stack:n.message?n.message:`${n}`}class Wa extends Pt{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||Z.isNode){const t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("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 t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new ve;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let o;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),o=new ve});let r,i=null;if(e.timeout){const u=e.timeout;i=setTimeout(()=>{t.abort(),this._logger.log(k.Warning,"Timeout from HTTP request."),o=new Dn},u)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Be(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:t.signal})}catch(u){throw o||(this._logger.log(k.Warning,`Error from HTTP request. ${u}.`),u)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){const u=await _r(r,"text");throw new Ne(u||r.statusText,r.status)}const s=_r(r,e.responseType),c=await s;return new wr(r.status,r.statusText,c)}getCookieString(e){let t="";return Z.isNode&&this._jar&&this._jar.getCookies(e,(o,r)=>t=r.join("; ")),t}}function _r(n,e){let t;switch(e){case"arraybuffer":t=n.arrayBuffer();break;case"text":default:t=n.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`)}return t}class Ua extends Pt{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new ve):e.method?e.url?new Promise((t,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&&(Be(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 ve)}),e.timeout&&(r.timeout=e.timeout),r.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),r.status>=200&&r.status<300?t(new wr(r.status,r.statusText,r.response||r.responseText)):o(new Ne(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 Ne(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(k.Warning,"Timeout from HTTP request."),o(new Dn)},r.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Oa extends Pt{constructor(e){if(super(),typeof fetch<"u"||Z.isNode)this._httpClient=new Wa(e);else{if(typeof XMLHttpRequest>"u")throw new Error("No usable HttpClient found.");this._httpClient=new Ua(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new ve):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 t=e.split(pe.RecordSeparator);return t.pop(),t}}pe.RecordSeparatorCode=30,pe.RecordSeparator=String.fromCharCode(pe.RecordSeparatorCode);class ja{writeHandshakeRequest(e){return pe.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,o;if(Be(e)){const s=new Uint8Array(e),c=s.indexOf(pe.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),o=s.byteLength>u?s.slice(u).buffer:null}else{const s=e,c=s.indexOf(pe.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;t=s.substring(0,u),o=s.length>u?s.substring(u):null}const r=pe.parse(t),i=JSON.parse(r[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[o,i]}}var j;(function(n){n[n.Invocation=1]="Invocation",n[n.StreamItem=2]="StreamItem",n[n.Completion=3]="Completion",n[n.StreamInvocation=4]="StreamInvocation",n[n.CancelInvocation=5]="CancelInvocation",n[n.Ping=6]="Ping",n[n.Close=7]="Close",n[n.Ack=8]="Ack",n[n.Sequence=9]="Sequence"})(j||(j={}));class Ha{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Da(this,e)}}class qa{constructor(e,t,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=t,this._bufferSize=o}async _send(e){const t=this._protocol.writeMessage(e);let o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let r=()=>{},i=()=>{};Be(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((s,c)=>{r=s,i=c})),this._messages.push(new Fa(t,this._totalMessageCount,r,i))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await o}_ack(e){let t=-1;for(let o=0;o<this._messages.length;o++){const r=this._messages[o];if(r._id<=e.sequenceId)t=o,Be(r._message)?this._bufferedByteCount-=r._message.byteLength:this._bufferedByteCount-=r._message.length,r._resolver();else{if(!(this._bufferedByteCount<this._bufferSize))break;r._resolver()}}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type===j.Sequence&&(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,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 t=this._messages;for(const o of t)await this._connection.send(o._message);this._reconnectInProgress=!1}_dispose(e){e!=null||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._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 Fa{constructor(e,t,o,r){this._message=e,this._id=t,this._resolver=o,this._rejector=r}}var Y;(function(n){n.Disconnected="Disconnected",n.Connecting="Connecting",n.Connected="Connected",n.Disconnecting="Disconnecting",n.Reconnecting="Reconnecting"})(Y||(Y={}));class Yn{static create(e,t,o,r,i,s,c){return new Yn(e,t,o,r,i,s,c)}constructor(e,t,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")},ee.isRequired(e,"connection"),ee.isRequired(t,"logger"),ee.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=i??3e4,this.keepAliveIntervalInMilliseconds=s??15e3,this._statefulReconnectBufferSize=c??1e5,this._logger=t,this._protocol=o,this.connection=e,this._reconnectPolicy=r,this._handshakeProtocol=new ja,this.connection.onreceive=u=>this._processIncomingData(u),this.connection.onclose=u=>this._connectionClosed(u),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Y.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!==Y.Disconnected&&this._connectionState!==Y.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!==Y.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Y.Connecting,this._logger.log(k.Debug,"Starting HubConnection.");try{await this._startInternal(),Z.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Y.Connected,this._connectionStarted=!0,this._logger.log(k.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Y.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((t,o)=>{this._handshakeResolver=t,this._handshakeRejecter=o});await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const o={protocol:this._protocol.name,version:t};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 qa(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(t){throw this._logger.log(k.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(t),t}}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===Y.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===Y.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 t=this._connectionState;return this._connectionState=Y.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()):(t===Y.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new ve("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,...t){const[o,r]=this._replaceStreamingParams(t),i=this._createStreamInvocation(e,t,r);let s;const c=new Ha;return c.cancelCallback=()=>{const u=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],s.then(()=>this._sendWithProtocol(u))},this._callbacks[i.invocationId]=(u,g)=>{g?c.error(g):u&&(u.type===j.Completion?u.error?c.error(new Error(u.error)):c.complete():c.next(u.item))},s=this._sendWithProtocol(i).catch(u=>{c.error(u),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,...t){const[o,r]=this._replaceStreamingParams(t),i=this._sendWithProtocol(this._createInvocation(e,t,!0,r));return this._launchStreams(o,i),i}invoke(e,...t){const[o,r]=this._replaceStreamingParams(t),i=this._createInvocation(e,t,!1,r);return new Promise((c,u)=>{this._callbacks[i.invocationId]=(S,C)=>{C?u(C):S&&(S.type===j.Completion?S.error?u(new Error(S.error)):c(S.result):u(new Error(`Unexpected message type: ${S.type}`)))};const g=this._sendWithProtocol(i).catch(S=>{u(S),delete this._callbacks[i.invocationId]});this._launchStreams(o,g)})}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const o=this._methods[e];if(o)if(t){const r=o.indexOf(t);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 t=this._protocol.parseMessages(e,this._logger);for(const o of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(o))switch(o.type){case j.Invocation:this._invokeClientMethod(o).catch(r=>{this._logger.log(k.Error,`Invoke client method threw error: ${Ln(r)}`)});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: ${Ln(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 t,o;try{[o,t]=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(t.error){const r="Server returned handshake error: "+t.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===Y.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 t=e.target.toLowerCase(),o=this._methods[t];if(!o)return this._logger.log(k.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(k.Warning,`No result given for '${t}' 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,u;for(const g of r)try{const S=s;s=await g.apply(this,e.arguments),i&&s&&S&&(this._logger.log(k.Error,`Multiple results provided for '${t}'. Sending error to server.`),u=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 '${t}' threw error '${S}'.`)}u?await this._sendWithProtocol(u):i?(c?u=this._createCompletionMessage(e.invocationId,`${c}`,null):s!==void 0?u=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(k.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),u=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(u)):s&&this._logger.log(k.Error,`Result given for '${t}' 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 ve("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===Y.Disconnecting?this._completeClose(e):this._connectionState===Y.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Y.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Y.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),Z.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(k.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=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=Y.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!==Y.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!==Y.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=Y.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!==Y.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===Y.Disconnecting&&this._completeClose());r=s instanceof Error?s:new Error(s.toString()),i=this._getNextRetryDelay(o++,Date.now()-t,r)}}this._logger.log(k.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:o})}catch(r){return this._logger.log(k.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${r}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach(o=>{const r=t[o];try{r(null,e)}catch(i){this._logger.log(k.Error,`Stream 'error' callback called with '${e}' threw error: ${Ln(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,o,r){if(o)return r.length!==0?{arguments:t,streamIds:r,target:e,type:j.Invocation}:{arguments:t,target:e,type:j.Invocation};{const i=this._invocationId;return this._invocationId++,r.length!==0?{arguments:t,invocationId:i.toString(),streamIds:r,target:e,type:j.Invocation}:{arguments:t,invocationId:i.toString(),target:e,type:j.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(const o in e)e[o].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:r=>{let i;i=r instanceof Error?r.message:r&&r.toString?r.toString():"Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,i)))},next:r=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,r)))}})}}_replaceStreamingParams(e){const t=[],o=[];for(let r=0;r<e.length;r++){const i=e[r];if(this._isObservable(i)){const s=this._invocationId;this._invocationId++,t[s]=i,o.push(s.toString()),e.splice(r,1)}}return[t,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,o){const r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:r.toString(),streamIds:o,target:e,type:j.StreamInvocation}:{arguments:t,invocationId:r.toString(),target:e,type:j.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:j.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:j.StreamItem}}_createCompletionMessage(e,t,o){return t?{error:t,invocationId:e,type:j.Completion}:{invocationId:e,result:o,type:j.Completion}}_createCloseMessage(){return{type:j.Close}}}const Xa=[0,2e3,1e4,3e4,null];class Sr{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Xa}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class We{}We.Authorization="Authorization",We.Cookie="Cookie";class Va extends Pt{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}async send(e){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const o=await this._innerClient.send(e);return t&&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[We.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[We.Authorization]&&delete e.headers[We.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var te,ae;(function(n){n[n.None=0]="None",n[n.WebSockets=1]="WebSockets",n[n.ServerSentEvents=2]="ServerSentEvents",n[n.LongPolling=4]="LongPolling"})(te||(te={})),function(n){n[n.Text=1]="Text",n[n.Binary=2]="Binary"}(ae||(ae={}));class Ga{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 Cr{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,o){this._httpClient=e,this._logger=t,this._pollAbort=new Ga,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(ee.isRequired(e,"url"),ee.isRequired(t,"transferFormat"),ee.isIn(t,ae,"transferFormat"),this._url=e,this._logger.log(k.Trace,"(LongPolling transport) Connecting."),t===ae.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]=Xe(),i={[o]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};t===ae.Binary&&(s.responseType="arraybuffer");const c=`${e}&_=${Date.now()}`;this._logger.log(k.Trace,`(LongPolling transport) polling: ${c}.`);const u=await this._httpClient.get(c,s);u.statusCode!==200?(this._logger.log(k.Error,`(LongPolling transport) Unexpected response code: ${u.statusCode}.`),this._closeError=new Ne(u.statusText||"",u.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,t){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,t);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 Ne(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(k.Trace,`(LongPolling transport) data received. ${et(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 Dn?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?br(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={},[t,o]=Xe();e[t]=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 Ne&&(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 Ka{constructor(e,t,o,r){this._httpClient=e,this._accessToken=t,this._logger=o,this._options=r,this.onreceive=null,this.onclose=null}async connect(e,t){return ee.isRequired(e,"url"),ee.isRequired(t,"transferFormat"),ee.isIn(t,ae,"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(t===ae.Text){if(Z.isBrowser||Z.isWebWorker)i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const c=this._httpClient.getCookieString(e),u={};u.Cookie=c;const[g,S]=Xe();u[g]=S,i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...u,...this._options.headers}})}try{i.onmessage=c=>{if(this.onreceive)try{this._logger.log(k.Trace,`(SSE transport) data received. ${et(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(u){return void this._close(u)}},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?br(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 Ja{constructor(e,t,o,r,i,s){this._logger=o,this._accessTokenFactory=t,this._logMessageContent=r,this._webSocketConstructor=i,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,t){let o;return ee.isRequired(e,"url"),ee.isRequired(t,"transferFormat"),ee.isIn(t,ae,"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 u=!1;if(Z.isNode||Z.isReactNative){const g={},[S,C]=Xe();g[S]=C,o&&(g[We.Authorization]=`Bearer ${o}`),c&&(g[We.Cookie]=c),s=new this._webSocketConstructor(e,void 0,{headers:{...g,...this._headers}})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);s||(s=new this._webSocketConstructor(e)),t===ae.Binary&&(s.binaryType="arraybuffer"),s.onopen=g=>{this._logger.log(k.Information,`WebSocket connected to ${e}.`),this._webSocket=s,u=!0,r()},s.onerror=g=>{let S=null;S=typeof ErrorEvent<"u"&&g instanceof ErrorEvent?g.error:"There was an error with the transport",this._logger.log(k.Information,`(WebSockets transport) ${S}.`)},s.onmessage=g=>{if(this._logger.log(k.Trace,`(WebSockets transport) data received. ${et(g.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(g.data)}catch(S){return void this._close(S)}},s.onclose=g=>{if(u)this._close(g);else{let S=null;S=typeof ErrorEvent<"u"&&g instanceof ErrorEvent?g.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. ${et(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 Ya{constructor(e,t={}){var o;if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,ee.isRequired(e,"url"),this._logger=(o=t.logger)===void 0?new Mt(k.Information):o===null?Qe.instance:o.log!==void 0?o:new Mt(o),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=t.logMessageContent!==void 0&&t.logMessageContent,typeof t.withCredentials!="boolean"&&t.withCredentials!==void 0)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=t.withCredentials===void 0||t.withCredentials,t.timeout=t.timeout===void 0?1e5:t.timeout;let r=null,i=null;if(Z.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),i=s("eventsource")}Z.isNode||typeof WebSocket>"u"||t.WebSocket?Z.isNode&&!t.WebSocket&&r&&(t.WebSocket=r):t.WebSocket=WebSocket,Z.isNode||typeof EventSource>"u"||t.EventSource?Z.isNode&&!t.EventSource&&i!==void 0&&(t.EventSource=i):t.EventSource=EventSource,this._httpClient=new Va(t.httpClient||new Oa(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||ae.Binary,ee.isIn(e,ae,"transferFormat"),this._logger.log(k.Debug,`Starting connection with transfer format '${ae[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 t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(k.Error,t),await this._stopPromise,Promise.reject(new ve(t))}if(this._connectionState!=="Connected"){const t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(k.Error,t),Promise.reject(new ve(t))}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 Zn(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(t=>{this._stopPromiseResolver=t}),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(t){this._logger.log(k.Error,`HttpConnection.transport.stop() threw error '${t}'.`),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 t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==te.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(te.WebSockets),await this._startTransport(t,e)}else{let o=null,r=0;do{if(o=await this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ve("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&&(t=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(t,this._options.transport,o,e)}this.transport instanceof Cr&&(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 t={},[o,r]=Xe();t[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:{...t,...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 yr("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 Ne&&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 yr(c))}}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}async _createTransport(e,t,o,r){let i=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(t))return this._logger.log(k.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(i,r),void(this.connectionId=o.connectionId);const s=[],c=o.availableTransports||[];let u=o;for(const g of c){const S=this._resolveTransportOrError(g,t,r,u?.useStatefulReconnect===!0);if(S instanceof Error)s.push(`${g.transport} failed:`),s.push(S);else if(this._isITransport(S)){if(this.transport=S,!u){try{u=await this._getNegotiationResponse(e)}catch(C){return Promise.reject(C)}i=this._createConnectUrl(e,u.connectionToken)}try{return await this._startTransport(i,r),void(this.connectionId=u.connectionId)}catch(C){if(this._logger.log(k.Error,`Failed to start the transport '${g.transport}': ${C}`),u=void 0,s.push(new za(`${g.transport} failed: ${C}`,te[g.transport])),this._connectionState!=="Connecting"){const N="Failed to select transport before stop() was called.";return this._logger.log(k.Debug,N),Promise.reject(new ve(N))}}}}return s.length>0?Promise.reject(new Aa(`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 te.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Ja(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case te.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Ka(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case te.LongPolling:return new Cr(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){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,t),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,t)}_resolveTransportOrError(e,t,o,r){const i=te[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)}(t,i))return this._logger.log(k.Debug,`Skipping transport '${te[i]}' because it was disabled by the client.`),new Ma(`'${te[i]}' is disabled by the client.`,i);{if(!(e.transferFormats.map(c=>ae[c]).indexOf(o)>=0))return this._logger.log(k.Debug,`Skipping transport '${te[i]}' because it does not support the requested transfer format '${ae[o]}'.`),new Error(`'${te[i]}' does not support ${ae[o]}.`);if(i===te.WebSockets&&!this._options.WebSocket||i===te.ServerSentEvents&&!this._options.EventSource)return this._logger.log(k.Debug,`Skipping transport '${te[i]}' because it is not supported in your environment.'`),new Pa(`'${te[i]}' is not supported in your environment.`,i);this._logger.log(k.Debug,`Selecting transport '${te[i]}'.`);try{return this.features.reconnect=i===te.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(t=>{this._logger.log(k.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(k.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}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(!Z.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(k.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const o=new URLSearchParams(t.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"),t.search=o.toString(),t.toString()}}class Zn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new zt,this._transportResult=new zt,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new zt),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 zt;const e=this._transportResult;this._transportResult=void 0;const t=typeof this._buffer[0]=="string"?this._buffer.join(""):Zn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(o){e.reject(o)}}}static _concatBuffers(e){const t=e.map(i=>i.byteLength).reduce((i,s)=>i+s),o=new Uint8Array(t);let r=0;for(const i of e)o.set(new Uint8Array(i),r),r+=i.byteLength;return o.buffer}}class zt{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class Za{constructor(){this.name="json",this.version=2,this.transferFormat=ae.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=Qe.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:t.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,t){if(typeof e!="string"||e==="")throw new Error(t)}}const Qa={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 ec{configureLogging(e){if(ee.isRequired(e,"logging"),e.log!==void 0)this.logger=e;else if(typeof e=="string"){const t=function(o){const r=Qa[o.toLowerCase()];if(r!==void 0)return r;throw new Error(`Unknown log level: ${o}`)}(e);this.logger=new Mt(t)}else this.logger=new Mt(e);return this}withUrl(e,t){return ee.isRequired(e,"url"),ee.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions=typeof t=="object"?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return ee.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 Sr(e):this.reconnectPolicy=e:this.reconnectPolicy=new Sr,this}withServerTimeout(e){return ee.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return ee.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 t=new Ya(this.url,e);return Yn.create(t,this.logger||Qe.instance,this.protocol||new Za,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}let At;function tc(n){if(!n){if(At)return At;throw new Error("\u9996\u6B21\u6784\u5EFA\uFF0CsignalrURL\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\uFF01")}const e=new ec().configureLogging(k.Information).withUrl(n).withAutomaticReconnect({nextRetryDelayInMilliseconds:()=>5e3}).build();return e.keepAliveIntervalInMilliseconds=15e3,e.serverTimeoutInMilliseconds=18e5,e.start().then(()=>{B.Logger().info("\u542F\u52A8SignalR\u8FDE\u63A5\uFF01")}),e.onclose(async()=>{B.Logger().info("\u65AD\u5F00SignalR\u8FDE\u63A5!")}),e.onreconnecting(()=>{B.Logger().warn("SignalR\u670D\u52A1\u5DF2\u65AD\u7EBF\uFF0C\u91CD\u8FDE\u4E2D...\uFF01")}),e.onreconnected(()=>{B.Logger().warn("SignalR\u91CD\u8FDE\u6210\u529F!")}),At||(At=e),e}const $n=new Set;function Er(n){return n!==null?parseFloat(n):0}function Dt(n){const e=window.getComputedStyle(n),t=Math.ceil([e.paddingLeft,e.width,e.paddingRight].map(Er).reduce((r,i)=>r+i)),o=Math.ceil([e.paddingTop,e.height,e.paddingBottom].map(Er).reduce((r,i)=>r+i));return{width:t,height:o}}class kr{width;height;constructor(e,t){this.width=e,this.height=t}}function nc(n){const e=n.windowEl;if(e){const t=parseFloat(e.style.left||"NaN"),o=parseFloat(e.style.top||"NaN");if(!isNaN(t)&&!isNaN(o))return{left:t,top:o}}return null}function oc(n,e,t,o){const r=n-t,i=e-o;return r*r+i*i}window.addEventListener("resize",n=>{$n.forEach(e=>{e&&mt(e.fixPosition)&&e.fixPosition()})});const Lt=[];var $t=Ie({name:"VWindow",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:gt},setup(n,{emit:e}){const t=Li();if(!t)return;const{proxy:o}=t;let r=0,i,s,c;const u=K(n.isOpen),g=()=>{Lt.push(o),c=new Ji(n.zGroup,S),n.isOpen&&function(A){A&&(Co(()=>{r++==0&&(m(o),function(){const T=C.value,{width:z,height:W}=ln(T);let O,R;if(n.left!==void 0!=(n.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof n.left=="number")O=n.left,R=n.top;else{const H=n.positionHint||"auto";switch(H){case"auto":{let X=20,le=50,oe=0;do{if(Lt.every(ye=>{if(!ye.isOpen||o==ye)return!0;const at=nc(ye);if(at==null)return!0;const{left:jt,top:me}=at;return oc(jt,me,X,le)>16}))break;X=(X+40)%(window.innerWidth-200),le=(le+40)%(window.innerHeight-200)}while(++oe<100);O=X,R=le}break;case"center":O=(window.innerWidth-z)/2,R=(window.innerHeight-W)/2,console.log(O,R,window.innerWidth,window.innerHeight,"111111");break;default:try{const X=H.split("/").map(Number);if(X.length!=2)throw null;const[le,oe]=X;if(!isFinite(le)||!isFinite(oe))throw null;O=le>=0?le:window.innerWidth-z+le,R=oe>=0?oe:window.innerHeight-W+oe}catch{throw new Error(`invalid position string: ${H}`)}}}T&&(T.style.left=`${O}px`,T.style.top=`${R}px`)}()),n.resizable&&p(),L(),i=new Ki(N.value,C.value,{onMove:()=>L(),onMoveStart:()=>e("move-start"),onMoveEnd:()=>e("move-end")}),n.resizable&&function(){const{height:T}=ln(N.value);s=new Zi(C.value,{onResize:()=>p(),onResizeStart:()=>e("resize-start"),onResizeEnd:()=>e("resize-end"),minWidth:n.minWidth,minHeight:n.minHeight+T,maxWidth:n.maxWidth,maxHeight:n.maxHeight?n.maxHeight+T:void 0})}()}),n.activateWhenOpen&&M())}(!0),$n.add(o)};function S(A){f.value.zIndex=`${A}`}const C=K(null),N=K(null),D=K(null);function M(){c.raise(),e("activate")}const f=K({...n.windowStyle.window,zIndex:"auto",overflow:n.overflow}),l=je(()=>n.windowStyle.titlebar),v=je(()=>{const A={...n.windowStyle.content};return n.resizable?A.padding="0":n.padding!=null&&(A.padding=`${n.padding}px`),n.isScrollable&&(A.overflow="auto"),A});function m(A){const{width:T,height:z,top:W,left:O}=A,R=C;if(R&&T!=null&&(R.value.style.width=`${T}px`),z!=null){const H=N.value;if(H){const X=Dt(H).height;R.value.style.height=`${z+X}px`}}R&&O!=null&&(R.value.style.left=`${O}px`),R&&W!=null&&(R.value.style.top=`${W}px`)}function p(A=!0){const T=C.value,z=N.value,W=D.value;if(W&&T&&z){const{width:O,height:R}=Dt(W),{width:H,height:X}=Dt(T),le=Dt(z).height,oe=H-(W.offsetWidth-O),ye=X-le-(W.offsetHeight-R);W.style.width=`${oe}px`,W.style.height=`${ye}px`,y(),e("resize",new kr(oe,ye)),A&&(e("update:width",oe),e("update:height",ye))}}function y(){const A=C.value;if(A){const T=A.getBoundingClientRect();T.left<0&&(f.value.left="0px"),T.top<0&&(f.value.top="0px"),T.right>window.innerWidth&&(f.value.left=window.innerWidth-T.width+"px"),T.bottom>window.innerHeight&&(f.value.top=window.innerHeight-T.height+"px")}}function L(A=!0){y();const T=C.value;if(T){const{left:z,top:W}=T.getBoundingClientRect();A&&(e("update:left",z),e("update:top",W))}}return Te(()=>n.isOpen,A=>{u.value=A}),Te(()=>n.zGroup,A=>{c.group=A}),Te(()=>n.width,A=>{m({width:A}),p(!1)}),Te(()=>n.height,A=>{m({height:A}),p(!1)}),Zt(()=>{g()}),$i(()=>{$n.delete(this),c.unregister(),s&&s.teardown(),i&&i.teardown(),Lt.splice(Lt.indexOf(o),1)}),{isOpen:u,windowEl:C,titlebar:N,content:D,activate:M,styleWindow:f,styleTitlebar:l,styleContent:v,closeButtonClick:function(){u.value=!1,e("closebuttonclick")},fixPosition:y}}});const rc={class:"title"};var xr;$t.render=function(n,e,t,o,r,i){const s=ut("myButton");return F(),Q(Eo,{name:"fade",onAfterLeave:e[2]||(e[2]=c=>n.$emit("close")),onAfterEnter:e[3]||(e[3]=c=>n.$emit("open")),persisted:""},{default:we(()=>[ko(J("div",{class:"window",style:ge(n.styleWindow),ref:"windowEl",onMousedown:e[0]||(e[0]=(...c)=>n.activate&&n.activate(...c)),onTouchstart:e[1]||(e[1]=(...c)=>n.activate&&n.activate(...c))},[J("div",{class:"titlebar",style:ge(n.styleTitlebar),ref:"titlebar"},[J("div",rc,[n.$slots.title?ie(n.$slots,"title",{key:0}):(F(),fe(Re,{key:1},[Qt(en(n.title),1)],64))]),n.closeButton?(F(),Q(s,{key:0,windowStyle:n.windowStyle,onClick:n.closeButtonClick},{default:we(()=>e[4]||(e[4]=[Qt("\xD7")])),_:1},8,["windowStyle","onClick"])):ne("v-if",!0)],4),J("div",{class:"content",style:ge(n.styleContent),ref:"content"},[ie(n.$slots,"default")],4)],36),[[xo,n.isOpen]])]),_:3})},$t.__file="src/controls/vuewindow/window/index.vue",function(n){n[n.StyleBlack=0]="StyleBlack",n[n.StyleWhite=1]="StyleWhite",n[n.StyleMetal=2]="StyleMetal",n[n.StyleGrayblue=3]="StyleGrayblue"}(xr||(xr={}));const ic={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)"}},sc={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)"}},ac={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)"}},cc={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)"}},lc=$t;var ce;(function(n){n[n.top=0]="top",n[n.bottom=1]="bottom",n[n.centerBack=2]="centerBack",n[n.centerMain=3]="centerMain",n[n.centerFront=4]="centerFront",n[n.left=5]="left",n[n.right=6]="right"})(ce||(ce={}));class Ir{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;_mapItemRefs;constructor(e,t,o,r){this.layoutState=e,this._LayoutID=o,this._mapItemRefs=r,t.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 t;if(Me(e)?t=e:vt(e)&&(t=this.widgetConfig.find(o=>o.id===e)),t){if(t.afterid){if(this.isWidgetLoaded(t.afterid))return this._loadWidget(t);{let o=function(c){c.layoutID===r._LayoutID&&c.widgetID===i&&(r._loadWidget(s),B.EventBus.off(se.WidgetLoadedEvent,o))};const r=this,i=t.afterid,s=t;return B.EventBus.on(se.WidgetLoadedEvent,o),this.loadWidget(t.afterid)}}return this._loadWidget(t)}}loadOtherDependenceWidgets(e){this.preConditionMap.has(e)&&this.preConditionMap.get(e)?.forEach(t=>{t.preload&&this._loadWidget(t)})}_loadWidget(e){if(!this.widgetsLoadedSet.has(e.id))return e.component?e.component().then(t=>{if(t.default){const o=Ni(t.default);o.id=e.id,e.layout&&(o.style=e.layout),e.cssClass&&(o.cssClass=e.cssClass),e.layoutID&&(o.layoutID=e.layoutID),e.label&&(o.label=e.label),e.jsURL&&(o.jsURL=e.jsURL),e.cssURL&&(o.cssURL=e.cssURL),this.getContainerComponents(e.container).value.set(e.id,o),this.widgetsLoadedSet.add(e.id),Co().then(()=>{B.EventBus.emit(se.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:e.id}),this.loadOtherDependenceWidgets(e.id)})}}).catch(t=>{B.Logger().error("\u52A0\u8F7DWidget\u5931\u8D25\uFF01",e,t),B.EventBus.emit(se.WidgetLoadedErrorEvent,e)}):void 0;this.changeWidgetVisible(e.id,!0)}hasDependentWidgets(e){let t=!1;if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o){for(const r of o)if(this.isWidgetLoaded(r.id)){t=!0;break}}}return t}unloadWidget(e){if(!e||!this.isWidgetLoaded(e))return;const t=this.widgetConfig.find(o=>o.id===e);if(t){if(this.preConditionMap.has(e)){const o=this.preConditionMap.get(e);if(o)for(const r of o)this.unloadWidget(r.id)}this.getContainerComponents(t.container).value.delete(e),this.widgetsLoadedSet.delete(e),this._mapItemRefs&&this._mapItemRefs.delete(e),B.EventBus.emit(se.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:e})}}isWidgetLoaded(e){return this.widgetsLoadedSet.has(e)}splitTwoContainer(e=!1){const t=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;e?(t&&(t.style.left="0",t.style.width="100%"),o&&(o.style.width="100%")):(t&&(t.style.left="50%",t.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(e){switch(e){case ce.top:return this.layoutState.topContainer;case ce.bottom:return this.layoutState.bottomContainer;case ce.left:return this.layoutState.leftContainer;case ce.right:return this.layoutState.rightContainer;case ce.centerBack:return this.layoutState.centerBackContainer;case ce.centerMain:return this.layoutState.centerMainContainer;case ce.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(e,t=!1){const o=this.getLayoutContainer(e);o&&(o.style.visibility=t?"visible":"hidden")}changeWidgetVisible(e,t=!1){const o=this.getWidgetComponent(e);o&&o.changeVisible&&o.changeVisible(t)}isWidgetVisible(e){const t=this.getWidgetComponent(e);return!!t&&(!t.isShow||t.isShow.value)}getWidgetComponent(e){if(this.widgetsLoadedSet.has(e)&&this._mapItemRefs)return this._mapItemRefs.get(e)}getWigetItem(e){return this.widgetConfig.find(t=>t.id===e)}getGroupWigetItems(e){return this.widgetConfig.filter(t=>t.group===e)}getContainerComponents(e){if(this.layoutMap.has(e))return this.layoutMap.get(e);{const t=K(new Map);return this.layoutMap.set(e,t),t}}getWidgetLoadedIDList(){const e=[];return this.widgetsLoadedSet.forEach(t=>{e.push(t)}),e}unloadAllWidgets(e){const t=[];this.widgetsLoadedSet.forEach(o=>{e&&e.length>0?e.findIndex(r=>r===o)<0&&t.push(o):t.push(o)}),t.forEach(o=>this.unloadWidget(o))}unloadWidgets(e){e&&e.length>0&&e.forEach(t=>{this.unloadWidget(t)})}static getLayoutManager(e,t){if(t){const o=t.find(r=>r.id===e);if(o&&o.layoutID)return B.LayoutMap.get(o.layoutID)}}}var tt=Ie({name:"SuspenseWithError",setup(){const n=K(null);return Bi(e=>(n.value="\u5F53\u524D\u9875\u9762\u5B58\u5728\u95EE\u9898\uFF0C\u65E0\u6CD5\u6E32\u67D3\u2026\u2026",console.error("onErrorCaptured",e),!0)),{error:n}}});tt.render=function(n,e,t,o,r,i){return n.error?ie(n.$slots,"error",{key:0},()=>[Qt(en(n.error),1)]):(F(),Q(Wi,{key:1},{default:we(()=>[ie(n.$slots,"default")]),fallback:we(()=>[ie(n.$slots,"fallback")]),_:3}))},tt.__file="src/controls/routertransition/SuspenseWithError.vue";var Nn=Ie({name:"RouterTransition",__name:"RouterTransition",setup:n=>(e,t)=>{const o=ut("router-view");return F(),Q(tt,null,{default:we(()=>[ht(o,null,{default:we(({Component:r,route:i})=>[ne(" <transition> "),(F(),Q(Io,null,[i.meta.keepAlive?(F(),Q(be(r),{key:i.name})):ne("v-if",!0)],1024)),i.meta.keepAlive?ne("v-if",!0):(F(),Q(be(r),{key:i.name})),ne(" </transition> ")]),_:1})]),_:1})}});Nn.__file="src/controls/routertransition/RouterTransition.vue";var Nt=Ie({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:Nn},setup(n,{attrs:e,slots:t,emit:o}){const r=n.layoutID,i=K(n.enableRouterView);Te(()=>n.enableRouterView,()=>{i.value=n.enableRouterView});const s=So({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),c=new Map,u=new Ir(s,n.widgetConfig,r,c),g=f(ce.top),S=f(ce.centerBack),C=f(ce.centerFront),N=f(ce.left),D=f(ce.right),M=f(ce.bottom);function f(v){return u?.getContainerComponents(v)}const l=je(()=>n.layoutStyle);return Zt(()=>{u&&(r?B.LayoutMap.set(r,u):(B.LayoutManager=u,B.LayoutMap.set("",u)),u.preloadWidgets(),o("containerLoaded",{layoutID:r,layoutManager:u}),B.EventBus.emit(se.LayoutContainerLoaded,{layoutID:r,layoutManager:u}))}),{...Ui(s),topContainerComponents:g,centerbackComponents:S,centerfrontComponents:C,leftContainerComponents:N,rightContainerComponents:D,bottomContainerComponents:M,containerStyle:l,isEnableRouterView:i,setItemRef:(v,m)=>{v&&c.set(m,v)}}}});const uc={ref:"topContainer",class:"topContainer"},hc={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},dc={ref:"centerBackContainer",class:"centerdiv backContainer"},fc={ref:"centerFrontContainer",class:"centerdiv centerFrontContainer"},pc={ref:"leftContainer",class:"leftContainer"},gc={ref:"rightContainer",class:"rightContainer"},mc={ref:"bottomContainer",class:"bottomContainer"};Nt.render=function(n,e,t,o,r,i){const s=ut("router-transition");return F(),fe("div",{class:"layoutContainer",style:ge(n.containerStyle)},[J("div",uc,[ie(n.$slots,"top"),(F(!0),fe(Re,null,He(n.topContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),J("div",null,[ne(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),n.isEnableRouterView?(F(),fe("div",hc,[ie(n.$slots,"main",{},()=>[ht(s)])],512)):ne("v-if",!0),ne(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),J("div",dc,[ie(n.$slots,"back"),(F(!0),fe(Re,null,He(n.centerbackComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),ne(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),J("div",fc,[ie(n.$slots,"front"),(F(!0),fe(Re,null,He(n.centerfrontComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),J("div",pc,[ie(n.$slots,"left"),(F(!0),fe(Re,null,He(n.leftContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),J("div",gc,[ie(n.$slots,"right"),(F(!0),fe(Re,null,He(n.rightContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512)]),J("div",mc,[ie(n.$slots,"bottom"),(F(!0),fe(Re,null,He(n.bottomContainerComponents,([c,u])=>(F(),Q(be(u),{ref_for:!0,ref:g=>n.setItemRef(g,c),key:c,style:ge(u.style),class:Pe(u.cssClass)},null,8,["style","class"]))),128))],512),ne(" \u589E\u52A0\u9ED8\u8BA4\u63D2\u69FD "),ie(n.$slots,"default")],4)},Nt.__scopeId="data-v-4d081e5c",Nt.__file="src/controls/layoutcontainer/layout.vue";var Tr=Ie({name:"RouterTransition",__name:"RouterTransitionAnimate",props:{enterActive:{type:String,required:!1,default:"animated fadeIn"},leaveActive:{type:String,required:!1,default:"animated fadeOut"}},setup:n=>(e,t)=>{const o=ut("router-view");return F(),Q(tt,null,{default:we(()=>[ht(o,null,{default:we(({Component:r,route:i})=>[ht(Oi,{appear:"","enter-active-class":e.enterActive,"leave-active-class":e.leaveActive},{default:we(()=>[(F(),Q(Io,null,[i.meta.keepAlive?(F(),Q(be(r),{key:i.name})):ne("v-if",!0)],1024)),i.meta.keepAlive?ne("v-if",!0):(F(),Q(be(r),{key:i.name}))]),_:2},1032,["enter-active-class","leave-active-class"])]),_:1})]),_:1})}});Tr.__file="src/controls/routertransition/RouterTransitionAnimate.vue";const Ve=new Map,nt=K(new Map);class ot{static addWindowPanel(e){Ve.set(e.id,e)}static removeWindowPanel(e){Ve.has(e)&&(Ve.delete(e),nt.value.delete(e))}static minimizeWindowPanel(e){Ve.has(e)&&nt.value.set(e,-1)}static openWindowPanel(e){Ve.has(e)&&nt.value.set(e,1)}}const vc=["src"],yc={key:1,class:"paneltitle"},wc={class:"dragPanelBar"},bc={class:"dragPanelContent"},_c={class:"drag-pointer-group"};var Bn=Ie({__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(n,{expose:e,emit:t}){const o=Lo(),r=n,i=t,s=K(),c=K(),u=je(()=>r.isDark),g=K({x:0,y:0}),S=250,C=100,N=K({width:0,height:0}),D=R=>{s.value&&(s.value.style.left=`${R.x}px`,s.value.style.top=`${R.y}px`)};Te(()=>g.value,R=>{D(R)});const M=R=>{s.value&&(s.value.style.width=`${R.width}px`,s.value.style.height=`${R.height}px`)};Te(()=>N.value,R=>{M(R)});const f={eventListenerController:null,startingEdges:null,newEdges:null,clickStart:null,mount:()=>{Object.entries(f.refs).forEach(([R,H])=>{H.value&&H.value.addEventListener("mousedown",X=>{f.mouseDown(X,R)})})},mouseDown:(R,H)=>{R.button==0&&(R.preventDefault(),f.startingEdges={left:g.value.x,top:g.value.y,right:g.value.x+N.value.width,bottom:g.value.y+N.value.height},f.newEdges={...f.startingEdges},f.clickStart={x:R.clientX,y:R.clientY},f.eventListenerController=new AbortController,document.addEventListener("mousemove",X=>{f.mouseMove(X,H)},{signal:f.eventListenerController.signal}),document.addEventListener("mouseup",X=>{f.mouseUp(X,H)},{signal:f.eventListenerController.signal}))},mouseMove:(R,H)=>{if(f.startingEdges!=null&&f.newEdges!=null&&f.clickStart!=null&&f.refs[H].value){if(R.preventDefault(),console.log("mouseMove",H),H.toLowerCase().includes("north")){f.newEdges.top=Math.max(f.startingEdges.top+R.clientY-f.clickStart.y,0);const X=f.newEdges.bottom-f.newEdges.top-C;X<0&&(f.newEdges.top+=X)}else H.toLowerCase().includes("south")&&(f.newEdges.bottom=Math.min(f.startingEdges.bottom+R.clientY-f.clickStart.y,document.body.clientHeight));if(H.toLowerCase().includes("west")){f.newEdges.left=Math.max(f.startingEdges.left+R.clientX-f.clickStart.x,0);const X=f.newEdges.right-f.newEdges.left-S;X<0&&(f.newEdges.left+=X)}else H.toLowerCase().includes("east")&&(f.newEdges.right=Math.min(f.startingEdges.right+R.clientX-f.clickStart.x,document.body.clientWidth));f.update()}},update:()=>{f.newEdges==null||f.startingEdges==null||(g.value={x:Math.max(f.newEdges.left,0),y:Math.max(f.newEdges.top,0)},N.value={width:Math.min(Math.max(f.newEdges.right-f.newEdges.left,S),document.body.clientWidth),height:Math.min(Math.max(f.newEdges.bottom-f.newEdges.top,C),document.body.clientHeight)})},mouseUp:(R,H)=>{R.button!=0||f.startingEdges==null||(console.log("mouseUp",H),R.preventDefault(),f.startingEdges=null,f.newEdges=null,f.clickStart=null,f.eventListenerController&&(f.eventListenerController.abort(),f.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)}},l={startingMouse:null,startingPosition:null,mouseDown:R=>{R.button==0&&(R.preventDefault(),console.log("mouseDown"),l.startingMouse={x:R.clientX,y:R.clientY},l.startingPosition=g.value,document.addEventListener("mousemove",l.mouseMove),document.addEventListener("mouseup",l.mouseUp))},mouseMove:R=>{!l.startingMouse||!l.startingPosition||(R.preventDefault(),g.value={x:Math.min(Math.max(l.startingPosition.x+R.clientX-l.startingMouse.x,0),document.body.clientWidth-N.value.width),y:Math.min(Math.max(l.startingPosition.y+R.clientY-l.startingMouse.y,0),document.body.clientHeight-N.value.height)})},mouseUp:R=>{R.button!=0||!l.startingMouse||!l.startingPosition||(R.preventDefault(),l.startingMouse=null,l.startingPosition=null,console.log("mouseUp"),document.removeEventListener("mousemove",l.mouseMove),document.removeEventListener("mouseup",l.mouseUp))}};function v(R){return{id:o,icon:r.icon,title:r.title,pid:r.pid,data:R??r.tag}}const m=je(()=>nt.value.get(o)!==-1),p=K(!1),y=K(!0);function L(){i("minimize",v()),ot.minimizeWindowPanel(o)}function A(){p.value=!p.value}function T(){i("close",v(!1)),ot.removeWindowPanel(o),y.value=!1}const z=je(()=>p.value?"heroicons-outline:square-2-stack":"ant-design:border-outlined"),W={id:o,isShow:m,close:T,open:function(){i("open",v(!0)),y.value=!0},showHidePanel:L};function O(R){if(dn(R))return R;{const H=Number(R);if(H==H)return H;if(R.endsWith("px")){const X=R.substring(0,R.length-2);return Number(X)}if(R.endsWith("%")){const X=R.substring(0,R.length-1);return Number(X)/100*document.body.clientWidth}return 300}}return e(W),Zt(()=>{(function(){let R=90;if(r.hasMin||(R-=30),r.hasMax||(R-=30),r.hasClose||(R-=30),he.setCssVar("--right-bar-width",R+"px",c.value),!c.value)return;const H=dn(r.titleHeight)?r.titleHeight+"px":r.titleHeight;c.value.style.height=H,c.value.style.lineHeight=H})(),function(){const R=v(W);ot.addWindowPanel(R),i("loaded",R)}(),g.value.x=O(r.left),g.value.y=O(r.top),D(g.value),N.value={width:O(r.nWidth),height:O(r.nHeight)},M(N.value),f.mount()}),ji(()=>{ot.removeWindowPanel(o)}),(R,H)=>(F(),Q(Eo,{appear:"","enter-active-class":"animated zoomIn","leave-active-class":"animated zoomOut"},{default:we(()=>[y.value?ko((F(),fe("div",{key:0,ref_key:"dragPanelRef",ref:s,class:Pe(["dragWindowPanel",{maxPanel:p.value,dragWindowPanel_dark:u.value}])},[J("div",{class:"dragPanelTitle",ref_key:"dragPanelTitleRef",ref:c,onMousedown:H[0]||(H[0]=(...X)=>l.mouseDown&&l.mouseDown(...X))},[ie(R.$slots,"title",{},()=>[r.icon?(F(),fe("img",{key:0,src:r.icon,width:"24",height:"24"},null,8,vc)):ne("v-if",!0),r.title?(F(),fe("span",yc,en(r.title),1)):ne("v-if",!0)]),J("div",wc,[n.hasMin?(F(),Q(tn(sn),{key:0,icon:"ant-design:minus-outlined",onClick:L})):ne("v-if",!0),n.hasMax?(F(),Q(tn(sn),{key:1,icon:z.value,onClick:A},null,8,["icon"])):ne("v-if",!0),n.hasClose?(F(),Q(tn(sn),{key:2,icon:"ant-design:close-outlined",onClick:T})):ne("v-if",!0)])],544),J("div",bc,[ie(R.$slots,"default")]),J("div",_c,[J("div",{class:"cursor-nw-resize",ref:f.refs.northWest},null,512),J("div",{class:"cursor-n-resize",ref:f.refs.north},null,512),J("div",{class:"cursor-ne-resize",ref:f.refs.northEast},null,512),J("div",{class:"cursor-w-resize",ref:f.refs.west},null,512),H[1]||(H[1]=J("span",{style:{"pointer-events":"all",visibility:"hidden"}},null,-1)),J("div",{class:"cursor-e-resize",ref:f.refs.east},null,512),J("div",{class:"cursor-sw-resize",ref:f.refs.southWest},null,512),J("div",{class:"cursor-s-resize",ref:f.refs.south},null,512),J("div",{class:"cursor-se-resize",ref:f.refs.southEast},null,512)])],2)),[[xo,m.value]]):ne("v-if",!0)]),_:3}))}});function Sc(n){const e=new on(new ke);return e.serialize(n),e.stream.toString()}function Cc(n){return n==null||n===""?n:new rn(new ke(n)).deserialize()}Bn.__scopeId="data-v-39ea9741",Bn.__file="src/controls/xwindow/XWindow.vue";class Qn{debug=!1;simple=!1;utc=!1;longType="number";dictType="object";nullType=void 0;static Instance=new Qn;textEncoder=new TextEncoder;textDecoder=new TextDecoder;constructor(){}encodeResponse(e,t={}){var o=new ke,r=new on(o,this.simple,this.utc),i=t;this.simple;var s=0;for(var c in i)s++;s>0&&(o.writeByte(72),r.serialize(i),r.reset()),e instanceof Error?(o.writeByte(69),r.serialize(this.debug&&e.stack?e.stack:e.message)):(o.writeByte(82),r.serialize(e)),o.writeByte(122);const u=o.takeBytes();return this.textDecoder.decode(u)}decodeRequest(e,t={}){const o=this.textEncoder.encode(e);if(o.length===0)return["~",[]];var r=new ke(o),i=new rn(r,!1);i.longType=this.longType,i.dictType=this.dictType;var s=r.readByte();if(console.log("tag",s),s===72){var c=i.deserialize(this.nullType);for(var u in c)t[u]=c[u];i.reset(),s=r.readByte()}switch(s){case 67:return[i.deserialize(String),this.decodeArguments(i)];case 122:return["~",[]];default:throw new Error(`Invalid request:\r
|
|
13
13
|
`+r.toString())}}decodeArguments(e){var t=e.stream;let o=[];if(t.readByte()===97){e.reset();var r=Xi.readCount(t);const s=new Array(r).fill(this.nullType);o=new Array(r),e.addReference(o);for(var i=0;i<r;++i)o[i]=e.deserialize(s[i]);t.readByte()}return o}encodeRequest(e,t,o={}){var r=new ke,i=new on(r,this.simple,this.utc),s=o;this.simple&&(s.simple=!0);var c=0;for(var u in s)c++;c>0&&(r.writeByte(72),i.serialize(s),i.reset()),r.writeByte(67),i.serialize(e),t.length>0&&(i.reset(),i.serialize(t)),r.writeByte(122);const g=r.takeBytes();return this.textDecoder.decode(g)}decodeResponse(e,t={}){const o=this.textEncoder.encode(e);var r=new ke(o),i=new rn(r,!1);i.longType=this.longType,i.dictType=this.dictType;var s=r.readByte();if(s===72){var c=i.deserialize();for(var u in c)t[u]=c[u];i.reset(),s=r.readByte()}switch(s){case 82:return t.simple&&(i.simple=!0),console.log(s,"9999999999"),i.deserialize();case 69:throw new Error(i.deserialize(String));case 122:return;default:throw new Error(`Invalid response:\r
|
|
14
|
-
`+r.toString())}}}const Bt=new Map,Wn=new Map;let Wt;const Ec={getDefaultClient(){if(Wt||(Wt=new Je(SysConfig.DefaultHproseAPI)),!Wt)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Wt},registerHprose(n,e){const t=Wn.get(n);if(!t){const o=new Je(e);Bt.set(n,o)}return t},getHprose:n=>Wn?.get(n),getProxyHprose:n=>Bt.get(n),unregisterHprose(n){Bt.get(n)&&(Wn.delete(n),Bt.delete(n))}},Un=5e3,Rr=36e5,Ue={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},On="access_token",kc=B.Config.ServiceURL.LoginAuthURL;function
|
|
14
|
+
`+r.toString())}}}const Bt=new Map,Wn=new Map;let Wt;const Ec={getDefaultClient(){if(Wt||(Wt=new Je(SysConfig.DefaultHproseAPI)),!Wt)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return Wt},registerHprose(n,e){const t=Wn.get(n);if(!t){const o=new Je(e);Bt.set(n,o)}return t},getHprose:n=>Wn?.get(n),getProxyHprose:n=>Bt.get(n),unregisterHprose(n){Bt.get(n)&&(Wn.delete(n),Bt.delete(n))}},Un=5e3,Rr=36e5,Ue={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},On="access_token",kc=B.Config.ServiceURL.LoginAuthURL;function jn(){const n=Fo();n&&Se(Ue.RefreshToken,kc,{refreshToken:n}).then(e=>{Hn(e.data)})}function Pr(){const n=Fe.getJsonObject(On);if(!n)return;const e=new Date().getTime(),t=new Date(n.expire).getTime()-e;t>0&&(t<=Un?jn():setTimeout(jn,t-Un))}function Hn(n){const e=new Date().getTime();let t=new Date(n.accessToken.expires).getTime()-e;if(t>=Rr?(t=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):t<-6e5&&(t=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),t>0){let o=De();o?(o.token=n.accessToken.tokenContent,o.expire=n.accessToken.expires,o.refresh=n.refreshToken.tokenContent):o={token:n.accessToken.tokenContent,expire:n.accessToken.expires,refresh:n.refreshToken.tokenContent},Fe.set(On,o,t/1e3),Pr()}else Fe.remove(On)}const Ut="Wm314243",Ot=B.Config.ServiceURL.LoginAuthURL;async function xc(n){const e={username:n.username,pwd:Ze.encryptToString(n.pwd,Ut)},t=(await Se(Ue.Login,Ot,e))?.data;return t&&(Hn(t.doubletoken),kt(!1)),t}function Ic(n){const e={oldpwd:Ze.encryptToString(n.oldpwd,Ut),newpwd:Ze.encryptToString(n.newpwd,Ut)};return Se(Ue.ChangeMyPwd,Ot,e)}function Tc(n){return Ze.encryptToString(n,Ut)}function Rc(){const n=De();n&&(Vo(Ue.Logout,Ot,{token:n.token,reftoken:n.refresh}),En())}function Pc(n){return Se(Ue.CheckToken,Ot,{token:n})}const qn="ROLE_SYSTEM_RIGHT",Fn=new bt("",sessionStorage);function Mr(){return Fn.get(qn)}function Xn(n){Fn.set(qn,n)}function zr(){Fn.remove(qn)}function Ge(n){if(n)for(let e=0;e<n.length;e++){const t=n[e];t.children&&t.children.length>0?(Ge(t.children),t.children.length===0&&(n.splice(e,1),e--)):t.selected||(n.splice(e,1),e--)}}function Ar(n,e,t="name"){n&&e&&n.forEach(o=>{const r=e.find(i=>i[t]===o[t]);r&&(o.children?r.children&&Ar(o.children,r.children,t):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function Dr(n,e,t="name"){n&&e&&n.forEach(o=>{const r=e.find(i=>i[t]===o[t]);r&&(o.children?r.children&&Dr(o.children,r.children,t):(!r.children||r.children.length===0)&&r.selected&&(o.selected=r.selected))})}function rt(n,e,t,o="name"){const r=n[t],i=e[t];r?i&&Dr(r,i,o):i&&(n[t]=i)}function Lr(n){if(n&&n.length>0){const e=n.length;let t,o=!1;if(e>0){o=Me(n[0]);const r=o?n[0]:JSON.parse(n[0]);if(e>1)for(let i=1;i<n.length;i++){const s=n[i],c=o?s:JSON.parse(s);rt(r,c,"routes","name"),rt(r,c,"widgetMenu","name"),rt(r,c,"widgets","id"),rt(r,c,"functions","id")}t=r}return t&&(Ge(t.routes),Ge(t.widgetMenu),Ge(t.widgets),Ge(t.functions)),t}}const Vn=[],Gn=[],Kn=[];function it(){return Mr()}async function Mc(n,e=!1){zr();const t=Ue.GetSystemRights,o=B.Config.ServiceURL.LoginAuthURL,r=await Se(t,o,{systemid:n});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(e){const s=JSON.parse(i[0]);return Xn(s),s}{const s=Lr(i);return Xn(s),s}}}function $r(n,e){const t={...n};return t.meta||(t.meta={}),e.index!=null&&(t.meta.index=e.index),e.title!=null&&(t.meta.title=e.title),n.children&&(t.children=[],e.children&&e.children.forEach(o=>{const r=n.children?.find(i=>i.path===o.path);if(r){const i=$r(r,o);i&&t.children?.push(i)}})),t}function zc(n,e=2){if(e===0)return n;const t=it();return t&&t.routes?(Kn.length>0||n.forEach(o=>{const r=t.routes?.find(i=>i.name===o.name);if(r){const i=$r(o,r);i&&Kn.push(i)}}),Kn):void 0}function Nr(n,e){const t={...n};return e.index!=null&&(t.index=e.index),n.children&&(t.children=[],e.children&&e.children.forEach(o=>{const r=n.children?.find(i=>i.name===o.name);if(r){const i=Nr(r,o);i&&t.children?.push(i)}})),t}function Ac(n,e=2){if(e===0)return n;const t=it();return t&&t.widgetMenu?(Gn.length>0||n.forEach(o=>{const r=t.widgetMenu?.find(i=>i.name===o.name);if(r){const i=Nr(o,r);i&&Gn.push(i)}}),Gn):void 0}function Dc(n,e=2){if(e===0)return n;const t=it();return t&&t.widgets?(Vn.length>0||n?.forEach(o=>{t.widgets?.find(r=>r.id===o.id)&&Vn.push(o)}),Vn):void 0}function Lc(n,e=2){if(e===0)return n;const t=it();return t?t.functions:void 0}export{ta as BigFileDownload,St as Download,ze as EnumColor,tr as FileUpload,tc as GetSignalRClient,B as Global,Ec as GlobalHprose,Ae as GlobalMitt,he as H5Tool,st as HproseClient,Qn as HproseRPCCodec,As as HttpDownload,No as JsonDownload,Nt as LayoutContainer,ce as LayoutContainerEnum,Ir as LayoutManager,Le as LockState,nt as MinWindowMap,na as ObjToUrlParams,an as Pane,Je as ProxyClient,Nn as RouterTransition,Tr as RouterTransitionAnimate,zs as SaveAs,Gi as Splitpanes,bt as Storage,wt as StringUtils,ic as StyleBlack,cc as StyleGrayblue,ac as StyleMetal,sc as StyleWhite,tt as SuspenseWithError,se as SysEvents,Un as TOKEN_REFRESH_TIME,Rr as TOKEN_VALID_TIMESPAN,Ue as USER_TOKEN_API,$t as VWindow,Ra as WaterMark,kr as WindowResizeEvent,lc as WindowType,Ve as WindowsMap,Bn as XWindow,ot as XWindowManager,Ze as XXTEA,Ms as calculateBestTextColor,Ic as changeMyPWD,Pr as checkDoRefreshToken,Pc as checkToken,En as clearLocalToken,zr as clearRight,Ts as colorIsDark,Fs as createFileUpload,Rs as darken,ar as deepMerge,Bo as delay,Cc as deserialize,jn as doRefreshToken,kt as doSetLock,cr as exportSystemRights,Ls as get,it as getCurrentSystemRight,Ns as getData,Tc as getEncryptPWD,Lc as getFunctions,Ss as getHexColor,De as getLocalToken,Ks as getLockState,Es as getLongHexColor,nr as getProxyClient,Cs as getRGBColor,xs as getRGBColorFromHSLA,Fo as getRefreshToken,Mr as getRight,zc as getRoutes,Mc as getSystemRoleRight,Dc as getWidgetConfig,Ac as getWidgetMenus,Ge as handleNodes,vn as hexToRGB,Vs as init,Gs as initDefaultProxyClient,ue as is,fn as isArray,rs as isAsyncFunction,ss as isBoolean,as as isClient,os as isDate,zo as isDef,ls as isElement,ds as isEmpty,ks as isEnumColor,fs as isError,mt as isFunction,_t as isHexColor,hs as isImageDom,vs as isMap,hn as isNull,ts as isNullAndUnDef,ns as isNullOrUnDef,dn as isNumber,Me as isObjectX,is as isPromise,us as isServer,vt as isString,ms as isSymbol,un as isUnDef,ys as isValidURL,gs as isWeakMap,ps as isWeakSet,cs as isWindow,Xs as jquery,Ps as lighten,xc as login,Rc as logout,Lr as mergeFilterRoleSysRight,Ar as mergeNodes,rt as mergeNodesAll,_s as newGuid,Js as onLockListener,$s as post,Se as requestGet,Xo as requestPost,Vo as requestPostBody,Is as rgbToHex,Sc as serialize,Hn as setLocalToken,Xn as setRight,Ds as sleep,bs as storage,Fe as storageHelper,Ys as unLockListener,Lo as uuid,ca as verifiyNumberInteger,va as verifyAccount,ha as verifyAndSpace,Ia as verifyCarNum,la as verifyCnAndSpace,Sa as verifyEmail,ua as verifyEnAndSpace,Ea as verifyFullName,_a as verifyIPAddress,Ca as verifyIdCard,pa as verifyNumberCnUppercase,da as verifyNumberComma,zn as verifyNumberIntegerAndFloat,sa as verifyNumberPercentage,aa as verifyNumberPercentageFloat,ya as verifyPassword,wa as verifyPasswordPowerful,ba as verifyPasswordStrength,ga as verifyPhone,ka as verifyPostalCode,ma as verifyTelPhone,fa as verifyTextColor,xa as verifyUrl,ra as writeIconifyList,ia as writeSysRoleRight};
|