xframelib 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  基于 VUE3+Hprose+Typescript 的前端框架
4
4
 
5
+ - v0.7.2 解决v0.7.0的deepMerge方法存在复制对象的BUG。
5
6
  - v0.7.0 修改requestPost无法使用FormData参数;修改deepMerge方法;修改isObjectX方法;更新rollup-plugin-scss应用版本。
6
7
  - v0.6.9 默认引入loglevel,为Global增加Logger()方法,使用例如:Global.Logger().warn('123')。
7
8
  - v0.6.8 解决Axios 0.x升级为1.x后,序列化时带来的AxiosError: options must be an object错误
package/dist/index.cjs CHANGED
@@ -10,7 +10,7 @@
10
10
  >
11
11
  <path d="M6.34292 7.75734L4.92871 9.17155L11.9998 16.2426L19.0708 9.17158L17.6566 7.75737L11.9998 13.4142L6.34292 7.75734Z"/>
12
12
  </svg>
13
- `}}});const Di={class:"vcp__header-title"},Ni={key:0,class:"vcp__header-icon"},Ui=["innerHTML"],Oi={key:0,ref:"bodyRef",class:"vcp__body"},ji={ref:"bodyContentRef",class:"vcp__body-content"};function Dt(e){return window.TouchEvent&&e instanceof TouchEvent}He.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("section",{ref:"panelRef",class:w.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[w.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...l)=>e.toggle&&e.toggle(...l))},[w.createElementVNode("div",Di,[w.renderSlot(e.$slots,"title")]),e.body.hasContent?(w.openBlock(),w.createElementBlock("div",Ni,[w.renderSlot(e.$slots,"icon",{},()=>[w.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,Ui)])])):w.createCommentVNode("v-if",!0)]),w.createVNode(w.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:w.withCtx(()=>[e.isExpanded?(w.openBlock(),w.createElementBlock("div",Oi,[w.createElementVNode("div",ji,[w.renderSlot(e.$slots,"content")],512)],512)):w.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},He.__scopeId="data-v-08c94cf8",He.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class J{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Kt(this.clientX,this.clientY)}static bindDown(t,n,o,i=!1){const r=f=>{n(new J(f))},l=f=>{f.touches.length===1&&n(new J(f)),f.touches.length>1&&o&&o(new J(f))};return t.addEventListener("mousedown",r,i),t.addEventListener("touchstart",l,i),()=>{t.removeEventListener("mousedown",r,i),t.removeEventListener("touchstart",l,i)}}static bindMove(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===1&&n(new J(l))};return t.addEventListener("mousemove",i,o),t.addEventListener("touchmove",r,o),()=>{t.removeEventListener("mousemove",i,o),t.removeEventListener("touchmove",r,o)}}static bindUp(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===0&&n(new J(l))};return t.addEventListener("mouseup",i,o),t.addEventListener("touchend",r,o),()=>{t.removeEventListener("mouseup",i,o),t.removeEventListener("touchend",r,o)}}originalEvent({mouse:t,touch:n}){Dt(this.e)?n&&n(this.e):t&&t(this.e)}}class Kt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Kt(this.x,this.y)}}class Fi{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=J.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class $i{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=Ge(this._group),o=Ge(t);n.splice(n.indexOf(this),1),o.push(this),Zn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(Ge(this._group)),Zn()}}const qe=new Map;function Ge(e){return qe.has(e)||qe.set(e,[]),qe.get(e)}function Jn(e,t){return e>t?-Jn(t,e):e<0&&t>=0?1:e-t}function Zn(){let e=0;for(const t of function(n){const o=[];return n.forEach((i,r)=>o.push(r)),o}(qe).sort(Jn))for(const n of Ge(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Nt(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Ve(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ve(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,i=t.top,r=t.left;return{width:n,height:o,top:i,left:r,bottom:i+o,right:r+n}}class Wi{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=Qn.map(v=>new v(t,this));const{width:o,height:i}=Nt(t),r=n.maxWidth||window.innerWidth,l=n.maxHeight||window.innerHeight;let f=!1;(o<n.minWidth||o>r)&&(t.style.width=`${eo(o,n.minWidth,r)}px`,f=!0),(i<n.minHeight||i>l)&&(t.style.height=`${eo(i,n.minHeight,l)}px`,f=!0),f&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const Qn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=J.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:o,width:i,height:r}=Ve(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=i,this.height0=r,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:i}=Ve(this.container),r=this.helper.options,l=r.maxWidth||window.innerWidth,f=r.maxHeight||window.innerHeight;this.minLeft=Math.max(o-l,0),this.maxLeft=o-r.minWidth,this.minRight=t+r.minWidth,this.maxRight=Math.min(t+l,window.innerWidth),this.minTop=Math.max(i-f,0),this.maxTop=i-r.minHeight,this.minBottom=n+r.minHeight,this.maxBottom=Math.min(n+f,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:o,top:i,right:r,bottom:l}=Ve(this.container),f=this.helper.options;!f||(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${f.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):r<this.minRight?this.container.style.width=`${f.minWidth}px`:r>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),i<this.minTop?(this.container.style.height=n+i-this.minTop+"px",this.container.style.top=`${this.minTop}px`):i>this.maxTop?(this.container.style.height=`${f.minHeight}px`,this.container.style.top=`${this.maxTop}px`):l<this.minBottom?this.container.style.height=`${f.minHeight}px`:l>this.maxBottom&&(this.container.style.height=this.maxBottom-i+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function eo(e,t,n){return e<t?t:e>n?n:e}Qn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Xe=w.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=w.ref(!1),n=w.ref(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const i=J.bindUp(document,()=>{n.value=!1,i()})}}}});const Hi=["disabled"];Xe.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{class:"btn",style:w.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=l=>e.hover=!0),onMouseleave:t[1]||(t[1]=l=>e.hover=!1),onMousedown:t[2]||(t[2]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onTouchstart:t[3]||(t[3]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onMouseup:t[4]||(t[4]=(...l)=>e.mouseup&&e.mouseup(...l)),onTouchend:t[5]||(t[5]=(...l)=>e.mouseup&&e.mouseup(...l)),disabled:e.disabled},[w.renderSlot(e.$slots,"default")],44,Hi)},Xe.__scopeId="data-v-71662210",Xe.__file="src/controls/vuewindow/window/Button.vue";const Ut=new Set;function to(e){return e!==null?parseFloat(e):0}function Ke(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(to).reduce((i,r)=>i+r)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(to).reduce((i,r)=>i+r));return{width:n,height:o}}class no{width;height;constructor(t,n){this.width=t,this.height=n}}function qi(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function Gi(e,t,n,o){const i=e-n,r=t-o;return i*i+r*r}window.addEventListener("resize",e=>{Ut.forEach(t=>{t&&Me(t.fixPosition)&&t.fixPosition()})});const Ye=[];var Je=w.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:Xe},setup(e,{emit:t}){const n=w.getCurrentInstance();if(!n)return;const{proxy:o}=n;let i=0,r,l,f;const v=w.ref(e.isOpen),S=()=>{Ye.push(o),f=new $i(e.zGroup,E),e.isOpen&&function(R){R&&(w.nextTick(()=>{i++==0&&(d(o),function(){const B=k.value,{width:U,height:F}=Nt(B);let j,H;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,H=e.top;else{const Z=e.positionHint||"auto";switch(Z){case"auto":{let V=20,X=50,q=0;do{if(Ye.every(ne=>{if(!ne.isOpen||o==ne)return!0;const ke=qi(ne);if(ke==null)return!0;const{left:ot,top:te}=ke;return Gi(ot,te,V,X)>16}))break;V=(V+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++q<100);j=V,H=X}break;case"center":j=(window.innerWidth-U)/2,H=(window.innerHeight-F)/2,console.log(j,H,window.innerWidth,window.innerHeight,"111111");break;default:try{const V=Z.split("/").map(Number);if(V.length!=2)throw null;const[X,q]=V;if(!isFinite(X)||!isFinite(q))throw null;j=X>=0?X:window.innerWidth-U+X,H=q>=0?q:window.innerHeight-F+q}catch{throw new Error(`invalid position string: ${Z}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${H}px`)}()),e.resizable&&h(),T(),r=new Fi(A.value,k.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Nt(A.value);l=new Wi(k.value,{onResize:()=>h(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&I())}(!0),Ut.add(o)};function E(R){C.value.zIndex=`${R}`}const k=w.ref(null),A=w.ref(null),D=w.ref(null);function I(){f.raise(),t("activate")}const C=w.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=w.computed(()=>e.windowStyle.titlebar),p=w.computed(()=>{const R={...e.windowStyle.content};return e.resizable?R.padding="0":e.padding!=null&&(R.padding=`${e.padding}px`),e.isScrollable&&(R.overflow="auto"),R});function d(R){const{width:B,height:U,top:F,left:j}=R,H=k;if(H&&B!=null&&(H.value.style.width=`${B}px`),U!=null){const Z=A.value;if(Z){const V=Ke(Z).height;H.value.style.height=`${U+V}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&F!=null&&(H.value.style.top=`${F}px`)}function h(R=!0){const B=k.value,U=A.value,F=D.value;if(F&&B&&U){const{width:j,height:H}=Ke(F),{width:Z,height:V}=Ke(B),X=Ke(U).height,q=Z-(F.offsetWidth-j),ne=V-X-(F.offsetHeight-H);F.style.width=`${q}px`,F.style.height=`${ne}px`,g(),t("resize",new no(q,ne)),R&&(t("update:width",q),t("update:height",ne))}}function g(){const R=k.value;if(R){const B=R.getBoundingClientRect();B.left<0&&(C.value.left="0px"),B.top<0&&(C.value.top="0px"),B.right>window.innerWidth&&(C.value.left=window.innerWidth-B.width+"px"),B.bottom>window.innerHeight&&(C.value.top=window.innerHeight-B.height+"px")}}function T(R=!0){g();const B=k.value;if(B){const{left:U,top:F}=B.getBoundingClientRect();R&&(t("update:left",U),t("update:top",F))}}return w.watch(()=>e.isOpen,R=>{v.value=R}),w.watch(()=>e.zGroup,R=>{f.group=R}),w.watch(()=>e.width,R=>{d({width:R}),h(!1)}),w.watch(()=>e.height,R=>{d({height:R}),h(!1)}),w.onMounted(()=>{S()}),w.onBeforeUnmount(()=>{Ut.delete(this),f.unregister(),l&&l.teardown(),r&&r.teardown(),Ye.splice(Ye.indexOf(o),1)}),{isOpen:v,windowEl:k,titlebar:A,content:D,activate:I,styleWindow:C,styleTitlebar:u,styleContent:p,closeButtonClick:function(){v.value=!1,t("closebuttonclick")},fixPosition:g}}});const Vi={class:"title"};var oo;Je.render=function(e,t,n,o,i,r){const l=w.resolveComponent("myButton");return w.openBlock(),w.createBlock(w.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=f=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=f=>e.$emit("open")),persisted:""},{default:w.withCtx(()=>[w.withDirectives(w.createElementVNode("div",{class:"window",style:w.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...f)=>e.activate&&e.activate(...f)),onTouchstart:t[1]||(t[1]=(...f)=>e.activate&&e.activate(...f))},[w.createElementVNode("div",{class:"titlebar",style:w.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[w.createElementVNode("div",Vi,[e.$slots.title?w.renderSlot(e.$slots,"title",{key:0}):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[w.createTextVNode(w.toDisplayString(e.title),1)],64))]),e.closeButton?(w.openBlock(),w.createBlock(l,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:w.withCtx(()=>[w.createTextVNode("\xD7")]),_:1},8,["windowStyle","onClick"])):w.createCommentVNode("v-if",!0)],4),w.createElementVNode("div",{class:"content",style:w.normalizeStyle(e.styleContent),ref:"content"},[w.renderSlot(e.$slots,"default")],4)],36),[[w.vShow,e.isOpen]])]),_:3})},Je.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(oo||(oo={}));const Xi=Je;exports.LayoutContainerEnum=void 0,function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"}(exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}));class io{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(t,n,o){this.layoutState=t,this._LayoutID=o,n.forEach(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 r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return le(t)?n=t:Le(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=w.markRaw(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),w.nextTick().then(()=>{N.EventBus.emit(Q.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const i of o)if(this.isWidgetLoaded(i.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const r=this.preConditionMap.get(t);if(r)for(const l of r)this.unloadWidget(l.id)}const o=this.getContainerComponents(n.container),i=o.value.get(t);i&&i.unmounted&&i.unmounted(),o.value.delete(t),this.widgetsLoadedSet.delete(t),N.EventBus.emit(Q.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&N.EventBus.emit(Q.WidgetVisibleChanged,{id:t,layoutID:this._LayoutID,name:o.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetConfig.find(o=>o.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=w.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Ze=w.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const i=e.layoutID,r=w.ref(e.enableRouterView);w.watch(()=>e.enableRouterView,()=>{r.value=e.enableRouterView});const l=w.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),f=new io(l,e.widgetConfig,i),v=I(exports.LayoutContainerEnum.top),S=I(exports.LayoutContainerEnum.centerBack),E=I(exports.LayoutContainerEnum.centerFront),k=I(exports.LayoutContainerEnum.left),A=I(exports.LayoutContainerEnum.right),D=I(exports.LayoutContainerEnum.bottom);function I(u){return f?.getContainerComponents(u)}const C=w.computed(()=>e.layoutStyle);return w.onMounted(()=>{f&&(f.preloadWidgets(),i===void 0&&(N.LayoutManager=f),o("containerLoaded",{layoutID:i,layoutManager:f}))}),{...w.toRefs(l),topContainerComponents:v,centerbackComponents:S,centerfrontComponents:E,leftContainerComponents:k,rightContainerComponents:A,bottomContainerComponents:D,containerStyle:C,isEnableRouterView:r}}});const Ki={ref:"topContainer",class:"topContainer"},Yi={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},Ji={ref:"centerBackContainer",class:"centerdiv backContainer"},Zi={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Qi={ref:"leftContainer",class:"leftContainer"},er={ref:"rightContainer",class:"rightContainer"},tr={ref:"bottomContainer",class:"bottomContainer"};Ze.render=function(e,t,n,o,i,r){const l=w.resolveComponent("router-view");return w.openBlock(),w.createElementBlock("div",{class:"layoutContainer",style:w.normalizeStyle(e.containerStyle)},[w.createElementVNode("div",Ki,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.topContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",null,[w.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(w.openBlock(),w.createElementBlock("div",Yi,[w.createVNode(l,null,{default:w.withCtx(({Component:f})=>[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(f)))]),_:1})],512)):w.createCommentVNode("v-if",!0),w.createCommentVNode(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Ji,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerbackComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createCommentVNode(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Zi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerfrontComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",Qi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.leftContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",er,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.rightContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)]),w.createElementVNode("div",tr,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.bottomContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)],4)},Ze.__scopeId="data-v-4d081e5c",Ze.__file="src/controls/layoutcontainer/layout.vue";const Qe=new Map,Ot=new Map;let et;const nr={getDefaultClient(){if(et||(et=new we(SysConfig.DefaultHproseAPI)),!et)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return et},registerHprose(e,t){const n=Ot.get(e);if(!n){const o=new we(t);Qe.set(e,o)}return n},getHprose:e=>Ot?.get(e),getProxyHprose:e=>Qe.get(e),unregisterHprose(e){Qe.get(e)&&(Ot.delete(e),Qe.delete(e))}},pe={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},jt="access_token",or=N.Config.ServiceURL.LoginAuthURL;function Ft(){const e=Rn();e&&re(pe.RefreshToken,or,{refreshToken:e}).then(t=>{$t(t.data)})}function ro(){const e=ie.getJsonObject(jt);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Ft():setTimeout(Ft,n-5e3))}function $t(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=de();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},ie.set(jt,o,n/1e3),ro()}else ie.remove(jt)}const tt="Wm314243",nt=N.Config.ServiceURL.LoginAuthURL,Wt="ROLE_SYSTEM_RIGHT",Ht=new Be("",sessionStorage);function so(){return Ht.get(Wt)}function qt(e){Ht.set(Wt,e)}function ao(){Ht.remove(Wt)}function ve(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ve(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function co(e,t,n="name"){e&&t&&e.forEach(o=>{const i=t.find(r=>r[n]===o[n]);i&&(o.children?i.children&&co(o.children,i.children,n):(!i.children||i.children.length===0)&&i.selected&&(o.selected=i.selected))})}function Ce(e,t,n,o="name"){const i=e[n],r=t[n];i?r&&co(i,r,o):r&&(e[n]=r)}function uo(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=le(e[0]);const i=o?e[0]:JSON.parse(e[0]);if(t>1)for(let r=1;r<e.length;r++){const l=e[r],f=o?l:JSON.parse(l);Ce(i,f,"routes","name"),Ce(i,f,"widgetMenu","name"),Ce(i,f,"widgets","id"),Ce(i,f,"functions","id")}n=i}return n&&(ve(n.routes),ve(n.widgetMenu),ve(n.widgets),ve(n.functions)),n}}const Gt=[],Vt=[],Xt=[];function xe(){return so()}function lo(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.path===o.path);if(i){const r=lo(i,o);r&&n.children?.push(r)}})),n}function ho(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.name===o.name);if(i){const r=ho(i,o);r&&n.children?.push(r)}})),n}exports.BigFileDownload=class{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,n=3,o=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=xt(),this.initIndexDB(),o>=3&&(this.cacheSize=o),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="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const o=await re(t,e,n);let i=null;return o&&o.status===200&&(i=o.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=Ue.createInstance({name:this.fileID,driver:Ue.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(),Ue.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 n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const o=N.Axios.CancelToken;this.cancelSource=o.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let f=0;for(let v=0;v<this.totalChunks;v++){if(this.keys&&this.keys?.indexOf(v.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const S=v*this.chunkByteSize;let E=S+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const k={range:`bytes=${S}-${E}`};for(;f>=l;)await this.sleep(200);const A=v.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${v+1}/${this.totalChunks}`),f++,re(n,t,i,k,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async D=>{const I=D.data;f--,await this.currentDB?.setItem(A,I),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const C=parseInt(A)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${C}/${this.totalChunks}`),this.savefile()}).catch(D=>{f--;const I=parseInt(A)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${I}\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=Bi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const o=n.toString();let i=await this.currentDB?.getItem(o);if(i||(i=await this.currentDB?.getItem(o)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let r=new Response(i).body;if(r===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const l=r.getReader();for(;;){const{done:f,value:v}=await l.read();if(f)break;await e.write(v)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Ue.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Pe,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((i,r)=>{if(o){const l=document.createElement("a");if(l.href=e,l.target=t,l.download!==void 0&&(l.download=n||Cn(e)),document.createEvent){const f=document.createEvent("MouseEvents");return f.initEvent("click",!0,!0),l.dispatchEvent(f),i(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),i(!0)}{const l=document.createElement("canvas"),f=document.createElement("img");f.setAttribute("crossOrigin","Anonymous"),f.src=e,f.onload=v=>{l.width=f.width,l.height=f.height,l.getContext("2d").drawImage(f,0,0,f.width,f.height),l.toBlob(S=>{if(S){const E=document.createElement("a");E.href=window.URL.createObjectURL(S),E.download=Cn(e),E.click(),URL.revokeObjectURL(E.href),i(!0)}},"image/jpeg")},f.onerror=v=>r(v)}})},exports.FileUpload=Pn,exports.Global=N,exports.GlobalHprose=nr,exports.GlobalMitt=ge,exports.H5Tool=ee,exports.HproseClient=Ee,exports.HttpDownload=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){Pe(o.data,n)}).catch(o=>{console.warn(o),ge.emit(Q.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=Sn,exports.LayoutContainer=Ze,exports.LayoutManager=io,exports.ObjToUrlParams=function(e,t){let n="",o="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o},exports.Pane=ft,exports.ProxyClient=we,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),i=document.createElement("a");i.href=n.createObjectURL(o),i.download=t,i.click(),n.revokeObjectURL(i.href)},exports.Splitpanes=pi,exports.Storage=Be,exports.StringUtils=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={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)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=Q,exports.TOKEN_REFRESH_TIME=5e3,exports.TOKEN_VALID_TIMESPAN=36e5,exports.USER_TOKEN_API=pe,exports.VCollapsiblePanel=He,exports.VCollapsiblePanelGroup=We,exports.VWindow=Je,exports.WindowResizeEvent=no,exports.WindowType=Xi,exports.XXTEA=Se,exports.calculateBestTextColor=function(e){return function(t,n){return(bn(~~t[0],~~t[1],~~t[2])+.05)/(bn(n[0],n[1],n[2])+.05)}(bt(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"},exports.changeMyPWD=function(e){const t={oldpwd:Se.encryptToString(e.oldpwd,tt),newpwd:Se.encryptToString(e.newpwd,tt)};return re(pe.ChangeMyPwd,nt,t)},exports.checkDoRefreshToken=ro,exports.checkToken=function(e){return re(pe.CheckToken,nt,{token:e})},exports.clearLocalToken=kt,exports.clearRight=ao,exports.colorIsDark=function(e){if(!Te(e))return;const[t,n,o]=bt(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(i=>Number(i));return .299*t+.578*n+.114*o<192},exports.createFileUpload=e=>new Pn(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ct(e.substring(0,2),t)}${Ct(e.substring(2,4),t)}${Ct(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let o;for(o in n)le(n[o])?e(t[o],n[o]):t[o]=n[o];return t},exports.delay=xn,exports.doRefreshToken=Ft,exports.exportSystemRights=Fn,exports.get=function(e,t){return re(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return N.Axios?.get(e,{params:t}).catch(function(n){Ne(n,e,"","\u5916\u90E8Get")})},exports.getEncryptPWD=function(e){return Se.encryptToString(e,tt)},exports.getFunctions=function(e,t=2){if(t===0)return e;const n=xe();return n?n.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),r=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)},exports.getLocalToken=de,exports.getLockState=function(){return ie.get(Lt,!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const i=t.slice(n,n+1);o+=i.concat(i)}return o}return t},exports.getProxyClient=Dn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Te(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const r=t.slice(o,o+1);n+=r.concat(r)}t=n}var i=[];for(o=1;o<7;o+=2)i.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+i.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(e){if(!!e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!t){var n,o,i,r=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),f=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(l===0)n=o=i=f;else{var v=f<=.5?f*(l+1):f+l-f*l,S=2*f-v;n=wt(S,v,r+1/3),o=wt(S,v,r),i=wt(S,v,r-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=Rn,exports.getRight=so,exports.getRoutes=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.routes?(Xt.length>0||e.forEach(o=>{const i=n.routes?.find(r=>r.name===o.name);if(i){const r=lo(o,i);r&&Xt.push(r)}}),Xt):void 0},exports.getSystemRoleRight=async function(e,t=!1){ao();const n=pe.GetSystemRights,o=N.Config.ServiceURL.LoginAuthURL,i=await re(n,o,{systemid:e});if(!i||!i.data)return void N.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const r=i.data;if(r&&r.length>0){if(t){const l=JSON.parse(r[0]);return qt(l),l}{const l=uo(r);return qt(l),l}}},exports.getWidgetConfig=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgets?(Gt.length>0||e?.forEach(o=>{n.widgets?.find(i=>i.id===o.id)&&Gt.push(o)}),Gt):void 0},exports.getWidgetMenus=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgetMenu?(Vt.length>0||e.forEach(o=>{const i=n.widgetMenu?.find(r=>r.name===o.name);if(i){const r=ho(o,i);r&&Vt.push(r)}}),Vt):void 0},exports.handleNodes=ve,exports.hexToRGB=bt,exports.init=function(e,t,n){!N.Config.DefaultHproseAPI&&N.Config.ServiceURL&&(N.Config.DefaultHproseAPI=N.Config.ServiceURL.DefaultHproseAPI),N.Config.DefaultHproseAPI&&_e.isNotEmpty(N.Config.DefaultHproseAPI)&&(N.DefaultProxyClient=new we(N.Config.DefaultHproseAPI));const o=N.Config.UI.GrayMode;o&&ee.setGrayMode(o);const i=new Li(e,N.EventBus);N.Message=i,N.SystemID=t,N.SystemGroup=n,N.EventBus.on(Q.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.AxiosRequestErrorEvent,r=>{const l=`Http\u8BF7\u6C42'${r.code}'\u9519\u8BEF: ${r.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.CommonWarnEvent,r=>{i.warn(r)})},exports.initDefaultProxyClient=function(e){const t=Dn(e);return t&&(N.DefaultProxyClient=t),t},exports.is=K,exports.isArray=gt,exports.isAsyncFunction=function(e){return K(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||K(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return K(e,"Date")},exports.isDef=wn,exports.isElement=e=>le(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Le(e)||gt(e)?e.length===0:!!le(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return K(e,"Error")},exports.isFunction=Me,exports.isHexColor=Te,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return K(e,"Map")},exports.isNull=mt,exports.isNullAndUnDef=function(e){return pt(e)&&mt(e)},exports.isNullOrUnDef=function(e){return pt(e)||mt(e)},exports.isNumber=function(e){return K(e,"Number")},exports.isObjectX=le,exports.isPromise=function(e){return K(e,"Promise")&&le(e)&&Me(e.then)&&Me(e.catch)},exports.isServer=gi,exports.isString=Le,exports.isSymbol=function(e){return K(e,"Symbol")},exports.isUnDef=pt,exports.isValidURL=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e),exports.isWeakMap=function(e){return K(e,"WeakMap")},exports.isWeakSet=function(e){return K(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&K(e,"Window"),exports.jquery=Mi,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${St(e.substring(0,2),t)}${St(e.substring(2,4),t)}${St(e.substring(4,6),t)}`},exports.login=async function(e){const t={username:e.username,pwd:Se.encryptToString(e.pwd,tt)},n=(await re(pe.Login,nt,t))?.data;return n&&$t(n.doubletoken),n},exports.logout=function(){const e=de();e&&(Ln(pe.Logout,nt,{token:e.token,reftoken:e.refresh}),kt())},exports.mergeFilterRoleSysRight=uo,exports.mergeNodes=function e(t,n,o="name"){t&&n&&t.forEach(i=>{const r=n.find(l=>l[o]===i[o]);r&&(i.children?r.children&&e(i.children,r.children,o):(!r.children||r.children.length===0)&&r.selected&&(i.selected=r.selected))})},exports.mergeNodesAll=Ce,exports.newGuid=function(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t},exports.onLockListener=function(){Bt(),document.addEventListener("mousedown",Bt)},exports.post=function(e,t){return Mn(e,void 0,t)},exports.requestGet=re,exports.requestPost=Mn,exports.requestPostBody=Ln,exports.rgbToHex=function(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o},exports.setLocalToken=$t,exports.setRight=qt,exports.sleep=function(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${xn}\u6BEB\u79D2`)},exports.storage=yi,exports.storageHelper=ie,exports.unLockListener=function(){document.removeEventListener("mousedown",Bt)},exports.uuid=Ae,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",o=`const iconlist={
13
+ `}}});const Di={class:"vcp__header-title"},Ni={key:0,class:"vcp__header-icon"},Ui=["innerHTML"],Oi={key:0,ref:"bodyRef",class:"vcp__body"},ji={ref:"bodyContentRef",class:"vcp__body-content"};function Dt(e){return window.TouchEvent&&e instanceof TouchEvent}He.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("section",{ref:"panelRef",class:w.normalizeClass(["vcp",{"vcp--expanded":e.isExpanded,"vcp--expandable":e.body.hasContent}])},[w.createElementVNode("header",{class:"vcp__header",onClick:t[0]||(t[0]=(...l)=>e.toggle&&e.toggle(...l))},[w.createElementVNode("div",Di,[w.renderSlot(e.$slots,"title")]),e.body.hasContent?(w.openBlock(),w.createElementBlock("div",Ni,[w.renderSlot(e.$slots,"icon",{},()=>[w.createElementVNode("span",{innerHTML:e.toggleIcon},null,8,Ui)])])):w.createCommentVNode("v-if",!0)]),w.createVNode(w.Transition,{"data-key":e.body.dataKey,name:"slide",onBeforeEnter:e.collapse,onEnter:e.expand,onBeforeLeave:e.expand,onLeave:e.collapse},{default:w.withCtx(()=>[e.isExpanded?(w.openBlock(),w.createElementBlock("div",Oi,[w.createElementVNode("div",ji,[w.renderSlot(e.$slots,"content")],512)],512)):w.createCommentVNode("v-if",!0)]),_:3},8,["data-key","onBeforeEnter","onEnter","onBeforeLeave","onLeave"])],2)},He.__scopeId="data-v-08c94cf8",He.__file="src/controls/collapsepanel/VCollapsiblePanel.vue";class J{e;constructor(t){this.e=t}stopPropagation(){this.e.stopPropagation()}preventDefault(){this.e.preventDefault()}get clientX(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientX:this.e.clientX}get clientY(){return Dt(this.e)?(this.e.type==="touchend"?this.e.changedTouches:this.e.touches).item(0).clientY:this.e.clientY}get clientCoord(){return new Kt(this.clientX,this.clientY)}static bindDown(t,n,o,i=!1){const r=f=>{n(new J(f))},l=f=>{f.touches.length===1&&n(new J(f)),f.touches.length>1&&o&&o(new J(f))};return t.addEventListener("mousedown",r,i),t.addEventListener("touchstart",l,i),()=>{t.removeEventListener("mousedown",r,i),t.removeEventListener("touchstart",l,i)}}static bindMove(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===1&&n(new J(l))};return t.addEventListener("mousemove",i,o),t.addEventListener("touchmove",r,o),()=>{t.removeEventListener("mousemove",i,o),t.removeEventListener("touchmove",r,o)}}static bindUp(t,n,o=!1){const i=l=>{n(new J(l))},r=l=>{l.touches.length===0&&n(new J(l))};return t.addEventListener("mouseup",i,o),t.addEventListener("touchend",r,o),()=>{t.removeEventListener("mouseup",i,o),t.removeEventListener("touchend",r,o)}}originalEvent({mouse:t,touch:n}){Dt(this.e)?n&&n(this.e):t&&t(this.e)}}class Kt{x;y;constructor(t,n){this.x=t,this.y=n}clone(){return new Kt(this.x,this.y)}}class Fi{handle;container;options;unbindDown;unbindMove;unbindUp;constructor(t,n,o={}){this.handle=t,this.container=n,this.options=o,t&&(this.unbindDown=J.bindDown(t,this.mousedown),t.classList.add("draggable-handle"))}teardown(){this.handle?.classList.remove("draggable-handle"),this.unbindDown&&this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove()}offsetX;offsetY;mousedown=t=>{if(t.preventDefault(),this.handle){const{left:n,top:o}=this.handle.getBoundingClientRect();this.offsetX=t.clientX-n,this.offsetY=t.clientY-o}this.options.onMoveStart&&this.options.onMoveStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};mousemove=t=>{this.container&&(this.container.style.left=t.clientX-this.offsetX+"px",this.container.style.top=t.clientY-this.offsetY+"px"),this.options.onMove&&this.options.onMove()};mouseup=t=>{this.options.onMoveEnd&&this.options.onMoveEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0}}class $i{_group;onChange;zIndex;constructor(t,n){this._group=t,this.onChange=n,this.a(o=>o.push(this))}set group(t){this._group=t;const n=Ge(this._group),o=Ge(t);n.splice(n.indexOf(this),1),o.push(this),Zn()}get group(){return this._group}unregister(){this.a(t=>t.splice(t.indexOf(this),1))}raise(){this.a(t=>{t.splice(t.indexOf(this),1),t.push(this)})}a(t){t(Ge(this._group)),Zn()}}const qe=new Map;function Ge(e){return qe.has(e)||qe.set(e,[]),qe.get(e)}function Jn(e,t){return e>t?-Jn(t,e):e<0&&t>=0?1:e-t}function Zn(){let e=0;for(const t of function(n){const o=[];return n.forEach((i,r)=>o.push(r)),o}(qe).sort(Jn))for(const n of Ge(t))e!=n.zIndex&&(n.zIndex=e,n.onChange(e)),e++}function Nt(e){if(e){const{width:t,height:n}=e.style;e.style.width="auto",e.style.height="auto";const o=Ve(e);return e.style.width=t,e.style.height=n,o}return{width:0,height:0,top:0,left:0,bottom:0,right:0}}function Ve(e){const t=e.getBoundingClientRect(),n=t.width,o=t.height,i=t.top,r=t.left;return{width:n,height:o,top:i,left:r,bottom:i+o,right:r+n}}class Wi{container;options;handles;constructor(t,n){if(this.container=t,this.options=n,t&&n){this.handles=Qn.map(v=>new v(t,this));const{width:o,height:i}=Nt(t),r=n.maxWidth||window.innerWidth,l=n.maxHeight||window.innerHeight;let f=!1;(o<n.minWidth||o>r)&&(t.style.width=`${eo(o,n.minWidth,r)}px`,f=!0),(i<n.minHeight||i>l)&&(t.style.height=`${eo(i,n.minHeight,l)}px`,f=!0),f&&n.onResize&&n.onResize()}}teardown(){this.handles?.forEach(t=>t.teardown())}}const Qn=[];class ue{container;helper;handle;handleSize=8;unbindDown;unbindMove;unbindUp;constructor(t,n){this.container=t,this.helper=n,this.handle=this.createHandleElement(),this.unbindDown=J.bindDown(this.handle,this.mousedown)}teardown(){this.unbindDown(),this.unbindUp&&this.unbindUp(),this.unbindMove&&this.unbindMove(),this.handle.parentElement.removeChild(this.handle)}x0;y0;left0;top0;width0;height0;mousedown=t=>{t.preventDefault(),t.stopPropagation();const{left:n,top:o,width:i,height:r}=Ve(this.container);this.x0=t.clientX,this.y0=t.clientY,this.left0=n,this.top0=o,this.width0=i,this.height0=r,this.calcSafeBoundaries(),this.helper.options&&this.helper.options.onResizeStart&&this.helper.options.onResizeStart(),this.unbindMove=J.bindMove(document,this.mousemove),this.unbindUp=J.bindUp(document,this.mouseup)};minLeft;maxLeft;minRight;maxRight;minTop;maxTop;minBottom;maxBottom;calcSafeBoundaries(){if(!this.helper.options)return;const{left:t,top:n,right:o,bottom:i}=Ve(this.container),r=this.helper.options,l=r.maxWidth||window.innerWidth,f=r.maxHeight||window.innerHeight;this.minLeft=Math.max(o-l,0),this.maxLeft=o-r.minWidth,this.minRight=t+r.minWidth,this.maxRight=Math.min(t+l,window.innerWidth),this.minTop=Math.max(i-f,0),this.maxTop=i-r.minHeight,this.minBottom=n+r.minHeight,this.maxBottom=Math.min(n+f,window.innerHeight)}mousemove=t=>{t.preventDefault(),t.stopPropagation(),this.setPosition(t),this.fixPosition(),this.helper.options&&this.helper.options.onResize&&this.helper.options.onResize()};fixPosition(){const{width:t,height:n,left:o,top:i,right:r,bottom:l}=Ve(this.container),f=this.helper.options;!f||(o<this.minLeft?(this.container.style.width=t+o-this.minLeft+"px",this.container.style.left=`${this.minLeft}px`):o>this.maxLeft?(this.container.style.width=`${f.minWidth}px`,this.container.style.left=`${this.maxLeft}px`):r<this.minRight?this.container.style.width=`${f.minWidth}px`:r>this.maxRight&&(this.container.style.width=this.maxRight-o+"px"),i<this.minTop?(this.container.style.height=n+i-this.minTop+"px",this.container.style.top=`${this.minTop}px`):i>this.maxTop?(this.container.style.height=`${f.minHeight}px`,this.container.style.top=`${this.maxTop}px`):l<this.minBottom?this.container.style.height=`${f.minHeight}px`:l>this.maxBottom&&(this.container.style.height=this.maxBottom-i+"px"))}mouseup=t=>{t.preventDefault(),t.stopPropagation(),this.helper.options&&this.helper.options.onResizeEnd&&this.helper.options.onResizeEnd(),this.unbindUp(),this.unbindMove(),this.unbindUp=this.unbindMove=void 0};createHandleElement(){const t=document.createElement("div"),n=t.style;return n.position="absolute",this.applyStyle(n),this.container.appendChild(t),t}}function eo(e,t,n){return e<t?t:e>n?n:e}Qn.push(class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.right=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.right=`${this.handleSize}px`,e.left=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.bottom=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.height=this.height0+e.clientY-this.y0+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.top=`${this.handleSize}px`,e.cursor="ew-resize"}},class extends ue{setPosition(e){this.container.style.left=this.left0+e.clientX-this.x0+"px",this.container.style.width=this.width0-(e.clientX-this.x0)+"px",this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=-this.handleSize+"px",e.top=-this.handleSize+"px",e.width=2*this.handleSize+"px",e.height=2*this.handleSize+"px",e.cursor="nwse-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px"}applyStyle(e){e.left=`${this.handleSize}px`,e.right=`${this.handleSize}px`,e.height=2*this.handleSize+"px",e.top=-this.handleSize+"px",e.cursor="ns-resize"}},class extends ue{setPosition(e){this.container.style.top=this.top0+e.clientY-this.y0+"px",this.container.style.height=this.height0-(e.clientY-this.y0)+"px",this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=-this.handleSize+"px",e.height=2*this.handleSize+"px",e.width=2*this.handleSize+"px",e.cursor="nesw-resize"}},class extends ue{setPosition(e){this.container.style.width=this.width0+e.clientX-this.x0+"px"}applyStyle(e){e.right=-this.handleSize+"px",e.top=`${this.handleSize}px`,e.bottom=`${this.handleSize}px`,e.width=2*this.handleSize+"px",e.cursor="ew-resize"}});var Xe=w.defineComponent({name:"",props:{disabled:{type:Boolean,default:!1},windowStyle:{type:Object,required:!0}},components:{},setup(e){const t=w.ref(!1),n=w.ref(!1);return{hover:t,active:n,style:function(){let o=e.windowStyle.button;return t.value&&(o={...o,...this.windowStyle.buttonHover}),n.value&&(o={...o,...this.windowStyle.buttonActive}),o},mouseup:function(o){this.active&&this.$emit("click")},mousedown:function(o){o.preventDefault(),n.value=!0;const i=J.bindUp(document,()=>{n.value=!1,i()})}}}});const Hi=["disabled"];Xe.render=function(e,t,n,o,i,r){return w.openBlock(),w.createElementBlock("div",{class:"btn",style:w.normalizeStyle(e.style()),onMouseenter:t[0]||(t[0]=l=>e.hover=!0),onMouseleave:t[1]||(t[1]=l=>e.hover=!1),onMousedown:t[2]||(t[2]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onTouchstart:t[3]||(t[3]=w.withModifiers((...l)=>e.mousedown&&e.mousedown(...l),["stop"])),onMouseup:t[4]||(t[4]=(...l)=>e.mouseup&&e.mouseup(...l)),onTouchend:t[5]||(t[5]=(...l)=>e.mouseup&&e.mouseup(...l)),disabled:e.disabled},[w.renderSlot(e.$slots,"default")],44,Hi)},Xe.__scopeId="data-v-71662210",Xe.__file="src/controls/vuewindow/window/Button.vue";const Ut=new Set;function to(e){return e!==null?parseFloat(e):0}function Ke(e){const t=window.getComputedStyle(e),n=Math.ceil([t.paddingLeft,t.width,t.paddingRight].map(to).reduce((i,r)=>i+r)),o=Math.ceil([t.paddingTop,t.height,t.paddingBottom].map(to).reduce((i,r)=>i+r));return{width:n,height:o}}class no{width;height;constructor(t,n){this.width=t,this.height=n}}function qi(e){const t=e.windowEl;if(t){const n=parseFloat(t.style.left||"NaN"),o=parseFloat(t.style.top||"NaN");if(!isNaN(n)&&!isNaN(o))return{left:n,top:o}}return null}function Gi(e,t,n,o){const i=e-n,r=t-o;return i*i+r*r}window.addEventListener("resize",e=>{Ut.forEach(t=>{t&&Me(t.fixPosition)&&t.fixPosition()})});const Ye=[];var Je=w.defineComponent({name:"Window",props:{windowStyle:{type:Object,required:!0},isOpen:{type:Boolean,required:!1,default:!0},title:{type:String,required:!0,default:""},closeButton:{type:Boolean,required:!1,default:!0},resizable:{type:Boolean,required:!1,default:!1},isScrollable:{type:Boolean,required:!1,default:!1},padding:{type:Number,required:!1,default:8},activateWhenOpen:{type:Boolean,required:!1,default:!0},positionHint:{type:String,required:!1,default:""},zGroup:{type:Number,required:!1,default:1},overflow:{type:String,required:!1,default:"visible"},minWidth:{type:Number,required:!1,default:1},minHeight:{type:Number,required:!1,default:0},maxWidth:{type:Number,required:!1,default:0},maxHeight:{type:Number,required:!1,default:0},height:{type:Number,required:!1},width:{type:Number,required:!1},top:{type:Number,required:!1},left:{type:Number,required:!1}},components:{myButton:Xe},setup(e,{emit:t}){const n=w.getCurrentInstance();if(!n)return;const{proxy:o}=n;let i=0,r,l,f;const v=w.ref(e.isOpen),S=()=>{Ye.push(o),f=new $i(e.zGroup,E),e.isOpen&&function(R){R&&(w.nextTick(()=>{i++==0&&(d(o),function(){const B=k.value,{width:U,height:F}=Nt(B);let j,H;if(e.left!==void 0!=(e.top!==void 0))throw new Error("Either of left or top is specified. Both must be set or not set.");if(typeof e.left=="number")j=e.left,H=e.top;else{const Z=e.positionHint||"auto";switch(Z){case"auto":{let V=20,X=50,q=0;do{if(Ye.every(ne=>{if(!ne.isOpen||o==ne)return!0;const ke=qi(ne);if(ke==null)return!0;const{left:ot,top:te}=ke;return Gi(ot,te,V,X)>16}))break;V=(V+40)%(window.innerWidth-200),X=(X+40)%(window.innerHeight-200)}while(++q<100);j=V,H=X}break;case"center":j=(window.innerWidth-U)/2,H=(window.innerHeight-F)/2,console.log(j,H,window.innerWidth,window.innerHeight,"111111");break;default:try{const V=Z.split("/").map(Number);if(V.length!=2)throw null;const[X,q]=V;if(!isFinite(X)||!isFinite(q))throw null;j=X>=0?X:window.innerWidth-U+X,H=q>=0?q:window.innerHeight-F+q}catch{throw new Error(`invalid position string: ${Z}`)}}}B&&(B.style.left=`${j}px`,B.style.top=`${H}px`)}()),e.resizable&&h(),T(),r=new Fi(A.value,k.value,{onMove:()=>T(),onMoveStart:()=>t("move-start"),onMoveEnd:()=>t("move-end")}),e.resizable&&function(){const{height:B}=Nt(A.value);l=new Wi(k.value,{onResize:()=>h(),onResizeStart:()=>t("resize-start"),onResizeEnd:()=>t("resize-end"),minWidth:e.minWidth,minHeight:e.minHeight+B,maxWidth:e.maxWidth,maxHeight:e.maxHeight?e.maxHeight+B:void 0})}()}),e.activateWhenOpen&&I())}(!0),Ut.add(o)};function E(R){C.value.zIndex=`${R}`}const k=w.ref(null),A=w.ref(null),D=w.ref(null);function I(){f.raise(),t("activate")}const C=w.ref({...e.windowStyle.window,zIndex:"auto",overflow:e.overflow}),u=w.computed(()=>e.windowStyle.titlebar),p=w.computed(()=>{const R={...e.windowStyle.content};return e.resizable?R.padding="0":e.padding!=null&&(R.padding=`${e.padding}px`),e.isScrollable&&(R.overflow="auto"),R});function d(R){const{width:B,height:U,top:F,left:j}=R,H=k;if(H&&B!=null&&(H.value.style.width=`${B}px`),U!=null){const Z=A.value;if(Z){const V=Ke(Z).height;H.value.style.height=`${U+V}px`}}H&&j!=null&&(H.value.style.left=`${j}px`),H&&F!=null&&(H.value.style.top=`${F}px`)}function h(R=!0){const B=k.value,U=A.value,F=D.value;if(F&&B&&U){const{width:j,height:H}=Ke(F),{width:Z,height:V}=Ke(B),X=Ke(U).height,q=Z-(F.offsetWidth-j),ne=V-X-(F.offsetHeight-H);F.style.width=`${q}px`,F.style.height=`${ne}px`,g(),t("resize",new no(q,ne)),R&&(t("update:width",q),t("update:height",ne))}}function g(){const R=k.value;if(R){const B=R.getBoundingClientRect();B.left<0&&(C.value.left="0px"),B.top<0&&(C.value.top="0px"),B.right>window.innerWidth&&(C.value.left=window.innerWidth-B.width+"px"),B.bottom>window.innerHeight&&(C.value.top=window.innerHeight-B.height+"px")}}function T(R=!0){g();const B=k.value;if(B){const{left:U,top:F}=B.getBoundingClientRect();R&&(t("update:left",U),t("update:top",F))}}return w.watch(()=>e.isOpen,R=>{v.value=R}),w.watch(()=>e.zGroup,R=>{f.group=R}),w.watch(()=>e.width,R=>{d({width:R}),h(!1)}),w.watch(()=>e.height,R=>{d({height:R}),h(!1)}),w.onMounted(()=>{S()}),w.onBeforeUnmount(()=>{Ut.delete(this),f.unregister(),l&&l.teardown(),r&&r.teardown(),Ye.splice(Ye.indexOf(o),1)}),{isOpen:v,windowEl:k,titlebar:A,content:D,activate:I,styleWindow:C,styleTitlebar:u,styleContent:p,closeButtonClick:function(){v.value=!1,t("closebuttonclick")},fixPosition:g}}});const Vi={class:"title"};var oo;Je.render=function(e,t,n,o,i,r){const l=w.resolveComponent("myButton");return w.openBlock(),w.createBlock(w.Transition,{name:"fade",onAfterLeave:t[2]||(t[2]=f=>e.$emit("close")),onAfterEnter:t[3]||(t[3]=f=>e.$emit("open")),persisted:""},{default:w.withCtx(()=>[w.withDirectives(w.createElementVNode("div",{class:"window",style:w.normalizeStyle(e.styleWindow),ref:"windowEl",onMousedown:t[0]||(t[0]=(...f)=>e.activate&&e.activate(...f)),onTouchstart:t[1]||(t[1]=(...f)=>e.activate&&e.activate(...f))},[w.createElementVNode("div",{class:"titlebar",style:w.normalizeStyle(e.styleTitlebar),ref:"titlebar"},[w.createElementVNode("div",Vi,[e.$slots.title?w.renderSlot(e.$slots,"title",{key:0}):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[w.createTextVNode(w.toDisplayString(e.title),1)],64))]),e.closeButton?(w.openBlock(),w.createBlock(l,{key:0,windowStyle:e.windowStyle,onClick:e.closeButtonClick},{default:w.withCtx(()=>[w.createTextVNode("\xD7")]),_:1},8,["windowStyle","onClick"])):w.createCommentVNode("v-if",!0)],4),w.createElementVNode("div",{class:"content",style:w.normalizeStyle(e.styleContent),ref:"content"},[w.renderSlot(e.$slots,"default")],4)],36),[[w.vShow,e.isOpen]])]),_:3})},Je.__file="src/controls/vuewindow/window/index.vue",function(e){e[e.StyleBlack=0]="StyleBlack",e[e.StyleWhite=1]="StyleWhite",e[e.StyleMetal=2]="StyleMetal",e[e.StyleGrayblue=3]="StyleGrayblue"}(oo||(oo={}));const Xi=Je;exports.LayoutContainerEnum=void 0,function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.centerBack=2]="centerBack",e[e.centerMain=3]="centerMain",e[e.centerFront=4]="centerFront",e[e.left=5]="left",e[e.right=6]="right"}(exports.LayoutContainerEnum||(exports.LayoutContainerEnum={}));class io{layoutState;layoutMap=new Map;preConditionMap=new Map;widgetsLoadedSet=new Set;widgetConfig=new Array;_LayoutID;constructor(t,n,o){this.layoutState=t,this._LayoutID=o,n.forEach(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 r=new Set;r.add(i),this.preConditionMap.set(i.afterid,r)}})}getLayoutID(){return this._LayoutID}getWidgetConfig(){return this.widgetConfig}preloadWidgets(){this.widgetConfig.filter(t=>t.preload&&!t.afterid).forEach(t=>{this._loadWidget(t)})}async loadWidget(t){if(!t)return;let n;return le(t)?n=t:Le(t)&&(n=this.widgetConfig.find(o=>o.id===t)),n?n.afterid?(this.isWidgetLoaded(n.afterid)||await this.loadWidget(n.afterid),this._loadWidget(n)):this._loadWidget(n):void 0}loadOtherDependenceWidgets(t){this.preConditionMap.has(t)&&this.preConditionMap.get(t)?.forEach(n=>{n.preload&&this._loadWidget(n)})}_loadWidget(t){if(!this.widgetsLoadedSet.has(t.id))return t.component().then(n=>{if(n.default){const o=w.markRaw(n.default);this.getContainerComponents(t.container).value.set(t.id,o),this.widgetsLoadedSet.add(t.id),w.nextTick().then(()=>{N.EventBus.emit(Q.WidgetLoadedEvent,{layoutID:this._LayoutID,widgetID:t.id}),this.loadOtherDependenceWidgets(t.id)})}})}hasDependentWidgets(t){let n=!1;if(this.preConditionMap.has(t)){const o=this.preConditionMap.get(t);if(o){for(const i of o)if(this.isWidgetLoaded(i.id)){n=!0;break}}}return n}unloadWidget(t){if(!t||!this.isWidgetLoaded(t))return;const n=this.widgetConfig.find(o=>o.id===t);if(n){if(this.preConditionMap.has(t)){const r=this.preConditionMap.get(t);if(r)for(const l of r)this.unloadWidget(l.id)}const o=this.getContainerComponents(n.container),i=o.value.get(t);i&&i.unmounted&&i.unmounted(),o.value.delete(t),this.widgetsLoadedSet.delete(t),N.EventBus.emit(Q.WidgetUnLoadedEvent,{layoutID:this._LayoutID,widgetID:t})}}isWidgetLoaded(t){return this.widgetsLoadedSet.has(t)}splitTwoContainer(t=!1){const n=this.layoutState.centerMainContainer,o=this.layoutState.centerBackContainer;t?(n&&(n.style.left="0",n.style.width="100%"),o&&(o.style.width="100%")):(n&&(n.style.left="50%",n.style.width="50%"),o&&(o.style.width="50%"))}getLayoutContainer(t){switch(t){case exports.LayoutContainerEnum.top:return this.layoutState.topContainer;case exports.LayoutContainerEnum.bottom:return this.layoutState.bottomContainer;case exports.LayoutContainerEnum.left:return this.layoutState.leftContainer;case exports.LayoutContainerEnum.right:return this.layoutState.rightContainer;case exports.LayoutContainerEnum.centerBack:return this.layoutState.centerBackContainer;case exports.LayoutContainerEnum.centerMain:return this.layoutState.centerMainContainer;case exports.LayoutContainerEnum.centerFront:return this.layoutState.centerFrontContainer}}changeContainerVisible(t,n=!1){const o=this.getLayoutContainer(t);o&&(o.style.visibility=n?"visible":"hidden")}changeWidgetVisible(t,n=!1){const o=this.getWidgetComponent(t);o&&N.EventBus.emit(Q.WidgetVisibleChanged,{id:t,layoutID:this._LayoutID,name:o.name,visible:n})}getWidgetComponent(t){if(this.widgetsLoadedSet.has(t)){const n=this.widgetConfig.find(o=>o.id===t);if(n)return this.getContainerComponents(n.container).value.get(t)}}getWigetItem(t){return this.widgetConfig.find(n=>n.id===t)}getGroupWigetItems(t){return this.widgetConfig.filter(n=>n.group===t)}getContainerComponents(t){if(this.layoutMap.has(t))return this.layoutMap.get(t);{const n=w.ref(new Map);return this.layoutMap.set(t,n),n}}addContainerComponent(t,n){}}var Ze=w.defineComponent({name:"MainContainer",props:{widgetConfig:{type:Array,required:!0,default:()=>[]},layoutID:{type:String,default:void 0},layoutStyle:{type:Object},enableRouterView:{type:Boolean,default:!0}},emits:["containerLoaded"],setup(e,{attrs:t,slots:n,emit:o}){const i=e.layoutID,r=w.ref(e.enableRouterView);w.watch(()=>e.enableRouterView,()=>{r.value=e.enableRouterView});const l=w.reactive({topContainer:void 0,centerBackContainer:void 0,centerMainContainer:void 0,centerFrontContainer:void 0,bottomContainer:void 0,leftContainer:void 0,rightContainer:void 0}),f=new io(l,e.widgetConfig,i),v=I(exports.LayoutContainerEnum.top),S=I(exports.LayoutContainerEnum.centerBack),E=I(exports.LayoutContainerEnum.centerFront),k=I(exports.LayoutContainerEnum.left),A=I(exports.LayoutContainerEnum.right),D=I(exports.LayoutContainerEnum.bottom);function I(u){return f?.getContainerComponents(u)}const C=w.computed(()=>e.layoutStyle);return w.onMounted(()=>{f&&(f.preloadWidgets(),i===void 0&&(N.LayoutManager=f),o("containerLoaded",{layoutID:i,layoutManager:f}))}),{...w.toRefs(l),topContainerComponents:v,centerbackComponents:S,centerfrontComponents:E,leftContainerComponents:k,rightContainerComponents:A,bottomContainerComponents:D,containerStyle:C,isEnableRouterView:r}}});const Ki={ref:"topContainer",class:"topContainer"},Yi={key:0,ref:"centerMainContainer",class:"centerdiv mainContainer"},Ji={ref:"centerBackContainer",class:"centerdiv backContainer"},Zi={ref:"centerFrontContainer",class:"centerdiv centerContainer"},Qi={ref:"leftContainer",class:"leftContainer"},er={ref:"rightContainer",class:"rightContainer"},tr={ref:"bottomContainer",class:"bottomContainer"};Ze.render=function(e,t,n,o,i,r){const l=w.resolveComponent("router-view");return w.openBlock(),w.createElementBlock("div",{class:"layoutContainer",style:w.normalizeStyle(e.containerStyle)},[w.createElementVNode("div",Ki,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.topContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",null,[w.createCommentVNode(" \u4E3B\u8981\u5BB9\u5668-\u5E95\u90E8 "),e.isEnableRouterView?(w.openBlock(),w.createElementBlock("div",Yi,[w.createVNode(l,null,{default:w.withCtx(({Component:f})=>[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(f)))]),_:1})],512)):w.createCommentVNode("v-if",!0),w.createCommentVNode(" \u4E0A\u4E00\u5C42-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Ji,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerbackComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createCommentVNode(" \u6700\u4E0A\u6D6E\u52A8-\u4E3B\u5BB9\u5668 "),w.createElementVNode("div",Zi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.centerfrontComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",Qi,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.leftContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512),w.createElementVNode("div",er,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.rightContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)]),w.createElementVNode("div",tr,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(e.bottomContainerComponents,([f,v])=>(w.openBlock(),w.createBlock(w.resolveDynamicComponent(v),{key:f}))),128))],512)],4)},Ze.__scopeId="data-v-4d081e5c",Ze.__file="src/controls/layoutcontainer/layout.vue";const Qe=new Map,Ot=new Map;let et;const nr={getDefaultClient(){if(et||(et=new we(SysConfig.DefaultHproseAPI)),!et)throw Error("HproseProxy\u5BF9\u8C61\u4E3A\u7A7A");return et},registerHprose(e,t){const n=Ot.get(e);if(!n){const o=new we(t);Qe.set(e,o)}return n},getHprose:e=>Ot?.get(e),getProxyHprose:e=>Qe.get(e),unregisterHprose(e){Qe.get(e)&&(Ot.delete(e),Qe.delete(e))}},pe={Login:"/api/User/Login",ChangeMyPwd:"/api/User/ChangeMyPwd",Logout:"/api/Check/ExitLogin",RefreshToken:"/api/Check/RefreshToken",CheckToken:"/api/Check/CheckToken",GetSystemRights:"/api/System/GetSystem"},jt="access_token",or=N.Config.ServiceURL.LoginAuthURL;function Ft(){const e=Rn();e&&re(pe.RefreshToken,or,{refreshToken:e}).then(t=>{$t(t.data)})}function ro(){const e=ie.getJsonObject(jt);if(!e)return;const t=new Date().getTime(),n=new Date(e.expire).getTime()-t;n>0&&(n<=5e3?Ft():setTimeout(Ft,n-5e3))}function $t(e){const t=new Date().getTime();let n=new Date(e.accessToken.expires).getTime()-t;if(n>=36e5?(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u8FC7\u53BB\u65F6\u95F4\uFF01")):n<-6e5&&(n=18e5,console.warn("\u5BA2\u6237\u7AEF\u65F6\u95F4\u4E0E\u670D\u52A1\u5668\u4E0D\u4E00\u81F4\uFF1A\u672A\u6765\u65F6\u95F4\uFF01")),n>0){let o=de();o?(o.token=e.accessToken.tokenContent,o.expire=e.accessToken.expires,o.refresh=e.refreshToken.tokenContent):o={token:e.accessToken.tokenContent,expire:e.accessToken.expires,refresh:e.refreshToken.tokenContent},ie.set(jt,o,n/1e3),ro()}else ie.remove(jt)}const tt="Wm314243",nt=N.Config.ServiceURL.LoginAuthURL,Wt="ROLE_SYSTEM_RIGHT",Ht=new Be("",sessionStorage);function so(){return Ht.get(Wt)}function qt(e){Ht.set(Wt,e)}function ao(){Ht.remove(Wt)}function ve(e){if(e)for(let t=0;t<e.length;t++){const n=e[t];n.children&&n.children.length>0?(ve(n.children),n.children.length===0&&(e.splice(t,1),t--)):n.selected||(e.splice(t,1),t--)}}function co(e,t,n="name"){e&&t&&e.forEach(o=>{const i=t.find(r=>r[n]===o[n]);i&&(o.children?i.children&&co(o.children,i.children,n):(!i.children||i.children.length===0)&&i.selected&&(o.selected=i.selected))})}function Ce(e,t,n,o="name"){const i=e[n],r=t[n];i?r&&co(i,r,o):r&&(e[n]=r)}function uo(e){if(e&&e.length>0){const t=e.length;let n,o=!1;if(t>0){o=le(e[0]);const i=o?e[0]:JSON.parse(e[0]);if(t>1)for(let r=1;r<e.length;r++){const l=e[r],f=o?l:JSON.parse(l);Ce(i,f,"routes","name"),Ce(i,f,"widgetMenu","name"),Ce(i,f,"widgets","id"),Ce(i,f,"functions","id")}n=i}return n&&(ve(n.routes),ve(n.widgetMenu),ve(n.widgets),ve(n.functions)),n}}const Gt=[],Vt=[],Xt=[];function xe(){return so()}function lo(e,t){const n={...e};return n.meta||(n.meta={}),t.index!=null&&(n.meta.index=t.index),t.title!=null&&(n.meta.title=t.title),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.path===o.path);if(i){const r=lo(i,o);r&&n.children?.push(r)}})),n}function ho(e,t){const n={...e};return t.index!=null&&(n.index=t.index),e.children&&(n.children=[],t.children&&t.children.forEach(o=>{const i=e.children?.find(r=>r.name===o.name);if(i){const r=ho(i,o);r&&n.children?.push(r)}})),n}exports.BigFileDownload=class{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,n=3,o=6,i=6e4){this.fileID=e,this.downloadURL=t,this.chunkByteSize=n*this.ChunkUnitM,this.eventTarget=xt(),this.initIndexDB(),o>=3&&(this.cacheSize=o),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="",n){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const o=await re(t,e,n);let i=null;return o&&o.status===200&&(i=o.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=Ue.createInstance({name:this.fileID,driver:Ue.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(),Ue.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 n=e;if(!n&&this.downloadURL&&(n=this.downloadURL),!n)throw Error("\u4E0B\u8F7DURL\u4E0D\u80FD\u4E3A\u7A7A!");this.currentDB||this.initIndexDB();const o=N.Axios.CancelToken;this.cancelSource=o.source(),this.isStarting=!0;const i={key:this.fileMetaData?.downloadID};let r=0;const l=this.cacheSize;let f=0;for(let v=0;v<this.totalChunks;v++){if(this.keys&&this.keys?.indexOf(v.toString())>=0){r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());continue}const S=v*this.chunkByteSize;let E=S+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const k={range:`bytes=${S}-${E}`};for(;f>=l;)await this.sleep(200);const A=v.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${v+1}/${this.totalChunks}`),f++,re(n,t,i,k,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async D=>{const I=D.data;f--,await this.currentDB?.setItem(A,I),r++,r>this.finishNum&&(this.finishNum=r,this.downloadProgress());const C=parseInt(A)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${C}/${this.totalChunks}`),this.savefile()}).catch(D=>{f--;const I=parseInt(A)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${I}\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=Bi.createWriteStream(this.fileName).getWriter();let t=0;for(let n=0;n<this.totalChunks;n++){const o=n.toString();let i=await this.currentDB?.getItem(o);if(i||(i=await this.currentDB?.getItem(o)),!i)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let r=new Response(i).body;if(r===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${n+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const l=r.getReader();for(;;){const{done:f,value:v}=await l.read();if(f)break;await e.write(v)}t++,this.outputProgress(t),this.dispatchInfo(`\u5B8C\u6210\u7B2C${n+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Ue.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}},exports.Download=Pe,exports.DownloadByUrl=function({url:e,target:t="_blank",fileName:n}){const o=new URL(e).host==location.host;return new Promise((i,r)=>{if(o){const l=document.createElement("a");if(l.href=e,l.target=t,l.download!==void 0&&(l.download=n||Cn(e)),document.createEvent){const f=document.createEvent("MouseEvents");return f.initEvent("click",!0,!0),l.dispatchEvent(f),i(!0)}return e.indexOf("?")===-1&&(e+="?download"),window.open(e,t),i(!0)}{const l=document.createElement("canvas"),f=document.createElement("img");f.setAttribute("crossOrigin","Anonymous"),f.src=e,f.onload=v=>{l.width=f.width,l.height=f.height,l.getContext("2d").drawImage(f,0,0,f.width,f.height),l.toBlob(S=>{if(S){const E=document.createElement("a");E.href=window.URL.createObjectURL(S),E.download=Cn(e),E.click(),URL.revokeObjectURL(E.href),i(!0)}},"image/jpeg")},f.onerror=v=>r(v)}})},exports.FileUpload=Pn,exports.Global=N,exports.GlobalHprose=nr,exports.GlobalMitt=ge,exports.H5Tool=ee,exports.HproseClient=Ee,exports.HttpDownload=(e,t,n)=>{e.get(t,{responseType:"blob"}).then(function(o){Pe(o.data,n)}).catch(o=>{console.warn(o),ge.emit(Q.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})},exports.JsonDownload=Sn,exports.LayoutContainer=Ze,exports.LayoutManager=io,exports.ObjToUrlParams=function(e,t){let n="",o="";for(const i in t)n+=i+"="+encodeURIComponent(t[i])+"&";return n=n.replace(/&$/,""),o=/\?$/.test(e)?e+n:e.replace(/\/?$/,"?")+n,o},exports.Pane=ft,exports.ProxyClient=we,exports.SaveAs=function(e,t){const n=window.URL||window.webkitURL||window,o=new Blob([e]),i=document.createElement("a");i.href=n.createObjectURL(o),i.download=t,i.click(),n.revokeObjectURL(i.href)},exports.Splitpanes=pi,exports.Storage=Be,exports.StringUtils=_e,exports.StyleBlack={window:{color:"#fff",boxShadow:"0 0 6pt rgba(255, 255, 255, 0.75)",backgroundColor:"rgba(31, 31, 31, 0.9)"},titlebar:{backgroundColor:"rgba(63, 63, 63, 0.9)"},content:{},button:{color:"white"},buttonHover:{backgroundColor:"rgba(255, 255, 255, 0.25)"},buttonActive:{color:"black",backgroundColor:"rgba(255, 255, 255, 0.5)"}},exports.StyleGrayblue={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)"}},exports.StyleMetal={window:{color:"#000",boxShadow:"0 4pt 8pt rgba(0, 0, 0, 0.5)",background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},titlebar:{background:"linear-gradient(to bottom, rgb(215, 215, 215), rgb(191, 191, 191))"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.StyleWhite={window:{color:"#000",boxShadow:"0 2pt 4pt rgba(0, 0, 0, 0.5)",backgroundColor:"rgba(239, 239, 239, 0.95)"},titlebar:{backgroundColor:"rgba(191, 191, 191, 0.9)"},content:{},button:{color:"#000"},buttonHover:{backgroundColor:"rgba(0, 0, 0, 0.25)"},buttonActive:{color:"#fff",backgroundColor:"rgba(0, 0, 0, 0.5)"}},exports.SysEvents=Q,exports.TOKEN_REFRESH_TIME=5e3,exports.TOKEN_VALID_TIMESPAN=36e5,exports.USER_TOKEN_API=pe,exports.VCollapsiblePanel=He,exports.VCollapsiblePanelGroup=We,exports.VWindow=Je,exports.WindowResizeEvent=no,exports.WindowType=Xi,exports.XXTEA=Se,exports.calculateBestTextColor=function(e){return function(t,n){return(bn(~~t[0],~~t[1],~~t[2])+.05)/(bn(n[0],n[1],n[2])+.05)}(bt(e.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"},exports.changeMyPWD=function(e){const t={oldpwd:Se.encryptToString(e.oldpwd,tt),newpwd:Se.encryptToString(e.newpwd,tt)};return re(pe.ChangeMyPwd,nt,t)},exports.checkDoRefreshToken=ro,exports.checkToken=function(e){return re(pe.CheckToken,nt,{token:e})},exports.clearLocalToken=kt,exports.clearRight=ao,exports.colorIsDark=function(e){if(!Te(e))return;const[t,n,o]=bt(e).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(i=>Number(i));return .299*t+.578*n+.114*o<192},exports.createFileUpload=e=>new Pn(e),exports.darken=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${Ct(e.substring(0,2),t)}${Ct(e.substring(2,4),t)}${Ct(e.substring(4,6),t)}`},exports.deepMerge=function e(t={},n={}){let o;for(o in n)le(n[o])?t[o]=e(t[o],n[o]):t[o]=n[o];return t},exports.delay=xn,exports.doRefreshToken=Ft,exports.exportSystemRights=Fn,exports.get=function(e,t){return re(e,void 0,t)},exports.getCurrentSystemRight=xe,exports.getData=function(e,t){return N.Axios?.get(e,{params:t}).catch(function(n){Ne(n,e,"","\u5916\u90E8Get")})},exports.getEncryptPWD=function(e){return Se.encryptToString(e,tt)},exports.getFunctions=function(e,t=2){if(t===0)return e;const n=xe();return n?n.functions:void 0},exports.getHexColor=function(e){const t=e.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||"1"),o=Math.floor(n*parseInt(t[0])+255*(1-n)),i=Math.floor(n*parseInt(t[1])+255*(1-n)),r=Math.floor(n*parseInt(t[2])+255*(1-n));return"#"+("0"+o.toString(16)).slice(-2)+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)},exports.getLocalToken=de,exports.getLockState=function(){return ie.get(Lt,!1)},exports.getLongHexColor=function(e){const t=e;if(t.length===4){let o="#";for(var n=1;n<4;n+=1){const i=t.slice(n,n+1);o+=i.concat(i)}return o}return t},exports.getProxyClient=Dn,exports.getRGBColor=function(e){var t=e.toLowerCase();if(Te(e)){if(t.length===4){for(var n="#",o=1;o<4;o+=1){const r=t.slice(o,o+1);n+=r.concat(r)}t=n}var i=[];for(o=1;o<7;o+=2)i.push(parseInt("0x"+t.slice(o,o+2)));return"rgb("+i.join(",")+")"}return t},exports.getRGBColorFromHSLA=function(e){if(!!e){var t=e.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!t){var n,o,i,r=(parseFloat(t[1])%360+360)%360/360,l=parseFloat(t[2])/(/%$/.test(t[2])?100:1),f=parseFloat(t[3])/(/%$/.test(t[3])?100:1);if(l===0)n=o=i=f;else{var v=f<=.5?f*(l+1):f+l-f*l,S=2*f-v;n=wt(S,v,r+1/3),o=wt(S,v,r),i=wt(S,v,r-1/3)}return`rgba(${n=Math.round(255*n)},${o=Math.round(255*o)},${i=Math.round(255*i)},${t[4]?parseFloat(t[4]):1})`}}},exports.getRefreshToken=Rn,exports.getRight=so,exports.getRoutes=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.routes?(Xt.length>0||e.forEach(o=>{const i=n.routes?.find(r=>r.name===o.name);if(i){const r=lo(o,i);r&&Xt.push(r)}}),Xt):void 0},exports.getSystemRoleRight=async function(e,t=!1){ao();const n=pe.GetSystemRights,o=N.Config.ServiceURL.LoginAuthURL,i=await re(n,o,{systemid:e});if(!i||!i.data)return void N.Message?.warn("\u65E0\u6CD5\u83B7\u53D6\u529F\u80FD\u6388\u6743\u5217\u8868\uFF01");const r=i.data;if(r&&r.length>0){if(t){const l=JSON.parse(r[0]);return qt(l),l}{const l=uo(r);return qt(l),l}}},exports.getWidgetConfig=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgets?(Gt.length>0||e?.forEach(o=>{n.widgets?.find(i=>i.id===o.id)&&Gt.push(o)}),Gt):void 0},exports.getWidgetMenus=function(e,t=2){if(t===0)return e;const n=xe();return n&&n.widgetMenu?(Vt.length>0||e.forEach(o=>{const i=n.widgetMenu?.find(r=>r.name===o.name);if(i){const r=ho(o,i);r&&Vt.push(r)}}),Vt):void 0},exports.handleNodes=ve,exports.hexToRGB=bt,exports.init=function(e,t,n){!N.Config.DefaultHproseAPI&&N.Config.ServiceURL&&(N.Config.DefaultHproseAPI=N.Config.ServiceURL.DefaultHproseAPI),N.Config.DefaultHproseAPI&&_e.isNotEmpty(N.Config.DefaultHproseAPI)&&(N.DefaultProxyClient=new we(N.Config.DefaultHproseAPI));const o=N.Config.UI.GrayMode;o&&ee.setGrayMode(o);const i=new Li(e,N.EventBus);N.Message=i,N.SystemID=t,N.SystemGroup=n,N.EventBus.on(Q.HproseServiceErrorEvent,r=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.WebAPIErrorEvent,r=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${r}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.AxiosRequestErrorEvent,r=>{const l=`Http\u8BF7\u6C42'${r.code}'\u9519\u8BEF: ${r.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),N.EventBus.on(Q.CommonWarnEvent,r=>{i.warn(r)})},exports.initDefaultProxyClient=function(e){const t=Dn(e);return t&&(N.DefaultProxyClient=t),t},exports.is=K,exports.isArray=gt,exports.isAsyncFunction=function(e){return K(e,"AsyncFunction")},exports.isBoolean=function(e){return e===!0||e===!1||K(e,"Boolean")},exports.isClient=()=>typeof window<"u",exports.isDate=function(e){return K(e,"Date")},exports.isDef=wn,exports.isElement=e=>le(e)&&!!e.tagName,exports.isEmpty=function(e){return e==null||(Le(e)||gt(e)?e.length===0:!!le(e)&&JSON.stringify(e)==="{}")},exports.isEnumColor=function(e){if(typeof e=="object"||!e)return;const t=e.toLowerCase().substring(0,1);return t==="#"?exports.EnumColor.Hex:t==="r"||t==="("?exports.EnumColor.RGBA:t==="h"?exports.EnumColor.Hsla:exports.EnumColor.RGBA},exports.isError=function(e){return K(e,"Error")},exports.isFunction=Me,exports.isHexColor=Te,exports.isImageDom=function(e){return e&&["IMAGE","IMG"].includes(e.tagName)},exports.isMap=function(e){return K(e,"Map")},exports.isNull=mt,exports.isNullAndUnDef=function(e){return pt(e)&&mt(e)},exports.isNullOrUnDef=function(e){return pt(e)||mt(e)},exports.isNumber=function(e){return K(e,"Number")},exports.isObjectX=le,exports.isPromise=function(e){return K(e,"Promise")&&le(e)&&Me(e.then)&&Me(e.catch)},exports.isServer=gi,exports.isString=Le,exports.isSymbol=function(e){return K(e,"Symbol")},exports.isUnDef=pt,exports.isValidURL=e=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(e),exports.isWeakMap=function(e){return K(e,"WeakMap")},exports.isWeakSet=function(e){return K(e,"WeakSet")},exports.isWindow=e=>typeof window<"u"&&K(e,"Window"),exports.jquery=Mi,exports.lighten=function(e,t){return e=e.indexOf("#")>=0?e.substring(1,e.length):e,t=Math.trunc(255*t/100),`#${St(e.substring(0,2),t)}${St(e.substring(2,4),t)}${St(e.substring(4,6),t)}`},exports.login=async function(e){const t={username:e.username,pwd:Se.encryptToString(e.pwd,tt)},n=(await re(pe.Login,nt,t))?.data;return n&&$t(n.doubletoken),n},exports.logout=function(){const e=de();e&&(Ln(pe.Logout,nt,{token:e.token,reftoken:e.refresh}),kt())},exports.mergeFilterRoleSysRight=uo,exports.mergeNodes=function e(t,n,o="name"){t&&n&&t.forEach(i=>{const r=n.find(l=>l[o]===i[o]);r&&(i.children?r.children&&e(i.children,r.children,o):(!r.children||r.children.length===0)&&r.selected&&(i.selected=r.selected))})},exports.mergeNodesAll=Ce,exports.newGuid=function(){var e=new Date().getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var o=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(n==="x"?o:3&o|8).toString(16)});return t},exports.onLockListener=function(){Bt(),document.addEventListener("mousedown",Bt)},exports.post=function(e,t){return Mn(e,void 0,t)},exports.requestGet=re,exports.requestPost=Mn,exports.requestPostBody=Ln,exports.rgbToHex=function(e,t,n){const o=(e<<16|t<<8|n).toString(16);return"#"+new Array(Math.abs(o.length-7)).join("0")+o},exports.setLocalToken=$t,exports.setRight=qt,exports.sleep=function(e){const t=new Date().getTime();let n=new Date().getTime();for(;n-t<e;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${xn}\u6BEB\u79D2`)},exports.storage=yi,exports.storageHelper=ie,exports.unLockListener=function(){document.removeEventListener("mousedown",Bt)},exports.uuid=Ae,exports.writeIconifyList=function(e,t="IconifyList.ts"){let n="",o=`const iconlist={
14
14
  `,i=0;e.forEach(r=>{const l=r.split(":");if(l&&l.length===2){const f="icon"+i;n+=`import ${f} from '~icons/${l[0]}/${l[1]}'
15
15
  `,o+=` '${r}':${f},
16
16
  `,i++}}),i>0&&(o+=`};
package/dist/index.css CHANGED
@@ -1,3 +1,34 @@
1
+ .vcpg {
2
+ border: 1px solid var(--border-color);
3
+ border-radius: 4px;
4
+ width: 100%;
5
+ }
6
+ .vcpg ::v-deep(.vcp) * {
7
+ box-sizing: border-box;
8
+ }
9
+ .vcpg ::v-deep(.vcp) .vcp__header {
10
+ background-color: var(--bg-color-header);
11
+ height: 30px;
12
+ border-bottom: 2px solid #c6bebd;
13
+ transition: background-color 0.3s ease;
14
+ }
15
+ .vcpg ::v-deep(.vcp) .vcp__header .vcp__header:hover {
16
+ background-color: var(--bg-color-header-hover);
17
+ }
18
+ .vcpg ::v-deep(.vcp) .vcp__header .vcp__header:active {
19
+ background-color: var(--bg-color-header-active);
20
+ }
21
+ .vcpg ::v-deep(.vcp) .vcp:not(:first-of-type) .vcp__header {
22
+ border-top: 2px solid var(--border-color);
23
+ }
24
+ .vcpg ::v-deep(.vcp) .vcp__header-title {
25
+ font-weight: 500;
26
+ }
27
+ .vcpg ::v-deep(.vcp) .vcp__body {
28
+ border-top: 1px solid var(--border-color);
29
+ background-color: var(--bg-color-body);
30
+ }
31
+
1
32
  .splitpanes {
2
33
  display: flex;
3
34
  width: 100%;
@@ -108,37 +139,6 @@
108
139
  margin-top: 1px;
109
140
  }
110
141
 
111
- .vcpg {
112
- border: 1px solid var(--border-color);
113
- border-radius: 4px;
114
- width: 100%;
115
- }
116
- .vcpg ::v-deep(.vcp) * {
117
- box-sizing: border-box;
118
- }
119
- .vcpg ::v-deep(.vcp) .vcp__header {
120
- background-color: var(--bg-color-header);
121
- height: 30px;
122
- border-bottom: 2px solid #c6bebd;
123
- transition: background-color 0.3s ease;
124
- }
125
- .vcpg ::v-deep(.vcp) .vcp__header .vcp__header:hover {
126
- background-color: var(--bg-color-header-hover);
127
- }
128
- .vcpg ::v-deep(.vcp) .vcp__header .vcp__header:active {
129
- background-color: var(--bg-color-header-active);
130
- }
131
- .vcpg ::v-deep(.vcp) .vcp:not(:first-of-type) .vcp__header {
132
- border-top: 2px solid var(--border-color);
133
- }
134
- .vcpg ::v-deep(.vcp) .vcp__header-title {
135
- font-weight: 500;
136
- }
137
- .vcpg ::v-deep(.vcp) .vcp__body {
138
- border-top: 1px solid var(--border-color);
139
- background-color: var(--bg-color-body);
140
- }
141
-
142
142
  .vcp__header {
143
143
  display: flex;
144
144
  padding: 12px;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import{h as Pr,openBlock as H,createElementBlock as Y,normalizeStyle as vt,renderSlot as pt,reactive as Dn,computed as mt,defineComponent as At,ref as it,onMounted as Re,onUpdated as Tr,nextTick as Me,normalizeClass as Dr,createElementVNode as J,createCommentVNode as yt,createVNode as Bn,Transition as Nn,withCtx as Wt,withModifiers as Un,getCurrentInstance as Br,watch as Pt,onBeforeUnmount as Nr,resolveComponent as On,createBlock as ct,withDirectives as Ur,Fragment as wt,createTextVNode as jn,toDisplayString as Or,vShow as jr,markRaw as Fr,toRefs as $r,renderList as Rt,resolveDynamicComponent as bt}from"vue";import Wr from"axios";import Hr from"qs";import{Client as qr,ClientContext as _e}from"@hprose/rpc-core";import{ByteStream as Fn}from"@hprose/io";import{HttpTransport as Gr}from"@hprose/rpc-html5";var Xr={name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let n=0;this.panes=this.panes.map((i,r)=>(i.size=r===e?i.max:i.min,r!==e&&(n+=i.min),i)),this.panes[e].size-=n,this.$emit("pane-maximize",this.panes[e])},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:n,clientY:i}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:n-e.left,y:i-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),100*t/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const i=0+(this.pushOtherPanes?0:n.prevPanesSize),r=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(t),r),i);let l=[e,e+1],p=this.panes[l[0]]||null,v=this.panes[l[1]]||null;const b=p.max<100&&o>=p.max+n.prevPanesSize,C=v.max<100&&o<=100-(v.max+this.sumNextPanesSize(e+1));if(b||C)b?(p.size=p.max,v.size=Math.max(100-p.max-n.prevPanesSize-n.nextPanesSize,0)):(p.size=Math.max(100-v.max-n.prevPanesSize-this.sumNextPanesSize(e+1),0),v.size=v.max);else{if(this.pushOtherPanes){const E=this.doPushOtherPanes(n,o);if(!E)return;({sums:n,panesToResize:l}=E),p=this.panes[l[0]]||null,v=this.panes[l[1]]||null}p!==null&&(p.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,p.min),p.max)),v!==null&&(v.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,v.min),v.max))}},doPushOtherPanes(t,e){const n=this.touch.activeSplitter,i=[n,n+1];return e<t.prevPanesSize+this.panes[i[0]].min&&(i[0]=this.findPrevExpandedPane(n).index,t.prevReachedMinPanes=0,i[0]<n&&this.panes.forEach((r,o)=>{o>i[0]&&o<=n&&(r.size=r.min,t.prevReachedMinPanes+=r.min)}),t.prevPanesSize=this.sumPrevPanesSize(i[0]),i[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((r,o)=>{o>0&&o<=n&&(r.size=r.min,t.prevReachedMinPanes+=r.min)}),this.panes[i[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[i[1]].min&&(i[1]=this.findNextExpandedPane(n).index,t.nextReachedMinPanes=0,i[1]>n+1&&this.panes.forEach((r,o)=>{o>n&&o<i[1]&&(r.size=r.min,t.nextReachedMinPanes+=r.min)}),t.nextPanesSize=this.sumNextPanesSize(i[1]-1),i[1]===void 0)?(t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((r,o)=>{o<this.panesCount-1&&o>=n+1&&(r.size=r.min,t.nextReachedMinPanes+=r.min)}),this.panes[i[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:i}},sumPrevPanesSize(t){return this.panes.reduce((e,n,i)=>e+(i<t?n.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((e,n,i)=>e+(i>t+1?n.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.index<t&&e.size>e.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),n=t.classList.contains("splitpanes__splitter");if(!e&&!n)return t.parentNode.removeChild(t),void console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.")})},addSplitter(t,e,n=!1){const i=t-1,r=document.createElement("div");r.classList.add("splitpanes__splitter"),n||(r.onmousedown=o=>this.onMouseDown(o,i),typeof window<"u"&&"ontouchstart"in window&&(r.ontouchstart=o=>this.onMouseDown(o,i)),r.onclick=o=>this.onSplitterClick(o,i+1)),this.dblClickSplitter&&(r.ondblclick=o=>this.onSplitterDblClick(o,i+1)),e.parentNode.insertBefore(r,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let e=0;t.forEach(n=>{n.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,n,!0):e&&this.addSplitter(e,n),e++)})},requestUpdate({target:t,...e}){const n=this.indexedPanes[t._.uid];Object.entries(e).forEach(([i,r])=>n[i]=r)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(r=>(r.className.includes("splitpanes__pane")&&e++,r===t.$el));const n=parseFloat(t.minSize),i=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(n)?0:n,max:isNaN(i)?100:i,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((r,o)=>r.index=o),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(i=>i.id===t._.uid),n=this.panes.splice(e,1)[0];this.panes.forEach((i,r)=>i.index=r),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:e}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(i=>({min:i.min,max:i.max,size:i.size}))})})},resetPaneSizes(t={}){t.addedPane||t.removedPane?this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize():this.initialPanesSizing(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const n=[],i=[];this.panes.forEach(r=>{r.size=Math.max(Math.min(t,r.max),r.min),e-=r.size,r.size>=r.max&&n.push(r.id),r.size<=r.min&&i.push(r.id)}),e>.1&&this.readjustSizes(e,n,i)},initialPanesSizing(){let t=100;const e=[],n=[];let i=0;this.panes.forEach(o=>{t-=o.size,o.size!==null&&i++,o.size>=o.max&&e.push(o.id),o.size<=o.min&&n.push(o.id)});let r=100;t>.1&&(this.panes.forEach(o=>{o.size===null&&(o.size=Math.max(Math.min(t/(this.panesCount-i),o.max),o.min)),r-=o.size}),r>.1&&this.readjustSizes(t,e,n))},equalizeAfterAddOrRemove({addedPane:t}={}){let e=100/this.panesCount,n=0;const i=[],r=[];t&&t.givenSize!==null&&(e=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&r.push(o.id)}),!(Math.abs(n)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(e,o.max),o.min)),n-=o.size,o.size>=o.max&&i.push(o.id),o.size<=o.min&&r.push(o.id)}),n>.1&&this.readjustSizes(n,i,r))},readjustSizes(t,e,n){let i;i=t>0?t/(this.panesCount-e.length):t/(this.panesCount-n.length),this.panes.forEach(r=>{if(t>0&&!e.includes(r.id)){const o=Math.max(Math.min(r.size+i,r.max),r.min),l=o-r.size;t-=l,r.size=o}else if(!n.includes(r.id)){const o=Math.max(Math.min(r.size+i,r.max),r.min),l=o-r.size;t-=l,r.size=o}r.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[r.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,n)=>{e.ondblclick=t?i=>this.onSplitterDblClick(i,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.updatePaneComponents(),this.$emit("ready"),this.ready=!0},render(){return Pr("div",{ref:"container",class:["splitpanes","splitpanes--"+(this.horizontal?"horizontal":"vertical"),{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())},__file:"src/controls/splitpanes/splitpanes.vue"},Le={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:10},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};Le.render=function(t,e,n,i,r,o){return H(),Y("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=l=>o.onPaneClick(l,t._.uid)),style:vt(t.style)},[pt(t.$slots,"default")],4)},Le.__file="src/controls/splitpanes/pane.vue";const Vr=Object.prototype.toString;function Z(t,e){return Vr.call(t)===`[object ${e}]`}function Ht(t){return Z(t,"Function")}const $n=t=>typeof t<"u",Ae=t=>!$n(t);function Pe(t){return t===null}function Kr(t){return Ae(t)&&Pe(t)}function Yr(t){return Ae(t)||Pe(t)}const St=t=>t!=null&&t!==null&&Z(t,"Object");function Jr(t){return Z(t,"Date")}function Zr(t){return Z(t,"Number")}function Qr(t){return Z(t,"AsyncFunction")}function to(t){return Z(t,"Promise")&&St(t)&&Ht(t.then)&&Ht(t.catch)}function qt(t){return Z(t,"String")}function eo(t){return t===!0||t===!1||Z(t,"Boolean")}function Te(t){return t&&Array.isArray(t)}const no=()=>typeof window<"u",io=t=>typeof window<"u"&&Z(t,"Window"),ro=t=>St(t)&&!!t.tagName,oo=typeof window>"u";function so(t){return t&&["IMAGE","IMG"].includes(t.tagName)}function ao(t){return t==null||(qt(t)||Te(t)?t.length===0:!!St(t)&&JSON.stringify(t)==="{}")}function co(t){return Z(t,"Error")}function uo(t){return Z(t,"WeakSet")}function lo(t){return Z(t,"WeakMap")}function ho(t){return Z(t,"Symbol")}function fo(t){return Z(t,"Map")}const po=t=>/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(t);var xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mo={exports:{}},De=mo.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(S,u){var f=S[0],d=S[1],h=S[2],g=S[3];d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[0]-680876936|0)<<7|f>>>25)+d|0)&d|~f&h)+u[1]-389564586|0)<<12|g>>>20)+f|0)&f|~g&d)+u[2]+606105819|0)<<17|h>>>15)+g|0)&g|~h&f)+u[3]-1044525330|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[4]-176418897|0)<<7|f>>>25)+d|0)&d|~f&h)+u[5]+1200080426|0)<<12|g>>>20)+f|0)&f|~g&d)+u[6]-1473231341|0)<<17|h>>>15)+g|0)&g|~h&f)+u[7]-45705983|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[8]+1770035416|0)<<7|f>>>25)+d|0)&d|~f&h)+u[9]-1958414417|0)<<12|g>>>20)+f|0)&f|~g&d)+u[10]-42063|0)<<17|h>>>15)+g|0)&g|~h&f)+u[11]-1990404162|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&h|~d&g)+u[12]+1804603682|0)<<7|f>>>25)+d|0)&d|~f&h)+u[13]-40341101|0)<<12|g>>>20)+f|0)&f|~g&d)+u[14]-1502002290|0)<<17|h>>>15)+g|0)&g|~h&f)+u[15]+1236535329|0)<<22|d>>>10)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[1]-165796510|0)<<5|f>>>27)+d|0)&h|d&~h)+u[6]-1069501632|0)<<9|g>>>23)+f|0)&d|f&~d)+u[11]+643717713|0)<<14|h>>>18)+g|0)&f|g&~f)+u[0]-373897302|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[5]-701558691|0)<<5|f>>>27)+d|0)&h|d&~h)+u[10]+38016083|0)<<9|g>>>23)+f|0)&d|f&~d)+u[15]-660478335|0)<<14|h>>>18)+g|0)&f|g&~f)+u[4]-405537848|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[9]+568446438|0)<<5|f>>>27)+d|0)&h|d&~h)+u[14]-1019803690|0)<<9|g>>>23)+f|0)&d|f&~d)+u[3]-187363961|0)<<14|h>>>18)+g|0)&f|g&~f)+u[8]+1163531501|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d&g|h&~g)+u[13]-1444681467|0)<<5|f>>>27)+d|0)&h|d&~h)+u[2]-51403784|0)<<9|g>>>23)+f|0)&d|f&~d)+u[7]+1735328473|0)<<14|h>>>18)+g|0)&f|g&~f)+u[12]-1926607734|0)<<20|d>>>12)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[5]-378558|0)<<4|f>>>28)+d|0)^d^h)+u[8]-2022574463|0)<<11|g>>>21)+f|0)^f^d)+u[11]+1839030562|0)<<16|h>>>16)+g|0)^g^f)+u[14]-35309556|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[1]-1530992060|0)<<4|f>>>28)+d|0)^d^h)+u[4]+1272893353|0)<<11|g>>>21)+f|0)^f^d)+u[7]-155497632|0)<<16|h>>>16)+g|0)^g^f)+u[10]-1094730640|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[13]+681279174|0)<<4|f>>>28)+d|0)^d^h)+u[0]-358537222|0)<<11|g>>>21)+f|0)^f^d)+u[3]-722521979|0)<<16|h>>>16)+g|0)^g^f)+u[6]+76029189|0)<<23|d>>>9)+h|0,d=((d+=((h=((h+=((g=((g+=((f=((f+=(d^h^g)+u[9]-640364487|0)<<4|f>>>28)+d|0)^d^h)+u[12]-421815835|0)<<11|g>>>21)+f|0)^f^d)+u[15]+530742520|0)<<16|h>>>16)+g|0)^g^f)+u[2]-995338651|0)<<23|d>>>9)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[0]-198630844|0)<<6|f>>>26)+d|0)|~h))+u[7]+1126891415|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[14]-1416354905|0)<<15|h>>>17)+g|0)|~f))+u[5]-57434055|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[12]+1700485571|0)<<6|f>>>26)+d|0)|~h))+u[3]-1894986606|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[10]-1051523|0)<<15|h>>>17)+g|0)|~f))+u[1]-2054922799|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[8]+1873313359|0)<<6|f>>>26)+d|0)|~h))+u[15]-30611744|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[6]-1560198380|0)<<15|h>>>17)+g|0)|~f))+u[13]+1309151649|0)<<21|d>>>11)+h|0,d=((d+=((g=((g+=(d^((f=((f+=(h^(d|~g))+u[4]-145523070|0)<<6|f>>>26)+d|0)|~h))+u[11]-1120210379|0)<<10|g>>>22)+f|0)^((h=((h+=(f^(g|~d))+u[2]+718787259|0)<<15|h>>>17)+g|0)|~f))+u[9]-343485551|0)<<21|d>>>11)+h|0,S[0]=f+S[0]|0,S[1]=d+S[1]|0,S[2]=h+S[2]|0,S[3]=g+S[3]|0}function i(S){var u,f=[];for(u=0;u<64;u+=4)f[u>>2]=S.charCodeAt(u)+(S.charCodeAt(u+1)<<8)+(S.charCodeAt(u+2)<<16)+(S.charCodeAt(u+3)<<24);return f}function r(S){var u,f=[];for(u=0;u<64;u+=4)f[u>>2]=S[u]+(S[u+1]<<8)+(S[u+2]<<16)+(S[u+3]<<24);return f}function o(S){var u,f,d,h,g,P,I=S.length,L=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n(L,i(S.substring(u-64,u)));for(f=(S=S.substring(u-64)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<f;u+=1)d[u>>2]|=S.charCodeAt(u)<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(L,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*I).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),P=parseInt(h[1],16)||0,d[14]=g,d[15]=P,n(L,d),L}function l(S){var u,f,d,h,g,P,I=S.length,L=[1732584193,-271733879,-1732584194,271733878];for(u=64;u<=I;u+=64)n(L,r(S.subarray(u-64,u)));for(f=(S=u-64<I?S.subarray(u-64):new Uint8Array(0)).length,d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=0;u<f;u+=1)d[u>>2]|=S[u]<<(u%4<<3);if(d[u>>2]|=128<<(u%4<<3),u>55)for(n(L,d),u=0;u<16;u+=1)d[u]=0;return h=(h=8*I).toString(16).match(/(.*?)(.{0,8})$/),g=parseInt(h[2],16),P=parseInt(h[1],16)||0,d[14]=g,d[15]=P,n(L,d),L}function p(S){var u,f="";for(u=0;u<4;u+=1)f+=e[S>>8*u+4&15]+e[S>>8*u&15];return f}function v(S){var u;for(u=0;u<S.length;u+=1)S[u]=p(S[u]);return S.join("")}function b(S){return/[\u0080-\uFFFF]/.test(S)&&(S=unescape(encodeURIComponent(S))),S}function C(S,u){var f,d=S.length,h=new ArrayBuffer(d),g=new Uint8Array(h);for(f=0;f<d;f+=1)g[f]=S.charCodeAt(f);return u?g:h}function E(S){return String.fromCharCode.apply(null,new Uint8Array(S))}function A(S,u,f){var d=new Uint8Array(S.byteLength+u.byteLength);return d.set(new Uint8Array(S)),d.set(new Uint8Array(u),S.byteLength),f?d:d.buffer}function D(S){var u,f=[],d=S.length;for(u=0;u<d-1;u+=2)f.push(parseInt(S.substr(u,2),16));return String.fromCharCode.apply(String,f)}function z(){this.reset()}return v(o("hello")),typeof ArrayBuffer>"u"||ArrayBuffer.prototype.slice||function(){function S(u,f){return(u=0|u||0)<0?Math.max(u+f,0):Math.min(u,f)}ArrayBuffer.prototype.slice=function(u,f){var d,h,g,P,I=this.byteLength,L=S(u,I),N=I;return f!==t&&(N=S(f,I)),L>N?new ArrayBuffer(0):(d=N-L,h=new ArrayBuffer(d),g=new Uint8Array(h),P=new Uint8Array(this,L,d),g.set(P),h)}}(),z.prototype.append=function(S){return this.appendBinary(b(S)),this},z.prototype.appendBinary=function(S){this._buff+=S,this._length+=S.length;var u,f=this._buff.length;for(u=64;u<=f;u+=64)n(this._hash,i(this._buff.substring(u-64,u)));return this._buff=this._buff.substring(u-64),this},z.prototype.end=function(S){var u,f,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d.charCodeAt(u)<<(u%4<<3);return this._finish(g,h),f=v(this._hash),S&&(f=D(f)),this.reset(),f},z.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},z.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},z.prototype.setState=function(S){return this._buff=S.buff,this._length=S.length,this._hash=S.hash,this},z.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},z.prototype._finish=function(S,u){var f,d,h,g=u;if(S[g>>2]|=128<<(g%4<<3),g>55)for(n(this._hash,S),g=0;g<16;g+=1)S[g]=0;f=(f=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),d=parseInt(f[2],16),h=parseInt(f[1],16)||0,S[14]=d,S[15]=h,n(this._hash,S)},z.hash=function(S,u){return z.hashBinary(b(S),u)},z.hashBinary=function(S,u){var f=v(o(S));return u?D(f):f},z.ArrayBuffer=function(){this.reset()},z.ArrayBuffer.prototype.append=function(S){var u,f=A(this._buff.buffer,S,!0),d=f.length;for(this._length+=S.byteLength,u=64;u<=d;u+=64)n(this._hash,r(f.subarray(u-64,u)));return this._buff=u-64<d?new Uint8Array(f.buffer.slice(u-64)):new Uint8Array(0),this},z.ArrayBuffer.prototype.end=function(S){var u,f,d=this._buff,h=d.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(u=0;u<h;u+=1)g[u>>2]|=d[u]<<(u%4<<3);return this._finish(g,h),f=v(this._hash),S&&(f=D(f)),this.reset(),f},z.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},z.ArrayBuffer.prototype.getState=function(){var S=z.prototype.getState.call(this);return S.buff=E(S.buff),S},z.ArrayBuffer.prototype.setState=function(S){return S.buff=C(S.buff,!0),z.prototype.setState.call(this,S)},z.ArrayBuffer.prototype.destroy=z.prototype.destroy,z.ArrayBuffer.prototype._finish=z.prototype._finish,z.ArrayBuffer.hash=function(S,u){var f=v(l(new Uint8Array(S)));return u?D(f):f},z}();const Be=[];class rt{static addHandler(e,n,i){e.addEventListener?e.addEventListener(n,i,!1):e.attachEvent?e.attachEvent("on"+n,i):e["on"+n]=i}static windowResizeHandler(e){rt.addHandler(window,"resize",e)}static fullscreenEnabled(){const e=window.document;return document.fullscreenEnabled||window.fullScreen||e.mozFullscreenEnabled||e.webkitIsFullScreen}static fullScreen(e,n){if(n){const i=window.document;let r=window.document.exitFullscreen||i.msExitFullscreen||i.mozCancelFullScreen||i.webkitCancelFullScreen;typeof r<"u"&&r?r.call(window.document):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}else{let i=e;i||(i=window.document.documentElement);let r=i.requestFullScreen||i.webkitRequestFullScreen||i.mozRequestFullScreen||i.msRequestFullScreen;typeof r<"u"&&r?r.call(i):typeof window.ActiveXObject<"u"&&new window.ActiveXObject("WScript.Shell")?.SendKeys("{F11}")}}static requestFullScreen(e=window.document.documentElement){let n=e;var i=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullScreen;if(i)i.call(n);else if(typeof window.ActiveXObject<"u"){var r=new window.ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}}static exitFullScreen(){const e=window.document;var n=document.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.webkitExitFullscreen;if(n)n.call(document);else if(typeof window.ActiveXObject<"u"){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}}static fullScreenElement(){return window.document.fullscreenElement||window.document.webkitFullscreenElement||window.document.mozFullscreenElement||window.document.msFullscreenElement}static isFullScreen(){return!!rt.fullScreenElement()}static onFullScreenChanged(e){let n;"onfullscreenchange"in window.document?n="fullscreenchange":"onwebkitfullscreenchange"in window.document?n="webkitfullscreenchange":"onmozfullscreenchange"in window.document&&(n="mozfullscreenchange"),n?document.addEventListener(n,function(){const i=rt.isFullScreen();e(i)}):document.addEventListener("MSFullscreenChange",function(){const i=rt.isFullScreen();e(i)})}static stringifyCircularHandler(e,n){if(typeof n=="object"&&n!==null){if(Be.indexOf(n)!==-1)return;Be.push(n)}return n}static jsonStringify(e){if(!e)return"";const n=JSON.stringify(e,rt.stringifyCircularHandler);return Be.length=0,n}static jsonParse(e){const n=rt.jsonStringify(e);if(n.length>1)return JSON.parse(n)}static getObjectURL(e){let n;const i=window;return i.createObjcectURL!=null?n=i.createOjcectURL(e):window.URL!=null?n=window.URL.createObjectURL(e):window.webkitURL!=null&&(n=window.webkitURL.createObjectURL(e)),n}static getFileShortMD5(e,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,o=e,l=2097152,p=new De.ArrayBuffer,v=new FileReader;v.onload=function(b){p.append(b.target?.result);const C=p.end();n({isOK:!0,data:C})},v.onerror=function(){const b="\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01";console.warn(b),n({isOK:!1,data:b})},function(){const b=0+l>=o.size?o.size:0+l;v.readAsArrayBuffer(r.call(o,0,b))}()}static getFileMD5(e,n){const i=File.prototype,r=i.slice||i.mozSlice||i.webkitSlice,o=e,l=2097152,p=Math.ceil(o.size/l);let v=0;const b=new De.ArrayBuffer,C=new FileReader;function E(){const A=v*l,D=A+l>=o.size?o.size:A+l;C.readAsArrayBuffer(r.call(o,A,D))}C.onload=function(A){if(b.append(A.target?.result),v++,v<p)E();else{const D=b.end();n({isOK:!0,data:D})}},C.onerror=function(){const A=`${o.name}:\u8BA1\u7B97\u6587\u4EF6\u7B80\u5355\u6458\u8981\u9519\u8BEF\uFF01`;console.warn(A),n({isOK:!1,data:A})},E()}static MD5(e,n=!1){return De.hash(e,n)}static copyTextByCommand(e){return new Promise((n,i)=>{const r=document.createElement("input");r.value=e,document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove(),n(!0)})}static copyText=e=>navigator.clipboard?navigator.clipboard.writeText(e).then(function(){return!0},function(n){return!1}):rt.copyTextByCommand(e);static copyElementTextByCommand(e){const n=document.createRange();n.selectNode(document.getElementById(e));const i=window.getSelection();i.rangeCount>0&&i.removeAllRanges(),i.addRange(n);try{return document.execCommand("copy"),i.removeRange(n),!0}catch(r){return i.removeRange(n),console.error("Command\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1}}static copyElementText(e){if(!navigator.clipboard)return rt.copyElementTextByCommand(e);const n=document.createRange();n.selectNode(document.getElementById(e));const i=window.getSelection();return i.rangeCount>0&&i.removeAllRanges(),i.addRange(n),navigator.clipboard.writeText(i).then(function(){return i.removeRange(n),!0},function(r){return i.removeRange(n),console.error("Clipboard\u590D\u5236\u6587\u672C\u9519\u8BEF",r),!1})}static setGrayMode(e){rt.toggleClass(e,"grayMode",document.documentElement)}static toggleClass(e,n,i){const r=i||document.body;let{className:o}=r;o=o.replace(n,""),r.className=e?`${o} ${n} `:o}static setCssVar(e,n,i=document.documentElement){i.style.setProperty(e,n)}static dispatchWindowResize(){const e=new Event("resize");window.dispatchEvent(e)}static dispatchElementEvent(e,n="click",i){let r;if(r=qt(e)?document.getElementById(e):e,r){const o=new Event(n,{bubbles:!0,cancelable:!0});i&&r.addEventListener("ev",l=>{i(l)},!1),r.dispatchEvent(o)}}}class Gt{static isNullOrEmpty=e=>e===null||e===""||e===void 0||e.length===0;static isNotEmpty=e=>!(e===null||e===""||e===void 0||e.length===0);static toHump(e){return e.replace(/[\-\/\_](\w)/g,(n,i)=>i.toUpperCase()).replace("views","")}}class Xt{prefixKey;storage;constructor(e="",n=localStorage){this.prefixKey=e,this.storage=n}getKey(e){return`${this.prefixKey}${e}`.toUpperCase()}set(e,n,i=604800){const r=JSON.stringify({value:n,expire:i!==null?new Date().getTime()+1e3*i:null});this.storage.setItem(this.getKey(e),r)}get(e,n=null){const i=this.storage.getItem(this.getKey(e));if(i)try{const r=JSON.parse(i),{value:o,expire:l}=r;if(l===null||l>=Date.now())return o;this.remove(this.getKey(e))}catch{return n}return n}getJsonObject(e){const n=this.storage.getItem(this.getKey(e));if(n)try{const i=JSON.parse(n);if(i.expire===null||i.expire>=Date.now())return i;this.remove(this.getKey(e))}catch{return}}remove(e){this.storage.removeItem(this.getKey(e))}clear(){this.storage.clear()}setCookie(e,n,i=604800){document.cookie=`${this.getKey(e)}=${n}; Max-Age=${i}`}getCookie(e){const n=document.cookie.split("; ");for(let i=0,r=n.length;i<r;i++){const o=n[i].split("=");if(o[0]===this.getKey(e))return o[1]}return""}removeCookie(e){this.setCookie(e,1,-1)}clearCookie(){const e=document.cookie.match(/[^ =;]+(?==)/g);if(e)for(let n=e.length;n--;)document.cookie=e[n]+"=0;expire="+new Date(0).toUTCString()}}const go=new Xt("",localStorage);function Vt(){let t=[];const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var n=0;n<36;n++){const r=Math.floor(16*Math.random());t[n]=e.substring(r,r+1)}t[14]="4";const i=3&Number(t[19])|8;return t[19]=e.substring(i,i+1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function vo(){var t=new Date().getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),(n==="x"?i:3&i|8).toString(16)});return e}function yo(t){const e=t.toLowerCase().replace(/rgb?a?\(/,"").replace(/\)/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(e[3]||"1"),i=Math.floor(n*parseInt(e[0])+255*(1-n)),r=Math.floor(n*parseInt(e[1])+255*(1-n)),o=Math.floor(n*parseInt(e[2])+255*(1-n));return"#"+("0"+i.toString(16)).slice(-2)+("0"+r.toString(16)).slice(-2)+("0"+o.toString(16)).slice(-2)}function wo(t){var e=t.toLowerCase();if(Kt(t)){if(e.length===4){for(var n="#",i=1;i<4;i+=1){const o=e.slice(i,i+1);n+=o.concat(o)}e=n}var r=[];for(i=1;i<7;i+=2)r.push(parseInt("0x"+e.slice(i,i+2)));return"rgb("+r.join(",")+")"}return e}function bo(t){const e=t;if(e.length===4){let i="#";for(var n=1;n<4;n+=1){const r=e.slice(n,n+1);i+=r.concat(r)}return i}return e}var Ct;function So(t){if(typeof t=="object"||!t)return;const e=t.toLowerCase().substring(0,1);return e==="#"?Ct.Hex:e==="r"||e==="("?Ct.RGBA:e==="h"?Ct.Hsla:Ct.RGBA}function xo(t){if(!!t){var e=t.toLowerCase().match(/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(!!e){var n,i,r,o=(parseFloat(e[1])%360+360)%360/360,l=parseFloat(e[2])/(/%$/.test(e[2])?100:1),p=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(l===0)n=i=r=p;else{var v=p<=.5?p*(l+1):p+l-p*l,b=2*p-v;n=Ne(b,v,o+1/3),i=Ne(b,v,o),r=Ne(b,v,o-1/3)}return`rgba(${n=Math.round(255*n)},${i=Math.round(255*i)},${r=Math.round(255*r)},${e[4]?parseFloat(e[4]):1})`}}}function Ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Kt(t){return/^#([0-9a-fA-F]{3}|[0-9a-fA-f]{6})$/.test(t)}function Co(t,e,n){const i=(t<<16|e<<8|n).toString(16);return"#"+new Array(Math.abs(i.length-7)).join("0")+i}function Ue(t){let e=t.toLowerCase();if(Kt(t)){if(e.length===4){let i="#";for(let r=1;r<4;r+=1)i+=e.slice(r,r+1).concat(e.slice(r,r+1));e=i}const n=[];for(let i=1;i<7;i+=2)n.push(parseInt("0x"+e.slice(i,i+2)));return"RGB("+n.join(",")+")"}return e}function Eo(t){if(!Kt(t))return;const[e,n,i]=Ue(t).replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",").map(r=>Number(r));return .299*e+.578*n+.114*i<192}function ko(t,e){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=Math.trunc(255*e/100),`#${je(t.substring(0,2),e)}${je(t.substring(2,4),e)}${je(t.substring(4,6),e)}`}function zo(t,e){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=Math.trunc(255*e/100),`#${Oe(t.substring(0,2),e)}${Oe(t.substring(2,4),e)}${Oe(t.substring(4,6),e)}`}function Oe(t,e){const n=parseInt(t,16)+e,i=n>255?255:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function Wn(t,e,n){const i=[t,e,n].map(r=>(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}function Io(t){return function(e,n){return(Wn(~~e[0],~~e[1],~~e[2])+.05)/(Wn(n[0],n[1],n[2])+.05)}(Ue(t.substring(1)).split(","),[0,0,0])>=12?"#000000":"#FFFFFF"}function je(t,e){const n=parseInt(t,16)-e,i=n<0?0:n;return i.toString(16).length>1?i.toString(16):`0${i.toString(16)}`}function Fe(t){return{all:t=t||new Map,on(e,n){const i=t?.get(e);i&&i.push(n)||t?.set(e,[n])},off(e,n){const i=t?.get(e);i&&i.splice(i.indexOf(n)>>>0,1)},emit(e,n){(t?.get(e)||[]).slice().map(i=>{i(n)}),(t?.get("*")||[]).slice().map(i=>{i(e,n)})}}}(function(t){t[t.RGBA=0]="RGBA",t[t.Hex=1]="Hex",t[t.Hsla=2]="Hsla"})(Ct||(Ct={}));const Mt=Fe(),nt={HproseServiceErrorEvent:"HproseServiceError",WebAPIErrorEvent:"WebAPIError",AlertInfoEvent:"AlertInfoEvent",CommonWarnEvent:"CommonWarnEvent",WidgetLoadedEvent:"WidgetLoaded",WidgetUnLoadedEvent:"WidgetUnLoaded",WidgetVisibleChanged:"WidgetVisibleChanged",AxiosRequestErrorEvent:"AxiosRequestErrorEvent"},Yt=(t,e)=>{const n=document.createElement("a");n.download=e,n.style.display="none";const i=new Blob([t],{type:"application/octet-stream"});n.href=URL.createObjectURL(i),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function Ro(t,e){const n=window.URL||window.webkitURL||window,i=new Blob([t]),r=document.createElement("a");r.href=n.createObjectURL(i),r.download=e,r.click(),n.revokeObjectURL(r.href)}const Hn=(t,e)=>{const n=JSON.stringify(t,null,2);e?Yt(n,e+".json"):Mt.emit(nt.CommonWarnEvent,"\u53C2\u6570JsonID\u4E0D\u80FD\u4E3A\u7A7A\uFF01")},Mo=(t,e,n)=>{t.get(e,{responseType:"blob"}).then(function(i){Yt(i.data,n)}).catch(i=>{console.warn(i),Mt.emit(nt.CommonWarnEvent,"\u4E0B\u8F7D\u6587\u4EF6\u62A5\u9519\uFF01")})};function qn(t){const e=t.lastIndexOf("/")+1;let n=t.substring(e);return n=decodeURI(n.split("?")[0]),n}function _o({url:t,target:e="_blank",fileName:n}){const i=new URL(t).host==location.host;return new Promise((r,o)=>{if(i){const l=document.createElement("a");if(l.href=t,l.target=e,l.download!==void 0&&(l.download=n||qn(t)),document.createEvent){const p=document.createEvent("MouseEvents");return p.initEvent("click",!0,!0),l.dispatchEvent(p),r(!0)}return t.indexOf("?")===-1&&(t+="?download"),window.open(t,e),r(!0)}{const l=document.createElement("canvas"),p=document.createElement("img");p.setAttribute("crossOrigin","Anonymous"),p.src=t,p.onload=v=>{l.width=p.width,l.height=p.height,l.getContext("2d").drawImage(p,0,0,p.width,p.height),l.toBlob(b=>{if(b){const C=document.createElement("a");C.href=window.URL.createObjectURL(b),C.download=qn(t),C.click(),URL.revokeObjectURL(C.href),r(!0)}},"image/jpeg")},p.onerror=v=>o(v)}})}function Lo(t){const e=new Date().getTime();let n=new Date().getTime();for(;n-e<t;)n=new Date().getTime();console.log(`\u5F3A\u5236\u7B49\u5F85${Gn}\u6BEB\u79D2`)}function Gn(t){return new Promise(e=>setTimeout(e,t))}var Xn,Vn,$e,Jt={exports:{}};Vn=xt,$e=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function r(z,S){var u=z[S];if(typeof u.bind=="function")return u.bind(z);try{return Function.prototype.bind.call(u,z)}catch{return function(){return Function.prototype.apply.apply(u,[z,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(z){return z==="debug"&&(z="log"),typeof console!==e&&(z==="trace"&&n?o:console[z]!==void 0?r(console,z):console.log!==void 0?r(console,"log"):t)}function p(z,S){for(var u=0;u<i.length;u++){var f=i[u];this[f]=u<z?t:this.methodFactory(f,z,S)}this.log=this.debug}function v(z,S,u){return function(){typeof console!==e&&(p.call(this,S,u),this[z].apply(this,arguments))}}function b(z,S,u){return l(z)||v.apply(this,arguments)}function C(z,S,u){var f,d=this;S=S??"WARN";var h="loglevel";function g(){var I;if(typeof window!==e&&h){try{I=window.localStorage[h]}catch{}if(typeof I===e)try{var L=window.document.cookie,N=L.indexOf(encodeURIComponent(h)+"=");N!==-1&&(I=/^([^;]+)/.exec(L.slice(N))[1])}catch{}return d.levels[I]===void 0&&(I=void 0),I}}typeof z=="string"?h+=":"+z:typeof z=="symbol"&&(h=void 0),d.name=z,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=u||b,d.getLevel=function(){return f},d.setLevel=function(I,L){if(typeof I=="string"&&d.levels[I.toUpperCase()]!==void 0&&(I=d.levels[I.toUpperCase()]),!(typeof I=="number"&&I>=0&&I<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+I;if(f=I,L!==!1&&function(N){var j=(i[N]||"silent").toUpperCase();if(typeof window!==e&&h){try{return void(window.localStorage[h]=j)}catch{}try{window.document.cookie=encodeURIComponent(h)+"="+j+";"}catch{}}}(I),p.call(d,I,z),typeof console===e&&I<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(I){S=I,g()||d.setLevel(I,!1)},d.resetLevel=function(){d.setLevel(S,!1),function(){if(typeof window!==e&&h){try{return void window.localStorage.removeItem(h)}catch{}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}()},d.enableAll=function(I){d.setLevel(d.levels.TRACE,I)},d.disableAll=function(I){d.setLevel(d.levels.SILENT,I)};var P=g();P==null&&(P=S),d.setLevel(P,!1)}var E=new C,A={};E.getLogger=function(z){if(typeof z!="symbol"&&typeof z!="string"||z==="")throw new TypeError("You must supply a name when creating a logger.");var S=A[z];return S||(S=A[z]=new C(z,E.getLevel(),E.methodFactory)),S};var D=typeof window!==e?window.log:void 0;return E.noConflict=function(){return typeof window!==e&&window.log===E&&(window.log=D),E},E.getLoggers=function(){return A},E.default=E,E},(Xn=Jt).exports?Xn.exports=$e():Vn.log=$e();let Kn=!1;const B={Config:SysConfig,EventBus:Mt,DefaultProxyClient:null,Axios:Wr,Logger:t=>{Kn||(import.meta.env.DEV||SysConfig.UI.ProductLog?Jt.exports.enableAll():Jt.exports.setDefaultLevel("warn"),Kn=!0);const e=t||"default";return Jt.exports.getLogger(e)}},Yn="access_token",ut=new Xt("user",localStorage);function Et(){return ut.get(Yn)}function We(){ut.remove(Yn)}function Jn(){return Et()?.refresh}function He(t,e,n,i="json",r){const o={baseURL:B.Config.ServiceURL.DefaultWebAPI,timeout:6e4,params:t,paramsSerializer:{serialize:function(l){return Hr.stringify(l,{indices:!1,arrayFormat:"repeat"})}},headers:{"Content-Type":"application/json",Authorization:"bearer "+Et()?.token},responseType:i,cancelToken:r};if(n)for(let l in n)o.headers[l]=n[l];return B.SystemID&&(o.headers.sysid=B.SystemID,B.SystemGroup&&(o.headers.sysgroup=B.SystemGroup)),e&&(o.baseURL=e),o}function lt(t,e,n,i,r="json",o,l){const p=He(n,e,i,r,o);return l&&l>=2e4&&(p.timeout=l),B.Axios?.get(t,p).catch(function(v){Zt(v,e,t,"Get")})}function Zt(t,e,n,i="Get"){const r=`${e}${n}`;if(t&&t.response){let o=!1;const l=t.response.status;switch(l){case 400:t.message="\u9519\u8BEF\u8BF7\u6C42";break;case 401:t.message="\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55";break;case 403:t.message="\u62D2\u7EDD\u8BBF\u95EE";break;case 404:t.message="\u8BF7\u6C42\u9519\u8BEF,\u672A\u627E\u5230\u8BE5\u8D44\u6E90";break;case 405:t.message="\u8BF7\u6C42\u65B9\u6CD5\u672A\u5141\u8BB8";break;case 408:t.message="\u8BF7\u6C42\u8D85\u65F6";break;case 500:const v=t.response.data;if(v){const b=v.indexOf(":"),C=v.indexOf(`
2
2
  `);if(b>0&&C-b>2){const E=v.substring(b+2,C);E.indexOf("System.Exception")>0?t.message="\u540E\u53F0\u670D\u52A1\u5185\u90E8\u51FA\u9519\uFF01":(o=!0,t.message=E)}}else t.message="\u670D\u52A1\u5668\u7AEF\u51FA\u9519";break;case 501:t.message="\u7F51\u7EDC\u672A\u5B9E\u73B0";break;case 502:t.message="\u7F51\u7EDC\u9519\u8BEF";break;case 503:t.message="\u670D\u52A1\u4E0D\u53EF\u7528";break;case 504:t.message="\u7F51\u7EDC\u8D85\u65F6";break;case 505:t.message="http\u7248\u672C\u4E0D\u652F\u6301\u8BE5\u8BF7\u6C42";break;default:t.message=`\u8FDE\u63A5\u9519\u8BEF${t.response.status}`}let p={address:r,code:l,isExceptionInfo:o,message:t.message,result:t.response.data};if(B.EventBus.emit(nt.AxiosRequestErrorEvent,p),o)throw new Error(t.message)}else{if(t?.message)throw new Error(t.message);console.error(t,"Http\u8BF7\u6C42\u9519\u8BEF!")}}function Zn(t,e,n,i,r,o="json",l){const p=He(i,e,r,o);l&&l>=2e4&&(p.timeout=l),p.headers["Content-Type"]="multipart/form-data";const v=function(b){let C=new FormData;return b&&Object.keys(b).forEach(E=>{if(!b)return;let A=b[E];A!=null&&(Te(A)?A.forEach(D=>{C.append(E,ti(D))}):C.append(E,ti(A)))}),C}(n);return B.Axios?.post(t,v,p).catch(function(b){Zt(b,e,t,"Post")})}function Qn(t,e,n,i,r,o="json",l){const p=He(i,e,r,o);return l&&l>=2e4&&(p.timeout=l),B.Axios?.post(t,n,p).catch(function(v){Zt(v,e,t,"Post")})}function Ao(t,e){return lt(t,void 0,e)}function Po(t,e){return Zn(t,void 0,e)}function To(t,e){return B.Axios?.get(t,{params:e}).catch(function(n){Zt(n,t,"","\u5916\u90E8Get")})}function ti(t){return t instanceof Blob?t:t.toString()}var qe={exports:{}},Do=typeof window<"u"?window:xt!==void 0?xt:typeof self<"u"?self:{},Bo=function(t){if(!t)return!1;var e=No.call(t);return e==="[object Function]"||typeof t=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},No=Object.prototype.toString,Ge=function(t){return t.replace(/^\s+|\s+$/g,"")},Uo=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)Oo.call(n,i)&&(t[i]=n[i])}return t},Oo=Object.prototype.hasOwnProperty,ei=Do,jo=Bo,Fo=function(t){if(!t)return{};for(var e,n={},i=Ge(t).split(`
3
- `),r=0;r<i.length;r++){var o=i[r],l=o.indexOf(":"),p=Ge(o.slice(0,l)).toLowerCase(),v=Ge(o.slice(l+1));n[p]===void 0?n[p]=v:(e=n[p],Object.prototype.toString.call(e)==="[object Array]"?n[p].push(v):n[p]=[n[p],v])}return n},$o=Uo;function ni(t,e,n){var i=t;return jo(e)?(n=e,typeof t=="string"&&(i={uri:t})):i=$o(e,{uri:t}),i.callback=n,i}function ht(t,e,n){return ii(e=ni(t,e,n))}function ii(t){if(t.callback===void 0)throw new Error("callback argument missing");var e=!1,n=function(f,d,h){e||(e=!0,t.callback(f,d,h))};function i(){var f=void 0;if(f=v.response?v.response:v.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var h=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!h)return d.responseXML}catch{}return null}(v),S)try{f=JSON.parse(f)}catch{}return f}function r(f){return clearTimeout(b),f instanceof Error||(f=new Error(""+(f||"Unknown XMLHttpRequest Error"))),f.statusCode=0,n(f,u)}function o(){if(!p){var f;clearTimeout(b),f=t.useXDR&&v.status===void 0?200:v.status===1223?204:v.status;var d=u,h=null;return f!==0?(d={body:i(),statusCode:f,method:E,headers:{},url:C,rawRequest:v},v.getAllResponseHeaders&&(d.headers=Fo(v.getAllResponseHeaders()))):h=new Error("Internal XMLHttpRequest Error"),n(h,d,d.body)}}var l,p,v=t.xhr||null;v||(v=t.cors||t.useXDR?new ht.XDomainRequest:new ht.XMLHttpRequest);var b,C=v.url=t.uri||t.url,E=v.method=t.method||"GET",A=t.body||t.data,D=v.headers=t.headers||{},z=!!t.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:E,url:C,rawRequest:v};if("json"in t&&t.json!==!1&&(S=!0,D.accept||D.Accept||(D.Accept="application/json"),E!=="GET"&&E!=="HEAD"&&(D["content-type"]||D["Content-Type"]||(D["Content-Type"]="application/json"),A=JSON.stringify(t.json===!0?A:t.json))),v.onreadystatechange=function(){v.readyState===4&&setTimeout(o,0)},v.onload=o,v.onerror=r,v.onprogress=function(){},v.onabort=function(){p=!0},v.ontimeout=r,v.open(E,C,!z,t.username,t.password),z||(v.withCredentials=!!t.withCredentials),!z&&t.timeout>0&&(b=setTimeout(function(){if(!p){p=!0,v.abort("timeout");var f=new Error("XMLHttpRequest timeout");f.code="ETIMEDOUT",r(f)}},t.timeout)),v.setRequestHeader)for(l in D)D.hasOwnProperty(l)&&v.setRequestHeader(l,D[l]);else if(t.headers&&!function(f){for(var d in f)if(f.hasOwnProperty(d))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(v.responseType=t.responseType),"beforeSend"in t&&typeof t.beforeSend=="function"&&t.beforeSend(v),v.send(A||null),v}qe.exports=ht,qe.exports.default=ht,ht.XMLHttpRequest=ei.XMLHttpRequest||function(){},ht.XDomainRequest="withCredentials"in new ht.XMLHttpRequest?ht.XMLHttpRequest:ei.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){ht[t==="delete"?"del":t]=function(e,n,i){return(n=ni(e,n,i)).method=t.toUpperCase(),ii(n)}});const Wo=[200,201,202,204,308],Ho=[408,502,503,504];class ri{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=Fe(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{!this.offline||(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(e,n){this.eventTarget.on(e,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(e,n){this.eventTarget.emit(e,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(e=>(this.endpointValue=e,this.endpointValue))}getChunk(){return new Promise(e=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),e(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(e){const n=i=>{i.upload.onprogress=r=>{const o=100/this.totalChunks,l=o*this.file.size,p=o*this.chunkCount,v=r.loaded/(r.total??l)*o;this.dispatch("progress",Math.min(p+v,100))}};return new Promise((i,r)=>{this.currentXhr=qe.exports({...e,beforeSend:n},(o,l)=>(this.currentXhr=void 0,o?r(o):i(l)))})}sendChunk(){if(!this.chunk)return;const e=this.chunkCount*this.chunkByteSize,n=e+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${e}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){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&&Wo.includes(e.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:e}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(e!=null&&Ho.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 qo=t=>new ri(t),Go=new class{hasClass(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}addClass(t,e){this.hasClass(t,e)||(t.className+=" "+e)}removeClass(t,e){if(this.hasClass(t,e)){const n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ")}}toggleClass(t,e){this.hasClass(t,e)?this.removeClass(t,e):this.addClass(t,e)}setCSSProperty(t,e,n){t?.style.setProperty(e,n)}};class Ot{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!Gt.isNullOrEmpty(e)){if(Ot.httpTransport||(Ot.httpTransport=new Gr),this.client=new qr(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")):Mt.emit(nt.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(e)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,n,i){if(this.client)return await this.client.invoke(e,n,i)}encode(e,n,i){if(this.client)return this.client.codec.encode(e,n,i)}decode(e,n){if(this.client)return this.client.codec.decode(e,n)}}class Tt{hproseClient;hpProxyObj;defaultContext=new _e;constructor(e){this.hproseClient=new Ot(e),this.hpProxyObj=null}getClientContext(e,n){const i={};n&&(i.requestHeaders=n);const r=Et();i.httpRequestHeaders=e||{};const o=i.httpRequestHeaders;return r&&(o.token=r.token),B.SystemID&&(o.sysid=B.SystemID,B.SystemGroup&&(o.sysgroup=B.SystemGroup)),new _e(i)}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||Mt.emit(nt.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(e,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(e,n,i)}async hproseInvokeContext(e,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Et();return console.log(r,"userToken3"),r&&(n||(n=new _e({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,i,n)}async hproseInvokeEncode(e){const n=new Fn(e).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(e,...n){const i=this.hproseClient.client?.codec?.encode(e,n,this.defaultContext);return Fn.toString(i)}}class Xo{message;eventBus;constructor(e,n){e&&(this.message=e),n&&(this.eventBus=n)}msg(e,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:e,duration:n});else switch(i){case"info":this.message.info(e,n);break;case"success":this.message.success(e,n);break;case"warning":this.message.warn?this.message.warn(e,n):this.message.warning&&this.message.warning(e,n);break;case"error":this.message.error(e,n)}else{switch(i){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":i="dark",console.error(e)}this.eventBus&&this.eventBus.emit(nt.AlertInfoEvent,{type:i,info:e})}}info(e,n=3){this.msg(e,n,"info")}warn(e,n=3){this.msg(e,n,"warning")}err(e,n=3){this.msg(e,n,"error")}success(e,n=3){this.msg(e,n,"success")}}const Xe=new Map,Vo=function(t,e,n){!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),B.Config.DefaultHproseAPI&&Gt.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new Tt(B.Config.DefaultHproseAPI));const i=B.Config.UI.GrayMode;i&&rt.setGrayMode(i);const r=new Xo(t,B.EventBus);B.Message=r,B.SystemID=e,B.SystemGroup=n,B.EventBus.on(nt.HproseServiceErrorEvent,o=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${o}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.WebAPIErrorEvent,o=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${o}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.AxiosRequestErrorEvent,o=>{const l=`Http\u8BF7\u6C42'${o.code}'\u9519\u8BEF: ${o.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.CommonWarnEvent,o=>{r.warn(o)})};function oi(t){if(t&&Gt.isNotEmpty(t)){if(Xe.has(t))return Xe.get(t);{const e=new Tt(t);return Xe.set(t,e),e}}}function Ko(t){const e=oi(t);return e&&(B.DefaultProxyClient=e),e}const Ve="is_LockScreen",si=ut.get(Ve,!1),Dt={isLock:si,lockTime:si=="true"?ci():0};function ai(t){Dt.isLock=t,ut.set(Ve,t,10),t&&(We(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Yo(){return ut.get(Ve,!1)}function ci(){let t=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(t=B.Config.UI.LockTime),t}let Ke;function Ye(){clearInterval(Ke),!(window.location.href.indexOf("/login")>0||Dt.isLock)&&(ai(!1),Dt.lockTime=ci(),Ke=setInterval(()=>{if(Dt.lockTime--,Dt.lockTime<=0)return ai(!0),clearInterval(Ke)},1e3))}function Jo(){Ye(),document.addEventListener("mousedown",Ye)}function Zo(){document.removeEventListener("mousedown",Ye)}function Je(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Qo={exports:{}},Qt=Qo.exports=function t(e,n,i){function r(p,v){if(!n[p]){if(!e[p]){if(!v&&Je)return Je(p);if(o)return o(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var C=n[p]={exports:{}};e[p][0].call(C.exports,function(E){var A=e[p][1][E];return r(A||E)},C,C.exports,t,e,n,i)}return n[p].exports}for(var o=Je,l=0;l<i.length;l++)r(i[l]);return r}({1:[function(t,e,n){(function(i){var r,o,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var p=0,v=new l(A),b=i.document.createTextNode("");v.observe(b,{characterData:!0}),r=function(){b.data=p=++p%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var z=i.document.createElement("script");z.onreadystatechange=function(){A(),z.onreadystatechange=null,z.parentNode.removeChild(z),z=null},i.document.documentElement.appendChild(z)}:function(){setTimeout(A,0)};else{var C=new i.MessageChannel;C.port1.onmessage=A,r=function(){C.port2.postMessage(0)}}var E=[];function A(){var z,S;o=!0;for(var u=E.length;u;){for(S=E,E=[],z=-1;++z<u;)S[z]();u=E.length}o=!1}function D(z){E.push(z)!==1||o||r()}e.exports=D}).call(this,xt!==void 0?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(t,e,n){var i=t(1);function r(){}var o={},l=["REJECTED"],p=["FULFILLED"],v=["PENDING"];function b(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,h!==r&&D(this,h)}function C(h,g,P){this.promise=h,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function E(h,g,P){i(function(){var I;try{I=g(P)}catch(L){return o.reject(h,L)}I===h?o.reject(h,new TypeError("Cannot resolve promise with itself")):o.resolve(h,I)})}function A(h){var g=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof g=="function")return function(){g.apply(h,arguments)}}function D(h,g){var P=!1;function I(O){P||(P=!0,o.reject(h,O))}function L(O){P||(P=!0,o.resolve(h,O))}function N(){g(L,I)}var j=z(N);j.status==="error"&&I(j.value)}function z(h,g){var P={};try{P.value=h(g),P.status="success"}catch(I){P.status="error",P.value=I}return P}function S(h){return h instanceof this?h:o.resolve(new this(r),h)}function u(h){var g=new this(r);return o.reject(g,h)}function f(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=h.length,I=!1;if(!P)return this.resolve([]);for(var L=new Array(P),N=0,j=-1,O=new this(r);++j<P;)W(h[j],j);return O;function W(et,X){function K(q){L[X]=q,++N!==P||I||(I=!0,o.resolve(O,L))}g.resolve(et).then(K,function(q){I||(I=!0,o.reject(O,q))})}}function d(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=h.length,I=!1;if(!P)return this.resolve([]);for(var L=-1,N=new this(r);++L<P;)j(h[L]);return N;function j(O){g.resolve(O).then(function(W){I||(I=!0,o.resolve(N,W))},function(W){I||(I=!0,o.reject(N,W))})}}e.exports=b,b.prototype.catch=function(h){return this.then(null,h)},b.prototype.then=function(h,g){if(typeof h!="function"&&this.state===p||typeof g!="function"&&this.state===l)return this;var P=new this.constructor(r);return this.state!==v?E(P,this.state===p?h:g,this.outcome):this.queue.push(new C(P,h,g)),P},C.prototype.callFulfilled=function(h){o.resolve(this.promise,h)},C.prototype.otherCallFulfilled=function(h){E(this.promise,this.onFulfilled,h)},C.prototype.callRejected=function(h){o.reject(this.promise,h)},C.prototype.otherCallRejected=function(h){E(this.promise,this.onRejected,h)},o.resolve=function(h,g){var P=z(A,g);if(P.status==="error")return o.reject(h,P.value);var I=P.value;if(I)D(h,I);else{h.state=p,h.outcome=g;for(var L=-1,N=h.queue.length;++L<N;)h.queue[L].callFulfilled(g)}return h},o.reject=function(h,g){h.state=l,h.outcome=g;for(var P=-1,I=h.queue.length;++P<I;)h.queue[P].callRejected(g);return h},b.resolve=S,b.reject=u,b.all=f,b.race=d},{1:1}],3:[function(t,e,n){(function(i){typeof i.Promise!="function"&&(i.Promise=t(2))}).call(this,xt!==void 0?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(t,e,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function r(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function o(){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 l=o();function p(){try{if(!l||!l.open)return!1;var s=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),a=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!s||a)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(s,a){s=s||[],a=a||{};try{return new Blob(s,a)}catch(m){if(m.name!=="TypeError")throw m;for(var c=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),y=0;y<s.length;y+=1)c.append(s[y]);return c.getBlob(a.type)}}typeof Promise>"u"&&t(3);var b=Promise;function C(s,a){a&&s.then(function(c){a(null,c)},function(c){a(c)})}function E(s,a,c){typeof a=="function"&&s.then(a),typeof c=="function"&&s.catch(c)}function A(s){return typeof s!="string"&&(console.warn(s+" used as a key, but it is not a string."),s=String(s)),s}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var z="local-forage-detect-blob-support",S=void 0,u={},f=Object.prototype.toString,d="readonly",h="readwrite";function g(s){for(var a=s.length,c=new ArrayBuffer(a),y=new Uint8Array(c),m=0;m<a;m++)y[m]=s.charCodeAt(m);return c}function P(s){return new b(function(a){var c=s.transaction(z,h),y=v([""]);c.objectStore(z).put(y,"key"),c.onabort=function(m){m.preventDefault(),m.stopPropagation(),a(!1)},c.oncomplete=function(){var m=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);a(w||!m||parseInt(m[1],10)>=43)}}).catch(function(){return!1})}function I(s){return typeof S=="boolean"?b.resolve(S):P(s).then(function(a){return S=a})}function L(s){var a=u[s.name],c={};c.promise=new b(function(y,m){c.resolve=y,c.reject=m}),a.deferredOperations.push(c),a.dbReady?a.dbReady=a.dbReady.then(function(){return c.promise}):a.dbReady=c.promise}function N(s){var a=u[s.name].deferredOperations.pop();if(a)return a.resolve(),a.promise}function j(s,a){var c=u[s.name].deferredOperations.pop();if(c)return c.reject(a),c.promise}function O(s,a){return new b(function(c,y){if(u[s.name]=u[s.name]||mn(),s.db){if(!a)return c(s.db);L(s),s.db.close()}var m=[s.name];a&&m.push(s.version);var w=l.open.apply(l,m);a&&(w.onupgradeneeded=function(x){var k=w.result;try{k.createObjectStore(s.storeName),x.oldVersion<=1&&k.createObjectStore(z)}catch(R){if(R.name!=="ConstraintError")throw R;console.warn('The database "'+s.name+'" has been upgraded from version '+x.oldVersion+" to version "+x.newVersion+', but the storage "'+s.storeName+'" already exists.')}}),w.onerror=function(x){x.preventDefault(),y(w.error)},w.onsuccess=function(){var x=w.result;x.onversionchange=function(k){k.target.close()},c(x),N(s)}})}function W(s){return O(s,!1)}function et(s){return O(s,!0)}function X(s,a){if(!s.db)return!0;var c=!s.db.objectStoreNames.contains(s.storeName),y=s.version<s.db.version,m=s.version>s.db.version;if(y&&(s.version!==a&&console.warn('The database "'+s.name+`" can't be downgraded from version `+s.db.version+" to version "+s.version+"."),s.version=s.db.version),m||c){if(c){var w=s.db.version+1;w>s.version&&(s.version=w)}return!0}return!1}function K(s){return new b(function(a,c){var y=new FileReader;y.onerror=c,y.onloadend=function(m){var w=btoa(m.target.result||"");a({__local_forage_encoded_blob:!0,data:w,type:s.type})},y.readAsBinaryString(s)})}function q(s){return v([g(atob(s.data))],{type:s.type})}function st(s){return s&&s.__local_forage_encoded_blob}function jt(s){var a=this,c=a._initReady().then(function(){var y=u[a._dbInfo.name];if(y&&y.dbReady)return y.dbReady});return E(c,s,s),c}function ye(s){L(s);for(var a=u[s.name],c=a.forages,y=0;y<c.length;y++){var m=c[y];m._dbInfo.db&&(m._dbInfo.db.close(),m._dbInfo.db=null)}return s.db=null,W(s).then(function(w){return s.db=w,X(s)?et(s):w}).then(function(w){s.db=a.db=w;for(var x=0;x<c.length;x++)c[x]._dbInfo.db=w}).catch(function(w){throw j(s,w),w})}function ot(s,a,c,y){y===void 0&&(y=1);try{var m=s.db.transaction(s.storeName,a);c(null,m)}catch(w){if(y>0&&(!s.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return b.resolve().then(function(){if(!s.db||w.name==="NotFoundError"&&!s.db.objectStoreNames.contains(s.storeName)&&s.version<=s.db.version)return s.db&&(s.version=s.db.version+1),et(s)}).then(function(){return ye(s).then(function(){ot(s,a,c,y-1)})}).catch(c);c(w)}}function mn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ni(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=s[y];var m=u[c.name];m||(m=mn(),u[c.name]=m),m.forages.push(a),a._initReady||(a._initReady=a.ready,a.ready=jt);var w=[];function x(){return b.resolve()}for(var k=0;k<m.forages.length;k++){var R=m.forages[k];R!==a&&w.push(R._initReady().catch(x))}var M=m.forages.slice(0);return b.all(w).then(function(){return c.db=m.db,W(c)}).then(function(_){return c.db=_,X(c,a._defaultConfig.version)?et(c):_}).then(function(_){c.db=m.db=_,a._dbInfo=c;for(var T=0;T<M.length;T++){var U=M[T];U!==a&&(U._dbInfo.db=c.db,U._dbInfo.version=c.version)}})}function Ui(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).get(s);R.onsuccess=function(){var M=R.result;M===void 0&&(M=null),st(M)&&(M=q(M)),m(M)},R.onerror=function(){w(R.error)}}catch(M){w(M)}})}).catch(w)});return C(y,a),y}function Oi(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).openCursor(),M=1;R.onsuccess=function(){var _=R.result;if(_){var T=_.value;st(T)&&(T=q(T));var U=s(T,_.key,M++);U!==void 0?m(U):_.continue()}else m()},R.onerror=function(){w(R.error)}}catch(_){w(_)}})}).catch(w)});return C(y,a),y}function ji(s,a,c){var y=this;s=A(s);var m=new b(function(w,x){var k;y.ready().then(function(){return k=y._dbInfo,f.call(a)==="[object Blob]"?I(k.db).then(function(R){return R?a:K(a)}):a}).then(function(R){ot(y._dbInfo,h,function(M,_){if(M)return x(M);try{var T=_.objectStore(y._dbInfo.storeName);R===null&&(R=void 0);var U=T.put(R,s);_.oncomplete=function(){R===void 0&&(R=null),w(R)},_.onabort=_.onerror=function(){var F=U.error?U.error:U.transaction.error;x(F)}}catch(F){x(F)}})}).catch(x)});return C(m,c),m}function Fi(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,h,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).delete(s);k.oncomplete=function(){m()},k.onerror=function(){w(R.error)},k.onabort=function(){var M=R.error?R.error:R.transaction.error;w(M)}}catch(M){w(M)}})}).catch(w)});return C(y,a),y}function $i(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,h,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).clear();x.oncomplete=function(){y()},x.onabort=x.onerror=function(){var R=k.error?k.error:k.transaction.error;m(R)}}catch(R){m(R)}})}).catch(m)});return C(c,s),c}function Wi(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,d,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).count();k.onsuccess=function(){y(k.result)},k.onerror=function(){m(k.error)}}catch(R){m(R)}})}).catch(m)});return C(c,s),c}function Hi(s,a){var c=this,y=new b(function(m,w){s<0?m(null):c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName),M=!1,_=R.openKeyCursor();_.onsuccess=function(){var T=_.result;T?s===0||M?m(T.key):(M=!0,T.advance(s)):m(null)},_.onerror=function(){w(_.error)}}catch(T){w(T)}})}).catch(w)});return C(y,a),y}function qi(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,d,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).openKeyCursor(),R=[];k.onsuccess=function(){var M=k.result;M?(R.push(M.key),M.continue()):y(R)},k.onerror=function(){m(k.error)}}catch(M){m(M)}})}).catch(m)});return C(c,s),c}function Gi(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;if(s.name){var w=s.name===c.name&&m._dbInfo.db?b.resolve(m._dbInfo.db):W(s).then(function(x){var k=u[s.name],R=k.forages;k.db=x;for(var M=0;M<R.length;M++)R[M]._dbInfo.db=x;return x});y=s.storeName?w.then(function(x){if(x.objectStoreNames.contains(s.storeName)){var k=x.version+1;L(s);var R=u[s.name],M=R.forages;x.close();for(var _=0;_<M.length;_++){var T=M[_];T._dbInfo.db=null,T._dbInfo.version=k}var U=new b(function(F,$){var G=l.open(s.name,k);G.onerror=function(at){G.result.close(),$(at)},G.onupgradeneeded=function(){G.result.deleteObjectStore(s.storeName)},G.onsuccess=function(){var at=G.result;at.close(),F(at)}});return U.then(function(F){R.db=F;for(var $=0;$<M.length;$++){var G=M[$];G._dbInfo.db=F,N(G._dbInfo)}}).catch(function(F){throw(j(s,F)||b.resolve()).catch(function(){}),F})}}):w.then(function(x){L(s);var k=u[s.name],R=k.forages;x.close();for(var M=0;M<R.length;M++)R[M]._dbInfo.db=null;var _=new b(function(T,U){var F=l.deleteDatabase(s.name);F.onerror=function(){var $=F.result;$&&$.close(),U(F.error)},F.onblocked=function(){console.warn('dropInstance blocked for database "'+s.name+'" until all open connections are closed')},F.onsuccess=function(){var $=F.result;$&&$.close(),T($)}});return _.then(function(T){k.db=T;for(var U=0;U<R.length;U++)N(R[U]._dbInfo)}).catch(function(T){throw(j(s,T)||b.resolve()).catch(function(){}),T})})}else y=b.reject("Invalid arguments");return C(y,a),y}var Xi={_driver:"asyncStorage",_initStorage:Ni,_support:p(),iterate:Oi,getItem:Ui,setItem:ji,removeItem:Fi,clear:$i,length:Wi,key:Hi,keys:qi,dropInstance:Gi};function Vi(){return typeof openDatabase=="function"}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ki="~~local_forage_type~",gn=/^~~local_forage_type~([^~]+)~/,Ft="__lfsc__:",we=Ft.length,be="arbf",Se="blob",vn="si08",yn="ui08",wn="uic8",bn="si16",Sn="si32",xn="ur16",Cn="ui32",En="fl32",kn="fl64",zn=we+be.length,In=Object.prototype.toString;function Rn(s){var a,c,y,m,w,x=.75*s.length,k=s.length,R=0;s[s.length-1]==="="&&(x--,s[s.length-2]==="="&&x--);var M=new ArrayBuffer(x),_=new Uint8Array(M);for(a=0;a<k;a+=4)c=dt.indexOf(s[a]),y=dt.indexOf(s[a+1]),m=dt.indexOf(s[a+2]),w=dt.indexOf(s[a+3]),_[R++]=c<<2|y>>4,_[R++]=(15&y)<<4|m>>2,_[R++]=(3&m)<<6|63&w;return M}function xe(s){var a,c=new Uint8Array(s),y="";for(a=0;a<c.length;a+=3)y+=dt[c[a]>>2],y+=dt[(3&c[a])<<4|c[a+1]>>4],y+=dt[(15&c[a+1])<<2|c[a+2]>>6],y+=dt[63&c[a+2]];return c.length%3==2?y=y.substring(0,y.length-1)+"=":c.length%3==1&&(y=y.substring(0,y.length-2)+"=="),y}function Yi(s,a){var c="";if(s&&(c=In.call(s)),s&&(c==="[object ArrayBuffer]"||s.buffer&&In.call(s.buffer)==="[object ArrayBuffer]")){var y,m=Ft;s instanceof ArrayBuffer?(y=s,m+=be):(y=s.buffer,c==="[object Int8Array]"?m+=vn:c==="[object Uint8Array]"?m+=yn:c==="[object Uint8ClampedArray]"?m+=wn:c==="[object Int16Array]"?m+=bn:c==="[object Uint16Array]"?m+=xn:c==="[object Int32Array]"?m+=Sn:c==="[object Uint32Array]"?m+=Cn:c==="[object Float32Array]"?m+=En:c==="[object Float64Array]"?m+=kn:a(new Error("Failed to get type for BinaryArray"))),a(m+xe(y))}else if(c==="[object Blob]"){var w=new FileReader;w.onload=function(){var x=Ki+s.type+"~"+xe(this.result);a(Ft+Se+x)},w.readAsArrayBuffer(s)}else try{a(JSON.stringify(s))}catch(x){console.error("Couldn't convert value into a JSON string: ",s),a(null,x)}}function Ji(s){if(s.substring(0,we)!==Ft)return JSON.parse(s);var a,c=s.substring(zn),y=s.substring(we,zn);if(y===Se&&gn.test(c)){var m=c.match(gn);a=m[1],c=c.substring(m[0].length)}var w=Rn(c);switch(y){case be:return w;case Se:return v([w],{type:a});case vn:return new Int8Array(w);case yn:return new Uint8Array(w);case wn:return new Uint8ClampedArray(w);case bn:return new Int16Array(w);case xn:return new Uint16Array(w);case Sn:return new Int32Array(w);case Cn:return new Uint32Array(w);case En:return new Float32Array(w);case kn:return new Float64Array(w);default:throw new Error("Unkown type: "+y)}}var Ce={serialize:Yi,deserialize:Ji,stringToBuffer:Rn,bufferToString:xe};function Mn(s,a,c,y){s.executeSql("CREATE TABLE IF NOT EXISTS "+a.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,y)}function Zi(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=typeof s[y]!="string"?s[y].toString():s[y];var m=new b(function(w,x){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(k){return x(k)}c.db.transaction(function(k){Mn(k,c,function(){a._dbInfo=c,w()},function(R,M){x(M)})},x)});return c.serializer=Ce,m}function ft(s,a,c,y,m,w){s.executeSql(c,y,m,function(x,k){k.code===k.SYNTAX_ERR?x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[a.storeName],function(R,M){M.rows.length?w(R,k):Mn(R,a,function(){R.executeSql(c,y,m,w)},w)},w):w(x,k)},w)}function Qi(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT * FROM "+x.storeName+" WHERE key = ? LIMIT 1",[s],function(R,M){var _=M.rows.length?M.rows.item(0).value:null;_&&(_=x.serializer.deserialize(_)),m(_)},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function tr(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT * FROM "+x.storeName,[],function(R,M){for(var _=M.rows,T=_.length,U=0;U<T;U++){var F=_.item(U),$=F.value;if($&&($=x.serializer.deserialize($)),($=s($,F.key,U+1))!==void 0)return void m($)}m()},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function _n(s,a,c,y){var m=this;s=A(s);var w=new b(function(x,k){m.ready().then(function(){a===void 0&&(a=null);var R=a,M=m._dbInfo;M.serializer.serialize(a,function(_,T){T?k(T):M.db.transaction(function(U){ft(U,M,"INSERT OR REPLACE INTO "+M.storeName+" (key, value) VALUES (?, ?)",[s,_],function(){x(R)},function(F,$){k($)})},function(U){if(U.code===U.QUOTA_ERR){if(y>0)return void x(_n.apply(m,[s,R,c,y-1]));k(U)}})})}).catch(k)});return C(w,c),w}function er(s,a,c){return _n.apply(this,[s,a,c,1])}function nr(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"DELETE FROM "+x.storeName+" WHERE key = ?",[s],function(){m()},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function ir(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"DELETE FROM "+w.storeName,[],function(){y()},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function rr(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(k,R){var M=R.rows.item(0).c;y(M)},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function or(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT key FROM "+x.storeName+" WHERE id = ? LIMIT 1",[s+1],function(R,M){var _=M.rows.length?M.rows.item(0).key:null;m(_)},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function sr(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"SELECT key FROM "+w.storeName,[],function(k,R){for(var M=[],_=0;_<R.rows.length;_++)M.push(R.rows.item(_).key);y(M)},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function ar(s){return new b(function(a,c){s.transaction(function(y){y.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(m,w){for(var x=[],k=0;k<w.rows.length;k++)x.push(w.rows.item(k).name);a({db:s,storeNames:x})},function(m,w){c(w)})},function(y){c(y)})})}function cr(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;return y=s.name?new b(function(w){var x;x=s.name===c.name?m._dbInfo.db:openDatabase(s.name,"","",0),s.storeName?w({db:x,storeNames:[s.storeName]}):w(ar(x))}).then(function(w){return new b(function(x,k){w.db.transaction(function(R){function M(F){return new b(function($,G){R.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(at,ze){G(ze)})})}for(var _=[],T=0,U=w.storeNames.length;T<U;T++)_.push(M(w.storeNames[T]));b.all(_).then(function(){x()}).catch(function(F){k(F)})},function(R){k(R)})})}):b.reject("Invalid arguments"),C(y,a),y}var ur={_driver:"webSQLStorage",_initStorage:Zi,_support:Vi(),iterate:tr,getItem:Qi,setItem:er,removeItem:nr,clear:ir,length:rr,key:or,keys:sr,dropInstance:cr};function lr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ln(s,a){var c=s.name+"/";return s.storeName!==a.storeName&&(c+=s.storeName+"/"),c}function hr(){var s="_localforage_support_test";try{return localStorage.setItem(s,!0),localStorage.removeItem(s),!1}catch{return!0}}function dr(){return!hr()||localStorage.length>0}function fr(s){var a=this,c={};if(s)for(var y in s)c[y]=s[y];return c.keyPrefix=Ln(s,a._defaultConfig),dr()?(a._dbInfo=c,c.serializer=Ce,b.resolve()):b.reject()}function pr(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo.keyPrefix,m=localStorage.length-1;m>=0;m--){var w=localStorage.key(m);w.indexOf(y)===0&&localStorage.removeItem(w)}});return C(c,s),c}function mr(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo,w=localStorage.getItem(m.keyPrefix+s);return w&&(w=m.serializer.deserialize(w)),w});return C(y,a),y}function gr(s,a){var c=this,y=c.ready().then(function(){for(var m=c._dbInfo,w=m.keyPrefix,x=w.length,k=localStorage.length,R=1,M=0;M<k;M++){var _=localStorage.key(M);if(_.indexOf(w)===0){var T=localStorage.getItem(_);if(T&&(T=m.serializer.deserialize(T)),(T=s(T,_.substring(x),R++))!==void 0)return T}}});return C(y,a),y}function vr(s,a){var c=this,y=c.ready().then(function(){var m,w=c._dbInfo;try{m=localStorage.key(s)}catch{m=null}return m&&(m=m.substring(w.keyPrefix.length)),m});return C(y,a),y}function yr(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo,m=localStorage.length,w=[],x=0;x<m;x++){var k=localStorage.key(x);k.indexOf(y.keyPrefix)===0&&w.push(k.substring(y.keyPrefix.length))}return w});return C(c,s),c}function wr(s){var a=this.keys().then(function(c){return c.length});return C(a,s),a}function br(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo;localStorage.removeItem(m.keyPrefix+s)});return C(y,a),y}function Sr(s,a,c){var y=this;s=A(s);var m=y.ready().then(function(){a===void 0&&(a=null);var w=a;return new b(function(x,k){var R=y._dbInfo;R.serializer.serialize(a,function(M,_){if(_)k(_);else try{localStorage.setItem(R.keyPrefix+s,M),x(w)}catch(T){T.name!=="QuotaExceededError"&&T.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(T),k(T)}})})});return C(m,c),m}function xr(s,a){if(a=D.apply(this,arguments),!(s=typeof s!="function"&&s||{}).name){var c=this.config();s.name=s.name||c.name,s.storeName=s.storeName||c.storeName}var y,m=this;return y=s.name?new b(function(w){s.storeName?w(Ln(s,m._defaultConfig)):w(s.name+"/")}).then(function(w){for(var x=localStorage.length-1;x>=0;x--){var k=localStorage.key(x);k.indexOf(w)===0&&localStorage.removeItem(k)}}):b.reject("Invalid arguments"),C(y,a),y}var Cr={_driver:"localStorageWrapper",_initStorage:fr,_support:lr(),iterate:gr,getItem:mr,setItem:Sr,removeItem:br,clear:pr,length:wr,key:vr,keys:yr,dropInstance:xr},Er=function(s,a){return s===a||typeof s=="number"&&typeof a=="number"&&isNaN(s)&&isNaN(a)},kr=function(s,a){for(var c=s.length,y=0;y<c;){if(Er(s[y],a))return!0;y++}return!1},An=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},Lt={},Pn={},It={INDEXEDDB:Xi,WEBSQL:ur,LOCALSTORAGE:Cr},zr=[It.INDEXEDDB._driver,It.WEBSQL._driver,It.LOCALSTORAGE._driver],$t=["dropInstance"],Ee=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat($t),Ir={description:"",driver:zr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Rr(s,a){s[a]=function(){var c=arguments;return s.ready().then(function(){return s[a].apply(s,c)})}}function ke(){for(var s=1;s<arguments.length;s++){var a=arguments[s];if(a)for(var c in a)a.hasOwnProperty(c)&&(An(a[c])?arguments[0][c]=a[c].slice():arguments[0][c]=a[c])}return arguments[0]}var Mr=function(){function s(a){for(var c in r(this,s),It)if(It.hasOwnProperty(c)){var y=It[c],m=y._driver;this[c]=m,Lt[m]||this.defineDriver(y)}this._defaultConfig=ke({},Ir),this._config=ke({},this._defaultConfig,a),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return s.prototype.config=function(a){if((a===void 0?"undefined":i(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var c in a){if(c==="storeName"&&(a[c]=a[c].replace(/\W/g,"_")),c==="version"&&typeof a[c]!="number")return new Error("Database version must be a number.");this._config[c]=a[c]}return!("driver"in a)||!a.driver||this.setDriver(this._config.driver)}return typeof a=="string"?this._config[a]:this._config},s.prototype.defineDriver=function(a,c,y){var m=new b(function(w,x){try{var k=a._driver,R=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver)return void x(R);for(var M=Ee.concat("_initStorage"),_=0,T=M.length;_<T;_++){var U=M[_];if((!kr($t,U)||a[U])&&typeof a[U]!="function")return void x(R)}var F=function(){for(var G=function(Lr){return function(){var Ar=new Error("Method "+Lr+" is not implemented by the current driver"),Tn=b.reject(Ar);return C(Tn,arguments[arguments.length-1]),Tn}},at=0,ze=$t.length;at<ze;at++){var Ie=$t[at];a[Ie]||(a[Ie]=G(Ie))}};F();var $=function(G){Lt[k]&&console.info("Redefining LocalForage driver: "+k),Lt[k]=a,Pn[k]=G,w()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then($,x):$(!!a._support):$(!0)}catch(G){x(G)}});return E(m,c,y),m},s.prototype.driver=function(){return this._driver||null},s.prototype.getDriver=function(a,c,y){var m=Lt[a]?b.resolve(Lt[a]):b.reject(new Error("Driver not found."));return E(m,c,y),m},s.prototype.getSerializer=function(a){var c=b.resolve(Ce);return E(c,a),c},s.prototype.ready=function(a){var c=this,y=c._driverSet.then(function(){return c._ready===null&&(c._ready=c._initDriver()),c._ready});return E(y,a,a),y},s.prototype.setDriver=function(a,c,y){var m=this;An(a)||(a=[a]);var w=this._getSupportedDrivers(a);function x(){m._config.driver=m.driver()}function k(_){return m._extend(_),x(),m._ready=m._initStorage(m._config),m._ready}function R(_){return function(){var T=0;function U(){for(;T<_.length;){var F=_[T];return T++,m._dbInfo=null,m._ready=null,m.getDriver(F).then(k).catch(U)}x();var $=new Error("No available storage method found.");return m._driverSet=b.reject($),m._driverSet}return U()}}var M=this._driverSet!==null?this._driverSet.catch(function(){return b.resolve()}):b.resolve();return this._driverSet=M.then(function(){var _=w[0];return m._dbInfo=null,m._ready=null,m.getDriver(_).then(function(T){m._driver=T._driver,x(),m._wrapLibraryMethodsWithReady(),m._initDriver=R(w)})}).catch(function(){x();var _=new Error("No available storage method found.");return m._driverSet=b.reject(_),m._driverSet}),E(this._driverSet,c,y),this._driverSet},s.prototype.supports=function(a){return!!Pn[a]},s.prototype._extend=function(a){ke(this,a)},s.prototype._getSupportedDrivers=function(a){for(var c=[],y=0,m=a.length;y<m;y++){var w=a[y];this.supports(w)&&c.push(w)}return c},s.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,c=Ee.length;a<c;a++)Rr(this,Ee[a])},s.prototype.createInstance=function(a){return new s(a)},s}(),_r=new Mr;e.exports=_r},{3:3}]},{},[4])(4),ui={exports:{}};(function(t){((e,n)=>{t.exports=n()})(0,()=>{const e=typeof window=="object"?window:this;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=e.WebStreamsPolyfill||{},o=e.isSecureContext;let l=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const p=o||"MozAppearance"in document.documentElement.style?"iframe":"navigate",v={createWriteStream:function(C,E,A){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},z=0,S=null,u=null,f=null;if(Number.isFinite(E)?([A,E]=[E,A],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=E):E&&E.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=E):D=E||{},!l){n||(n=o?b(v.mitm):function(P){const I="width=200,height=100",L=document.createDocumentFragment(),N={frame:e.open(P,"popup",I),loaded:!1,isIframe:!1,isPopup:!0,remove(){N.frame.close()},addEventListener(...O){L.addEventListener(...O)},dispatchEvent(...O){L.dispatchEvent(...O)},removeEventListener(...O){L.removeEventListener(...O)},postMessage(...O){N.frame.postMessage(...O)}},j=O=>{O.source===N.frame&&(N.loaded=!0,e.removeEventListener("message",j),N.dispatchEvent(new Event("load")))};return e.addEventListener("message",j),N}(v.mitm)),u=new MessageChannel,C=encodeURIComponent(C.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const h={transferringReadable:i,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+C,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+C}};D.size&&(h.headers["Content-Length"]=D.size);const g=[h,"*",[u.port2]];if(i){const P=p==="iframe"?void 0:{transform(L,N){if(!(L instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");z+=L.length,N.enqueue(L),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};f=new v.TransformStream(P,D.writableStrategy,D.readableStrategy);const I=f.readable;u.port1.postMessage({readableStream:I},[I])}u.port1.onmessage=P=>{P.data.download?p==="navigate"?(n.remove(),n=null,z?location.href=P.data.download:S=P.data.download):(n.isPopup&&(n.remove(),n=null,p==="iframe"&&b(v.mitm)),b(P.data.download)):P.data.abort&&(d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...g):n.addEventListener("load",()=>{n.postMessage(...g)},{once:!0})}let d=[];return!l&&f&&f.writable||new v.WritableStream({write(h){if(!(h instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");l?d.push(h):(u.port1.postMessage(h),z+=h.length,S&&(location.href=S,S=null))},close(){if(l){const h=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),g=document.createElement("a");g.href=URL.createObjectURL(h),g.download=C,g.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=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 b(C){if(!C)throw new Error("meh");const E=document.createElement("iframe");return E.hidden=!0,E.src=C,E.loaded=!1,E.name="iframe",E.isIframe=!0,E.postMessage=(...A)=>E.contentWindow.postMessage(...A),E.addEventListener("load",()=>{E.loaded=!0},{once:!0}),document.body.appendChild(E),E}try{new Response(new ReadableStream),o&&!("serviceWorker"in navigator)&&(l=!0)}catch{l=!0}return(C=>{try{C()}catch{}})(()=>{const{readable:C}=new TransformStream,E=new MessageChannel;E.port1.postMessage(C,[C]),E.port1.close(),E.port2.close(),i=!0,Object.defineProperty(v,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),v})})(ui);var ts=ui.exports;class es{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,n,i=3,r=6,o=6e4){this.fileID=e,this.downloadURL=n,this.chunkByteSize=i*this.ChunkUnitM,this.eventTarget=Fe(),this.initIndexDB(),r>=3&&(this.cacheSize=r),o>this.requestTimeout&&(this.requestTimeout=o)}on(e,n){this.eventTarget.on(e,n)}dispatch(e,n){this.eventTarget.emit(e,n)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,n="",i){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await lt(n,e,i);let o=null;return r&&r.status===200&&(o=r.data),o}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Qt.createInstance({name:this.fileID,driver:Qt.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const n="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Qt.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(n=>setTimeout(n,e))}async download(e,n){let i=e;if(!i&&this.downloadURL&&(i=this.downloadURL),!i)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 o={key:this.fileMetaData?.downloadID};let l=0;const p=this.cacheSize;let v=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){l++,l>this.finishNum&&(this.finishNum=l,this.downloadProgress());continue}const C=b*this.chunkByteSize;let E=C+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const A={range:`bytes=${C}-${E}`};for(;v>=p;)await this.sleep(200);const D=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),v++,lt(i,n,o,A,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async z=>{const S=z.data;v--,await this.currentDB?.setItem(D,S),l++,l>this.finishNum&&(this.finishNum=l,this.downloadProgress());const u=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(z=>{v--;const S=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${S}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const n=100*e/this.totalChunks;this.dispatch("saveProgress",n)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=ts.createWriteStream(this.fileName).getWriter();let n=0;for(let i=0;i<this.totalChunks;i++){const r=i.toString();let o=await this.currentDB?.getItem(r);if(o||(o=await this.currentDB?.getItem(r)),!o)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let l=new Response(o).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const p=l.getReader();for(;;){const{done:v,value:b}=await p.read();if(v)break;await e.write(b)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${i+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Qt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function ns(t,e){let n="",i="";for(const r in e)n+=r+"="+encodeURIComponent(e[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(t)?t+n:t.replace(/\/?$/,"?")+n,i}function li(t={},e={}){let n;for(n in e)St(e[n])?li(t[n],e[n]):t[n]=e[n];return t}function is(t,e){const n=`${t}_${e}`;return rt.MD5(n)}function hi(t){const e=function(p){if(!p)return;const v=p,b=[];if(v)for(let C of v){const E=di(C);E&&b.push(E)}return b}(t.bussinessRoutes),n=function(p){if(!p)return;const v=p;if(v&&v.length>0){const b=[];return v.forEach(C=>{const E=fi(C);E&&b.push(E)}),b}}(t.widgetMenuConfig),i=function(p){if(p&&p.length>0){const v=[];return p.forEach(b=>{const C=function(E){return E?{id:E.id,label:E.label,container:E.container,preload:E.preload,afterid:E.afterid,bindid:E.bindid,group:E.group}:void 0}(b);C&&v.push(C)}),v}}(t.widgetConfig),r=function(p){if(p&&p.length>0)return p}(t.functionList),o=t.pkgObject.version,l=t.pkgObject.name;return{id:is(l,o),name:B.Config.UI.SiteTitle,group:B.Config.UI.Group,product:l,version:o,routes:e,widgetMenu:n,widgets:i,functions:r}}function di(t){if(t){let e=0;t.meta?.hidden&&(e=1);let n={path:t.path,name:t.name,title:t.meta?.title,type:e,index:t.meta?.index};if(t.children){const i=[];for(let r of t.children){const o=di(r);o&&i.push(o)}i.length>0&&(n.children=i)}return n}}function fi(t){if(!t)return;const e={name:t.name,index:t.index,path:t.path,type:t.type};return t.children&&t.children.length>0&&(e.children=[],t.children.forEach(n=>{const i=fi(n);i&&e.children?.push(i)})),e}function rs(t,e="IconifyList.ts"){let n="",i=`const iconlist={
3
+ `),r=0;r<i.length;r++){var o=i[r],l=o.indexOf(":"),p=Ge(o.slice(0,l)).toLowerCase(),v=Ge(o.slice(l+1));n[p]===void 0?n[p]=v:(e=n[p],Object.prototype.toString.call(e)==="[object Array]"?n[p].push(v):n[p]=[n[p],v])}return n},$o=Uo;function ni(t,e,n){var i=t;return jo(e)?(n=e,typeof t=="string"&&(i={uri:t})):i=$o(e,{uri:t}),i.callback=n,i}function ht(t,e,n){return ii(e=ni(t,e,n))}function ii(t){if(t.callback===void 0)throw new Error("callback argument missing");var e=!1,n=function(f,d,h){e||(e=!0,t.callback(f,d,h))};function i(){var f=void 0;if(f=v.response?v.response:v.responseText||function(d){try{if(d.responseType==="document")return d.responseXML;var h=d.responseXML&&d.responseXML.documentElement.nodeName==="parsererror";if(d.responseType===""&&!h)return d.responseXML}catch{}return null}(v),S)try{f=JSON.parse(f)}catch{}return f}function r(f){return clearTimeout(b),f instanceof Error||(f=new Error(""+(f||"Unknown XMLHttpRequest Error"))),f.statusCode=0,n(f,u)}function o(){if(!p){var f;clearTimeout(b),f=t.useXDR&&v.status===void 0?200:v.status===1223?204:v.status;var d=u,h=null;return f!==0?(d={body:i(),statusCode:f,method:E,headers:{},url:C,rawRequest:v},v.getAllResponseHeaders&&(d.headers=Fo(v.getAllResponseHeaders()))):h=new Error("Internal XMLHttpRequest Error"),n(h,d,d.body)}}var l,p,v=t.xhr||null;v||(v=t.cors||t.useXDR?new ht.XDomainRequest:new ht.XMLHttpRequest);var b,C=v.url=t.uri||t.url,E=v.method=t.method||"GET",A=t.body||t.data,D=v.headers=t.headers||{},z=!!t.sync,S=!1,u={body:void 0,headers:{},statusCode:0,method:E,url:C,rawRequest:v};if("json"in t&&t.json!==!1&&(S=!0,D.accept||D.Accept||(D.Accept="application/json"),E!=="GET"&&E!=="HEAD"&&(D["content-type"]||D["Content-Type"]||(D["Content-Type"]="application/json"),A=JSON.stringify(t.json===!0?A:t.json))),v.onreadystatechange=function(){v.readyState===4&&setTimeout(o,0)},v.onload=o,v.onerror=r,v.onprogress=function(){},v.onabort=function(){p=!0},v.ontimeout=r,v.open(E,C,!z,t.username,t.password),z||(v.withCredentials=!!t.withCredentials),!z&&t.timeout>0&&(b=setTimeout(function(){if(!p){p=!0,v.abort("timeout");var f=new Error("XMLHttpRequest timeout");f.code="ETIMEDOUT",r(f)}},t.timeout)),v.setRequestHeader)for(l in D)D.hasOwnProperty(l)&&v.setRequestHeader(l,D[l]);else if(t.headers&&!function(f){for(var d in f)if(f.hasOwnProperty(d))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(v.responseType=t.responseType),"beforeSend"in t&&typeof t.beforeSend=="function"&&t.beforeSend(v),v.send(A||null),v}qe.exports=ht,qe.exports.default=ht,ht.XMLHttpRequest=ei.XMLHttpRequest||function(){},ht.XDomainRequest="withCredentials"in new ht.XMLHttpRequest?ht.XMLHttpRequest:ei.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){ht[t==="delete"?"del":t]=function(e,n,i){return(n=ni(e,n,i)).method=t.toUpperCase(),ii(n)}});const Wo=[200,201,202,204,308],Ho=[408,502,503,504];class ri{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=Fe(),this.validateOptions(),this.getEndpoint().then(()=>this.sendChunks()),typeof window<"u"&&(window.addEventListener("online",()=>{!this.offline||(this.offline=!1,this.dispatch("online"),this.sendChunks())}),window.addEventListener("offline",()=>{this.offline=!0,this.dispatch("offline")}))}on(e,n){this.eventTarget.on(e,n)}abort(){this.pause(),this.currentXhr?.abort()}pause(){this.paused=!0}resume(){this.paused&&(this.paused=!1,this.sendChunks())}dispatch(e,n){this.eventTarget.emit(e,n)}validateOptions(){if(!this.endpoint||typeof this.endpoint!="function"&&typeof this.endpoint!="string")throw new TypeError("endpoint\u5FC5\u987B\u4E3A\uFF1A\u6587\u4EF6\u4E0A\u4F20URL\u5B57\u7B26\u4E32\uFF0C\u6216\u8FD4\u56DE\u5730\u5740\u7684\u51FD\u6570\uFF01");if(!(this.file instanceof File))throw new TypeError("file\u5FC5\u987B\u4E3A\u6587\u4EF6\u5BF9\u8C61");if(this.headers&&typeof this.headers!="object")throw new TypeError("\u6587\u4EF6\u5934\u5FC5\u987B\u4E3A\u5BF9\u8C61\u6216\u7A7A\uFF01");if(this.chunkSize&&(typeof this.chunkSize!="number"||this.chunkSize<=0||this.chunkSize%256!=0))throw new TypeError("chunkSize\u5FC5\u987B\u5927\u4E8E0,\u5E76\u662F256\u7684\u6574\u6570\u500D");if(this.maxFileBytes>0&&this.maxFileBytes<this.file.size)throw new Error(`\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u5141\u8BB8\u503C\uFF1A(${this.file.size} > ${this.maxFileBytes})`);if(this.attempts&&(typeof this.attempts!="number"||this.attempts<=0))throw new TypeError("\u91CD\u8BD5\u6B21\u6570\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01");if(this.delayBeforeAttempt&&(typeof this.delayBeforeAttempt!="number"||this.delayBeforeAttempt<0))throw new TypeError("\u5EF6\u65F6\u91CD\u8BD5\u65F6\u95F4\u5FC5\u987B\u4E3A\u6B63\u6570\uFF01\u9ED8\u8BA4\u4E3A1")}getEndpoint(){return typeof this.endpoint=="string"?(this.endpointValue=this.endpoint,Promise.resolve(this.endpoint)):this.endpoint(this.file).then(e=>(this.endpointValue=e,this.endpointValue))}getChunk(){return new Promise(e=>{const n=this.totalChunks===1?this.file.size:this.chunkByteSize,i=n*this.chunkCount;this.reader.onload=()=>{this.reader.result!==null&&(this.chunk=new Blob([this.reader.result],{type:"application/octet-stream"})),e(()=>{})},this.reader.readAsArrayBuffer(this.file.slice(i,i+n))})}xhrPromise(e){const n=i=>{i.upload.onprogress=r=>{const o=100/this.totalChunks,l=o*this.file.size,p=o*this.chunkCount,v=r.loaded/(r.total??l)*o;this.dispatch("progress",Math.min(p+v,100))}};return new Promise((i,r)=>{this.currentXhr=qe.exports({...e,beforeSend:n},(o,l)=>(this.currentXhr=void 0,o?r(o):i(l)))})}sendChunk(){if(!this.chunk)return;const e=this.chunkCount*this.chunkByteSize,n=e+this.chunk.size-1,i={...this.headers,FileName:this.fileName,FileMD5:this.md5,"Content-Type":this.file.type,"Content-Range":`bytes ${e}-${n}/${this.file.size}`};if(this.dispatch("attempt",{chunkNumber:this.chunkCount,chunkSize:this.chunk.size}),this.endpointValue)return this.xhrPromise({headers:i,url:this.endpointValue,method:this.method,body:this.chunk});console.warn("\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),this.dispatch("error",{message:"\u6587\u4EF6\u4E0A\u4F20endpointValue\u4E0D\u80FD\u4E3A\u7A7A\uFF01\u53D6\u6D88\u4E0A\u4F20\uFF01",chunk:this.chunkCount,attempts:this.attemptCount})}manageRetries(){if(this.attemptCount<this.attempts)return setTimeout(()=>this.sendChunks(),1e3*this.delayBeforeAttempt),void this.dispatch("attemptFailure",{message:`\u4E0A\u4F20\u5206\u7247\uFF1A${this.chunkCount}\u5931\u8D25\u3002\u8FD8\u4F1A\u518D\u5C1D\u8BD5 ${this.attempts-this.attemptCount}\u6B21\uFF01`,chunkNumber:this.chunkCount,attemptsLeft:this.attempts-this.attemptCount});this.dispatch("error",{message:`\u4E0A\u4F20\u5206\u7247\u9519\u8BEF\uFF1A ${this.chunkCount}\u3002\u505C\u6B62\u5C1D\u8BD5\uFF0C\u53D6\u6D88\u4E0A\u4F20\uFF01`,chunk:this.chunkCount,attempts:this.attemptCount})}sendChunks(){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&&Wo.includes(e.statusCode)){this.dispatch("chunkSuccess",{chunk:this.chunkCount,attempts:this.attemptCount,response:e}),this.attemptCount=0,this.chunkCount=this.chunkCount+1,this.chunkCount<this.totalChunks?this.sendChunks():(this.success=!0,this.dispatch("success"));const n=this.chunkCount/this.totalChunks*this.file.size*100/this.file.size;this.dispatch("progress",n)}else if(e!=null&&Ho.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 qo=t=>new ri(t),Go=new class{hasClass(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}addClass(t,e){this.hasClass(t,e)||(t.className+=" "+e)}removeClass(t,e){if(this.hasClass(t,e)){const n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ")}}toggleClass(t,e){this.hasClass(t,e)?this.removeClass(t,e):this.addClass(t,e)}setCSSProperty(t,e,n){t?.style.setProperty(e,n)}};class Ot{hproseURL;client;hproseProxy;static httpTransport;constructor(e){if(e&&!Gt.isNullOrEmpty(e)){if(Ot.httpTransport||(Ot.httpTransport=new Gr),this.client=new qr(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")):Mt.emit(nt.HproseServiceErrorEvent,"\u521D\u59CB\u5316\u9ED8\u8BA4Hprose!"),console.warn(e)})}async getProxy(){if(!this.hproseProxy)try{this.client&&(this.hproseProxy=await this.client.useServiceAsync())}catch(e){console.warn(e),this.hproseProxy=this.client?.useService()}return this.hproseProxy}async invoke(e,n,i){if(this.client)return await this.client.invoke(e,n,i)}encode(e,n,i){if(this.client)return this.client.codec.encode(e,n,i)}decode(e,n){if(this.client)return this.client.codec.decode(e,n)}}class Tt{hproseClient;hpProxyObj;defaultContext=new _e;constructor(e){this.hproseClient=new Ot(e),this.hpProxyObj=null}getClientContext(e,n){const i={};n&&(i.requestHeaders=n);const r=Et();i.httpRequestHeaders=e||{};const o=i.httpRequestHeaders;return r&&(o.token=r.token),B.SystemID&&(o.sysid=B.SystemID,B.SystemGroup&&(o.sysgroup=B.SystemGroup)),new _e(i)}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||Mt.emit(nt.HproseServiceErrorEvent,"HproseProxy\u5BF9\u8C61\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5\uFF01"),this.hpProxyObj}async hproseInvoke(e,n,i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");return await this.hproseClient.invoke(e,n,i)}async hproseInvokeContext(e,n,...i){if(!this.hproseClient)throw new Error("HproseClient\u5BF9\u8C61\u4E3A\u6784\u5EFA\uFF0C\u65E0\u6CD5\u8C03\u7528Hprose\u65B9\u6CD5");const r=Et();return console.log(r,"userToken3"),r&&(n||(n=new _e({httpRequestHeaders:{token:r.token}}))),await this.hproseClient.invoke(e,i,n)}async hproseInvokeEncode(e){const n=new Fn(e).toBytes(),i=await this.hproseClient.client?.request(n,this.defaultContext);return i&&this.hproseClient.client?.codec.decode(i,this.defaultContext)}encodeRequest(e,...n){const i=this.hproseClient.client?.codec?.encode(e,n,this.defaultContext);return Fn.toString(i)}}class Xo{message;eventBus;constructor(e,n){e&&(this.message=e),n&&(this.eventBus=n)}msg(e,n=3,i="success"){if(this.message)if(typeof this.message=="function")this.message({type:i,message:e,duration:n});else switch(i){case"info":this.message.info(e,n);break;case"success":this.message.success(e,n);break;case"warning":this.message.warn?this.message.warn(e,n):this.message.warning&&this.message.warning(e,n);break;case"error":this.message.error(e,n)}else{switch(i){case"info":case"success":console.log(e);break;case"warning":console.warn(e);break;case"error":i="dark",console.error(e)}this.eventBus&&this.eventBus.emit(nt.AlertInfoEvent,{type:i,info:e})}}info(e,n=3){this.msg(e,n,"info")}warn(e,n=3){this.msg(e,n,"warning")}err(e,n=3){this.msg(e,n,"error")}success(e,n=3){this.msg(e,n,"success")}}const Xe=new Map,Vo=function(t,e,n){!B.Config.DefaultHproseAPI&&B.Config.ServiceURL&&(B.Config.DefaultHproseAPI=B.Config.ServiceURL.DefaultHproseAPI),B.Config.DefaultHproseAPI&&Gt.isNotEmpty(B.Config.DefaultHproseAPI)&&(B.DefaultProxyClient=new Tt(B.Config.DefaultHproseAPI));const i=B.Config.UI.GrayMode;i&&rt.setGrayMode(i);const r=new Xo(t,B.EventBus);B.Message=r,B.SystemID=e,B.SystemGroup=n,B.EventBus.on(nt.HproseServiceErrorEvent,o=>{const l=`\u5F53\u524D\u540E\u53F0\u4E1A\u52A1\u670D\u52A1\u4E0D\u53EF\u7528!${o}`;console.warn("Hprose\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.WebAPIErrorEvent,o=>{const l=`WebAPI\u540E\u53F0\u670D\u52A1\u4E0D\u53EF\u7528!${o}`;console.warn("WebAPI\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.AxiosRequestErrorEvent,o=>{const l=`Http\u8BF7\u6C42'${o.code}'\u9519\u8BEF: ${o.message}`;console.warn("Http\u8BF7\u6C42\u9519\u8BEF",l)}),B.EventBus.on(nt.CommonWarnEvent,o=>{r.warn(o)})};function oi(t){if(t&&Gt.isNotEmpty(t)){if(Xe.has(t))return Xe.get(t);{const e=new Tt(t);return Xe.set(t,e),e}}}function Ko(t){const e=oi(t);return e&&(B.DefaultProxyClient=e),e}const Ve="is_LockScreen",si=ut.get(Ve,!1),Dt={isLock:si,lockTime:si=="true"?ci():0};function ai(t){Dt.isLock=t,ut.set(Ve,t,10),t&&(We(),console.log("\u9501\u5C4F\u4E86\u2026\u2026"))}function Yo(){return ut.get(Ve,!1)}function ci(){let t=3600;return B.Config.UI?.LockTime&&B.Config.UI?.LockTime>=10&&(t=B.Config.UI.LockTime),t}let Ke;function Ye(){clearInterval(Ke),!(window.location.href.indexOf("/login")>0||Dt.isLock)&&(ai(!1),Dt.lockTime=ci(),Ke=setInterval(()=>{if(Dt.lockTime--,Dt.lockTime<=0)return ai(!0),clearInterval(Ke)},1e3))}function Jo(){Ye(),document.addEventListener("mousedown",Ye)}function Zo(){document.removeEventListener("mousedown",Ye)}function Je(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Qo={exports:{}},Qt=Qo.exports=function t(e,n,i){function r(p,v){if(!n[p]){if(!e[p]){if(!v&&Je)return Je(p);if(o)return o(p,!0);var b=new Error("Cannot find module '"+p+"'");throw b.code="MODULE_NOT_FOUND",b}var C=n[p]={exports:{}};e[p][0].call(C.exports,function(E){var A=e[p][1][E];return r(A||E)},C,C.exports,t,e,n,i)}return n[p].exports}for(var o=Je,l=0;l<i.length;l++)r(i[l]);return r}({1:[function(t,e,n){(function(i){var r,o,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var p=0,v=new l(A),b=i.document.createTextNode("");v.observe(b,{characterData:!0}),r=function(){b.data=p=++p%2}}else if(i.setImmediate||i.MessageChannel===void 0)r="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var z=i.document.createElement("script");z.onreadystatechange=function(){A(),z.onreadystatechange=null,z.parentNode.removeChild(z),z=null},i.document.documentElement.appendChild(z)}:function(){setTimeout(A,0)};else{var C=new i.MessageChannel;C.port1.onmessage=A,r=function(){C.port2.postMessage(0)}}var E=[];function A(){var z,S;o=!0;for(var u=E.length;u;){for(S=E,E=[],z=-1;++z<u;)S[z]();u=E.length}o=!1}function D(z){E.push(z)!==1||o||r()}e.exports=D}).call(this,xt!==void 0?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(t,e,n){var i=t(1);function r(){}var o={},l=["REJECTED"],p=["FULFILLED"],v=["PENDING"];function b(h){if(typeof h!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,h!==r&&D(this,h)}function C(h,g,P){this.promise=h,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function E(h,g,P){i(function(){var I;try{I=g(P)}catch(L){return o.reject(h,L)}I===h?o.reject(h,new TypeError("Cannot resolve promise with itself")):o.resolve(h,I)})}function A(h){var g=h&&h.then;if(h&&(typeof h=="object"||typeof h=="function")&&typeof g=="function")return function(){g.apply(h,arguments)}}function D(h,g){var P=!1;function I(O){P||(P=!0,o.reject(h,O))}function L(O){P||(P=!0,o.resolve(h,O))}function N(){g(L,I)}var j=z(N);j.status==="error"&&I(j.value)}function z(h,g){var P={};try{P.value=h(g),P.status="success"}catch(I){P.status="error",P.value=I}return P}function S(h){return h instanceof this?h:o.resolve(new this(r),h)}function u(h){var g=new this(r);return o.reject(g,h)}function f(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=h.length,I=!1;if(!P)return this.resolve([]);for(var L=new Array(P),N=0,j=-1,O=new this(r);++j<P;)W(h[j],j);return O;function W(et,X){function K(q){L[X]=q,++N!==P||I||(I=!0,o.resolve(O,L))}g.resolve(et).then(K,function(q){I||(I=!0,o.reject(O,q))})}}function d(h){var g=this;if(Object.prototype.toString.call(h)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=h.length,I=!1;if(!P)return this.resolve([]);for(var L=-1,N=new this(r);++L<P;)j(h[L]);return N;function j(O){g.resolve(O).then(function(W){I||(I=!0,o.resolve(N,W))},function(W){I||(I=!0,o.reject(N,W))})}}e.exports=b,b.prototype.catch=function(h){return this.then(null,h)},b.prototype.then=function(h,g){if(typeof h!="function"&&this.state===p||typeof g!="function"&&this.state===l)return this;var P=new this.constructor(r);return this.state!==v?E(P,this.state===p?h:g,this.outcome):this.queue.push(new C(P,h,g)),P},C.prototype.callFulfilled=function(h){o.resolve(this.promise,h)},C.prototype.otherCallFulfilled=function(h){E(this.promise,this.onFulfilled,h)},C.prototype.callRejected=function(h){o.reject(this.promise,h)},C.prototype.otherCallRejected=function(h){E(this.promise,this.onRejected,h)},o.resolve=function(h,g){var P=z(A,g);if(P.status==="error")return o.reject(h,P.value);var I=P.value;if(I)D(h,I);else{h.state=p,h.outcome=g;for(var L=-1,N=h.queue.length;++L<N;)h.queue[L].callFulfilled(g)}return h},o.reject=function(h,g){h.state=l,h.outcome=g;for(var P=-1,I=h.queue.length;++P<I;)h.queue[P].callRejected(g);return h},b.resolve=S,b.reject=u,b.all=f,b.race=d},{1:1}],3:[function(t,e,n){(function(i){typeof i.Promise!="function"&&(i.Promise=t(2))}).call(this,xt!==void 0?xt:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(t,e,n){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function r(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function o(){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 l=o();function p(){try{if(!l||!l.open)return!1;var s=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),a=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!s||a)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(s,a){s=s||[],a=a||{};try{return new Blob(s,a)}catch(m){if(m.name!=="TypeError")throw m;for(var c=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),y=0;y<s.length;y+=1)c.append(s[y]);return c.getBlob(a.type)}}typeof Promise>"u"&&t(3);var b=Promise;function C(s,a){a&&s.then(function(c){a(null,c)},function(c){a(c)})}function E(s,a,c){typeof a=="function"&&s.then(a),typeof c=="function"&&s.catch(c)}function A(s){return typeof s!="string"&&(console.warn(s+" used as a key, but it is not a string."),s=String(s)),s}function D(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var z="local-forage-detect-blob-support",S=void 0,u={},f=Object.prototype.toString,d="readonly",h="readwrite";function g(s){for(var a=s.length,c=new ArrayBuffer(a),y=new Uint8Array(c),m=0;m<a;m++)y[m]=s.charCodeAt(m);return c}function P(s){return new b(function(a){var c=s.transaction(z,h),y=v([""]);c.objectStore(z).put(y,"key"),c.onabort=function(m){m.preventDefault(),m.stopPropagation(),a(!1)},c.oncomplete=function(){var m=navigator.userAgent.match(/Chrome\/(\d+)/),w=navigator.userAgent.match(/Edge\//);a(w||!m||parseInt(m[1],10)>=43)}}).catch(function(){return!1})}function I(s){return typeof S=="boolean"?b.resolve(S):P(s).then(function(a){return S=a})}function L(s){var a=u[s.name],c={};c.promise=new b(function(y,m){c.resolve=y,c.reject=m}),a.deferredOperations.push(c),a.dbReady?a.dbReady=a.dbReady.then(function(){return c.promise}):a.dbReady=c.promise}function N(s){var a=u[s.name].deferredOperations.pop();if(a)return a.resolve(),a.promise}function j(s,a){var c=u[s.name].deferredOperations.pop();if(c)return c.reject(a),c.promise}function O(s,a){return new b(function(c,y){if(u[s.name]=u[s.name]||mn(),s.db){if(!a)return c(s.db);L(s),s.db.close()}var m=[s.name];a&&m.push(s.version);var w=l.open.apply(l,m);a&&(w.onupgradeneeded=function(x){var k=w.result;try{k.createObjectStore(s.storeName),x.oldVersion<=1&&k.createObjectStore(z)}catch(R){if(R.name!=="ConstraintError")throw R;console.warn('The database "'+s.name+'" has been upgraded from version '+x.oldVersion+" to version "+x.newVersion+', but the storage "'+s.storeName+'" already exists.')}}),w.onerror=function(x){x.preventDefault(),y(w.error)},w.onsuccess=function(){var x=w.result;x.onversionchange=function(k){k.target.close()},c(x),N(s)}})}function W(s){return O(s,!1)}function et(s){return O(s,!0)}function X(s,a){if(!s.db)return!0;var c=!s.db.objectStoreNames.contains(s.storeName),y=s.version<s.db.version,m=s.version>s.db.version;if(y&&(s.version!==a&&console.warn('The database "'+s.name+`" can't be downgraded from version `+s.db.version+" to version "+s.version+"."),s.version=s.db.version),m||c){if(c){var w=s.db.version+1;w>s.version&&(s.version=w)}return!0}return!1}function K(s){return new b(function(a,c){var y=new FileReader;y.onerror=c,y.onloadend=function(m){var w=btoa(m.target.result||"");a({__local_forage_encoded_blob:!0,data:w,type:s.type})},y.readAsBinaryString(s)})}function q(s){return v([g(atob(s.data))],{type:s.type})}function st(s){return s&&s.__local_forage_encoded_blob}function jt(s){var a=this,c=a._initReady().then(function(){var y=u[a._dbInfo.name];if(y&&y.dbReady)return y.dbReady});return E(c,s,s),c}function ye(s){L(s);for(var a=u[s.name],c=a.forages,y=0;y<c.length;y++){var m=c[y];m._dbInfo.db&&(m._dbInfo.db.close(),m._dbInfo.db=null)}return s.db=null,W(s).then(function(w){return s.db=w,X(s)?et(s):w}).then(function(w){s.db=a.db=w;for(var x=0;x<c.length;x++)c[x]._dbInfo.db=w}).catch(function(w){throw j(s,w),w})}function ot(s,a,c,y){y===void 0&&(y=1);try{var m=s.db.transaction(s.storeName,a);c(null,m)}catch(w){if(y>0&&(!s.db||w.name==="InvalidStateError"||w.name==="NotFoundError"))return b.resolve().then(function(){if(!s.db||w.name==="NotFoundError"&&!s.db.objectStoreNames.contains(s.storeName)&&s.version<=s.db.version)return s.db&&(s.version=s.db.version+1),et(s)}).then(function(){return ye(s).then(function(){ot(s,a,c,y-1)})}).catch(c);c(w)}}function mn(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ni(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=s[y];var m=u[c.name];m||(m=mn(),u[c.name]=m),m.forages.push(a),a._initReady||(a._initReady=a.ready,a.ready=jt);var w=[];function x(){return b.resolve()}for(var k=0;k<m.forages.length;k++){var R=m.forages[k];R!==a&&w.push(R._initReady().catch(x))}var M=m.forages.slice(0);return b.all(w).then(function(){return c.db=m.db,W(c)}).then(function(_){return c.db=_,X(c,a._defaultConfig.version)?et(c):_}).then(function(_){c.db=m.db=_,a._dbInfo=c;for(var T=0;T<M.length;T++){var U=M[T];U!==a&&(U._dbInfo.db=c.db,U._dbInfo.version=c.version)}})}function Ui(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).get(s);R.onsuccess=function(){var M=R.result;M===void 0&&(M=null),st(M)&&(M=q(M)),m(M)},R.onerror=function(){w(R.error)}}catch(M){w(M)}})}).catch(w)});return C(y,a),y}function Oi(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).openCursor(),M=1;R.onsuccess=function(){var _=R.result;if(_){var T=_.value;st(T)&&(T=q(T));var U=s(T,_.key,M++);U!==void 0?m(U):_.continue()}else m()},R.onerror=function(){w(R.error)}}catch(_){w(_)}})}).catch(w)});return C(y,a),y}function ji(s,a,c){var y=this;s=A(s);var m=new b(function(w,x){var k;y.ready().then(function(){return k=y._dbInfo,f.call(a)==="[object Blob]"?I(k.db).then(function(R){return R?a:K(a)}):a}).then(function(R){ot(y._dbInfo,h,function(M,_){if(M)return x(M);try{var T=_.objectStore(y._dbInfo.storeName);R===null&&(R=void 0);var U=T.put(R,s);_.oncomplete=function(){R===void 0&&(R=null),w(R)},_.onabort=_.onerror=function(){var F=U.error?U.error:U.transaction.error;x(F)}}catch(F){x(F)}})}).catch(x)});return C(m,c),m}function Fi(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){ot(c._dbInfo,h,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName).delete(s);k.oncomplete=function(){m()},k.onerror=function(){w(R.error)},k.onabort=function(){var M=R.error?R.error:R.transaction.error;w(M)}}catch(M){w(M)}})}).catch(w)});return C(y,a),y}function $i(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,h,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).clear();x.oncomplete=function(){y()},x.onabort=x.onerror=function(){var R=k.error?k.error:k.transaction.error;m(R)}}catch(R){m(R)}})}).catch(m)});return C(c,s),c}function Wi(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,d,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).count();k.onsuccess=function(){y(k.result)},k.onerror=function(){m(k.error)}}catch(R){m(R)}})}).catch(m)});return C(c,s),c}function Hi(s,a){var c=this,y=new b(function(m,w){s<0?m(null):c.ready().then(function(){ot(c._dbInfo,d,function(x,k){if(x)return w(x);try{var R=k.objectStore(c._dbInfo.storeName),M=!1,_=R.openKeyCursor();_.onsuccess=function(){var T=_.result;T?s===0||M?m(T.key):(M=!0,T.advance(s)):m(null)},_.onerror=function(){w(_.error)}}catch(T){w(T)}})}).catch(w)});return C(y,a),y}function qi(s){var a=this,c=new b(function(y,m){a.ready().then(function(){ot(a._dbInfo,d,function(w,x){if(w)return m(w);try{var k=x.objectStore(a._dbInfo.storeName).openKeyCursor(),R=[];k.onsuccess=function(){var M=k.result;M?(R.push(M.key),M.continue()):y(R)},k.onerror=function(){m(k.error)}}catch(M){m(M)}})}).catch(m)});return C(c,s),c}function Gi(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;if(s.name){var w=s.name===c.name&&m._dbInfo.db?b.resolve(m._dbInfo.db):W(s).then(function(x){var k=u[s.name],R=k.forages;k.db=x;for(var M=0;M<R.length;M++)R[M]._dbInfo.db=x;return x});y=s.storeName?w.then(function(x){if(x.objectStoreNames.contains(s.storeName)){var k=x.version+1;L(s);var R=u[s.name],M=R.forages;x.close();for(var _=0;_<M.length;_++){var T=M[_];T._dbInfo.db=null,T._dbInfo.version=k}var U=new b(function(F,$){var G=l.open(s.name,k);G.onerror=function(at){G.result.close(),$(at)},G.onupgradeneeded=function(){G.result.deleteObjectStore(s.storeName)},G.onsuccess=function(){var at=G.result;at.close(),F(at)}});return U.then(function(F){R.db=F;for(var $=0;$<M.length;$++){var G=M[$];G._dbInfo.db=F,N(G._dbInfo)}}).catch(function(F){throw(j(s,F)||b.resolve()).catch(function(){}),F})}}):w.then(function(x){L(s);var k=u[s.name],R=k.forages;x.close();for(var M=0;M<R.length;M++)R[M]._dbInfo.db=null;var _=new b(function(T,U){var F=l.deleteDatabase(s.name);F.onerror=function(){var $=F.result;$&&$.close(),U(F.error)},F.onblocked=function(){console.warn('dropInstance blocked for database "'+s.name+'" until all open connections are closed')},F.onsuccess=function(){var $=F.result;$&&$.close(),T($)}});return _.then(function(T){k.db=T;for(var U=0;U<R.length;U++)N(R[U]._dbInfo)}).catch(function(T){throw(j(s,T)||b.resolve()).catch(function(){}),T})})}else y=b.reject("Invalid arguments");return C(y,a),y}var Xi={_driver:"asyncStorage",_initStorage:Ni,_support:p(),iterate:Oi,getItem:Ui,setItem:ji,removeItem:Fi,clear:$i,length:Wi,key:Hi,keys:qi,dropInstance:Gi};function Vi(){return typeof openDatabase=="function"}var dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ki="~~local_forage_type~",gn=/^~~local_forage_type~([^~]+)~/,Ft="__lfsc__:",we=Ft.length,be="arbf",Se="blob",vn="si08",yn="ui08",wn="uic8",bn="si16",Sn="si32",xn="ur16",Cn="ui32",En="fl32",kn="fl64",zn=we+be.length,In=Object.prototype.toString;function Rn(s){var a,c,y,m,w,x=.75*s.length,k=s.length,R=0;s[s.length-1]==="="&&(x--,s[s.length-2]==="="&&x--);var M=new ArrayBuffer(x),_=new Uint8Array(M);for(a=0;a<k;a+=4)c=dt.indexOf(s[a]),y=dt.indexOf(s[a+1]),m=dt.indexOf(s[a+2]),w=dt.indexOf(s[a+3]),_[R++]=c<<2|y>>4,_[R++]=(15&y)<<4|m>>2,_[R++]=(3&m)<<6|63&w;return M}function xe(s){var a,c=new Uint8Array(s),y="";for(a=0;a<c.length;a+=3)y+=dt[c[a]>>2],y+=dt[(3&c[a])<<4|c[a+1]>>4],y+=dt[(15&c[a+1])<<2|c[a+2]>>6],y+=dt[63&c[a+2]];return c.length%3==2?y=y.substring(0,y.length-1)+"=":c.length%3==1&&(y=y.substring(0,y.length-2)+"=="),y}function Yi(s,a){var c="";if(s&&(c=In.call(s)),s&&(c==="[object ArrayBuffer]"||s.buffer&&In.call(s.buffer)==="[object ArrayBuffer]")){var y,m=Ft;s instanceof ArrayBuffer?(y=s,m+=be):(y=s.buffer,c==="[object Int8Array]"?m+=vn:c==="[object Uint8Array]"?m+=yn:c==="[object Uint8ClampedArray]"?m+=wn:c==="[object Int16Array]"?m+=bn:c==="[object Uint16Array]"?m+=xn:c==="[object Int32Array]"?m+=Sn:c==="[object Uint32Array]"?m+=Cn:c==="[object Float32Array]"?m+=En:c==="[object Float64Array]"?m+=kn:a(new Error("Failed to get type for BinaryArray"))),a(m+xe(y))}else if(c==="[object Blob]"){var w=new FileReader;w.onload=function(){var x=Ki+s.type+"~"+xe(this.result);a(Ft+Se+x)},w.readAsArrayBuffer(s)}else try{a(JSON.stringify(s))}catch(x){console.error("Couldn't convert value into a JSON string: ",s),a(null,x)}}function Ji(s){if(s.substring(0,we)!==Ft)return JSON.parse(s);var a,c=s.substring(zn),y=s.substring(we,zn);if(y===Se&&gn.test(c)){var m=c.match(gn);a=m[1],c=c.substring(m[0].length)}var w=Rn(c);switch(y){case be:return w;case Se:return v([w],{type:a});case vn:return new Int8Array(w);case yn:return new Uint8Array(w);case wn:return new Uint8ClampedArray(w);case bn:return new Int16Array(w);case xn:return new Uint16Array(w);case Sn:return new Int32Array(w);case Cn:return new Uint32Array(w);case En:return new Float32Array(w);case kn:return new Float64Array(w);default:throw new Error("Unkown type: "+y)}}var Ce={serialize:Yi,deserialize:Ji,stringToBuffer:Rn,bufferToString:xe};function Mn(s,a,c,y){s.executeSql("CREATE TABLE IF NOT EXISTS "+a.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,y)}function Zi(s){var a=this,c={db:null};if(s)for(var y in s)c[y]=typeof s[y]!="string"?s[y].toString():s[y];var m=new b(function(w,x){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(k){return x(k)}c.db.transaction(function(k){Mn(k,c,function(){a._dbInfo=c,w()},function(R,M){x(M)})},x)});return c.serializer=Ce,m}function ft(s,a,c,y,m,w){s.executeSql(c,y,m,function(x,k){k.code===k.SYNTAX_ERR?x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[a.storeName],function(R,M){M.rows.length?w(R,k):Mn(R,a,function(){R.executeSql(c,y,m,w)},w)},w):w(x,k)},w)}function Qi(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT * FROM "+x.storeName+" WHERE key = ? LIMIT 1",[s],function(R,M){var _=M.rows.length?M.rows.item(0).value:null;_&&(_=x.serializer.deserialize(_)),m(_)},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function tr(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT * FROM "+x.storeName,[],function(R,M){for(var _=M.rows,T=_.length,U=0;U<T;U++){var F=_.item(U),$=F.value;if($&&($=x.serializer.deserialize($)),($=s($,F.key,U+1))!==void 0)return void m($)}m()},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function _n(s,a,c,y){var m=this;s=A(s);var w=new b(function(x,k){m.ready().then(function(){a===void 0&&(a=null);var R=a,M=m._dbInfo;M.serializer.serialize(a,function(_,T){T?k(T):M.db.transaction(function(U){ft(U,M,"INSERT OR REPLACE INTO "+M.storeName+" (key, value) VALUES (?, ?)",[s,_],function(){x(R)},function(F,$){k($)})},function(U){if(U.code===U.QUOTA_ERR){if(y>0)return void x(_n.apply(m,[s,R,c,y-1]));k(U)}})})}).catch(k)});return C(w,c),w}function er(s,a,c){return _n.apply(this,[s,a,c,1])}function nr(s,a){var c=this;s=A(s);var y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"DELETE FROM "+x.storeName+" WHERE key = ?",[s],function(){m()},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function ir(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"DELETE FROM "+w.storeName,[],function(){y()},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function rr(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"SELECT COUNT(key) as c FROM "+w.storeName,[],function(k,R){var M=R.rows.item(0).c;y(M)},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function or(s,a){var c=this,y=new b(function(m,w){c.ready().then(function(){var x=c._dbInfo;x.db.transaction(function(k){ft(k,x,"SELECT key FROM "+x.storeName+" WHERE id = ? LIMIT 1",[s+1],function(R,M){var _=M.rows.length?M.rows.item(0).key:null;m(_)},function(R,M){w(M)})})}).catch(w)});return C(y,a),y}function sr(s){var a=this,c=new b(function(y,m){a.ready().then(function(){var w=a._dbInfo;w.db.transaction(function(x){ft(x,w,"SELECT key FROM "+w.storeName,[],function(k,R){for(var M=[],_=0;_<R.rows.length;_++)M.push(R.rows.item(_).key);y(M)},function(k,R){m(R)})})}).catch(m)});return C(c,s),c}function ar(s){return new b(function(a,c){s.transaction(function(y){y.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(m,w){for(var x=[],k=0;k<w.rows.length;k++)x.push(w.rows.item(k).name);a({db:s,storeNames:x})},function(m,w){c(w)})},function(y){c(y)})})}function cr(s,a){a=D.apply(this,arguments);var c=this.config();(s=typeof s!="function"&&s||{}).name||(s.name=s.name||c.name,s.storeName=s.storeName||c.storeName);var y,m=this;return y=s.name?new b(function(w){var x;x=s.name===c.name?m._dbInfo.db:openDatabase(s.name,"","",0),s.storeName?w({db:x,storeNames:[s.storeName]}):w(ar(x))}).then(function(w){return new b(function(x,k){w.db.transaction(function(R){function M(F){return new b(function($,G){R.executeSql("DROP TABLE IF EXISTS "+F,[],function(){$()},function(at,ze){G(ze)})})}for(var _=[],T=0,U=w.storeNames.length;T<U;T++)_.push(M(w.storeNames[T]));b.all(_).then(function(){x()}).catch(function(F){k(F)})},function(R){k(R)})})}):b.reject("Invalid arguments"),C(y,a),y}var ur={_driver:"webSQLStorage",_initStorage:Zi,_support:Vi(),iterate:tr,getItem:Qi,setItem:er,removeItem:nr,clear:ir,length:rr,key:or,keys:sr,dropInstance:cr};function lr(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Ln(s,a){var c=s.name+"/";return s.storeName!==a.storeName&&(c+=s.storeName+"/"),c}function hr(){var s="_localforage_support_test";try{return localStorage.setItem(s,!0),localStorage.removeItem(s),!1}catch{return!0}}function dr(){return!hr()||localStorage.length>0}function fr(s){var a=this,c={};if(s)for(var y in s)c[y]=s[y];return c.keyPrefix=Ln(s,a._defaultConfig),dr()?(a._dbInfo=c,c.serializer=Ce,b.resolve()):b.reject()}function pr(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo.keyPrefix,m=localStorage.length-1;m>=0;m--){var w=localStorage.key(m);w.indexOf(y)===0&&localStorage.removeItem(w)}});return C(c,s),c}function mr(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo,w=localStorage.getItem(m.keyPrefix+s);return w&&(w=m.serializer.deserialize(w)),w});return C(y,a),y}function gr(s,a){var c=this,y=c.ready().then(function(){for(var m=c._dbInfo,w=m.keyPrefix,x=w.length,k=localStorage.length,R=1,M=0;M<k;M++){var _=localStorage.key(M);if(_.indexOf(w)===0){var T=localStorage.getItem(_);if(T&&(T=m.serializer.deserialize(T)),(T=s(T,_.substring(x),R++))!==void 0)return T}}});return C(y,a),y}function vr(s,a){var c=this,y=c.ready().then(function(){var m,w=c._dbInfo;try{m=localStorage.key(s)}catch{m=null}return m&&(m=m.substring(w.keyPrefix.length)),m});return C(y,a),y}function yr(s){var a=this,c=a.ready().then(function(){for(var y=a._dbInfo,m=localStorage.length,w=[],x=0;x<m;x++){var k=localStorage.key(x);k.indexOf(y.keyPrefix)===0&&w.push(k.substring(y.keyPrefix.length))}return w});return C(c,s),c}function wr(s){var a=this.keys().then(function(c){return c.length});return C(a,s),a}function br(s,a){var c=this;s=A(s);var y=c.ready().then(function(){var m=c._dbInfo;localStorage.removeItem(m.keyPrefix+s)});return C(y,a),y}function Sr(s,a,c){var y=this;s=A(s);var m=y.ready().then(function(){a===void 0&&(a=null);var w=a;return new b(function(x,k){var R=y._dbInfo;R.serializer.serialize(a,function(M,_){if(_)k(_);else try{localStorage.setItem(R.keyPrefix+s,M),x(w)}catch(T){T.name!=="QuotaExceededError"&&T.name!=="NS_ERROR_DOM_QUOTA_REACHED"||k(T),k(T)}})})});return C(m,c),m}function xr(s,a){if(a=D.apply(this,arguments),!(s=typeof s!="function"&&s||{}).name){var c=this.config();s.name=s.name||c.name,s.storeName=s.storeName||c.storeName}var y,m=this;return y=s.name?new b(function(w){s.storeName?w(Ln(s,m._defaultConfig)):w(s.name+"/")}).then(function(w){for(var x=localStorage.length-1;x>=0;x--){var k=localStorage.key(x);k.indexOf(w)===0&&localStorage.removeItem(k)}}):b.reject("Invalid arguments"),C(y,a),y}var Cr={_driver:"localStorageWrapper",_initStorage:fr,_support:lr(),iterate:gr,getItem:mr,setItem:Sr,removeItem:br,clear:pr,length:wr,key:vr,keys:yr,dropInstance:xr},Er=function(s,a){return s===a||typeof s=="number"&&typeof a=="number"&&isNaN(s)&&isNaN(a)},kr=function(s,a){for(var c=s.length,y=0;y<c;){if(Er(s[y],a))return!0;y++}return!1},An=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},Lt={},Pn={},It={INDEXEDDB:Xi,WEBSQL:ur,LOCALSTORAGE:Cr},zr=[It.INDEXEDDB._driver,It.WEBSQL._driver,It.LOCALSTORAGE._driver],$t=["dropInstance"],Ee=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat($t),Ir={description:"",driver:zr.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Rr(s,a){s[a]=function(){var c=arguments;return s.ready().then(function(){return s[a].apply(s,c)})}}function ke(){for(var s=1;s<arguments.length;s++){var a=arguments[s];if(a)for(var c in a)a.hasOwnProperty(c)&&(An(a[c])?arguments[0][c]=a[c].slice():arguments[0][c]=a[c])}return arguments[0]}var Mr=function(){function s(a){for(var c in r(this,s),It)if(It.hasOwnProperty(c)){var y=It[c],m=y._driver;this[c]=m,Lt[m]||this.defineDriver(y)}this._defaultConfig=ke({},Ir),this._config=ke({},this._defaultConfig,a),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return s.prototype.config=function(a){if((a===void 0?"undefined":i(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var c in a){if(c==="storeName"&&(a[c]=a[c].replace(/\W/g,"_")),c==="version"&&typeof a[c]!="number")return new Error("Database version must be a number.");this._config[c]=a[c]}return!("driver"in a)||!a.driver||this.setDriver(this._config.driver)}return typeof a=="string"?this._config[a]:this._config},s.prototype.defineDriver=function(a,c,y){var m=new b(function(w,x){try{var k=a._driver,R=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver)return void x(R);for(var M=Ee.concat("_initStorage"),_=0,T=M.length;_<T;_++){var U=M[_];if((!kr($t,U)||a[U])&&typeof a[U]!="function")return void x(R)}var F=function(){for(var G=function(Lr){return function(){var Ar=new Error("Method "+Lr+" is not implemented by the current driver"),Tn=b.reject(Ar);return C(Tn,arguments[arguments.length-1]),Tn}},at=0,ze=$t.length;at<ze;at++){var Ie=$t[at];a[Ie]||(a[Ie]=G(Ie))}};F();var $=function(G){Lt[k]&&console.info("Redefining LocalForage driver: "+k),Lt[k]=a,Pn[k]=G,w()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then($,x):$(!!a._support):$(!0)}catch(G){x(G)}});return E(m,c,y),m},s.prototype.driver=function(){return this._driver||null},s.prototype.getDriver=function(a,c,y){var m=Lt[a]?b.resolve(Lt[a]):b.reject(new Error("Driver not found."));return E(m,c,y),m},s.prototype.getSerializer=function(a){var c=b.resolve(Ce);return E(c,a),c},s.prototype.ready=function(a){var c=this,y=c._driverSet.then(function(){return c._ready===null&&(c._ready=c._initDriver()),c._ready});return E(y,a,a),y},s.prototype.setDriver=function(a,c,y){var m=this;An(a)||(a=[a]);var w=this._getSupportedDrivers(a);function x(){m._config.driver=m.driver()}function k(_){return m._extend(_),x(),m._ready=m._initStorage(m._config),m._ready}function R(_){return function(){var T=0;function U(){for(;T<_.length;){var F=_[T];return T++,m._dbInfo=null,m._ready=null,m.getDriver(F).then(k).catch(U)}x();var $=new Error("No available storage method found.");return m._driverSet=b.reject($),m._driverSet}return U()}}var M=this._driverSet!==null?this._driverSet.catch(function(){return b.resolve()}):b.resolve();return this._driverSet=M.then(function(){var _=w[0];return m._dbInfo=null,m._ready=null,m.getDriver(_).then(function(T){m._driver=T._driver,x(),m._wrapLibraryMethodsWithReady(),m._initDriver=R(w)})}).catch(function(){x();var _=new Error("No available storage method found.");return m._driverSet=b.reject(_),m._driverSet}),E(this._driverSet,c,y),this._driverSet},s.prototype.supports=function(a){return!!Pn[a]},s.prototype._extend=function(a){ke(this,a)},s.prototype._getSupportedDrivers=function(a){for(var c=[],y=0,m=a.length;y<m;y++){var w=a[y];this.supports(w)&&c.push(w)}return c},s.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,c=Ee.length;a<c;a++)Rr(this,Ee[a])},s.prototype.createInstance=function(a){return new s(a)},s}(),_r=new Mr;e.exports=_r},{3:3}]},{},[4])(4),ui={exports:{}};(function(t){((e,n)=>{t.exports=n()})(0,()=>{const e=typeof window=="object"?window:this;e.HTMLElement||console.warn("streamsaver is meant to run on browsers main thread");let n=null,i=!1;const r=e.WebStreamsPolyfill||{},o=e.isSecureContext;let l=/constructor/i.test(e.HTMLElement)||!!e.safari||!!e.WebKitPoint;const p=o||"MozAppearance"in document.documentElement.style?"iframe":"navigate",v={createWriteStream:function(C,E,A){let D={size:null,pathname:null,writableStrategy:void 0,readableStrategy:void 0},z=0,S=null,u=null,f=null;if(Number.isFinite(E)?([A,E]=[E,A],console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=E):E&&E.highWaterMark?(console.warn("[StreamSaver] Deprecated pass an object as 2nd argument when creating a write stream"),D.size=A,D.writableStrategy=E):D=E||{},!l){n||(n=o?b(v.mitm):function(P){const I="width=200,height=100",L=document.createDocumentFragment(),N={frame:e.open(P,"popup",I),loaded:!1,isIframe:!1,isPopup:!0,remove(){N.frame.close()},addEventListener(...O){L.addEventListener(...O)},dispatchEvent(...O){L.dispatchEvent(...O)},removeEventListener(...O){L.removeEventListener(...O)},postMessage(...O){N.frame.postMessage(...O)}},j=O=>{O.source===N.frame&&(N.loaded=!0,e.removeEventListener("message",j),N.dispatchEvent(new Event("load")))};return e.addEventListener("message",j),N}(v.mitm)),u=new MessageChannel,C=encodeURIComponent(C.replace(/\//g,":")).replace(/['()]/g,escape).replace(/\*/g,"%2A");const h={transferringReadable:i,pathname:D.pathname||Math.random().toString().slice(-6)+"/"+C,headers:{"Content-Type":"application/octet-stream; charset=utf-8","Content-Disposition":"attachment; filename*=UTF-8''"+C}};D.size&&(h.headers["Content-Length"]=D.size);const g=[h,"*",[u.port2]];if(i){const P=p==="iframe"?void 0:{transform(L,N){if(!(L instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");z+=L.length,N.enqueue(L),S&&(location.href=S,S=null)},flush(){S&&(location.href=S)}};f=new v.TransformStream(P,D.writableStrategy,D.readableStrategy);const I=f.readable;u.port1.postMessage({readableStream:I},[I])}u.port1.onmessage=P=>{P.data.download?p==="navigate"?(n.remove(),n=null,z?location.href=P.data.download:S=P.data.download):(n.isPopup&&(n.remove(),n=null,p==="iframe"&&b(v.mitm)),b(P.data.download)):P.data.abort&&(d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=null)},n.loaded?n.postMessage(...g):n.addEventListener("load",()=>{n.postMessage(...g)},{once:!0})}let d=[];return!l&&f&&f.writable||new v.WritableStream({write(h){if(!(h instanceof Uint8Array))throw new TypeError("Can only write Uint8Arrays");l?d.push(h):(u.port1.postMessage(h),z+=h.length,S&&(location.href=S,S=null))},close(){if(l){const h=new Blob(d,{type:"application/octet-stream; charset=utf-8"}),g=document.createElement("a");g.href=URL.createObjectURL(h),g.download=C,g.click()}else u.port1.postMessage("end")},abort(){d=[],u.port1.postMessage("abort"),u.port1.onmessage=null,u.port1.close(),u.port2.close(),u=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 b(C){if(!C)throw new Error("meh");const E=document.createElement("iframe");return E.hidden=!0,E.src=C,E.loaded=!1,E.name="iframe",E.isIframe=!0,E.postMessage=(...A)=>E.contentWindow.postMessage(...A),E.addEventListener("load",()=>{E.loaded=!0},{once:!0}),document.body.appendChild(E),E}try{new Response(new ReadableStream),o&&!("serviceWorker"in navigator)&&(l=!0)}catch{l=!0}return(C=>{try{C()}catch{}})(()=>{const{readable:C}=new TransformStream,E=new MessageChannel;E.port1.postMessage(C,[C]),E.port1.close(),E.port2.close(),i=!0,Object.defineProperty(v,"TransformStream",{configurable:!1,writable:!1,value:TransformStream})}),v})})(ui);var ts=ui.exports;class es{fileID;downloadURL;ChunkUnitM=1048576;chunkByteSize;totalChunks=1;currentDB;keys;fileMetaData=null;finishNum=0;eventTarget;cancelSource;isStarting=!1;fileName;cacheSize=6;requestTimeout=6e4;constructor(e,n,i=3,r=6,o=6e4){this.fileID=e,this.downloadURL=n,this.chunkByteSize=i*this.ChunkUnitM,this.eventTarget=Fe(),this.initIndexDB(),r>=3&&(this.cacheSize=r),o>this.requestTimeout&&(this.requestTimeout=o)}on(e,n){this.eventTarget.on(e,n)}dispatch(e,n){this.eventTarget.emit(e,n)}dispatchError(e){this.eventTarget.emit("error",e)}dispatchInfo(e){this.eventTarget.emit("info",e)}async queryDownloadFileMeta(e,n="",i){this.dispatchInfo("\u5F00\u59CB\u83B7\u53D6\u6587\u4EF6\u4FE1\u606F");const r=await lt(n,e,i);let o=null;return r&&r.status===200&&(o=r.data),o}async getIFileMeta(){if(this.fileMetaData===null){const e=await this.currentDB?.getItem("fileinfo");this.fileMetaData=e||null}return this.fileMetaData}initIndexDB(){this.currentDB=Qt.createInstance({name:this.fileID,driver:Qt.INDEXEDDB})}async init(e){if(this.finishNum=0,e){const n="fileinfo";this.fileMetaData={id:e.id,name:e.name,length:e.length,downloadID:e.downloadID,chunkSize:this.chunkByteSize},this.fileName=e.name,this.currentDB?.setItem(n,this.fileMetaData)}if(this.fileMetaData!=null){const n=this.fileMetaData.chunkSize;n!=null&&n>0&&(this.chunkByteSize=n)}this.fileMetaData&&(this.totalChunks=Math.ceil(this.fileMetaData.length/this.chunkByteSize)),this.dispatchInfo("\u5B8C\u6210\u521D\u59CB\u5316\u6587\u4EF6\u4FE1\u606F\uFF0C\u603B\u5206\u7247\uFF1A"+this.totalChunks),this.currentDB&&(this.keys=await this.currentDB.keys())}getTotalChunks(){return this.totalChunks}pause(){this.cancelSource&&this.isStarting&&(this.cancelSource.cancel(),this.isStarting=!1),this.dispatchInfo("\u5DF2\u6682\u505C\u4E0B\u8F7D\u4EFB\u52A1")}restart(){this.dispatchInfo("\u6B63\u5728\u91CD\u542F\u4E0B\u8F7D\u4EFB\u52A1"),this.download()}delete(){this.cancelSource&&this.cancelSource.cancel(),Qt.dropInstance({name:this.fileID}),this.currentDB=void 0,this.keys&&(this.keys.length=0,this.keys=void 0),this.finishNum=0,this.downloadProgress(),this.outputProgress(0),this.dispatchInfo("\u5DF2\u5220\u9664\u4E0B\u8F7D\u4EFB\u52A1")}sleep(e){return new Promise(n=>setTimeout(n,e))}async download(e,n){let i=e;if(!i&&this.downloadURL&&(i=this.downloadURL),!i)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 o={key:this.fileMetaData?.downloadID};let l=0;const p=this.cacheSize;let v=0;for(let b=0;b<this.totalChunks;b++){if(this.keys&&this.keys?.indexOf(b.toString())>=0){l++,l>this.finishNum&&(this.finishNum=l,this.downloadProgress());continue}const C=b*this.chunkByteSize;let E=C+this.chunkByteSize-1;this.fileMetaData&&E>this.fileMetaData.length&&(E=this.fileMetaData.length-1);const A={range:`bytes=${C}-${E}`};for(;v>=p;)await this.sleep(200);const D=b.toString();this.dispatchInfo(`\u5F00\u59CB\u4E0B\u8F7D\u5206\u7247${b+1}/${this.totalChunks}`),v++,lt(i,n,o,A,"arraybuffer",this.cancelSource?.token,this.requestTimeout).then(async z=>{const S=z.data;v--,await this.currentDB?.setItem(D,S),l++,l>this.finishNum&&(this.finishNum=l,this.downloadProgress());const u=parseInt(D)+1;this.dispatchInfo(`\u5B8C\u6210\u4E0B\u8F7D\u5206\u7247${u}/${this.totalChunks}`),this.savefile()}).catch(z=>{v--;const S=parseInt(D)+1;this.dispatchError(`\u4E0B\u8F7D\u7B2C${S}\uFF09\u4E2A\u5206\u7247\u5185\u5BB9\u5931\u8D25\uFF01`)})}this.finishNum===this.totalChunks&&this.savefile()}downloadProgress(){const e=100*this.finishNum/this.totalChunks;this.dispatch("downloadProgress",e)}outputProgress(e){const n=100*e/this.totalChunks;this.dispatch("saveProgress",n)}async savefile(){if(this.finishNum===this.totalChunks){if(!this.fileName)return void this.dispatchError("\u4E0B\u8F7D\u9519\u8BEF\uFF1A\u6587\u4EF6\u540D\u4E3A\u7A7A!");this.dispatchInfo("\u5F00\u59CB\u4FDD\u5B58\u4E0B\u8F7D\u6587\u4EF6:"+this.fileName);const e=ts.createWriteStream(this.fileName).getWriter();let n=0;for(let i=0;i<this.totalChunks;i++){const r=i.toString();let o=await this.currentDB?.getItem(r);if(o||(o=await this.currentDB?.getItem(r)),!o)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);let l=new Response(o).body;if(l===null)return void this.dispatchError(`\u8F93\u51FA\u5206\u7247\u7B2C${i+1}\uFF09\u4E2A\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u9519\u8BEF\u9000\u51FA\uFF01`);const p=l.getReader();for(;;){const{done:v,value:b}=await p.read();if(v)break;await e.write(b)}n++,this.outputProgress(n),this.dispatchInfo(`\u5B8C\u6210\u7B2C${i+1}\u4E2A\u5206\u7247\u8F93\u51FA`)}e.close(),Qt.dropInstance({name:this.fileID}),this.dispatch("success"),this.isStarting=!1,this.dispatchInfo("\u5B8C\u6210\u6587\u4EF6\u4E0B\u8F7D")}}}function ns(t,e){let n="",i="";for(const r in e)n+=r+"="+encodeURIComponent(e[r])+"&";return n=n.replace(/&$/,""),i=/\?$/.test(t)?t+n:t.replace(/\/?$/,"?")+n,i}function li(t={},e={}){let n;for(n in e)St(e[n])?t[n]=li(t[n],e[n]):t[n]=e[n];return t}function is(t,e){const n=`${t}_${e}`;return rt.MD5(n)}function hi(t){const e=function(p){if(!p)return;const v=p,b=[];if(v)for(let C of v){const E=di(C);E&&b.push(E)}return b}(t.bussinessRoutes),n=function(p){if(!p)return;const v=p;if(v&&v.length>0){const b=[];return v.forEach(C=>{const E=fi(C);E&&b.push(E)}),b}}(t.widgetMenuConfig),i=function(p){if(p&&p.length>0){const v=[];return p.forEach(b=>{const C=function(E){return E?{id:E.id,label:E.label,container:E.container,preload:E.preload,afterid:E.afterid,bindid:E.bindid,group:E.group}:void 0}(b);C&&v.push(C)}),v}}(t.widgetConfig),r=function(p){if(p&&p.length>0)return p}(t.functionList),o=t.pkgObject.version,l=t.pkgObject.name;return{id:is(l,o),name:B.Config.UI.SiteTitle,group:B.Config.UI.Group,product:l,version:o,routes:e,widgetMenu:n,widgets:i,functions:r}}function di(t){if(t){let e=0;t.meta?.hidden&&(e=1);let n={path:t.path,name:t.name,title:t.meta?.title,type:e,index:t.meta?.index};if(t.children){const i=[];for(let r of t.children){const o=di(r);o&&i.push(o)}i.length>0&&(n.children=i)}return n}}function fi(t){if(!t)return;const e={name:t.name,index:t.index,path:t.path,type:t.type};return t.children&&t.children.length>0&&(e.children=[],t.children.forEach(n=>{const i=fi(n);i&&e.children?.push(i)})),e}function rs(t,e="IconifyList.ts"){let n="",i=`const iconlist={
4
4
  `,r=0;t.forEach(o=>{const l=o.split(":");if(l&&l.length===2){const p="icon"+r;n+=`import ${p} from '~icons/${l[0]}/${l[1]}'
5
5
  `,i+=` '${o}':${p},
6
6
  `,r++}}),r>0&&(i+=`};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xframelib",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "积累的前端开发基础库",
5
5
  "main": "dist/index.js",
6
6
  "common": "dist/index.cjs",