@a2simcode/dui 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dui.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(te,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("@a2simcode/ui")):typeof define=="function"&&define.amd?define(["exports","vue","@a2simcode/ui"],r):(te=typeof globalThis<"u"?globalThis:te||self,r(te.DuiUI={},te.Vue,te.SimCodeUI))})(this,function(te,r,Ht){Object.defineProperties(te,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var wu=Object.create,er=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,vu=Object.getOwnPropertyNames,yu=Object.getPrototypeOf,Qu=Object.prototype.hasOwnProperty,Eu=(e,A)=>()=>(A||(e((A={exports:{}}).exports,A),e=null),A.exports),Uu=(e,A)=>{let t={};for(var n in e)er(t,n,{get:e[n],enumerable:!0});return A||er(t,Symbol.toStringTag,{value:"Module"}),t},bo=(e,A,t,n)=>{if(A&&typeof A=="object"||typeof A=="function")for(var o=vu(A),a=0,u=o.length,d;a<u;a++)d=o[a],!Qu.call(e,d)&&d!==t&&er(e,d,{get:(h=>A[h]).bind(null,d),enumerable:!(n=Cu(A,d))||n.enumerable});return e},Fu=(e,A,t)=>(bo(e,A,"default"),t&&bo(t,A,"default")),rs=(e,A,t)=>(t=e!=null?wu(yu(e)):{},bo(A||!e||!e.__esModule?er(t,"default",{value:e,enumerable:!0}):t,e));r=rs(r,1);var ut=(e,A)=>(e.install=t=>{t.component(e.name,e),A&&A.forEach(n=>{t.component(n.name,n)})},e),dt=(e="")=>{const A=Date.now(),t=Math.floor(Math.random()*1e9);return e===""?String(t)+String(A):e+"_"+t+String(A)},pn=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(pn);const A={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=pn(e[t]));return A},bu=e=>{if(Array.isArray(e))e.length=0;else if(e&&typeof e=="object")for(const A in e)Object.prototype.hasOwnProperty.call(e,A)&&delete e[A]},Ho={},Hu=(e,A,t)=>{t[e]=t[e]||{};const n=dt();return t[e][n]=A,n},Iu=(e,A,t)=>{const n=[],o=t[e]||{};return Object.keys(o).forEach(a=>{const u=o[a];try{u&&n.push(u(A))}catch(d){console.error(d)}}),n},_u=(e,A,t)=>{if(A){const n=t[e];n&&delete n[A]}else delete t[e]},os=(e,A)=>Hu(e,A,Ho),ne=(e,A)=>Iu(e,A,Ho),Su=(e,A)=>{_u(e,A,Ho)},is=(e,A,t,n,o,a)=>{const u=A.id,d=A.level,{getDesignLocals:h,selectComponent:g,getComponent:B,isMyChildComponent:w,addComponent:m,deleteComponent:v,getParentComponents:Q,removeComponentFromContainer:H,addComponentToContainer:N,copyComponent:T,activedComponent:M,top:U}=(0,r.inject)("d-drag-design-provide",{}),K=[],eA=(0,r.ref)(!1),W=(0,r.ref)(!1),iA=(0,r.ref)(!1),lA=(0,r.ref)(!1),nA=(0,r.ref)(!1),tA={id:"",type:""},q=(0,r.ref)(!1),k=(0,r.ref)(!1);let sA="",I=null;const Y=V=>{if(sA===V)return I;sA=V;const{top:$,left:uA,width:BA,height:HA}=e.value.getBoundingClientRect();return I=[{x:uA,y:$},{x:uA+BA,y:$},{x:uA+BA,y:$+HA},{x:uA,y:$+HA}],I},F=(V,$,uA)=>{let BA=$-uA[0].y;BA<0&&(BA=-BA);let HA=$-uA[3].y;HA<0&&(HA=-HA);let aA=V-uA[0].x;aA<0&&(aA=-aA);let wA=V-uA[1].x;return wA<0&&(wA=-wA),{ly:BA>HA?HA:BA,typey:BA>HA?"bottom":"top",lx:aA>wA?wA:aA,lallx:aA+wA}},S=(V,$,uA)=>V>=uA[0].x&&V<=uA[1].x&&$>=uA[0].y&&$<=uA[3].y,P=()=>{if(o){ne("dragClick",{id:u});return}if(!W.value){if(g(u),d!==0){const V=e.value.getBoundingClientRect(),$=h();V.top-$.top<22?lA.value=!0:lA.value=!1}W.value=!0,ne("dragClick",{id:u})}},R=V=>{const $=v(V);$&&(0,r.nextTick)(()=>{ne("dragClick",{id:$})})},z=()=>{tA.id="",tA.type="",d===0&&(nA.value=!1)},J=()=>{ne("mouseEnterOrLeave",{id:u,type:"enter"})},rA=()=>{ne("mouseEnterOrLeave",{id:u,type:"leave"})},dA=V=>{ne("dragClick",{id:V})},bA={mouseEnterOrLeave:({id:V,type:$})=>{$==="enter"?K.push(V):K.length>0&&K.splice(K.length-1,1);const uA=K.length;uA>0&&u===K[uA-1]?eA.value=!0:eA.value=!1},dragAciveChild:({type:V,id:$})=>{$===u?V==="top"?(q.value=!0,k.value=!1):(k.value=!0,q.value=!1):(k.value=!1,q.value=!1)},dragClick({id:V,isAgain:$}){console.log("dragClick",V,u),V!==u?W.value=!1:($&&(W.value=!1),P())}};bA[`dragGetChildDistance_${u}`]=({dragX:V,dragY:$,moveId:uA})=>F(V,$,Y(uA));const AA={isInContainer({x:V,y:$,id:uA,moveId:BA}){if(u===uA||w(uA,u))return iA.value=!1,{isIn:!1,level:d,id:u,groupId:a};const HA=Y(BA);if(S(V,$,HA))return d===0&&(nA.value=!0),{isIn:!0,level:d,id:u,groupId:a};if(d===0){const{ly:aA,lx:wA}=F(V,$,HA);if(aA<20&&wA<20)return nA.value=!0,{isIn:!0,level:d,id:u,groupId:a};nA.value=!1}return iA.value=!1,{isIn:!1,level:d,id:u,groupId:a}},dragActiveContainer:({containerId:V,containerGroupId:$,dragX:uA,dragY:BA,moveId:HA})=>{if(V===u&&$===a)if(iA.value=!0,n&&n.value.length>0){let aA={ly:9999999,lx:0,lallx:0,id:"",typey:""};n?.value.forEach(wA=>{if(a&&wA.groupId!==a)return;const _=ne(`dragGetChildDistance_${wA.id}`,{dragX:uA,dragY:BA,moveId:HA})[0];_&&(aA.ly>_.ly||aA.ly===_.ly&&(aA.lx>_.lx||aA.lx===_.lx&&aA.lallx>_.lallx))&&(aA=_,aA.id=wA.id)}),tA.id=aA.id,tA.type=aA.typey,ne("dragAciveChild",{id:aA.id,type:aA.typey})}else ne("dragAciveChild",{id:""});else iA.value=!1},dragAdd:V=>{if(iA.value){let $=n?.value.length||0;tA.id!==""&&tA.id!==void 0&&($=n?.value.findIndex(uA=>uA.id===tA.id)||0,tA.type==="bottom"&&($+=1)),m(V,u,$,a),iA.value=!1}z()},dragAddByClick:V=>{if(!M.value&&u===U.id||M.value?.id===u||M.value?.containerId===u&&M.value?.dragType!=="container"){const $=m(V,u,n?.value.length||0,a,!0);$&&V.config&&Object.keys(V.config).forEach(uA=>{$.config[uA]=V.config[uA]})}},dragUpdate(V){if(iA.value){const $=B(V);if($.level=d+1,tA.id!==$.id){H($.containerId,V);let uA=n?.value.findIndex(BA=>BA.id===tA.id)||0;tA.type==="bottom"&&(uA+=1),N($,u,uA,a)}iA.value=!1,(0,r.nextTick)(()=>{ne("dragClick",{id:$.id,isAgain:!0})})}z()}},cA={};return(0,r.onMounted)(()=>{(!o||t!=="container")&&Object.keys(bA).forEach(V=>{cA[V]=os(V,bA[V])}),t==="container"&&Object.keys(AA).forEach(V=>{cA[V]=os(V,AA[V])}),A.isNewAdd&&(0,r.nextTick)(()=>{P(),delete A.isNewAdd})}),(0,r.onUnmounted)(()=>{Object.keys(cA).forEach(V=>{Su(V,cA[V])})}),{onMouseenter:J,onMouseleave:rA,activeComponent:P,handleComponentClick:dA,deleteComponentByClick:R,copyComponent:T,getParentComponents:Q,isBottomToolBar:lA,isHover:eA,isSelect:W,isToContainer:iA,isMoveingInTopLevel:nA,isTopActive:q,isBottomActive:k}},ss=(e,A)=>{const t={x:0,y:0,clientX:0,clientY:0,dragElement:null,dragElementId:"jcode-darg-move-id",toContainerLevel:-1,toContainerId:"",groupId:"",id:""};let n=!1;const o=(v,Q)=>{n!==!0&&(n=!0,setTimeout(()=>{v(),n=!1},Q))},a=(0,r.ref)(!1),u=(v,Q,H)=>{const N=document.createElement("div");return N.id=t.dragElementId,N.innerText=v,N.className="d-drag-move",N.style.top=`${Q}px`,N.style.left=`${H}px`,document.body.appendChild(N),N},d=()=>{document.onmousemove=null,document.onmouseup=null,a.value=!1,ne("dragAciveChild",{id:""})},h=()=>{d(),t.dragElement&&(t.dragElement.remove(),t.dragElement=null,A?ne("dragAdd",e):ne("dragUpdate",e.id))},g=v=>{const{clientY:Q,clientX:H}=v;if(!t.dragElement){const N=Math.abs(t.x-H),T=Math.abs(t.y-Q);if(N<=1&&T<=1)return;a.value=!0,t.dragElement=u(e.name,Q-11,H-32)}t.dragElement.style.top=`${Q-11}px`,t.dragElement.style.left=`${H-32}px`,t.clientX=H,t.clientY=Q,o(()=>{if(!a.value)return;const N=ne("isInContainer",{x:H,y:Q,id:e.id,moveId:t.id});t.toContainerLevel=-1,t.toContainerId="",t.groupId="",N.forEach(({level:T,id:M,isIn:U,groupId:K})=>{U&&t.toContainerLevel<T&&(t.toContainerLevel=T,t.toContainerId=M,t.groupId=K)}),t.toContainerId!==""?ne("dragActiveContainer",{containerId:t.toContainerId,containerGroupId:t.groupId,dragX:H,dragY:Q,moveId:t.id}):ne("dragAciveChild",{id:""})},100)};return{onContextmenu:()=>{d()},onMousedown:v=>{t.x=v.clientX,t.y=v.clientY,t.id=dt(),document.onmouseup=h,document.onmousemove=g},onClick:()=>{ne("dragAddByClick",e)},moveActive:a}},xu={class:"d-drag-btns-pname"},Du={key:0,class:"d-drag-mask"},Nu=(0,r.defineComponent)({name:"DDrag",__name:"drag",props:{componentData:{default:()=>({})},isContainer:{type:Boolean,default:!1}},setup(e){const A=e,t=(0,r.ref)(),{onMouseenter:n,onMouseleave:o,activeComponent:a,handleComponentClick:u,deleteComponentByClick:d,copyComponent:h,getParentComponents:g,isHover:B,isSelect:w,isTopActive:m,isBottomActive:v,isBottomToolBar:Q}=is(t,A.componentData,"component"),{onContextmenu:H,onMousedown:N,moveActive:T}=ss(A.componentData,!1);return(M,U)=>{const K=(0,r.resolveComponent)("j-button"),eA=(0,r.resolveComponent)("el-space");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["d-drag-component",{selected:(0,r.unref)(w),hovered:(0,r.unref)(B),isBottomToolBar:(0,r.unref)(Q),active:(0,r.unref)(T),isTopActive:(0,r.unref)(m),isBottomActive:(0,r.unref)(v)}])},[U[11]||(U[11]=(0,r.createElementVNode)("div",{class:"d-drag-line"},null,-1)),(0,r.createElementVNode)("div",{class:"d-drag-btns",onMouseenter:U[4]||(U[4]=(...W)=>(0,r.unref)(n)&&(0,r.unref)(n)(...W)),onMouseleave:U[5]||(U[5]=(...W)=>(0,r.unref)(o)&&(0,r.unref)(o)(...W))},[(0,r.createVNode)(eA,{size:4},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,r.withModifiers)(()=>{},["stop"])},[(0,r.createVNode)(K,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"]),(0,r.createElementVNode)("div",xu,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(g)(e.componentData.containerId),W=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:W.id},[(0,r.createVNode)(K,{class:"d-drag-btn",type:"primary",size:"small",label:W.name,onClick:iA=>(0,r.unref)(u)(W.id)},null,8,["label","onClick"])]))),128))])]),(0,r.createVNode)(K,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:content-copy",onClick:U[0]||(U[0]=(0,r.withModifiers)(W=>(0,r.unref)(h)(e.componentData.id),["stop"]))}),(0,r.createElementVNode)("div",{onContextmenu:U[1]||(U[1]=(0,r.withModifiers)((...W)=>(0,r.unref)(H)&&(0,r.unref)(H)(...W),["stop"])),onMousedown:U[2]||(U[2]=(0,r.withModifiers)((...W)=>(0,r.unref)(N)&&(0,r.unref)(N)(...W),["stop"])),style:{display:"flex"}},[(0,r.createVNode)(K,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:drag"})],32),(0,r.createVNode)(K,{class:"d-drag-btn",danger:"",type:"primary",size:"small",icon:"mdi:delete",onClick:U[3]||(U[3]=(0,r.withModifiers)(W=>(0,r.unref)(d)(e.componentData.id),["stop"]))})]),_:1})],32),(0,r.createElementVNode)("div",{ref_key:"refDrag",ref:t,class:"d-drag-body",onClick:U[6]||(U[6]=(0,r.withModifiers)((...W)=>(0,r.unref)(a)&&(0,r.unref)(a)(...W),["stop"])),onContextmenu:U[7]||(U[7]=(0,r.withModifiers)((...W)=>(0,r.unref)(H)&&(0,r.unref)(H)(...W),["stop"])),onMousedown:U[8]||(U[8]=(0,r.withModifiers)((...W)=>(0,r.unref)(N)&&(0,r.unref)(N)(...W),["stop"])),onMouseenter:U[9]||(U[9]=(...W)=>(0,r.unref)(n)&&(0,r.unref)(n)(...W)),onMouseleave:U[10]||(U[10]=(...W)=>(0,r.unref)(o)&&(0,r.unref)(o)(...W))},[(0,r.renderSlot)(M.$slots,"default"),e.isContainer?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",Du))],544)],2)}}}),Io=Nu,Lu=(0,r.defineComponent)({name:"DDragTool",__name:"tool",props:{config:{}},setup(e){const{onContextmenu:A,onMousedown:t,onClick:n}=ss(e.config??{name:"",id:""},!0);return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-drag-tool",onClick:a[0]||(a[0]=(0,r.withModifiers)((...u)=>(0,r.unref)(n)&&(0,r.unref)(n)(...u),["stop"])),onContextmenu:a[1]||(a[1]=(0,r.withModifiers)((...u)=>(0,r.unref)(A)&&(0,r.unref)(A)(...u),["stop"])),onMousedown:a[2]||(a[2]=(0,r.withModifiers)((...u)=>(0,r.unref)(t)&&(0,r.unref)(t)(...u),["stop"]))},[(0,r.renderSlot)(o.$slots,"default")],32))}}),_o=Lu,Tu={key:0,class:"d-drag-line"},ku={key:1,class:"d-drag-btns"},Mu=(0,r.defineComponent)({name:"DDragContainer",__name:"container",props:{componentData:{default:()=>({})},isComponentContainer:{type:Boolean,default:!0},groupId:{default:void 0}},setup(e){const A=e,t=(0,r.ref)(),n=(0,r.computed)(()=>A.componentData?.children||[]),{onMouseenter:o,onMouseleave:a,activeComponent:u,isHover:d,isSelect:h,isToContainer:g,isMoveingInTopLevel:B,isTopActive:w,isBottomActive:m}=is(t,A.componentData,"container",n,A.isComponentContainer,A.groupId),v=(0,r.computed)(()=>!!(n.value.findIndex(Q=>Q.groupId===A.groupId)===-1&&g.value));return(Q,H)=>{const N=(0,r.resolveComponent)("j-button");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"refDrag",ref:t,class:(0,r.normalizeClass)(["d-drag-container",{selected:(0,r.unref)(h)&&!e.isComponentContainer,hovered:(0,r.unref)(d)&&!e.isComponentContainer,isTopLevel:e.componentData.level===0,active:v.value,isMoveingInTopLevel:(0,r.unref)(B),isTopActive:(0,r.unref)(w),isBottomActive:(0,r.unref)(m)}])},[e.isComponentContainer?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",Tu)),e.isComponentContainer?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",ku,[(0,r.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,r.withModifiers)(()=>{},["stop"])},[(0,r.createVNode)(N,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"])])])),(0,r.createElementVNode)("div",{class:"d-drag-body",onClick:H[0]||(H[0]=(0,r.withModifiers)((...T)=>(0,r.unref)(u)&&(0,r.unref)(u)(...T),["stop"])),onMouseenter:H[1]||(H[1]=(...T)=>(0,r.unref)(o)&&(0,r.unref)(o)(...T)),onMouseleave:H[2]||(H[2]=(...T)=>(0,r.unref)(a)&&(0,r.unref)(a)(...T))},[(0,r.renderSlot)(Q.$slots,"default")],32)],2)}}}),So=Mu,Ku=(0,r.defineComponent)({name:"DDragFormList",__name:"dragFormList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,r.inject)("dui-design-provide",{});return(t,n)=>{const o=(0,r.resolveComponent)("el-col");return(0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.componentList,a=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:a.id},[a.type!="pkey"?((0,r.openBlock)(),(0,r.createBlock)(o,{key:0,span:a.config.span||24},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Io,{"is-container":a.dragType!=="component","component-data":a},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["is-container","component-data"])]),_:2},1032,["span"])):(0,r.createCommentVNode)("",!0)],64))),128)}}}),xo=Ku,Ou=(0,r.defineComponent)({name:"DDragIndexList",__name:"dragIndexList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,r.inject)("dui-design-provide",{}),t=n=>{if(n.flexWidth)return{width:n.flexWidth+"%"}};return(n,o)=>((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.componentList,a=>((0,r.openBlock)(),(0,r.createBlock)(Io,{key:a.id,style:(0,r.normalizeStyle)(t(a.config)),"is-container":a.dragType!=="component","component-data":a},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["style","is-container","component-data"]))),128))}}),Do=Ou,as=ut(Io,[_o,So,xo,Do]);function mn(e){return(0,r.getCurrentScope)()?((0,r.onScopeDispose)(e),!0):!1}function Je(e){return typeof e=="function"?e():(0,r.unref)(e)}var Ru=typeof window<"u"&&typeof document<"u",Vu=e=>typeof e<"u",Pu=Object.prototype.toString,Gu=e=>Pu.call(e)==="[object Object]",zu=()=>{};function Xu(e,A){function t(...n){return new Promise((o,a)=>{Promise.resolve(e(()=>A.apply(this,n),{fn:A,thisArg:this,args:n})).then(o).catch(a)})}return t}var ls=e=>e();function $u(e=ls){const A=(0,r.ref)(!0);function t(){A.value=!1}function n(){A.value=!0}const o=(...a)=>{A.value&&e(...a)};return{isActive:(0,r.readonly)(A),pause:t,resume:n,eventFilter:o}}function cs(e,A=!1,t="Timeout"){return new Promise((n,o)=>{setTimeout(A?()=>o(t):n,e)})}function Wu(e,A,t={}){const{eventFilter:n=ls,...o}=t;return(0,r.watch)(e,Xu(n,A),o)}function zt(e,A,t={}){const{eventFilter:n,...o}=t,{eventFilter:a,pause:u,resume:d,isActive:h}=$u(n);return{stop:Wu(e,A,{...o,eventFilter:a}),pause:u,resume:d,isActive:h}}function Yu(e,A={}){if(!(0,r.isRef)(e))return(0,r.toRefs)(e);const t=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)t[n]=(0,r.customRef)(()=>({get(){return e.value[n]},set(o){var a;if((a=Je(A.replaceRef))==null||a)if(Array.isArray(e.value)){const u=[...e.value];u[n]=o,e.value=u}else{const u={...e.value,[n]:o};Object.setPrototypeOf(u,Object.getPrototypeOf(e.value)),e.value=u}else e.value[n]=o}}));return t}function No(e,A=!1){function t(w,{flush:m="sync",deep:v=!1,timeout:Q,throwOnTimeout:H}={}){let N=null;const T=[new Promise(M=>{N=(0,r.watch)(e,U=>{w(U)!==A&&(N?.(),M(U))},{flush:m,deep:v,immediate:!0})})];return Q!=null&&T.push(cs(Q,H).then(()=>Je(e)).finally(()=>N?.())),Promise.race(T)}function n(w,m){if(!(0,r.isRef)(w))return t(U=>U===w,m);const{flush:v="sync",deep:Q=!1,timeout:H,throwOnTimeout:N}=m??{};let T=null;const M=[new Promise(U=>{T=(0,r.watch)([e,w],([K,eA])=>{A!==(K===eA)&&(T?.(),U(K))},{flush:v,deep:Q,immediate:!0})})];return H!=null&&M.push(cs(H,N).then(()=>Je(e)).finally(()=>(T?.(),Je(e)))),Promise.race(M)}function o(w){return t(m=>!!m,w)}function a(w){return n(null,w)}function u(w){return n(void 0,w)}function d(w){return t(Number.isNaN,w)}function h(w,m){return t(v=>{const Q=Array.from(v);return Q.includes(w)||Q.includes(Je(w))},m)}function g(w){return B(1,w)}function B(w=1,m){let v=-1;return t(()=>(v+=1,v>=w),m)}return Array.isArray(Je(e))?{toMatch:t,toContains:h,changed:g,changedTimes:B,get not(){return No(e,!A)}}:{toMatch:t,toBe:n,toBeTruthy:o,toBeNull:a,toBeNaN:d,toBeUndefined:u,changed:g,changedTimes:B,get not(){return No(e,!A)}}}function Lo(e){return No(e)}function Ju(e){var A;const t=Je(e);return(A=t?.$el)!=null?A:t}var us=Ru?window:void 0;function ds(...e){let A,t,n,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,n,o]=e,A=us):[A,t,n,o]=e,!A)return zu;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const a=[],u=()=>{a.forEach(B=>B()),a.length=0},d=(B,w,m,v)=>(B.addEventListener(w,m,v),()=>B.removeEventListener(w,m,v)),h=(0,r.watch)(()=>[Ju(A),Je(o)],([B,w])=>{if(u(),!B)return;const m=Gu(w)?{...w}:w;a.push(...t.flatMap(v=>n.map(Q=>d(B,v,Q,m))))},{immediate:!0,flush:"post"}),g=()=>{h(),u()};return mn(g),g}function Zu(e){return typeof e=="function"?e:typeof e=="string"?A=>A.key===e:Array.isArray(e)?A=>e.includes(A.key):()=>!0}function fs(...e){let A,t,n={};e.length===3?(A=e[0],t=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(A=!0,t=e[0],n=e[1]):(A=e[0],t=e[1]):(A=!0,t=e[0]);const{target:o=us,eventName:a="keydown",passive:u=!1,dedupe:d=!1}=n,h=Zu(A);return ds(o,a,B=>{B.repeat&&Je(d)||h(B)&&t(B)},u)}function ju(e){return JSON.parse(JSON.stringify(e))}function To(e,A,t,n={}){var o,a,u;const{clone:d=!1,passive:h=!1,eventName:g,deep:B=!1,defaultValue:w,shouldEmit:m}=n,v=(0,r.getCurrentInstance)(),Q=t||v?.emit||((o=v?.$emit)==null?void 0:o.bind(v))||((u=(a=v?.proxy)==null?void 0:a.$emit)==null?void 0:u.bind(v?.proxy));let H=g;A||(A="modelValue"),H=H||`update:${A.toString()}`;const N=U=>d?typeof d=="function"?d(U):ju(U):U,T=()=>Vu(e[A])?N(e[A]):w,M=U=>{m?m(U)&&Q(H,U):Q(H,U)};if(h){const U=(0,r.ref)(T());let K=!1;return(0,r.watch)(()=>e[A],eA=>{K||(K=!0,U.value=N(eA),(0,r.nextTick)(()=>K=!1))}),(0,r.watch)(U,eA=>{!K&&(eA!==e[A]||B)&&M(eA)},{deep:B}),U}else return(0,r.computed)({get(){return T()},set(U){M(U)}})}var qu={value:()=>{}};function tr(){for(var e=0,A=arguments.length,t={},n;e<A;++e){if(!(n=arguments[e]+"")||n in t||/[\s.]/.test(n))throw new Error("illegal type: "+n);t[n]=[]}return new nr(t)}function nr(e){this._=e}function Ad(e,A){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");if(o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),t&&!A.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}nr.prototype=tr.prototype={constructor:nr,on:function(e,A){var t=this._,n=Ad(e+"",t),o,a=-1,u=n.length;if(arguments.length<2){for(;++a<u;)if((o=(e=n[a]).type)&&(o=ed(t[o],e.name)))return o;return}if(A!=null&&typeof A!="function")throw new Error("invalid callback: "+A);for(;++a<u;)if(o=(e=n[a]).type)t[o]=gs(t[o],e.name,A);else if(A==null)for(o in t)t[o]=gs(t[o],e.name,null);return this},copy:function(){var e={},A=this._;for(var t in A)e[t]=A[t].slice();return new nr(e)},call:function(e,A){if((o=arguments.length-2)>0)for(var t=new Array(o),n=0,o,a;n<o;++n)t[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,o=a.length;n<o;++n)a[n].value.apply(A,t)},apply:function(e,A,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],o=0,a=n.length;o<a;++o)n[o].value.apply(A,t)}};function ed(e,A){for(var t=0,n=e.length,o;t<n;++t)if((o=e[t]).name===A)return o.value}function gs(e,A,t){for(var n=0,o=e.length;n<o;++n)if(e[n].name===A){e[n]=qu,e=e.slice(0,n).concat(e.slice(n+1));break}return t!=null&&e.push({name:A,value:t}),e}var ko="http://www.w3.org/1999/xhtml",hs={svg:"http://www.w3.org/2000/svg",xhtml:ko,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rr(e){var A=e+="",t=A.indexOf(":");return t>=0&&(A=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),hs.hasOwnProperty(A)?{space:hs[A],local:e}:e}function td(e){return function(){var A=this.ownerDocument,t=this.namespaceURI;return t===ko&&A.documentElement.namespaceURI===ko?A.createElement(e):A.createElementNS(t,e)}}function nd(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bs(e){var A=rr(e);return(A.local?nd:td)(A)}function rd(){}function Mo(e){return e==null?rd:function(){return this.querySelector(e)}}function od(e){typeof e!="function"&&(e=Mo(e));for(var A=this._groups,t=A.length,n=new Array(t),o=0;o<t;++o)for(var a=A[o],u=a.length,d=n[o]=new Array(u),h,g,B=0;B<u;++B)(h=a[B])&&(g=e.call(h,h.__data__,B,a))&&("__data__"in h&&(g.__data__=h.__data__),d[B]=g);return new Ue(n,this._parents)}function id(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sd(){return[]}function ps(e){return e==null?sd:function(){return this.querySelectorAll(e)}}function ad(e){return function(){return id(e.apply(this,arguments))}}function ld(e){typeof e=="function"?e=ad(e):e=ps(e);for(var A=this._groups,t=A.length,n=[],o=[],a=0;a<t;++a)for(var u=A[a],d=u.length,h,g=0;g<d;++g)(h=u[g])&&(n.push(e.call(h,h.__data__,g,u)),o.push(h));return new Ue(n,o)}function ms(e){return function(){return this.matches(e)}}function ws(e){return function(A){return A.matches(e)}}var cd=Array.prototype.find;function ud(e){return function(){return cd.call(this.children,e)}}function dd(){return this.firstElementChild}function fd(e){return this.select(e==null?dd:ud(typeof e=="function"?e:ws(e)))}var gd=Array.prototype.filter;function hd(){return Array.from(this.children)}function Bd(e){return function(){return gd.call(this.children,e)}}function pd(e){return this.selectAll(e==null?hd:Bd(typeof e=="function"?e:ws(e)))}function md(e){typeof e!="function"&&(e=ms(e));for(var A=this._groups,t=A.length,n=new Array(t),o=0;o<t;++o)for(var a=A[o],u=a.length,d=n[o]=[],h,g=0;g<u;++g)(h=a[g])&&e.call(h,h.__data__,g,a)&&d.push(h);return new Ue(n,this._parents)}function Cs(e){return new Array(e.length)}function wd(){return new Ue(this._enter||this._groups.map(Cs),this._parents)}function or(e,A){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=A}or.prototype={constructor:or,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,A){return this._parent.insertBefore(e,A)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Cd(e){return function(){return e}}function vd(e,A,t,n,o,a){for(var u=0,d,h=A.length,g=a.length;u<g;++u)(d=A[u])?(d.__data__=a[u],n[u]=d):t[u]=new or(e,a[u]);for(;u<h;++u)(d=A[u])&&(o[u]=d)}function yd(e,A,t,n,o,a,u){var d,h,g=new Map,B=A.length,w=a.length,m=new Array(B),v;for(d=0;d<B;++d)(h=A[d])&&(m[d]=v=u.call(h,h.__data__,d,A)+"",g.has(v)?o[d]=h:g.set(v,h));for(d=0;d<w;++d)v=u.call(e,a[d],d,a)+"",(h=g.get(v))?(n[d]=h,h.__data__=a[d],g.delete(v)):t[d]=new or(e,a[d]);for(d=0;d<B;++d)(h=A[d])&&g.get(m[d])===h&&(o[d]=h)}function Qd(e){return e.__data__}function Ed(e,A){if(!arguments.length)return Array.from(this,Qd);var t=A?yd:vd,n=this._parents,o=this._groups;typeof e!="function"&&(e=Cd(e));for(var a=o.length,u=new Array(a),d=new Array(a),h=new Array(a),g=0;g<a;++g){var B=n[g],w=o[g],m=w.length,v=Ud(e.call(B,B&&B.__data__,g,n)),Q=v.length,H=d[g]=new Array(Q),N=u[g]=new Array(Q);t(B,w,H,N,h[g]=new Array(m),v,A);for(var T=0,M=0,U,K;T<Q;++T)if(U=H[T]){for(T>=M&&(M=T+1);!(K=N[M])&&++M<Q;);U._next=K||null}}return u=new Ue(u,n),u._enter=d,u._exit=h,u}function Ud(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fd(){return new Ue(this._exit||this._groups.map(Cs),this._parents)}function bd(e,A,t){var n=this.enter(),o=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),A!=null&&(o=A(o),o&&(o=o.selection())),t==null?a.remove():t(a),n&&o?n.merge(o).order():o}function Hd(e){for(var A=e.selection?e.selection():e,t=this._groups,n=A._groups,o=t.length,a=n.length,u=Math.min(o,a),d=new Array(o),h=0;h<u;++h)for(var g=t[h],B=n[h],w=g.length,m=d[h]=new Array(w),v,Q=0;Q<w;++Q)(v=g[Q]||B[Q])&&(m[Q]=v);for(;h<o;++h)d[h]=t[h];return new Ue(d,this._parents)}function Id(){for(var e=this._groups,A=-1,t=e.length;++A<t;)for(var n=e[A],o=n.length-1,a=n[o],u;--o>=0;)(u=n[o])&&(a&&u.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(u,a),a=u);return this}function _d(e){e||(e=Sd);function A(w,m){return w&&m?e(w.__data__,m.__data__):!w-!m}for(var t=this._groups,n=t.length,o=new Array(n),a=0;a<n;++a){for(var u=t[a],d=u.length,h=o[a]=new Array(d),g,B=0;B<d;++B)(g=u[B])&&(h[B]=g);h.sort(A)}return new Ue(o,this._parents).order()}function Sd(e,A){return e<A?-1:e>A?1:e>=A?0:NaN}function xd(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Dd(){return Array.from(this)}function Nd(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],o=0,a=n.length;o<a;++o){var u=n[o];if(u)return u}return null}function Ld(){let e=0;for(const A of this)++e;return e}function Td(){return!this.node()}function kd(e){for(var A=this._groups,t=0,n=A.length;t<n;++t)for(var o=A[t],a=0,u=o.length,d;a<u;++a)(d=o[a])&&e.call(d,d.__data__,a,o);return this}function Md(e){return function(){this.removeAttribute(e)}}function Kd(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Od(e,A){return function(){this.setAttribute(e,A)}}function Rd(e,A){return function(){this.setAttributeNS(e.space,e.local,A)}}function Vd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function Pd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function Gd(e,A){var t=rr(e);if(arguments.length<2){var n=this.node();return t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}return this.each((A==null?t.local?Kd:Md:typeof A=="function"?t.local?Pd:Vd:t.local?Rd:Od)(t,A))}function vs(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zd(e){return function(){this.style.removeProperty(e)}}function Xd(e,A,t){return function(){this.style.setProperty(e,A,t)}}function $d(e,A,t){return function(){var n=A.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,t)}}function Wd(e,A,t){return arguments.length>1?this.each((A==null?zd:typeof A=="function"?$d:Xd)(e,A,t??"")):Xt(this.node(),e)}function Xt(e,A){return e.style.getPropertyValue(A)||vs(e).getComputedStyle(e,null).getPropertyValue(A)}function Yd(e){return function(){delete this[e]}}function Jd(e,A){return function(){this[e]=A}}function Zd(e,A){return function(){var t=A.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function jd(e,A){return arguments.length>1?this.each((A==null?Yd:typeof A=="function"?Zd:Jd)(e,A)):this.node()[e]}function ys(e){return e.trim().split(/^|\s+/)}function Ko(e){return e.classList||new Qs(e)}function Qs(e){this._node=e,this._names=ys(e.getAttribute("class")||"")}Qs.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var A=this._names.indexOf(e);A>=0&&(this._names.splice(A,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Es(e,A){for(var t=Ko(e),n=-1,o=A.length;++n<o;)t.add(A[n])}function Us(e,A){for(var t=Ko(e),n=-1,o=A.length;++n<o;)t.remove(A[n])}function qd(e){return function(){Es(this,e)}}function Af(e){return function(){Us(this,e)}}function ef(e,A){return function(){(A.apply(this,arguments)?Es:Us)(this,e)}}function tf(e,A){var t=ys(e+"");if(arguments.length<2){for(var n=Ko(this.node()),o=-1,a=t.length;++o<a;)if(!n.contains(t[o]))return!1;return!0}return this.each((typeof A=="function"?ef:A?qd:Af)(t,A))}function nf(){this.textContent=""}function rf(e){return function(){this.textContent=e}}function of(e){return function(){var A=e.apply(this,arguments);this.textContent=A??""}}function sf(e){return arguments.length?this.each(e==null?nf:(typeof e=="function"?of:rf)(e)):this.node().textContent}function af(){this.innerHTML=""}function lf(e){return function(){this.innerHTML=e}}function cf(e){return function(){var A=e.apply(this,arguments);this.innerHTML=A??""}}function uf(e){return arguments.length?this.each(e==null?af:(typeof e=="function"?cf:lf)(e)):this.node().innerHTML}function df(){this.nextSibling&&this.parentNode.appendChild(this)}function ff(){return this.each(df)}function gf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hf(){return this.each(gf)}function Bf(e){var A=typeof e=="function"?e:Bs(e);return this.select(function(){return this.appendChild(A.apply(this,arguments))})}function pf(){return null}function mf(e,A){var t=typeof e=="function"?e:Bs(e),n=A==null?pf:typeof A=="function"?A:Mo(A);return this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})}function wf(){var e=this.parentNode;e&&e.removeChild(this)}function Cf(){return this.each(wf)}function vf(){var e=this.cloneNode(!1),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function yf(){var e=this.cloneNode(!0),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function Qf(e){return this.select(e?yf:vf)}function Ef(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Uf(e){return function(A){e.call(this,A,this.__data__)}}function Ff(e){return e.trim().split(/^|\s+/).map(function(A){var t="",n=A.indexOf(".");return n>=0&&(t=A.slice(n+1),A=A.slice(0,n)),{type:A,name:t}})}function bf(e){return function(){var A=this.__on;if(A){for(var t=0,n=-1,o=A.length,a;t<o;++t)a=A[t],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):A[++n]=a;++n?A.length=n:delete this.__on}}}function Hf(e,A,t){return function(){var n=this.__on,o,a=Uf(A);if(n){for(var u=0,d=n.length;u<d;++u)if((o=n[u]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=t),o.value=A;return}}this.addEventListener(e.type,a,t),o={type:e.type,name:e.name,value:A,listener:a,options:t},n?n.push(o):this.__on=[o]}}function If(e,A,t){var n=Ff(e+""),o,a=n.length,u;if(arguments.length<2){var d=this.node().__on;if(d){for(var h=0,g=d.length,B;h<g;++h)for(o=0,B=d[h];o<a;++o)if((u=n[o]).type===B.type&&u.name===B.name)return B.value}return}for(d=A?Hf:bf,o=0;o<a;++o)this.each(d(n[o],A,t));return this}function Fs(e,A,t){var n=vs(e),o=n.CustomEvent;typeof o=="function"?o=new o(A,t):(o=n.document.createEvent("Event"),t?(o.initEvent(A,t.bubbles,t.cancelable),o.detail=t.detail):o.initEvent(A,!1,!1)),e.dispatchEvent(o)}function _f(e,A){return function(){return Fs(this,e,A)}}function Sf(e,A){return function(){return Fs(this,e,A.apply(this,arguments))}}function xf(e,A){return this.each((typeof A=="function"?Sf:_f)(e,A))}function*Df(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],o=0,a=n.length,u;o<a;++o)(u=n[o])&&(yield u)}var bs=[null];function Ue(e,A){this._groups=e,this._parents=A}function wn(){return new Ue([[document.documentElement]],bs)}function Nf(){return this}Ue.prototype=wn.prototype={constructor:Ue,select:od,selectAll:ld,selectChild:fd,selectChildren:pd,filter:md,data:Ed,enter:wd,exit:Fd,join:bd,merge:Hd,selection:Nf,order:Id,sort:_d,call:xd,nodes:Dd,node:Nd,size:Ld,empty:Td,each:kd,attr:Gd,style:Wd,property:jd,classed:tf,text:sf,html:uf,raise:ff,lower:hf,append:Bf,insert:mf,remove:Cf,clone:Qf,datum:Ef,on:If,dispatch:xf,[Symbol.iterator]:Df};function Ne(e){return typeof e=="string"?new Ue([[document.querySelector(e)]],[document.documentElement]):new Ue([[e]],bs)}function Lf(e){let A;for(;A=e.sourceEvent;)e=A;return e}function Oe(e,A){if(e=Lf(e),A===void 0&&(A=e.currentTarget),A){var t=A.ownerSVGElement||A;if(t.createSVGPoint){var n=t.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(A.getScreenCTM().inverse()),[n.x,n.y]}if(A.getBoundingClientRect){var o=A.getBoundingClientRect();return[e.clientX-o.left-A.clientLeft,e.clientY-o.top-A.clientTop]}}return[e.pageX,e.pageY]}var Tf={passive:!1},Cn={capture:!0,passive:!1};function Oo(e){e.stopImmediatePropagation()}function $t(e){e.preventDefault(),e.stopImmediatePropagation()}function Hs(e){var A=e.document.documentElement,t=Ne(e).on("dragstart.drag",$t,Cn);"onselectstart"in A?t.on("selectstart.drag",$t,Cn):(A.__noselect=A.style.MozUserSelect,A.style.MozUserSelect="none")}function Is(e,A){var t=e.document.documentElement,n=Ne(e).on("dragstart.drag",null);A&&(n.on("click.drag",$t,Cn),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in t?n.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}var ir=e=>()=>e;function Ro(e,{sourceEvent:A,subject:t,target:n,identifier:o,active:a,x:u,y:d,dx:h,dy:g,dispatch:B}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:B}})}Ro.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function kf(e){return!e.ctrlKey&&!e.button}function Mf(){return this.parentNode}function Kf(e,A){return A??{x:e.x,y:e.y}}function Of(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rf(){var e=kf,A=Mf,t=Kf,n=Of,o={},a=tr("start","drag","end"),u=0,d,h,g,B,w=0;function m(K){K.on("mousedown.drag",v).filter(n).on("touchstart.drag",N).on("touchmove.drag",T,Tf).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(K,eA){if(!(B||!e.call(this,K,eA))){var W=U(this,A.call(this,K,eA),K,eA,"mouse");W&&(Ne(K.view).on("mousemove.drag",Q,Cn).on("mouseup.drag",H,Cn),Hs(K.view),Oo(K),g=!1,d=K.clientX,h=K.clientY,W("start",K))}}function Q(K){if($t(K),!g){var eA=K.clientX-d,W=K.clientY-h;g=eA*eA+W*W>w}o.mouse("drag",K)}function H(K){Ne(K.view).on("mousemove.drag mouseup.drag",null),Is(K.view,g),$t(K),o.mouse("end",K)}function N(K,eA){if(e.call(this,K,eA)){var W=K.changedTouches,iA=A.call(this,K,eA),lA=W.length,nA,tA;for(nA=0;nA<lA;++nA)(tA=U(this,iA,K,eA,W[nA].identifier,W[nA]))&&(Oo(K),tA("start",K,W[nA]))}}function T(K){var eA=K.changedTouches,W=eA.length,iA,lA;for(iA=0;iA<W;++iA)(lA=o[eA[iA].identifier])&&($t(K),lA("drag",K,eA[iA]))}function M(K){var eA=K.changedTouches,W=eA.length,iA,lA;for(B&&clearTimeout(B),B=setTimeout(function(){B=null},500),iA=0;iA<W;++iA)(lA=o[eA[iA].identifier])&&(Oo(K),lA("end",K,eA[iA]))}function U(K,eA,W,iA,lA,nA){var tA=a.copy(),q=Oe(nA||W,eA),k,sA,I;if((I=t.call(K,new Ro("beforestart",{sourceEvent:W,target:m,identifier:lA,active:u,x:q[0],y:q[1],dx:0,dy:0,dispatch:tA}),iA))!=null)return k=I.x-q[0]||0,sA=I.y-q[1]||0,function Y(F,S,P){var R=q,z;switch(F){case"start":o[lA]=Y,z=u++;break;case"end":delete o[lA],--u;case"drag":q=Oe(P||S,eA),z=u;break}tA.call(F,K,new Ro(F,{sourceEvent:S,subject:I,target:m,identifier:lA,active:z,x:q[0]+k,y:q[1]+sA,dx:q[0]-R[0],dy:q[1]-R[1],dispatch:tA}),iA)}}return m.filter=function(K){return arguments.length?(e=typeof K=="function"?K:ir(!!K),m):e},m.container=function(K){return arguments.length?(A=typeof K=="function"?K:ir(K),m):A},m.subject=function(K){return arguments.length?(t=typeof K=="function"?K:ir(K),m):t},m.touchable=function(K){return arguments.length?(n=typeof K=="function"?K:ir(!!K),m):n},m.on=function(){var K=a.on.apply(a,arguments);return K===a?m:K},m.clickDistance=function(K){return arguments.length?(w=(K=+K)*K,m):Math.sqrt(w)},m}function Vo(e,A,t){e.prototype=A.prototype=t,t.constructor=e}function _s(e,A){var t=Object.create(e.prototype);for(var n in A)t[n]=A[n];return t}function vn(){}var yn=.7,sr=1/yn,Wt="\\s*([+-]?\\d+)\\s*",Qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vf=/^#([0-9a-f]{3,8})$/,Pf=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),Gf=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),zf=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Qn}\\)$`),Xf=new RegExp(`^rgba\\(${Re},${Re},${Re},${Qn}\\)$`),$f=new RegExp(`^hsl\\(${Qn},${Re},${Re}\\)$`),Wf=new RegExp(`^hsla\\(${Qn},${Re},${Re},${Qn}\\)$`),Ss={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Vo(vn,It,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xs,formatHex:xs,formatHex8:Yf,formatHsl:Jf,formatRgb:Ds,toString:Ds});function xs(){return this.rgb().formatHex()}function Yf(){return this.rgb().formatHex8()}function Jf(){return Ms(this).formatHsl()}function Ds(){return this.rgb().formatRgb()}function It(e){var A,t;return e=(e+"").trim().toLowerCase(),(A=Vf.exec(e))?(t=A[1].length,A=parseInt(A[1],16),t===6?Ns(A):t===3?new we(A>>8&15|A>>4&240,A>>4&15|A&240,(A&15)<<4|A&15,1):t===8?ar(A>>24&255,A>>16&255,A>>8&255,(A&255)/255):t===4?ar(A>>12&15|A>>8&240,A>>8&15|A>>4&240,A>>4&15|A&240,((A&15)<<4|A&15)/255):null):(A=Pf.exec(e))?new we(A[1],A[2],A[3],1):(A=Gf.exec(e))?new we(A[1]*255/100,A[2]*255/100,A[3]*255/100,1):(A=zf.exec(e))?ar(A[1],A[2],A[3],A[4]):(A=Xf.exec(e))?ar(A[1]*255/100,A[2]*255/100,A[3]*255/100,A[4]):(A=$f.exec(e))?ks(A[1],A[2]/100,A[3]/100,1):(A=Wf.exec(e))?ks(A[1],A[2]/100,A[3]/100,A[4]):Ss.hasOwnProperty(e)?Ns(Ss[e]):e==="transparent"?new we(NaN,NaN,NaN,0):null}function Ns(e){return new we(e>>16&255,e>>8&255,e&255,1)}function ar(e,A,t,n){return n<=0&&(e=A=t=NaN),new we(e,A,t,n)}function Zf(e){return e instanceof vn||(e=It(e)),e?(e=e.rgb(),new we(e.r,e.g,e.b,e.opacity)):new we}function Po(e,A,t,n){return arguments.length===1?Zf(e):new we(e,A,t,n??1)}function we(e,A,t,n){this.r=+e,this.g=+A,this.b=+t,this.opacity=+n}Vo(we,Po,_s(vn,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new we(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yn:Math.pow(yn,e),new we(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new we(_t(this.r),_t(this.g),_t(this.b),lr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ls,formatHex:Ls,formatHex8:jf,formatRgb:Ts,toString:Ts}));function Ls(){return`#${St(this.r)}${St(this.g)}${St(this.b)}`}function jf(){return`#${St(this.r)}${St(this.g)}${St(this.b)}${St((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ts(){const e=lr(this.opacity);return`${e===1?"rgb(":"rgba("}${_t(this.r)}, ${_t(this.g)}, ${_t(this.b)}${e===1?")":`, ${e})`}`}function lr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _t(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function St(e){return e=_t(e),(e<16?"0":"")+e.toString(16)}function ks(e,A,t,n){return n<=0?e=A=t=NaN:t<=0||t>=1?e=A=NaN:A<=0&&(e=NaN),new Le(e,A,t,n)}function Ms(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof vn||(e=It(e)),!e)return new Le;if(e instanceof Le)return e;e=e.rgb();var A=e.r/255,t=e.g/255,n=e.b/255,o=Math.min(A,t,n),a=Math.max(A,t,n),u=NaN,d=a-o,h=(a+o)/2;return d?(A===a?u=(t-n)/d+(t<n)*6:t===a?u=(n-A)/d+2:u=(A-t)/d+4,d/=h<.5?a+o:2-a-o,u*=60):d=h>0&&h<1?0:u,new Le(u,d,h,e.opacity)}function qf(e,A,t,n){return arguments.length===1?Ms(e):new Le(e,A,t,n??1)}function Le(e,A,t,n){this.h=+e,this.s=+A,this.l=+t,this.opacity=+n}Vo(Le,qf,_s(vn,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yn:Math.pow(yn,e),new Le(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,A=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*A,o=2*t-n;return new we(Go(e>=240?e-240:e+120,o,n),Go(e,o,n),Go(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Le(Ks(this.h),cr(this.s),cr(this.l),lr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lr(this.opacity);return`${e===1?"hsl(":"hsla("}${Ks(this.h)}, ${cr(this.s)*100}%, ${cr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ks(e){return e=(e||0)%360,e<0?e+360:e}function cr(e){return Math.max(0,Math.min(1,e||0))}function Go(e,A,t){return(e<60?A+(t-A)*e/60:e<180?t:e<240?A+(t-A)*(240-e)/60:A)*255}var zo=e=>()=>e;function Ag(e,A){return function(t){return e+t*A}}function eg(e,A,t){return e=Math.pow(e,t),A=Math.pow(A,t)-e,t=1/t,function(n){return Math.pow(e+n*A,t)}}function tg(e){return(e=+e)==1?Os:function(A,t){return t-A?eg(A,t,e):zo(isNaN(A)?t:A)}}function Os(e,A){var t=A-e;return t?Ag(e,t):zo(isNaN(e)?A:e)}var ur=(function e(A){var t=tg(A);function n(o,a){var u=t((o=Po(o)).r,(a=Po(a)).r),d=t(o.g,a.g),h=t(o.b,a.b),g=Os(o.opacity,a.opacity);return function(B){return o.r=u(B),o.g=d(B),o.b=h(B),o.opacity=g(B),o+""}}return n.gamma=e,n})(1);function ng(e,A){A||(A=[]);var t=e?Math.min(A.length,e.length):0,n=A.slice(),o;return function(a){for(o=0;o<t;++o)n[o]=e[o]*(1-a)+A[o]*a;return n}}function rg(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function og(e,A){var t=A?A.length:0,n=e?Math.min(t,e.length):0,o=new Array(n),a=new Array(t),u;for(u=0;u<n;++u)o[u]=En(e[u],A[u]);for(;u<t;++u)a[u]=A[u];return function(d){for(u=0;u<n;++u)a[u]=o[u](d);return a}}function ig(e,A){var t=new Date;return e=+e,A=+A,function(n){return t.setTime(e*(1-n)+A*n),t}}function Ve(e,A){return e=+e,A=+A,function(t){return e*(1-t)+A*t}}function sg(e,A){var t={},n={},o;(e===null||typeof e!="object")&&(e={}),(A===null||typeof A!="object")&&(A={});for(o in A)o in e?t[o]=En(e[o],A[o]):n[o]=A[o];return function(a){for(o in t)n[o]=t[o](a);return n}}var Xo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$o=new RegExp(Xo.source,"g");function ag(e){return function(){return e}}function lg(e){return function(A){return e(A)+""}}function Rs(e,A){var t=Xo.lastIndex=$o.lastIndex=0,n,o,a,u=-1,d=[],h=[];for(e=e+"",A=A+"";(n=Xo.exec(e))&&(o=$o.exec(A));)(a=o.index)>t&&(a=A.slice(t,a),d[u]?d[u]+=a:d[++u]=a),(n=n[0])===(o=o[0])?d[u]?d[u]+=o:d[++u]=o:(d[++u]=null,h.push({i:u,x:Ve(n,o)})),t=$o.lastIndex;return t<A.length&&(a=A.slice(t),d[u]?d[u]+=a:d[++u]=a),d.length<2?h[0]?lg(h[0].x):ag(A):(A=h.length,function(g){for(var B=0,w;B<A;++B)d[(w=h[B]).i]=w.x(g);return d.join("")})}function En(e,A){var t=typeof A,n;return A==null||t==="boolean"?zo(A):(t==="number"?Ve:t==="string"?(n=It(A))?(A=n,ur):Rs:A instanceof It?ur:A instanceof Date?ig:rg(A)?ng:Array.isArray(A)?og:typeof A.valueOf!="function"&&typeof A.toString!="function"||isNaN(A)?sg:Ve)(e,A)}var Vs=180/Math.PI,Wo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ps(e,A,t,n,o,a){var u,d,h;return(u=Math.sqrt(e*e+A*A))&&(e/=u,A/=u),(h=e*t+A*n)&&(t-=e*h,n-=A*h),(d=Math.sqrt(t*t+n*n))&&(t/=d,n/=d,h/=d),e*n<A*t&&(e=-e,A=-A,h=-h,u=-u),{translateX:o,translateY:a,rotate:Math.atan2(A,e)*Vs,skewX:Math.atan(h)*Vs,scaleX:u,scaleY:d}}var dr;function cg(e){const A=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return A.isIdentity?Wo:Ps(A.a,A.b,A.c,A.d,A.e,A.f)}function ug(e){return e==null||(dr||(dr=document.createElementNS("http://www.w3.org/2000/svg","g")),dr.setAttribute("transform",e),!(e=dr.transform.baseVal.consolidate()))?Wo:(e=e.matrix,Ps(e.a,e.b,e.c,e.d,e.e,e.f))}function Gs(e,A,t,n){function o(g){return g.length?g.pop()+" ":""}function a(g,B,w,m,v,Q){if(g!==w||B!==m){var H=v.push("translate(",null,A,null,t);Q.push({i:H-4,x:Ve(g,w)},{i:H-2,x:Ve(B,m)})}else(w||m)&&v.push("translate("+w+A+m+t)}function u(g,B,w,m){g!==B?(g-B>180?B+=360:B-g>180&&(g+=360),m.push({i:w.push(o(w)+"rotate(",null,n)-2,x:Ve(g,B)})):B&&w.push(o(w)+"rotate("+B+n)}function d(g,B,w,m){g!==B?m.push({i:w.push(o(w)+"skewX(",null,n)-2,x:Ve(g,B)}):B&&w.push(o(w)+"skewX("+B+n)}function h(g,B,w,m,v,Q){if(g!==w||B!==m){var H=v.push(o(v)+"scale(",null,",",null,")");Q.push({i:H-4,x:Ve(g,w)},{i:H-2,x:Ve(B,m)})}else(w!==1||m!==1)&&v.push(o(v)+"scale("+w+","+m+")")}return function(g,B){var w=[],m=[];return g=e(g),B=e(B),a(g.translateX,g.translateY,B.translateX,B.translateY,w,m),u(g.rotate,B.rotate,w,m),d(g.skewX,B.skewX,w,m),h(g.scaleX,g.scaleY,B.scaleX,B.scaleY,w,m),g=B=null,function(v){for(var Q=-1,H=m.length,N;++Q<H;)w[(N=m[Q]).i]=N.x(v);return w.join("")}}}var dg=Gs(cg,"px, ","px)","deg)"),fg=Gs(ug,", ",")",")"),gg=1e-12;function zs(e){return((e=Math.exp(e))+1/e)/2}function hg(e){return((e=Math.exp(e))-1/e)/2}function Bg(e){return((e=Math.exp(2*e))-1)/(e+1)}var fr=(function e(A,t,n){function o(a,u){var d=a[0],h=a[1],g=a[2],B=u[0],w=u[1],m=u[2],v=B-d,Q=w-h,H=v*v+Q*Q,N,T;if(H<gg)T=Math.log(m/g)/A,N=function(W){return[d+W*v,h+W*Q,g*Math.exp(A*W*T)]};else{var M=Math.sqrt(H),U=(m*m-g*g+n*H)/(2*g*t*M),K=(m*m-g*g-n*H)/(2*m*t*M),eA=Math.log(Math.sqrt(U*U+1)-U);T=(Math.log(Math.sqrt(K*K+1)-K)-eA)/A,N=function(W){var iA=W*T,lA=zs(eA),nA=g/(t*M)*(lA*Bg(A*iA+eA)-hg(eA));return[d+nA*v,h+nA*Q,g*lA/zs(A*iA+eA)]}}return N.duration=T*1e3*A/Math.SQRT2,N}return o.rho=function(a){var u=Math.max(.001,+a),d=u*u;return e(u,d,d*d)},o})(Math.SQRT2,2,4),Yt=0,Un=0,Fn=0,Xs=1e3,gr,bn,hr=0,xt=0,Br=0,Hn=typeof performance=="object"&&performance.now?performance:Date,$s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yo(){return xt||($s(pg),xt=Hn.now()+Br)}function pg(){xt=0}function pr(){this._call=this._time=this._next=null}pr.prototype=Ws.prototype={constructor:pr,restart:function(e,A,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?Yo():+t)+(A==null?0:+A),!this._next&&bn!==this&&(bn?bn._next=this:gr=this,bn=this),this._call=e,this._time=t,Jo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jo())}};function Ws(e,A,t){var n=new pr;return n.restart(e,A,t),n}function mg(){Yo(),++Yt;for(var e=gr,A;e;)(A=xt-e._time)>=0&&e._call.call(void 0,A),e=e._next;--Yt}function Ys(){xt=(hr=Hn.now())+Br,Yt=Un=0;try{mg()}finally{Yt=0,Cg(),xt=0}}function wg(){var e=Hn.now(),A=e-hr;A>Xs&&(Br-=A,hr=e)}function Cg(){for(var e,A=gr,t,n=1/0;A;)A._call?(n>A._time&&(n=A._time),e=A,A=A._next):(t=A._next,A._next=null,A=e?e._next=t:gr=t);bn=e,Jo(n)}function Jo(e){Yt||(Un&&(Un=clearTimeout(Un)),e-xt>24?(e<1/0&&(Un=setTimeout(Ys,e-Hn.now()-Br)),Fn&&(Fn=clearInterval(Fn))):(Fn||(hr=Hn.now(),Fn=setInterval(wg,Xs)),Yt=1,$s(Ys)))}function Js(e,A,t){var n=new pr;return A=A==null?0:+A,n.restart(o=>{n.stop(),e(o+A)},A,t),n}var vg=tr("start","end","cancel","interrupt"),yg=[],Zs=0,js=1,Zo=2,mr=3,qs=4,jo=5,wr=6;function Cr(e,A,t,n,o,a){var u=e.__transition;if(!u)e.__transition={};else if(t in u)return;Qg(e,t,{name:A,index:n,group:o,on:vg,tween:yg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Zs})}function qo(e,A){var t=Te(e,A);if(t.state>Zs)throw new Error("too late; already scheduled");return t}function Pe(e,A){var t=Te(e,A);if(t.state>mr)throw new Error("too late; already running");return t}function Te(e,A){var t=e.__transition;if(!t||!(t=t[A]))throw new Error("transition not found");return t}function Qg(e,A,t){var n=e.__transition,o;n[A]=t,t.timer=Ws(a,0,t.time);function a(g){t.state=js,t.timer.restart(u,t.delay,t.time),t.delay<=g&&u(g-t.delay)}function u(g){var B,w,m,v;if(t.state!==js)return h();for(B in n)if(v=n[B],v.name===t.name){if(v.state===mr)return Js(u);v.state===qs?(v.state=wr,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[B]):+B<A&&(v.state=wr,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[B])}if(Js(function(){t.state===mr&&(t.state=qs,t.timer.restart(d,t.delay,t.time),d(g))}),t.state=Zo,t.on.call("start",e,e.__data__,t.index,t.group),t.state===Zo){for(t.state=mr,o=new Array(m=t.tween.length),B=0,w=-1;B<m;++B)(v=t.tween[B].value.call(e,e.__data__,t.index,t.group))&&(o[++w]=v);o.length=w+1}}function d(g){for(var B=g<t.duration?t.ease.call(null,g/t.duration):(t.timer.restart(h),t.state=jo,1),w=-1,m=o.length;++w<m;)o[w].call(e,B);t.state===jo&&(t.on.call("end",e,e.__data__,t.index,t.group),h())}function h(){t.state=wr,t.timer.stop(),delete n[A];for(var g in n)return;delete e.__transition}}function vr(e,A){var t=e.__transition,n,o,a=!0,u;if(t){A=A==null?null:A+"";for(u in t){if((n=t[u]).name!==A){a=!1;continue}o=n.state>Zo&&n.state<jo,n.state=wr,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete t[u]}a&&delete e.__transition}}function Eg(e){return this.each(function(){vr(this,e)})}function Ug(e,A){var t,n;return function(){var o=Pe(this,e),a=o.tween;if(a!==t){n=t=a;for(var u=0,d=n.length;u<d;++u)if(n[u].name===A){n=n.slice(),n.splice(u,1);break}}o.tween=n}}function Fg(e,A,t){var n,o;if(typeof t!="function")throw new Error;return function(){var a=Pe(this,e),u=a.tween;if(u!==n){o=(n=u).slice();for(var d={name:A,value:t},h=0,g=o.length;h<g;++h)if(o[h].name===A){o[h]=d;break}h===g&&o.push(d)}a.tween=o}}function bg(e,A){var t=this._id;if(e+="",arguments.length<2){for(var n=Te(this.node(),t).tween,o=0,a=n.length,u;o<a;++o)if((u=n[o]).name===e)return u.value;return null}return this.each((A==null?Ug:Fg)(t,e,A))}function Ai(e,A,t){var n=e._id;return e.each(function(){var o=Pe(this,n);(o.value||(o.value={}))[A]=t.apply(this,arguments)}),function(o){return Te(o,n).value[A]}}function Aa(e,A){var t;return(typeof A=="number"?Ve:A instanceof It?ur:(t=It(A))?(A=t,ur):Rs)(e,A)}function Hg(e){return function(){this.removeAttribute(e)}}function Ig(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _g(e,A,t){var n,o=t+"",a;return function(){var u=this.getAttribute(e);return u===o?null:u===n?a:a=A(n=u,t)}}function Sg(e,A,t){var n,o=t+"",a;return function(){var u=this.getAttributeNS(e.space,e.local);return u===o?null:u===n?a:a=A(n=u,t)}}function xg(e,A,t){var n,o,a;return function(){var u,d=t(this),h;return d==null?void this.removeAttribute(e):(u=this.getAttribute(e),h=d+"",u===h?null:u===n&&h===o?a:(o=h,a=A(n=u,d)))}}function Dg(e,A,t){var n,o,a;return function(){var u,d=t(this),h;return d==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),h=d+"",u===h?null:u===n&&h===o?a:(o=h,a=A(n=u,d)))}}function Ng(e,A){var t=rr(e),n=t==="transform"?fg:Aa;return this.attrTween(e,typeof A=="function"?(t.local?Dg:xg)(t,n,Ai(this,"attr."+e,A)):A==null?(t.local?Ig:Hg)(t):(t.local?Sg:_g)(t,n,A))}function Lg(e,A){return function(t){this.setAttribute(e,A.call(this,t))}}function Tg(e,A){return function(t){this.setAttributeNS(e.space,e.local,A.call(this,t))}}function kg(e,A){var t,n;function o(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Tg(e,a)),t}return o._value=A,o}function Mg(e,A){var t,n;function o(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Lg(e,a)),t}return o._value=A,o}function Kg(e,A){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(A==null)return this.tween(t,null);if(typeof A!="function")throw new Error;var n=rr(e);return this.tween(t,(n.local?kg:Mg)(n,A))}function Og(e,A){return function(){qo(this,e).delay=+A.apply(this,arguments)}}function Rg(e,A){return A=+A,function(){qo(this,e).delay=A}}function Vg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Og:Rg)(A,e)):Te(this.node(),A).delay}function Pg(e,A){return function(){Pe(this,e).duration=+A.apply(this,arguments)}}function Gg(e,A){return A=+A,function(){Pe(this,e).duration=A}}function zg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Pg:Gg)(A,e)):Te(this.node(),A).duration}function Xg(e,A){if(typeof A!="function")throw new Error;return function(){Pe(this,e).ease=A}}function $g(e){var A=this._id;return arguments.length?this.each(Xg(A,e)):Te(this.node(),A).ease}function Wg(e,A){return function(){var t=A.apply(this,arguments);if(typeof t!="function")throw new Error;Pe(this,e).ease=t}}function Yg(e){if(typeof e!="function")throw new Error;return this.each(Wg(this._id,e))}function Jg(e){typeof e!="function"&&(e=ms(e));for(var A=this._groups,t=A.length,n=new Array(t),o=0;o<t;++o)for(var a=A[o],u=a.length,d=n[o]=[],h,g=0;g<u;++g)(h=a[g])&&e.call(h,h.__data__,g,a)&&d.push(h);return new Ze(n,this._parents,this._name,this._id)}function Zg(e){if(e._id!==this._id)throw new Error;for(var A=this._groups,t=e._groups,n=A.length,o=t.length,a=Math.min(n,o),u=new Array(n),d=0;d<a;++d)for(var h=A[d],g=t[d],B=h.length,w=u[d]=new Array(B),m,v=0;v<B;++v)(m=h[v]||g[v])&&(w[v]=m);for(;d<n;++d)u[d]=A[d];return new Ze(u,this._parents,this._name,this._id)}function jg(e){return(e+"").trim().split(/^|\s+/).every(function(A){var t=A.indexOf(".");return t>=0&&(A=A.slice(0,t)),!A||A==="start"})}function qg(e,A,t){var n,o,a=jg(A)?qo:Pe;return function(){var u=a(this,e),d=u.on;d!==n&&(o=(n=d).copy()).on(A,t),u.on=o}}function Ah(e,A){var t=this._id;return arguments.length<2?Te(this.node(),t).on.on(e):this.each(qg(t,e,A))}function eh(e){return function(){var A=this.parentNode;for(var t in this.__transition)if(+t!==e)return;A&&A.removeChild(this)}}function th(){return this.on("end.remove",eh(this._id))}function nh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=Mo(e));for(var n=this._groups,o=n.length,a=new Array(o),u=0;u<o;++u)for(var d=n[u],h=d.length,g=a[u]=new Array(h),B,w,m=0;m<h;++m)(B=d[m])&&(w=e.call(B,B.__data__,m,d))&&("__data__"in B&&(w.__data__=B.__data__),g[m]=w,Cr(g[m],A,t,m,g,Te(B,t)));return new Ze(a,this._parents,A,t)}function rh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=ps(e));for(var n=this._groups,o=n.length,a=[],u=[],d=0;d<o;++d)for(var h=n[d],g=h.length,B,w=0;w<g;++w)if(B=h[w]){for(var m=e.call(B,B.__data__,w,h),v,Q=Te(B,t),H=0,N=m.length;H<N;++H)(v=m[H])&&Cr(v,A,t,H,m,Q);a.push(m),u.push(B)}return new Ze(a,u,A,t)}var oh=wn.prototype.constructor;function ih(){return new oh(this._groups,this._parents)}function sh(e,A){var t,n,o;return function(){var a=Xt(this,e),u=(this.style.removeProperty(e),Xt(this,e));return a===u?null:a===t&&u===n?o:o=A(t=a,n=u)}}function ea(e){return function(){this.style.removeProperty(e)}}function ah(e,A,t){var n,o=t+"",a;return function(){var u=Xt(this,e);return u===o?null:u===n?a:a=A(n=u,t)}}function lh(e,A,t){var n,o,a;return function(){var u=Xt(this,e),d=t(this),h=d+"";return d==null&&(h=d=(this.style.removeProperty(e),Xt(this,e))),u===h?null:u===n&&h===o?a:(o=h,a=A(n=u,d))}}function ch(e,A){var t,n,o,a="style."+A,u="end."+a,d;return function(){var h=Pe(this,e),g=h.on,B=h.value[a]==null?d||(d=ea(A)):void 0;(g!==t||o!==B)&&(n=(t=g).copy()).on(u,o=B),h.on=n}}function uh(e,A,t){var n=(e+="")=="transform"?dg:Aa;return A==null?this.styleTween(e,sh(e,n)).on("end.style."+e,ea(e)):typeof A=="function"?this.styleTween(e,lh(e,n,Ai(this,"style."+e,A))).each(ch(this._id,e)):this.styleTween(e,ah(e,n,A),t).on("end.style."+e,null)}function dh(e,A,t){return function(n){this.style.setProperty(e,A.call(this,n),t)}}function fh(e,A,t){var n,o;function a(){var u=A.apply(this,arguments);return u!==o&&(n=(o=u)&&dh(e,u,t)),n}return a._value=A,a}function gh(e,A,t){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(A==null)return this.tween(n,null);if(typeof A!="function")throw new Error;return this.tween(n,fh(e,A,t??""))}function hh(e){return function(){this.textContent=e}}function Bh(e){return function(){var A=e(this);this.textContent=A??""}}function ph(e){return this.tween("text",typeof e=="function"?Bh(Ai(this,"text",e)):hh(e==null?"":e+""))}function mh(e){return function(A){this.textContent=e.call(this,A)}}function wh(e){var A,t;function n(){var o=e.apply(this,arguments);return o!==t&&(A=(t=o)&&mh(o)),A}return n._value=e,n}function Ch(e){var A="text";if(arguments.length<1)return(A=this.tween(A))&&A._value;if(e==null)return this.tween(A,null);if(typeof e!="function")throw new Error;return this.tween(A,wh(e))}function vh(){for(var e=this._name,A=this._id,t=ta(),n=this._groups,o=n.length,a=0;a<o;++a)for(var u=n[a],d=u.length,h,g=0;g<d;++g)if(h=u[g]){var B=Te(h,A);Cr(h,e,t,g,u,{time:B.time+B.delay+B.duration,delay:0,duration:B.duration,ease:B.ease})}return new Ze(n,this._parents,e,t)}function yh(){var e,A,t=this,n=t._id,o=t.size();return new Promise(function(a,u){var d={value:u},h={value:function(){--o===0&&a()}};t.each(function(){var g=Pe(this,n),B=g.on;B!==e&&(A=(e=B).copy(),A._.cancel.push(d),A._.interrupt.push(d),A._.end.push(h)),g.on=A}),o===0&&a()})}var Qh=0;function Ze(e,A,t,n){this._groups=e,this._parents=A,this._name=t,this._id=n}function ta(){return++Qh}var je=wn.prototype;Ze.prototype={constructor:Ze,select:nh,selectAll:rh,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:Jg,merge:Zg,selection:ih,transition:vh,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:Ah,attr:Ng,attrTween:Kg,style:uh,styleTween:gh,text:ph,textTween:Ch,remove:th,tween:bg,delay:Vg,duration:zg,ease:$g,easeVarying:Yg,end:yh,[Symbol.iterator]:je[Symbol.iterator]};function Eh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Uh={time:null,delay:0,duration:250,ease:Eh};function Fh(e,A){for(var t;!(t=e.__transition)||!(t=t[A]);)if(!(e=e.parentNode))throw new Error(`transition ${A} not found`);return t}function bh(e){var A,t;e instanceof Ze?(A=e._id,e=e._name):(A=ta(),(t=Uh).time=Yo(),e=e==null?null:e+"");for(var n=this._groups,o=n.length,a=0;a<o;++a)for(var u=n[a],d=u.length,h,g=0;g<d;++g)(h=u[g])&&Cr(h,e,A,g,u,t||Fh(h,A));return new Ze(n,this._parents,e,A)}wn.prototype.interrupt=Eg,wn.prototype.transition=bh;var yr=e=>()=>e;function Hh(e,{sourceEvent:A,target:t,transform:n,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function qe(e,A,t){this.k=e,this.x=A,this.y=t}qe.prototype={constructor:qe,scale:function(e){return e===1?this:new qe(this.k*e,this.x,this.y)},translate:function(e,A){return e===0&A===0?this:new qe(this.k,this.x+this.k*e,this.y+this.k*A)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Jt=new qe(1,0,0);qe.prototype;function ei(e){e.stopImmediatePropagation()}function In(e){e.preventDefault(),e.stopImmediatePropagation()}function Ih(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _h(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function na(){return this.__zoom||Jt}function Sh(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function xh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dh(e,A,t){var n=e.invertX(A[0][0])-t[0][0],o=e.invertX(A[1][0])-t[1][0],a=e.invertY(A[0][1])-t[0][1],u=e.invertY(A[1][1])-t[1][1];return e.translate(o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o),u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u))}function Nh(){var e=Ih,A=_h,t=Dh,n=Sh,o=xh,a=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,h=fr,g=tr("start","zoom","end"),B,w,m,v=500,Q=150,H=0,N=10;function T(I){I.property("__zoom",na).on("wheel.zoom",lA,{passive:!1}).on("mousedown.zoom",nA).on("dblclick.zoom",tA).filter(o).on("touchstart.zoom",q).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",sA).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(I,Y,F,S){var P=I.selection?I.selection():I;P.property("__zoom",na),I!==P?eA(I,Y,F,S):P.interrupt().each(function(){W(this,arguments).event(S).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},T.scaleBy=function(I,Y,F,S){T.scaleTo(I,function(){return this.__zoom.k*(typeof Y=="function"?Y.apply(this,arguments):Y)},F,S)},T.scaleTo=function(I,Y,F,S){T.transform(I,function(){var P=A.apply(this,arguments),R=this.__zoom,z=F==null?K(P):typeof F=="function"?F.apply(this,arguments):F,J=R.invert(z),rA=typeof Y=="function"?Y.apply(this,arguments):Y;return t(U(M(R,rA),z,J),P,u)},F,S)},T.translateBy=function(I,Y,F,S){T.transform(I,function(){return t(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof F=="function"?F.apply(this,arguments):F),A.apply(this,arguments),u)},null,S)},T.translateTo=function(I,Y,F,S,P){T.transform(I,function(){var R=A.apply(this,arguments),z=this.__zoom,J=S==null?K(R):typeof S=="function"?S.apply(this,arguments):S;return t(Jt.translate(J[0],J[1]).scale(z.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof F=="function"?-F.apply(this,arguments):-F),R,u)},S,P)};function M(I,Y){return Y=Math.max(a[0],Math.min(a[1],Y)),Y===I.k?I:new qe(Y,I.x,I.y)}function U(I,Y,F){var S=Y[0]-F[0]*I.k,P=Y[1]-F[1]*I.k;return S===I.x&&P===I.y?I:new qe(I.k,S,P)}function K(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function eA(I,Y,F,S){I.on("start.zoom",function(){W(this,arguments).event(S).start()}).on("interrupt.zoom end.zoom",function(){W(this,arguments).event(S).end()}).tween("zoom",function(){var P=this,R=arguments,z=W(P,R).event(S),J=A.apply(P,R),rA=F==null?K(J):typeof F=="function"?F.apply(P,R):F,dA=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),bA=P.__zoom,AA=typeof Y=="function"?Y.apply(P,R):Y,cA=h(bA.invert(rA).concat(dA/bA.k),AA.invert(rA).concat(dA/AA.k));return function(V){if(V===1)V=AA;else{var $=cA(V),uA=dA/$[2];V=new qe(uA,rA[0]-$[0]*uA,rA[1]-$[1]*uA)}z.zoom(null,V)}})}function W(I,Y,F){return!F&&I.__zooming||new iA(I,Y)}function iA(I,Y){this.that=I,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=A.apply(I,Y),this.taps=0}iA.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,Y){return this.mouse&&I!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var Y=Ne(this.that).datum();g.call(I,this.that,new Hh(I,{sourceEvent:this.sourceEvent,target:T,type:I,transform:this.that.__zoom,dispatch:g}),Y)}};function lA(I,...Y){if(!e.apply(this,arguments))return;var F=W(this,Y).event(I),S=this.__zoom,P=Math.max(a[0],Math.min(a[1],S.k*Math.pow(2,n.apply(this,arguments)))),R=Oe(I);if(F.wheel)(F.mouse[0][0]!==R[0]||F.mouse[0][1]!==R[1])&&(F.mouse[1]=S.invert(F.mouse[0]=R)),clearTimeout(F.wheel);else{if(S.k===P)return;F.mouse=[R,S.invert(R)],vr(this),F.start()}In(I),F.wheel=setTimeout(z,Q),F.zoom("mouse",t(U(M(S,P),F.mouse[0],F.mouse[1]),F.extent,u));function z(){F.wheel=null,F.end()}}function nA(I,...Y){if(m||!e.apply(this,arguments))return;var F=I.currentTarget,S=W(this,Y,!0).event(I),P=Ne(I.view).on("mousemove.zoom",rA,!0).on("mouseup.zoom",dA,!0),R=Oe(I,F),z=I.clientX,J=I.clientY;Hs(I.view),ei(I),S.mouse=[R,this.__zoom.invert(R)],vr(this),S.start();function rA(bA){if(In(bA),!S.moved){var AA=bA.clientX-z,cA=bA.clientY-J;S.moved=AA*AA+cA*cA>H}S.event(bA).zoom("mouse",t(U(S.that.__zoom,S.mouse[0]=Oe(bA,F),S.mouse[1]),S.extent,u))}function dA(bA){P.on("mousemove.zoom mouseup.zoom",null),Is(bA.view,S.moved),In(bA),S.event(bA).end()}}function tA(I,...Y){if(e.apply(this,arguments)){var F=this.__zoom,S=Oe(I.changedTouches?I.changedTouches[0]:I,this),P=F.invert(S),R=F.k*(I.shiftKey?.5:2),z=t(U(M(F,R),S,P),A.apply(this,Y),u);In(I),d>0?Ne(this).transition().duration(d).call(eA,z,S,I):Ne(this).call(T.transform,z,S,I)}}function q(I,...Y){if(e.apply(this,arguments)){var F=I.touches,S=F.length,P=W(this,Y,I.changedTouches.length===S).event(I),R,z,J,rA;for(ei(I),z=0;z<S;++z)J=F[z],rA=Oe(J,this),rA=[rA,this.__zoom.invert(rA),J.identifier],P.touch0?!P.touch1&&P.touch0[2]!==rA[2]&&(P.touch1=rA,P.taps=0):(P.touch0=rA,R=!0,P.taps=1+!!B);B&&(B=clearTimeout(B)),R&&(P.taps<2&&(w=rA[0],B=setTimeout(function(){B=null},v)),vr(this),P.start())}}function k(I,...Y){if(this.__zooming){var F=W(this,Y).event(I),S=I.changedTouches,P=S.length,R,z,J,rA;for(In(I),R=0;R<P;++R)z=S[R],J=Oe(z,this),F.touch0&&F.touch0[2]===z.identifier?F.touch0[0]=J:F.touch1&&F.touch1[2]===z.identifier&&(F.touch1[0]=J);if(z=F.that.__zoom,F.touch1){var dA=F.touch0[0],bA=F.touch0[1],AA=F.touch1[0],cA=F.touch1[1],V=(V=AA[0]-dA[0])*V+(V=AA[1]-dA[1])*V,$=($=cA[0]-bA[0])*$+($=cA[1]-bA[1])*$;z=M(z,Math.sqrt(V/$)),J=[(dA[0]+AA[0])/2,(dA[1]+AA[1])/2],rA=[(bA[0]+cA[0])/2,(bA[1]+cA[1])/2]}else if(F.touch0)J=F.touch0[0],rA=F.touch0[1];else return;F.zoom("touch",t(U(z,J,rA),F.extent,u))}}function sA(I,...Y){if(this.__zooming){var F=W(this,Y).event(I),S=I.changedTouches,P=S.length,R,z;for(ei(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},v),R=0;R<P;++R)z=S[R],F.touch0&&F.touch0[2]===z.identifier?delete F.touch0:F.touch1&&F.touch1[2]===z.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(z=Oe(z,this),Math.hypot(w[0]-z[0],w[1]-z[1])<N)){var J=Ne(this).on("dblclick.zoom");J&&J.apply(this,arguments)}}}return T.wheelDelta=function(I){return arguments.length?(n=typeof I=="function"?I:yr(+I),T):n},T.filter=function(I){return arguments.length?(e=typeof I=="function"?I:yr(!!I),T):e},T.touchable=function(I){return arguments.length?(o=typeof I=="function"?I:yr(!!I),T):o},T.extent=function(I){return arguments.length?(A=typeof I=="function"?I:yr([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),T):A},T.scaleExtent=function(I){return arguments.length?(a[0]=+I[0],a[1]=+I[1],T):[a[0],a[1]]},T.translateExtent=function(I){return arguments.length?(u[0][0]=+I[0][0],u[1][0]=+I[1][0],u[0][1]=+I[0][1],u[1][1]=+I[1][1],T):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},T.constrain=function(I){return arguments.length?(t=I,T):t},T.duration=function(I){return arguments.length?(d=+I,T):d},T.interpolate=function(I){return arguments.length?(h=I,T):h},T.on=function(){var I=g.on.apply(g,arguments);return I===g?T:I},T.clickDistance=function(I){return arguments.length?(H=(I=+I)*I,T):Math.sqrt(H)},T.tapDistance=function(I){return arguments.length?(N=+I,T):N},T}var IA=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(IA||{}),ti=(e=>(e.Partial="partial",e.Full="full",e))(ti||{}),Dt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Dt||{}),At=(e=>(e.Strict="strict",e.Loose="loose",e))(At||{}),et=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(et||{}),_n=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(_n||{}),ra=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(ra||{}),Lh=["INPUT","SELECT","TEXTAREA"],Th=typeof document<"u"?document:null;function ni(e){var A,t;const n=((t=(A=e.composedPath)==null?void 0:A.call(e))==null?void 0:t[0])||e.target,o=typeof n?.hasAttribute=="function"?n.hasAttribute("contenteditable"):!1,a=typeof n?.closest=="function"?n.closest(".nokey"):null;return Lh.includes(n?.nodeName)||o||!!a}function kh(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function oa(e,A,t,n){const o=A.replace("+",`
1
+ (function(te,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("@a2simcode/ui")):typeof define=="function"&&define.amd?define(["exports","vue","@a2simcode/ui"],r):(te=typeof globalThis<"u"?globalThis:te||self,r(te.DuiUI={},te.Vue,te.SimCodeUI))})(this,function(te,r,Ht){Object.defineProperties(te,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var wu=Object.create,er=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,vu=Object.getOwnPropertyNames,yu=Object.getPrototypeOf,Qu=Object.prototype.hasOwnProperty,Eu=(e,A)=>()=>(A||(e((A={exports:{}}).exports,A),e=null),A.exports),Uu=(e,A)=>{let t={};for(var n in e)er(t,n,{get:e[n],enumerable:!0});return A||er(t,Symbol.toStringTag,{value:"Module"}),t},bo=(e,A,t,n)=>{if(A&&typeof A=="object"||typeof A=="function")for(var o=vu(A),a=0,u=o.length,d;a<u;a++)d=o[a],!Qu.call(e,d)&&d!==t&&er(e,d,{get:(h=>A[h]).bind(null,d),enumerable:!(n=Cu(A,d))||n.enumerable});return e},Fu=(e,A,t)=>(bo(e,A,"default"),t&&bo(t,A,"default")),rs=(e,A,t)=>(t=e!=null?wu(yu(e)):{},bo(A||!e||!e.__esModule?er(t,"default",{value:e,enumerable:!0}):t,e));r=rs(r,1);var ut=(e,A)=>(e.install=t=>{t.component(e.name,e),A&&A.forEach(n=>{t.component(n.name,n)})},e),dt=(e="")=>{const A=Date.now(),t=Math.floor(Math.random()*1e9);return e===""?String(t)+String(A):e+"_"+t+String(A)},pn=e=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(pn);const A={};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=pn(e[t]));return A},bu=e=>{if(Array.isArray(e))e.length=0;else if(e&&typeof e=="object")for(const A in e)Object.prototype.hasOwnProperty.call(e,A)&&delete e[A]},Ho={},Hu=(e,A,t)=>{t[e]=t[e]||{};const n=dt();return t[e][n]=A,n},Iu=(e,A,t)=>{const n=[],o=t[e]||{};return Object.keys(o).forEach(a=>{const u=o[a];try{u&&n.push(u(A))}catch(d){console.error(d)}}),n},_u=(e,A,t)=>{if(A){const n=t[e];n&&delete n[A]}else delete t[e]},os=(e,A)=>Hu(e,A,Ho),ne=(e,A)=>Iu(e,A,Ho),Su=(e,A)=>{_u(e,A,Ho)},is=(e,A,t,n,o,a)=>{const u=A.id,d=A.level,{getDesignLocals:h,selectComponent:g,getComponent:B,isMyChildComponent:w,addComponent:m,deleteComponent:v,getParentComponents:Q,removeComponentFromContainer:H,addComponentToContainer:N,copyComponent:L,activedComponent:R,top:U}=(0,r.inject)("d-drag-design-provide",{}),k=[],eA=(0,r.ref)(!1),Y=(0,r.ref)(!1),sA=(0,r.ref)(!1),lA=(0,r.ref)(!1),nA=(0,r.ref)(!1),tA={id:"",type:""},AA=(0,r.ref)(!1),T=(0,r.ref)(!1);let aA="",I=null;const J=X=>{if(aA===X)return I;aA=X;const{top:oA,left:hA,width:wA,height:bA}=e.value.getBoundingClientRect();return I=[{x:hA,y:oA},{x:hA+wA,y:oA},{x:hA+wA,y:oA+bA},{x:hA,y:oA+bA}],I},F=(X,oA,hA)=>{let wA=oA-hA[0].y;wA<0&&(wA=-wA);let bA=oA-hA[3].y;bA<0&&(bA=-bA);let cA=X-hA[0].x;cA<0&&(cA=-cA);let mA=X-hA[1].x;return mA<0&&(mA=-mA),{ly:wA>bA?bA:wA,typey:wA>bA?"bottom":"top",lx:cA>mA?mA:cA,lallx:cA+mA}},S=(X,oA,hA)=>X>=hA[0].x&&X<=hA[1].x&&oA>=hA[0].y&&oA<=hA[3].y,V=()=>{if(o){ne("dragClick",{id:u});return}if(!Y.value){if(g(u),d!==0){const X=e.value.getBoundingClientRect(),oA=h();X.top-oA.top<22?lA.value=!0:lA.value=!1}Y.value=!0,ne("dragClick",{id:u})}},O=X=>{const oA=v(X);oA&&(0,r.nextTick)(()=>{ne("dragClick",{id:oA})})},z=()=>{tA.id="",tA.type="",d===0&&(nA.value=!1)},q=()=>{ne("mouseEnterOrLeave",{id:u,type:"enter"})},rA=()=>{ne("mouseEnterOrLeave",{id:u,type:"leave"})},uA=X=>{ne("dragClick",{id:X})},FA={mouseEnterOrLeave:({id:X,type:oA})=>{oA==="enter"?k.push(X):k.length>0&&k.splice(k.length-1,1);const hA=k.length;hA>0&&u===k[hA-1]?eA.value=!0:eA.value=!1},dragAciveChild:({type:X,id:oA})=>{oA===u?X==="top"?(AA.value=!0,T.value=!1):(T.value=!0,AA.value=!1):(T.value=!1,AA.value=!1)},dragClick({id:X,isAgain:oA}){console.log("dragClick",X,u),X!==u?Y.value=!1:(oA&&(Y.value=!1),V())}};FA[`dragGetChildDistance_${u}`]=({dragX:X,dragY:oA,moveId:hA})=>F(X,oA,J(hA));const P={isInContainer({x:X,y:oA,id:hA,moveId:wA}){if(u===hA||w(hA,u))return sA.value=!1,{isIn:!1,level:d,id:u,groupId:a};const bA=J(wA);if(S(X,oA,bA))return d===0&&(nA.value=!0),{isIn:!0,level:d,id:u,groupId:a};if(d===0){const{ly:cA,lx:mA}=F(X,oA,bA);if(cA<20&&mA<20)return nA.value=!0,{isIn:!0,level:d,id:u,groupId:a};nA.value=!1}return sA.value=!1,{isIn:!1,level:d,id:u,groupId:a}},dragActiveContainer:({containerId:X,containerGroupId:oA,dragX:hA,dragY:wA,moveId:bA})=>{if(X===u&&oA===a)if(sA.value=!0,n&&n.value.length>0){let cA={ly:9999999,lx:0,lallx:0,id:"",typey:""};n?.value.forEach(mA=>{if(a&&mA.groupId!==a)return;const _=ne(`dragGetChildDistance_${mA.id}`,{dragX:hA,dragY:wA,moveId:bA})[0];_&&(cA.ly>_.ly||cA.ly===_.ly&&(cA.lx>_.lx||cA.lx===_.lx&&cA.lallx>_.lallx))&&(cA=_,cA.id=mA.id)}),tA.id=cA.id,tA.type=cA.typey,ne("dragAciveChild",{id:cA.id,type:cA.typey})}else ne("dragAciveChild",{id:""});else sA.value=!1},dragAdd:X=>{if(sA.value){let oA=n?.value.length||0;tA.id!==""&&tA.id!==void 0&&(oA=n?.value.findIndex(hA=>hA.id===tA.id)||0,tA.type==="bottom"&&(oA+=1)),m(X,u,oA,a),sA.value=!1}z()},dragAddByClick:X=>{if(!R.value&&u===U.id||R.value?.id===u||R.value?.containerId===u&&R.value?.dragType!=="container"){const oA=m(X,u,n?.value.length||0,a,!0);oA&&X.config&&Object.keys(X.config).forEach(hA=>{oA.config[hA]=X.config[hA]})}},dragUpdate(X){if(sA.value){const oA=B(X);if(oA.level=d+1,tA.id!==oA.id){H(oA.containerId,X);let hA=n?.value.findIndex(wA=>wA.id===tA.id)||0;tA.type==="bottom"&&(hA+=1),N(oA,u,hA,a)}sA.value=!1,(0,r.nextTick)(()=>{ne("dragClick",{id:oA.id,isAgain:!0})})}z()}},W={};return(0,r.onMounted)(()=>{(!o||t!=="container")&&Object.keys(FA).forEach(X=>{W[X]=os(X,FA[X])}),t==="container"&&Object.keys(P).forEach(X=>{W[X]=os(X,P[X])}),A.isNewAdd&&(0,r.nextTick)(()=>{V(),delete A.isNewAdd})}),(0,r.onUnmounted)(()=>{Object.keys(W).forEach(X=>{Su(X,W[X])})}),{onMouseenter:q,onMouseleave:rA,activeComponent:V,handleComponentClick:uA,deleteComponentByClick:O,copyComponent:L,getParentComponents:Q,isBottomToolBar:lA,isHover:eA,isSelect:Y,isToContainer:sA,isMoveingInTopLevel:nA,isTopActive:AA,isBottomActive:T}},ss=(e,A)=>{const t={x:0,y:0,clientX:0,clientY:0,dragElement:null,dragElementId:"jcode-darg-move-id",toContainerLevel:-1,toContainerId:"",groupId:"",id:""};let n=!1;const o=(v,Q)=>{n!==!0&&(n=!0,setTimeout(()=>{v(),n=!1},Q))},a=(0,r.ref)(!1),u=(v,Q,H)=>{const N=document.createElement("div");return N.id=t.dragElementId,N.innerText=v,N.className="d-drag-move",N.style.top=`${Q}px`,N.style.left=`${H}px`,document.body.appendChild(N),N},d=()=>{document.onmousemove=null,document.onmouseup=null,a.value=!1,ne("dragAciveChild",{id:""})},h=()=>{d(),t.dragElement&&(t.dragElement.remove(),t.dragElement=null,A?ne("dragAdd",e):ne("dragUpdate",e.id))},g=v=>{const{clientY:Q,clientX:H}=v;if(!t.dragElement){const N=Math.abs(t.x-H),L=Math.abs(t.y-Q);if(N<=1&&L<=1)return;a.value=!0,t.dragElement=u(e.name,Q-11,H-32)}t.dragElement.style.top=`${Q-11}px`,t.dragElement.style.left=`${H-32}px`,t.clientX=H,t.clientY=Q,o(()=>{if(!a.value)return;const N=ne("isInContainer",{x:H,y:Q,id:e.id,moveId:t.id});t.toContainerLevel=-1,t.toContainerId="",t.groupId="",N.forEach(({level:L,id:R,isIn:U,groupId:k})=>{U&&t.toContainerLevel<L&&(t.toContainerLevel=L,t.toContainerId=R,t.groupId=k)}),t.toContainerId!==""?ne("dragActiveContainer",{containerId:t.toContainerId,containerGroupId:t.groupId,dragX:H,dragY:Q,moveId:t.id}):ne("dragAciveChild",{id:""})},100)};return{onContextmenu:()=>{d()},onMousedown:v=>{t.x=v.clientX,t.y=v.clientY,t.id=dt(),document.onmouseup=h,document.onmousemove=g},onClick:()=>{ne("dragAddByClick",e)},moveActive:a}},xu={class:"d-drag-btns-pname"},Du={key:0,class:"d-drag-mask"},Nu=(0,r.defineComponent)({name:"DDrag",__name:"drag",props:{componentData:{default:()=>({})},isContainer:{type:Boolean,default:!1}},setup(e){const A=e,t=(0,r.ref)(),{onMouseenter:n,onMouseleave:o,activeComponent:a,handleComponentClick:u,deleteComponentByClick:d,copyComponent:h,getParentComponents:g,isHover:B,isSelect:w,isTopActive:m,isBottomActive:v,isBottomToolBar:Q}=is(t,A.componentData,"component"),{onContextmenu:H,onMousedown:N,moveActive:L}=ss(A.componentData,!1);return(R,U)=>{const k=(0,r.resolveComponent)("j-button"),eA=(0,r.resolveComponent)("el-space");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["d-drag-component",{selected:(0,r.unref)(w),hovered:(0,r.unref)(B),isBottomToolBar:(0,r.unref)(Q),active:(0,r.unref)(L),isTopActive:(0,r.unref)(m),isBottomActive:(0,r.unref)(v)}])},[U[11]||(U[11]=(0,r.createElementVNode)("div",{class:"d-drag-line"},null,-1)),(0,r.createElementVNode)("div",{class:"d-drag-btns",onMouseenter:U[4]||(U[4]=(...Y)=>(0,r.unref)(n)&&(0,r.unref)(n)(...Y)),onMouseleave:U[5]||(U[5]=(...Y)=>(0,r.unref)(o)&&(0,r.unref)(o)(...Y))},[(0,r.createVNode)(eA,{size:4},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,r.withModifiers)(()=>{},["stop"])},[(0,r.createVNode)(k,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"]),(0,r.createElementVNode)("div",xu,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(g)(e.componentData.containerId),Y=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Y.id},[(0,r.createVNode)(k,{class:"d-drag-btn",type:"primary",size:"small",label:Y.name,onClick:sA=>(0,r.unref)(u)(Y.id)},null,8,["label","onClick"])]))),128))])]),(0,r.createVNode)(k,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:content-copy",onClick:U[0]||(U[0]=(0,r.withModifiers)(Y=>(0,r.unref)(h)(e.componentData.id),["stop"]))}),(0,r.createElementVNode)("div",{onContextmenu:U[1]||(U[1]=(0,r.withModifiers)((...Y)=>(0,r.unref)(H)&&(0,r.unref)(H)(...Y),["stop"])),onMousedown:U[2]||(U[2]=(0,r.withModifiers)((...Y)=>(0,r.unref)(N)&&(0,r.unref)(N)(...Y),["stop"])),style:{display:"flex"}},[(0,r.createVNode)(k,{class:"d-drag-btn",type:"primary",size:"small",icon:"mdi:drag"})],32),(0,r.createVNode)(k,{class:"d-drag-btn",danger:"",type:"primary",size:"small",icon:"mdi:delete",onClick:U[3]||(U[3]=(0,r.withModifiers)(Y=>(0,r.unref)(d)(e.componentData.id),["stop"]))})]),_:1})],32),(0,r.createElementVNode)("div",{ref_key:"refDrag",ref:t,class:"d-drag-body",onClick:U[6]||(U[6]=(0,r.withModifiers)((...Y)=>(0,r.unref)(a)&&(0,r.unref)(a)(...Y),["stop"])),onContextmenu:U[7]||(U[7]=(0,r.withModifiers)((...Y)=>(0,r.unref)(H)&&(0,r.unref)(H)(...Y),["stop"])),onMousedown:U[8]||(U[8]=(0,r.withModifiers)((...Y)=>(0,r.unref)(N)&&(0,r.unref)(N)(...Y),["stop"])),onMouseenter:U[9]||(U[9]=(...Y)=>(0,r.unref)(n)&&(0,r.unref)(n)(...Y)),onMouseleave:U[10]||(U[10]=(...Y)=>(0,r.unref)(o)&&(0,r.unref)(o)(...Y))},[(0,r.renderSlot)(R.$slots,"default"),e.isContainer?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",Du))],544)],2)}}}),Io=Nu,Lu=(0,r.defineComponent)({name:"DDragTool",__name:"tool",props:{config:{}},setup(e){const{onContextmenu:A,onMousedown:t,onClick:n}=ss(e.config??{name:"",id:""},!0);return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-drag-tool",onClick:a[0]||(a[0]=(0,r.withModifiers)((...u)=>(0,r.unref)(n)&&(0,r.unref)(n)(...u),["stop"])),onContextmenu:a[1]||(a[1]=(0,r.withModifiers)((...u)=>(0,r.unref)(A)&&(0,r.unref)(A)(...u),["stop"])),onMousedown:a[2]||(a[2]=(0,r.withModifiers)((...u)=>(0,r.unref)(t)&&(0,r.unref)(t)(...u),["stop"]))},[(0,r.renderSlot)(o.$slots,"default")],32))}}),_o=Lu,Tu={key:0,class:"d-drag-line"},ku={key:1,class:"d-drag-btns"},Mu=(0,r.defineComponent)({name:"DDragContainer",__name:"container",props:{componentData:{default:()=>({})},isComponentContainer:{type:Boolean,default:!0},groupId:{default:void 0}},setup(e){const A=e,t=(0,r.ref)(),n=(0,r.computed)(()=>A.componentData?.children||[]),{onMouseenter:o,onMouseleave:a,activeComponent:u,isHover:d,isSelect:h,isToContainer:g,isMoveingInTopLevel:B,isTopActive:w,isBottomActive:m}=is(t,A.componentData,"container",n,A.isComponentContainer,A.groupId),v=(0,r.computed)(()=>!!(n.value.findIndex(Q=>Q.groupId===A.groupId)===-1&&g.value));return(Q,H)=>{const N=(0,r.resolveComponent)("j-button");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"refDrag",ref:t,class:(0,r.normalizeClass)(["d-drag-container",{selected:(0,r.unref)(h)&&!e.isComponentContainer,hovered:(0,r.unref)(d)&&!e.isComponentContainer,isTopLevel:e.componentData.level===0,active:v.value,isMoveingInTopLevel:(0,r.unref)(B),isTopActive:(0,r.unref)(w),isBottomActive:(0,r.unref)(m)}])},[e.isComponentContainer?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",Tu)),e.isComponentContainer?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",ku,[(0,r.createElementVNode)("div",{class:"d-drag-btns-names",onClick:(0,r.withModifiers)(()=>{},["stop"])},[(0,r.createVNode)(N,{class:"d-drag-btn",type:"primary",size:"small",label:e.componentData.name},null,8,["label"])])])),(0,r.createElementVNode)("div",{class:"d-drag-body",onClick:H[0]||(H[0]=(0,r.withModifiers)((...L)=>(0,r.unref)(u)&&(0,r.unref)(u)(...L),["stop"])),onMouseenter:H[1]||(H[1]=(...L)=>(0,r.unref)(o)&&(0,r.unref)(o)(...L)),onMouseleave:H[2]||(H[2]=(...L)=>(0,r.unref)(a)&&(0,r.unref)(a)(...L))},[(0,r.renderSlot)(Q.$slots,"default")],32)],2)}}}),So=Mu,Ku=(0,r.defineComponent)({name:"DDragFormList",__name:"dragFormList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,r.inject)("dui-design-provide",{});return(t,n)=>{const o=(0,r.resolveComponent)("el-col");return(0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.componentList,a=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:a.id},[a.type!="pkey"?((0,r.openBlock)(),(0,r.createBlock)(o,{key:0,span:a.config.span||24},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Io,{"is-container":a.dragType!=="component","component-data":a},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["is-container","component-data"])]),_:2},1032,["span"])):(0,r.createCommentVNode)("",!0)],64))),128)}}}),xo=Ku,Ou=(0,r.defineComponent)({name:"DDragIndexList",__name:"dragIndexList",props:{componentList:{default:()=>[]},globalConfig:{default:()=>({})}},setup(e){const{designItemName:A}=(0,r.inject)("dui-design-provide",{}),t=n=>{if(n.flexWidth)return{width:n.flexWidth+"%"}};return(n,o)=>((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.componentList,a=>((0,r.openBlock)(),(0,r.createBlock)(Io,{key:a.id,style:(0,r.normalizeStyle)(t(a.config)),"is-container":a.dragType!=="component","component-data":a},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(A)),{"component-data":a,"global-config":e.globalConfig},null,8,["component-data","global-config"]))]),_:2},1032,["style","is-container","component-data"]))),128))}}),Do=Ou,as=ut(Io,[_o,So,xo,Do]);function mn(e){return(0,r.getCurrentScope)()?((0,r.onScopeDispose)(e),!0):!1}function Je(e){return typeof e=="function"?e():(0,r.unref)(e)}var Ru=typeof window<"u"&&typeof document<"u",Vu=e=>typeof e<"u",Pu=Object.prototype.toString,Gu=e=>Pu.call(e)==="[object Object]",zu=()=>{};function Xu(e,A){function t(...n){return new Promise((o,a)=>{Promise.resolve(e(()=>A.apply(this,n),{fn:A,thisArg:this,args:n})).then(o).catch(a)})}return t}var ls=e=>e();function $u(e=ls){const A=(0,r.ref)(!0);function t(){A.value=!1}function n(){A.value=!0}const o=(...a)=>{A.value&&e(...a)};return{isActive:(0,r.readonly)(A),pause:t,resume:n,eventFilter:o}}function cs(e,A=!1,t="Timeout"){return new Promise((n,o)=>{setTimeout(A?()=>o(t):n,e)})}function Wu(e,A,t={}){const{eventFilter:n=ls,...o}=t;return(0,r.watch)(e,Xu(n,A),o)}function zt(e,A,t={}){const{eventFilter:n,...o}=t,{eventFilter:a,pause:u,resume:d,isActive:h}=$u(n);return{stop:Wu(e,A,{...o,eventFilter:a}),pause:u,resume:d,isActive:h}}function Yu(e,A={}){if(!(0,r.isRef)(e))return(0,r.toRefs)(e);const t=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)t[n]=(0,r.customRef)(()=>({get(){return e.value[n]},set(o){var a;if((a=Je(A.replaceRef))==null||a)if(Array.isArray(e.value)){const u=[...e.value];u[n]=o,e.value=u}else{const u={...e.value,[n]:o};Object.setPrototypeOf(u,Object.getPrototypeOf(e.value)),e.value=u}else e.value[n]=o}}));return t}function No(e,A=!1){function t(w,{flush:m="sync",deep:v=!1,timeout:Q,throwOnTimeout:H}={}){let N=null;const L=[new Promise(R=>{N=(0,r.watch)(e,U=>{w(U)!==A&&(N?.(),R(U))},{flush:m,deep:v,immediate:!0})})];return Q!=null&&L.push(cs(Q,H).then(()=>Je(e)).finally(()=>N?.())),Promise.race(L)}function n(w,m){if(!(0,r.isRef)(w))return t(U=>U===w,m);const{flush:v="sync",deep:Q=!1,timeout:H,throwOnTimeout:N}=m??{};let L=null;const R=[new Promise(U=>{L=(0,r.watch)([e,w],([k,eA])=>{A!==(k===eA)&&(L?.(),U(k))},{flush:v,deep:Q,immediate:!0})})];return H!=null&&R.push(cs(H,N).then(()=>Je(e)).finally(()=>(L?.(),Je(e)))),Promise.race(R)}function o(w){return t(m=>!!m,w)}function a(w){return n(null,w)}function u(w){return n(void 0,w)}function d(w){return t(Number.isNaN,w)}function h(w,m){return t(v=>{const Q=Array.from(v);return Q.includes(w)||Q.includes(Je(w))},m)}function g(w){return B(1,w)}function B(w=1,m){let v=-1;return t(()=>(v+=1,v>=w),m)}return Array.isArray(Je(e))?{toMatch:t,toContains:h,changed:g,changedTimes:B,get not(){return No(e,!A)}}:{toMatch:t,toBe:n,toBeTruthy:o,toBeNull:a,toBeNaN:d,toBeUndefined:u,changed:g,changedTimes:B,get not(){return No(e,!A)}}}function Lo(e){return No(e)}function Ju(e){var A;const t=Je(e);return(A=t?.$el)!=null?A:t}var us=Ru?window:void 0;function ds(...e){let A,t,n,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,n,o]=e,A=us):[A,t,n,o]=e,!A)return zu;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const a=[],u=()=>{a.forEach(B=>B()),a.length=0},d=(B,w,m,v)=>(B.addEventListener(w,m,v),()=>B.removeEventListener(w,m,v)),h=(0,r.watch)(()=>[Ju(A),Je(o)],([B,w])=>{if(u(),!B)return;const m=Gu(w)?{...w}:w;a.push(...t.flatMap(v=>n.map(Q=>d(B,v,Q,m))))},{immediate:!0,flush:"post"}),g=()=>{h(),u()};return mn(g),g}function Zu(e){return typeof e=="function"?e:typeof e=="string"?A=>A.key===e:Array.isArray(e)?A=>e.includes(A.key):()=>!0}function fs(...e){let A,t,n={};e.length===3?(A=e[0],t=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(A=!0,t=e[0],n=e[1]):(A=e[0],t=e[1]):(A=!0,t=e[0]);const{target:o=us,eventName:a="keydown",passive:u=!1,dedupe:d=!1}=n,h=Zu(A);return ds(o,a,B=>{B.repeat&&Je(d)||h(B)&&t(B)},u)}function ju(e){return JSON.parse(JSON.stringify(e))}function To(e,A,t,n={}){var o,a,u;const{clone:d=!1,passive:h=!1,eventName:g,deep:B=!1,defaultValue:w,shouldEmit:m}=n,v=(0,r.getCurrentInstance)(),Q=t||v?.emit||((o=v?.$emit)==null?void 0:o.bind(v))||((u=(a=v?.proxy)==null?void 0:a.$emit)==null?void 0:u.bind(v?.proxy));let H=g;A||(A="modelValue"),H=H||`update:${A.toString()}`;const N=U=>d?typeof d=="function"?d(U):ju(U):U,L=()=>Vu(e[A])?N(e[A]):w,R=U=>{m?m(U)&&Q(H,U):Q(H,U)};if(h){const U=(0,r.ref)(L());let k=!1;return(0,r.watch)(()=>e[A],eA=>{k||(k=!0,U.value=N(eA),(0,r.nextTick)(()=>k=!1))}),(0,r.watch)(U,eA=>{!k&&(eA!==e[A]||B)&&R(eA)},{deep:B}),U}else return(0,r.computed)({get(){return L()},set(U){R(U)}})}var qu={value:()=>{}};function tr(){for(var e=0,A=arguments.length,t={},n;e<A;++e){if(!(n=arguments[e]+"")||n in t||/[\s.]/.test(n))throw new Error("illegal type: "+n);t[n]=[]}return new nr(t)}function nr(e){this._=e}function Ad(e,A){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");if(o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),t&&!A.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}nr.prototype=tr.prototype={constructor:nr,on:function(e,A){var t=this._,n=Ad(e+"",t),o,a=-1,u=n.length;if(arguments.length<2){for(;++a<u;)if((o=(e=n[a]).type)&&(o=ed(t[o],e.name)))return o;return}if(A!=null&&typeof A!="function")throw new Error("invalid callback: "+A);for(;++a<u;)if(o=(e=n[a]).type)t[o]=gs(t[o],e.name,A);else if(A==null)for(o in t)t[o]=gs(t[o],e.name,null);return this},copy:function(){var e={},A=this._;for(var t in A)e[t]=A[t].slice();return new nr(e)},call:function(e,A){if((o=arguments.length-2)>0)for(var t=new Array(o),n=0,o,a;n<o;++n)t[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],n=0,o=a.length;n<o;++n)a[n].value.apply(A,t)},apply:function(e,A,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],o=0,a=n.length;o<a;++o)n[o].value.apply(A,t)}};function ed(e,A){for(var t=0,n=e.length,o;t<n;++t)if((o=e[t]).name===A)return o.value}function gs(e,A,t){for(var n=0,o=e.length;n<o;++n)if(e[n].name===A){e[n]=qu,e=e.slice(0,n).concat(e.slice(n+1));break}return t!=null&&e.push({name:A,value:t}),e}var ko="http://www.w3.org/1999/xhtml",hs={svg:"http://www.w3.org/2000/svg",xhtml:ko,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rr(e){var A=e+="",t=A.indexOf(":");return t>=0&&(A=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),hs.hasOwnProperty(A)?{space:hs[A],local:e}:e}function td(e){return function(){var A=this.ownerDocument,t=this.namespaceURI;return t===ko&&A.documentElement.namespaceURI===ko?A.createElement(e):A.createElementNS(t,e)}}function nd(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bs(e){var A=rr(e);return(A.local?nd:td)(A)}function rd(){}function Mo(e){return e==null?rd:function(){return this.querySelector(e)}}function od(e){typeof e!="function"&&(e=Mo(e));for(var A=this._groups,t=A.length,n=new Array(t),o=0;o<t;++o)for(var a=A[o],u=a.length,d=n[o]=new Array(u),h,g,B=0;B<u;++B)(h=a[B])&&(g=e.call(h,h.__data__,B,a))&&("__data__"in h&&(g.__data__=h.__data__),d[B]=g);return new Ue(n,this._parents)}function id(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sd(){return[]}function ps(e){return e==null?sd:function(){return this.querySelectorAll(e)}}function ad(e){return function(){return id(e.apply(this,arguments))}}function ld(e){typeof e=="function"?e=ad(e):e=ps(e);for(var A=this._groups,t=A.length,n=[],o=[],a=0;a<t;++a)for(var u=A[a],d=u.length,h,g=0;g<d;++g)(h=u[g])&&(n.push(e.call(h,h.__data__,g,u)),o.push(h));return new Ue(n,o)}function ms(e){return function(){return this.matches(e)}}function ws(e){return function(A){return A.matches(e)}}var cd=Array.prototype.find;function ud(e){return function(){return cd.call(this.children,e)}}function dd(){return this.firstElementChild}function fd(e){return this.select(e==null?dd:ud(typeof e=="function"?e:ws(e)))}var gd=Array.prototype.filter;function hd(){return Array.from(this.children)}function Bd(e){return function(){return gd.call(this.children,e)}}function pd(e){return this.selectAll(e==null?hd:Bd(typeof e=="function"?e:ws(e)))}function md(e){typeof e!="function"&&(e=ms(e));for(var A=this._groups,t=A.length,n=new Array(t),o=0;o<t;++o)for(var a=A[o],u=a.length,d=n[o]=[],h,g=0;g<u;++g)(h=a[g])&&e.call(h,h.__data__,g,a)&&d.push(h);return new Ue(n,this._parents)}function Cs(e){return new Array(e.length)}function wd(){return new Ue(this._enter||this._groups.map(Cs),this._parents)}function or(e,A){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=A}or.prototype={constructor:or,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,A){return this._parent.insertBefore(e,A)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Cd(e){return function(){return e}}function vd(e,A,t,n,o,a){for(var u=0,d,h=A.length,g=a.length;u<g;++u)(d=A[u])?(d.__data__=a[u],n[u]=d):t[u]=new or(e,a[u]);for(;u<h;++u)(d=A[u])&&(o[u]=d)}function yd(e,A,t,n,o,a,u){var d,h,g=new Map,B=A.length,w=a.length,m=new Array(B),v;for(d=0;d<B;++d)(h=A[d])&&(m[d]=v=u.call(h,h.__data__,d,A)+"",g.has(v)?o[d]=h:g.set(v,h));for(d=0;d<w;++d)v=u.call(e,a[d],d,a)+"",(h=g.get(v))?(n[d]=h,h.__data__=a[d],g.delete(v)):t[d]=new or(e,a[d]);for(d=0;d<B;++d)(h=A[d])&&g.get(m[d])===h&&(o[d]=h)}function Qd(e){return e.__data__}function Ed(e,A){if(!arguments.length)return Array.from(this,Qd);var t=A?yd:vd,n=this._parents,o=this._groups;typeof e!="function"&&(e=Cd(e));for(var a=o.length,u=new Array(a),d=new Array(a),h=new Array(a),g=0;g<a;++g){var B=n[g],w=o[g],m=w.length,v=Ud(e.call(B,B&&B.__data__,g,n)),Q=v.length,H=d[g]=new Array(Q),N=u[g]=new Array(Q);t(B,w,H,N,h[g]=new Array(m),v,A);for(var L=0,R=0,U,k;L<Q;++L)if(U=H[L]){for(L>=R&&(R=L+1);!(k=N[R])&&++R<Q;);U._next=k||null}}return u=new Ue(u,n),u._enter=d,u._exit=h,u}function Ud(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fd(){return new Ue(this._exit||this._groups.map(Cs),this._parents)}function bd(e,A,t){var n=this.enter(),o=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),A!=null&&(o=A(o),o&&(o=o.selection())),t==null?a.remove():t(a),n&&o?n.merge(o).order():o}function Hd(e){for(var A=e.selection?e.selection():e,t=this._groups,n=A._groups,o=t.length,a=n.length,u=Math.min(o,a),d=new Array(o),h=0;h<u;++h)for(var g=t[h],B=n[h],w=g.length,m=d[h]=new Array(w),v,Q=0;Q<w;++Q)(v=g[Q]||B[Q])&&(m[Q]=v);for(;h<o;++h)d[h]=t[h];return new Ue(d,this._parents)}function Id(){for(var e=this._groups,A=-1,t=e.length;++A<t;)for(var n=e[A],o=n.length-1,a=n[o],u;--o>=0;)(u=n[o])&&(a&&u.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(u,a),a=u);return this}function _d(e){e||(e=Sd);function A(w,m){return w&&m?e(w.__data__,m.__data__):!w-!m}for(var t=this._groups,n=t.length,o=new Array(n),a=0;a<n;++a){for(var u=t[a],d=u.length,h=o[a]=new Array(d),g,B=0;B<d;++B)(g=u[B])&&(h[B]=g);h.sort(A)}return new Ue(o,this._parents).order()}function Sd(e,A){return e<A?-1:e>A?1:e>=A?0:NaN}function xd(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Dd(){return Array.from(this)}function Nd(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],o=0,a=n.length;o<a;++o){var u=n[o];if(u)return u}return null}function Ld(){let e=0;for(const A of this)++e;return e}function Td(){return!this.node()}function kd(e){for(var A=this._groups,t=0,n=A.length;t<n;++t)for(var o=A[t],a=0,u=o.length,d;a<u;++a)(d=o[a])&&e.call(d,d.__data__,a,o);return this}function Md(e){return function(){this.removeAttribute(e)}}function Kd(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Od(e,A){return function(){this.setAttribute(e,A)}}function Rd(e,A){return function(){this.setAttributeNS(e.space,e.local,A)}}function Vd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function Pd(e,A){return function(){var t=A.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function Gd(e,A){var t=rr(e);if(arguments.length<2){var n=this.node();return t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}return this.each((A==null?t.local?Kd:Md:typeof A=="function"?t.local?Pd:Vd:t.local?Rd:Od)(t,A))}function vs(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zd(e){return function(){this.style.removeProperty(e)}}function Xd(e,A,t){return function(){this.style.setProperty(e,A,t)}}function $d(e,A,t){return function(){var n=A.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,t)}}function Wd(e,A,t){return arguments.length>1?this.each((A==null?zd:typeof A=="function"?$d:Xd)(e,A,t??"")):Xt(this.node(),e)}function Xt(e,A){return e.style.getPropertyValue(A)||vs(e).getComputedStyle(e,null).getPropertyValue(A)}function Yd(e){return function(){delete this[e]}}function Jd(e,A){return function(){this[e]=A}}function Zd(e,A){return function(){var t=A.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function jd(e,A){return arguments.length>1?this.each((A==null?Yd:typeof A=="function"?Zd:Jd)(e,A)):this.node()[e]}function ys(e){return e.trim().split(/^|\s+/)}function Ko(e){return e.classList||new Qs(e)}function Qs(e){this._node=e,this._names=ys(e.getAttribute("class")||"")}Qs.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var A=this._names.indexOf(e);A>=0&&(this._names.splice(A,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Es(e,A){for(var t=Ko(e),n=-1,o=A.length;++n<o;)t.add(A[n])}function Us(e,A){for(var t=Ko(e),n=-1,o=A.length;++n<o;)t.remove(A[n])}function qd(e){return function(){Es(this,e)}}function Af(e){return function(){Us(this,e)}}function ef(e,A){return function(){(A.apply(this,arguments)?Es:Us)(this,e)}}function tf(e,A){var t=ys(e+"");if(arguments.length<2){for(var n=Ko(this.node()),o=-1,a=t.length;++o<a;)if(!n.contains(t[o]))return!1;return!0}return this.each((typeof A=="function"?ef:A?qd:Af)(t,A))}function nf(){this.textContent=""}function rf(e){return function(){this.textContent=e}}function of(e){return function(){var A=e.apply(this,arguments);this.textContent=A??""}}function sf(e){return arguments.length?this.each(e==null?nf:(typeof e=="function"?of:rf)(e)):this.node().textContent}function af(){this.innerHTML=""}function lf(e){return function(){this.innerHTML=e}}function cf(e){return function(){var A=e.apply(this,arguments);this.innerHTML=A??""}}function uf(e){return arguments.length?this.each(e==null?af:(typeof e=="function"?cf:lf)(e)):this.node().innerHTML}function df(){this.nextSibling&&this.parentNode.appendChild(this)}function ff(){return this.each(df)}function gf(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hf(){return this.each(gf)}function Bf(e){var A=typeof e=="function"?e:Bs(e);return this.select(function(){return this.appendChild(A.apply(this,arguments))})}function pf(){return null}function mf(e,A){var t=typeof e=="function"?e:Bs(e),n=A==null?pf:typeof A=="function"?A:Mo(A);return this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})}function wf(){var e=this.parentNode;e&&e.removeChild(this)}function Cf(){return this.each(wf)}function vf(){var e=this.cloneNode(!1),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function yf(){var e=this.cloneNode(!0),A=this.parentNode;return A?A.insertBefore(e,this.nextSibling):e}function Qf(e){return this.select(e?yf:vf)}function Ef(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Uf(e){return function(A){e.call(this,A,this.__data__)}}function Ff(e){return e.trim().split(/^|\s+/).map(function(A){var t="",n=A.indexOf(".");return n>=0&&(t=A.slice(n+1),A=A.slice(0,n)),{type:A,name:t}})}function bf(e){return function(){var A=this.__on;if(A){for(var t=0,n=-1,o=A.length,a;t<o;++t)a=A[t],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):A[++n]=a;++n?A.length=n:delete this.__on}}}function Hf(e,A,t){return function(){var n=this.__on,o,a=Uf(A);if(n){for(var u=0,d=n.length;u<d;++u)if((o=n[u]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=t),o.value=A;return}}this.addEventListener(e.type,a,t),o={type:e.type,name:e.name,value:A,listener:a,options:t},n?n.push(o):this.__on=[o]}}function If(e,A,t){var n=Ff(e+""),o,a=n.length,u;if(arguments.length<2){var d=this.node().__on;if(d){for(var h=0,g=d.length,B;h<g;++h)for(o=0,B=d[h];o<a;++o)if((u=n[o]).type===B.type&&u.name===B.name)return B.value}return}for(d=A?Hf:bf,o=0;o<a;++o)this.each(d(n[o],A,t));return this}function Fs(e,A,t){var n=vs(e),o=n.CustomEvent;typeof o=="function"?o=new o(A,t):(o=n.document.createEvent("Event"),t?(o.initEvent(A,t.bubbles,t.cancelable),o.detail=t.detail):o.initEvent(A,!1,!1)),e.dispatchEvent(o)}function _f(e,A){return function(){return Fs(this,e,A)}}function Sf(e,A){return function(){return Fs(this,e,A.apply(this,arguments))}}function xf(e,A){return this.each((typeof A=="function"?Sf:_f)(e,A))}function*Df(){for(var e=this._groups,A=0,t=e.length;A<t;++A)for(var n=e[A],o=0,a=n.length,u;o<a;++o)(u=n[o])&&(yield u)}var bs=[null];function Ue(e,A){this._groups=e,this._parents=A}function wn(){return new Ue([[document.documentElement]],bs)}function Nf(){return this}Ue.prototype=wn.prototype={constructor:Ue,select:od,selectAll:ld,selectChild:fd,selectChildren:pd,filter:md,data:Ed,enter:wd,exit:Fd,join:bd,merge:Hd,selection:Nf,order:Id,sort:_d,call:xd,nodes:Dd,node:Nd,size:Ld,empty:Td,each:kd,attr:Gd,style:Wd,property:jd,classed:tf,text:sf,html:uf,raise:ff,lower:hf,append:Bf,insert:mf,remove:Cf,clone:Qf,datum:Ef,on:If,dispatch:xf,[Symbol.iterator]:Df};function Ne(e){return typeof e=="string"?new Ue([[document.querySelector(e)]],[document.documentElement]):new Ue([[e]],bs)}function Lf(e){let A;for(;A=e.sourceEvent;)e=A;return e}function Oe(e,A){if(e=Lf(e),A===void 0&&(A=e.currentTarget),A){var t=A.ownerSVGElement||A;if(t.createSVGPoint){var n=t.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(A.getScreenCTM().inverse()),[n.x,n.y]}if(A.getBoundingClientRect){var o=A.getBoundingClientRect();return[e.clientX-o.left-A.clientLeft,e.clientY-o.top-A.clientTop]}}return[e.pageX,e.pageY]}var Tf={passive:!1},Cn={capture:!0,passive:!1};function Oo(e){e.stopImmediatePropagation()}function $t(e){e.preventDefault(),e.stopImmediatePropagation()}function Hs(e){var A=e.document.documentElement,t=Ne(e).on("dragstart.drag",$t,Cn);"onselectstart"in A?t.on("selectstart.drag",$t,Cn):(A.__noselect=A.style.MozUserSelect,A.style.MozUserSelect="none")}function Is(e,A){var t=e.document.documentElement,n=Ne(e).on("dragstart.drag",null);A&&(n.on("click.drag",$t,Cn),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in t?n.on("selectstart.drag",null):(t.style.MozUserSelect=t.__noselect,delete t.__noselect)}var ir=e=>()=>e;function Ro(e,{sourceEvent:A,subject:t,target:n,identifier:o,active:a,x:u,y:d,dx:h,dy:g,dispatch:B}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:B}})}Ro.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function kf(e){return!e.ctrlKey&&!e.button}function Mf(){return this.parentNode}function Kf(e,A){return A??{x:e.x,y:e.y}}function Of(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rf(){var e=kf,A=Mf,t=Kf,n=Of,o={},a=tr("start","drag","end"),u=0,d,h,g,B,w=0;function m(k){k.on("mousedown.drag",v).filter(n).on("touchstart.drag",N).on("touchmove.drag",L,Tf).on("touchend.drag touchcancel.drag",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(k,eA){if(!(B||!e.call(this,k,eA))){var Y=U(this,A.call(this,k,eA),k,eA,"mouse");Y&&(Ne(k.view).on("mousemove.drag",Q,Cn).on("mouseup.drag",H,Cn),Hs(k.view),Oo(k),g=!1,d=k.clientX,h=k.clientY,Y("start",k))}}function Q(k){if($t(k),!g){var eA=k.clientX-d,Y=k.clientY-h;g=eA*eA+Y*Y>w}o.mouse("drag",k)}function H(k){Ne(k.view).on("mousemove.drag mouseup.drag",null),Is(k.view,g),$t(k),o.mouse("end",k)}function N(k,eA){if(e.call(this,k,eA)){var Y=k.changedTouches,sA=A.call(this,k,eA),lA=Y.length,nA,tA;for(nA=0;nA<lA;++nA)(tA=U(this,sA,k,eA,Y[nA].identifier,Y[nA]))&&(Oo(k),tA("start",k,Y[nA]))}}function L(k){var eA=k.changedTouches,Y=eA.length,sA,lA;for(sA=0;sA<Y;++sA)(lA=o[eA[sA].identifier])&&($t(k),lA("drag",k,eA[sA]))}function R(k){var eA=k.changedTouches,Y=eA.length,sA,lA;for(B&&clearTimeout(B),B=setTimeout(function(){B=null},500),sA=0;sA<Y;++sA)(lA=o[eA[sA].identifier])&&(Oo(k),lA("end",k,eA[sA]))}function U(k,eA,Y,sA,lA,nA){var tA=a.copy(),AA=Oe(nA||Y,eA),T,aA,I;if((I=t.call(k,new Ro("beforestart",{sourceEvent:Y,target:m,identifier:lA,active:u,x:AA[0],y:AA[1],dx:0,dy:0,dispatch:tA}),sA))!=null)return T=I.x-AA[0]||0,aA=I.y-AA[1]||0,function J(F,S,V){var O=AA,z;switch(F){case"start":o[lA]=J,z=u++;break;case"end":delete o[lA],--u;case"drag":AA=Oe(V||S,eA),z=u;break}tA.call(F,k,new Ro(F,{sourceEvent:S,subject:I,target:m,identifier:lA,active:z,x:AA[0]+T,y:AA[1]+aA,dx:AA[0]-O[0],dy:AA[1]-O[1],dispatch:tA}),sA)}}return m.filter=function(k){return arguments.length?(e=typeof k=="function"?k:ir(!!k),m):e},m.container=function(k){return arguments.length?(A=typeof k=="function"?k:ir(k),m):A},m.subject=function(k){return arguments.length?(t=typeof k=="function"?k:ir(k),m):t},m.touchable=function(k){return arguments.length?(n=typeof k=="function"?k:ir(!!k),m):n},m.on=function(){var k=a.on.apply(a,arguments);return k===a?m:k},m.clickDistance=function(k){return arguments.length?(w=(k=+k)*k,m):Math.sqrt(w)},m}function Vo(e,A,t){e.prototype=A.prototype=t,t.constructor=e}function _s(e,A){var t=Object.create(e.prototype);for(var n in A)t[n]=A[n];return t}function vn(){}var yn=.7,sr=1/yn,Wt="\\s*([+-]?\\d+)\\s*",Qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vf=/^#([0-9a-f]{3,8})$/,Pf=new RegExp(`^rgb\\(${Wt},${Wt},${Wt}\\)$`),Gf=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),zf=new RegExp(`^rgba\\(${Wt},${Wt},${Wt},${Qn}\\)$`),Xf=new RegExp(`^rgba\\(${Re},${Re},${Re},${Qn}\\)$`),$f=new RegExp(`^hsl\\(${Qn},${Re},${Re}\\)$`),Wf=new RegExp(`^hsla\\(${Qn},${Re},${Re},${Qn}\\)$`),Ss={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Vo(vn,It,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xs,formatHex:xs,formatHex8:Yf,formatHsl:Jf,formatRgb:Ds,toString:Ds});function xs(){return this.rgb().formatHex()}function Yf(){return this.rgb().formatHex8()}function Jf(){return Ms(this).formatHsl()}function Ds(){return this.rgb().formatRgb()}function It(e){var A,t;return e=(e+"").trim().toLowerCase(),(A=Vf.exec(e))?(t=A[1].length,A=parseInt(A[1],16),t===6?Ns(A):t===3?new we(A>>8&15|A>>4&240,A>>4&15|A&240,(A&15)<<4|A&15,1):t===8?ar(A>>24&255,A>>16&255,A>>8&255,(A&255)/255):t===4?ar(A>>12&15|A>>8&240,A>>8&15|A>>4&240,A>>4&15|A&240,((A&15)<<4|A&15)/255):null):(A=Pf.exec(e))?new we(A[1],A[2],A[3],1):(A=Gf.exec(e))?new we(A[1]*255/100,A[2]*255/100,A[3]*255/100,1):(A=zf.exec(e))?ar(A[1],A[2],A[3],A[4]):(A=Xf.exec(e))?ar(A[1]*255/100,A[2]*255/100,A[3]*255/100,A[4]):(A=$f.exec(e))?ks(A[1],A[2]/100,A[3]/100,1):(A=Wf.exec(e))?ks(A[1],A[2]/100,A[3]/100,A[4]):Ss.hasOwnProperty(e)?Ns(Ss[e]):e==="transparent"?new we(NaN,NaN,NaN,0):null}function Ns(e){return new we(e>>16&255,e>>8&255,e&255,1)}function ar(e,A,t,n){return n<=0&&(e=A=t=NaN),new we(e,A,t,n)}function Zf(e){return e instanceof vn||(e=It(e)),e?(e=e.rgb(),new we(e.r,e.g,e.b,e.opacity)):new we}function Po(e,A,t,n){return arguments.length===1?Zf(e):new we(e,A,t,n??1)}function we(e,A,t,n){this.r=+e,this.g=+A,this.b=+t,this.opacity=+n}Vo(we,Po,_s(vn,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new we(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yn:Math.pow(yn,e),new we(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new we(_t(this.r),_t(this.g),_t(this.b),lr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ls,formatHex:Ls,formatHex8:jf,formatRgb:Ts,toString:Ts}));function Ls(){return`#${St(this.r)}${St(this.g)}${St(this.b)}`}function jf(){return`#${St(this.r)}${St(this.g)}${St(this.b)}${St((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ts(){const e=lr(this.opacity);return`${e===1?"rgb(":"rgba("}${_t(this.r)}, ${_t(this.g)}, ${_t(this.b)}${e===1?")":`, ${e})`}`}function lr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _t(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function St(e){return e=_t(e),(e<16?"0":"")+e.toString(16)}function ks(e,A,t,n){return n<=0?e=A=t=NaN:t<=0||t>=1?e=A=NaN:A<=0&&(e=NaN),new Le(e,A,t,n)}function Ms(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof vn||(e=It(e)),!e)return new Le;if(e instanceof Le)return e;e=e.rgb();var A=e.r/255,t=e.g/255,n=e.b/255,o=Math.min(A,t,n),a=Math.max(A,t,n),u=NaN,d=a-o,h=(a+o)/2;return d?(A===a?u=(t-n)/d+(t<n)*6:t===a?u=(n-A)/d+2:u=(A-t)/d+4,d/=h<.5?a+o:2-a-o,u*=60):d=h>0&&h<1?0:u,new Le(u,d,h,e.opacity)}function qf(e,A,t,n){return arguments.length===1?Ms(e):new Le(e,A,t,n??1)}function Le(e,A,t,n){this.h=+e,this.s=+A,this.l=+t,this.opacity=+n}Vo(Le,qf,_s(vn,{brighter(e){return e=e==null?sr:Math.pow(sr,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yn:Math.pow(yn,e),new Le(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,A=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*A,o=2*t-n;return new we(Go(e>=240?e-240:e+120,o,n),Go(e,o,n),Go(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Le(Ks(this.h),cr(this.s),cr(this.l),lr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lr(this.opacity);return`${e===1?"hsl(":"hsla("}${Ks(this.h)}, ${cr(this.s)*100}%, ${cr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ks(e){return e=(e||0)%360,e<0?e+360:e}function cr(e){return Math.max(0,Math.min(1,e||0))}function Go(e,A,t){return(e<60?A+(t-A)*e/60:e<180?t:e<240?A+(t-A)*(240-e)/60:A)*255}var zo=e=>()=>e;function Ag(e,A){return function(t){return e+t*A}}function eg(e,A,t){return e=Math.pow(e,t),A=Math.pow(A,t)-e,t=1/t,function(n){return Math.pow(e+n*A,t)}}function tg(e){return(e=+e)==1?Os:function(A,t){return t-A?eg(A,t,e):zo(isNaN(A)?t:A)}}function Os(e,A){var t=A-e;return t?Ag(e,t):zo(isNaN(e)?A:e)}var ur=(function e(A){var t=tg(A);function n(o,a){var u=t((o=Po(o)).r,(a=Po(a)).r),d=t(o.g,a.g),h=t(o.b,a.b),g=Os(o.opacity,a.opacity);return function(B){return o.r=u(B),o.g=d(B),o.b=h(B),o.opacity=g(B),o+""}}return n.gamma=e,n})(1);function ng(e,A){A||(A=[]);var t=e?Math.min(A.length,e.length):0,n=A.slice(),o;return function(a){for(o=0;o<t;++o)n[o]=e[o]*(1-a)+A[o]*a;return n}}function rg(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function og(e,A){var t=A?A.length:0,n=e?Math.min(t,e.length):0,o=new Array(n),a=new Array(t),u;for(u=0;u<n;++u)o[u]=En(e[u],A[u]);for(;u<t;++u)a[u]=A[u];return function(d){for(u=0;u<n;++u)a[u]=o[u](d);return a}}function ig(e,A){var t=new Date;return e=+e,A=+A,function(n){return t.setTime(e*(1-n)+A*n),t}}function Ve(e,A){return e=+e,A=+A,function(t){return e*(1-t)+A*t}}function sg(e,A){var t={},n={},o;(e===null||typeof e!="object")&&(e={}),(A===null||typeof A!="object")&&(A={});for(o in A)o in e?t[o]=En(e[o],A[o]):n[o]=A[o];return function(a){for(o in t)n[o]=t[o](a);return n}}var Xo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$o=new RegExp(Xo.source,"g");function ag(e){return function(){return e}}function lg(e){return function(A){return e(A)+""}}function Rs(e,A){var t=Xo.lastIndex=$o.lastIndex=0,n,o,a,u=-1,d=[],h=[];for(e=e+"",A=A+"";(n=Xo.exec(e))&&(o=$o.exec(A));)(a=o.index)>t&&(a=A.slice(t,a),d[u]?d[u]+=a:d[++u]=a),(n=n[0])===(o=o[0])?d[u]?d[u]+=o:d[++u]=o:(d[++u]=null,h.push({i:u,x:Ve(n,o)})),t=$o.lastIndex;return t<A.length&&(a=A.slice(t),d[u]?d[u]+=a:d[++u]=a),d.length<2?h[0]?lg(h[0].x):ag(A):(A=h.length,function(g){for(var B=0,w;B<A;++B)d[(w=h[B]).i]=w.x(g);return d.join("")})}function En(e,A){var t=typeof A,n;return A==null||t==="boolean"?zo(A):(t==="number"?Ve:t==="string"?(n=It(A))?(A=n,ur):Rs:A instanceof It?ur:A instanceof Date?ig:rg(A)?ng:Array.isArray(A)?og:typeof A.valueOf!="function"&&typeof A.toString!="function"||isNaN(A)?sg:Ve)(e,A)}var Vs=180/Math.PI,Wo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ps(e,A,t,n,o,a){var u,d,h;return(u=Math.sqrt(e*e+A*A))&&(e/=u,A/=u),(h=e*t+A*n)&&(t-=e*h,n-=A*h),(d=Math.sqrt(t*t+n*n))&&(t/=d,n/=d,h/=d),e*n<A*t&&(e=-e,A=-A,h=-h,u=-u),{translateX:o,translateY:a,rotate:Math.atan2(A,e)*Vs,skewX:Math.atan(h)*Vs,scaleX:u,scaleY:d}}var dr;function cg(e){const A=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return A.isIdentity?Wo:Ps(A.a,A.b,A.c,A.d,A.e,A.f)}function ug(e){return e==null||(dr||(dr=document.createElementNS("http://www.w3.org/2000/svg","g")),dr.setAttribute("transform",e),!(e=dr.transform.baseVal.consolidate()))?Wo:(e=e.matrix,Ps(e.a,e.b,e.c,e.d,e.e,e.f))}function Gs(e,A,t,n){function o(g){return g.length?g.pop()+" ":""}function a(g,B,w,m,v,Q){if(g!==w||B!==m){var H=v.push("translate(",null,A,null,t);Q.push({i:H-4,x:Ve(g,w)},{i:H-2,x:Ve(B,m)})}else(w||m)&&v.push("translate("+w+A+m+t)}function u(g,B,w,m){g!==B?(g-B>180?B+=360:B-g>180&&(g+=360),m.push({i:w.push(o(w)+"rotate(",null,n)-2,x:Ve(g,B)})):B&&w.push(o(w)+"rotate("+B+n)}function d(g,B,w,m){g!==B?m.push({i:w.push(o(w)+"skewX(",null,n)-2,x:Ve(g,B)}):B&&w.push(o(w)+"skewX("+B+n)}function h(g,B,w,m,v,Q){if(g!==w||B!==m){var H=v.push(o(v)+"scale(",null,",",null,")");Q.push({i:H-4,x:Ve(g,w)},{i:H-2,x:Ve(B,m)})}else(w!==1||m!==1)&&v.push(o(v)+"scale("+w+","+m+")")}return function(g,B){var w=[],m=[];return g=e(g),B=e(B),a(g.translateX,g.translateY,B.translateX,B.translateY,w,m),u(g.rotate,B.rotate,w,m),d(g.skewX,B.skewX,w,m),h(g.scaleX,g.scaleY,B.scaleX,B.scaleY,w,m),g=B=null,function(v){for(var Q=-1,H=m.length,N;++Q<H;)w[(N=m[Q]).i]=N.x(v);return w.join("")}}}var dg=Gs(cg,"px, ","px)","deg)"),fg=Gs(ug,", ",")",")"),gg=1e-12;function zs(e){return((e=Math.exp(e))+1/e)/2}function hg(e){return((e=Math.exp(e))-1/e)/2}function Bg(e){return((e=Math.exp(2*e))-1)/(e+1)}var fr=(function e(A,t,n){function o(a,u){var d=a[0],h=a[1],g=a[2],B=u[0],w=u[1],m=u[2],v=B-d,Q=w-h,H=v*v+Q*Q,N,L;if(H<gg)L=Math.log(m/g)/A,N=function(Y){return[d+Y*v,h+Y*Q,g*Math.exp(A*Y*L)]};else{var R=Math.sqrt(H),U=(m*m-g*g+n*H)/(2*g*t*R),k=(m*m-g*g-n*H)/(2*m*t*R),eA=Math.log(Math.sqrt(U*U+1)-U);L=(Math.log(Math.sqrt(k*k+1)-k)-eA)/A,N=function(Y){var sA=Y*L,lA=zs(eA),nA=g/(t*R)*(lA*Bg(A*sA+eA)-hg(eA));return[d+nA*v,h+nA*Q,g*lA/zs(A*sA+eA)]}}return N.duration=L*1e3*A/Math.SQRT2,N}return o.rho=function(a){var u=Math.max(.001,+a),d=u*u;return e(u,d,d*d)},o})(Math.SQRT2,2,4),Yt=0,Un=0,Fn=0,Xs=1e3,gr,bn,hr=0,xt=0,Br=0,Hn=typeof performance=="object"&&performance.now?performance:Date,$s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yo(){return xt||($s(pg),xt=Hn.now()+Br)}function pg(){xt=0}function pr(){this._call=this._time=this._next=null}pr.prototype=Ws.prototype={constructor:pr,restart:function(e,A,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?Yo():+t)+(A==null?0:+A),!this._next&&bn!==this&&(bn?bn._next=this:gr=this,bn=this),this._call=e,this._time=t,Jo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jo())}};function Ws(e,A,t){var n=new pr;return n.restart(e,A,t),n}function mg(){Yo(),++Yt;for(var e=gr,A;e;)(A=xt-e._time)>=0&&e._call.call(void 0,A),e=e._next;--Yt}function Ys(){xt=(hr=Hn.now())+Br,Yt=Un=0;try{mg()}finally{Yt=0,Cg(),xt=0}}function wg(){var e=Hn.now(),A=e-hr;A>Xs&&(Br-=A,hr=e)}function Cg(){for(var e,A=gr,t,n=1/0;A;)A._call?(n>A._time&&(n=A._time),e=A,A=A._next):(t=A._next,A._next=null,A=e?e._next=t:gr=t);bn=e,Jo(n)}function Jo(e){Yt||(Un&&(Un=clearTimeout(Un)),e-xt>24?(e<1/0&&(Un=setTimeout(Ys,e-Hn.now()-Br)),Fn&&(Fn=clearInterval(Fn))):(Fn||(hr=Hn.now(),Fn=setInterval(wg,Xs)),Yt=1,$s(Ys)))}function Js(e,A,t){var n=new pr;return A=A==null?0:+A,n.restart(o=>{n.stop(),e(o+A)},A,t),n}var vg=tr("start","end","cancel","interrupt"),yg=[],Zs=0,js=1,Zo=2,mr=3,qs=4,jo=5,wr=6;function Cr(e,A,t,n,o,a){var u=e.__transition;if(!u)e.__transition={};else if(t in u)return;Qg(e,t,{name:A,index:n,group:o,on:vg,tween:yg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Zs})}function qo(e,A){var t=Te(e,A);if(t.state>Zs)throw new Error("too late; already scheduled");return t}function Pe(e,A){var t=Te(e,A);if(t.state>mr)throw new Error("too late; already running");return t}function Te(e,A){var t=e.__transition;if(!t||!(t=t[A]))throw new Error("transition not found");return t}function Qg(e,A,t){var n=e.__transition,o;n[A]=t,t.timer=Ws(a,0,t.time);function a(g){t.state=js,t.timer.restart(u,t.delay,t.time),t.delay<=g&&u(g-t.delay)}function u(g){var B,w,m,v;if(t.state!==js)return h();for(B in n)if(v=n[B],v.name===t.name){if(v.state===mr)return Js(u);v.state===qs?(v.state=wr,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[B]):+B<A&&(v.state=wr,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[B])}if(Js(function(){t.state===mr&&(t.state=qs,t.timer.restart(d,t.delay,t.time),d(g))}),t.state=Zo,t.on.call("start",e,e.__data__,t.index,t.group),t.state===Zo){for(t.state=mr,o=new Array(m=t.tween.length),B=0,w=-1;B<m;++B)(v=t.tween[B].value.call(e,e.__data__,t.index,t.group))&&(o[++w]=v);o.length=w+1}}function d(g){for(var B=g<t.duration?t.ease.call(null,g/t.duration):(t.timer.restart(h),t.state=jo,1),w=-1,m=o.length;++w<m;)o[w].call(e,B);t.state===jo&&(t.on.call("end",e,e.__data__,t.index,t.group),h())}function h(){t.state=wr,t.timer.stop(),delete n[A];for(var g in n)return;delete e.__transition}}function vr(e,A){var t=e.__transition,n,o,a=!0,u;if(t){A=A==null?null:A+"";for(u in t){if((n=t[u]).name!==A){a=!1;continue}o=n.state>Zo&&n.state<jo,n.state=wr,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete t[u]}a&&delete e.__transition}}function Eg(e){return this.each(function(){vr(this,e)})}function Ug(e,A){var t,n;return function(){var o=Pe(this,e),a=o.tween;if(a!==t){n=t=a;for(var u=0,d=n.length;u<d;++u)if(n[u].name===A){n=n.slice(),n.splice(u,1);break}}o.tween=n}}function Fg(e,A,t){var n,o;if(typeof t!="function")throw new Error;return function(){var a=Pe(this,e),u=a.tween;if(u!==n){o=(n=u).slice();for(var d={name:A,value:t},h=0,g=o.length;h<g;++h)if(o[h].name===A){o[h]=d;break}h===g&&o.push(d)}a.tween=o}}function bg(e,A){var t=this._id;if(e+="",arguments.length<2){for(var n=Te(this.node(),t).tween,o=0,a=n.length,u;o<a;++o)if((u=n[o]).name===e)return u.value;return null}return this.each((A==null?Ug:Fg)(t,e,A))}function Ai(e,A,t){var n=e._id;return e.each(function(){var o=Pe(this,n);(o.value||(o.value={}))[A]=t.apply(this,arguments)}),function(o){return Te(o,n).value[A]}}function Aa(e,A){var t;return(typeof A=="number"?Ve:A instanceof It?ur:(t=It(A))?(A=t,ur):Rs)(e,A)}function Hg(e){return function(){this.removeAttribute(e)}}function Ig(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _g(e,A,t){var n,o=t+"",a;return function(){var u=this.getAttribute(e);return u===o?null:u===n?a:a=A(n=u,t)}}function Sg(e,A,t){var n,o=t+"",a;return function(){var u=this.getAttributeNS(e.space,e.local);return u===o?null:u===n?a:a=A(n=u,t)}}function xg(e,A,t){var n,o,a;return function(){var u,d=t(this),h;return d==null?void this.removeAttribute(e):(u=this.getAttribute(e),h=d+"",u===h?null:u===n&&h===o?a:(o=h,a=A(n=u,d)))}}function Dg(e,A,t){var n,o,a;return function(){var u,d=t(this),h;return d==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),h=d+"",u===h?null:u===n&&h===o?a:(o=h,a=A(n=u,d)))}}function Ng(e,A){var t=rr(e),n=t==="transform"?fg:Aa;return this.attrTween(e,typeof A=="function"?(t.local?Dg:xg)(t,n,Ai(this,"attr."+e,A)):A==null?(t.local?Ig:Hg)(t):(t.local?Sg:_g)(t,n,A))}function Lg(e,A){return function(t){this.setAttribute(e,A.call(this,t))}}function Tg(e,A){return function(t){this.setAttributeNS(e.space,e.local,A.call(this,t))}}function kg(e,A){var t,n;function o(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Tg(e,a)),t}return o._value=A,o}function Mg(e,A){var t,n;function o(){var a=A.apply(this,arguments);return a!==n&&(t=(n=a)&&Lg(e,a)),t}return o._value=A,o}function Kg(e,A){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(A==null)return this.tween(t,null);if(typeof A!="function")throw new Error;var n=rr(e);return this.tween(t,(n.local?kg:Mg)(n,A))}function Og(e,A){return function(){qo(this,e).delay=+A.apply(this,arguments)}}function Rg(e,A){return A=+A,function(){qo(this,e).delay=A}}function Vg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Og:Rg)(A,e)):Te(this.node(),A).delay}function Pg(e,A){return function(){Pe(this,e).duration=+A.apply(this,arguments)}}function Gg(e,A){return A=+A,function(){Pe(this,e).duration=A}}function zg(e){var A=this._id;return arguments.length?this.each((typeof e=="function"?Pg:Gg)(A,e)):Te(this.node(),A).duration}function Xg(e,A){if(typeof A!="function")throw new Error;return function(){Pe(this,e).ease=A}}function $g(e){var A=this._id;return arguments.length?this.each(Xg(A,e)):Te(this.node(),A).ease}function Wg(e,A){return function(){var t=A.apply(this,arguments);if(typeof t!="function")throw new Error;Pe(this,e).ease=t}}function Yg(e){if(typeof e!="function")throw new Error;return this.each(Wg(this._id,e))}function Jg(e){typeof e!="function"&&(e=ms(e));for(var A=this._groups,t=A.length,n=new Array(t),o=0;o<t;++o)for(var a=A[o],u=a.length,d=n[o]=[],h,g=0;g<u;++g)(h=a[g])&&e.call(h,h.__data__,g,a)&&d.push(h);return new Ze(n,this._parents,this._name,this._id)}function Zg(e){if(e._id!==this._id)throw new Error;for(var A=this._groups,t=e._groups,n=A.length,o=t.length,a=Math.min(n,o),u=new Array(n),d=0;d<a;++d)for(var h=A[d],g=t[d],B=h.length,w=u[d]=new Array(B),m,v=0;v<B;++v)(m=h[v]||g[v])&&(w[v]=m);for(;d<n;++d)u[d]=A[d];return new Ze(u,this._parents,this._name,this._id)}function jg(e){return(e+"").trim().split(/^|\s+/).every(function(A){var t=A.indexOf(".");return t>=0&&(A=A.slice(0,t)),!A||A==="start"})}function qg(e,A,t){var n,o,a=jg(A)?qo:Pe;return function(){var u=a(this,e),d=u.on;d!==n&&(o=(n=d).copy()).on(A,t),u.on=o}}function Ah(e,A){var t=this._id;return arguments.length<2?Te(this.node(),t).on.on(e):this.each(qg(t,e,A))}function eh(e){return function(){var A=this.parentNode;for(var t in this.__transition)if(+t!==e)return;A&&A.removeChild(this)}}function th(){return this.on("end.remove",eh(this._id))}function nh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=Mo(e));for(var n=this._groups,o=n.length,a=new Array(o),u=0;u<o;++u)for(var d=n[u],h=d.length,g=a[u]=new Array(h),B,w,m=0;m<h;++m)(B=d[m])&&(w=e.call(B,B.__data__,m,d))&&("__data__"in B&&(w.__data__=B.__data__),g[m]=w,Cr(g[m],A,t,m,g,Te(B,t)));return new Ze(a,this._parents,A,t)}function rh(e){var A=this._name,t=this._id;typeof e!="function"&&(e=ps(e));for(var n=this._groups,o=n.length,a=[],u=[],d=0;d<o;++d)for(var h=n[d],g=h.length,B,w=0;w<g;++w)if(B=h[w]){for(var m=e.call(B,B.__data__,w,h),v,Q=Te(B,t),H=0,N=m.length;H<N;++H)(v=m[H])&&Cr(v,A,t,H,m,Q);a.push(m),u.push(B)}return new Ze(a,u,A,t)}var oh=wn.prototype.constructor;function ih(){return new oh(this._groups,this._parents)}function sh(e,A){var t,n,o;return function(){var a=Xt(this,e),u=(this.style.removeProperty(e),Xt(this,e));return a===u?null:a===t&&u===n?o:o=A(t=a,n=u)}}function ea(e){return function(){this.style.removeProperty(e)}}function ah(e,A,t){var n,o=t+"",a;return function(){var u=Xt(this,e);return u===o?null:u===n?a:a=A(n=u,t)}}function lh(e,A,t){var n,o,a;return function(){var u=Xt(this,e),d=t(this),h=d+"";return d==null&&(h=d=(this.style.removeProperty(e),Xt(this,e))),u===h?null:u===n&&h===o?a:(o=h,a=A(n=u,d))}}function ch(e,A){var t,n,o,a="style."+A,u="end."+a,d;return function(){var h=Pe(this,e),g=h.on,B=h.value[a]==null?d||(d=ea(A)):void 0;(g!==t||o!==B)&&(n=(t=g).copy()).on(u,o=B),h.on=n}}function uh(e,A,t){var n=(e+="")=="transform"?dg:Aa;return A==null?this.styleTween(e,sh(e,n)).on("end.style."+e,ea(e)):typeof A=="function"?this.styleTween(e,lh(e,n,Ai(this,"style."+e,A))).each(ch(this._id,e)):this.styleTween(e,ah(e,n,A),t).on("end.style."+e,null)}function dh(e,A,t){return function(n){this.style.setProperty(e,A.call(this,n),t)}}function fh(e,A,t){var n,o;function a(){var u=A.apply(this,arguments);return u!==o&&(n=(o=u)&&dh(e,u,t)),n}return a._value=A,a}function gh(e,A,t){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(A==null)return this.tween(n,null);if(typeof A!="function")throw new Error;return this.tween(n,fh(e,A,t??""))}function hh(e){return function(){this.textContent=e}}function Bh(e){return function(){var A=e(this);this.textContent=A??""}}function ph(e){return this.tween("text",typeof e=="function"?Bh(Ai(this,"text",e)):hh(e==null?"":e+""))}function mh(e){return function(A){this.textContent=e.call(this,A)}}function wh(e){var A,t;function n(){var o=e.apply(this,arguments);return o!==t&&(A=(t=o)&&mh(o)),A}return n._value=e,n}function Ch(e){var A="text";if(arguments.length<1)return(A=this.tween(A))&&A._value;if(e==null)return this.tween(A,null);if(typeof e!="function")throw new Error;return this.tween(A,wh(e))}function vh(){for(var e=this._name,A=this._id,t=ta(),n=this._groups,o=n.length,a=0;a<o;++a)for(var u=n[a],d=u.length,h,g=0;g<d;++g)if(h=u[g]){var B=Te(h,A);Cr(h,e,t,g,u,{time:B.time+B.delay+B.duration,delay:0,duration:B.duration,ease:B.ease})}return new Ze(n,this._parents,e,t)}function yh(){var e,A,t=this,n=t._id,o=t.size();return new Promise(function(a,u){var d={value:u},h={value:function(){--o===0&&a()}};t.each(function(){var g=Pe(this,n),B=g.on;B!==e&&(A=(e=B).copy(),A._.cancel.push(d),A._.interrupt.push(d),A._.end.push(h)),g.on=A}),o===0&&a()})}var Qh=0;function Ze(e,A,t,n){this._groups=e,this._parents=A,this._name=t,this._id=n}function ta(){return++Qh}var je=wn.prototype;Ze.prototype={constructor:Ze,select:nh,selectAll:rh,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:Jg,merge:Zg,selection:ih,transition:vh,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:Ah,attr:Ng,attrTween:Kg,style:uh,styleTween:gh,text:ph,textTween:Ch,remove:th,tween:bg,delay:Vg,duration:zg,ease:$g,easeVarying:Yg,end:yh,[Symbol.iterator]:je[Symbol.iterator]};function Eh(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Uh={time:null,delay:0,duration:250,ease:Eh};function Fh(e,A){for(var t;!(t=e.__transition)||!(t=t[A]);)if(!(e=e.parentNode))throw new Error(`transition ${A} not found`);return t}function bh(e){var A,t;e instanceof Ze?(A=e._id,e=e._name):(A=ta(),(t=Uh).time=Yo(),e=e==null?null:e+"");for(var n=this._groups,o=n.length,a=0;a<o;++a)for(var u=n[a],d=u.length,h,g=0;g<d;++g)(h=u[g])&&Cr(h,e,A,g,u,t||Fh(h,A));return new Ze(n,this._parents,e,A)}wn.prototype.interrupt=Eg,wn.prototype.transition=bh;var yr=e=>()=>e;function Hh(e,{sourceEvent:A,target:t,transform:n,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:A,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function qe(e,A,t){this.k=e,this.x=A,this.y=t}qe.prototype={constructor:qe,scale:function(e){return e===1?this:new qe(this.k*e,this.x,this.y)},translate:function(e,A){return e===0&A===0?this:new qe(this.k,this.x+this.k*e,this.y+this.k*A)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Jt=new qe(1,0,0);qe.prototype;function ei(e){e.stopImmediatePropagation()}function In(e){e.preventDefault(),e.stopImmediatePropagation()}function Ih(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _h(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function na(){return this.__zoom||Jt}function Sh(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function xh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dh(e,A,t){var n=e.invertX(A[0][0])-t[0][0],o=e.invertX(A[1][0])-t[1][0],a=e.invertY(A[0][1])-t[0][1],u=e.invertY(A[1][1])-t[1][1];return e.translate(o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o),u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u))}function Nh(){var e=Ih,A=_h,t=Dh,n=Sh,o=xh,a=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,h=fr,g=tr("start","zoom","end"),B,w,m,v=500,Q=150,H=0,N=10;function L(I){I.property("__zoom",na).on("wheel.zoom",lA,{passive:!1}).on("mousedown.zoom",nA).on("dblclick.zoom",tA).filter(o).on("touchstart.zoom",AA).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",aA).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}L.transform=function(I,J,F,S){var V=I.selection?I.selection():I;V.property("__zoom",na),I!==V?eA(I,J,F,S):V.interrupt().each(function(){Y(this,arguments).event(S).start().zoom(null,typeof J=="function"?J.apply(this,arguments):J).end()})},L.scaleBy=function(I,J,F,S){L.scaleTo(I,function(){return this.__zoom.k*(typeof J=="function"?J.apply(this,arguments):J)},F,S)},L.scaleTo=function(I,J,F,S){L.transform(I,function(){var V=A.apply(this,arguments),O=this.__zoom,z=F==null?k(V):typeof F=="function"?F.apply(this,arguments):F,q=O.invert(z),rA=typeof J=="function"?J.apply(this,arguments):J;return t(U(R(O,rA),z,q),V,u)},F,S)},L.translateBy=function(I,J,F,S){L.transform(I,function(){return t(this.__zoom.translate(typeof J=="function"?J.apply(this,arguments):J,typeof F=="function"?F.apply(this,arguments):F),A.apply(this,arguments),u)},null,S)},L.translateTo=function(I,J,F,S,V){L.transform(I,function(){var O=A.apply(this,arguments),z=this.__zoom,q=S==null?k(O):typeof S=="function"?S.apply(this,arguments):S;return t(Jt.translate(q[0],q[1]).scale(z.k).translate(typeof J=="function"?-J.apply(this,arguments):-J,typeof F=="function"?-F.apply(this,arguments):-F),O,u)},S,V)};function R(I,J){return J=Math.max(a[0],Math.min(a[1],J)),J===I.k?I:new qe(J,I.x,I.y)}function U(I,J,F){var S=J[0]-F[0]*I.k,V=J[1]-F[1]*I.k;return S===I.x&&V===I.y?I:new qe(I.k,S,V)}function k(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function eA(I,J,F,S){I.on("start.zoom",function(){Y(this,arguments).event(S).start()}).on("interrupt.zoom end.zoom",function(){Y(this,arguments).event(S).end()}).tween("zoom",function(){var V=this,O=arguments,z=Y(V,O).event(S),q=A.apply(V,O),rA=F==null?k(q):typeof F=="function"?F.apply(V,O):F,uA=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),FA=V.__zoom,P=typeof J=="function"?J.apply(V,O):J,W=h(FA.invert(rA).concat(uA/FA.k),P.invert(rA).concat(uA/P.k));return function(X){if(X===1)X=P;else{var oA=W(X),hA=uA/oA[2];X=new qe(hA,rA[0]-oA[0]*hA,rA[1]-oA[1]*hA)}z.zoom(null,X)}})}function Y(I,J,F){return!F&&I.__zooming||new sA(I,J)}function sA(I,J){this.that=I,this.args=J,this.active=0,this.sourceEvent=null,this.extent=A.apply(I,J),this.taps=0}sA.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,J){return this.mouse&&I!=="mouse"&&(this.mouse[1]=J.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=J.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=J.invert(this.touch1[0])),this.that.__zoom=J,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var J=Ne(this.that).datum();g.call(I,this.that,new Hh(I,{sourceEvent:this.sourceEvent,target:L,type:I,transform:this.that.__zoom,dispatch:g}),J)}};function lA(I,...J){if(!e.apply(this,arguments))return;var F=Y(this,J).event(I),S=this.__zoom,V=Math.max(a[0],Math.min(a[1],S.k*Math.pow(2,n.apply(this,arguments)))),O=Oe(I);if(F.wheel)(F.mouse[0][0]!==O[0]||F.mouse[0][1]!==O[1])&&(F.mouse[1]=S.invert(F.mouse[0]=O)),clearTimeout(F.wheel);else{if(S.k===V)return;F.mouse=[O,S.invert(O)],vr(this),F.start()}In(I),F.wheel=setTimeout(z,Q),F.zoom("mouse",t(U(R(S,V),F.mouse[0],F.mouse[1]),F.extent,u));function z(){F.wheel=null,F.end()}}function nA(I,...J){if(m||!e.apply(this,arguments))return;var F=I.currentTarget,S=Y(this,J,!0).event(I),V=Ne(I.view).on("mousemove.zoom",rA,!0).on("mouseup.zoom",uA,!0),O=Oe(I,F),z=I.clientX,q=I.clientY;Hs(I.view),ei(I),S.mouse=[O,this.__zoom.invert(O)],vr(this),S.start();function rA(FA){if(In(FA),!S.moved){var P=FA.clientX-z,W=FA.clientY-q;S.moved=P*P+W*W>H}S.event(FA).zoom("mouse",t(U(S.that.__zoom,S.mouse[0]=Oe(FA,F),S.mouse[1]),S.extent,u))}function uA(FA){V.on("mousemove.zoom mouseup.zoom",null),Is(FA.view,S.moved),In(FA),S.event(FA).end()}}function tA(I,...J){if(e.apply(this,arguments)){var F=this.__zoom,S=Oe(I.changedTouches?I.changedTouches[0]:I,this),V=F.invert(S),O=F.k*(I.shiftKey?.5:2),z=t(U(R(F,O),S,V),A.apply(this,J),u);In(I),d>0?Ne(this).transition().duration(d).call(eA,z,S,I):Ne(this).call(L.transform,z,S,I)}}function AA(I,...J){if(e.apply(this,arguments)){var F=I.touches,S=F.length,V=Y(this,J,I.changedTouches.length===S).event(I),O,z,q,rA;for(ei(I),z=0;z<S;++z)q=F[z],rA=Oe(q,this),rA=[rA,this.__zoom.invert(rA),q.identifier],V.touch0?!V.touch1&&V.touch0[2]!==rA[2]&&(V.touch1=rA,V.taps=0):(V.touch0=rA,O=!0,V.taps=1+!!B);B&&(B=clearTimeout(B)),O&&(V.taps<2&&(w=rA[0],B=setTimeout(function(){B=null},v)),vr(this),V.start())}}function T(I,...J){if(this.__zooming){var F=Y(this,J).event(I),S=I.changedTouches,V=S.length,O,z,q,rA;for(In(I),O=0;O<V;++O)z=S[O],q=Oe(z,this),F.touch0&&F.touch0[2]===z.identifier?F.touch0[0]=q:F.touch1&&F.touch1[2]===z.identifier&&(F.touch1[0]=q);if(z=F.that.__zoom,F.touch1){var uA=F.touch0[0],FA=F.touch0[1],P=F.touch1[0],W=F.touch1[1],X=(X=P[0]-uA[0])*X+(X=P[1]-uA[1])*X,oA=(oA=W[0]-FA[0])*oA+(oA=W[1]-FA[1])*oA;z=R(z,Math.sqrt(X/oA)),q=[(uA[0]+P[0])/2,(uA[1]+P[1])/2],rA=[(FA[0]+W[0])/2,(FA[1]+W[1])/2]}else if(F.touch0)q=F.touch0[0],rA=F.touch0[1];else return;F.zoom("touch",t(U(z,q,rA),F.extent,u))}}function aA(I,...J){if(this.__zooming){var F=Y(this,J).event(I),S=I.changedTouches,V=S.length,O,z;for(ei(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},v),O=0;O<V;++O)z=S[O],F.touch0&&F.touch0[2]===z.identifier?delete F.touch0:F.touch1&&F.touch1[2]===z.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(z=Oe(z,this),Math.hypot(w[0]-z[0],w[1]-z[1])<N)){var q=Ne(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return L.wheelDelta=function(I){return arguments.length?(n=typeof I=="function"?I:yr(+I),L):n},L.filter=function(I){return arguments.length?(e=typeof I=="function"?I:yr(!!I),L):e},L.touchable=function(I){return arguments.length?(o=typeof I=="function"?I:yr(!!I),L):o},L.extent=function(I){return arguments.length?(A=typeof I=="function"?I:yr([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),L):A},L.scaleExtent=function(I){return arguments.length?(a[0]=+I[0],a[1]=+I[1],L):[a[0],a[1]]},L.translateExtent=function(I){return arguments.length?(u[0][0]=+I[0][0],u[1][0]=+I[1][0],u[0][1]=+I[0][1],u[1][1]=+I[1][1],L):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},L.constrain=function(I){return arguments.length?(t=I,L):t},L.duration=function(I){return arguments.length?(d=+I,L):d},L.interpolate=function(I){return arguments.length?(h=I,L):h},L.on=function(){var I=g.on.apply(g,arguments);return I===g?L:I},L.clickDistance=function(I){return arguments.length?(H=(I=+I)*I,L):Math.sqrt(H)},L.tapDistance=function(I){return arguments.length?(N=+I,L):N},L}var IA=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(IA||{}),ti=(e=>(e.Partial="partial",e.Full="full",e))(ti||{}),Dt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Dt||{}),At=(e=>(e.Strict="strict",e.Loose="loose",e))(At||{}),et=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(et||{}),_n=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(_n||{}),ra=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(ra||{}),Lh=["INPUT","SELECT","TEXTAREA"],Th=typeof document<"u"?document:null;function ni(e){var A,t;const n=((t=(A=e.composedPath)==null?void 0:A.call(e))==null?void 0:t[0])||e.target,o=typeof n?.hasAttribute=="function"?n.hasAttribute("contenteditable"):!1,a=typeof n?.closest=="function"?n.closest(".nokey"):null;return Lh.includes(n?.nodeName)||o||!!a}function kh(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function oa(e,A,t,n){const o=A.replace("+",`
2
2
  `).replace(`
3
3
 
4
4
  `,`
@@ -23,13 +23,13 @@ Edge: ${e}
23
23
  Source: ${A}
24
24
  Target: ${t}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
25
25
  Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
26
- Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"},ce=class extends Error{constructor(e,...A){var t;super((t=Sa[e])==null?void 0:t.call(Sa,...A)),this.name="VueFlowError",this.code=e,this.args=A}};function si(e){return"clientX"in e}function nB(e){return"sourceEvent"in e}function Ge(e,A){const t=si(e);let n,o;return t?(n=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(n=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(n=0,o=0),{x:n-(A?.left??0),y:o-(A?.top??0)}}var br=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function rB(e){var A,t;return{width:((A=e.dimensions)==null?void 0:A.width)??e.width??0,height:((t=e.dimensions)==null?void 0:t.height)??e.height??0}}function Hr(e,A=[1,1]){return{x:A[0]*Math.round(e.x/A[0]),y:A[1]*Math.round(e.y/A[1])}}var oB=()=>!0;function ai(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function iB(e,A,t){const n=[],o={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of A.values())Er(o,Qr(a))>0&&n.push(a);return n}var sB=250;function aB(e,A,t,n){var o,a;let u=[],d=Number.POSITIVE_INFINITY;const h=iB(e,t,A+sB);for(const g of h){const B=[...((o=g.handleBounds)==null?void 0:o.source)??[],...((a=g.handleBounds)==null?void 0:a.target)??[]];for(const w of B){if(n.nodeId===w.nodeId&&n.type===w.type&&n.id===w.id)continue;const{x:m,y:v}=qt(g,w,w.position,!0),Q=Math.sqrt((m-e.x)**2+(v-e.y)**2);Q>A||(Q<d?(u=[{...w,x:m,y:v}],d=Q):Q===d&&u.push({...w,x:m,y:v}))}}if(!u.length)return null;if(u.length>1){const g=n.type==="source"?"target":"source";return u.find(B=>B.type===g)??u[0]}return u[0]}function xa(e,{handle:A,connectionMode:t,fromNodeId:n,fromHandleId:o,fromType:a,doc:u,lib:d,flowId:h,isValidConnection:g=oB},B,w,m,v){const Q=a==="target",H=A?u.querySelector(`.${d}-flow__handle[data-id="${h}-${A?.nodeId}-${A?.id}-${A?.type}"]`):null,{x:N,y:T}=Ge(e),M=u.elementFromPoint(N,T),U=M?.classList.contains(`${d}-flow__handle`)?M:H,K={handleDomNode:U,isValid:!1,connection:null,toHandle:null};if(U){const eA=Da(void 0,U),W=U.getAttribute("data-nodeid"),iA=U.getAttribute("data-handleid"),lA=U.classList.contains("connectable"),nA=U.classList.contains("connectableend");if(!W||!eA)return K;const tA={source:Q?W:n,sourceHandle:Q?iA:o,target:Q?n:W,targetHandle:Q?o:iA};K.connection=tA,K.isValid=lA&&nA&&(t===At.Strict?Q&&eA==="source"||!Q&&eA==="target":W!==n||iA!==o)&&g(tA,{nodes:w,edges:B,sourceNode:m(tA.source),targetNode:m(tA.target)}),K.toHandle=Na(W,eA,iA,v,t,!0)}return K}function Da(e,A){return e||(A?.classList.contains("target")?"target":A?.classList.contains("source")?"source":null)}function lB(e,A){let t=null;return A?t="valid":e&&!A&&(t="invalid"),t}function cB(e,A){let t=null;return A?t=!0:e&&!A&&(t=!1),t}function Na(e,A,t,n,o,a=!1){var u,d,h;const g=n.get(e);if(!g)return null;const B=o===At.Strict?(u=g.handleBounds)==null?void 0:u[A]:[...((d=g.handleBounds)==null?void 0:d.source)??[],...((h=g.handleBounds)==null?void 0:h.target)??[]],w=(t?B?.find(m=>m.id===t):B?.[0])??null;return w&&a?{...w,...qt(g,w,w.position,!0)}:w}var li={[IA.Left]:IA.Right,[IA.Right]:IA.Left,[IA.Top]:IA.Bottom,[IA.Bottom]:IA.Top},uB=["production","prod"];function Tn(e,...A){La()&&console.warn(`[Vue Flow]: ${e}`,...A)}function La(){return!uB.includes(process.env.NODE_ENV||"")}function Ta(e,A,t,n,o){const a=A.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(u=>{const d=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:o,position:u.getAttribute("data-handlepos"),x:(d.left-t.left)/n,y:(d.top-t.top)/n,...Ur(u)}}):null}function ci(e,A,t,n,o,a=!1,u){o.value=!1,e.selected?(a||e.selected&&A)&&(n([e]),(0,r.nextTick)(()=>{u.blur()})):t([e])}function se(e){return typeof(0,r.unref)(e)<"u"}function dB(e,A,t,n){if(!e||!e.source||!e.target)return t(new ce(ie.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let o;return ft(e)?o=e:o={...e,id:fa(e)},o=ua(o,void 0,n),zh(o,A)?!1:o}function fB(e,A,t,n,o){if(!A.source||!A.target)return o(new ce(ie.EDGE_INVALID,e.id)),!1;if(!t)return o(new ce(ie.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...u}=e;return{...u,id:n?fa(A):a,source:A.source,target:A.target,sourceHandle:A.sourceHandle,targetHandle:A.targetHandle}}function ka(e,A,t){const n={},o=[];for(let a=0;a<e.length;++a){const u=e[a];if(!Lt(u)){t(new ce(ie.NODE_INVALID,u?.id));continue}const d=Vh(u,A(u.id),u.parentNode);u.parentNode&&(n[u.parentNode]=!0),o[a]=d}for(const a of o){const u=A(a.parentNode)||o.find(d=>d.id===a.parentNode);a.parentNode&&!u&&t(new ce(ie.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||n[a.id])&&(n[a.id]&&(a.isParent=!0),u&&(u.isParent=!0))}return o}function Ma(e,A,t,n,o,a){let u=o;const d=n.get(u)||new Map;n.set(u,d.set(t,A)),u=`${o}-${e}`;const h=n.get(u)||new Map;if(n.set(u,h.set(t,A)),a){u=`${o}-${e}-${a}`;const g=n.get(u)||new Map;n.set(u,g.set(t,A))}}function ui(e,A,t){e.clear();for(const n of t){const{source:o,target:a,sourceHandle:u=null,targetHandle:d=null}=n,h={edgeId:n.id,source:o,target:a,sourceHandle:u,targetHandle:d},g=`${o}-${u}--${a}-${d}`;Ma("source",h,`${a}-${d}--${o}-${u}`,e,o,u),Ma("target",h,g,e,a,d)}}function Ka(e,A){if(e.size!==A.size)return!1;for(const t of e)if(!A.has(t))return!1;return!0}function di(e,A,t,n,o,a,u,d){const h=[];for(const g of e){const B=ft(g)?g:dB(g,d,o,a);if(!B)continue;const w=t(B.source),m=t(B.target);if(!w||!m){o(new ce(ie.EDGE_SOURCE_TARGET_MISSING,B.id,B.source,B.target));continue}if(!w){o(new ce(ie.EDGE_SOURCE_MISSING,B.id,B.source));continue}if(!m){o(new ce(ie.EDGE_TARGET_MISSING,B.id,B.target));continue}if(A&&!A(B,{edges:d,nodes:u,sourceNode:w,targetNode:m})){o(new ce(ie.EDGE_INVALID,B.id));continue}const v=n(B.id);h.push({...ua(B,v,a),sourceNode:w,targetNode:m})}return h}var Oa=Symbol("vueFlow"),Ra=Symbol("nodeId"),Va=Symbol("nodeRef"),gB=Symbol("edgeId"),hB=Symbol("edgeRef"),Ir=Symbol("slots");function Pa(e){const{vueFlowRef:A,snapToGrid:t,snapGrid:n,noDragClassName:o,nodeLookup:a,nodeExtent:u,nodeDragThreshold:d,viewport:h,autoPanOnNodeDrag:g,autoPanSpeed:B,nodesDraggable:w,panBy:m,findNode:v,multiSelectionActive:Q,nodesSelectionActive:H,selectNodesOnDrag:N,removeSelectedElements:T,addSelectedNodes:M,updateNodePositions:U,emits:K}=YA(),{onStart:eA,onDrag:W,onStop:iA,onClick:lA,el:nA,disabled:tA,id:q,selectable:k,dragHandle:sA}=e,I=(0,r.shallowRef)(!1);let Y=[],F,S=null,P={x:void 0,y:void 0},R={x:0,y:0},z=null,J=!1,rA=!1,dA=0,bA=!1;const AA=mB(),cA=({x:aA,y:wA})=>{P={x:aA,y:wA};let _=!1;if(Y=Y.map(b=>{const D={x:aA-b.distance.x,y:wA-b.distance.y},{computedPosition:X}=ii(b,t.value?Hr(D,n.value):D,K.error,u.value,b.parentNode?v(b.parentNode):void 0);return _=_||b.position.x!==X.x||b.position.y!==X.y,b.position=X,b}),rA=rA||_,!!_&&(U(Y,!0,!0),I.value=!0,z)){const[b,D]=oi({id:q,dragItems:Y,findNode:v});W({event:z,node:b,nodes:D})}},V=()=>{if(!S)return;const[aA,wA]=ya(R,S,B.value);if(aA!==0||wA!==0){const _={x:(P.x??0)-aA/h.value.zoom,y:(P.y??0)-wA/h.value.zoom};m({x:aA,y:wA})&&cA(_)}dA=requestAnimationFrame(V)},$=(aA,wA)=>{J=!0;const _=v(q);!N.value&&!Q.value&&_&&(_.selected||T()),_&&(0,r.toValue)(k)&&N.value&&ci(_,Q.value,M,T,H,!1,wA);const b=AA(aA.sourceEvent);if(P=b,Y=Zh(a.value,w.value,b,q),Y.length){const[D,X]=oi({id:q,dragItems:Y,findNode:v});eA({event:aA.sourceEvent,node:D,nodes:X})}},uA=(aA,wA)=>{var _;aA.sourceEvent.type==="touchmove"&&aA.sourceEvent.touches.length>1||(rA=!1,d.value===0&&$(aA,wA),P=AA(aA.sourceEvent),S=((_=A.value)==null?void 0:_.getBoundingClientRect())||null,R=Ge(aA.sourceEvent,S))},BA=(aA,wA)=>{const _=AA(aA.sourceEvent);if(!bA&&J&&g.value&&(bA=!0,V()),!J){const b=_.xSnapped-(P.x??0),D=_.ySnapped-(P.y??0);Math.sqrt(b*b+D*D)>d.value&&$(aA,wA)}(P.x!==_.xSnapped||P.y!==_.ySnapped)&&Y.length&&J&&(z=aA.sourceEvent,R=Ge(aA.sourceEvent,S),cA(_))},HA=aA=>{let wA=!1;if(!J&&!I.value&&!Q.value){const _=aA.sourceEvent,b=AA(_),D=b.xSnapped-(P.x??0),X=b.ySnapped-(P.y??0),L=Math.sqrt(D*D+X*X);L!==0&&L<=d.value&&(lA?.(_),wA=!0)}if(Y.length&&!wA){rA&&(U(Y,!1,!1),rA=!1);const[_,b]=oi({id:q,dragItems:Y,findNode:v});iA({event:aA.sourceEvent,node:_,nodes:b})}Y=[],I.value=!1,bA=!1,J=!1,P={x:void 0,y:void 0},cancelAnimationFrame(dA)};return(0,r.watch)([()=>(0,r.toValue)(tA),nA],([aA,wA],_,b)=>{if(wA){const D=Ne(wA);aA||(F=Rf().on("start",X=>uA(X,wA)).on("drag",X=>BA(X,wA)).on("end",X=>HA(X)).filter(X=>{const L=X.target,pA=(0,r.toValue)(sA);return!X.button&&(!o.value||!Ha(L,`.${o.value}`,wA)&&(!pA||Ha(L,pA,wA)))}),D.call(F)),b(()=>{D.on(".drag",null),F&&(F.on("start",null),F.on("drag",null),F.on("end",null))})}}),I}function BB(){return{doubleClick:QA(),click:QA(),mouseEnter:QA(),mouseMove:QA(),mouseLeave:QA(),contextMenu:QA(),updateStart:QA(),update:QA(),updateEnd:QA()}}function pB(e,A){const t=BB();return t.doubleClick.on(n=>{var o,a;A.edgeDoubleClick(n),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,n)}),t.click.on(n=>{var o,a;A.edgeClick(n),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,n)}),t.mouseEnter.on(n=>{var o,a;A.edgeMouseEnter(n),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,n)}),t.mouseMove.on(n=>{var o,a;A.edgeMouseMove(n),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,n)}),t.mouseLeave.on(n=>{var o,a;A.edgeMouseLeave(n),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,n)}),t.contextMenu.on(n=>{var o,a;A.edgeContextMenu(n),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,n)}),t.updateStart.on(n=>{var o,a;A.edgeUpdateStart(n),(a=(o=e.events)==null?void 0:o.updateStart)==null||a.call(o,n)}),t.update.on(n=>{var o,a;A.edgeUpdate(n),(a=(o=e.events)==null?void 0:o.update)==null||a.call(o,n)}),t.updateEnd.on(n=>{var o,a;A.edgeUpdateEnd(n),(a=(o=e.events)==null?void 0:o.updateEnd)==null||a.call(o,n)}),Object.entries(t).reduce((n,[o,a])=>(n.emit[o]=a.trigger,n.on[o]=a.on,n),{emit:{},on:{}})}function mB(){const{viewport:e,snapGrid:A,snapToGrid:t,vueFlowRef:n}=YA();return o=>{var a;const u=((a=n.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},{x:d,y:h}=Ge(nB(o)?o.sourceEvent:o,u),g=Nn({x:d,y:h},e.value),{x:B,y:w}=t.value?Hr(g,A.value):g;return{xSnapped:B,ySnapped:w,...g}}}function _r(){return!0}function Ga({handleId:e,nodeId:A,type:t,isValidConnection:n,edgeUpdaterType:o,onEdgeUpdate:a,onEdgeUpdateEnd:u}){const{id:d,vueFlowRef:h,connectionMode:g,connectionRadius:B,connectOnClick:w,connectionClickStartHandle:m,nodesConnectable:v,autoPanOnConnect:Q,autoPanSpeed:H,findNode:N,panBy:T,startConnection:M,updateConnection:U,endConnection:K,emits:eA,viewport:W,edges:iA,nodes:lA,isValidConnection:nA,nodeLookup:tA}=YA();let q=null,k=!1,sA=null;function I(F){var S;const P=(0,r.toValue)(t)==="target",R=si(F),z=ca(F.target),J=F.currentTarget;if(J&&(R&&F.button===0||!R)){let rA=function(FA){_=Ge(FA,HA),cA=aB(Nn(_,W.value,!1,[1,1]),B.value,tA.value,X),b||(D(),b=!0);const CA=xa(FA,{handle:cA,connectionMode:g.value,fromNodeId:(0,r.toValue)(A),fromHandleId:(0,r.toValue)(e),fromType:P?"target":"source",isValidConnection:AA,doc:z,lib:"vue",flowId:d,nodeLookup:tA.value},iA.value,lA.value,N,tA.value);sA=CA.handleDomNode,q=CA.connection,k=cB(!!cA,CA.isValid);const LA={...fA,isValid:k,to:CA.toHandle&&k?Dn({x:CA.toHandle.x,y:CA.toHandle.y},W.value):_,toHandle:CA.toHandle,toPosition:k&&CA.toHandle?CA.toHandle.position:li[X.position],toNode:CA.toHandle?tA.value.get(CA.toHandle.nodeId):null};if(k&&cA&&fA?.toHandle&&LA.toHandle&&fA.toHandle.type===LA.toHandle.type&&fA.toHandle.nodeId===LA.toHandle.nodeId&&fA.toHandle.id===LA.toHandle.id&&fA.to.x===LA.to.x&&fA.to.y===LA.to.y)return;const KA=cA??CA.toHandle;if(U(KA&&k?Dn({x:KA.x,y:KA.y},W.value):_,KA,lB(!!KA,k)),fA=LA,!cA&&!k&&!sA)return ai(wA);q&&q.source!==q.target&&sA&&(ai(wA),wA=sA,sA.classList.add("connecting","vue-flow__handle-connecting"),sA.classList.toggle("valid",!!k),sA.classList.toggle("vue-flow__handle-valid",!!k))},dA=function(FA){"touches"in FA&&FA.touches.length>0||((cA||sA)&&q&&k&&(a?a(FA,q):eA.connect(q)),eA.connectEnd(FA),o&&u?.(FA),ai(wA),cancelAnimationFrame(V),K(FA),b=!1,k=!1,q=null,sA=null,z.removeEventListener("mousemove",rA),z.removeEventListener("mouseup",dA),z.removeEventListener("touchmove",rA),z.removeEventListener("touchend",dA))};const bA=N((0,r.toValue)(A));let AA=(0,r.toValue)(n)||nA.value||_r;!AA&&bA&&(AA=(P?bA.isValidSourcePos:bA.isValidTargetPos)||_r);let cA,V=0;const{x:$,y:uA}=Ge(F),BA=Da((0,r.toValue)(o),J),HA=(S=h.value)==null?void 0:S.getBoundingClientRect();if(!HA||!BA)return;const aA=Na((0,r.toValue)(A),BA,(0,r.toValue)(e),tA.value,g.value);if(!aA)return;let wA,_=Ge(F,HA),b=!1;const D=()=>{if(!Q.value)return;const[FA,CA]=ya(_,HA,H.value);T({x:FA,y:CA}),V=requestAnimationFrame(D)},X={...aA,nodeId:(0,r.toValue)(A),type:BA,position:aA.position},L=tA.value.get((0,r.toValue)(A)),pA={inProgress:!0,isValid:null,from:qt(L,X,IA.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:L,to:_,toHandle:null,toPosition:li[X.position],toNode:null};M({nodeId:(0,r.toValue)(A),id:(0,r.toValue)(e),type:BA,position:J?.getAttribute("data-handlepos")||IA.Top,..._},{x:$-HA.left,y:uA-HA.top}),eA.connectStart({event:F,nodeId:(0,r.toValue)(A),handleId:(0,r.toValue)(e),handleType:BA});let fA=pA;z.addEventListener("mousemove",rA),z.addEventListener("mouseup",dA),z.addEventListener("touchmove",rA),z.addEventListener("touchend",dA)}}function Y(F){var S,P;if(!w.value)return;const R=(0,r.toValue)(t)==="target";if(!m.value){eA.clickConnectStart({event:F,nodeId:(0,r.toValue)(A),handleId:(0,r.toValue)(e)}),M({nodeId:(0,r.toValue)(A),type:(0,r.toValue)(t),id:(0,r.toValue)(e),position:IA.Top,...Ge(F)},void 0,!0);return}let z=(0,r.toValue)(n)||nA.value||_r;const J=N((0,r.toValue)(A));if(!z&&J&&(z=(R?J.isValidSourcePos:J.isValidTargetPos)||_r),J&&(typeof J.connectable>"u"?v.value:J.connectable)===!1)return;const rA=ca(F.target),dA=xa(F,{handle:{nodeId:(0,r.toValue)(A),id:(0,r.toValue)(e),type:(0,r.toValue)(t),position:IA.Top,...Ge(F)},connectionMode:g.value,fromNodeId:m.value.nodeId,fromHandleId:m.value.id??null,fromType:m.value.type,isValidConnection:z,doc:rA,lib:"vue",flowId:d,nodeLookup:tA.value},iA.value,lA.value,N,tA.value),bA=((S=dA.connection)==null?void 0:S.source)===((P=dA.connection)==null?void 0:P.target);dA.isValid&&dA.connection&&!bA&&eA.connect(dA.connection),eA.clickConnectEnd(F),K(F,!0)}return{handlePointerDown:I,handleClick:Y}}function wB(){return(0,r.inject)(Ra,"")}function za(e){const A=e??wB()??"",t=(0,r.inject)(Va,(0,r.ref)(null)),{findNode:n,edges:o,emits:a}=YA(),u=n(A);return u||a.error(new ce(ie.NODE_NOT_FOUND,A)),{id:A,nodeEl:t,node:u,parentNode:(0,r.computed)(()=>n(u.parentNode)),connectedEdges:(0,r.computed)(()=>pa([u],o.value))}}function CB(){return{doubleClick:QA(),click:QA(),mouseEnter:QA(),mouseMove:QA(),mouseLeave:QA(),contextMenu:QA(),dragStart:QA(),drag:QA(),dragStop:QA()}}function vB(e,A){const t=CB();return t.doubleClick.on(n=>{var o,a;A.nodeDoubleClick(n),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,n)}),t.click.on(n=>{var o,a;A.nodeClick(n),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,n)}),t.mouseEnter.on(n=>{var o,a;A.nodeMouseEnter(n),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,n)}),t.mouseMove.on(n=>{var o,a;A.nodeMouseMove(n),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,n)}),t.mouseLeave.on(n=>{var o,a;A.nodeMouseLeave(n),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,n)}),t.contextMenu.on(n=>{var o,a;A.nodeContextMenu(n),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,n)}),t.dragStart.on(n=>{var o,a;A.nodeDragStart(n),(a=(o=e.events)==null?void 0:o.dragStart)==null||a.call(o,n)}),t.drag.on(n=>{var o,a;A.nodeDrag(n),(a=(o=e.events)==null?void 0:o.drag)==null||a.call(o,n)}),t.dragStop.on(n=>{var o,a;A.nodeDragStop(n),(a=(o=e.events)==null?void 0:o.dragStop)==null||a.call(o,n)}),Object.entries(t).reduce((n,[o,a])=>(n.emit[o]=a.trigger,n.on[o]=a.on,n),{emit:{},on:{}})}function Xa(){const{getSelectedNodes:e,nodeExtent:A,updateNodePositions:t,findNode:n,snapGrid:o,snapToGrid:a,nodesDraggable:u,emits:d}=YA();return(h,g=!1)=>{const B=a.value?o.value[0]:5,w=a.value?o.value[1]:5,m=g?4:1,v=h.x*B*m,Q=h.y*w*m,H=[];for(const N of e.value)if(N.draggable||u&&typeof N.draggable>"u"){const{position:T}=ii(N,{x:N.computedPosition.x+v,y:N.computedPosition.y+Q},d.error,A.value,N.parentNode?n(N.parentNode):void 0);H.push({id:N.id,position:T,from:N.position,distance:{x:h.x,y:h.y},dimensions:N.dimensions})}t(H,!0,!1)}}var Sr=.1,yB=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function Bt(){return Tn("Viewport not initialized yet."),Promise.resolve(!1)}var QB={zoomIn:Bt,zoomOut:Bt,zoomTo:Bt,fitView:Bt,setCenter:Bt,fitBounds:Bt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Bt,setTransform:Bt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function EB(e){function A(n,o){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(o?.interpolate==="linear"?En:fr).scaleBy(fi(e.d3Selection,o?.duration,o?.ease,()=>{a(!0)}),n):a(!1)})}function t(n,o,a,u){return new Promise(d=>{var h;const{x:g,y:B}=la({x:-n,y:-o},e.translateExtent),w=Jt.translate(-g,-B).scale(a);e.d3Selection&&e.d3Zoom?(h=e.d3Zoom)==null||h.interpolate(u?.interpolate==="linear"?En:fr).transform(fi(e.d3Selection,u?.duration,u?.ease,()=>{d(!0)}),w):d(!1)})}return(0,r.computed)(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:n=>A(1.2,n),zoomOut:n=>A(1/1.2,n),zoomTo:(n,o)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(o?.interpolate==="linear"?En:fr).scaleTo(fi(e.d3Selection,o?.duration,o?.ease,()=>{a(!0)}),n):a(!1)}),setViewport:(n,o)=>t(n.x,n.y,n.zoom,o),setTransform:(n,o)=>t(n.x,n.y,n.zoom,o),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(n={padding:Sr,includeHiddenNodes:!1,duration:0})=>{var o,a;const u=[];for(const B of e.nodes)B.dimensions.width&&B.dimensions.height&&(n?.includeHiddenNodes||!B.hidden)&&(!((o=n.nodes)!=null&&o.length)||(a=n.nodes)!=null&&a.length&&n.nodes.includes(B.id))&&u.push(B);if(!u.length)return Promise.resolve(!1);const{x:d,y:h,zoom:g}=ma(ha(u),e.dimensions.width,e.dimensions.height,n.minZoom??e.minZoom,n.maxZoom??e.maxZoom,n.padding??Sr);return t(d,h,g,n)},setCenter:(n,o,a)=>{const u=typeof a?.zoom<"u"?a.zoom:e.maxZoom;return t(e.dimensions.width/2-n*u,e.dimensions.height/2-o*u,u,a)},fitBounds:(n,o={padding:Sr})=>{const{x:a,y:u,zoom:d}=ma(n,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding??Sr);return t(a,u,d,o)},project:n=>Nn(n,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:n=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect();return Nn({x:n.x-o,y:n.y-a},e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:n=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect();return Dn({x:n.x+o,y:n.y+a},e.viewport)}return{x:0,y:0}}}:QB)}function fi(e,A=0,t=yB,n=()=>{}){const o=typeof A=="number"&&A>0;return o||n(),o?e.transition().duration(A).ease(t).on("end",n):e}function UB(e,A,t){const n=(0,r.effectScope)(!0);return n.run(()=>{const o=()=>{n.run(()=>{let H,N,T=!!(t.nodes.value.length||t.edges.value.length);H=zt([e.modelValue,()=>{var M,U;return(U=(M=e.modelValue)==null?void 0:M.value)==null?void 0:U.length}],([M])=>{M&&Array.isArray(M)&&(N?.pause(),t.setElements(M),!N&&!T&&M.length?T=!0:N?.resume())}),N=zt([t.nodes,t.edges,()=>t.edges.value.length,()=>t.nodes.value.length],([M,U])=>{var K;(K=e.modelValue)!=null&&K.value&&Array.isArray(e.modelValue.value)&&(H?.pause(),e.modelValue.value=[...M,...U],(0,r.nextTick)(()=>{H?.resume()}))},{immediate:T}),(0,r.onScopeDispose)(()=>{H?.stop(),N?.stop()})})},a=()=>{n.run(()=>{let H,N,T=!!t.nodes.value.length;H=zt([e.nodes,()=>{var M,U;return(U=(M=e.nodes)==null?void 0:M.value)==null?void 0:U.length}],([M])=>{M&&Array.isArray(M)&&(N?.pause(),t.setNodes(M),!N&&!T&&M.length?T=!0:N?.resume())}),N=zt([t.nodes,()=>t.nodes.value.length],([M])=>{var U;(U=e.nodes)!=null&&U.value&&Array.isArray(e.nodes.value)&&(H?.pause(),e.nodes.value=[...M],(0,r.nextTick)(()=>{H?.resume()}))},{immediate:T}),(0,r.onScopeDispose)(()=>{H?.stop(),N?.stop()})})},u=()=>{n.run(()=>{let H,N,T=!!t.edges.value.length;H=zt([e.edges,()=>{var M,U;return(U=(M=e.edges)==null?void 0:M.value)==null?void 0:U.length}],([M])=>{M&&Array.isArray(M)&&(N?.pause(),t.setEdges(M),!N&&!T&&M.length?T=!0:N?.resume())}),N=zt([t.edges,()=>t.edges.value.length],([M])=>{var U;(U=e.edges)!=null&&U.value&&Array.isArray(e.edges.value)&&(H?.pause(),e.edges.value=[...M],(0,r.nextTick)(()=>{H?.resume()}))},{immediate:T}),(0,r.onScopeDispose)(()=>{H?.stop(),N?.stop()})})},d=()=>{n.run(()=>{(0,r.watch)(()=>A.maxZoom,()=>{A.maxZoom&&se(A.maxZoom)&&t.setMaxZoom(A.maxZoom)},{immediate:!0})})},h=()=>{n.run(()=>{(0,r.watch)(()=>A.minZoom,()=>{A.minZoom&&se(A.minZoom)&&t.setMinZoom(A.minZoom)},{immediate:!0})})},g=()=>{n.run(()=>{(0,r.watch)(()=>A.translateExtent,()=>{A.translateExtent&&se(A.translateExtent)&&t.setTranslateExtent(A.translateExtent)},{immediate:!0})})},B=()=>{n.run(()=>{(0,r.watch)(()=>A.nodeExtent,()=>{A.nodeExtent&&se(A.nodeExtent)&&t.setNodeExtent(A.nodeExtent)},{immediate:!0})})},w=()=>{n.run(()=>{(0,r.watch)(()=>A.applyDefault,()=>{se(A.applyDefault)&&(t.applyDefault.value=A.applyDefault)},{immediate:!0})})},m=()=>{n.run(()=>{const H=async N=>{let T=N;typeof A.autoConnect=="function"&&(T=await A.autoConnect(N)),T!==!1&&t.addEdges([T])};(0,r.watch)(()=>A.autoConnect,()=>{se(A.autoConnect)&&(t.autoConnect.value=A.autoConnect)},{immediate:!0}),(0,r.watch)(t.autoConnect,(N,T,M)=>{N?t.onConnect(H):t.hooks.value.connect.off(H),M(()=>{t.hooks.value.connect.off(H)})},{immediate:!0})})},v=()=>{const H=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const N of Object.keys(A)){const T=N;if(!H.includes(T)){const M=(0,r.toRef)(()=>A[T]),U=t[T];(0,r.isRef)(U)&&n.run(()=>{(0,r.watch)(M,K=>{se(K)&&(U.value=K)},{immediate:!0})})}}};o(),a(),u(),h(),d(),g(),B(),w(),m(),v()}),()=>n.stop()}function FB(){return{edgesChange:QA(),nodesChange:QA(),nodeDoubleClick:QA(),nodeClick:QA(),nodeMouseEnter:QA(),nodeMouseMove:QA(),nodeMouseLeave:QA(),nodeContextMenu:QA(),nodeDragStart:QA(),nodeDrag:QA(),nodeDragStop:QA(),nodesInitialized:QA(),miniMapNodeClick:QA(),miniMapNodeDoubleClick:QA(),miniMapNodeMouseEnter:QA(),miniMapNodeMouseMove:QA(),miniMapNodeMouseLeave:QA(),connect:QA(),connectStart:QA(),connectEnd:QA(),clickConnectStart:QA(),clickConnectEnd:QA(),paneReady:QA(),init:QA(),move:QA(),moveStart:QA(),moveEnd:QA(),selectionDragStart:QA(),selectionDrag:QA(),selectionDragStop:QA(),selectionContextMenu:QA(),selectionStart:QA(),selectionEnd:QA(),viewportChangeStart:QA(),viewportChange:QA(),viewportChangeEnd:QA(),paneScroll:QA(),paneClick:QA(),paneContextMenu:QA(),paneMouseEnter:QA(),paneMouseMove:QA(),paneMouseLeave:QA(),edgeContextMenu:QA(),edgeMouseEnter:QA(),edgeMouseMove:QA(),edgeMouseLeave:QA(),edgeDoubleClick:QA(),edgeClick:QA(),edgeUpdateStart:QA(),edgeUpdate:QA(),edgeUpdateEnd:QA(),updateNodeInternals:QA(),error:QA(e=>Tn(e.message))}}function bB(e,A){const t=(0,r.getCurrentInstance)();(0,r.onBeforeMount)(()=>{for(const[o,a]of Object.entries(A.value)){const u=d=>{e(o,d)};a.setEmitter(u),mn(a.removeEmitter),a.setHasEmitListeners(()=>n(o)),mn(a.removeHasEmitListeners)}});function n(o){var a;const u=HB(o);return!!((a=t?.vnode.props)!=null&&a[u])}}function HB(e){const[A,...t]=e.split(":");return`on${A.replace(/(?:^|-)(\w)/g,(n,o)=>o.toUpperCase())}${t.length?`:${t.join(":")}`:""}`}function $a(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:ti.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:_n.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Dt.Bezier,style:{}},connectionMode:At.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:br()?"Meta":"Control",zoomActivationKeyCode:br()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:FB(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}var IB=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function _B(e,A,t){const n=EB(e),o=_=>{const b=_??[];e.hooks.updateNodeInternals.trigger(b)},a=_=>Gh(_,e.nodes,e.edges),u=_=>Ph(_,e.nodes,e.edges),d=_=>pa(_,e.edges),h=({id:_,type:b,nodeId:D})=>{var X;const L=_?`-${b}-${_}`:`-${b}`;return Array.from(((X=e.connectionLookup.get(`${D}${L}`))==null?void 0:X.values())??[])},g=_=>{if(_)return A.value.get(_)},B=_=>{if(_)return t.value.get(_)},w=(_,b,D)=>{var X,L;const pA=[];for(const fA of _){const FA={id:fA.id,type:"position",dragging:D,from:fA.from};if(b&&(FA.position=fA.position,fA.parentNode)){const CA=g(fA.parentNode);FA.position={x:FA.position.x-(((X=CA?.computedPosition)==null?void 0:X.x)??0),y:FA.position.y-(((L=CA?.computedPosition)==null?void 0:L.y)??0)}}pA.push(FA)}pA?.length&&e.hooks.nodesChange.trigger(pA)},m=_=>{if(!e.vueFlowRef)return;const b=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!b)return;const D=window.getComputedStyle(b),{m22:X}=new window.DOMMatrixReadOnly(D.transform),L=[];for(const pA of _){const fA=pA,FA=g(fA.id);if(FA){const CA=Ur(fA.nodeElement);if(CA.width&&CA.height&&(FA.dimensions.width!==CA.width||FA.dimensions.height!==CA.height||fA.forceUpdate)){const LA=fA.nodeElement.getBoundingClientRect();FA.dimensions=CA,FA.handleBounds.source=Ta("source",fA.nodeElement,LA,X,FA.id),FA.handleBounds.target=Ta("target",fA.nodeElement,LA,X,FA.id),L.push({id:FA.id,type:"dimensions",dimensions:CA})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&n.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),L.length&&e.hooks.nodesChange.trigger(L)},v=(_,b)=>{const D=new Set,X=new Set;for(const fA of _)Lt(fA)?D.add(fA.id):ft(fA)&&X.add(fA.id);const L=ht(A.value,D,!0),pA=ht(t.value,X);if(e.multiSelectionActive){for(const fA of D)L.push(gt(fA,b));for(const fA of X)pA.push(gt(fA,b))}L.length&&e.hooks.nodesChange.trigger(L),pA.length&&e.hooks.edgesChange.trigger(pA)},Q=_=>{if(e.multiSelectionActive){const b=_.map(D=>gt(D.id,!0));e.hooks.nodesChange.trigger(b);return}e.hooks.nodesChange.trigger(ht(A.value,new Set(_.map(b=>b.id)),!0)),e.hooks.edgesChange.trigger(ht(t.value))},H=_=>{if(e.multiSelectionActive){const b=_.map(D=>gt(D.id,!0));e.hooks.edgesChange.trigger(b);return}e.hooks.edgesChange.trigger(ht(t.value,new Set(_.map(b=>b.id)))),e.hooks.nodesChange.trigger(ht(A.value,new Set,!0))},N=_=>{v(_,!0)},T=_=>{const b=(_||e.nodes).map(D=>(D.selected=!1,gt(D.id,!1)));e.hooks.nodesChange.trigger(b)},M=_=>{const b=(_||e.edges).map(D=>(D.selected=!1,gt(D.id,!1)));e.hooks.edgesChange.trigger(b)},U=_=>{if(!_||!_.length)return v([],!1);const b=_.reduce((D,X)=>{const L=gt(X.id,!1);return Lt(X)?D.nodes.push(L):D.edges.push(L),D},{nodes:[],edges:[]});b.nodes.length&&e.hooks.nodesChange.trigger(b.nodes),b.edges.length&&e.hooks.edgesChange.trigger(b.edges)},K=_=>{var b;(b=e.d3Zoom)==null||b.scaleExtent([_,e.maxZoom]),e.minZoom=_},eA=_=>{var b;(b=e.d3Zoom)==null||b.scaleExtent([e.minZoom,_]),e.maxZoom=_},W=_=>{var b;(b=e.d3Zoom)==null||b.translateExtent(_),e.translateExtent=_},iA=_=>{e.nodeExtent=_,o()},lA=_=>{var b;(b=e.d3Zoom)==null||b.clickDistance(_)},nA=_=>{e.nodesDraggable=_,e.nodesConnectable=_,e.elementsSelectable=_},tA=_=>{const b=_ instanceof Function?_(e.nodes):_;!e.initialized&&!b.length||(e.nodes=ka(b,g,e.hooks.error.trigger))},q=_=>{const b=_ instanceof Function?_(e.edges):_;if(!e.initialized&&!b.length)return;const D=di(b,e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);ui(e.connectionLookup,t.value,D),e.edges=D},k=_=>{const b=_ instanceof Function?_([...e.nodes,...e.edges]):_;!e.initialized&&!b.length||(tA(b.filter(Lt)),q(b.filter(ft)))},sA=_=>{let b=_ instanceof Function?_(e.nodes):_;b=Array.isArray(b)?b:[b];const D=ka(b,g,e.hooks.error.trigger),X=[];for(const L of D)X.push(Ea(L));X.length&&e.hooks.nodesChange.trigger(X)},I=_=>{let b=_ instanceof Function?_(e.edges):_;b=Array.isArray(b)?b:[b];const D=di(b,e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),X=[];for(const L of D)X.push(Ea(L));X.length&&e.hooks.edgesChange.trigger(X)},Y=(_,b=!0,D=!1)=>{const X=_ instanceof Function?_(e.nodes):_,L=Array.isArray(X)?X:[X],pA=[],fA=[];function FA(LA){const KA=d(LA);for(const XA of KA)(!se(XA.deletable)||XA.deletable)&&fA.push(Fa(XA.id,XA.source,XA.target,XA.sourceHandle,XA.targetHandle))}function CA(LA){const KA=[];for(const XA of e.nodes)XA.parentNode===LA&&KA.push(XA);if(KA.length){for(const XA of KA)pA.push(Ua(XA.id));b&&FA(KA);for(const XA of KA)CA(XA.id)}}for(const LA of L){const KA=typeof LA=="string"?g(LA):LA;KA&&(se(KA.deletable)&&!KA.deletable||(pA.push(Ua(KA.id)),b&&FA([KA]),D&&CA(KA.id)))}fA.length&&e.hooks.edgesChange.trigger(fA),pA.length&&e.hooks.nodesChange.trigger(pA)},F=_=>{const b=_ instanceof Function?_(e.edges):_,D=Array.isArray(b)?b:[b],X=[];for(const L of D){const pA=typeof L=="string"?B(L):L;pA&&(se(pA.deletable)&&!pA.deletable||X.push(Fa(typeof L=="string"?L:L.id,pA.source,pA.target,pA.sourceHandle,pA.targetHandle)))}e.hooks.edgesChange.trigger(X)},S=(_,b,D=!0)=>{const X=B(_.id);if(!X)return!1;const L=e.edges.indexOf(X),pA=fB(_,b,X,D,e.hooks.error.trigger);if(pA){const[fA]=di([pA],e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((FA,CA)=>CA===L?fA:FA),ui(e.connectionLookup,t.value,[fA]),fA}return!1},P=(_,b,D={replace:!1})=>{const X=B(_);if(!X)return;const L=typeof b=="function"?b(X):b;X.data=D.replace?L:{...X.data,...L}},R=_=>Qa(_,e.nodes),z=_=>{const b=Qa(_,e.edges);return ui(e.connectionLookup,t.value,b),b},J=(_,b,D={replace:!1})=>{const X=g(_);if(!X)return;const L=typeof b=="function"?b(X):b;D.replace?e.nodes.splice(e.nodes.indexOf(X),1,L):Object.assign(X,L)},rA=(_,b,D={replace:!1})=>{const X=g(_);if(!X)return;const L=typeof b=="function"?b(X):b;X.data=D.replace?L:{...X.data,...L}},dA=(_,b,D=!1)=>{D?e.connectionClickStartHandle=_:e.connectionStartHandle=_,e.connectionEndHandle=null,e.connectionStatus=null,b&&(e.connectionPosition=b)},bA=(_,b=null,D=null)=>{e.connectionStartHandle&&(e.connectionPosition=_,e.connectionEndHandle=b,e.connectionStatus=D)},AA=(_,b)=>{e.connectionPosition={x:NaN,y:NaN},e.connectionEndHandle=null,e.connectionStatus=null,b?e.connectionClickStartHandle=null:e.connectionStartHandle=null},cA=_=>{const b=Rh(_),D=b?null:xn(_)?_:g(_.id);return!b&&!D?[null,null,b]:[b?_:Qr(D),D,b]},V=(_,b=!0,D=e.nodes)=>{const[X,L,pA]=cA(_);if(!X)return[];const fA=[];for(const FA of D||e.nodes){if(!pA&&(FA.id===L.id||!FA.computedPosition))continue;const CA=Qr(FA),LA=Er(CA,X);(b&&LA>0||LA>=CA.width*CA.height||LA>=Number(X.width)*Number(X.height))&&fA.push(FA)}return fA},$=(_,b,D=!0)=>{const[X]=cA(_);if(!X)return!1;const L=Er(X,b);return D&&L>0||L>=Number(X.width)*Number(X.height)},uA=_=>{const{viewport:b,dimensions:D,d3Zoom:X,d3Selection:L,translateExtent:pA}=e;if(!X||!L||!_.x&&!_.y)return!1;const fA=Jt.translate(b.x+_.x,b.y+_.y).scale(b.zoom),FA=[[0,0],[D.width,D.height]],CA=X.constrain()(fA,FA,pA),LA=e.viewport.x!==CA.x||e.viewport.y!==CA.y||e.viewport.zoom!==CA.k;return X.transform(L,CA),LA},BA=_=>{const b=_ instanceof Function?_(e):_,D=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];se(b.defaultEdgeOptions)&&(e.defaultEdgeOptions=b.defaultEdgeOptions);const X=b.modelValue||b.nodes||b.edges?[]:void 0;X&&(b.modelValue&&X.push(...b.modelValue),b.nodes&&X.push(...b.nodes),b.edges&&X.push(...b.edges),k(X));const L=()=>{se(b.maxZoom)&&eA(b.maxZoom),se(b.minZoom)&&K(b.minZoom),se(b.translateExtent)&&W(b.translateExtent)};for(const pA of Object.keys(b)){const fA=pA,FA=b[fA];![...IB,...D].includes(fA)&&se(FA)&&(e[fA]=FA)}Lo(()=>e.d3Zoom).not.toBeNull().then(L),e.initialized||(e.initialized=!0)};return{updateNodePositions:w,updateNodeDimensions:m,setElements:k,setNodes:tA,setEdges:q,addNodes:sA,addEdges:I,removeNodes:Y,removeEdges:F,findNode:g,findEdge:B,updateEdge:S,updateEdgeData:P,updateNode:J,updateNodeData:rA,applyEdgeChanges:z,applyNodeChanges:R,addSelectedElements:N,addSelectedNodes:Q,addSelectedEdges:H,setMinZoom:K,setMaxZoom:eA,setTranslateExtent:W,setNodeExtent:iA,setPaneClickDistance:lA,removeSelectedElements:U,removeSelectedNodes:T,removeSelectedEdges:M,startConnection:dA,updateConnection:bA,endConnection:AA,setInteractive:nA,setState:BA,getIntersectingNodes:V,getIncomers:a,getOutgoers:u,getConnectedEdges:d,getHandleConnections:h,isNodeIntersecting:$,panBy:uA,fitView:_=>n.value.fitView(_),zoomIn:_=>n.value.zoomIn(_),zoomOut:_=>n.value.zoomOut(_),zoomTo:(_,b)=>n.value.zoomTo(_,b),setViewport:(_,b)=>n.value.setViewport(_,b),setTransform:(_,b)=>n.value.setTransform(_,b),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(_,b,D)=>n.value.setCenter(_,b,D),fitBounds:(_,b)=>n.value.fitBounds(_,b),project:_=>n.value.project(_),screenToFlowCoordinate:_=>n.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>n.value.flowToScreenCoordinate(_),toObject:()=>{const _=[],b=[];for(const D of e.nodes){const{computedPosition:X,handleBounds:L,selected:pA,dimensions:fA,isParent:FA,resizing:CA,dragging:LA,events:KA,...XA}=D;_.push(XA)}for(const D of e.edges){const{selected:X,sourceNode:L,targetNode:pA,events:fA,...FA}=D;b.push(FA)}return JSON.parse(JSON.stringify({nodes:_,edges:b,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:_=>new Promise(b=>{const{nodes:D,edges:X,position:L,zoom:pA,viewport:fA}=_;D&&tA(D),X&&q(X);const[FA,CA]=fA?.x&&fA?.y?[fA.x,fA.y]:L??[null,null];if(FA&&CA){const LA=fA?.zoom||pA||e.viewport.zoom;return Lo(()=>n.value.viewportInitialized).toBe(!0).then(()=>{n.value.setViewport({x:FA,y:CA,zoom:LA}).then(()=>{b(!0)})})}else b(!0)}),updateNodeInternals:o,viewportHelper:n,$reset:()=>{const _=$a();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const b=Jt.translate(_.defaultViewport.x??0,_.defaultViewport.y??0).scale(Nt(_.defaultViewport.zoom??1,_.minZoom,_.maxZoom)),D=e.viewportRef.getBoundingClientRect(),X=[[0,0],[D.width,D.height]],L=e.d3Zoom.constrain()(b,X,_.translateExtent);e.d3Zoom.transform(e.d3Selection,L)}BA(_)},$destroy:()=>{}}}var SB=["data-id","data-handleid","data-nodeid","data-handlepos"],An=(0,r.defineComponent)({name:"Handle",compatConfig:{MODE:3},props:{id:{default:null},type:{},position:{default:()=>IA.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:A}){const t=(0,r.createPropsRestProxy)(e,["position","connectable","connectableStart","connectableEnd","id"]),n=(0,r.toRef)(()=>t.type??"source"),o=(0,r.toRef)(()=>t.isValidConnection??null),{id:a,connectionStartHandle:u,connectionClickStartHandle:d,connectionEndHandle:h,vueFlowRef:g,nodesConnectable:B,noDragClassName:w,noPanClassName:m}=YA(),{id:v,node:Q,nodeEl:H,connectedEdges:N}=za(),T=(0,r.ref)(),M=(0,r.toRef)(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),U=(0,r.toRef)(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),K=(0,r.toRef)(()=>{var q,k,sA,I,Y,F;return((q=u.value)==null?void 0:q.nodeId)===v&&((k=u.value)==null?void 0:k.id)===e.id&&((sA=u.value)==null?void 0:sA.type)===n.value||((I=h.value)==null?void 0:I.nodeId)===v&&((Y=h.value)==null?void 0:Y.id)===e.id&&((F=h.value)==null?void 0:F.type)===n.value}),eA=(0,r.toRef)(()=>{var q,k,sA;return((q=d.value)==null?void 0:q.nodeId)===v&&((k=d.value)==null?void 0:k.id)===e.id&&((sA=d.value)==null?void 0:sA.type)===n.value}),{handlePointerDown:W,handleClick:iA}=Ga({nodeId:v,handleId:e.id,isValidConnection:o,type:n}),lA=(0,r.computed)(()=>typeof e.connectable=="string"&&e.connectable==="single"?!N.value.some(q=>{const k=q[`${n.value}Handle`];return q[n.value]!==v?!1:k?k===e.id:!0}):typeof e.connectable=="number"?N.value.filter(q=>{const k=q[`${n.value}Handle`];return q[n.value]!==v?!1:k?k===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(Q,N.value):se(e.connectable)?e.connectable:B.value);(0,r.onMounted)(()=>{var q;if(!Q.dimensions.width||!Q.dimensions.height)return;const k=(q=Q.handleBounds[n.value])==null?void 0:q.find(R=>R.id===e.id);if(!g.value||k)return;const sA=g.value.querySelector(".vue-flow__transformationpane");if(!H.value||!T.value||!sA||!e.id)return;const I=H.value.getBoundingClientRect(),Y=T.value.getBoundingClientRect(),F=window.getComputedStyle(sA),{m22:S}=new window.DOMMatrixReadOnly(F.transform),P={id:e.id,position:e.position,x:(Y.left-I.left)/S,y:(Y.top-I.top)/S,type:n.value,nodeId:v,...Ur(T.value)};Q.handleBounds[n.value]=[...Q.handleBounds[n.value]??[],P]});function nA(q){const k=si(q);lA.value&&M.value&&(k&&q.button===0||!k)&&W(q)}function tA(q){!v||!d.value&&!M.value||lA.value&&iA(q)}return A({handleClick:iA,handlePointerDown:W,onClick:tA,onPointerDown:nA}),(q,k)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"handle",ref:T,"data-id":`${(0,r.unref)(a)}-${(0,r.unref)(v)}-${e.id}-${n.value}`,"data-handleid":e.id,"data-nodeid":(0,r.unref)(v),"data-handlepos":q.position,class:(0,r.normalizeClass)(["vue-flow__handle",[`vue-flow__handle-${q.position}`,`vue-flow__handle-${e.id}`,(0,r.unref)(w),(0,r.unref)(m),n.value,{connectable:lA.value,connecting:eA.value,connectablestart:M.value,connectableend:U.value,connectionindicator:lA.value&&(M.value&&!K.value||U.value&&K.value)}]]),onMousedown:nA,onTouchstartPassive:nA,onClick:tA},[(0,r.renderSlot)(q.$slots,"default",{id:q.id})],42,SB))}}),xr=function({sourcePosition:e=IA.Bottom,targetPosition:A=IA.Top,label:t,connectable:n=!0,isValidTargetPos:o,isValidSourcePos:a,data:u}){const d=u.label??t;return[(0,r.h)(An,{type:"target",position:A,connectable:n,isValidConnection:o}),typeof d!="string"&&d?(0,r.h)(d):(0,r.h)(r.Fragment,[d]),(0,r.h)(An,{type:"source",position:e,connectable:n,isValidConnection:a})]};xr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],xr.inheritAttrs=!1,xr.compatConfig={MODE:3};var xB=xr,Dr=function({targetPosition:e=IA.Top,label:A,connectable:t=!0,isValidTargetPos:n,data:o}){const a=o.label??A;return[(0,r.h)(An,{type:"target",position:e,connectable:t,isValidConnection:n}),typeof a!="string"&&a?(0,r.h)(a):(0,r.h)(r.Fragment,[a])]};Dr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Dr.inheritAttrs=!1,Dr.compatConfig={MODE:3};var DB=Dr,Nr=function({sourcePosition:e=IA.Bottom,label:A,connectable:t=!0,isValidSourcePos:n,data:o}){const a=o.label??A;return[typeof a!="string"&&a?(0,r.h)(a):(0,r.h)(r.Fragment,[a]),(0,r.h)(An,{type:"source",position:e,connectable:t,isValidConnection:n})]};Nr.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Nr.inheritAttrs=!1,Nr.compatConfig={MODE:3};var NB=Nr,LB=["transform"],TB=["width","height","x","y","rx","ry"],kB=["y"],MB=(0,r.defineComponent)({name:"EdgeText",compatConfig:{MODE:3},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const A=(0,r.ref)({x:0,y:0,width:0,height:0}),t=(0,r.ref)(null),n=(0,r.computed)(()=>`translate(${e.x-A.value.width/2} ${e.y-A.value.height/2})`);(0,r.onMounted)(o),(0,r.watch)([()=>e.x,()=>e.y,t,()=>e.label],o);function o(){if(!t.value)return;const a=t.value.getBBox();(a.width!==A.value.width||a.height!==A.value.height)&&(A.value=a)}return(a,u)=>((0,r.openBlock)(),(0,r.createElementBlock)("g",{transform:n.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?((0,r.openBlock)(),(0,r.createElementBlock)("rect",{key:0,class:"vue-flow__edge-textbg",width:`${A.value.width+2*a.labelBgPadding[0]}px`,height:`${A.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:(0,r.normalizeStyle)(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,TB)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("text",(0,r.mergeProps)(a.$attrs,{ref_key:"el",ref:t,class:"vue-flow__edge-text",y:A.value.height/2,dy:"0.3em",style:a.labelStyle}),[(0,r.renderSlot)(a.$slots,"default",{},()=>[typeof a.label!="string"?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(a.label),{key:0})):((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createTextVNode)((0,r.toDisplayString)(a.label),1)],64))])],16,kB)],8,LB))}}),KB=["id","d","marker-end","marker-start"],OB=["d","stroke-width"],kn=(0,r.defineComponent)({name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:A}){const t=(0,r.ref)(null),n=(0,r.ref)(null),o=(0,r.ref)(null),a=(0,r.useAttrs)();return A({pathEl:t,interactionEl:n,labelEl:o}),(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createElementVNode)("path",(0,r.mergeProps)((0,r.unref)(a),{id:u.id,ref_key:"pathEl",ref:t,d:u.path,class:"vue-flow__edge-path","marker-end":u.markerEnd,"marker-start":u.markerStart}),null,16,KB),u.interactionWidth?((0,r.openBlock)(),(0,r.createElementBlock)("path",{key:0,ref_key:"interactionEl",ref:n,fill:"none",d:u.path,"stroke-width":u.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,OB)):(0,r.createCommentVNode)("",!0),u.label&&u.labelX&&u.labelY?((0,r.openBlock)(),(0,r.createBlock)(MB,{key:1,ref_key:"labelEl",ref:o,x:u.labelX,y:u.labelY,label:u.label,"label-show-bg":u.labelShowBg,"label-bg-style":u.labelBgStyle,"label-bg-padding":u.labelBgPadding,"label-bg-border-radius":u.labelBgBorderRadius,"label-style":u.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):(0,r.createCommentVNode)("",!0)],64))}});function Wa({sourceX:e,sourceY:A,targetX:t,targetY:n}){const o=Math.abs(t-e)/2,a=t<e?t+o:t-o,u=Math.abs(n-A)/2;return[a,n<A?n+u:n-u,o,u]}function Ya({sourceX:e,sourceY:A,targetX:t,targetY:n,sourceControlX:o,sourceControlY:a,targetControlX:u,targetControlY:d}){const h=e*.125+o*.375+u*.375+t*.125,g=A*.125+a*.375+d*.375+n*.125;return[h,g,Math.abs(h-e),Math.abs(g-A)]}function Lr(e,A){return e>=0?.5*e:A*25*Math.sqrt(-e)}function Ja({pos:e,x1:A,y1:t,x2:n,y2:o,c:a}){let u,d;switch(e){case IA.Left:u=A-Lr(A-n,a),d=t;break;case IA.Right:u=A+Lr(n-A,a),d=t;break;case IA.Top:u=A,d=t-Lr(t-o,a);break;case IA.Bottom:u=A,d=t+Lr(o-t,a);break}return[u,d]}function gi(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:o,targetY:a,targetPosition:u=IA.Top,curvature:d=.25}=e,[h,g]=Ja({pos:n,x1:A,y1:t,x2:o,y2:a,c:d}),[B,w]=Ja({pos:u,x1:o,y1:a,x2:A,y2:t,c:d}),[m,v,Q,H]=Ya({sourceX:A,sourceY:t,targetX:o,targetY:a,sourceControlX:h,sourceControlY:g,targetControlX:B,targetControlY:w});return[`M${A},${t} C${h},${g} ${B},${w} ${o},${a}`,m,v,Q,H]}function Za({pos:e,x1:A,y1:t,x2:n,y2:o}){let a,u;switch(e){case IA.Left:case IA.Right:a=.5*(A+n),u=t;break;case IA.Top:case IA.Bottom:a=A,u=.5*(t+o);break}return[a,u]}function ja(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:o,targetY:a,targetPosition:u=IA.Top}=e,[d,h]=Za({pos:n,x1:A,y1:t,x2:o,y2:a}),[g,B]=Za({pos:u,x1:o,y1:a,x2:A,y2:t}),[w,m,v,Q]=Ya({sourceX:A,sourceY:t,targetX:o,targetY:a,sourceControlX:d,sourceControlY:h,targetControlX:g,targetControlY:B});return[`M${A},${t} C${d},${h} ${g},${B} ${o},${a}`,w,m,v,Q]}var qa={[IA.Left]:{x:-1,y:0},[IA.Right]:{x:1,y:0},[IA.Top]:{x:0,y:-1},[IA.Bottom]:{x:0,y:1}};function RB({source:e,sourcePosition:A=IA.Bottom,target:t}){return A===IA.Left||A===IA.Right?e.x<t.x?{x:1,y:0}:{x:-1,y:0}:e.y<t.y?{x:0,y:1}:{x:0,y:-1}}function Al(e,A){return Math.sqrt((A.x-e.x)**2+(A.y-e.y)**2)}function VB({source:e,sourcePosition:A=IA.Bottom,target:t,targetPosition:n=IA.Top,center:o,offset:a}){const u=qa[A],d=qa[n],h={x:e.x+u.x*a,y:e.y+u.y*a},g={x:t.x+d.x*a,y:t.y+d.y*a},B=RB({source:h,sourcePosition:A,target:g}),w=B.x!==0?"x":"y",m=B[w];let v,Q,H;const N={x:0,y:0},T={x:0,y:0},[M,U,K,eA]=Wa({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(u[w]*d[w]===-1){Q=o.x??M,H=o.y??U;const W=[{x:Q,y:h.y},{x:Q,y:g.y}],iA=[{x:h.x,y:H},{x:g.x,y:H}];u[w]===m?v=w==="x"?W:iA:v=w==="x"?iA:W}else{const W=[{x:h.x,y:g.y}],iA=[{x:g.x,y:h.y}];if(w==="x"?v=u.x===m?iA:W:v=u.y===m?W:iA,A===n){const tA=Math.abs(e[w]-t[w]);if(tA<=a){const q=Math.min(a-1,a-tA);u[w]===m?N[w]=(h[w]>e[w]?-1:1)*q:T[w]=(g[w]>t[w]?-1:1)*q}}if(A!==n){const tA=w==="x"?"y":"x",q=u[w]===d[tA],k=h[tA]>g[tA],sA=h[tA]<g[tA];(u[w]===1&&(!q&&k||q&&sA)||u[w]!==1&&(!q&&sA||q&&k))&&(v=w==="x"?W:iA)}const lA={x:h.x+N.x,y:h.y+N.y},nA={x:g.x+T.x,y:g.y+T.y};Math.max(Math.abs(lA.x-v[0].x),Math.abs(nA.x-v[0].x))>=Math.max(Math.abs(lA.y-v[0].y),Math.abs(nA.y-v[0].y))?(Q=(lA.x+nA.x)/2,H=v[0].y):(Q=v[0].x,H=(lA.y+nA.y)/2)}return[[e,{x:h.x+N.x,y:h.y+N.y},...v,{x:g.x+T.x,y:g.y+T.y},t],Q,H,K,eA]}function PB(e,A,t,n){const o=Math.min(Al(e,A)/2,Al(A,t)/2,n),{x:a,y:u}=A;if(e.x===a&&a===t.x||e.y===u&&u===t.y)return`L${a} ${u}`;if(e.y===u){const h=e.x<t.x?-1:1,g=e.y<t.y?1:-1;return`L ${a+o*h},${u}Q ${a},${u} ${a},${u+o*g}`}const d=e.x<t.x?1:-1;return`L ${a},${u+o*(e.y<t.y?-1:1)}Q ${a},${u} ${a+o*d},${u}`}function hi(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:o,targetY:a,targetPosition:u=IA.Top,borderRadius:d=5,centerX:h,centerY:g,offset:B=20}=e,[w,m,v,Q,H]=VB({source:{x:A,y:t},sourcePosition:n,target:{x:o,y:a},targetPosition:u,center:{x:h,y:g},offset:B});return[w.reduce((N,T,M)=>{let U;return M>0&&M<w.length-1?U=PB(w[M-1],T,w[M+1],d):U=`${M===0?"M":"L"}${T.x} ${T.y}`,N+=U,N},""),m,v,Q,H]}function GB(e){const{sourceX:A,sourceY:t,targetX:n,targetY:o}=e,[a,u,d,h]=Wa({sourceX:A,sourceY:t,targetX:n,targetY:o});return[`M ${A},${t}L ${n},${o}`,a,u,d,h]}var zB=(0,r.defineComponent)({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=GB(e);return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),el=(0,r.defineComponent)({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=hi({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),XB=(0,r.defineComponent)({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:A}){return()=>(0,r.h)(el,{...e,...A,borderRadius:0})}}),$B=(0,r.defineComponent)({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=gi({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),WB=(0,r.defineComponent)({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=ja({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),YB={input:NB,default:xB,output:DB},JB={default:$B,straight:zB,step:XB,smoothstep:el,simplebezier:WB};function ZB(e,A,t){const n=(0,r.computed)(()=>Q=>A.value.get(Q)),o=(0,r.computed)(()=>Q=>t.value.get(Q)),a=(0,r.computed)(()=>{const Q={...JB,...e.edgeTypes},H=Object.keys(Q);for(const N of e.edges)N.type&&!H.includes(N.type)&&(Q[N.type]=N.type);return Q}),u=(0,r.computed)(()=>{const Q={...YB,...e.nodeTypes},H=Object.keys(Q);for(const N of e.nodes)N.type&&!H.includes(N.type)&&(Q[N.type]=N.type);return Q}),d=(0,r.computed)(()=>e.onlyRenderVisibleElements?Ba(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),h=(0,r.computed)(()=>{if(e.onlyRenderVisibleElements){const Q=[];for(const H of e.edges){const N=A.value.get(H.source),T=A.value.get(H.target);eB({sourcePos:N.computedPosition||{x:0,y:0},targetPos:T.computedPosition||{x:0,y:0},sourceWidth:N.dimensions.width,sourceHeight:N.dimensions.height,targetWidth:T.dimensions.width,targetHeight:T.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&Q.push(H)}return Q}return e.edges}),g=(0,r.computed)(()=>[...d.value,...h.value]),B=(0,r.computed)(()=>{const Q=[];for(const H of e.nodes)H.selected&&Q.push(H);return Q}),w=(0,r.computed)(()=>{const Q=[];for(const H of e.edges)H.selected&&Q.push(H);return Q}),m=(0,r.computed)(()=>[...B.value,...w.value]),v=(0,r.computed)(()=>{const Q=[];for(const H of e.nodes)H.dimensions.width&&H.dimensions.height&&H.handleBounds!==void 0&&Q.push(H);return Q});return{getNode:n,getEdge:o,getElements:g,getEdgeTypes:a,getNodeTypes:u,getEdges:h,getNodes:d,getSelectedElements:m,getSelectedNodes:B,getSelectedEdges:w,getNodesInitialized:v,areNodesInitialized:(0,r.computed)(()=>d.value.length>0&&v.value.length===d.value.length)}}var jB=class hn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var A;const t=(A=(0,r.getCurrentInstance)())==null?void 0:A.appContext.app;return hn.instance=t?.config.globalProperties.$vueFlowStorage??hn.instance??new hn,t&&(t.config.globalProperties.$vueFlowStorage=hn.instance),hn.instance}set(A,t){return this.flows.set(A,t)}get(A){return this.flows.get(A)}remove(A){return this.flows.delete(A)}create(A,t){const n=(0,r.reactive)($a()),o={};for(const[w,m]of Object.entries(n.hooks)){const v=`on${w.charAt(0).toUpperCase()+w.slice(1)}`;o[v]=m.on}const a={};for(const[w,m]of Object.entries(n.hooks))a[w]=m.trigger;const u=(0,r.computed)(()=>{const w=new Map;for(const m of n.nodes)w.set(m.id,m);return w}),d=(0,r.computed)(()=>{const w=new Map;for(const m of n.edges)w.set(m.id,m);return w}),h=ZB(n,u,d),g=_B(n,u,d);g.setState({...n,...t});const B={...o,...h,...g,...Yu(n),nodeLookup:u,edgeLookup:d,emits:a,id:A,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(A)}};return this.set(A,B),B}getId(){return`vue-flow-${this.currentId++}`}};function YA(e){const A=jB.getInstance(),t=(0,r.getCurrentScope)(),n=typeof e=="object",o=n?e:{id:e},a=o.id,u=a??t?.vueFlowId;let d;if(t){const h=(0,r.inject)(Oa,null);typeof h<"u"&&h!==null&&(!u||h.id===u)&&(d=h)}if(d||u&&(d=A.get(u)),!d||u&&d.id!==u){const h=a??A.getId(),g=A.create(h,o);d=g,(t??(0,r.effectScope)(!0)).run(()=>{(0,r.watch)(g.applyDefault,(B,w,m)=>{const v=H=>{g.applyNodeChanges(H)},Q=H=>{g.applyEdgeChanges(H)};B?(g.onNodesChange(v),g.onEdgesChange(Q)):(g.hooks.value.nodesChange.off(v),g.hooks.value.edgesChange.off(Q)),m(()=>{g.hooks.value.nodesChange.off(v),g.hooks.value.edgesChange.off(Q)})},{immediate:!0}),mn(()=>{if(d){const B=A.get(d.id);B?B.$destroy():Tn(`No store instance found for id ${d.id} in storage.`)}})})}else n&&d.setState(o);if(t&&((0,r.provide)(Oa,d),t.vueFlowId=d.id),n){const h=(0,r.getCurrentInstance)();h?.type.name!=="VueFlow"&&d.emits.error(new ce(ie.USEVUEFLOW_OPTIONS))}return d}function qB(e){const{emits:A,dimensions:t}=YA();let n;(0,r.onMounted)(()=>{const o=()=>{var a,u;if(!e.value||!(((u=(a=e.value).checkVisibility)==null?void 0:u.call(a))??!0))return;const d=Ur(e.value);(d.width===0||d.height===0)&&A.error(new ce(ie.MISSING_VIEWPORT_DIMENSIONS)),t.value={width:d.width||500,height:d.height||500}};o(),window.addEventListener("resize",o),e.value&&(n=new ResizeObserver(()=>o()),n.observe(e.value)),(0,r.onBeforeUnmount)(()=>{window.removeEventListener("resize",o),n&&e.value&&n.unobserve(e.value)})})}var Ap=(0,r.defineComponent)({name:"UserSelection",compatConfig:{MODE:3},props:{userSelectionRect:{}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vue-flow__selection vue-flow__container",style:(0,r.normalizeStyle)({width:`${A.userSelectionRect.width}px`,height:`${A.userSelectionRect.height}px`,transform:`translate(${A.userSelectionRect.x}px, ${A.userSelectionRect.y}px)`})},null,4))}}),ep=["tabIndex"],tp=(0,r.defineComponent)({name:"NodesSelection",compatConfig:{MODE:3},setup(e){const{emits:A,viewport:t,getSelectedNodes:n,noPanClassName:o,disableKeyboardA11y:a,userSelectionActive:u}=YA(),d=Xa(),h=(0,r.ref)(null),g=Pa({el:h,onStart(Q){A.selectionDragStart(Q),A.nodeDragStart(Q)},onDrag(Q){A.selectionDrag(Q),A.nodeDrag(Q)},onStop(Q){A.selectionDragStop(Q),A.nodeDragStop(Q)}});(0,r.onMounted)(()=>{var Q;a.value||(Q=h.value)==null||Q.focus({preventScroll:!0})});const B=(0,r.computed)(()=>ha(n.value)),w=(0,r.computed)(()=>({width:`${B.value.width}px`,height:`${B.value.height}px`,top:`${B.value.y}px`,left:`${B.value.x}px`}));function m(Q){A.selectionContextMenu({event:Q,nodes:n.value})}function v(Q){a.value||Zt[Q.key]&&(Q.preventDefault(),d({x:Zt[Q.key].x,y:Zt[Q.key].y},Q.shiftKey))}return(Q,H)=>!(0,r.unref)(u)&&B.value.width&&B.value.height?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["vue-flow__nodesselection vue-flow__container",(0,r.unref)(o)]),style:(0,r.normalizeStyle)({transform:`translate(${(0,r.unref)(t).x}px,${(0,r.unref)(t).y}px) scale(${(0,r.unref)(t).zoom})`})},[(0,r.createElementVNode)("div",{ref_key:"el",ref:h,class:(0,r.normalizeClass)([{dragging:(0,r.unref)(g)},"vue-flow__nodesselection-rect"]),style:(0,r.normalizeStyle)(w.value),tabIndex:(0,r.unref)(a)?void 0:-1,onContextmenu:m,onKeydown:v},null,46,ep)],6)):(0,r.createCommentVNode)("",!0)}});function np(e,A){return{x:e.clientX-A.left,y:e.clientY-A.top}}var rp=(0,r.defineComponent)({name:"Pane",compatConfig:{MODE:3},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:A,nodes:t,viewport:n,emits:o,userSelectionActive:a,removeSelectedElements:u,userSelectionRect:d,elementsSelectable:h,nodesSelectionActive:g,getSelectedEdges:B,getSelectedNodes:w,removeNodes:m,removeEdges:v,selectionMode:Q,deleteKeyCode:H,multiSelectionKeyCode:N,multiSelectionActive:T,edgeLookup:M,nodeLookup:U,connectionLookup:K,defaultEdgeOptions:eA,connectionStartHandle:W,panOnDrag:iA}=YA(),lA=(0,r.shallowRef)(null),nA=(0,r.shallowRef)(new Set),tA=(0,r.shallowRef)(new Set),q=(0,r.shallowRef)(null),k=(0,r.toRef)(()=>h.value&&(e.isSelecting||a.value)),sA=(0,r.toRef)(()=>W.value!==null);let I=!1,Y=!1;const F=Sn(H,{actInsideInputWithModifier:!1}),S=Sn(N);(0,r.watch)(F,AA=>{AA&&(m(w.value),v(B.value),g.value=!1)}),(0,r.watch)(S,AA=>{T.value=AA});function P(AA,cA){return V=>{V.target===cA&&AA?.(V)}}function R(AA){if(I||sA.value){I=!1;return}o.paneClick(AA),u(),g.value=!1}function z(AA){var cA;if(Array.isArray(iA.value)&&((cA=iA.value)!=null&&cA.includes(2))){AA.preventDefault();return}o.paneContextMenu(AA)}function J(AA){o.paneScroll(AA)}function rA(AA){var cA,V,$;if(q.value=((cA=A.value)==null?void 0:cA.getBoundingClientRect())??null,!h.value||!e.isSelecting||AA.button!==0||AA.target!==lA.value||!q.value)return;($=(V=AA.target)==null?void 0:V.setPointerCapture)==null||$.call(V,AA.pointerId);const{x:uA,y:BA}=np(AA,q.value);Y=!0,I=!1,u(),d.value={width:0,height:0,startX:uA,startY:BA,x:uA,y:BA},o.selectionStart(AA)}function dA(AA){var cA;if(!q.value||!d.value)return;I=!0;const{x:V,y:$}=Ge(AA,q.value),{startX:uA=0,startY:BA=0}=d.value,HA={startX:uA,startY:BA,x:V<uA?V:uA,y:$<BA?$:BA,width:Math.abs(V-uA),height:Math.abs($-BA)},aA=nA.value,wA=tA.value;nA.value=new Set(Ba(t.value,HA,n.value,Q.value===ti.Partial,!0).map(b=>b.id)),tA.value=new Set;const _=((cA=eA.value)==null?void 0:cA.selectable)??!0;for(const b of nA.value){const D=K.value.get(b);if(D)for(const{edgeId:X}of D.values()){const L=M.value.get(X);L&&(L.selectable??_)&&tA.value.add(X)}}if(!Ka(aA,nA.value)){const b=ht(U.value,nA.value,!0);o.nodesChange(b)}if(!Ka(wA,tA.value)){const b=ht(M.value,tA.value);o.edgesChange(b)}d.value=HA,a.value=!0,g.value=!1}function bA(AA){var cA;AA.button!==0||!Y||((cA=AA.target)==null||cA.releasePointerCapture(AA.pointerId),!a.value&&d.value&&AA.target===lA.value&&R(AA),a.value=!1,d.value=null,g.value=nA.value.size>0,o.selectionEnd(AA),e.selectionKeyPressed&&(I=!1),Y=!1)}return(AA,cA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"container",ref:lA,class:(0,r.normalizeClass)(["vue-flow__pane vue-flow__container",{selection:AA.isSelecting}]),onClick:cA[0]||(cA[0]=V=>k.value?void 0:P(R,lA.value)(V)),onContextmenu:cA[1]||(cA[1]=V=>P(z,lA.value)(V)),onWheelPassive:cA[2]||(cA[2]=V=>P(J,lA.value)(V)),onPointerenter:cA[3]||(cA[3]=V=>k.value?void 0:(0,r.unref)(o).paneMouseEnter(V)),onPointerdown:cA[4]||(cA[4]=V=>k.value?rA(V):(0,r.unref)(o).paneMouseMove(V)),onPointermove:cA[5]||(cA[5]=V=>k.value?dA(V):(0,r.unref)(o).paneMouseMove(V)),onPointerup:cA[6]||(cA[6]=V=>k.value?bA(V):void 0),onPointerleave:cA[7]||(cA[7]=V=>(0,r.unref)(o).paneMouseLeave(V))},[(0,r.renderSlot)(AA.$slots,"default"),(0,r.unref)(a)&&(0,r.unref)(d)?((0,r.openBlock)(),(0,r.createBlock)(Ap,{key:0,"user-selection-rect":(0,r.unref)(d)},null,8,["user-selection-rect"])):(0,r.createCommentVNode)("",!0),(0,r.unref)(g)&&(0,r.unref)(w).length?((0,r.openBlock)(),(0,r.createBlock)(tp,{key:1})):(0,r.createCommentVNode)("",!0)],34))}}),op=(0,r.defineComponent)({name:"Transform",compatConfig:{MODE:3},setup(e){const{viewport:A,fitViewOnInit:t,fitViewOnInitDone:n}=YA(),o=(0,r.computed)(()=>t.value?!n.value:!1),a=(0,r.computed)(()=>`translate(${A.value.x}px,${A.value.y}px) scale(${A.value.zoom})`);return(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vue-flow__transformationpane vue-flow__container",style:(0,r.normalizeStyle)({transform:a.value,opacity:o.value?0:void 0})},[(0,r.renderSlot)(u.$slots,"default")],4))}}),ip=(0,r.defineComponent)({name:"Viewport",compatConfig:{MODE:3},setup(e){const{minZoom:A,maxZoom:t,defaultViewport:n,translateExtent:o,zoomActivationKeyCode:a,selectionKeyCode:u,panActivationKeyCode:d,panOnScroll:h,panOnScrollMode:g,panOnScrollSpeed:B,panOnDrag:w,zoomOnDoubleClick:m,zoomOnPinch:v,zoomOnScroll:Q,preventScrolling:H,noWheelClassName:N,noPanClassName:T,emits:M,connectionStartHandle:U,userSelectionActive:K,paneDragging:eA,d3Zoom:W,d3Selection:iA,d3ZoomHandler:lA,viewport:nA,viewportRef:tA,paneClickDistance:q}=YA();qB(tA);const k=(0,r.shallowRef)(!1),sA=(0,r.shallowRef)(!1);let I=null,Y=!1,F=0,S={x:0,y:0,zoom:0};const P=Sn(d),R=Sn(u),z=Sn(a),J=(0,r.toRef)(()=>(!R.value||R.value&&u.value===!0)&&(P.value||w.value)),rA=(0,r.toRef)(()=>P.value||h.value),dA=(0,r.toRef)(()=>u.value===!0&&J.value!==!0),bA=(0,r.toRef)(()=>R.value&&u.value!==!0||K.value||dA.value),AA=(0,r.toRef)(()=>U.value!==null);(0,r.onMounted)(()=>{if(!tA.value){Tn("Viewport element is missing");return}const BA=tA.value,HA=BA.getBoundingClientRect(),aA=Nh().clickDistance(q.value).scaleExtent([A.value,t.value]).translateExtent(o.value),wA=Ne(BA).call(aA),_=wA.on("wheel.zoom"),b=Jt.translate(n.value.x??0,n.value.y??0).scale(Nt(n.value.zoom??1,A.value,t.value)),D=[[0,0],[HA.width,HA.height]],X=aA.constrain()(b,D,o.value);aA.transform(wA,X),aA.wheelDelta(Ca),W.value=aA,iA.value=wA,lA.value=_,nA.value={x:X.x,y:X.y,zoom:X.k},aA.on("start",L=>{var pA;if(!L.sourceEvent)return null;F=L.sourceEvent.button,k.value=!0;const fA=$(L.transform);((pA=L.sourceEvent)==null?void 0:pA.type)==="mousedown"&&(eA.value=!0),S=fA,M.viewportChangeStart(fA),M.moveStart({event:L,flowTransform:fA})}),aA.on("end",L=>{if(!L.sourceEvent)return null;if(k.value=!1,eA.value=!1,cA(J.value,F??0)&&!Y&&M.paneContextMenu(L.sourceEvent),Y=!1,V(S,L.transform)){const pA=$(L.transform);S=pA,M.viewportChangeEnd(pA),M.moveEnd({event:L,flowTransform:pA})}}),aA.filter(L=>{var pA;const fA=z.value||Q.value,FA=v.value&&L.ctrlKey,CA=L.button,LA=L.type==="wheel";if(CA===1&&L.type==="mousedown"&&(uA(L,"vue-flow__node")||uA(L,"vue-flow__edge")))return!0;if(!J.value&&!fA&&!rA.value&&!m.value&&!v.value||K.value||AA.value&&!LA||!m.value&&L.type==="dblclick"||uA(L,N.value)&&LA||uA(L,T.value)&&(!LA||rA.value&&LA&&!z.value)||!v.value&&L.ctrlKey&&LA||!fA&&!rA.value&&!FA&&LA)return!1;if(!v&&L.type==="touchstart"&&((pA=L.touches)==null?void 0:pA.length)>1)return L.preventDefault(),!1;if(!J.value&&(L.type==="mousedown"||L.type==="touchstart")||dA.value&&Array.isArray(w.value)&&w.value.includes(0)&&CA===0||Array.isArray(w.value)&&!w.value.includes(CA)&&(L.type==="mousedown"||L.type==="touchstart"))return!1;const KA=Array.isArray(w.value)&&w.value.includes(CA)||u.value===!0&&Array.isArray(w.value)&&!w.value.includes(0)||!CA||CA<=1;return(!L.ctrlKey||P.value||LA)&&KA}),(0,r.watch)([K,J],()=>{K.value&&!k.value?aA.on("zoom",null):K.value||aA.on("zoom",L=>{nA.value={x:L.transform.x,y:L.transform.y,zoom:L.transform.k};const pA=$(L.transform);Y=cA(J.value,F??0),M.viewportChange(pA),M.move({event:L,flowTransform:pA})})},{immediate:!0}),(0,r.watch)([K,rA,g,z,v,H,N],()=>{rA.value&&!z.value&&!K.value?wA.on("wheel.zoom",L=>{if(uA(L,N.value))return!1;const pA=z.value||Q.value,fA=v.value&&L.ctrlKey;if(!(!H.value||rA.value||pA||fA))return!1;L.preventDefault(),L.stopImmediatePropagation();const FA=wA.property("__zoom").k||1,CA=br();if(!P.value&&L.ctrlKey&&v.value&&CA){const re=Oe(L),nt=FA*2**Ca(L);aA.scaleTo(wA,nt,re,L);return}const LA=L.deltaMode===1?20:1;let KA=g.value===_n.Vertical?0:L.deltaX*LA,XA=g.value===_n.Horizontal?0:L.deltaY*LA;!CA&&L.shiftKey&&g.value!==_n.Vertical&&!KA&&XA&&(KA=XA,XA=0),aA.translateBy(wA,-(KA/FA)*B.value,-(XA/FA)*B.value);const ue=$(wA.property("__zoom"));I&&clearTimeout(I),sA.value?(M.move({event:L,flowTransform:ue}),M.viewportChange(ue),I=setTimeout(()=>{M.moveEnd({event:L,flowTransform:ue}),M.viewportChangeEnd(ue),sA.value=!1},150)):(sA.value=!0,M.moveStart({event:L,flowTransform:ue}),M.viewportChangeStart(ue))},{passive:!1}):typeof _<"u"&&wA.on("wheel.zoom",function(L,pA){const fA=!H.value&&L.type==="wheel"&&!L.ctrlKey,FA=z.value||Q.value,CA=v.value&&L.ctrlKey;if(!FA&&!h.value&&!CA&&L.type==="wheel"||fA||uA(L,N.value))return null;L.preventDefault(),_.call(this,L,pA)},{passive:!1})},{immediate:!0})});function cA(BA,HA){return HA===2&&Array.isArray(BA)&&BA.includes(2)}function V(BA,HA){return BA.x!==HA.x&&!Number.isNaN(HA.x)||BA.y!==HA.y&&!Number.isNaN(HA.y)||BA.zoom!==HA.k&&!Number.isNaN(HA.k)}function $(BA){return{x:BA.x,y:BA.y,zoom:BA.k}}function uA(BA,HA){return BA.target.closest(`.${HA}`)}return(BA,HA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"viewportRef",ref:tA,class:"vue-flow__viewport vue-flow__container"},[(0,r.createVNode)(rp,{"is-selecting":bA.value,"selection-key-pressed":(0,r.unref)(R),class:(0,r.normalizeClass)({connecting:AA.value,dragging:(0,r.unref)(eA),draggable:(0,r.unref)(w)===!0||Array.isArray((0,r.unref)(w))&&(0,r.unref)(w).includes(0)})},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(op,null,{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(BA.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),sp=["id"],ap=["id"],lp=["id"],cp=(0,r.defineComponent)({name:"A11yDescriptions",compatConfig:{MODE:3},setup(e){const{id:A,disableKeyboardA11y:t,ariaLiveMessage:n}=YA();return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createElementVNode)("div",{id:`${(0,r.unref)(ia)}-${(0,r.unref)(A)}`,style:{display:"none"}}," Press enter or space to select a node. "+(0,r.toDisplayString)((0,r.unref)(t)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,sp),(0,r.createElementVNode)("div",{id:`${(0,r.unref)(sa)}-${(0,r.unref)(A)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,ap),(0,r.unref)(t)?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,id:`${(0,r.unref)(Oh)}-${(0,r.unref)(A)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},(0,r.toDisplayString)((0,r.unref)(n)),9,lp))],64))}});function up(){const e=YA();(0,r.watch)(()=>e.viewportHelper.value.viewportInitialized,A=>{A&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function dp(e,A,t){return t===IA.Left?e-A:t===IA.Right?e+A:e}function fp(e,A,t){return t===IA.Top?e-A:t===IA.Bottom?e+A:e}var Bi=function({radius:e=10,centerX:A=0,centerY:t=0,position:n=IA.Top,type:o}){return(0,r.h)("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:dp(A,e,n),cy:fp(t,e,n),r:e,stroke:"transparent",fill:"transparent"})};Bi.props=["radius","centerX","centerY","position","type"],Bi.compatConfig={MODE:3};var tl=Bi,gp=(0,r.defineComponent)({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:A,addSelectedEdges:t,connectionMode:n,edgeUpdaterRadius:o,emits:a,nodesSelectionActive:u,noPanClassName:d,getEdgeTypes:h,removeSelectedEdges:g,findEdge:B,findNode:w,isValidConnection:m,multiSelectionActive:v,disableKeyboardA11y:Q,elementsSelectable:H,edgesUpdatable:N,edgesFocusable:T,hooks:M}=YA(),U=(0,r.computed)(()=>B(e.id)),{emit:K,on:eA}=pB(U.value,a),W=(0,r.inject)(Ir),iA=(0,r.getCurrentInstance)(),lA=(0,r.ref)(!1),nA=(0,r.ref)(!1),tA=(0,r.ref)(""),q=(0,r.ref)(null),k=(0,r.ref)("source"),sA=(0,r.ref)(null),I=(0,r.toRef)(()=>typeof U.value.selectable>"u"?H.value:U.value.selectable),Y=(0,r.toRef)(()=>typeof U.value.updatable>"u"?N.value:U.value.updatable),F=(0,r.toRef)(()=>typeof U.value.focusable>"u"?T.value:U.value.focusable);(0,r.provide)(gB,e.id),(0,r.provide)(hB,sA);const S=(0,r.computed)(()=>U.value.class instanceof Function?U.value.class(U.value):U.value.class),P=(0,r.computed)(()=>U.value.style instanceof Function?U.value.style(U.value):U.value.style),R=(0,r.computed)(()=>{const b=U.value.type||"default",D=W?.[`edge-${b}`];if(D)return D;let X=U.value.template??h.value[b];if(typeof X=="string"&&iA){const L=Object.keys(iA.appContext.components);L&&L.includes(b)&&(X=(0,r.resolveComponent)(b,!1))}return X&&typeof X!="string"?X:(a.error(new ce(ie.EDGE_TYPE_MISSING,X)),!1)}),{handlePointerDown:z}=Ga({nodeId:tA,handleId:q,type:k,isValidConnection:m,edgeUpdaterType:k,onEdgeUpdate:dA,onEdgeUpdateEnd:bA});return()=>{const b=w(U.value.source),D=w(U.value.target),X="pathOptions"in U.value?U.value.pathOptions:{};if(!b&&!D)return a.error(new ce(ie.EDGE_SOURCE_TARGET_MISSING,U.value.id,U.value.source,U.value.target)),null;if(!b)return a.error(new ce(ie.EDGE_SOURCE_MISSING,U.value.id,U.value.source)),null;if(!D)return a.error(new ce(ie.EDGE_TARGET_MISSING,U.value.id,U.value.target)),null;if(!U.value||U.value.hidden||b.hidden||D.hidden)return null;let L;n.value===At.Strict?L=b.handleBounds.source:L=[...b.handleBounds.source||[],...b.handleBounds.target||[]];const pA=_a(L,U.value.sourceHandle);let fA;n.value===At.Strict?fA=D.handleBounds.target:fA=[...D.handleBounds.target||[],...D.handleBounds.source||[]];const FA=_a(fA,U.value.targetHandle),CA=pA?.position||IA.Bottom,LA=FA?.position||IA.Top,{x:KA,y:XA}=qt(b,pA,CA),{x:ue,y:re}=qt(D,FA,LA);return U.value.sourceX=KA,U.value.sourceY=XA,U.value.targetX=ue,U.value.targetY=re,(0,r.h)("g",{ref:sA,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${R.value===!1?"default":U.value.type||"default"}`,d.value,S.value,{updating:lA.value,selected:U.value.selected,animated:U.value.animated,inactive:!I.value&&!M.value.edgeClick.hasListeners()}],tabIndex:F.value?0:void 0,"aria-label":U.value.ariaLabel===null?void 0:U.value.ariaLabel??`Edge from ${U.value.source} to ${U.value.target}`,"aria-describedby":F.value?`${sa}-${A}`:void 0,"aria-roledescription":"edge",role:F.value?"group":"img",...U.value.domAttributes,onClick:cA,onContextmenu:V,onDblclick:$,onMouseenter:uA,onMousemove:BA,onMouseleave:HA,onKeyDown:F.value?_:void 0},[nA.value?null:(0,r.h)(R.value===!1?h.value.default:R.value,{id:e.id,sourceNode:b,targetNode:D,source:U.value.source,target:U.value.target,type:U.value.type,updatable:Y.value,selected:U.value.selected,animated:U.value.animated,label:U.value.label,labelStyle:U.value.labelStyle,labelShowBg:U.value.labelShowBg,labelBgStyle:U.value.labelBgStyle,labelBgPadding:U.value.labelBgPadding,labelBgBorderRadius:U.value.labelBgBorderRadius,data:U.value.data,events:{...U.value.events,...eA},style:P.value,markerStart:`url('#${Ln(U.value.markerStart,A)}')`,markerEnd:`url('#${Ln(U.value.markerEnd,A)}')`,sourcePosition:CA,targetPosition:LA,sourceX:KA,sourceY:XA,targetX:ue,targetY:re,sourceHandleId:U.value.sourceHandle,targetHandleId:U.value.targetHandle,interactionWidth:U.value.interactionWidth,...X}),[Y.value==="source"||Y.value===!0?[(0,r.h)("g",{onMousedown:aA,onMouseenter:J,onMouseout:rA},(0,r.h)(tl,{position:CA,centerX:KA,centerY:XA,radius:o.value,type:"source","data-type":"source"}))]:null,Y.value==="target"||Y.value===!0?[(0,r.h)("g",{onMousedown:wA,onMouseenter:J,onMouseout:rA},(0,r.h)(tl,{position:LA,centerX:ue,centerY:re,radius:o.value,type:"target","data-type":"target"}))]:null]])};function J(){lA.value=!0}function rA(){lA.value=!1}function dA(b,D){K.update({event:b,edge:U.value,connection:D})}function bA(b){K.updateEnd({event:b,edge:U.value}),nA.value=!1}function AA(b,D){b.button===0&&(nA.value=!0,tA.value=D?U.value.target:U.value.source,q.value=(D?U.value.targetHandle:U.value.sourceHandle)??null,k.value=D?"target":"source",K.updateStart({event:b,edge:U.value}),z(b))}function cA(b){var D;const X={event:b,edge:U.value};I.value&&(u.value=!1,U.value.selected&&v.value?(g([U.value]),(D=sA.value)==null||D.blur()):t([U.value])),K.click(X)}function V(b){K.contextMenu({event:b,edge:U.value})}function $(b){K.doubleClick({event:b,edge:U.value})}function uA(b){K.mouseEnter({event:b,edge:U.value})}function BA(b){K.mouseMove({event:b,edge:U.value})}function HA(b){K.mouseLeave({event:b,edge:U.value})}function aA(b){AA(b,!0)}function wA(b){AA(b,!1)}function _(b){var D;!Q.value&&aa.includes(b.key)&&I.value&&(b.key==="Escape"?((D=sA.value)==null||D.blur(),g([B(e.id)])):t([B(e.id)]))}}}),hp=(0,r.defineComponent)({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:A,connectionMode:t,connectionStartHandle:n,connectionEndHandle:o,connectionPosition:a,connectionLineType:u,connectionLineStyle:d,connectionLineOptions:h,connectionStatus:g,viewport:B,findNode:w}=YA(),m=(e=(0,r.inject)(Ir))==null?void 0:e["connection-line"],v=(0,r.computed)(()=>{var M;return w((M=n.value)==null?void 0:M.nodeId)}),Q=(0,r.computed)(()=>{var M;return w((M=o.value)==null?void 0:M.nodeId)??null}),H=(0,r.computed)(()=>({x:(a.value.x-B.value.x)/B.value.zoom,y:(a.value.y-B.value.y)/B.value.zoom})),N=(0,r.computed)(()=>h.value.markerStart?`url(#${Ln(h.value.markerStart,A)})`:""),T=(0,r.computed)(()=>h.value.markerEnd?`url(#${Ln(h.value.markerEnd,A)})`:"");return()=>{var M,U,K;if(!v.value||!n.value)return null;const eA=n.value.id,W=n.value.type,iA=v.value.handleBounds;let lA=iA?.[W]??[];if(t.value===At.Loose){const P=iA?.[W==="source"?"target":"source"]??[];lA=[...lA,...P]}if(!lA)return null;const nA=(eA?lA.find(P=>P.id===eA):lA[0])??null,tA=nA?.position??IA.Top,{x:q,y:k}=qt(v.value,nA,tA);let sA=null;Q.value&&(t.value===At.Strict?sA=((M=Q.value.handleBounds[W==="source"?"target":"source"])==null?void 0:M.find(P=>{var R;return P.id===((R=o.value)==null?void 0:R.id)}))||null:sA=((U=[...Q.value.handleBounds.source??[],...Q.value.handleBounds.target??[]])==null?void 0:U.find(P=>{var R;return P.id===((R=o.value)==null?void 0:R.id)}))||null);const I=((K=o.value)==null?void 0:K.position)??(tA?li[tA]:null);if(!tA||!I)return null;const Y=u.value??h.value.type??Dt.Bezier;let F="";const S={sourceX:q,sourceY:k,sourcePosition:tA,targetX:H.value.x,targetY:H.value.y,targetPosition:I};return Y===Dt.Bezier?[F]=gi(S):Y===Dt.Step?[F]=hi({...S,borderRadius:0}):Y===Dt.SmoothStep?[F]=hi(S):Y===Dt.SimpleBezier?[F]=ja(S):F=`M${q},${k} ${H.value.x},${H.value.y}`,(0,r.h)("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},(0,r.h)("g",{class:"vue-flow__connection"},m?(0,r.h)(m,{sourceX:q,sourceY:k,sourcePosition:tA,targetX:H.value.x,targetY:H.value.y,targetPosition:I,sourceNode:v.value,sourceHandle:nA,targetNode:Q.value,targetHandle:sA,markerEnd:T.value,markerStart:N.value,connectionStatus:g.value}):(0,r.h)("path",{d:F,class:[h.value.class,g.value,"vue-flow__connection-path"],style:{...d.value,...h.value.style},"marker-end":T.value,"marker-start":N.value})))}}}),Bp=["id","markerWidth","markerHeight","markerUnits","orient"],pp=(0,r.defineComponent)({name:"MarkerType",compatConfig:{MODE:3},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("marker",{id:A.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${A.width}`,markerHeight:`${A.height}`,markerUnits:A.markerUnits,orient:A.orient},[A.type===(0,r.unref)(et).ArrowClosed?((0,r.openBlock)(),(0,r.createElementBlock)("polyline",{key:0,style:(0,r.normalizeStyle)({stroke:A.color,fill:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):(0,r.createCommentVNode)("",!0),A.type===(0,r.unref)(et).Arrow?((0,r.openBlock)(),(0,r.createElementBlock)("polyline",{key:1,style:(0,r.normalizeStyle)({stroke:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):(0,r.createCommentVNode)("",!0)],8,Bp))}}),mp={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},wp=(0,r.defineComponent)({name:"MarkerDefinitions",compatConfig:{MODE:3},setup(e){const{id:A,edges:t,connectionLineOptions:n,defaultMarkerColor:o}=YA(),a=(0,r.computed)(()=>{const u=new Set,d=[],h=g=>{if(g){const B=Ln(g,A);u.has(B)||(typeof g=="object"?d.push({...g,id:B,color:g.color||o.value}):d.push({id:B,color:o.value,type:g}),u.add(B))}};for(const g of[n.value.markerEnd,n.value.markerStart])h(g);for(const g of t.value)for(const B of[g.markerStart,g.markerEnd])h(B);return d.sort((g,B)=>g.id.localeCompare(B.id))});return(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",mp,[(0,r.createElementVNode)("defs",null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(a.value,h=>((0,r.openBlock)(),(0,r.createBlock)(pp,{id:h.id,key:h.id,type:h.type,color:h.color,width:h.width,height:h.height,markerUnits:h.markerUnits,"stroke-width":h.strokeWidth,orient:h.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),Cp=(0,r.defineComponent)({name:"Edges",compatConfig:{MODE:3},setup(e){const{findNode:A,getEdges:t,elevateEdgesOnSelect:n}=YA();return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)(wp),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(t),u=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{key:u.id,class:"vue-flow__edges vue-flow__container",style:(0,r.normalizeStyle)({zIndex:(0,r.unref)(tB)(u,(0,r.unref)(A),(0,r.unref)(n))})},[(0,r.createVNode)((0,r.unref)(gp),{id:u.id},null,8,["id"])],4))),128)),(0,r.createVNode)((0,r.unref)(hp))],64))}}),vp=(0,r.defineComponent)({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:A,noPanClassName:t,selectNodesOnDrag:n,nodesSelectionActive:o,multiSelectionActive:a,emits:u,removeSelectedNodes:d,addSelectedNodes:h,updateNodeDimensions:g,onUpdateNodeInternals:B,getNodeTypes:w,nodeExtent:m,elevateNodesOnSelect:v,disableKeyboardA11y:Q,ariaLiveMessage:H,snapToGrid:N,snapGrid:T,nodeDragThreshold:M,nodesDraggable:U,elementsSelectable:K,nodesConnectable:eA,nodesFocusable:W,hooks:iA}=YA(),lA=(0,r.ref)(null);(0,r.provide)(Va,lA),(0,r.provide)(Ra,e.id);const nA=(0,r.inject)(Ir),tA=(0,r.getCurrentInstance)(),q=Xa(),{node:k,parentNode:sA}=za(e.id),{emit:I,on:Y}=vB(k,u),F=(0,r.toRef)(()=>typeof k.draggable>"u"?U.value:k.draggable),S=(0,r.toRef)(()=>typeof k.selectable>"u"?K.value:k.selectable),P=(0,r.toRef)(()=>typeof k.connectable>"u"?eA.value:k.connectable),R=(0,r.toRef)(()=>typeof k.focusable>"u"?W.value:k.focusable),z=(0,r.computed)(()=>S.value||F.value||iA.value.nodeClick.hasListeners()||iA.value.nodeDoubleClick.hasListeners()||iA.value.nodeMouseEnter.hasListeners()||iA.value.nodeMouseMove.hasListeners()||iA.value.nodeMouseLeave.hasListeners()),J=(0,r.toRef)(()=>!!k.dimensions.width&&!!k.dimensions.height),rA=(0,r.computed)(()=>{const D=k.type||"default",X=nA?.[`node-${D}`];if(X)return X;let L=k.template||w.value[D];if(typeof L=="string"&&tA){const pA=Object.keys(tA.appContext.components);pA&&pA.includes(D)&&(L=(0,r.resolveComponent)(D,!1))}return L&&typeof L!="string"?L:(u.error(new ce(ie.NODE_TYPE_MISSING,L)),!1)}),dA=Pa({id:e.id,el:lA,disabled:()=>!F.value,selectable:S,dragHandle:()=>k.dragHandle,onStart(D){I.dragStart(D)},onDrag(D){I.drag(D)},onStop(D){I.dragStop(D)},onClick(D){_(D)}}),bA=(0,r.computed)(()=>k.class instanceof Function?k.class(k):k.class),AA=(0,r.computed)(()=>{const D=(k.style instanceof Function?k.style(k):k.style)||{},X=k.width instanceof Function?k.width(k):k.width,L=k.height instanceof Function?k.height(k):k.height;return!D.width&&X&&(D.width=typeof X=="string"?X:`${X}px`),!D.height&&L&&(D.height=typeof L=="string"?L:`${L}px`),D}),cA=(0,r.toRef)(()=>Number(k.zIndex??AA.value.zIndex??0));return B(D=>{(D.includes(e.id)||!D.length)&&$()}),(0,r.onMounted)(()=>{(0,r.watch)(()=>k.hidden,(D=!1,X,L)=>{!D&&lA.value&&(e.resizeObserver.observe(lA.value),L(()=>{lA.value&&e.resizeObserver.unobserve(lA.value)}))},{immediate:!0,flush:"post"})}),(0,r.watch)([()=>k.type,()=>k.sourcePosition,()=>k.targetPosition],()=>{(0,r.nextTick)(()=>{g([{id:e.id,nodeElement:lA.value,forceUpdate:!0}])})}),(0,r.watch)([()=>k.position.x,()=>k.position.y,()=>{var D;return(D=sA.value)==null?void 0:D.computedPosition.x},()=>{var D;return(D=sA.value)==null?void 0:D.computedPosition.y},()=>{var D;return(D=sA.value)==null?void 0:D.computedPosition.z},cA,()=>k.selected,()=>k.dimensions.height,()=>k.dimensions.width,()=>{var D;return(D=sA.value)==null?void 0:D.dimensions.height},()=>{var D;return(D=sA.value)==null?void 0:D.dimensions.width}],([D,X,L,pA,fA,FA])=>{const CA={x:D,y:X,z:FA+(v.value&&k.selected?1e3:0)};typeof L<"u"&&typeof pA<"u"?k.computedPosition=Jh({x:L,y:pA,z:fA},CA):k.computedPosition=CA},{flush:"post",immediate:!0}),(0,r.watch)([()=>k.extent,m],([D,X],[L,pA])=>{(D!==L||X!==pA)&&V()}),k.extent==="parent"||typeof k.extent=="object"&&"range"in k.extent&&k.extent.range==="parent"?Lo(()=>J).toBe(!0).then(V):V(),()=>k.hidden?null:(0,r.h)("div",{ref:lA,"data-id":k.id,class:["vue-flow__node",`vue-flow__node-${rA.value===!1?"default":k.type||"default"}`,{[t.value]:F.value,dragging:dA?.value,draggable:F.value,selected:k.selected,selectable:S.value,parent:k.isParent},bA.value],style:{visibility:J.value?"visible":"hidden",zIndex:k.computedPosition.z??cA.value,transform:`translate(${k.computedPosition.x}px,${k.computedPosition.y}px)`,pointerEvents:z.value?"all":"none",...AA.value},tabIndex:R.value?0:void 0,role:R.value?"group":void 0,"aria-describedby":Q.value?void 0:`${ia}-${A}`,"aria-label":k.ariaLabel,"aria-roledescription":"node",...k.domAttributes,onMouseenter:uA,onMousemove:BA,onMouseleave:HA,onContextmenu:aA,onClick:_,onDblclick:wA,onKeydown:b},[(0,r.h)(rA.value===!1?w.value.default:rA.value,{id:k.id,type:k.type,data:k.data,events:{...k.events,...Y},selected:k.selected,resizing:k.resizing,dragging:dA.value,connectable:P.value,position:k.computedPosition,dimensions:k.dimensions,isValidTargetPos:k.isValidTargetPos,isValidSourcePos:k.isValidSourcePos,parent:k.parentNode,parentNodeId:k.parentNode,zIndex:k.computedPosition.z??cA.value,targetPosition:k.targetPosition,sourcePosition:k.sourcePosition,label:k.label,dragHandle:k.dragHandle,onUpdateNodeInternals:$})]);function V(){const D=k.computedPosition,{computedPosition:X,position:L}=ii(k,N.value?Hr(D,T.value):D,u.error,m.value,sA.value);(k.computedPosition.x!==X.x||k.computedPosition.y!==X.y)&&(k.computedPosition={...k.computedPosition,...X}),(k.position.x!==L.x||k.position.y!==L.y)&&(k.position=L)}function $(){lA.value&&g([{id:e.id,nodeElement:lA.value,forceUpdate:!0}])}function uA(D){dA?.value||I.mouseEnter({event:D,node:k})}function BA(D){dA?.value||I.mouseMove({event:D,node:k})}function HA(D){dA?.value||I.mouseLeave({event:D,node:k})}function aA(D){return I.contextMenu({event:D,node:k})}function wA(D){return I.doubleClick({event:D,node:k})}function _(D){S.value&&(!n.value||!F.value||M.value>0)&&ci(k,a.value,h,d,o,!1,lA.value),I.click({event:D,node:k})}function b(D){if(!(ni(D)||Q.value))if(aa.includes(D.key)&&S.value){const X=D.key==="Escape";ci(k,a.value,h,d,o,X,lA.value)}else F.value&&k.selected&&Zt[D.key]&&(D.preventDefault(),H.value=`Moved selected node ${D.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~k.position.x}, y: ${~~k.position.y}`,q({x:Zt[D.key].x,y:Zt[D.key].y},D.shiftKey))}}}),yp={height:"0",width:"0"},Qp=(0,r.defineComponent)({name:"EdgeLabelRenderer",compatConfig:{MODE:3},setup(e){const{viewportRef:A}=YA(),t=(0,r.toRef)(()=>{var n;return(n=A.value)==null?void 0:n.getElementsByClassName("vue-flow__edge-labels")[0]});return(n,o)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",null,[((0,r.openBlock)(),(0,r.createElementBlock)("foreignObject",yp,[((0,r.openBlock)(),(0,r.createBlock)(r.Teleport,{to:t.value,disabled:!t.value},[(0,r.renderSlot)(n.$slots,"default")],8,["to","disabled"]))]))]))}});function Ep(e={includeHiddenNodes:!1}){const{nodes:A}=YA();return(0,r.computed)(()=>{if(A.value.length===0)return!1;for(const t of A.value)if((e.includeHiddenNodes||!t.hidden)&&(t?.handleBounds===void 0||t.dimensions.width===0||t.dimensions.height===0))return!1;return!0})}var Up={class:"vue-flow__nodes vue-flow__container"},Fp=(0,r.defineComponent)({name:"Nodes",compatConfig:{MODE:3},setup(e){const{getNodes:A,updateNodeDimensions:t,emits:n}=YA(),o=Ep(),a=(0,r.ref)();return(0,r.watch)(o,u=>{u&&(0,r.nextTick)(()=>{n.nodesInitialized(A.value)})},{immediate:!0}),(0,r.onMounted)(()=>{a.value=new ResizeObserver(u=>{const d=u.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));(0,r.nextTick)(()=>t(d))})}),(0,r.onBeforeUnmount)(()=>{var u;return(u=a.value)==null?void 0:u.disconnect()}),(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",Up,[a.value?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)((0,r.unref)(A),(h,g,B,w)=>{const m=[h.id];if(w&&w.key===h.id&&(0,r.isMemoSame)(w,m))return w;const v=((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(vp),{id:h.id,key:h.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return v.memo=m,v},d,0),128)):(0,r.createCommentVNode)("",!0)]))}});function bp(){const{emits:e}=YA();(0,r.onMounted)(()=>{if(La()){const A=document.querySelector(".vue-flow__pane");A&&window.getComputedStyle(A).zIndex!=="1"&&e.error(new ce(ie.MISSING_STYLES))}})}var Hp=(0,r.createElementVNode)("div",{class:"vue-flow__edge-labels"},null,-1),Ip=(0,r.defineComponent)({name:"VueFlow",compatConfig:{MODE:3},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:A,emit:t}){const n=e,o=(0,r.useSlots)(),a=To(n,"modelValue",t),u=To(n,"nodes",t),d=To(n,"edges",t),h=YA(n),g=UB({modelValue:a,nodes:u,edges:d},n,h);return bB(t,h.hooks),up(),bp(),(0,r.provide)(Ir,o),(0,r.onUnmounted)(g),A(h),(B,w)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref:(0,r.unref)(h).vueFlowRef,class:"vue-flow"},[(0,r.createVNode)(ip,null,{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Cp),Hp,(0,r.createVNode)(Fp),(0,r.renderSlot)(B.$slots,"zoom-pane")]),_:3}),(0,r.renderSlot)(B.$slots,"default"),(0,r.createVNode)(cp)],512))}}),_p=(0,r.defineComponent)({name:"Panel",compatConfig:{MODE:3},props:{position:{}},setup(e){const A=e,{userSelectionActive:t}=YA(),n=(0,r.computed)(()=>`${A.position}`.split("-"));return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["vue-flow__panel",n.value]),style:(0,r.normalizeStyle)({pointerEvents:(0,r.unref)(t)?"none":"all"})},[(0,r.renderSlot)(o.$slots,"default")],6))}}),tt=(e=>(e.Lines="lines",e.Dots="dots",e))(tt||{}),Sp=function({dimensions:e,size:A,color:t}){return(0,r.h)("path",{stroke:t,"stroke-width":A,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},xp=function({radius:e,color:A}){return(0,r.h)("circle",{cx:e,cy:e,r:e,fill:A})};tt.Lines,tt.Dots;var Dp={[tt.Dots]:"#81818a",[tt.Lines]:"#eee"},Np=["id","x","y","width","height","patternTransform"],Lp={key:2,height:"100",width:"100"},Tp=["fill"],kp=["x","y","fill"],Mp=(0,r.defineComponent)({name:"Background",compatConfig:{MODE:3},props:{id:{},variant:{default:()=>tt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:A,viewport:t}=YA(),n=(0,r.computed)(()=>{const u=t.value.zoom,[d,h]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],g=[d*u||1,h*u||1],B=e.size*u,[w,m]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset];return{scaledGap:g,offset:[w*u||1+g[0]/2,m*u||1+g[1]/2],size:B}}),o=(0,r.toRef)(()=>`pattern-${A}${e.id?`-${e.id}`:""}`),a=(0,r.toRef)(()=>e.color||e.patternColor||Dp[e.variant||tt.Dots]);return(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{class:"vue-flow__background vue-flow__container",style:(0,r.normalizeStyle)({height:`${u.height>100?100:u.height}%`,width:`${u.width>100?100:u.width}%`})},[(0,r.renderSlot)(u.$slots,"pattern-container",{id:o.value},()=>[(0,r.createElementVNode)("pattern",{id:o.value,x:(0,r.unref)(t).x%n.value.scaledGap[0],y:(0,r.unref)(t).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[(0,r.renderSlot)(u.$slots,"pattern",{},()=>[u.variant===(0,r.unref)(tt).Lines?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Sp),{key:0,size:u.lineWidth,color:a.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):u.variant===(0,r.unref)(tt).Dots?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(xp),{key:1,color:a.value,radius:n.value.size/2},null,8,["color","radius"])):(0,r.createCommentVNode)("",!0),u.bgColor?((0,r.openBlock)(),(0,r.createElementBlock)("svg",Lp,[(0,r.createElementVNode)("rect",{width:"100%",height:"100%",fill:u.bgColor},null,8,Tp)])):(0,r.createCommentVNode)("",!0)])],8,Np)]),(0,r.createElementVNode)("rect",{x:u.x,y:u.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,kp),(0,r.renderSlot)(u.$slots,"default",{id:o.value})],4))}}),Kp={name:"ControlButton",compatConfig:{MODE:3}},Op=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Rp={type:"button",class:"vue-flow__controls-button"};function Vp(e,A,t,n,o,a){return(0,r.openBlock)(),(0,r.createElementBlock)("button",Rp,[(0,r.renderSlot)(e.$slots,"default")])}var Tr=Op(Kp,[["render",Vp]]),Pp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Gp=[(0,r.createElementVNode)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function zp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Pp,Gp)}var Xp={render:zp},$p={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Wp=[(0,r.createElementVNode)("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Yp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",$p,Wp)}var Jp={render:Yp},Zp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},jp=[(0,r.createElementVNode)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function qp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Zp,jp)}var Am={render:qp},em={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},tm=[(0,r.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function nm(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",em,tm)}var rm={render:nm},om={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},im=[(0,r.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function sm(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",om,im)}var am={render:sm},lm=(0,r.defineComponent)({name:"Controls",compatConfig:{MODE:3},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>ra.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:A}){const{nodesDraggable:t,nodesConnectable:n,elementsSelectable:o,setInteractive:a,zoomIn:u,zoomOut:d,fitView:h,viewport:g,minZoom:B,maxZoom:w}=YA(),m=(0,r.toRef)(()=>t.value||n.value||o.value),v=(0,r.toRef)(()=>g.value.zoom<=B.value),Q=(0,r.toRef)(()=>g.value.zoom>=w.value);function H(){u(),A("zoomIn")}function N(){d(),A("zoomOut")}function T(){h(e.fitViewParams),A("fitView")}function M(){a(!m.value),A("interactionChange",!m.value)}return(U,K)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(_p),{class:"vue-flow__controls",position:U.position},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"top"),U.showZoom?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.renderSlot)(U.$slots,"control-zoom-in",{},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-zoomin",disabled:Q.value,onClick:H},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"icon-zoom-in",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Xp))))])]),_:3},8,["disabled"])]),(0,r.renderSlot)(U.$slots,"control-zoom-out",{},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-zoomout",disabled:v.value,onClick:N},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"icon-zoom-out",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Jp))))])]),_:3},8,["disabled"])])],64)):(0,r.createCommentVNode)("",!0),U.showFitView?(0,r.renderSlot)(U.$slots,"control-fit-view",{key:1},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-fitview",onClick:T},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"icon-fit-view",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Am))))])]),_:3})]):(0,r.createCommentVNode)("",!0),U.showInteractive?(0,r.renderSlot)(U.$slots,"control-interactive",{key:2},()=>[U.showInteractive?((0,r.openBlock)(),(0,r.createBlock)(Tr,{key:0,class:"vue-flow__controls-interactive",onClick:M},{default:(0,r.withCtx)(()=>[m.value?(0,r.renderSlot)(U.$slots,"icon-unlock",{key:0},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(am))))]):(0,r.createCommentVNode)("",!0),m.value?(0,r.createCommentVNode)("",!0):(0,r.renderSlot)(U.$slots,"icon-lock",{key:1},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(rm))))])]),_:3})):(0,r.createCommentVNode)("",!0)]):(0,r.createCommentVNode)("",!0),(0,r.renderSlot)(U.$slots,"default")]),_:3},8,["position"]))}}),cm=["onClick"],um={class:"d-flow-node-menus-item-name"},dm=(0,r.defineComponent)({name:"DNodeMenus",__name:"nodeMenus",props:{fromNodeId:{},handleId:{}},emits:["addNode"],setup(e,{emit:A}){const t=e,n=A,o=(0,r.inject)("d_flow_design_provide",{}),a=o.getFlowComponents?.()||[],u=d=>{n("addNode",d.type),(0,r.nextTick)(()=>{t.handleId==="line"?o.addNodeByLine?.(d.type,t.fromNodeId||""):o.addNode?.(d.type,t.fromNodeId||"",t.handleId||"")})};return(d,h)=>{const g=(0,r.resolveComponent)("j-icon");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-flow-node-menus",onClick:(0,r.withModifiers)(()=>{},["stop"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(a),(B,w)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:w,class:"d-flow-node-menus-item",onClick:m=>u(B)},[(0,r.createElementVNode)("div",{class:"d-flow-node-menus-item-icon",style:(0,r.normalizeStyle)({backgroundColor:B.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(g,{icon:B.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",um,(0,r.toDisplayString)(B.name),1)],8,cm))),128))])}}}),pi=dm,fm={class:"d-flow-step-name"},gm={key:0,style:{color:"var(--j-color-text-2)"}},hm={style:{color:"var(--j-color-text)"}},Bm=(0,r.defineComponent)({name:"DStepNode",__name:"stepNode",props:{id:{},data:{}},setup(e){const A=e,{onNodeClick:t,onEdgeClick:n,onMoveStart:o,onConnectStart:a,onNodeDragStart:u,removeNodes:d,getEdges:h,getNodes:g,onNodesChange:B}=YA(),w=(0,r.inject)("d_flow_design_provide",{}),m=(0,r.computed)(()=>w.getFlowComponentMap?.value?.[A.data.type]||{}),v=()=>{d(A.id),w.onRemoveNode?.(A.id)},Q=(0,r.ref)({});B(sA=>{if(A.data.isInit&&sA.findIndex(I=>I.type==="select"&&I.id===A.id&&I.id==="start"&&I.selected)!==-1){const I=g.value.find(Y=>Y.id==="start");I&&(I.data.isInit=!1),Q.value.s1=!0}});const H=(0,r.ref)(!1),N=sA=>{sA.indexOf("t")!==-1&&!T.value||(H.value=!0,Q.value[sA]=!0)},T=(0,r.computed)(()=>h.value.findIndex(sA=>sA.target===A.id)===-1),M=(0,r.ref)(!1),U=()=>{M.value=!0},K=(sA,I)=>{if(h.value.find(F=>F.source===I&&F.target===sA))return!0;const Y=h.value.filter(F=>F.target===sA);for(let F=0;F<Y.length;F++)if(K(Y[F].source,I))return!0;return!1},eA=sA=>M.value?(M.value=!1,!1):K(sA.source,sA.target)?!1:sA.source!==sA.target&&sA.sourceHandle!==sA.targetHandle&&sA.sourceHandle.indexOf("s")!==-1&&sA.targetHandle.indexOf("t")!==-1,W=()=>{q(),Object.keys(Q.value).forEach(sA=>{Q.value[sA]=!1})},iA=()=>{W()};t(()=>{console.log("onNodeClick"),H.value?H.value=!1:W()}),n(()=>{W()}),o(()=>{W()}),a(()=>{W()}),u(()=>{W()});const lA=(0,r.ref)(),nA=(0,r.ref)({top:0,left:0,bottom:0,right:0}),tA=(0,r.ref)({getBoundingClientRect:()=>nA.value}),q=()=>{lA.value?.handleClose()},k=sA=>{const{clientX:I,clientY:Y}=sA;nA.value=DOMRect.fromRect({x:I,y:Y}),sA.preventDefault(),lA.value?.handleOpen()};return(sA,I)=>{const Y=(0,r.resolveComponent)("j-icon"),F=(0,r.resolveComponent)("el-popover"),S=(0,r.resolveComponent)("el-tooltip"),P=(0,r.resolveComponent)("el-dropdown-item"),R=(0,r.resolveComponent)("el-dropdown-menu"),z=(0,r.resolveComponent)("el-dropdown");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-flow-step",onContextmenu:(0,r.withModifiers)(k,["stop"])},[(0,r.createElementVNode)("div",{class:"d-flow-step-icon",style:(0,r.normalizeStyle)({backgroundColor:m.value.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(Y,{icon:m.value.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",fm,(0,r.toDisplayString)(m.value.name),1),e.data.type!=="start"?((0,r.openBlock)(),(0,r.createBlock)(S,{key:0,placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,r.withCtx)(()=>[T.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",gm,[...I[4]||(I[4]=[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击",-1),(0,r.createTextVNode)("添加节点 ",-1)])])):(0,r.createCommentVNode)("",!0),I[5]||(I[5]=(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,r.createTextVNode)("连接节点 ")],-1))]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(An),{onClick:I[1]||(I[1]=J=>N("t1")),onMousedown:U,id:"t1",class:(0,r.normalizeClass)(["d-flow-step-target-handle",{"d-flow-step-target-handle-notadd":!T.value}]),type:"target",position:(0,r.unref)(IA).Left,"is-valid-connection":eA},{default:(0,r.withCtx)(()=>[T.value?((0,r.openBlock)(),(0,r.createBlock)(F,{key:0,visible:Q.value.t1,"onUpdate:visible":I[0]||(I[0]=J=>Q.value.t1=J),placement:"left","popper-class":"d-flow-step-popper",trigger:"click","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,r.withCtx)(()=>[(0,r.createVNode)(Y,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(pi,{"handle-id":"t1","from-node-id":e.id,onAddNode:iA},null,8,["from-node-id"])]),_:1},8,["visible"])):(0,r.createCommentVNode)("",!0)]),_:1},8,["class","position"])]),_:1})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(S,{placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,r.withCtx)(()=>[...I[6]||(I[6]=[(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击"),(0,r.createTextVNode)("添加节点 ")],-1),(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,r.createTextVNode)("连接节点 ")],-1)])]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(An),{onClick:I[3]||(I[3]=J=>N("s1")),onMousedown:U,id:"s1",class:"d-flow-step-source-handle",type:"source",position:(0,r.unref)(IA).Right,"is-valid-connection":eA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(F,{visible:Q.value.s1,"onUpdate:visible":I[2]||(I[2]=J=>Q.value.s1=J),placement:"right",trigger:"click","popper-class":"d-flow-step-popper","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,r.withCtx)(()=>[(0,r.createVNode)(Y,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(pi,{"handle-id":"s1","from-node-id":e.id,onAddNode:iA},null,8,["from-node-id"])]),_:1},8,["visible"])]),_:1},8,["position"])]),_:1}),(0,r.createVNode)(z,{ref_key:"dropdownRef",ref:lA,"popper-class":"d-flow-step-dropdown","virtual-ref":tA.value,"show-arrow":!1,"popper-options":{modifiers:[{name:"offset",options:{offset:[0,0]}}]},"virtual-triggering":"",trigger:"contextmenu",placement:"bottom-start"},{dropdown:(0,r.withCtx)(()=>[(0,r.createVNode)(R,null,{default:(0,r.withCtx)(()=>[e.data.type!="start"?((0,r.openBlock)(),(0,r.createBlock)(P,{key:0,onClick:v},{default:(0,r.withCtx)(()=>[...I[7]||(I[7]=[(0,r.createTextVNode)("删除",-1)])]),_:1})):(0,r.createCommentVNode)("",!0),m.value.des?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:1,style:(0,r.normalizeStyle)({width:"160px",padding:"4px 16px 0 16px","font-size":"12px","border-top":e.data.type!="start"?"1px solid var(--j-color-border)":void 0,"margin-top":e.data.type!="start"?"4px":void 0})},[I[8]||(I[8]=(0,r.createElementVNode)("div",{style:{"margin-bottom":"4px",color:"var(--j-color-text-2)"}},"关于",-1)),(0,r.createElementVNode)("div",hm,(0,r.toDisplayString)(m.value.des),1)],4)):(0,r.createCommentVNode)("",!0)]),_:1})]),_:1},8,["virtual-ref"])],32)}}}),pm=Bm,mm=(0,r.defineComponent)({name:"DEdgeWithButton",__name:"edgeWithButton",props:{id:{},sourceX:{},sourceY:{},targetX:{},targetY:{},sourcePosition:{},targetPosition:{},markerEnd:{},style:{}},setup(e){const A=e,{onEdgeMouseEnter:t,onEdgeMouseLeave:n,onNodeClick:o,onEdgeClick:a,onMoveStart:u,onConnectStart:d,onNodeDragStart:h}=YA(),g=(0,r.computed)(()=>gi(A)),B=(0,r.ref)(!1),w=(0,r.ref)(!1);t(({edge:N})=>{N.id===A.id&&(B.value=!0)}),n(()=>{B.value=!1});const m=(0,r.ref)(!1),v=()=>{m.value=!1,(0,r.nextTick)(()=>{w.value=!1})},Q=()=>{w.value=!0,m.value=!0},H=()=>{v()};return o(()=>{v()}),a(()=>{v()}),u(()=>{v()}),d(()=>{v()}),h(()=>{v()}),(N,T)=>{const M=(0,r.resolveComponent)("j-icon"),U=(0,r.resolveComponent)("el-popover");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)((0,r.unref)(kn),{id:e.id,style:(0,r.normalizeStyle)(e.style),path:g.value[0],"marker-end":e.markerEnd},null,8,["id","style","path","marker-end"]),(0,r.createVNode)((0,r.unref)(Qp),null,{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({pointerEvents:"all",position:"absolute",transform:`translate(-50%, -50%) translate(${g.value[1]}px,${g.value[2]}px)`}),class:"nodrag nopan"},[(0,r.createVNode)(U,{visible:m.value,"show-arrow":!1,placement:"right","popper-class":"d-flow-step-popper"},{reference:(0,r.withCtx)(()=>[(0,r.withDirectives)((0,r.createElementVNode)("div",{onClick:(0,r.withModifiers)(Q,["stop"]),class:"d-flow-edge-button"},[(0,r.createVNode)(M,{icon:"mdi:plus-circle"})],512),[[r.vShow,B.value||w.value]])]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(pi,{"handle-id":"line","from-node-id":e.id,onAddNode:H},null,8,["from-node-id"])]),_:1},8,["visible"])],4)]),_:1})],64)}}}),wm=mm,Cm=(0,r.defineComponent)({name:"DFlow",__name:"flow",props:{nodes:{default:()=>[]},edges:{default:()=>[]}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Ip),{"min-zoom":.2,"max-zoom":4,"default-viewport":{zoom:1},"connection-mode":(0,r.unref)(At).Strict,nodes:e.nodes,edges:e.edges},{"edge-button":(0,r.withCtx)(n=>[(0,r.createVNode)(wm,{id:n.id,"source-x":n.sourceX,"source-y":n.sourceY,"target-x":n.targetX,"target-y":n.targetY,"source-position":n.sourcePosition,"target-position":n.targetPosition,"marker-end":n.markerEnd,style:(0,r.normalizeStyle)(n.style)},null,8,["id","source-x","source-y","target-x","target-y","source-position","target-position","marker-end","style"])]),"node-step":(0,r.withCtx)(n=>[(0,r.createVNode)(pm,(0,r.normalizeProps)((0,r.guardReactiveProps)(n)),null,16)]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(lm),{position:"bottom-left"}),(0,r.createVNode)((0,r.unref)(Mp))]),_:1},8,["connection-mode","nodes","edges"]))}}),vm=Cm,ym={class:"d-flow-design"},Qm={class:"d-flow-design-canvas"},Em={class:"d-flow-design-right"},Um={class:"d-flow-design-title"},Fm={class:"d-flow-design-title-name"},bm={class:"d-flow-design-panel"},Hm=(0,r.defineComponent)({name:"DFlowDesign",__name:"flowDesign",props:{components:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["nodeClick","edgeClick","paneClick","connect"],setup(e,{expose:A,emit:t}){const n=e,o=t,{addNodes:a,addEdges:u,removeEdges:d,addSelectedNodes:h,removeSelectedNodes:g,onConnect:B,onNodeClick:w,onPaneClick:m,onEdgeClick:v,getNodes:Q,getEdges:H}=YA(),N=(0,r.computed)(()=>{const R={};return n.components.forEach(z=>{R[z.type]=z}),R.start={name:"开始",type:"start",icon:"ant-design:play-circle-outlined",des:"执行开始节点"},R}),T={id:"start",type:"step",data:{type:"start",isInit:!1},position:{x:80,y:160}},M=(0,r.ref)([T]),U=(0,r.ref)([]),K=(R,z)=>{if(z.indexOf("t")===-1){const J=H.value.filter(rA=>rA.source===R.id);if(J.length>0){let rA=-1e6,dA=0;return J.forEach(bA=>{rA=Math.max(rA,bA.targetNode.position.y+bA.targetNode.dimensions.height+32),dA=bA.targetNode.position.x||0}),{x:dA,y:rA}}return{x:R.position.x+R.dimensions.width+100,y:R.position.y}}return{x:R.position.x-100-R.dimensions.width,y:R.position.y}},eA=(R,z,J)=>{const rA=Q.value.find(bA=>bA.id===z);if(!rA)return;const dA={id:dt(),type:"step",data:{type:R},position:K(rA,J)};if(n.flowInit){const bA=n.flowInit(dA.data.type);bA&&Object.keys(bA).forEach(AA=>{dA.data[AA]=bA[AA]})}a(dA),J.indexOf("t")===-1?u({id:`${z}-${dA.id}`,source:z,target:dA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}):u({id:`${z}-${dA.id}`,source:dA.id,target:z,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}),k(dA.id)},W=R=>{const z=Q.value.find(J=>J.id===R);z&&(z.position.x+=100+z.dimensions.width,H.value.filter(J=>J.source===R).forEach(J=>{W(J.target)}))},iA=(R,z)=>{const J=H.value.find(dA=>dA.id===z);if(!J)return;const rA={id:dt(),type:"step",data:{type:R},position:{x:J.targetNode.position.x,y:J.targetNode.position.y}};if(n.flowInit){const dA=n.flowInit(rA.data.type);dA&&Object.keys(dA).forEach(bA=>{rA.data[bA]=dA[bA]})}a(rA),u({id:`${J.sourceNode.id}-${rA.id}`,source:J.sourceNode.id,target:rA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}),u({id:`${rA.id}-${J.targetNode.id}`,source:rA.id,target:J.targetNode.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}),d(z),W(J.target),k(rA.id)};B(R=>{console.log("onConnect",R),R.type="button",R.markerEnd=et.Arrow,u(R),o("connect",R)});const lA=()=>n.components||[],nA=(0,r.ref)(),tA=(0,r.computed)(()=>nA.value?N.value[nA.value.data.type]:void 0);w(R=>{nA.value?.id!==R.node.id&&(nA.value=R.node,Y()),o("nodeClick",R.node)}),m(()=>{nA.value=void 0,o("paneClick")}),v(R=>{nA.value=void 0,o("edgeClick",R.edge)});const q=R=>{nA.value?.id===R&&(nA.value=void 0)},k=R=>{nA.value&&g([nA.value]),nA.value=Q.value.find(z=>z.id===R),nA.value&&(Y(),setTimeout(()=>{nA.value&&h([nA.value])},100))},sA=(0,r.ref)(),I={};Object.keys(n.flowComponentConfigs).forEach(R=>{const z={type:"j-collapse",config:{defaultValue:[]},children:[]};n.flowComponentConfigs[R].forEach((J,rA)=>{const dA=`_collapse${rA}`;z.config?.defaultValue.push(dA),z.children?.push(J)}),I[R]=[z]});const Y=()=>{const R=I[nA.value?.data.type||""];R&&sA.value?(sA.value.init&&sA.value.init(R,nA.value?.data),n.flowComponentConfigInit&&n.flowComponentConfigInit({configRef:sA,inputParams:n.inputParams,components:Q.value,configData:nA.value?.data})):sA.value&&sA.value.init&&sA.value.init([])},F=(R,z)=>{nA.value&&n.flowComponentConfigChange&&n.flowComponentConfigChange(nA.value.data.type,{configRef:sA,component:R,configData:nA.value.data,...z,isFlowNode:!0})};return(0,r.provide)("d_flow_design_provide",{getFlowComponents:lA,addNode:eA,addNodeByLine:iA,onRemoveNode:q,getFlowComponentMap:N}),A({getData:()=>{const R=[];return Q.value.forEach(z=>{R.push({config:z.data,id:z.id,position:z.position,type:z.type})}),H.value.forEach(z=>{R.push({id:z.id,source:z.source,target:z.target,sourceHandle:z.sourceHandle,targetHandle:z.targetHandle,type:"line",config:{},position:{x:0,y:0}})}),R},setData:R=>{if(!R||R.length===0)T.data.isInit=!0,M.value=[T],k(T.id);else{T.data.isInit=!1;const z=[],J=[];R.forEach(rA=>{if(rA.type==="line")rA.type="button",rA.markerEnd=et.Arrow,J.push(rA);else{const dA={id:rA.id,type:rA.type,data:rA.config,position:rA.position};z.push(dA)}}),M.value=z,U.value=J}}}),(R,z)=>{const J=(0,r.resolveComponent)("j-icon"),rA=(0,r.resolveComponent)("j-form");return(0,r.openBlock)(),(0,r.createElementBlock)("div",ym,[(0,r.createElementVNode)("div",Qm,[(0,r.createVNode)(vm,{nodes:M.value,edges:U.value},null,8,["nodes","edges"])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Em,[(0,r.createElementVNode)("div",Um,[(0,r.createElementVNode)("div",{class:"d-flow-design-title-icon",style:(0,r.normalizeStyle)({backgroundColor:tA.value?.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(J,{icon:tA.value?.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",Fm,(0,r.toDisplayString)(tA.value?.name||""),1)]),(0,r.createElementVNode)("div",bm,[(0,r.createVNode)(rA,{config:{labelPosition:"top"},style:{padding:"0"},ref_key:"configRef",ref:sA,onChange:F},null,512)])],512),[[r.vShow,nA.value&&I[nA.value.data.type]]])])}}}),Im=Hm,nl=ut(Im),_m={class:"d-input-flow j-block"},Sm=(0,r.defineComponent)({name:"DInputFlow",__name:"inputFlow",props:{modelValue:{},type:{},btnText:{default:"事件"},title:{},size:{default:"default"},width:{default:1200},height:{default:800},beforeClose:{},flowComponents:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["update:modelValue","change"],setup(e,{emit:A}){const t=e,n=A,o=(0,r.ref)(),a=(0,r.computed)({get(){return t.modelValue},set(w){n("update:modelValue",w)}}),u=(0,r.computed)(()=>(t.modelValue?.trim(),t.btnText)),d=w=>{const m=typeof w=="string"?w:void 0;try{o.value?.setData(JSON.parse(m||"[]"))}catch{o.value?.setData([])}},h=async()=>{const w=o.value?.getData();return w?JSON.stringify(w):void 0},g=w=>{if(t.beforeClose){const m=typeof w=="string"?w:void 0;return t.beforeClose(m)}return!0},B=w=>{const m=w.value;n("change",{value:typeof m=="string"?m:void 0})};return(w,m)=>{const v=(0,r.resolveComponent)("d-flow-design"),Q=(0,r.resolveComponent)("j-input-button");return(0,r.openBlock)(),(0,r.createBlock)(Q,(0,r.mergeProps)(w.$attrs,{type:e.type,"btn-text":u.value,title:e.title,size:e.size,width:e.width,height:e.height,"before-close":g,ok:h,open:d,"destroy-on-close":"",modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=H=>a.value=H),onChange:B}),{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",_m,[(0,r.createVNode)(v,{ref_key:"flowRef",ref:o,components:e.flowComponents,"flow-init":e.flowInit,"flow-component-config-init":e.flowComponentConfigInit,"flow-component-configs":e.flowComponentConfigs,"flow-component-config-change":e.flowComponentConfigChange,"input-params":e.inputParams},null,8,["components","flow-init","flow-component-config-init","flow-component-configs","flow-component-config-change","input-params"])])]),_:1},16,["type","btn-text","title","size","width","height","modelValue"])}}}),xm=Sm,rl=ut(xm),j=class De{static getElements(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(n&&!isNaN(+A[0])){const a=n.getElementById(A);return a?[a]:[]}let o=t.querySelectorAll(A);if(!o.length&&A[0]!=="."&&A[0]!=="#"&&(o=t.querySelectorAll("."+A),o.length||(o=t.querySelectorAll("#"+A)),!o.length)){const a=t.querySelector(`[gs-id="${A}"]`);return a?[a]:[]}return Array.from(o)}return[A]}static getElement(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(!A.length)return null;if(n&&A[0]==="#")return n.getElementById(A.substring(1));if(A[0]==="#"||A[0]==="."||A[0]==="[")return t.querySelector(A);if(n&&!isNaN(+A[0]))return n.getElementById(A);let o=t.querySelector(A);return n&&!o&&(o=n.getElementById(A)),o||(o=t.querySelector("."+A)),o}return A}static lazyLoad(A){return A.lazyLoad||A.grid?.opts?.lazyLoad&&A.lazyLoad!==!1}static createDiv(A,t){const n=document.createElement("div");return A.forEach(o=>{o&&n.classList.add(o)}),t?.appendChild(n),n}static shouldSizeToContent(A,t=!1){return A?.grid&&(t?A.sizeToContent===!0||A.grid.opts.sizeToContent===!0&&A.sizeToContent===void 0:!!A.sizeToContent||A.grid.opts.sizeToContent&&A.sizeToContent!==!1)}static isIntercepted(A,t){return!(A.y>=t.y+t.h||A.y+A.h<=t.y||A.x+A.w<=t.x||A.x>=t.x+t.w)}static isTouching(A,t){return De.isIntercepted(A,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(A,t){const n=A.x>t.x?A.x:t.x,o=A.x+A.w<t.x+t.w?A.x+A.w:t.x+t.w;if(o<=n)return 0;const a=A.y>t.y?A.y:t.y,u=A.y+A.h<t.y+t.h?A.y+A.h:t.y+t.h;return u<=a?0:(o-n)*(u-a)}static area(A){return A.w*A.h}static sort(A,t=1){return A.sort((o,a)=>{const u=t*((o.y??1e4)-(a.y??1e4));return u===0?t*((o.x??1e4)-(a.x??1e4)):u})}static find(A,t){return t?A.find(n=>n.id===t):void 0}static toBool(A){return typeof A=="boolean"?A:typeof A=="string"?(A=A.toLowerCase(),!(A===""||A==="no"||A==="false"||A==="0")):!!A}static toNumber(A){return A===null||A.length===0?void 0:Number(A)}static parseHeight(A){let t,n="px";if(typeof A=="string")if(A==="auto"||A==="")t=0;else{const o=A.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!o)throw new Error(`Invalid height val = ${A}`);n=o[2]||"px",t=parseFloat(o[1])}else t=A;return{h:t,unit:n}}static defaults(A,...t){return t.forEach(n=>{for(const o in n){if(!n.hasOwnProperty(o))return;A[o]===null||A[o]===void 0?A[o]=n[o]:typeof n[o]=="object"&&typeof A[o]=="object"&&De.defaults(A[o],n[o])}}),A}static same(A,t){if(typeof A!="object")return A==t;if(typeof A!=typeof t||Object.keys(A).length!==Object.keys(t).length)return!1;for(const n in A)if(A[n]!==t[n])return!1;return!0}static copyPos(A,t,n=!1){return t.x!==void 0&&(A.x=t.x),t.y!==void 0&&(A.y=t.y),t.w!==void 0&&(A.w=t.w),t.h!==void 0&&(A.h=t.h),n&&(t.minW&&(A.minW=t.minW),t.minH&&(A.minH=t.minH),t.maxW&&(A.maxW=t.maxW),t.maxH&&(A.maxH=t.maxH)),A}static samePos(A,t){return A&&t&&A.x===t.x&&A.y===t.y&&(A.w||1)===(t.w||1)&&(A.h||1)===(t.h||1)}static sanitizeMinMax(A){A.minW||delete A.minW,A.minH||delete A.minH,A.maxW||delete A.maxW,A.maxH||delete A.maxH}static removeInternalAndSame(A,t){if(!(typeof A!="object"||typeof t!="object")&&!(Array.isArray(A)||Array.isArray(t)))for(let n in A){const o=A[n],a=t[n];n[0]==="_"||o===a?delete A[n]:o&&typeof o=="object"&&a!==void 0&&(De.removeInternalAndSame(o,a),Object.keys(o).length||delete A[n])}}static removeInternalForSave(A,t=!0){for(let n in A)(n[0]==="_"||A[n]===null||A[n]===void 0)&&delete A[n];delete A.grid,t&&delete A.el,A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,A.locked||delete A.locked,(A.w===1||A.w===A.minW)&&delete A.w,(A.h===1||A.h===A.minH)&&delete A.h}static throttle(A,t){let n=!1;return(...o)=>{n||(n=!0,setTimeout(()=>{A(...o),n=!1},t))}}static removePositioningStyles(A){const t=A.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(A){if(!A)return document.scrollingElement||document.documentElement;const t=getComputedStyle(A);return/(auto|scroll)/.test(t.overflow+t.overflowY)?A:De.getScrollElement(A.parentElement)}static updateScrollPosition(A,t,n){const o=De.getScrollElement(A);if(!o)return;const a=A.getBoundingClientRect(),u=o.getBoundingClientRect(),d=window.innerHeight||document.documentElement.clientHeight,h=a.bottom-Math.min(u.bottom,d),g=a.top-Math.max(u.top,0),B=o.scrollTop;g<0&&n<0?A.offsetHeight>u.height?o.scrollTop+=n:o.scrollTop+=Math.abs(g)>Math.abs(n)?n:g:h>0&&n>0&&(A.offsetHeight>u.height?o.scrollTop+=n:o.scrollTop+=h>n?n:h),t.top+=o.scrollTop-B}static updateScrollResize(A,t,n){const o=De.getScrollElement(t),a=o.clientHeight,u=o===De.getScrollElement()?0:o.getBoundingClientRect().top,d=A.clientY-u,h=d<n,g=d>a-n;h?o.scrollBy({behavior:"smooth",top:d-n}):g&&o.scrollBy({behavior:"smooth",top:n-(a-d)})}static clone(A){return A==null||typeof A!="object"?A:A instanceof Array?[...A]:{...A}}static cloneDeep(A){const t=["parentGrid","el","grid","subGrid","engine"],n=De.clone(A);for(const o in n)n.hasOwnProperty(o)&&typeof n[o]=="object"&&o.substring(0,2)!=="__"&&!t.find(a=>a===o)&&(n[o]=De.cloneDeep(A[o]));return n}static cloneNode(A){const t=A.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(A,t){let n;typeof t=="string"?n=De.getElement(t):n=t,n&&n.appendChild(A)}static addElStyles(A,t){if(t instanceof Object)for(const n in t)t.hasOwnProperty(n)&&(Array.isArray(t[n])?t[n].forEach(o=>{A.style[n]=o}):A.style[n]=t[n])}static initEvent(A,t){const n={type:t.type},o={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:A.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(a=>n[a]=A[a]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(a=>n[a]=A[a]),{...n,...o}}static simulateMouseEvent(A,t,n){const o=A,a=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:A.screenX,screenY:A.screenY,clientX:A.clientX,clientY:A.clientY,ctrlKey:o.ctrlKey??!1,altKey:o.altKey??!1,shiftKey:o.shiftKey??!1,metaKey:o.metaKey??!1,button:0,relatedTarget:A.target});(n||A.target).dispatchEvent(a)}static getValuesFromTransformedElement(A){const t=document.createElement("div");De.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),A.appendChild(t);const n=t.getBoundingClientRect();return A.removeChild(t),t.remove(),{xScale:1/n.width,yScale:1/n.height,xOffset:n.left,yOffset:n.top}}static swap(A,t,n){if(!A)return;const o=A[t];A[t]=A[n],A[n]=o}static canBeRotated(A){return!(!A||A.w===A.h||A.locked||A.noResize||A.grid?.opts.disableResize||A.minW&&A.minW===A.maxW||A.minH&&A.minH===A.maxH)}},mi=class Bn{constructor(A={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=A.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=A.maxRow,this._float=A.float,this.nodes=A.nodes||[],this.onChange=A.onChange}batchUpdate(A=!0,t=!0){return!!this.batchMode===A?this:(this.batchMode=A,A?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(A,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!A._moving||A._skipDown||t.y<=A.y)}_fixCollisions(A,t=A,n,o={}){if(this.sortNodes(-1),n=n||this.collide(A,t),!n)return!1;if(A._moving&&!o.nested&&!this.float&&this.swap(A,n))return!0;let a=t;!this._loading&&this._useEntireRowArea(A,t)&&(a={x:0,w:this.column,y:t.y,h:t.h},n=this.collide(A,a,o.skip));let u=!1;const d={nested:!0,pack:!1};let h=0;for(;n=n||this.collide(A,a,o.skip);){if(h++>this.nodes.length*2)throw new Error("Infinite collide check");let g;if(n.locked||this._loading||A._moving&&!A._skipDown&&t.y>A.y&&!this.float&&(!this.collide(n,{...n,y:A.y},A)||!this.collide(n,{...n,y:t.y-n.h},A))){A._skipDown=A._skipDown||t.y>A.y;const B={...t,y:n.y+n.h,...d};g=this._loading&&j.samePos(A,B)?!0:this.moveNode(A,B),(n.locked||this._loading)&&g?j.copyPos(t,A):!n.locked&&g&&o.pack&&(this._packNodes(),t.y=n.y+n.h,j.copyPos(A,t)),u=u||g}else g=this.moveNode(n,{...n,y:t.y+t.h,skip:A,...d});if(!g)return u;n=void 0}return u}collide(A,t=A,n){const o=A._id,a=n?._id;return this.nodes.find(u=>u._id!==o&&u._id!==a&&j.isIntercepted(u,t))}collideAll(A,t=A,n){const o=A._id,a=n?._id;return this.nodes.filter(u=>u._id!==o&&u._id!==a&&j.isIntercepted(u,t))}directionCollideCoverage(A,t,n){if(!t.rect||!A._rect)return;const o=A._rect,a={...t.rect};a.y>o.y?(a.h+=a.y-o.y,a.y=o.y):a.h+=o.y-a.y,a.x>o.x?(a.w+=a.x-o.x,a.x=o.x):a.w+=o.x-a.x;let u,d=.5;for(let h of n){if(h.locked||!h._rect)break;const g=h._rect;let B=Number.MAX_VALUE,w=Number.MAX_VALUE;o.y<g.y?B=(a.y+a.h-g.y)/g.h:o.y+o.h>g.y+g.h&&(B=(g.y+g.h-a.y)/g.h),o.x<g.x?w=(a.x+a.w-g.x)/g.w:o.x+o.w>g.x+g.w&&(w=(g.x+g.w-a.x)/g.w);const m=Math.min(w,B);m>d&&(d=m,u=h)}return t.collide=u,u}cacheRects(A,t,n,o,a,u){return this.nodes.forEach(d=>d._rect={y:d.y*t+n,x:d.x*A+u,w:d.w*A-u-o,h:d.h*t-n-a}),this}swap(A,t){if(!t||t.locked||!A||A.locked)return!1;function n(){const a=t.x,u=t.y;return t.x=A.x,t.y=A.y,A.h!=t.h?(A.x=a,A.y=t.y+t.h):A.w!=t.w?(A.x=t.x+t.w,A.y=u):(A.x=a,A.y=u),A._dirty=t._dirty=!0,!0}let o;if(A.w===t.w&&A.h===t.h&&(A.x===t.x||A.y===t.y)&&(o=j.isTouching(A,t)))return n();if(o!==!1){if(A.w===t.w&&A.x===t.x&&(o||(o=j.isTouching(A,t)))){if(t.y<A.y){const a=A;A=t,t=a}return n()}if(o!==!1){if(A.h===t.h&&A.y===t.y&&(o||(o=j.isTouching(A,t)))){if(t.x<A.x){const a=A;A=t,t=a}return n()}return!1}}}isAreaEmpty(A,t,n,o){const a={x:A||0,y:t||0,w:n||1,h:o||1};return!this.collide(a)}compact(A="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const n=this.batchMode;n||this.batchUpdate();const o=this._inColumnResize;o||(this._inColumnResize=!0);const a=this.nodes;return this.nodes=[],a.forEach((u,d,h)=>{let g;u.locked||(u.autoPosition=!0,A==="list"&&d&&(g=h[d-1])),this.addNode(u,!1,g)}),o||delete this._inColumnResize,n||this.batchUpdate(!1),this}set float(A){this._float!==A&&(this._float=A||!1,A||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(A=1){return this.nodes=j.sort(this.nodes,A),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(A=>{if(A._updating||A._orig===void 0||A.y===A._orig.y)return;let t=A.y;for(;t>A._orig.y;)--t,this.collide(A,{x:A.x,y:t,w:A.w,h:A.h})||(A._dirty=!0,A.y=t)}):this.nodes.forEach((A,t)=>{if(!A.locked)for(;A.y>0;){const n=t===0?0:A.y-1;if(!(t===0||!this.collide(A,{x:A.x,y:n,w:A.w,h:A.h})))break;A._dirty=A.y!==n,A.y=n}}),this)}prepareNode(A,t){A._id=A._id??Bn._idSeq++;const n=A.id;if(n){let a=1;for(;this.nodes.find(u=>u.id===A.id&&u!==A);)A.id=n+"_"+a++}(A.x===void 0||A.y===void 0||A.x===null||A.y===null)&&(A.autoPosition=!0);const o={x:0,y:0,w:1,h:1};return j.defaults(A,o),A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,j.sanitizeMinMax(A),typeof A.x=="string"&&(A.x=Number(A.x)),typeof A.y=="string"&&(A.y=Number(A.y)),typeof A.w=="string"&&(A.w=Number(A.w)),typeof A.h=="string"&&(A.h=Number(A.h)),isNaN(A.x)&&(A.x=o.x,A.autoPosition=!0),isNaN(A.y)&&(A.y=o.y,A.autoPosition=!0),isNaN(A.w)&&(A.w=o.w),isNaN(A.h)&&(A.h=o.h),this.nodeBoundFix(A,t),A}nodeBoundFix(A,t){const n=A._orig||j.copyPos({},A);if(A.maxW&&(A.w=Math.min(A.w||1,A.maxW)),A.maxH&&(A.h=Math.min(A.h||1,A.maxH)),A.minW&&(A.w=Math.max(A.w||1,A.minW)),A.minH&&(A.h=Math.max(A.h||1,A.minH)),(A.x||0)+(A.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&A._id!=null&&this.findCacheLayout(A,this.defaultColumn)===-1){const o={...A};o.autoPosition||o.x===void 0?(delete o.x,delete o.y):o.x=Math.min(this.defaultColumn-1,o.x),o.w=Math.min(this.defaultColumn,o.w||1),this.cacheOneLayout(o,this.defaultColumn)}return A.w>this.column?A.w=this.column:A.w<1&&(A.w=1),this.maxRow&&A.h>this.maxRow?A.h=this.maxRow:A.h<1&&(A.h=1),A.x<0&&(A.x=0),A.y<0&&(A.y=0),A.x+A.w>this.column&&(t?A.w=this.column-A.x:A.x=this.column-A.w),this.maxRow&&A.y+A.h>this.maxRow&&(t?A.h=this.maxRow-A.y:A.y=this.maxRow-A.h),j.samePos(A,n)||(A._dirty=!0),this}getDirtyNodes(A){return A?this.nodes.filter(t=>t._dirty&&!j.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(A){if(this.batchMode||!this.onChange)return this;const t=(A||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(A=>{delete A._dirty,delete A._lastTried}),this)}saveInitial(){return this.nodes.forEach(A=>{A._orig=j.copyPos({},A),delete A._dirty}),this._hasLocked=this.nodes.some(A=>A.locked),this}restoreInitial(){return this.nodes.forEach(A=>{!A._orig||j.samePos(A,A._orig)||(j.copyPos(A,A._orig),A._dirty=!0)}),this._notify(),this}findEmptyPosition(A,t=this.nodes,n=this.column,o){const a=o?o.y*n+(o.x+o.w):0;let u=!1;for(let d=a;!u;++d){const h=d%n,g=Math.floor(d/n);if(h+A.w>n)continue;const B={x:h,y:g,w:A.w,h:A.h};t.find(w=>j.isIntercepted(B,w))||((A.x!==h||A.y!==g)&&(A._dirty=!0),A.x=h,A.y=g,delete A.autoPosition,u=!0)}return u}addNode(A,t=!1,n){const o=this.nodes.find(u=>u._id===A._id);if(o)return o;this._inColumnResize?this.nodeBoundFix(A):this.prepareNode(A),delete A._temporaryRemoved,delete A._removeDOM;let a;return A.autoPosition&&this.findEmptyPosition(A,this.nodes,this.column,n)&&(delete A.autoPosition,a=!0),this.nodes.push(A),t&&this.addedNodes.push(A),a||this._fixCollisions(A),this.batchMode||this._packNodes()._notify(),A}removeNode(A,t=!0,n=!1){return this.nodes.find(o=>o._id===A._id)?(n&&this.removedNodes.push(A),t&&(A._removeDOM=!0),this.nodes=this.nodes.filter(o=>o._id!==A._id),A._isAboutToRemove||this._packNodes(),this._notify([A]),this):this}removeAll(A=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;A&&this.nodes.forEach(o=>o._removeDOM=!0);const n=this.nodes;return this.removedNodes=t?n:[],this.nodes=[],this._notify(n)}moveNodeCheck(A,t){if(!this.changedPosConstrain(A,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(A,t);let n;const o=new Bn({column:this.column,float:this.float,nodes:this.nodes.map(u=>u._id===A._id?(n={...u},n):{...u})});if(!n)return!1;const a=o.moveNode(n,t)&&o.getRow()<=Math.max(this.getRow(),this.maxRow);if(!a&&!t.resizing&&t.collide){const u=t.collide.el.gridstackNode;if(this.swap(A,u))return this._notify(),!0}return a?(o.nodes.filter(u=>u._dirty).forEach(u=>{const d=this.nodes.find(h=>h._id===u._id);d&&(j.copyPos(d,u),d._dirty=!0)}),this._notify(),!0):!1}willItFit(A){if(delete A._willFitPos,!this.maxRow)return!0;const t=new Bn({column:this.column,float:this.float,nodes:this.nodes.map(o=>({...o}))}),n={...A};return this.cleanupNode(n),delete n.el,delete n._id,delete n.content,delete n.grid,t.addNode(n),t.getRow()<=this.maxRow?(A._willFitPos=j.copyPos({},n),!0):!1}changedPosConstrain(A,t){return t.w=t.w||A.w,t.h=t.h||A.h,A.x!==t.x||A.y!==t.y?!0:(A.maxW&&(t.w=Math.min(t.w,A.maxW)),A.maxH&&(t.h=Math.min(t.h,A.maxH)),A.minW&&(t.w=Math.max(t.w,A.minW)),A.minH&&(t.h=Math.max(t.h,A.minH)),A.w!==t.w||A.h!==t.h)}moveNode(A,t){if(!A||!t)return!1;let n;t.pack===void 0&&!this.batchMode&&(n=t.pack=!0),typeof t.x!="number"&&(t.x=A.x),typeof t.y!="number"&&(t.y=A.y),typeof t.w!="number"&&(t.w=A.w),typeof t.h!="number"&&(t.h=A.h);const o=A.w!==t.w||A.h!==t.h,a=j.copyPos({},A,!0);if(j.copyPos(a,t),this.nodeBoundFix(a,o),j.copyPos(t,a),!t.forceCollide&&j.samePos(A,t))return!1;const u=j.copyPos({},A),d=this.collideAll(A,a,t.skip);let h=!0;if(d.length){const g=A._moving&&!t.nested;let B=g?this.directionCollideCoverage(A,t,d):d[0];if(g&&B&&A.grid?.opts?.subGridDynamic&&!A.grid._isTemp){const w=j.areaIntercept(t.rect,B._rect),m=j.area(t.rect),v=j.area(B._rect);w/(m<v?m:v)>.8&&(B.grid.makeSubGrid(B.el,void 0,A),B=void 0)}B?h=!this._fixCollisions(A,a,B,t):(h=!1,n&&delete t.pack)}return h&&!j.samePos(A,a)&&(A._dirty=!0,j.copyPos(A,a)),t.pack&&this._packNodes()._notify(),!j.samePos(A,u)}getRow(){return this.nodes.reduce((A,t)=>Math.max(A,t.y+t.h),0)}beginUpdate(A){return A._updating||(A._updating=!0,delete A._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const A=this.nodes.find(t=>t._updating);return A&&(delete A._updating,delete A._skipDown),this}save(A=!0,t,n){const o=this._layouts?.length||0;let a;o&&(n?n!==this.column&&(a=this._layouts[n]):this.column!==o-1&&(a=this._layouts[o-1]));const u=[];return this.sortNodes(),this.nodes.forEach(d=>{const h=a?.find(B=>B._id===d._id),g={...d,...h||{}};j.removeInternalForSave(g,!A),t&&t(d,g),u.push(g)}),u}layoutsNodesChange(A){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,n)=>{if(!t||n===this.column)return this;if(n<this.column)this._layouts[n]=void 0;else{const o=n/this.column;A.forEach(a=>{if(!a._orig)return;const u=t.find(d=>d._id===a._id);u&&(u.y>=0&&a.y!==a._orig.y&&(u.y+=a.y-a._orig.y,u.y<0&&(u.y=0)),a.x!==a._orig.x&&(u.x=Math.round(a.x*o),u.x<0&&(u.x=0)),a.w!==a._orig.w&&(u.w=Math.round(a.w*o),u.w<1&&(u.w=1)))})}}),this)}columnChanged(A,t,n="moveScale"){if(!this.nodes.length||!t||A===t)return this;const o=n==="compact"||n==="list";o&&this.sortNodes(1),t<A&&this.cacheLayout(this.nodes,A),this.batchUpdate();let a=[],u=o?this.nodes:j.sort(this.nodes,-1);if(t>A&&this._layouts){const d=this._layouts[t]||[],h=this._layouts.length-1;!d.length&&A!==h&&this._layouts[h]?.length&&(A=h,this._layouts[h].forEach(g=>{const B=u.find(w=>w._id===g._id);B&&(!o&&!g.autoPosition&&(B.x=g.x??B.x,B.y=g.y??B.y),B.w=g.w??B.w,(g.x==null||g.y===void 0)&&(B.autoPosition=!0))})),d.forEach(g=>{const B=u.findIndex(w=>w._id===g._id);if(B!==-1){const w=u[B];if(o){w.w=g.w;return}(g.autoPosition||isNaN(g.x)||isNaN(g.y))&&this.findEmptyPosition(g,a),g.autoPosition||(w.x=g.x??w.x,w.y=g.y??w.y,w.w=g.w??w.w,a.push(w)),u.splice(B,1)}})}if(o)this.compact(n,!1);else{if(u.length)if(typeof n=="function")n(t,A,a,u);else{const d=o||n==="none"?1:t/A,h=n==="move"||n==="moveScale",g=n==="scale"||n==="moveScale";u.forEach(B=>{B.x=t===1?0:h?Math.round(B.x*d):Math.min(B.x,t-1),B.w=t===1||A===1?1:g?Math.round(B.w*d)||1:Math.min(B.w,t),a.push(B)}),u=[]}a=j.sort(a,-1),this._inColumnResize=!0,this.nodes=[],a.forEach(d=>{this.addNode(d,!1),delete d._orig})}return this.nodes.forEach(d=>delete d._orig),this.batchUpdate(!1,!o),delete this._inColumnResize,this}cacheLayout(A,t,n=!1){const o=[];return A.forEach((a,u)=>{a._id===void 0&&(a._id=(a.id?this.nodes.find(d=>d.id===a.id):void 0)?._id??Bn._idSeq++),o[u]={x:a.x,y:a.y,w:a.w,_id:a._id}}),this._layouts=n?[]:this._layouts||[],this._layouts[t]=o,this}cacheOneLayout(A,t){A._id=A._id??Bn._idSeq++;const n={x:A.x,y:A.y,w:A.w,_id:A._id};(A.autoPosition||A.x===void 0)&&(delete n.x,delete n.y,A.autoPosition&&(n.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const o=this.findCacheLayout(A,t);return o===-1?this._layouts[t].push(n):this._layouts[t][o]=n,this}findCacheLayout(A,t){return this._layouts?.[t]?.findIndex(n=>n._id===A._id)??-1}removeNodeFromLayoutCache(A){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const n=this.findCacheLayout(A,t);n!==-1&&this._layouts[t].splice(n,1)}}cleanupNode(A){for(const t in A)t[0]==="_"&&t!=="_id"&&delete A[t];return this}};mi._idSeq=0;var Fe={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},NA=class{},ke=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),be=class{};function kr(e,A){e.touches.length>1||(e.cancelable&&e.preventDefault(),j.simulateMouseEvent(e.changedTouches[0],A))}function ol(e,A){e.cancelable&&e.preventDefault(),j.simulateMouseEvent(e,A)}function Mr(e){be.touchHandled||(be.touchHandled=!0,kr(e,"mousedown"))}function Kr(e){be.touchHandled&&kr(e,"mousemove")}function Or(e){if(!be.touchHandled)return;be.pointerLeaveTimeout&&(window.clearTimeout(be.pointerLeaveTimeout),delete be.pointerLeaveTimeout);const A=!!NA.dragElement;kr(e,"mouseup"),A||kr(e,"click"),be.touchHandled=!1}function Rr(e){e.pointerType!=="mouse"&&e.target.releasePointerCapture(e.pointerId)}function il(e){NA.dragElement&&e.pointerType!=="mouse"&&ol(e,"mouseenter")}function sl(e){NA.dragElement&&e.pointerType!=="mouse"&&(be.pointerLeaveTimeout=window.setTimeout(()=>{delete be.pointerLeaveTimeout,ol(e,"mouseleave")},10))}var al=class pu{constructor(A,t,n){this.host=A,this.dir=t,this.option=n,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(A){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",A)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${pu.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),ke&&(this.el.addEventListener("touchstart",Mr),this.el.addEventListener("pointerdown",Rr)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),ke&&(this.el.removeEventListener("touchstart",Mr),this.el.removeEventListener("pointerdown",Rr)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(A){this.mouseDownEvent=A,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ke&&(this.el.addEventListener("touchmove",Kr),this.el.addEventListener("touchend",Or)),A.stopPropagation(),A.preventDefault()}_mouseMove(A){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",A):Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",A),document.addEventListener("keydown",this._keyEvent)),A.stopPropagation()}_mouseUp(A){this.moving&&(this._triggerEvent("stop",A),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ke&&(this.el.removeEventListener("touchmove",Kr),this.el.removeEventListener("touchend",Or)),delete this.moving,delete this.mouseDownEvent,A.stopPropagation(),A.preventDefault()}_keyEvent(A){A.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(A,t){return this.option[A]&&this.option[A](t),this}};al.prefix="ui-resizable-";var wi=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,A){this._eventRegister[e]=A}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,A){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](A)}},ll=class ts extends wi{constructor(A,t={}){super(),this.el=A,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const n=this.el.parentElement.getBoundingClientRect(),o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||o;return{position:{left:(a.left-n.left)*this.rectScale.x,top:(a.top-n.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(A){const t=A.handles&&A.handles!==this.option.handles,n=A.autoHide&&A.autoHide!==this.option.autoHide;return Object.keys(A).forEach(o=>this.option[o]=A[o]),t&&(this._removeHandlers(),this._setupHandlers()),n&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(A){return A?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),NA.overResizeElement===this&&delete NA.overResizeElement),this}_mouseOver(A){NA.overResizeElement||NA.dragElement||(NA.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(A){NA.overResizeElement===this&&(delete NA.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(A=>A.trim()).map(A=>new al(this.el,A,{element:this.option.element,start:t=>this._resizeStart(t),stop:t=>this._resizeStop(t),move:t=>this._resizing(t,A)})),this}_resizeStart(A){this.sizeToContent=j.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=j.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=A,this._setupHelper(),this._applyChange();const t=j.initEvent(A,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(A,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(A,t),this._applyChange();const n=j.initEvent(A,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(n,this._ui()),this.triggerEvent("resize",n),this}_resizeStop(A){const t=j.initEvent(A,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=ts._originStyleProp.map(n=>this.el.style[n]),this.parentOriginStylePosition=this.el.parentElement.style.position;const A=this.el.parentElement,t=j.getValuesFromTransformedElement(A);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return ts._originStyleProp.forEach((A,t)=>{this.el.style[A]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(A,t){const n=this.startEvent,o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=A.clientX-n.clientX,u=this.sizeToContent?0:A.clientY-n.clientY;let d,h;t.indexOf("e")>-1?o.width+=a:t.indexOf("w")>-1&&(o.width-=a,o.left+=a,d=!0),t.indexOf("s")>-1?o.height+=u:t.indexOf("n")>-1&&(o.height-=u,o.top+=u,h=!0);const g=this._constrainSize(o.width,o.height,d,h);return Math.round(o.width)!==Math.round(g.width)&&(t.indexOf("w")>-1&&(o.left+=o.width-g.width),o.width=g.width),Math.round(o.height)!==Math.round(g.height)&&(t.indexOf("n")>-1&&(o.top+=o.height-g.height),o.height=g.height),o}_constrainSize(A,t,n,o){const a=this.option,u=(n?a.maxWidthMoveLeft:a.maxWidth)||Number.MAX_SAFE_INTEGER,d=a.minWidth/this.rectScale.x||A,h=(o?a.maxHeightMoveUp:a.maxHeight)||Number.MAX_SAFE_INTEGER,g=a.minHeight/this.rectScale.y||t;return{width:Math.min(u,Math.max(d,A)),height:Math.min(h,Math.max(g,t))}}_applyChange(){let A={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const{left:t,top:n}=this.el.parentElement.getBoundingClientRect();A={left:t,top:n,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const n=this.temporalRect[t],o=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(n-A[t])*o+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(A=>A.destroy()),delete this.handlers,this}};ll._originStyleProp=["width","height","position","left","top","opacity","zIndex"];var Dm='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',cl=class ns extends wi{constructor(A,t={}){super(),this.el=A,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const n=t?.handle?.substring(1),o=A.gridstackNode;this.dragEls=!n||A.classList.contains(n)?[A]:o?.subGrid?[A.querySelector(t.handle)||A]:Array.from(A.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[A]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(A=>{A.addEventListener("mousedown",this._mouseDown),ke&&(A.addEventListener("touchstart",Mr),A.addEventListener("pointerdown",Rr))}),this.el.classList.remove("ui-draggable-disabled"))}disable(A=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),ke&&(t.removeEventListener("touchstart",Mr),t.removeEventListener("pointerdown",Rr))}),A||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(A){return Object.keys(A).forEach(t=>this.option[t]=A[t]),this}_mouseDown(A){if(be.touchHandled&&A.isTrusted&&(be.touchHandled=!1),!NA.mouseHandled)return A.button!==0||!this.dragEls.find(t=>t===A.target)&&A.target.closest(Dm)||this.option.cancel&&A.target.closest(this.option.cancel)||(this.mouseDownEvent=A,delete this.dragging,delete NA.dragElement,delete NA.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ke&&(A.currentTarget.addEventListener("touchmove",Kr),A.currentTarget.addEventListener("touchend",Or)),A.preventDefault(),document.activeElement&&document.activeElement.blur(),NA.mouseHandled=!0),!0}_callDrag(A){if(!this.dragging)return;const t=j.initEvent(A,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(A){const t=this.mouseDownEvent;if(this.lastDrag=A,this.dragging)if(this._dragFollow(A),NA.pauseDrag){const n=Number.isInteger(NA.pauseDrag)?NA.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(A),n)}else this._callDrag(A);else if(Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>3){this.dragging=!0,NA.dragElement=this;const n=this.el.gridstackNode?.grid;n?NA.dropElement=n.el.ddElement.ddDroppable:delete NA.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=j.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(A,this.el,this.helperContainment),this._setupHelperStyle(A);const o=j.initEvent(A,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(o,this.ui()),this.triggerEvent("dragstart",o),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(A){if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ke&&A.currentTarget&&(A.currentTarget.removeEventListener("touchmove",Kr,!0),A.currentTarget.removeEventListener("touchend",Or,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),NA.dropElement?.el===this.el.parentElement&&delete NA.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const t=j.initEvent(A,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(t),this.triggerEvent("dragstop",t),NA.dropElement&&NA.dropElement.drop(A)}delete this.helper,delete this.mouseDownEvent,delete NA.dragElement,delete NA.dropElement,delete NA.mouseHandled,A.preventDefault()}_keyEvent(A){const t=this.el.gridstackNode,n=t?.grid||NA.dropElement?.el?.gridstack;if(A.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),n?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&n&&(A.key==="r"||A.key==="R")){if(!j.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,n.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",j.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let A=this.el;return typeof this.option.helper=="function"?A=this.option.helper(this.el):this.option.helper==="clone"&&(A=j.cloneNode(this.el)),A.parentElement||j.appendTo(A,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=ns.originStyleProp.map(t=>this.el.style[t]),A}_setupHelperStyle(A){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(A),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){const A=this.helper,t=this.dragElementOriginStyle.transition||null;A.style.transition=this.dragElementOriginStyle.transition="none",ns.originStyleProp.forEach(n=>A.style[n]=this.dragElementOriginStyle[n]||null),setTimeout(()=>A.style.transition=t,50)}return delete this.dragElementOriginStyle,this}_dragFollow(A){const t={left:0,top:0},n=this.helper.style,o=this.dragOffset;n.left=(A.clientX+o.offsetLeft-t.left)*this.dragTransform.xScale+"px",n.top=(A.clientY+o.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(A,t,n){let o=0,a=0;n&&(o=this.dragTransform.xOffset,a=this.dragTransform.yOffset);const u=t.getBoundingClientRect();return{left:u.left,top:u.top,offsetLeft:-A.clientX+u.left-o,offsetTop:-A.clientY+u.top-a,width:u.width*this.dragTransform.xScale,height:u.height*this.dragTransform.yScale}}ui(){const A=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:(t.top-A.top)*this.dragTransform.yScale,left:(t.left-A.left)*this.dragTransform.xScale}}}};cl.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];var Nm=class extends wi{constructor(e,A={}){super(),this.el=e,this.option=A,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,A){super.on(e,A)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),ke&&(this.el.addEventListener("pointerenter",il),this.el.addEventListener("pointerleave",sl)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),ke&&(this.el.removeEventListener("pointerenter",il),this.el.removeEventListener("pointerleave",sl)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(A=>this.option[A]=e[A]),this._setupAccept(),this}_mouseEnter(e){if(!NA.dragElement||be.touchHandled&&e.isTrusted||!this._canDrop(NA.dragElement.el))return;e.preventDefault(),e.stopPropagation(),NA.dropElement&&NA.dropElement!==this&&NA.dropElement._mouseLeave(e,!0),NA.dropElement=this;const A=j.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(A,this._ui(NA.dragElement)),this.triggerEvent("dropover",A),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,A=!1){if(!NA.dragElement||NA.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const t=j.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(t,this._ui(NA.dragElement)),this.triggerEvent("dropout",t),NA.dropElement===this&&(delete NA.dropElement,!A)){let n,o=this.el.parentElement;for(;!n&&o;)n=o.ddElement?.ddDroppable,o=o.parentElement;n&&n._mouseEnter(e)}}drop(e){e.preventDefault();const A=j.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(A,this._ui(NA.dragElement)),this.triggerEvent("drop",A)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}},Lm=class mu{static init(A){return A.ddElement||(A.ddElement=new mu(A)),A.ddElement}constructor(A){this.el=A}on(A,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.on(A,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.on(A,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.on(A,t),this}off(A){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.off(A):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.off(A):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.off(A),this}setupDraggable(A){return this.ddDraggable?this.ddDraggable.updateOption(A):this.ddDraggable=new cl(this.el,A),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(A){return this.ddResizable?this.ddResizable.updateOption(A):this.ddResizable=new ll(this.el,A),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(A){return this.ddDroppable?this.ddDroppable.updateOption(A):this.ddDroppable=new Nm(this.el,A),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},Tm=class{resizable(e,A,t,n){return this._getDDElements(e,A).forEach(o=>{if(A==="disable"||A==="enable")o.ddResizable&&o.ddResizable[A]();else if(A==="destroy")o.ddResizable&&o.cleanResizable();else if(A==="option")o.setupResizable({[t]:n});else{const a=o.el.gridstackNode.grid;let u=o.el.getAttribute("gs-resize-handles")||a.opts.resizable.handles||"e,s,se";u==="all"&&(u="n,e,s,w,se,sw,ne,nw");const d=!a.opts.alwaysShowResizeHandle;o.setupResizable({...a.opts.resizable,handles:u,autoHide:d,start:A.start,stop:A.stop,resize:A.resize})}}),this}draggable(e,A,t,n){return this._getDDElements(e,A).forEach(o=>{if(A==="disable"||A==="enable")o.ddDraggable&&o.ddDraggable[A]();else if(A==="destroy")o.ddDraggable&&o.cleanDraggable();else if(A==="option")o.setupDraggable({[t]:n});else{const a=o.el.gridstackNode.grid;o.setupDraggable({...a.opts.draggable,start:A.start,stop:A.stop,drag:A.drag})}}),this}dragIn(e,A){return this._getDDElements(e).forEach(t=>t.setupDraggable(A)),this}droppable(e,A,t,n){return typeof A.accept=="function"&&!A._accept&&(A._accept=A.accept,A.accept=o=>A._accept(o)),this._getDDElements(e,A).forEach(o=>{A==="disable"||A==="enable"?o.ddDroppable&&o.ddDroppable[A]():A==="destroy"?o.ddDroppable&&o.cleanDroppable():A==="option"?o.setupDroppable({[t]:n}):o.setupDroppable(A)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,A,t){return this._getDDElements(e).forEach(n=>n.on(A,o=>{t(o,NA.dragElement?NA.dragElement.el:o.target,NA.dragElement?NA.dragElement.helper:null)})),this}off(e,A){return this._getDDElements(e).forEach(t=>t.off(A)),this}_getDDElements(e,A){const t=e.gridstack||A!=="destroy"&&A!=="disable",n=j.getElements(e);return n.length?n.map(o=>o.ddElement||(t?Lm.init(o):null)).filter(o=>o):[]}},me=new Tm,en=class DA{static init(A={},t=".grid-stack"){if(typeof document>"u")return null;const n=DA.getGridElement(t);return n?(n.gridstack||(n.gridstack=new DA(n,j.cloneDeep(A))),n.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
26
+ Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"},ce=class extends Error{constructor(e,...A){var t;super((t=Sa[e])==null?void 0:t.call(Sa,...A)),this.name="VueFlowError",this.code=e,this.args=A}};function si(e){return"clientX"in e}function nB(e){return"sourceEvent"in e}function Ge(e,A){const t=si(e);let n,o;return t?(n=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(n=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(n=0,o=0),{x:n-(A?.left??0),y:o-(A?.top??0)}}var br=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function rB(e){var A,t;return{width:((A=e.dimensions)==null?void 0:A.width)??e.width??0,height:((t=e.dimensions)==null?void 0:t.height)??e.height??0}}function Hr(e,A=[1,1]){return{x:A[0]*Math.round(e.x/A[0]),y:A[1]*Math.round(e.y/A[1])}}var oB=()=>!0;function ai(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function iB(e,A,t){const n=[],o={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of A.values())Er(o,Qr(a))>0&&n.push(a);return n}var sB=250;function aB(e,A,t,n){var o,a;let u=[],d=Number.POSITIVE_INFINITY;const h=iB(e,t,A+sB);for(const g of h){const B=[...((o=g.handleBounds)==null?void 0:o.source)??[],...((a=g.handleBounds)==null?void 0:a.target)??[]];for(const w of B){if(n.nodeId===w.nodeId&&n.type===w.type&&n.id===w.id)continue;const{x:m,y:v}=qt(g,w,w.position,!0),Q=Math.sqrt((m-e.x)**2+(v-e.y)**2);Q>A||(Q<d?(u=[{...w,x:m,y:v}],d=Q):Q===d&&u.push({...w,x:m,y:v}))}}if(!u.length)return null;if(u.length>1){const g=n.type==="source"?"target":"source";return u.find(B=>B.type===g)??u[0]}return u[0]}function xa(e,{handle:A,connectionMode:t,fromNodeId:n,fromHandleId:o,fromType:a,doc:u,lib:d,flowId:h,isValidConnection:g=oB},B,w,m,v){const Q=a==="target",H=A?u.querySelector(`.${d}-flow__handle[data-id="${h}-${A?.nodeId}-${A?.id}-${A?.type}"]`):null,{x:N,y:L}=Ge(e),R=u.elementFromPoint(N,L),U=R?.classList.contains(`${d}-flow__handle`)?R:H,k={handleDomNode:U,isValid:!1,connection:null,toHandle:null};if(U){const eA=Da(void 0,U),Y=U.getAttribute("data-nodeid"),sA=U.getAttribute("data-handleid"),lA=U.classList.contains("connectable"),nA=U.classList.contains("connectableend");if(!Y||!eA)return k;const tA={source:Q?Y:n,sourceHandle:Q?sA:o,target:Q?n:Y,targetHandle:Q?o:sA};k.connection=tA,k.isValid=lA&&nA&&(t===At.Strict?Q&&eA==="source"||!Q&&eA==="target":Y!==n||sA!==o)&&g(tA,{nodes:w,edges:B,sourceNode:m(tA.source),targetNode:m(tA.target)}),k.toHandle=Na(Y,eA,sA,v,t,!0)}return k}function Da(e,A){return e||(A?.classList.contains("target")?"target":A?.classList.contains("source")?"source":null)}function lB(e,A){let t=null;return A?t="valid":e&&!A&&(t="invalid"),t}function cB(e,A){let t=null;return A?t=!0:e&&!A&&(t=!1),t}function Na(e,A,t,n,o,a=!1){var u,d,h;const g=n.get(e);if(!g)return null;const B=o===At.Strict?(u=g.handleBounds)==null?void 0:u[A]:[...((d=g.handleBounds)==null?void 0:d.source)??[],...((h=g.handleBounds)==null?void 0:h.target)??[]],w=(t?B?.find(m=>m.id===t):B?.[0])??null;return w&&a?{...w,...qt(g,w,w.position,!0)}:w}var li={[IA.Left]:IA.Right,[IA.Right]:IA.Left,[IA.Top]:IA.Bottom,[IA.Bottom]:IA.Top},uB=["production","prod"];function Tn(e,...A){La()&&console.warn(`[Vue Flow]: ${e}`,...A)}function La(){return!uB.includes(process.env.NODE_ENV||"")}function Ta(e,A,t,n,o){const a=A.querySelectorAll(`.vue-flow__handle.${e}`);return a?.length?Array.from(a).map(u=>{const d=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:o,position:u.getAttribute("data-handlepos"),x:(d.left-t.left)/n,y:(d.top-t.top)/n,...Ur(u)}}):null}function ci(e,A,t,n,o,a=!1,u){o.value=!1,e.selected?(a||e.selected&&A)&&(n([e]),(0,r.nextTick)(()=>{u.blur()})):t([e])}function se(e){return typeof(0,r.unref)(e)<"u"}function dB(e,A,t,n){if(!e||!e.source||!e.target)return t(new ce(ie.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let o;return ft(e)?o=e:o={...e,id:fa(e)},o=ua(o,void 0,n),zh(o,A)?!1:o}function fB(e,A,t,n,o){if(!A.source||!A.target)return o(new ce(ie.EDGE_INVALID,e.id)),!1;if(!t)return o(new ce(ie.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...u}=e;return{...u,id:n?fa(A):a,source:A.source,target:A.target,sourceHandle:A.sourceHandle,targetHandle:A.targetHandle}}function ka(e,A,t){const n={},o=[];for(let a=0;a<e.length;++a){const u=e[a];if(!Lt(u)){t(new ce(ie.NODE_INVALID,u?.id));continue}const d=Vh(u,A(u.id),u.parentNode);u.parentNode&&(n[u.parentNode]=!0),o[a]=d}for(const a of o){const u=A(a.parentNode)||o.find(d=>d.id===a.parentNode);a.parentNode&&!u&&t(new ce(ie.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||n[a.id])&&(n[a.id]&&(a.isParent=!0),u&&(u.isParent=!0))}return o}function Ma(e,A,t,n,o,a){let u=o;const d=n.get(u)||new Map;n.set(u,d.set(t,A)),u=`${o}-${e}`;const h=n.get(u)||new Map;if(n.set(u,h.set(t,A)),a){u=`${o}-${e}-${a}`;const g=n.get(u)||new Map;n.set(u,g.set(t,A))}}function ui(e,A,t){e.clear();for(const n of t){const{source:o,target:a,sourceHandle:u=null,targetHandle:d=null}=n,h={edgeId:n.id,source:o,target:a,sourceHandle:u,targetHandle:d},g=`${o}-${u}--${a}-${d}`;Ma("source",h,`${a}-${d}--${o}-${u}`,e,o,u),Ma("target",h,g,e,a,d)}}function Ka(e,A){if(e.size!==A.size)return!1;for(const t of e)if(!A.has(t))return!1;return!0}function di(e,A,t,n,o,a,u,d){const h=[];for(const g of e){const B=ft(g)?g:dB(g,d,o,a);if(!B)continue;const w=t(B.source),m=t(B.target);if(!w||!m){o(new ce(ie.EDGE_SOURCE_TARGET_MISSING,B.id,B.source,B.target));continue}if(!w){o(new ce(ie.EDGE_SOURCE_MISSING,B.id,B.source));continue}if(!m){o(new ce(ie.EDGE_TARGET_MISSING,B.id,B.target));continue}if(A&&!A(B,{edges:d,nodes:u,sourceNode:w,targetNode:m})){o(new ce(ie.EDGE_INVALID,B.id));continue}const v=n(B.id);h.push({...ua(B,v,a),sourceNode:w,targetNode:m})}return h}var Oa=Symbol("vueFlow"),Ra=Symbol("nodeId"),Va=Symbol("nodeRef"),gB=Symbol("edgeId"),hB=Symbol("edgeRef"),Ir=Symbol("slots");function Pa(e){const{vueFlowRef:A,snapToGrid:t,snapGrid:n,noDragClassName:o,nodeLookup:a,nodeExtent:u,nodeDragThreshold:d,viewport:h,autoPanOnNodeDrag:g,autoPanSpeed:B,nodesDraggable:w,panBy:m,findNode:v,multiSelectionActive:Q,nodesSelectionActive:H,selectNodesOnDrag:N,removeSelectedElements:L,addSelectedNodes:R,updateNodePositions:U,emits:k}=YA(),{onStart:eA,onDrag:Y,onStop:sA,onClick:lA,el:nA,disabled:tA,id:AA,selectable:T,dragHandle:aA}=e,I=(0,r.shallowRef)(!1);let J=[],F,S=null,V={x:void 0,y:void 0},O={x:0,y:0},z=null,q=!1,rA=!1,uA=0,FA=!1;const P=mB(),W=({x:cA,y:mA})=>{V={x:cA,y:mA};let _=!1;if(J=J.map(b=>{const x={x:cA-b.distance.x,y:mA-b.distance.y},{computedPosition:$}=ii(b,t.value?Hr(x,n.value):x,k.error,u.value,b.parentNode?v(b.parentNode):void 0);return _=_||b.position.x!==$.x||b.position.y!==$.y,b.position=$,b}),rA=rA||_,!!_&&(U(J,!0,!0),I.value=!0,z)){const[b,x]=oi({id:AA,dragItems:J,findNode:v});Y({event:z,node:b,nodes:x})}},X=()=>{if(!S)return;const[cA,mA]=ya(O,S,B.value);if(cA!==0||mA!==0){const _={x:(V.x??0)-cA/h.value.zoom,y:(V.y??0)-mA/h.value.zoom};m({x:cA,y:mA})&&W(_)}uA=requestAnimationFrame(X)},oA=(cA,mA)=>{q=!0;const _=v(AA);!N.value&&!Q.value&&_&&(_.selected||L()),_&&(0,r.toValue)(T)&&N.value&&ci(_,Q.value,R,L,H,!1,mA);const b=P(cA.sourceEvent);if(V=b,J=Zh(a.value,w.value,b,AA),J.length){const[x,$]=oi({id:AA,dragItems:J,findNode:v});eA({event:cA.sourceEvent,node:x,nodes:$})}},hA=(cA,mA)=>{var _;cA.sourceEvent.type==="touchmove"&&cA.sourceEvent.touches.length>1||(rA=!1,d.value===0&&oA(cA,mA),V=P(cA.sourceEvent),S=((_=A.value)==null?void 0:_.getBoundingClientRect())||null,O=Ge(cA.sourceEvent,S))},wA=(cA,mA)=>{const _=P(cA.sourceEvent);if(!FA&&q&&g.value&&(FA=!0,X()),!q){const b=_.xSnapped-(V.x??0),x=_.ySnapped-(V.y??0);Math.sqrt(b*b+x*x)>d.value&&oA(cA,mA)}(V.x!==_.xSnapped||V.y!==_.ySnapped)&&J.length&&q&&(z=cA.sourceEvent,O=Ge(cA.sourceEvent,S),W(_))},bA=cA=>{let mA=!1;if(!q&&!I.value&&!Q.value){const _=cA.sourceEvent,b=P(_),x=b.xSnapped-(V.x??0),$=b.ySnapped-(V.y??0),K=Math.sqrt(x*x+$*$);K!==0&&K<=d.value&&(lA?.(_),mA=!0)}if(J.length&&!mA){rA&&(U(J,!1,!1),rA=!1);const[_,b]=oi({id:AA,dragItems:J,findNode:v});sA({event:cA.sourceEvent,node:_,nodes:b})}J=[],I.value=!1,FA=!1,q=!1,V={x:void 0,y:void 0},cancelAnimationFrame(uA)};return(0,r.watch)([()=>(0,r.toValue)(tA),nA],([cA,mA],_,b)=>{if(mA){const x=Ne(mA);cA||(F=Rf().on("start",$=>hA($,mA)).on("drag",$=>wA($,mA)).on("end",$=>bA($)).filter($=>{const K=$.target,BA=(0,r.toValue)(aA);return!$.button&&(!o.value||!Ha(K,`.${o.value}`,mA)&&(!BA||Ha(K,BA,mA)))}),x.call(F)),b(()=>{x.on(".drag",null),F&&(F.on("start",null),F.on("drag",null),F.on("end",null))})}}),I}function BB(){return{doubleClick:QA(),click:QA(),mouseEnter:QA(),mouseMove:QA(),mouseLeave:QA(),contextMenu:QA(),updateStart:QA(),update:QA(),updateEnd:QA()}}function pB(e,A){const t=BB();return t.doubleClick.on(n=>{var o,a;A.edgeDoubleClick(n),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,n)}),t.click.on(n=>{var o,a;A.edgeClick(n),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,n)}),t.mouseEnter.on(n=>{var o,a;A.edgeMouseEnter(n),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,n)}),t.mouseMove.on(n=>{var o,a;A.edgeMouseMove(n),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,n)}),t.mouseLeave.on(n=>{var o,a;A.edgeMouseLeave(n),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,n)}),t.contextMenu.on(n=>{var o,a;A.edgeContextMenu(n),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,n)}),t.updateStart.on(n=>{var o,a;A.edgeUpdateStart(n),(a=(o=e.events)==null?void 0:o.updateStart)==null||a.call(o,n)}),t.update.on(n=>{var o,a;A.edgeUpdate(n),(a=(o=e.events)==null?void 0:o.update)==null||a.call(o,n)}),t.updateEnd.on(n=>{var o,a;A.edgeUpdateEnd(n),(a=(o=e.events)==null?void 0:o.updateEnd)==null||a.call(o,n)}),Object.entries(t).reduce((n,[o,a])=>(n.emit[o]=a.trigger,n.on[o]=a.on,n),{emit:{},on:{}})}function mB(){const{viewport:e,snapGrid:A,snapToGrid:t,vueFlowRef:n}=YA();return o=>{var a;const u=((a=n.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},{x:d,y:h}=Ge(nB(o)?o.sourceEvent:o,u),g=Nn({x:d,y:h},e.value),{x:B,y:w}=t.value?Hr(g,A.value):g;return{xSnapped:B,ySnapped:w,...g}}}function _r(){return!0}function Ga({handleId:e,nodeId:A,type:t,isValidConnection:n,edgeUpdaterType:o,onEdgeUpdate:a,onEdgeUpdateEnd:u}){const{id:d,vueFlowRef:h,connectionMode:g,connectionRadius:B,connectOnClick:w,connectionClickStartHandle:m,nodesConnectable:v,autoPanOnConnect:Q,autoPanSpeed:H,findNode:N,panBy:L,startConnection:R,updateConnection:U,endConnection:k,emits:eA,viewport:Y,edges:sA,nodes:lA,isValidConnection:nA,nodeLookup:tA}=YA();let AA=null,T=!1,aA=null;function I(F){var S;const V=(0,r.toValue)(t)==="target",O=si(F),z=ca(F.target),q=F.currentTarget;if(q&&(O&&F.button===0||!O)){let rA=function(HA){_=Ge(HA,bA),W=aB(Nn(_,Y.value,!1,[1,1]),B.value,tA.value,$),b||(x(),b=!0);const CA=xa(HA,{handle:W,connectionMode:g.value,fromNodeId:(0,r.toValue)(A),fromHandleId:(0,r.toValue)(e),fromType:V?"target":"source",isValidConnection:P,doc:z,lib:"vue",flowId:d,nodeLookup:tA.value},sA.value,lA.value,N,tA.value);aA=CA.handleDomNode,AA=CA.connection,T=cB(!!W,CA.isValid);const LA={...gA,isValid:T,to:CA.toHandle&&T?Dn({x:CA.toHandle.x,y:CA.toHandle.y},Y.value):_,toHandle:CA.toHandle,toPosition:T&&CA.toHandle?CA.toHandle.position:li[$.position],toNode:CA.toHandle?tA.value.get(CA.toHandle.nodeId):null};if(T&&W&&gA?.toHandle&&LA.toHandle&&gA.toHandle.type===LA.toHandle.type&&gA.toHandle.nodeId===LA.toHandle.nodeId&&gA.toHandle.id===LA.toHandle.id&&gA.to.x===LA.to.x&&gA.to.y===LA.to.y)return;const KA=W??CA.toHandle;if(U(KA&&T?Dn({x:KA.x,y:KA.y},Y.value):_,KA,lB(!!KA,T)),gA=LA,!W&&!T&&!aA)return ai(mA);AA&&AA.source!==AA.target&&aA&&(ai(mA),mA=aA,aA.classList.add("connecting","vue-flow__handle-connecting"),aA.classList.toggle("valid",!!T),aA.classList.toggle("vue-flow__handle-valid",!!T))},uA=function(HA){"touches"in HA&&HA.touches.length>0||((W||aA)&&AA&&T&&(a?a(HA,AA):eA.connect(AA)),eA.connectEnd(HA),o&&u?.(HA),ai(mA),cancelAnimationFrame(X),k(HA),b=!1,T=!1,AA=null,aA=null,z.removeEventListener("mousemove",rA),z.removeEventListener("mouseup",uA),z.removeEventListener("touchmove",rA),z.removeEventListener("touchend",uA))};const FA=N((0,r.toValue)(A));let P=(0,r.toValue)(n)||nA.value||_r;!P&&FA&&(P=(V?FA.isValidSourcePos:FA.isValidTargetPos)||_r);let W,X=0;const{x:oA,y:hA}=Ge(F),wA=Da((0,r.toValue)(o),q),bA=(S=h.value)==null?void 0:S.getBoundingClientRect();if(!bA||!wA)return;const cA=Na((0,r.toValue)(A),wA,(0,r.toValue)(e),tA.value,g.value);if(!cA)return;let mA,_=Ge(F,bA),b=!1;const x=()=>{if(!Q.value)return;const[HA,CA]=ya(_,bA,H.value);L({x:HA,y:CA}),X=requestAnimationFrame(x)},$={...cA,nodeId:(0,r.toValue)(A),type:wA,position:cA.position},K=tA.value.get((0,r.toValue)(A)),BA={inProgress:!0,isValid:null,from:qt(K,$,IA.Left,!0),fromHandle:$,fromPosition:$.position,fromNode:K,to:_,toHandle:null,toPosition:li[$.position],toNode:null};R({nodeId:(0,r.toValue)(A),id:(0,r.toValue)(e),type:wA,position:q?.getAttribute("data-handlepos")||IA.Top,..._},{x:oA-bA.left,y:hA-bA.top}),eA.connectStart({event:F,nodeId:(0,r.toValue)(A),handleId:(0,r.toValue)(e),handleType:wA});let gA=BA;z.addEventListener("mousemove",rA),z.addEventListener("mouseup",uA),z.addEventListener("touchmove",rA),z.addEventListener("touchend",uA)}}function J(F){var S,V;if(!w.value)return;const O=(0,r.toValue)(t)==="target";if(!m.value){eA.clickConnectStart({event:F,nodeId:(0,r.toValue)(A),handleId:(0,r.toValue)(e)}),R({nodeId:(0,r.toValue)(A),type:(0,r.toValue)(t),id:(0,r.toValue)(e),position:IA.Top,...Ge(F)},void 0,!0);return}let z=(0,r.toValue)(n)||nA.value||_r;const q=N((0,r.toValue)(A));if(!z&&q&&(z=(O?q.isValidSourcePos:q.isValidTargetPos)||_r),q&&(typeof q.connectable>"u"?v.value:q.connectable)===!1)return;const rA=ca(F.target),uA=xa(F,{handle:{nodeId:(0,r.toValue)(A),id:(0,r.toValue)(e),type:(0,r.toValue)(t),position:IA.Top,...Ge(F)},connectionMode:g.value,fromNodeId:m.value.nodeId,fromHandleId:m.value.id??null,fromType:m.value.type,isValidConnection:z,doc:rA,lib:"vue",flowId:d,nodeLookup:tA.value},sA.value,lA.value,N,tA.value),FA=((S=uA.connection)==null?void 0:S.source)===((V=uA.connection)==null?void 0:V.target);uA.isValid&&uA.connection&&!FA&&eA.connect(uA.connection),eA.clickConnectEnd(F),k(F,!0)}return{handlePointerDown:I,handleClick:J}}function wB(){return(0,r.inject)(Ra,"")}function za(e){const A=e??wB()??"",t=(0,r.inject)(Va,(0,r.ref)(null)),{findNode:n,edges:o,emits:a}=YA(),u=n(A);return u||a.error(new ce(ie.NODE_NOT_FOUND,A)),{id:A,nodeEl:t,node:u,parentNode:(0,r.computed)(()=>n(u.parentNode)),connectedEdges:(0,r.computed)(()=>pa([u],o.value))}}function CB(){return{doubleClick:QA(),click:QA(),mouseEnter:QA(),mouseMove:QA(),mouseLeave:QA(),contextMenu:QA(),dragStart:QA(),drag:QA(),dragStop:QA()}}function vB(e,A){const t=CB();return t.doubleClick.on(n=>{var o,a;A.nodeDoubleClick(n),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,n)}),t.click.on(n=>{var o,a;A.nodeClick(n),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,n)}),t.mouseEnter.on(n=>{var o,a;A.nodeMouseEnter(n),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,n)}),t.mouseMove.on(n=>{var o,a;A.nodeMouseMove(n),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,n)}),t.mouseLeave.on(n=>{var o,a;A.nodeMouseLeave(n),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,n)}),t.contextMenu.on(n=>{var o,a;A.nodeContextMenu(n),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,n)}),t.dragStart.on(n=>{var o,a;A.nodeDragStart(n),(a=(o=e.events)==null?void 0:o.dragStart)==null||a.call(o,n)}),t.drag.on(n=>{var o,a;A.nodeDrag(n),(a=(o=e.events)==null?void 0:o.drag)==null||a.call(o,n)}),t.dragStop.on(n=>{var o,a;A.nodeDragStop(n),(a=(o=e.events)==null?void 0:o.dragStop)==null||a.call(o,n)}),Object.entries(t).reduce((n,[o,a])=>(n.emit[o]=a.trigger,n.on[o]=a.on,n),{emit:{},on:{}})}function Xa(){const{getSelectedNodes:e,nodeExtent:A,updateNodePositions:t,findNode:n,snapGrid:o,snapToGrid:a,nodesDraggable:u,emits:d}=YA();return(h,g=!1)=>{const B=a.value?o.value[0]:5,w=a.value?o.value[1]:5,m=g?4:1,v=h.x*B*m,Q=h.y*w*m,H=[];for(const N of e.value)if(N.draggable||u&&typeof N.draggable>"u"){const{position:L}=ii(N,{x:N.computedPosition.x+v,y:N.computedPosition.y+Q},d.error,A.value,N.parentNode?n(N.parentNode):void 0);H.push({id:N.id,position:L,from:N.position,distance:{x:h.x,y:h.y},dimensions:N.dimensions})}t(H,!0,!1)}}var Sr=.1,yB=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function Bt(){return Tn("Viewport not initialized yet."),Promise.resolve(!1)}var QB={zoomIn:Bt,zoomOut:Bt,zoomTo:Bt,fitView:Bt,setCenter:Bt,fitBounds:Bt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Bt,setTransform:Bt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function EB(e){function A(n,o){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(o?.interpolate==="linear"?En:fr).scaleBy(fi(e.d3Selection,o?.duration,o?.ease,()=>{a(!0)}),n):a(!1)})}function t(n,o,a,u){return new Promise(d=>{var h;const{x:g,y:B}=la({x:-n,y:-o},e.translateExtent),w=Jt.translate(-g,-B).scale(a);e.d3Selection&&e.d3Zoom?(h=e.d3Zoom)==null||h.interpolate(u?.interpolate==="linear"?En:fr).transform(fi(e.d3Selection,u?.duration,u?.ease,()=>{d(!0)}),w):d(!1)})}return(0,r.computed)(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:n=>A(1.2,n),zoomOut:n=>A(1/1.2,n),zoomTo:(n,o)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(o?.interpolate==="linear"?En:fr).scaleTo(fi(e.d3Selection,o?.duration,o?.ease,()=>{a(!0)}),n):a(!1)}),setViewport:(n,o)=>t(n.x,n.y,n.zoom,o),setTransform:(n,o)=>t(n.x,n.y,n.zoom,o),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(n={padding:Sr,includeHiddenNodes:!1,duration:0})=>{var o,a;const u=[];for(const B of e.nodes)B.dimensions.width&&B.dimensions.height&&(n?.includeHiddenNodes||!B.hidden)&&(!((o=n.nodes)!=null&&o.length)||(a=n.nodes)!=null&&a.length&&n.nodes.includes(B.id))&&u.push(B);if(!u.length)return Promise.resolve(!1);const{x:d,y:h,zoom:g}=ma(ha(u),e.dimensions.width,e.dimensions.height,n.minZoom??e.minZoom,n.maxZoom??e.maxZoom,n.padding??Sr);return t(d,h,g,n)},setCenter:(n,o,a)=>{const u=typeof a?.zoom<"u"?a.zoom:e.maxZoom;return t(e.dimensions.width/2-n*u,e.dimensions.height/2-o*u,u,a)},fitBounds:(n,o={padding:Sr})=>{const{x:a,y:u,zoom:d}=ma(n,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding??Sr);return t(a,u,d,o)},project:n=>Nn(n,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:n=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect();return Nn({x:n.x-o,y:n.y-a},e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:n=>{if(e.vueFlowRef){const{x:o,y:a}=e.vueFlowRef.getBoundingClientRect();return Dn({x:n.x+o,y:n.y+a},e.viewport)}return{x:0,y:0}}}:QB)}function fi(e,A=0,t=yB,n=()=>{}){const o=typeof A=="number"&&A>0;return o||n(),o?e.transition().duration(A).ease(t).on("end",n):e}function UB(e,A,t){const n=(0,r.effectScope)(!0);return n.run(()=>{const o=()=>{n.run(()=>{let H,N,L=!!(t.nodes.value.length||t.edges.value.length);H=zt([e.modelValue,()=>{var R,U;return(U=(R=e.modelValue)==null?void 0:R.value)==null?void 0:U.length}],([R])=>{R&&Array.isArray(R)&&(N?.pause(),t.setElements(R),!N&&!L&&R.length?L=!0:N?.resume())}),N=zt([t.nodes,t.edges,()=>t.edges.value.length,()=>t.nodes.value.length],([R,U])=>{var k;(k=e.modelValue)!=null&&k.value&&Array.isArray(e.modelValue.value)&&(H?.pause(),e.modelValue.value=[...R,...U],(0,r.nextTick)(()=>{H?.resume()}))},{immediate:L}),(0,r.onScopeDispose)(()=>{H?.stop(),N?.stop()})})},a=()=>{n.run(()=>{let H,N,L=!!t.nodes.value.length;H=zt([e.nodes,()=>{var R,U;return(U=(R=e.nodes)==null?void 0:R.value)==null?void 0:U.length}],([R])=>{R&&Array.isArray(R)&&(N?.pause(),t.setNodes(R),!N&&!L&&R.length?L=!0:N?.resume())}),N=zt([t.nodes,()=>t.nodes.value.length],([R])=>{var U;(U=e.nodes)!=null&&U.value&&Array.isArray(e.nodes.value)&&(H?.pause(),e.nodes.value=[...R],(0,r.nextTick)(()=>{H?.resume()}))},{immediate:L}),(0,r.onScopeDispose)(()=>{H?.stop(),N?.stop()})})},u=()=>{n.run(()=>{let H,N,L=!!t.edges.value.length;H=zt([e.edges,()=>{var R,U;return(U=(R=e.edges)==null?void 0:R.value)==null?void 0:U.length}],([R])=>{R&&Array.isArray(R)&&(N?.pause(),t.setEdges(R),!N&&!L&&R.length?L=!0:N?.resume())}),N=zt([t.edges,()=>t.edges.value.length],([R])=>{var U;(U=e.edges)!=null&&U.value&&Array.isArray(e.edges.value)&&(H?.pause(),e.edges.value=[...R],(0,r.nextTick)(()=>{H?.resume()}))},{immediate:L}),(0,r.onScopeDispose)(()=>{H?.stop(),N?.stop()})})},d=()=>{n.run(()=>{(0,r.watch)(()=>A.maxZoom,()=>{A.maxZoom&&se(A.maxZoom)&&t.setMaxZoom(A.maxZoom)},{immediate:!0})})},h=()=>{n.run(()=>{(0,r.watch)(()=>A.minZoom,()=>{A.minZoom&&se(A.minZoom)&&t.setMinZoom(A.minZoom)},{immediate:!0})})},g=()=>{n.run(()=>{(0,r.watch)(()=>A.translateExtent,()=>{A.translateExtent&&se(A.translateExtent)&&t.setTranslateExtent(A.translateExtent)},{immediate:!0})})},B=()=>{n.run(()=>{(0,r.watch)(()=>A.nodeExtent,()=>{A.nodeExtent&&se(A.nodeExtent)&&t.setNodeExtent(A.nodeExtent)},{immediate:!0})})},w=()=>{n.run(()=>{(0,r.watch)(()=>A.applyDefault,()=>{se(A.applyDefault)&&(t.applyDefault.value=A.applyDefault)},{immediate:!0})})},m=()=>{n.run(()=>{const H=async N=>{let L=N;typeof A.autoConnect=="function"&&(L=await A.autoConnect(N)),L!==!1&&t.addEdges([L])};(0,r.watch)(()=>A.autoConnect,()=>{se(A.autoConnect)&&(t.autoConnect.value=A.autoConnect)},{immediate:!0}),(0,r.watch)(t.autoConnect,(N,L,R)=>{N?t.onConnect(H):t.hooks.value.connect.off(H),R(()=>{t.hooks.value.connect.off(H)})},{immediate:!0})})},v=()=>{const H=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const N of Object.keys(A)){const L=N;if(!H.includes(L)){const R=(0,r.toRef)(()=>A[L]),U=t[L];(0,r.isRef)(U)&&n.run(()=>{(0,r.watch)(R,k=>{se(k)&&(U.value=k)},{immediate:!0})})}}};o(),a(),u(),h(),d(),g(),B(),w(),m(),v()}),()=>n.stop()}function FB(){return{edgesChange:QA(),nodesChange:QA(),nodeDoubleClick:QA(),nodeClick:QA(),nodeMouseEnter:QA(),nodeMouseMove:QA(),nodeMouseLeave:QA(),nodeContextMenu:QA(),nodeDragStart:QA(),nodeDrag:QA(),nodeDragStop:QA(),nodesInitialized:QA(),miniMapNodeClick:QA(),miniMapNodeDoubleClick:QA(),miniMapNodeMouseEnter:QA(),miniMapNodeMouseMove:QA(),miniMapNodeMouseLeave:QA(),connect:QA(),connectStart:QA(),connectEnd:QA(),clickConnectStart:QA(),clickConnectEnd:QA(),paneReady:QA(),init:QA(),move:QA(),moveStart:QA(),moveEnd:QA(),selectionDragStart:QA(),selectionDrag:QA(),selectionDragStop:QA(),selectionContextMenu:QA(),selectionStart:QA(),selectionEnd:QA(),viewportChangeStart:QA(),viewportChange:QA(),viewportChangeEnd:QA(),paneScroll:QA(),paneClick:QA(),paneContextMenu:QA(),paneMouseEnter:QA(),paneMouseMove:QA(),paneMouseLeave:QA(),edgeContextMenu:QA(),edgeMouseEnter:QA(),edgeMouseMove:QA(),edgeMouseLeave:QA(),edgeDoubleClick:QA(),edgeClick:QA(),edgeUpdateStart:QA(),edgeUpdate:QA(),edgeUpdateEnd:QA(),updateNodeInternals:QA(),error:QA(e=>Tn(e.message))}}function bB(e,A){const t=(0,r.getCurrentInstance)();(0,r.onBeforeMount)(()=>{for(const[o,a]of Object.entries(A.value)){const u=d=>{e(o,d)};a.setEmitter(u),mn(a.removeEmitter),a.setHasEmitListeners(()=>n(o)),mn(a.removeHasEmitListeners)}});function n(o){var a;const u=HB(o);return!!((a=t?.vnode.props)!=null&&a[u])}}function HB(e){const[A,...t]=e.split(":");return`on${A.replace(/(?:^|-)(\w)/g,(n,o)=>o.toUpperCase())}${t.length?`:${t.join(":")}`:""}`}function $a(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:ti.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:_n.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Dt.Bezier,style:{}},connectionMode:At.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:br()?"Meta":"Control",zoomActivationKeyCode:br()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:FB(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}var IB=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function _B(e,A,t){const n=EB(e),o=_=>{const b=_??[];e.hooks.updateNodeInternals.trigger(b)},a=_=>Gh(_,e.nodes,e.edges),u=_=>Ph(_,e.nodes,e.edges),d=_=>pa(_,e.edges),h=({id:_,type:b,nodeId:x})=>{var $;const K=_?`-${b}-${_}`:`-${b}`;return Array.from((($=e.connectionLookup.get(`${x}${K}`))==null?void 0:$.values())??[])},g=_=>{if(_)return A.value.get(_)},B=_=>{if(_)return t.value.get(_)},w=(_,b,x)=>{var $,K;const BA=[];for(const gA of _){const HA={id:gA.id,type:"position",dragging:x,from:gA.from};if(b&&(HA.position=gA.position,gA.parentNode)){const CA=g(gA.parentNode);HA.position={x:HA.position.x-((($=CA?.computedPosition)==null?void 0:$.x)??0),y:HA.position.y-(((K=CA?.computedPosition)==null?void 0:K.y)??0)}}BA.push(HA)}BA?.length&&e.hooks.nodesChange.trigger(BA)},m=_=>{if(!e.vueFlowRef)return;const b=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!b)return;const x=window.getComputedStyle(b),{m22:$}=new window.DOMMatrixReadOnly(x.transform),K=[];for(const BA of _){const gA=BA,HA=g(gA.id);if(HA){const CA=Ur(gA.nodeElement);if(CA.width&&CA.height&&(HA.dimensions.width!==CA.width||HA.dimensions.height!==CA.height||gA.forceUpdate)){const LA=gA.nodeElement.getBoundingClientRect();HA.dimensions=CA,HA.handleBounds.source=Ta("source",gA.nodeElement,LA,$,HA.id),HA.handleBounds.target=Ta("target",gA.nodeElement,LA,$,HA.id),K.push({id:HA.id,type:"dimensions",dimensions:CA})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&n.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),K.length&&e.hooks.nodesChange.trigger(K)},v=(_,b)=>{const x=new Set,$=new Set;for(const gA of _)Lt(gA)?x.add(gA.id):ft(gA)&&$.add(gA.id);const K=ht(A.value,x,!0),BA=ht(t.value,$);if(e.multiSelectionActive){for(const gA of x)K.push(gt(gA,b));for(const gA of $)BA.push(gt(gA,b))}K.length&&e.hooks.nodesChange.trigger(K),BA.length&&e.hooks.edgesChange.trigger(BA)},Q=_=>{if(e.multiSelectionActive){const b=_.map(x=>gt(x.id,!0));e.hooks.nodesChange.trigger(b);return}e.hooks.nodesChange.trigger(ht(A.value,new Set(_.map(b=>b.id)),!0)),e.hooks.edgesChange.trigger(ht(t.value))},H=_=>{if(e.multiSelectionActive){const b=_.map(x=>gt(x.id,!0));e.hooks.edgesChange.trigger(b);return}e.hooks.edgesChange.trigger(ht(t.value,new Set(_.map(b=>b.id)))),e.hooks.nodesChange.trigger(ht(A.value,new Set,!0))},N=_=>{v(_,!0)},L=_=>{const b=(_||e.nodes).map(x=>(x.selected=!1,gt(x.id,!1)));e.hooks.nodesChange.trigger(b)},R=_=>{const b=(_||e.edges).map(x=>(x.selected=!1,gt(x.id,!1)));e.hooks.edgesChange.trigger(b)},U=_=>{if(!_||!_.length)return v([],!1);const b=_.reduce((x,$)=>{const K=gt($.id,!1);return Lt($)?x.nodes.push(K):x.edges.push(K),x},{nodes:[],edges:[]});b.nodes.length&&e.hooks.nodesChange.trigger(b.nodes),b.edges.length&&e.hooks.edgesChange.trigger(b.edges)},k=_=>{var b;(b=e.d3Zoom)==null||b.scaleExtent([_,e.maxZoom]),e.minZoom=_},eA=_=>{var b;(b=e.d3Zoom)==null||b.scaleExtent([e.minZoom,_]),e.maxZoom=_},Y=_=>{var b;(b=e.d3Zoom)==null||b.translateExtent(_),e.translateExtent=_},sA=_=>{e.nodeExtent=_,o()},lA=_=>{var b;(b=e.d3Zoom)==null||b.clickDistance(_)},nA=_=>{e.nodesDraggable=_,e.nodesConnectable=_,e.elementsSelectable=_},tA=_=>{const b=_ instanceof Function?_(e.nodes):_;!e.initialized&&!b.length||(e.nodes=ka(b,g,e.hooks.error.trigger))},AA=_=>{const b=_ instanceof Function?_(e.edges):_;if(!e.initialized&&!b.length)return;const x=di(b,e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);ui(e.connectionLookup,t.value,x),e.edges=x},T=_=>{const b=_ instanceof Function?_([...e.nodes,...e.edges]):_;!e.initialized&&!b.length||(tA(b.filter(Lt)),AA(b.filter(ft)))},aA=_=>{let b=_ instanceof Function?_(e.nodes):_;b=Array.isArray(b)?b:[b];const x=ka(b,g,e.hooks.error.trigger),$=[];for(const K of x)$.push(Ea(K));$.length&&e.hooks.nodesChange.trigger($)},I=_=>{let b=_ instanceof Function?_(e.edges):_;b=Array.isArray(b)?b:[b];const x=di(b,e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),$=[];for(const K of x)$.push(Ea(K));$.length&&e.hooks.edgesChange.trigger($)},J=(_,b=!0,x=!1)=>{const $=_ instanceof Function?_(e.nodes):_,K=Array.isArray($)?$:[$],BA=[],gA=[];function HA(LA){const KA=d(LA);for(const XA of KA)(!se(XA.deletable)||XA.deletable)&&gA.push(Fa(XA.id,XA.source,XA.target,XA.sourceHandle,XA.targetHandle))}function CA(LA){const KA=[];for(const XA of e.nodes)XA.parentNode===LA&&KA.push(XA);if(KA.length){for(const XA of KA)BA.push(Ua(XA.id));b&&HA(KA);for(const XA of KA)CA(XA.id)}}for(const LA of K){const KA=typeof LA=="string"?g(LA):LA;KA&&(se(KA.deletable)&&!KA.deletable||(BA.push(Ua(KA.id)),b&&HA([KA]),x&&CA(KA.id)))}gA.length&&e.hooks.edgesChange.trigger(gA),BA.length&&e.hooks.nodesChange.trigger(BA)},F=_=>{const b=_ instanceof Function?_(e.edges):_,x=Array.isArray(b)?b:[b],$=[];for(const K of x){const BA=typeof K=="string"?B(K):K;BA&&(se(BA.deletable)&&!BA.deletable||$.push(Fa(typeof K=="string"?K:K.id,BA.source,BA.target,BA.sourceHandle,BA.targetHandle)))}e.hooks.edgesChange.trigger($)},S=(_,b,x=!0)=>{const $=B(_.id);if(!$)return!1;const K=e.edges.indexOf($),BA=fB(_,b,$,x,e.hooks.error.trigger);if(BA){const[gA]=di([BA],e.isValidConnection,g,B,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((HA,CA)=>CA===K?gA:HA),ui(e.connectionLookup,t.value,[gA]),gA}return!1},V=(_,b,x={replace:!1})=>{const $=B(_);if(!$)return;const K=typeof b=="function"?b($):b;$.data=x.replace?K:{...$.data,...K}},O=_=>Qa(_,e.nodes),z=_=>{const b=Qa(_,e.edges);return ui(e.connectionLookup,t.value,b),b},q=(_,b,x={replace:!1})=>{const $=g(_);if(!$)return;const K=typeof b=="function"?b($):b;x.replace?e.nodes.splice(e.nodes.indexOf($),1,K):Object.assign($,K)},rA=(_,b,x={replace:!1})=>{const $=g(_);if(!$)return;const K=typeof b=="function"?b($):b;$.data=x.replace?K:{...$.data,...K}},uA=(_,b,x=!1)=>{x?e.connectionClickStartHandle=_:e.connectionStartHandle=_,e.connectionEndHandle=null,e.connectionStatus=null,b&&(e.connectionPosition=b)},FA=(_,b=null,x=null)=>{e.connectionStartHandle&&(e.connectionPosition=_,e.connectionEndHandle=b,e.connectionStatus=x)},P=(_,b)=>{e.connectionPosition={x:NaN,y:NaN},e.connectionEndHandle=null,e.connectionStatus=null,b?e.connectionClickStartHandle=null:e.connectionStartHandle=null},W=_=>{const b=Rh(_),x=b?null:xn(_)?_:g(_.id);return!b&&!x?[null,null,b]:[b?_:Qr(x),x,b]},X=(_,b=!0,x=e.nodes)=>{const[$,K,BA]=W(_);if(!$)return[];const gA=[];for(const HA of x||e.nodes){if(!BA&&(HA.id===K.id||!HA.computedPosition))continue;const CA=Qr(HA),LA=Er(CA,$);(b&&LA>0||LA>=CA.width*CA.height||LA>=Number($.width)*Number($.height))&&gA.push(HA)}return gA},oA=(_,b,x=!0)=>{const[$]=W(_);if(!$)return!1;const K=Er($,b);return x&&K>0||K>=Number($.width)*Number($.height)},hA=_=>{const{viewport:b,dimensions:x,d3Zoom:$,d3Selection:K,translateExtent:BA}=e;if(!$||!K||!_.x&&!_.y)return!1;const gA=Jt.translate(b.x+_.x,b.y+_.y).scale(b.zoom),HA=[[0,0],[x.width,x.height]],CA=$.constrain()(gA,HA,BA),LA=e.viewport.x!==CA.x||e.viewport.y!==CA.y||e.viewport.zoom!==CA.k;return $.transform(K,CA),LA},wA=_=>{const b=_ instanceof Function?_(e):_,x=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];se(b.defaultEdgeOptions)&&(e.defaultEdgeOptions=b.defaultEdgeOptions);const $=b.modelValue||b.nodes||b.edges?[]:void 0;$&&(b.modelValue&&$.push(...b.modelValue),b.nodes&&$.push(...b.nodes),b.edges&&$.push(...b.edges),T($));const K=()=>{se(b.maxZoom)&&eA(b.maxZoom),se(b.minZoom)&&k(b.minZoom),se(b.translateExtent)&&Y(b.translateExtent)};for(const BA of Object.keys(b)){const gA=BA,HA=b[gA];![...IB,...x].includes(gA)&&se(HA)&&(e[gA]=HA)}Lo(()=>e.d3Zoom).not.toBeNull().then(K),e.initialized||(e.initialized=!0)};return{updateNodePositions:w,updateNodeDimensions:m,setElements:T,setNodes:tA,setEdges:AA,addNodes:aA,addEdges:I,removeNodes:J,removeEdges:F,findNode:g,findEdge:B,updateEdge:S,updateEdgeData:V,updateNode:q,updateNodeData:rA,applyEdgeChanges:z,applyNodeChanges:O,addSelectedElements:N,addSelectedNodes:Q,addSelectedEdges:H,setMinZoom:k,setMaxZoom:eA,setTranslateExtent:Y,setNodeExtent:sA,setPaneClickDistance:lA,removeSelectedElements:U,removeSelectedNodes:L,removeSelectedEdges:R,startConnection:uA,updateConnection:FA,endConnection:P,setInteractive:nA,setState:wA,getIntersectingNodes:X,getIncomers:a,getOutgoers:u,getConnectedEdges:d,getHandleConnections:h,isNodeIntersecting:oA,panBy:hA,fitView:_=>n.value.fitView(_),zoomIn:_=>n.value.zoomIn(_),zoomOut:_=>n.value.zoomOut(_),zoomTo:(_,b)=>n.value.zoomTo(_,b),setViewport:(_,b)=>n.value.setViewport(_,b),setTransform:(_,b)=>n.value.setTransform(_,b),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(_,b,x)=>n.value.setCenter(_,b,x),fitBounds:(_,b)=>n.value.fitBounds(_,b),project:_=>n.value.project(_),screenToFlowCoordinate:_=>n.value.screenToFlowCoordinate(_),flowToScreenCoordinate:_=>n.value.flowToScreenCoordinate(_),toObject:()=>{const _=[],b=[];for(const x of e.nodes){const{computedPosition:$,handleBounds:K,selected:BA,dimensions:gA,isParent:HA,resizing:CA,dragging:LA,events:KA,...XA}=x;_.push(XA)}for(const x of e.edges){const{selected:$,sourceNode:K,targetNode:BA,events:gA,...HA}=x;b.push(HA)}return JSON.parse(JSON.stringify({nodes:_,edges:b,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:_=>new Promise(b=>{const{nodes:x,edges:$,position:K,zoom:BA,viewport:gA}=_;x&&tA(x),$&&AA($);const[HA,CA]=gA?.x&&gA?.y?[gA.x,gA.y]:K??[null,null];if(HA&&CA){const LA=gA?.zoom||BA||e.viewport.zoom;return Lo(()=>n.value.viewportInitialized).toBe(!0).then(()=>{n.value.setViewport({x:HA,y:CA,zoom:LA}).then(()=>{b(!0)})})}else b(!0)}),updateNodeInternals:o,viewportHelper:n,$reset:()=>{const _=$a();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const b=Jt.translate(_.defaultViewport.x??0,_.defaultViewport.y??0).scale(Nt(_.defaultViewport.zoom??1,_.minZoom,_.maxZoom)),x=e.viewportRef.getBoundingClientRect(),$=[[0,0],[x.width,x.height]],K=e.d3Zoom.constrain()(b,$,_.translateExtent);e.d3Zoom.transform(e.d3Selection,K)}wA(_)},$destroy:()=>{}}}var SB=["data-id","data-handleid","data-nodeid","data-handlepos"],An=(0,r.defineComponent)({name:"Handle",compatConfig:{MODE:3},props:{id:{default:null},type:{},position:{default:()=>IA.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:A}){const t=(0,r.createPropsRestProxy)(e,["position","connectable","connectableStart","connectableEnd","id"]),n=(0,r.toRef)(()=>t.type??"source"),o=(0,r.toRef)(()=>t.isValidConnection??null),{id:a,connectionStartHandle:u,connectionClickStartHandle:d,connectionEndHandle:h,vueFlowRef:g,nodesConnectable:B,noDragClassName:w,noPanClassName:m}=YA(),{id:v,node:Q,nodeEl:H,connectedEdges:N}=za(),L=(0,r.ref)(),R=(0,r.toRef)(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),U=(0,r.toRef)(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),k=(0,r.toRef)(()=>{var AA,T,aA,I,J,F;return((AA=u.value)==null?void 0:AA.nodeId)===v&&((T=u.value)==null?void 0:T.id)===e.id&&((aA=u.value)==null?void 0:aA.type)===n.value||((I=h.value)==null?void 0:I.nodeId)===v&&((J=h.value)==null?void 0:J.id)===e.id&&((F=h.value)==null?void 0:F.type)===n.value}),eA=(0,r.toRef)(()=>{var AA,T,aA;return((AA=d.value)==null?void 0:AA.nodeId)===v&&((T=d.value)==null?void 0:T.id)===e.id&&((aA=d.value)==null?void 0:aA.type)===n.value}),{handlePointerDown:Y,handleClick:sA}=Ga({nodeId:v,handleId:e.id,isValidConnection:o,type:n}),lA=(0,r.computed)(()=>typeof e.connectable=="string"&&e.connectable==="single"?!N.value.some(AA=>{const T=AA[`${n.value}Handle`];return AA[n.value]!==v?!1:T?T===e.id:!0}):typeof e.connectable=="number"?N.value.filter(AA=>{const T=AA[`${n.value}Handle`];return AA[n.value]!==v?!1:T?T===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(Q,N.value):se(e.connectable)?e.connectable:B.value);(0,r.onMounted)(()=>{var AA;if(!Q.dimensions.width||!Q.dimensions.height)return;const T=(AA=Q.handleBounds[n.value])==null?void 0:AA.find(O=>O.id===e.id);if(!g.value||T)return;const aA=g.value.querySelector(".vue-flow__transformationpane");if(!H.value||!L.value||!aA||!e.id)return;const I=H.value.getBoundingClientRect(),J=L.value.getBoundingClientRect(),F=window.getComputedStyle(aA),{m22:S}=new window.DOMMatrixReadOnly(F.transform),V={id:e.id,position:e.position,x:(J.left-I.left)/S,y:(J.top-I.top)/S,type:n.value,nodeId:v,...Ur(L.value)};Q.handleBounds[n.value]=[...Q.handleBounds[n.value]??[],V]});function nA(AA){const T=si(AA);lA.value&&R.value&&(T&&AA.button===0||!T)&&Y(AA)}function tA(AA){!v||!d.value&&!R.value||lA.value&&sA(AA)}return A({handleClick:sA,handlePointerDown:Y,onClick:tA,onPointerDown:nA}),(AA,T)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"handle",ref:L,"data-id":`${(0,r.unref)(a)}-${(0,r.unref)(v)}-${e.id}-${n.value}`,"data-handleid":e.id,"data-nodeid":(0,r.unref)(v),"data-handlepos":AA.position,class:(0,r.normalizeClass)(["vue-flow__handle",[`vue-flow__handle-${AA.position}`,`vue-flow__handle-${e.id}`,(0,r.unref)(w),(0,r.unref)(m),n.value,{connectable:lA.value,connecting:eA.value,connectablestart:R.value,connectableend:U.value,connectionindicator:lA.value&&(R.value&&!k.value||U.value&&k.value)}]]),onMousedown:nA,onTouchstartPassive:nA,onClick:tA},[(0,r.renderSlot)(AA.$slots,"default",{id:AA.id})],42,SB))}}),xr=function({sourcePosition:e=IA.Bottom,targetPosition:A=IA.Top,label:t,connectable:n=!0,isValidTargetPos:o,isValidSourcePos:a,data:u}){const d=u.label??t;return[(0,r.h)(An,{type:"target",position:A,connectable:n,isValidConnection:o}),typeof d!="string"&&d?(0,r.h)(d):(0,r.h)(r.Fragment,[d]),(0,r.h)(An,{type:"source",position:e,connectable:n,isValidConnection:a})]};xr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],xr.inheritAttrs=!1,xr.compatConfig={MODE:3};var xB=xr,Dr=function({targetPosition:e=IA.Top,label:A,connectable:t=!0,isValidTargetPos:n,data:o}){const a=o.label??A;return[(0,r.h)(An,{type:"target",position:e,connectable:t,isValidConnection:n}),typeof a!="string"&&a?(0,r.h)(a):(0,r.h)(r.Fragment,[a])]};Dr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Dr.inheritAttrs=!1,Dr.compatConfig={MODE:3};var DB=Dr,Nr=function({sourcePosition:e=IA.Bottom,label:A,connectable:t=!0,isValidSourcePos:n,data:o}){const a=o.label??A;return[typeof a!="string"&&a?(0,r.h)(a):(0,r.h)(r.Fragment,[a]),(0,r.h)(An,{type:"source",position:e,connectable:t,isValidConnection:n})]};Nr.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Nr.inheritAttrs=!1,Nr.compatConfig={MODE:3};var NB=Nr,LB=["transform"],TB=["width","height","x","y","rx","ry"],kB=["y"],MB=(0,r.defineComponent)({name:"EdgeText",compatConfig:{MODE:3},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const A=(0,r.ref)({x:0,y:0,width:0,height:0}),t=(0,r.ref)(null),n=(0,r.computed)(()=>`translate(${e.x-A.value.width/2} ${e.y-A.value.height/2})`);(0,r.onMounted)(o),(0,r.watch)([()=>e.x,()=>e.y,t,()=>e.label],o);function o(){if(!t.value)return;const a=t.value.getBBox();(a.width!==A.value.width||a.height!==A.value.height)&&(A.value=a)}return(a,u)=>((0,r.openBlock)(),(0,r.createElementBlock)("g",{transform:n.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?((0,r.openBlock)(),(0,r.createElementBlock)("rect",{key:0,class:"vue-flow__edge-textbg",width:`${A.value.width+2*a.labelBgPadding[0]}px`,height:`${A.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:(0,r.normalizeStyle)(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,TB)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("text",(0,r.mergeProps)(a.$attrs,{ref_key:"el",ref:t,class:"vue-flow__edge-text",y:A.value.height/2,dy:"0.3em",style:a.labelStyle}),[(0,r.renderSlot)(a.$slots,"default",{},()=>[typeof a.label!="string"?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(a.label),{key:0})):((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createTextVNode)((0,r.toDisplayString)(a.label),1)],64))])],16,kB)],8,LB))}}),KB=["id","d","marker-end","marker-start"],OB=["d","stroke-width"],kn=(0,r.defineComponent)({name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:A}){const t=(0,r.ref)(null),n=(0,r.ref)(null),o=(0,r.ref)(null),a=(0,r.useAttrs)();return A({pathEl:t,interactionEl:n,labelEl:o}),(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createElementVNode)("path",(0,r.mergeProps)((0,r.unref)(a),{id:u.id,ref_key:"pathEl",ref:t,d:u.path,class:"vue-flow__edge-path","marker-end":u.markerEnd,"marker-start":u.markerStart}),null,16,KB),u.interactionWidth?((0,r.openBlock)(),(0,r.createElementBlock)("path",{key:0,ref_key:"interactionEl",ref:n,fill:"none",d:u.path,"stroke-width":u.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,OB)):(0,r.createCommentVNode)("",!0),u.label&&u.labelX&&u.labelY?((0,r.openBlock)(),(0,r.createBlock)(MB,{key:1,ref_key:"labelEl",ref:o,x:u.labelX,y:u.labelY,label:u.label,"label-show-bg":u.labelShowBg,"label-bg-style":u.labelBgStyle,"label-bg-padding":u.labelBgPadding,"label-bg-border-radius":u.labelBgBorderRadius,"label-style":u.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):(0,r.createCommentVNode)("",!0)],64))}});function Wa({sourceX:e,sourceY:A,targetX:t,targetY:n}){const o=Math.abs(t-e)/2,a=t<e?t+o:t-o,u=Math.abs(n-A)/2;return[a,n<A?n+u:n-u,o,u]}function Ya({sourceX:e,sourceY:A,targetX:t,targetY:n,sourceControlX:o,sourceControlY:a,targetControlX:u,targetControlY:d}){const h=e*.125+o*.375+u*.375+t*.125,g=A*.125+a*.375+d*.375+n*.125;return[h,g,Math.abs(h-e),Math.abs(g-A)]}function Lr(e,A){return e>=0?.5*e:A*25*Math.sqrt(-e)}function Ja({pos:e,x1:A,y1:t,x2:n,y2:o,c:a}){let u,d;switch(e){case IA.Left:u=A-Lr(A-n,a),d=t;break;case IA.Right:u=A+Lr(n-A,a),d=t;break;case IA.Top:u=A,d=t-Lr(t-o,a);break;case IA.Bottom:u=A,d=t+Lr(o-t,a);break}return[u,d]}function gi(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:o,targetY:a,targetPosition:u=IA.Top,curvature:d=.25}=e,[h,g]=Ja({pos:n,x1:A,y1:t,x2:o,y2:a,c:d}),[B,w]=Ja({pos:u,x1:o,y1:a,x2:A,y2:t,c:d}),[m,v,Q,H]=Ya({sourceX:A,sourceY:t,targetX:o,targetY:a,sourceControlX:h,sourceControlY:g,targetControlX:B,targetControlY:w});return[`M${A},${t} C${h},${g} ${B},${w} ${o},${a}`,m,v,Q,H]}function Za({pos:e,x1:A,y1:t,x2:n,y2:o}){let a,u;switch(e){case IA.Left:case IA.Right:a=.5*(A+n),u=t;break;case IA.Top:case IA.Bottom:a=A,u=.5*(t+o);break}return[a,u]}function ja(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:o,targetY:a,targetPosition:u=IA.Top}=e,[d,h]=Za({pos:n,x1:A,y1:t,x2:o,y2:a}),[g,B]=Za({pos:u,x1:o,y1:a,x2:A,y2:t}),[w,m,v,Q]=Ya({sourceX:A,sourceY:t,targetX:o,targetY:a,sourceControlX:d,sourceControlY:h,targetControlX:g,targetControlY:B});return[`M${A},${t} C${d},${h} ${g},${B} ${o},${a}`,w,m,v,Q]}var qa={[IA.Left]:{x:-1,y:0},[IA.Right]:{x:1,y:0},[IA.Top]:{x:0,y:-1},[IA.Bottom]:{x:0,y:1}};function RB({source:e,sourcePosition:A=IA.Bottom,target:t}){return A===IA.Left||A===IA.Right?e.x<t.x?{x:1,y:0}:{x:-1,y:0}:e.y<t.y?{x:0,y:1}:{x:0,y:-1}}function Al(e,A){return Math.sqrt((A.x-e.x)**2+(A.y-e.y)**2)}function VB({source:e,sourcePosition:A=IA.Bottom,target:t,targetPosition:n=IA.Top,center:o,offset:a}){const u=qa[A],d=qa[n],h={x:e.x+u.x*a,y:e.y+u.y*a},g={x:t.x+d.x*a,y:t.y+d.y*a},B=RB({source:h,sourcePosition:A,target:g}),w=B.x!==0?"x":"y",m=B[w];let v,Q,H;const N={x:0,y:0},L={x:0,y:0},[R,U,k,eA]=Wa({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(u[w]*d[w]===-1){Q=o.x??R,H=o.y??U;const Y=[{x:Q,y:h.y},{x:Q,y:g.y}],sA=[{x:h.x,y:H},{x:g.x,y:H}];u[w]===m?v=w==="x"?Y:sA:v=w==="x"?sA:Y}else{const Y=[{x:h.x,y:g.y}],sA=[{x:g.x,y:h.y}];if(w==="x"?v=u.x===m?sA:Y:v=u.y===m?Y:sA,A===n){const tA=Math.abs(e[w]-t[w]);if(tA<=a){const AA=Math.min(a-1,a-tA);u[w]===m?N[w]=(h[w]>e[w]?-1:1)*AA:L[w]=(g[w]>t[w]?-1:1)*AA}}if(A!==n){const tA=w==="x"?"y":"x",AA=u[w]===d[tA],T=h[tA]>g[tA],aA=h[tA]<g[tA];(u[w]===1&&(!AA&&T||AA&&aA)||u[w]!==1&&(!AA&&aA||AA&&T))&&(v=w==="x"?Y:sA)}const lA={x:h.x+N.x,y:h.y+N.y},nA={x:g.x+L.x,y:g.y+L.y};Math.max(Math.abs(lA.x-v[0].x),Math.abs(nA.x-v[0].x))>=Math.max(Math.abs(lA.y-v[0].y),Math.abs(nA.y-v[0].y))?(Q=(lA.x+nA.x)/2,H=v[0].y):(Q=v[0].x,H=(lA.y+nA.y)/2)}return[[e,{x:h.x+N.x,y:h.y+N.y},...v,{x:g.x+L.x,y:g.y+L.y},t],Q,H,k,eA]}function PB(e,A,t,n){const o=Math.min(Al(e,A)/2,Al(A,t)/2,n),{x:a,y:u}=A;if(e.x===a&&a===t.x||e.y===u&&u===t.y)return`L${a} ${u}`;if(e.y===u){const h=e.x<t.x?-1:1,g=e.y<t.y?1:-1;return`L ${a+o*h},${u}Q ${a},${u} ${a},${u+o*g}`}const d=e.x<t.x?1:-1;return`L ${a},${u+o*(e.y<t.y?-1:1)}Q ${a},${u} ${a+o*d},${u}`}function hi(e){const{sourceX:A,sourceY:t,sourcePosition:n=IA.Bottom,targetX:o,targetY:a,targetPosition:u=IA.Top,borderRadius:d=5,centerX:h,centerY:g,offset:B=20}=e,[w,m,v,Q,H]=VB({source:{x:A,y:t},sourcePosition:n,target:{x:o,y:a},targetPosition:u,center:{x:h,y:g},offset:B});return[w.reduce((N,L,R)=>{let U;return R>0&&R<w.length-1?U=PB(w[R-1],L,w[R+1],d):U=`${R===0?"M":"L"}${L.x} ${L.y}`,N+=U,N},""),m,v,Q,H]}function GB(e){const{sourceX:A,sourceY:t,targetX:n,targetY:o}=e,[a,u,d,h]=Wa({sourceX:A,sourceY:t,targetX:n,targetY:o});return[`M ${A},${t}L ${n},${o}`,a,u,d,h]}var zB=(0,r.defineComponent)({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=GB(e);return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),el=(0,r.defineComponent)({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=hi({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),XB=(0,r.defineComponent)({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:A}){return()=>(0,r.h)(el,{...e,...A,borderRadius:0})}}),$B=(0,r.defineComponent)({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=gi({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),WB=(0,r.defineComponent)({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:A}){return()=>{const[t,n,o]=ja({...e,sourcePosition:e.sourcePosition??IA.Bottom,targetPosition:e.targetPosition??IA.Top});return(0,r.h)(kn,{path:t,labelX:n,labelY:o,...A,...e})}}}),YB={input:NB,default:xB,output:DB},JB={default:$B,straight:zB,step:XB,smoothstep:el,simplebezier:WB};function ZB(e,A,t){const n=(0,r.computed)(()=>Q=>A.value.get(Q)),o=(0,r.computed)(()=>Q=>t.value.get(Q)),a=(0,r.computed)(()=>{const Q={...JB,...e.edgeTypes},H=Object.keys(Q);for(const N of e.edges)N.type&&!H.includes(N.type)&&(Q[N.type]=N.type);return Q}),u=(0,r.computed)(()=>{const Q={...YB,...e.nodeTypes},H=Object.keys(Q);for(const N of e.nodes)N.type&&!H.includes(N.type)&&(Q[N.type]=N.type);return Q}),d=(0,r.computed)(()=>e.onlyRenderVisibleElements?Ba(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),h=(0,r.computed)(()=>{if(e.onlyRenderVisibleElements){const Q=[];for(const H of e.edges){const N=A.value.get(H.source),L=A.value.get(H.target);eB({sourcePos:N.computedPosition||{x:0,y:0},targetPos:L.computedPosition||{x:0,y:0},sourceWidth:N.dimensions.width,sourceHeight:N.dimensions.height,targetWidth:L.dimensions.width,targetHeight:L.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&Q.push(H)}return Q}return e.edges}),g=(0,r.computed)(()=>[...d.value,...h.value]),B=(0,r.computed)(()=>{const Q=[];for(const H of e.nodes)H.selected&&Q.push(H);return Q}),w=(0,r.computed)(()=>{const Q=[];for(const H of e.edges)H.selected&&Q.push(H);return Q}),m=(0,r.computed)(()=>[...B.value,...w.value]),v=(0,r.computed)(()=>{const Q=[];for(const H of e.nodes)H.dimensions.width&&H.dimensions.height&&H.handleBounds!==void 0&&Q.push(H);return Q});return{getNode:n,getEdge:o,getElements:g,getEdgeTypes:a,getNodeTypes:u,getEdges:h,getNodes:d,getSelectedElements:m,getSelectedNodes:B,getSelectedEdges:w,getNodesInitialized:v,areNodesInitialized:(0,r.computed)(()=>d.value.length>0&&v.value.length===d.value.length)}}var jB=class hn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var A;const t=(A=(0,r.getCurrentInstance)())==null?void 0:A.appContext.app;return hn.instance=t?.config.globalProperties.$vueFlowStorage??hn.instance??new hn,t&&(t.config.globalProperties.$vueFlowStorage=hn.instance),hn.instance}set(A,t){return this.flows.set(A,t)}get(A){return this.flows.get(A)}remove(A){return this.flows.delete(A)}create(A,t){const n=(0,r.reactive)($a()),o={};for(const[w,m]of Object.entries(n.hooks)){const v=`on${w.charAt(0).toUpperCase()+w.slice(1)}`;o[v]=m.on}const a={};for(const[w,m]of Object.entries(n.hooks))a[w]=m.trigger;const u=(0,r.computed)(()=>{const w=new Map;for(const m of n.nodes)w.set(m.id,m);return w}),d=(0,r.computed)(()=>{const w=new Map;for(const m of n.edges)w.set(m.id,m);return w}),h=ZB(n,u,d),g=_B(n,u,d);g.setState({...n,...t});const B={...o,...h,...g,...Yu(n),nodeLookup:u,edgeLookup:d,emits:a,id:A,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(A)}};return this.set(A,B),B}getId(){return`vue-flow-${this.currentId++}`}};function YA(e){const A=jB.getInstance(),t=(0,r.getCurrentScope)(),n=typeof e=="object",o=n?e:{id:e},a=o.id,u=a??t?.vueFlowId;let d;if(t){const h=(0,r.inject)(Oa,null);typeof h<"u"&&h!==null&&(!u||h.id===u)&&(d=h)}if(d||u&&(d=A.get(u)),!d||u&&d.id!==u){const h=a??A.getId(),g=A.create(h,o);d=g,(t??(0,r.effectScope)(!0)).run(()=>{(0,r.watch)(g.applyDefault,(B,w,m)=>{const v=H=>{g.applyNodeChanges(H)},Q=H=>{g.applyEdgeChanges(H)};B?(g.onNodesChange(v),g.onEdgesChange(Q)):(g.hooks.value.nodesChange.off(v),g.hooks.value.edgesChange.off(Q)),m(()=>{g.hooks.value.nodesChange.off(v),g.hooks.value.edgesChange.off(Q)})},{immediate:!0}),mn(()=>{if(d){const B=A.get(d.id);B?B.$destroy():Tn(`No store instance found for id ${d.id} in storage.`)}})})}else n&&d.setState(o);if(t&&((0,r.provide)(Oa,d),t.vueFlowId=d.id),n){const h=(0,r.getCurrentInstance)();h?.type.name!=="VueFlow"&&d.emits.error(new ce(ie.USEVUEFLOW_OPTIONS))}return d}function qB(e){const{emits:A,dimensions:t}=YA();let n;(0,r.onMounted)(()=>{const o=()=>{var a,u;if(!e.value||!(((u=(a=e.value).checkVisibility)==null?void 0:u.call(a))??!0))return;const d=Ur(e.value);(d.width===0||d.height===0)&&A.error(new ce(ie.MISSING_VIEWPORT_DIMENSIONS)),t.value={width:d.width||500,height:d.height||500}};o(),window.addEventListener("resize",o),e.value&&(n=new ResizeObserver(()=>o()),n.observe(e.value)),(0,r.onBeforeUnmount)(()=>{window.removeEventListener("resize",o),n&&e.value&&n.unobserve(e.value)})})}var Ap=(0,r.defineComponent)({name:"UserSelection",compatConfig:{MODE:3},props:{userSelectionRect:{}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vue-flow__selection vue-flow__container",style:(0,r.normalizeStyle)({width:`${A.userSelectionRect.width}px`,height:`${A.userSelectionRect.height}px`,transform:`translate(${A.userSelectionRect.x}px, ${A.userSelectionRect.y}px)`})},null,4))}}),ep=["tabIndex"],tp=(0,r.defineComponent)({name:"NodesSelection",compatConfig:{MODE:3},setup(e){const{emits:A,viewport:t,getSelectedNodes:n,noPanClassName:o,disableKeyboardA11y:a,userSelectionActive:u}=YA(),d=Xa(),h=(0,r.ref)(null),g=Pa({el:h,onStart(Q){A.selectionDragStart(Q),A.nodeDragStart(Q)},onDrag(Q){A.selectionDrag(Q),A.nodeDrag(Q)},onStop(Q){A.selectionDragStop(Q),A.nodeDragStop(Q)}});(0,r.onMounted)(()=>{var Q;a.value||(Q=h.value)==null||Q.focus({preventScroll:!0})});const B=(0,r.computed)(()=>ha(n.value)),w=(0,r.computed)(()=>({width:`${B.value.width}px`,height:`${B.value.height}px`,top:`${B.value.y}px`,left:`${B.value.x}px`}));function m(Q){A.selectionContextMenu({event:Q,nodes:n.value})}function v(Q){a.value||Zt[Q.key]&&(Q.preventDefault(),d({x:Zt[Q.key].x,y:Zt[Q.key].y},Q.shiftKey))}return(Q,H)=>!(0,r.unref)(u)&&B.value.width&&B.value.height?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["vue-flow__nodesselection vue-flow__container",(0,r.unref)(o)]),style:(0,r.normalizeStyle)({transform:`translate(${(0,r.unref)(t).x}px,${(0,r.unref)(t).y}px) scale(${(0,r.unref)(t).zoom})`})},[(0,r.createElementVNode)("div",{ref_key:"el",ref:h,class:(0,r.normalizeClass)([{dragging:(0,r.unref)(g)},"vue-flow__nodesselection-rect"]),style:(0,r.normalizeStyle)(w.value),tabIndex:(0,r.unref)(a)?void 0:-1,onContextmenu:m,onKeydown:v},null,46,ep)],6)):(0,r.createCommentVNode)("",!0)}});function np(e,A){return{x:e.clientX-A.left,y:e.clientY-A.top}}var rp=(0,r.defineComponent)({name:"Pane",compatConfig:{MODE:3},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:A,nodes:t,viewport:n,emits:o,userSelectionActive:a,removeSelectedElements:u,userSelectionRect:d,elementsSelectable:h,nodesSelectionActive:g,getSelectedEdges:B,getSelectedNodes:w,removeNodes:m,removeEdges:v,selectionMode:Q,deleteKeyCode:H,multiSelectionKeyCode:N,multiSelectionActive:L,edgeLookup:R,nodeLookup:U,connectionLookup:k,defaultEdgeOptions:eA,connectionStartHandle:Y,panOnDrag:sA}=YA(),lA=(0,r.shallowRef)(null),nA=(0,r.shallowRef)(new Set),tA=(0,r.shallowRef)(new Set),AA=(0,r.shallowRef)(null),T=(0,r.toRef)(()=>h.value&&(e.isSelecting||a.value)),aA=(0,r.toRef)(()=>Y.value!==null);let I=!1,J=!1;const F=Sn(H,{actInsideInputWithModifier:!1}),S=Sn(N);(0,r.watch)(F,P=>{P&&(m(w.value),v(B.value),g.value=!1)}),(0,r.watch)(S,P=>{L.value=P});function V(P,W){return X=>{X.target===W&&P?.(X)}}function O(P){if(I||aA.value){I=!1;return}o.paneClick(P),u(),g.value=!1}function z(P){var W;if(Array.isArray(sA.value)&&((W=sA.value)!=null&&W.includes(2))){P.preventDefault();return}o.paneContextMenu(P)}function q(P){o.paneScroll(P)}function rA(P){var W,X,oA;if(AA.value=((W=A.value)==null?void 0:W.getBoundingClientRect())??null,!h.value||!e.isSelecting||P.button!==0||P.target!==lA.value||!AA.value)return;(oA=(X=P.target)==null?void 0:X.setPointerCapture)==null||oA.call(X,P.pointerId);const{x:hA,y:wA}=np(P,AA.value);J=!0,I=!1,u(),d.value={width:0,height:0,startX:hA,startY:wA,x:hA,y:wA},o.selectionStart(P)}function uA(P){var W;if(!AA.value||!d.value)return;I=!0;const{x:X,y:oA}=Ge(P,AA.value),{startX:hA=0,startY:wA=0}=d.value,bA={startX:hA,startY:wA,x:X<hA?X:hA,y:oA<wA?oA:wA,width:Math.abs(X-hA),height:Math.abs(oA-wA)},cA=nA.value,mA=tA.value;nA.value=new Set(Ba(t.value,bA,n.value,Q.value===ti.Partial,!0).map(b=>b.id)),tA.value=new Set;const _=((W=eA.value)==null?void 0:W.selectable)??!0;for(const b of nA.value){const x=k.value.get(b);if(x)for(const{edgeId:$}of x.values()){const K=R.value.get($);K&&(K.selectable??_)&&tA.value.add($)}}if(!Ka(cA,nA.value)){const b=ht(U.value,nA.value,!0);o.nodesChange(b)}if(!Ka(mA,tA.value)){const b=ht(R.value,tA.value);o.edgesChange(b)}d.value=bA,a.value=!0,g.value=!1}function FA(P){var W;P.button!==0||!J||((W=P.target)==null||W.releasePointerCapture(P.pointerId),!a.value&&d.value&&P.target===lA.value&&O(P),a.value=!1,d.value=null,g.value=nA.value.size>0,o.selectionEnd(P),e.selectionKeyPressed&&(I=!1),J=!1)}return(P,W)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"container",ref:lA,class:(0,r.normalizeClass)(["vue-flow__pane vue-flow__container",{selection:P.isSelecting}]),onClick:W[0]||(W[0]=X=>T.value?void 0:V(O,lA.value)(X)),onContextmenu:W[1]||(W[1]=X=>V(z,lA.value)(X)),onWheelPassive:W[2]||(W[2]=X=>V(q,lA.value)(X)),onPointerenter:W[3]||(W[3]=X=>T.value?void 0:(0,r.unref)(o).paneMouseEnter(X)),onPointerdown:W[4]||(W[4]=X=>T.value?rA(X):(0,r.unref)(o).paneMouseMove(X)),onPointermove:W[5]||(W[5]=X=>T.value?uA(X):(0,r.unref)(o).paneMouseMove(X)),onPointerup:W[6]||(W[6]=X=>T.value?FA(X):void 0),onPointerleave:W[7]||(W[7]=X=>(0,r.unref)(o).paneMouseLeave(X))},[(0,r.renderSlot)(P.$slots,"default"),(0,r.unref)(a)&&(0,r.unref)(d)?((0,r.openBlock)(),(0,r.createBlock)(Ap,{key:0,"user-selection-rect":(0,r.unref)(d)},null,8,["user-selection-rect"])):(0,r.createCommentVNode)("",!0),(0,r.unref)(g)&&(0,r.unref)(w).length?((0,r.openBlock)(),(0,r.createBlock)(tp,{key:1})):(0,r.createCommentVNode)("",!0)],34))}}),op=(0,r.defineComponent)({name:"Transform",compatConfig:{MODE:3},setup(e){const{viewport:A,fitViewOnInit:t,fitViewOnInitDone:n}=YA(),o=(0,r.computed)(()=>t.value?!n.value:!1),a=(0,r.computed)(()=>`translate(${A.value.x}px,${A.value.y}px) scale(${A.value.zoom})`);return(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"vue-flow__transformationpane vue-flow__container",style:(0,r.normalizeStyle)({transform:a.value,opacity:o.value?0:void 0})},[(0,r.renderSlot)(u.$slots,"default")],4))}}),ip=(0,r.defineComponent)({name:"Viewport",compatConfig:{MODE:3},setup(e){const{minZoom:A,maxZoom:t,defaultViewport:n,translateExtent:o,zoomActivationKeyCode:a,selectionKeyCode:u,panActivationKeyCode:d,panOnScroll:h,panOnScrollMode:g,panOnScrollSpeed:B,panOnDrag:w,zoomOnDoubleClick:m,zoomOnPinch:v,zoomOnScroll:Q,preventScrolling:H,noWheelClassName:N,noPanClassName:L,emits:R,connectionStartHandle:U,userSelectionActive:k,paneDragging:eA,d3Zoom:Y,d3Selection:sA,d3ZoomHandler:lA,viewport:nA,viewportRef:tA,paneClickDistance:AA}=YA();qB(tA);const T=(0,r.shallowRef)(!1),aA=(0,r.shallowRef)(!1);let I=null,J=!1,F=0,S={x:0,y:0,zoom:0};const V=Sn(d),O=Sn(u),z=Sn(a),q=(0,r.toRef)(()=>(!O.value||O.value&&u.value===!0)&&(V.value||w.value)),rA=(0,r.toRef)(()=>V.value||h.value),uA=(0,r.toRef)(()=>u.value===!0&&q.value!==!0),FA=(0,r.toRef)(()=>O.value&&u.value!==!0||k.value||uA.value),P=(0,r.toRef)(()=>U.value!==null);(0,r.onMounted)(()=>{if(!tA.value){Tn("Viewport element is missing");return}const wA=tA.value,bA=wA.getBoundingClientRect(),cA=Nh().clickDistance(AA.value).scaleExtent([A.value,t.value]).translateExtent(o.value),mA=Ne(wA).call(cA),_=mA.on("wheel.zoom"),b=Jt.translate(n.value.x??0,n.value.y??0).scale(Nt(n.value.zoom??1,A.value,t.value)),x=[[0,0],[bA.width,bA.height]],$=cA.constrain()(b,x,o.value);cA.transform(mA,$),cA.wheelDelta(Ca),Y.value=cA,sA.value=mA,lA.value=_,nA.value={x:$.x,y:$.y,zoom:$.k},cA.on("start",K=>{var BA;if(!K.sourceEvent)return null;F=K.sourceEvent.button,T.value=!0;const gA=oA(K.transform);((BA=K.sourceEvent)==null?void 0:BA.type)==="mousedown"&&(eA.value=!0),S=gA,R.viewportChangeStart(gA),R.moveStart({event:K,flowTransform:gA})}),cA.on("end",K=>{if(!K.sourceEvent)return null;if(T.value=!1,eA.value=!1,W(q.value,F??0)&&!J&&R.paneContextMenu(K.sourceEvent),J=!1,X(S,K.transform)){const BA=oA(K.transform);S=BA,R.viewportChangeEnd(BA),R.moveEnd({event:K,flowTransform:BA})}}),cA.filter(K=>{var BA;const gA=z.value||Q.value,HA=v.value&&K.ctrlKey,CA=K.button,LA=K.type==="wheel";if(CA===1&&K.type==="mousedown"&&(hA(K,"vue-flow__node")||hA(K,"vue-flow__edge")))return!0;if(!q.value&&!gA&&!rA.value&&!m.value&&!v.value||k.value||P.value&&!LA||!m.value&&K.type==="dblclick"||hA(K,N.value)&&LA||hA(K,L.value)&&(!LA||rA.value&&LA&&!z.value)||!v.value&&K.ctrlKey&&LA||!gA&&!rA.value&&!HA&&LA)return!1;if(!v&&K.type==="touchstart"&&((BA=K.touches)==null?void 0:BA.length)>1)return K.preventDefault(),!1;if(!q.value&&(K.type==="mousedown"||K.type==="touchstart")||uA.value&&Array.isArray(w.value)&&w.value.includes(0)&&CA===0||Array.isArray(w.value)&&!w.value.includes(CA)&&(K.type==="mousedown"||K.type==="touchstart"))return!1;const KA=Array.isArray(w.value)&&w.value.includes(CA)||u.value===!0&&Array.isArray(w.value)&&!w.value.includes(0)||!CA||CA<=1;return(!K.ctrlKey||V.value||LA)&&KA}),(0,r.watch)([k,q],()=>{k.value&&!T.value?cA.on("zoom",null):k.value||cA.on("zoom",K=>{nA.value={x:K.transform.x,y:K.transform.y,zoom:K.transform.k};const BA=oA(K.transform);J=W(q.value,F??0),R.viewportChange(BA),R.move({event:K,flowTransform:BA})})},{immediate:!0}),(0,r.watch)([k,rA,g,z,v,H,N],()=>{rA.value&&!z.value&&!k.value?mA.on("wheel.zoom",K=>{if(hA(K,N.value))return!1;const BA=z.value||Q.value,gA=v.value&&K.ctrlKey;if(!(!H.value||rA.value||BA||gA))return!1;K.preventDefault(),K.stopImmediatePropagation();const HA=mA.property("__zoom").k||1,CA=br();if(!V.value&&K.ctrlKey&&v.value&&CA){const re=Oe(K),nt=HA*2**Ca(K);cA.scaleTo(mA,nt,re,K);return}const LA=K.deltaMode===1?20:1;let KA=g.value===_n.Vertical?0:K.deltaX*LA,XA=g.value===_n.Horizontal?0:K.deltaY*LA;!CA&&K.shiftKey&&g.value!==_n.Vertical&&!KA&&XA&&(KA=XA,XA=0),cA.translateBy(mA,-(KA/HA)*B.value,-(XA/HA)*B.value);const ue=oA(mA.property("__zoom"));I&&clearTimeout(I),aA.value?(R.move({event:K,flowTransform:ue}),R.viewportChange(ue),I=setTimeout(()=>{R.moveEnd({event:K,flowTransform:ue}),R.viewportChangeEnd(ue),aA.value=!1},150)):(aA.value=!0,R.moveStart({event:K,flowTransform:ue}),R.viewportChangeStart(ue))},{passive:!1}):typeof _<"u"&&mA.on("wheel.zoom",function(K,BA){const gA=!H.value&&K.type==="wheel"&&!K.ctrlKey,HA=z.value||Q.value,CA=v.value&&K.ctrlKey;if(!HA&&!h.value&&!CA&&K.type==="wheel"||gA||hA(K,N.value))return null;K.preventDefault(),_.call(this,K,BA)},{passive:!1})},{immediate:!0})});function W(wA,bA){return bA===2&&Array.isArray(wA)&&wA.includes(2)}function X(wA,bA){return wA.x!==bA.x&&!Number.isNaN(bA.x)||wA.y!==bA.y&&!Number.isNaN(bA.y)||wA.zoom!==bA.k&&!Number.isNaN(bA.k)}function oA(wA){return{x:wA.x,y:wA.y,zoom:wA.k}}function hA(wA,bA){return wA.target.closest(`.${bA}`)}return(wA,bA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref_key:"viewportRef",ref:tA,class:"vue-flow__viewport vue-flow__container"},[(0,r.createVNode)(rp,{"is-selecting":FA.value,"selection-key-pressed":(0,r.unref)(O),class:(0,r.normalizeClass)({connecting:P.value,dragging:(0,r.unref)(eA),draggable:(0,r.unref)(w)===!0||Array.isArray((0,r.unref)(w))&&(0,r.unref)(w).includes(0)})},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(op,null,{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(wA.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),sp=["id"],ap=["id"],lp=["id"],cp=(0,r.defineComponent)({name:"A11yDescriptions",compatConfig:{MODE:3},setup(e){const{id:A,disableKeyboardA11y:t,ariaLiveMessage:n}=YA();return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createElementVNode)("div",{id:`${(0,r.unref)(ia)}-${(0,r.unref)(A)}`,style:{display:"none"}}," Press enter or space to select a node. "+(0,r.toDisplayString)((0,r.unref)(t)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,sp),(0,r.createElementVNode)("div",{id:`${(0,r.unref)(sa)}-${(0,r.unref)(A)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,ap),(0,r.unref)(t)?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,id:`${(0,r.unref)(Oh)}-${(0,r.unref)(A)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},(0,r.toDisplayString)((0,r.unref)(n)),9,lp))],64))}});function up(){const e=YA();(0,r.watch)(()=>e.viewportHelper.value.viewportInitialized,A=>{A&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function dp(e,A,t){return t===IA.Left?e-A:t===IA.Right?e+A:e}function fp(e,A,t){return t===IA.Top?e-A:t===IA.Bottom?e+A:e}var Bi=function({radius:e=10,centerX:A=0,centerY:t=0,position:n=IA.Top,type:o}){return(0,r.h)("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:dp(A,e,n),cy:fp(t,e,n),r:e,stroke:"transparent",fill:"transparent"})};Bi.props=["radius","centerX","centerY","position","type"],Bi.compatConfig={MODE:3};var tl=Bi,gp=(0,r.defineComponent)({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:A,addSelectedEdges:t,connectionMode:n,edgeUpdaterRadius:o,emits:a,nodesSelectionActive:u,noPanClassName:d,getEdgeTypes:h,removeSelectedEdges:g,findEdge:B,findNode:w,isValidConnection:m,multiSelectionActive:v,disableKeyboardA11y:Q,elementsSelectable:H,edgesUpdatable:N,edgesFocusable:L,hooks:R}=YA(),U=(0,r.computed)(()=>B(e.id)),{emit:k,on:eA}=pB(U.value,a),Y=(0,r.inject)(Ir),sA=(0,r.getCurrentInstance)(),lA=(0,r.ref)(!1),nA=(0,r.ref)(!1),tA=(0,r.ref)(""),AA=(0,r.ref)(null),T=(0,r.ref)("source"),aA=(0,r.ref)(null),I=(0,r.toRef)(()=>typeof U.value.selectable>"u"?H.value:U.value.selectable),J=(0,r.toRef)(()=>typeof U.value.updatable>"u"?N.value:U.value.updatable),F=(0,r.toRef)(()=>typeof U.value.focusable>"u"?L.value:U.value.focusable);(0,r.provide)(gB,e.id),(0,r.provide)(hB,aA);const S=(0,r.computed)(()=>U.value.class instanceof Function?U.value.class(U.value):U.value.class),V=(0,r.computed)(()=>U.value.style instanceof Function?U.value.style(U.value):U.value.style),O=(0,r.computed)(()=>{const b=U.value.type||"default",x=Y?.[`edge-${b}`];if(x)return x;let $=U.value.template??h.value[b];if(typeof $=="string"&&sA){const K=Object.keys(sA.appContext.components);K&&K.includes(b)&&($=(0,r.resolveComponent)(b,!1))}return $&&typeof $!="string"?$:(a.error(new ce(ie.EDGE_TYPE_MISSING,$)),!1)}),{handlePointerDown:z}=Ga({nodeId:tA,handleId:AA,type:T,isValidConnection:m,edgeUpdaterType:T,onEdgeUpdate:uA,onEdgeUpdateEnd:FA});return()=>{const b=w(U.value.source),x=w(U.value.target),$="pathOptions"in U.value?U.value.pathOptions:{};if(!b&&!x)return a.error(new ce(ie.EDGE_SOURCE_TARGET_MISSING,U.value.id,U.value.source,U.value.target)),null;if(!b)return a.error(new ce(ie.EDGE_SOURCE_MISSING,U.value.id,U.value.source)),null;if(!x)return a.error(new ce(ie.EDGE_TARGET_MISSING,U.value.id,U.value.target)),null;if(!U.value||U.value.hidden||b.hidden||x.hidden)return null;let K;n.value===At.Strict?K=b.handleBounds.source:K=[...b.handleBounds.source||[],...b.handleBounds.target||[]];const BA=_a(K,U.value.sourceHandle);let gA;n.value===At.Strict?gA=x.handleBounds.target:gA=[...x.handleBounds.target||[],...x.handleBounds.source||[]];const HA=_a(gA,U.value.targetHandle),CA=BA?.position||IA.Bottom,LA=HA?.position||IA.Top,{x:KA,y:XA}=qt(b,BA,CA),{x:ue,y:re}=qt(x,HA,LA);return U.value.sourceX=KA,U.value.sourceY=XA,U.value.targetX=ue,U.value.targetY=re,(0,r.h)("g",{ref:aA,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${O.value===!1?"default":U.value.type||"default"}`,d.value,S.value,{updating:lA.value,selected:U.value.selected,animated:U.value.animated,inactive:!I.value&&!R.value.edgeClick.hasListeners()}],tabIndex:F.value?0:void 0,"aria-label":U.value.ariaLabel===null?void 0:U.value.ariaLabel??`Edge from ${U.value.source} to ${U.value.target}`,"aria-describedby":F.value?`${sa}-${A}`:void 0,"aria-roledescription":"edge",role:F.value?"group":"img",...U.value.domAttributes,onClick:W,onContextmenu:X,onDblclick:oA,onMouseenter:hA,onMousemove:wA,onMouseleave:bA,onKeyDown:F.value?_:void 0},[nA.value?null:(0,r.h)(O.value===!1?h.value.default:O.value,{id:e.id,sourceNode:b,targetNode:x,source:U.value.source,target:U.value.target,type:U.value.type,updatable:J.value,selected:U.value.selected,animated:U.value.animated,label:U.value.label,labelStyle:U.value.labelStyle,labelShowBg:U.value.labelShowBg,labelBgStyle:U.value.labelBgStyle,labelBgPadding:U.value.labelBgPadding,labelBgBorderRadius:U.value.labelBgBorderRadius,data:U.value.data,events:{...U.value.events,...eA},style:V.value,markerStart:`url('#${Ln(U.value.markerStart,A)}')`,markerEnd:`url('#${Ln(U.value.markerEnd,A)}')`,sourcePosition:CA,targetPosition:LA,sourceX:KA,sourceY:XA,targetX:ue,targetY:re,sourceHandleId:U.value.sourceHandle,targetHandleId:U.value.targetHandle,interactionWidth:U.value.interactionWidth,...$}),[J.value==="source"||J.value===!0?[(0,r.h)("g",{onMousedown:cA,onMouseenter:q,onMouseout:rA},(0,r.h)(tl,{position:CA,centerX:KA,centerY:XA,radius:o.value,type:"source","data-type":"source"}))]:null,J.value==="target"||J.value===!0?[(0,r.h)("g",{onMousedown:mA,onMouseenter:q,onMouseout:rA},(0,r.h)(tl,{position:LA,centerX:ue,centerY:re,radius:o.value,type:"target","data-type":"target"}))]:null]])};function q(){lA.value=!0}function rA(){lA.value=!1}function uA(b,x){k.update({event:b,edge:U.value,connection:x})}function FA(b){k.updateEnd({event:b,edge:U.value}),nA.value=!1}function P(b,x){b.button===0&&(nA.value=!0,tA.value=x?U.value.target:U.value.source,AA.value=(x?U.value.targetHandle:U.value.sourceHandle)??null,T.value=x?"target":"source",k.updateStart({event:b,edge:U.value}),z(b))}function W(b){var x;const $={event:b,edge:U.value};I.value&&(u.value=!1,U.value.selected&&v.value?(g([U.value]),(x=aA.value)==null||x.blur()):t([U.value])),k.click($)}function X(b){k.contextMenu({event:b,edge:U.value})}function oA(b){k.doubleClick({event:b,edge:U.value})}function hA(b){k.mouseEnter({event:b,edge:U.value})}function wA(b){k.mouseMove({event:b,edge:U.value})}function bA(b){k.mouseLeave({event:b,edge:U.value})}function cA(b){P(b,!0)}function mA(b){P(b,!1)}function _(b){var x;!Q.value&&aa.includes(b.key)&&I.value&&(b.key==="Escape"?((x=aA.value)==null||x.blur(),g([B(e.id)])):t([B(e.id)]))}}}),hp=(0,r.defineComponent)({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:A,connectionMode:t,connectionStartHandle:n,connectionEndHandle:o,connectionPosition:a,connectionLineType:u,connectionLineStyle:d,connectionLineOptions:h,connectionStatus:g,viewport:B,findNode:w}=YA(),m=(e=(0,r.inject)(Ir))==null?void 0:e["connection-line"],v=(0,r.computed)(()=>{var R;return w((R=n.value)==null?void 0:R.nodeId)}),Q=(0,r.computed)(()=>{var R;return w((R=o.value)==null?void 0:R.nodeId)??null}),H=(0,r.computed)(()=>({x:(a.value.x-B.value.x)/B.value.zoom,y:(a.value.y-B.value.y)/B.value.zoom})),N=(0,r.computed)(()=>h.value.markerStart?`url(#${Ln(h.value.markerStart,A)})`:""),L=(0,r.computed)(()=>h.value.markerEnd?`url(#${Ln(h.value.markerEnd,A)})`:"");return()=>{var R,U,k;if(!v.value||!n.value)return null;const eA=n.value.id,Y=n.value.type,sA=v.value.handleBounds;let lA=sA?.[Y]??[];if(t.value===At.Loose){const V=sA?.[Y==="source"?"target":"source"]??[];lA=[...lA,...V]}if(!lA)return null;const nA=(eA?lA.find(V=>V.id===eA):lA[0])??null,tA=nA?.position??IA.Top,{x:AA,y:T}=qt(v.value,nA,tA);let aA=null;Q.value&&(t.value===At.Strict?aA=((R=Q.value.handleBounds[Y==="source"?"target":"source"])==null?void 0:R.find(V=>{var O;return V.id===((O=o.value)==null?void 0:O.id)}))||null:aA=((U=[...Q.value.handleBounds.source??[],...Q.value.handleBounds.target??[]])==null?void 0:U.find(V=>{var O;return V.id===((O=o.value)==null?void 0:O.id)}))||null);const I=((k=o.value)==null?void 0:k.position)??(tA?li[tA]:null);if(!tA||!I)return null;const J=u.value??h.value.type??Dt.Bezier;let F="";const S={sourceX:AA,sourceY:T,sourcePosition:tA,targetX:H.value.x,targetY:H.value.y,targetPosition:I};return J===Dt.Bezier?[F]=gi(S):J===Dt.Step?[F]=hi({...S,borderRadius:0}):J===Dt.SmoothStep?[F]=hi(S):J===Dt.SimpleBezier?[F]=ja(S):F=`M${AA},${T} ${H.value.x},${H.value.y}`,(0,r.h)("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},(0,r.h)("g",{class:"vue-flow__connection"},m?(0,r.h)(m,{sourceX:AA,sourceY:T,sourcePosition:tA,targetX:H.value.x,targetY:H.value.y,targetPosition:I,sourceNode:v.value,sourceHandle:nA,targetNode:Q.value,targetHandle:aA,markerEnd:L.value,markerStart:N.value,connectionStatus:g.value}):(0,r.h)("path",{d:F,class:[h.value.class,g.value,"vue-flow__connection-path"],style:{...d.value,...h.value.style},"marker-end":L.value,"marker-start":N.value})))}}}),Bp=["id","markerWidth","markerHeight","markerUnits","orient"],pp=(0,r.defineComponent)({name:"MarkerType",compatConfig:{MODE:3},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createElementBlock)("marker",{id:A.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${A.width}`,markerHeight:`${A.height}`,markerUnits:A.markerUnits,orient:A.orient},[A.type===(0,r.unref)(et).ArrowClosed?((0,r.openBlock)(),(0,r.createElementBlock)("polyline",{key:0,style:(0,r.normalizeStyle)({stroke:A.color,fill:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):(0,r.createCommentVNode)("",!0),A.type===(0,r.unref)(et).Arrow?((0,r.openBlock)(),(0,r.createElementBlock)("polyline",{key:1,style:(0,r.normalizeStyle)({stroke:A.color,strokeWidth:A.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):(0,r.createCommentVNode)("",!0)],8,Bp))}}),mp={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},wp=(0,r.defineComponent)({name:"MarkerDefinitions",compatConfig:{MODE:3},setup(e){const{id:A,edges:t,connectionLineOptions:n,defaultMarkerColor:o}=YA(),a=(0,r.computed)(()=>{const u=new Set,d=[],h=g=>{if(g){const B=Ln(g,A);u.has(B)||(typeof g=="object"?d.push({...g,id:B,color:g.color||o.value}):d.push({id:B,color:o.value,type:g}),u.add(B))}};for(const g of[n.value.markerEnd,n.value.markerStart])h(g);for(const g of t.value)for(const B of[g.markerStart,g.markerEnd])h(B);return d.sort((g,B)=>g.id.localeCompare(B.id))});return(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",mp,[(0,r.createElementVNode)("defs",null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(a.value,h=>((0,r.openBlock)(),(0,r.createBlock)(pp,{id:h.id,key:h.id,type:h.type,color:h.color,width:h.width,height:h.height,markerUnits:h.markerUnits,"stroke-width":h.strokeWidth,orient:h.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),Cp=(0,r.defineComponent)({name:"Edges",compatConfig:{MODE:3},setup(e){const{findNode:A,getEdges:t,elevateEdgesOnSelect:n}=YA();return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)(wp),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(t),u=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{key:u.id,class:"vue-flow__edges vue-flow__container",style:(0,r.normalizeStyle)({zIndex:(0,r.unref)(tB)(u,(0,r.unref)(A),(0,r.unref)(n))})},[(0,r.createVNode)((0,r.unref)(gp),{id:u.id},null,8,["id"])],4))),128)),(0,r.createVNode)((0,r.unref)(hp))],64))}}),vp=(0,r.defineComponent)({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:A,noPanClassName:t,selectNodesOnDrag:n,nodesSelectionActive:o,multiSelectionActive:a,emits:u,removeSelectedNodes:d,addSelectedNodes:h,updateNodeDimensions:g,onUpdateNodeInternals:B,getNodeTypes:w,nodeExtent:m,elevateNodesOnSelect:v,disableKeyboardA11y:Q,ariaLiveMessage:H,snapToGrid:N,snapGrid:L,nodeDragThreshold:R,nodesDraggable:U,elementsSelectable:k,nodesConnectable:eA,nodesFocusable:Y,hooks:sA}=YA(),lA=(0,r.ref)(null);(0,r.provide)(Va,lA),(0,r.provide)(Ra,e.id);const nA=(0,r.inject)(Ir),tA=(0,r.getCurrentInstance)(),AA=Xa(),{node:T,parentNode:aA}=za(e.id),{emit:I,on:J}=vB(T,u),F=(0,r.toRef)(()=>typeof T.draggable>"u"?U.value:T.draggable),S=(0,r.toRef)(()=>typeof T.selectable>"u"?k.value:T.selectable),V=(0,r.toRef)(()=>typeof T.connectable>"u"?eA.value:T.connectable),O=(0,r.toRef)(()=>typeof T.focusable>"u"?Y.value:T.focusable),z=(0,r.computed)(()=>S.value||F.value||sA.value.nodeClick.hasListeners()||sA.value.nodeDoubleClick.hasListeners()||sA.value.nodeMouseEnter.hasListeners()||sA.value.nodeMouseMove.hasListeners()||sA.value.nodeMouseLeave.hasListeners()),q=(0,r.toRef)(()=>!!T.dimensions.width&&!!T.dimensions.height),rA=(0,r.computed)(()=>{const x=T.type||"default",$=nA?.[`node-${x}`];if($)return $;let K=T.template||w.value[x];if(typeof K=="string"&&tA){const BA=Object.keys(tA.appContext.components);BA&&BA.includes(x)&&(K=(0,r.resolveComponent)(x,!1))}return K&&typeof K!="string"?K:(u.error(new ce(ie.NODE_TYPE_MISSING,K)),!1)}),uA=Pa({id:e.id,el:lA,disabled:()=>!F.value,selectable:S,dragHandle:()=>T.dragHandle,onStart(x){I.dragStart(x)},onDrag(x){I.drag(x)},onStop(x){I.dragStop(x)},onClick(x){_(x)}}),FA=(0,r.computed)(()=>T.class instanceof Function?T.class(T):T.class),P=(0,r.computed)(()=>{const x=(T.style instanceof Function?T.style(T):T.style)||{},$=T.width instanceof Function?T.width(T):T.width,K=T.height instanceof Function?T.height(T):T.height;return!x.width&&$&&(x.width=typeof $=="string"?$:`${$}px`),!x.height&&K&&(x.height=typeof K=="string"?K:`${K}px`),x}),W=(0,r.toRef)(()=>Number(T.zIndex??P.value.zIndex??0));return B(x=>{(x.includes(e.id)||!x.length)&&oA()}),(0,r.onMounted)(()=>{(0,r.watch)(()=>T.hidden,(x=!1,$,K)=>{!x&&lA.value&&(e.resizeObserver.observe(lA.value),K(()=>{lA.value&&e.resizeObserver.unobserve(lA.value)}))},{immediate:!0,flush:"post"})}),(0,r.watch)([()=>T.type,()=>T.sourcePosition,()=>T.targetPosition],()=>{(0,r.nextTick)(()=>{g([{id:e.id,nodeElement:lA.value,forceUpdate:!0}])})}),(0,r.watch)([()=>T.position.x,()=>T.position.y,()=>{var x;return(x=aA.value)==null?void 0:x.computedPosition.x},()=>{var x;return(x=aA.value)==null?void 0:x.computedPosition.y},()=>{var x;return(x=aA.value)==null?void 0:x.computedPosition.z},W,()=>T.selected,()=>T.dimensions.height,()=>T.dimensions.width,()=>{var x;return(x=aA.value)==null?void 0:x.dimensions.height},()=>{var x;return(x=aA.value)==null?void 0:x.dimensions.width}],([x,$,K,BA,gA,HA])=>{const CA={x,y:$,z:HA+(v.value&&T.selected?1e3:0)};typeof K<"u"&&typeof BA<"u"?T.computedPosition=Jh({x:K,y:BA,z:gA},CA):T.computedPosition=CA},{flush:"post",immediate:!0}),(0,r.watch)([()=>T.extent,m],([x,$],[K,BA])=>{(x!==K||$!==BA)&&X()}),T.extent==="parent"||typeof T.extent=="object"&&"range"in T.extent&&T.extent.range==="parent"?Lo(()=>q).toBe(!0).then(X):X(),()=>T.hidden?null:(0,r.h)("div",{ref:lA,"data-id":T.id,class:["vue-flow__node",`vue-flow__node-${rA.value===!1?"default":T.type||"default"}`,{[t.value]:F.value,dragging:uA?.value,draggable:F.value,selected:T.selected,selectable:S.value,parent:T.isParent},FA.value],style:{visibility:q.value?"visible":"hidden",zIndex:T.computedPosition.z??W.value,transform:`translate(${T.computedPosition.x}px,${T.computedPosition.y}px)`,pointerEvents:z.value?"all":"none",...P.value},tabIndex:O.value?0:void 0,role:O.value?"group":void 0,"aria-describedby":Q.value?void 0:`${ia}-${A}`,"aria-label":T.ariaLabel,"aria-roledescription":"node",...T.domAttributes,onMouseenter:hA,onMousemove:wA,onMouseleave:bA,onContextmenu:cA,onClick:_,onDblclick:mA,onKeydown:b},[(0,r.h)(rA.value===!1?w.value.default:rA.value,{id:T.id,type:T.type,data:T.data,events:{...T.events,...J},selected:T.selected,resizing:T.resizing,dragging:uA.value,connectable:V.value,position:T.computedPosition,dimensions:T.dimensions,isValidTargetPos:T.isValidTargetPos,isValidSourcePos:T.isValidSourcePos,parent:T.parentNode,parentNodeId:T.parentNode,zIndex:T.computedPosition.z??W.value,targetPosition:T.targetPosition,sourcePosition:T.sourcePosition,label:T.label,dragHandle:T.dragHandle,onUpdateNodeInternals:oA})]);function X(){const x=T.computedPosition,{computedPosition:$,position:K}=ii(T,N.value?Hr(x,L.value):x,u.error,m.value,aA.value);(T.computedPosition.x!==$.x||T.computedPosition.y!==$.y)&&(T.computedPosition={...T.computedPosition,...$}),(T.position.x!==K.x||T.position.y!==K.y)&&(T.position=K)}function oA(){lA.value&&g([{id:e.id,nodeElement:lA.value,forceUpdate:!0}])}function hA(x){uA?.value||I.mouseEnter({event:x,node:T})}function wA(x){uA?.value||I.mouseMove({event:x,node:T})}function bA(x){uA?.value||I.mouseLeave({event:x,node:T})}function cA(x){return I.contextMenu({event:x,node:T})}function mA(x){return I.doubleClick({event:x,node:T})}function _(x){S.value&&(!n.value||!F.value||R.value>0)&&ci(T,a.value,h,d,o,!1,lA.value),I.click({event:x,node:T})}function b(x){if(!(ni(x)||Q.value))if(aa.includes(x.key)&&S.value){const $=x.key==="Escape";ci(T,a.value,h,d,o,$,lA.value)}else F.value&&T.selected&&Zt[x.key]&&(x.preventDefault(),H.value=`Moved selected node ${x.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~T.position.x}, y: ${~~T.position.y}`,AA({x:Zt[x.key].x,y:Zt[x.key].y},x.shiftKey))}}}),yp={height:"0",width:"0"},Qp=(0,r.defineComponent)({name:"EdgeLabelRenderer",compatConfig:{MODE:3},setup(e){const{viewportRef:A}=YA(),t=(0,r.toRef)(()=>{var n;return(n=A.value)==null?void 0:n.getElementsByClassName("vue-flow__edge-labels")[0]});return(n,o)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",null,[((0,r.openBlock)(),(0,r.createElementBlock)("foreignObject",yp,[((0,r.openBlock)(),(0,r.createBlock)(r.Teleport,{to:t.value,disabled:!t.value},[(0,r.renderSlot)(n.$slots,"default")],8,["to","disabled"]))]))]))}});function Ep(e={includeHiddenNodes:!1}){const{nodes:A}=YA();return(0,r.computed)(()=>{if(A.value.length===0)return!1;for(const t of A.value)if((e.includeHiddenNodes||!t.hidden)&&(t?.handleBounds===void 0||t.dimensions.width===0||t.dimensions.height===0))return!1;return!0})}var Up={class:"vue-flow__nodes vue-flow__container"},Fp=(0,r.defineComponent)({name:"Nodes",compatConfig:{MODE:3},setup(e){const{getNodes:A,updateNodeDimensions:t,emits:n}=YA(),o=Ep(),a=(0,r.ref)();return(0,r.watch)(o,u=>{u&&(0,r.nextTick)(()=>{n.nodesInitialized(A.value)})},{immediate:!0}),(0,r.onMounted)(()=>{a.value=new ResizeObserver(u=>{const d=u.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));(0,r.nextTick)(()=>t(d))})}),(0,r.onBeforeUnmount)(()=>{var u;return(u=a.value)==null?void 0:u.disconnect()}),(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",Up,[a.value?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)((0,r.unref)(A),(h,g,B,w)=>{const m=[h.id];if(w&&w.key===h.id&&(0,r.isMemoSame)(w,m))return w;const v=((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(vp),{id:h.id,key:h.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return v.memo=m,v},d,0),128)):(0,r.createCommentVNode)("",!0)]))}});function bp(){const{emits:e}=YA();(0,r.onMounted)(()=>{if(La()){const A=document.querySelector(".vue-flow__pane");A&&window.getComputedStyle(A).zIndex!=="1"&&e.error(new ce(ie.MISSING_STYLES))}})}var Hp=(0,r.createElementVNode)("div",{class:"vue-flow__edge-labels"},null,-1),Ip=(0,r.defineComponent)({name:"VueFlow",compatConfig:{MODE:3},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:A,emit:t}){const n=e,o=(0,r.useSlots)(),a=To(n,"modelValue",t),u=To(n,"nodes",t),d=To(n,"edges",t),h=YA(n),g=UB({modelValue:a,nodes:u,edges:d},n,h);return bB(t,h.hooks),up(),bp(),(0,r.provide)(Ir,o),(0,r.onUnmounted)(g),A(h),(B,w)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{ref:(0,r.unref)(h).vueFlowRef,class:"vue-flow"},[(0,r.createVNode)(ip,null,{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Cp),Hp,(0,r.createVNode)(Fp),(0,r.renderSlot)(B.$slots,"zoom-pane")]),_:3}),(0,r.renderSlot)(B.$slots,"default"),(0,r.createVNode)(cp)],512))}}),_p=(0,r.defineComponent)({name:"Panel",compatConfig:{MODE:3},props:{position:{}},setup(e){const A=e,{userSelectionActive:t}=YA(),n=(0,r.computed)(()=>`${A.position}`.split("-"));return(o,a)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["vue-flow__panel",n.value]),style:(0,r.normalizeStyle)({pointerEvents:(0,r.unref)(t)?"none":"all"})},[(0,r.renderSlot)(o.$slots,"default")],6))}}),tt=(e=>(e.Lines="lines",e.Dots="dots",e))(tt||{}),Sp=function({dimensions:e,size:A,color:t}){return(0,r.h)("path",{stroke:t,"stroke-width":A,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},xp=function({radius:e,color:A}){return(0,r.h)("circle",{cx:e,cy:e,r:e,fill:A})};tt.Lines,tt.Dots;var Dp={[tt.Dots]:"#81818a",[tt.Lines]:"#eee"},Np=["id","x","y","width","height","patternTransform"],Lp={key:2,height:"100",width:"100"},Tp=["fill"],kp=["x","y","fill"],Mp=(0,r.defineComponent)({name:"Background",compatConfig:{MODE:3},props:{id:{},variant:{default:()=>tt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:A,viewport:t}=YA(),n=(0,r.computed)(()=>{const u=t.value.zoom,[d,h]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],g=[d*u||1,h*u||1],B=e.size*u,[w,m]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset];return{scaledGap:g,offset:[w*u||1+g[0]/2,m*u||1+g[1]/2],size:B}}),o=(0,r.toRef)(()=>`pattern-${A}${e.id?`-${e.id}`:""}`),a=(0,r.toRef)(()=>e.color||e.patternColor||Dp[e.variant||tt.Dots]);return(u,d)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{class:"vue-flow__background vue-flow__container",style:(0,r.normalizeStyle)({height:`${u.height>100?100:u.height}%`,width:`${u.width>100?100:u.width}%`})},[(0,r.renderSlot)(u.$slots,"pattern-container",{id:o.value},()=>[(0,r.createElementVNode)("pattern",{id:o.value,x:(0,r.unref)(t).x%n.value.scaledGap[0],y:(0,r.unref)(t).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[(0,r.renderSlot)(u.$slots,"pattern",{},()=>[u.variant===(0,r.unref)(tt).Lines?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Sp),{key:0,size:u.lineWidth,color:a.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):u.variant===(0,r.unref)(tt).Dots?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(xp),{key:1,color:a.value,radius:n.value.size/2},null,8,["color","radius"])):(0,r.createCommentVNode)("",!0),u.bgColor?((0,r.openBlock)(),(0,r.createElementBlock)("svg",Lp,[(0,r.createElementVNode)("rect",{width:"100%",height:"100%",fill:u.bgColor},null,8,Tp)])):(0,r.createCommentVNode)("",!0)])],8,Np)]),(0,r.createElementVNode)("rect",{x:u.x,y:u.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,kp),(0,r.renderSlot)(u.$slots,"default",{id:o.value})],4))}}),Kp={name:"ControlButton",compatConfig:{MODE:3}},Op=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Rp={type:"button",class:"vue-flow__controls-button"};function Vp(e,A,t,n,o,a){return(0,r.openBlock)(),(0,r.createElementBlock)("button",Rp,[(0,r.renderSlot)(e.$slots,"default")])}var Tr=Op(Kp,[["render",Vp]]),Pp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Gp=[(0,r.createElementVNode)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function zp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Pp,Gp)}var Xp={render:zp},$p={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Wp=[(0,r.createElementVNode)("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Yp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",$p,Wp)}var Jp={render:Yp},Zp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},jp=[(0,r.createElementVNode)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function qp(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",Zp,jp)}var Am={render:qp},em={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},tm=[(0,r.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1)];function nm(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",em,tm)}var rm={render:nm},om={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},im=[(0,r.createElementVNode)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function sm(e,A){return(0,r.openBlock)(),(0,r.createElementBlock)("svg",om,im)}var am={render:sm},lm=(0,r.defineComponent)({name:"Controls",compatConfig:{MODE:3},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>ra.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:A}){const{nodesDraggable:t,nodesConnectable:n,elementsSelectable:o,setInteractive:a,zoomIn:u,zoomOut:d,fitView:h,viewport:g,minZoom:B,maxZoom:w}=YA(),m=(0,r.toRef)(()=>t.value||n.value||o.value),v=(0,r.toRef)(()=>g.value.zoom<=B.value),Q=(0,r.toRef)(()=>g.value.zoom>=w.value);function H(){u(),A("zoomIn")}function N(){d(),A("zoomOut")}function L(){h(e.fitViewParams),A("fitView")}function R(){a(!m.value),A("interactionChange",!m.value)}return(U,k)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(_p),{class:"vue-flow__controls",position:U.position},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"top"),U.showZoom?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.renderSlot)(U.$slots,"control-zoom-in",{},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-zoomin",disabled:Q.value,onClick:H},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"icon-zoom-in",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Xp))))])]),_:3},8,["disabled"])]),(0,r.renderSlot)(U.$slots,"control-zoom-out",{},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-zoomout",disabled:v.value,onClick:N},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"icon-zoom-out",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Jp))))])]),_:3},8,["disabled"])])],64)):(0,r.createCommentVNode)("",!0),U.showFitView?(0,r.renderSlot)(U.$slots,"control-fit-view",{key:1},()=>[(0,r.createVNode)(Tr,{class:"vue-flow__controls-fitview",onClick:L},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(U.$slots,"icon-fit-view",{},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(Am))))])]),_:3})]):(0,r.createCommentVNode)("",!0),U.showInteractive?(0,r.renderSlot)(U.$slots,"control-interactive",{key:2},()=>[U.showInteractive?((0,r.openBlock)(),(0,r.createBlock)(Tr,{key:0,class:"vue-flow__controls-interactive",onClick:R},{default:(0,r.withCtx)(()=>[m.value?(0,r.renderSlot)(U.$slots,"icon-unlock",{key:0},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(am))))]):(0,r.createCommentVNode)("",!0),m.value?(0,r.createCommentVNode)("",!0):(0,r.renderSlot)(U.$slots,"icon-lock",{key:1},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)((0,r.unref)(rm))))])]),_:3})):(0,r.createCommentVNode)("",!0)]):(0,r.createCommentVNode)("",!0),(0,r.renderSlot)(U.$slots,"default")]),_:3},8,["position"]))}}),cm=["onClick"],um={class:"d-flow-node-menus-item-name"},dm=(0,r.defineComponent)({name:"DNodeMenus",__name:"nodeMenus",props:{fromNodeId:{},handleId:{}},emits:["addNode"],setup(e,{emit:A}){const t=e,n=A,o=(0,r.inject)("d_flow_design_provide",{}),a=o.getFlowComponents?.()||[],u=d=>{n("addNode",d.type),(0,r.nextTick)(()=>{t.handleId==="line"?o.addNodeByLine?.(d.type,t.fromNodeId||""):o.addNode?.(d.type,t.fromNodeId||"",t.handleId||"")})};return(d,h)=>{const g=(0,r.resolveComponent)("j-icon");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-flow-node-menus",onClick:(0,r.withModifiers)(()=>{},["stop"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(a),(B,w)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:w,class:"d-flow-node-menus-item",onClick:m=>u(B)},[(0,r.createElementVNode)("div",{class:"d-flow-node-menus-item-icon",style:(0,r.normalizeStyle)({backgroundColor:B.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(g,{icon:B.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",um,(0,r.toDisplayString)(B.name),1)],8,cm))),128))])}}}),pi=dm,fm={class:"d-flow-step-name"},gm={key:0,style:{color:"var(--j-color-text-2)"}},hm={style:{color:"var(--j-color-text)"}},Bm=(0,r.defineComponent)({name:"DStepNode",__name:"stepNode",props:{id:{},data:{}},setup(e){const A=e,{onNodeClick:t,onEdgeClick:n,onMoveStart:o,onConnectStart:a,onNodeDragStart:u,removeNodes:d,getEdges:h,getNodes:g,onNodesChange:B}=YA(),w=(0,r.inject)("d_flow_design_provide",{}),m=(0,r.computed)(()=>w.getFlowComponentMap?.value?.[A.data.type]||{}),v=()=>{d(A.id),w.onRemoveNode?.(A.id)},Q=(0,r.ref)({});B(aA=>{if(A.data.isInit&&aA.findIndex(I=>I.type==="select"&&I.id===A.id&&I.id==="start"&&I.selected)!==-1){const I=g.value.find(J=>J.id==="start");I&&(I.data.isInit=!1),Q.value.s1=!0}});const H=(0,r.ref)(!1),N=aA=>{aA.indexOf("t")!==-1&&!L.value||(H.value=!0,Q.value[aA]=!0)},L=(0,r.computed)(()=>h.value.findIndex(aA=>aA.target===A.id)===-1),R=(0,r.ref)(!1),U=()=>{R.value=!0},k=(aA,I)=>{if(h.value.find(F=>F.source===I&&F.target===aA))return!0;const J=h.value.filter(F=>F.target===aA);for(let F=0;F<J.length;F++)if(k(J[F].source,I))return!0;return!1},eA=aA=>R.value?(R.value=!1,!1):k(aA.source,aA.target)?!1:aA.source!==aA.target&&aA.sourceHandle!==aA.targetHandle&&aA.sourceHandle.indexOf("s")!==-1&&aA.targetHandle.indexOf("t")!==-1,Y=()=>{AA(),Object.keys(Q.value).forEach(aA=>{Q.value[aA]=!1})},sA=()=>{Y()};t(()=>{console.log("onNodeClick"),H.value?H.value=!1:Y()}),n(()=>{Y()}),o(()=>{Y()}),a(()=>{Y()}),u(()=>{Y()});const lA=(0,r.ref)(),nA=(0,r.ref)({top:0,left:0,bottom:0,right:0}),tA=(0,r.ref)({getBoundingClientRect:()=>nA.value}),AA=()=>{lA.value?.handleClose()},T=aA=>{const{clientX:I,clientY:J}=aA;nA.value=DOMRect.fromRect({x:I,y:J}),aA.preventDefault(),lA.value?.handleOpen()};return(aA,I)=>{const J=(0,r.resolveComponent)("j-icon"),F=(0,r.resolveComponent)("el-popover"),S=(0,r.resolveComponent)("el-tooltip"),V=(0,r.resolveComponent)("el-dropdown-item"),O=(0,r.resolveComponent)("el-dropdown-menu"),z=(0,r.resolveComponent)("el-dropdown");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"d-flow-step",onContextmenu:(0,r.withModifiers)(T,["stop"])},[(0,r.createElementVNode)("div",{class:"d-flow-step-icon",style:(0,r.normalizeStyle)({backgroundColor:m.value.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(J,{icon:m.value.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",fm,(0,r.toDisplayString)(m.value.name),1),e.data.type!=="start"?((0,r.openBlock)(),(0,r.createBlock)(S,{key:0,placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,r.withCtx)(()=>[L.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",gm,[...I[4]||(I[4]=[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击",-1),(0,r.createTextVNode)("添加节点 ",-1)])])):(0,r.createCommentVNode)("",!0),I[5]||(I[5]=(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,r.createTextVNode)("连接节点 ")],-1))]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(An),{onClick:I[1]||(I[1]=q=>N("t1")),onMousedown:U,id:"t1",class:(0,r.normalizeClass)(["d-flow-step-target-handle",{"d-flow-step-target-handle-notadd":!L.value}]),type:"target",position:(0,r.unref)(IA).Left,"is-valid-connection":eA},{default:(0,r.withCtx)(()=>[L.value?((0,r.openBlock)(),(0,r.createBlock)(F,{key:0,visible:Q.value.t1,"onUpdate:visible":I[0]||(I[0]=q=>Q.value.t1=q),placement:"left","popper-class":"d-flow-step-popper",trigger:"click","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,r.withCtx)(()=>[(0,r.createVNode)(J,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(pi,{"handle-id":"t1","from-node-id":e.id,onAddNode:sA},null,8,["from-node-id"])]),_:1},8,["visible"])):(0,r.createCommentVNode)("",!0)]),_:1},8,["class","position"])]),_:1})):(0,r.createCommentVNode)("",!0),(0,r.createVNode)(S,{placement:"top","show-arrow":!1,"popper-class":"d-flow-step-tooltip"},{content:(0,r.withCtx)(()=>[...I[6]||(I[6]=[(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"点击"),(0,r.createTextVNode)("添加节点 ")],-1),(0,r.createElementVNode)("div",{style:{color:"var(--j-color-text-2)"}},[(0,r.createElementVNode)("span",{style:{color:"var(--j-color-text)","font-weight":"bold"}},"拖拽"),(0,r.createTextVNode)("连接节点 ")],-1)])]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(An),{onClick:I[3]||(I[3]=q=>N("s1")),onMousedown:U,id:"s1",class:"d-flow-step-source-handle",type:"source",position:(0,r.unref)(IA).Right,"is-valid-connection":eA},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(F,{visible:Q.value.s1,"onUpdate:visible":I[2]||(I[2]=q=>Q.value.s1=q),placement:"right",trigger:"click","popper-class":"d-flow-step-popper","show-arrow":!1,"popper-options":{strategy:"fixed"}},{reference:(0,r.withCtx)(()=>[(0,r.createVNode)(J,{class:"d-flow-step-handle-plus",icon:"mdi:plus-circle"})]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(pi,{"handle-id":"s1","from-node-id":e.id,onAddNode:sA},null,8,["from-node-id"])]),_:1},8,["visible"])]),_:1},8,["position"])]),_:1}),(0,r.createVNode)(z,{ref_key:"dropdownRef",ref:lA,"popper-class":"d-flow-step-dropdown","virtual-ref":tA.value,"show-arrow":!1,"popper-options":{modifiers:[{name:"offset",options:{offset:[0,0]}}]},"virtual-triggering":"",trigger:"contextmenu",placement:"bottom-start"},{dropdown:(0,r.withCtx)(()=>[(0,r.createVNode)(O,null,{default:(0,r.withCtx)(()=>[e.data.type!="start"?((0,r.openBlock)(),(0,r.createBlock)(V,{key:0,onClick:v},{default:(0,r.withCtx)(()=>[...I[7]||(I[7]=[(0,r.createTextVNode)("删除",-1)])]),_:1})):(0,r.createCommentVNode)("",!0),m.value.des?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:1,style:(0,r.normalizeStyle)({width:"160px",padding:"4px 16px 0 16px","font-size":"12px","border-top":e.data.type!="start"?"1px solid var(--j-color-border)":void 0,"margin-top":e.data.type!="start"?"4px":void 0})},[I[8]||(I[8]=(0,r.createElementVNode)("div",{style:{"margin-bottom":"4px",color:"var(--j-color-text-2)"}},"关于",-1)),(0,r.createElementVNode)("div",hm,(0,r.toDisplayString)(m.value.des),1)],4)):(0,r.createCommentVNode)("",!0)]),_:1})]),_:1},8,["virtual-ref"])],32)}}}),pm=Bm,mm=(0,r.defineComponent)({name:"DEdgeWithButton",__name:"edgeWithButton",props:{id:{},sourceX:{},sourceY:{},targetX:{},targetY:{},sourcePosition:{},targetPosition:{},markerEnd:{},style:{}},setup(e){const A=e,{onEdgeMouseEnter:t,onEdgeMouseLeave:n,onNodeClick:o,onEdgeClick:a,onMoveStart:u,onConnectStart:d,onNodeDragStart:h}=YA(),g=(0,r.computed)(()=>gi(A)),B=(0,r.ref)(!1),w=(0,r.ref)(!1);t(({edge:N})=>{N.id===A.id&&(B.value=!0)}),n(()=>{B.value=!1});const m=(0,r.ref)(!1),v=()=>{m.value=!1,(0,r.nextTick)(()=>{w.value=!1})},Q=()=>{w.value=!0,m.value=!0},H=()=>{v()};return o(()=>{v()}),a(()=>{v()}),u(()=>{v()}),d(()=>{v()}),h(()=>{v()}),(N,L)=>{const R=(0,r.resolveComponent)("j-icon"),U=(0,r.resolveComponent)("el-popover");return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createVNode)((0,r.unref)(kn),{id:e.id,style:(0,r.normalizeStyle)(e.style),path:g.value[0],"marker-end":e.markerEnd},null,8,["id","style","path","marker-end"]),(0,r.createVNode)((0,r.unref)(Qp),null,{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({pointerEvents:"all",position:"absolute",transform:`translate(-50%, -50%) translate(${g.value[1]}px,${g.value[2]}px)`}),class:"nodrag nopan"},[(0,r.createVNode)(U,{visible:m.value,"show-arrow":!1,placement:"right","popper-class":"d-flow-step-popper"},{reference:(0,r.withCtx)(()=>[(0,r.withDirectives)((0,r.createElementVNode)("div",{onClick:(0,r.withModifiers)(Q,["stop"]),class:"d-flow-edge-button"},[(0,r.createVNode)(R,{icon:"mdi:plus-circle"})],512),[[r.vShow,B.value||w.value]])]),default:(0,r.withCtx)(()=>[(0,r.createVNode)(pi,{"handle-id":"line","from-node-id":e.id,onAddNode:H},null,8,["from-node-id"])]),_:1},8,["visible"])],4)]),_:1})],64)}}}),wm=mm,Cm=(0,r.defineComponent)({name:"DFlow",__name:"flow",props:{nodes:{default:()=>[]},edges:{default:()=>[]}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Ip),{"min-zoom":.2,"max-zoom":4,"default-viewport":{zoom:1},"connection-mode":(0,r.unref)(At).Strict,nodes:e.nodes,edges:e.edges},{"edge-button":(0,r.withCtx)(n=>[(0,r.createVNode)(wm,{id:n.id,"source-x":n.sourceX,"source-y":n.sourceY,"target-x":n.targetX,"target-y":n.targetY,"source-position":n.sourcePosition,"target-position":n.targetPosition,"marker-end":n.markerEnd,style:(0,r.normalizeStyle)(n.style)},null,8,["id","source-x","source-y","target-x","target-y","source-position","target-position","marker-end","style"])]),"node-step":(0,r.withCtx)(n=>[(0,r.createVNode)(pm,(0,r.normalizeProps)((0,r.guardReactiveProps)(n)),null,16)]),default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(lm),{position:"bottom-left"}),(0,r.createVNode)((0,r.unref)(Mp))]),_:1},8,["connection-mode","nodes","edges"]))}}),vm=Cm,ym={class:"d-flow-design"},Qm={class:"d-flow-design-canvas"},Em={class:"d-flow-design-right"},Um={class:"d-flow-design-title"},Fm={class:"d-flow-design-title-name"},bm={class:"d-flow-design-panel"},Hm=(0,r.defineComponent)({name:"DFlowDesign",__name:"flowDesign",props:{components:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["nodeClick","edgeClick","paneClick","connect"],setup(e,{expose:A,emit:t}){const n=e,o=t,{addNodes:a,addEdges:u,removeEdges:d,addSelectedNodes:h,removeSelectedNodes:g,onConnect:B,onNodeClick:w,onPaneClick:m,onEdgeClick:v,getNodes:Q,getEdges:H}=YA(),N=(0,r.computed)(()=>{const O={};return n.components.forEach(z=>{O[z.type]=z}),O.start={name:"开始",type:"start",icon:"ant-design:play-circle-outlined",des:"执行开始节点"},O}),L={id:"start",type:"step",data:{type:"start",isInit:!1},position:{x:80,y:160}},R=(0,r.ref)([L]),U=(0,r.ref)([]),k=(O,z)=>{if(z.indexOf("t")===-1){const q=H.value.filter(rA=>rA.source===O.id);if(q.length>0){let rA=-1e6,uA=0;return q.forEach(FA=>{rA=Math.max(rA,FA.targetNode.position.y+FA.targetNode.dimensions.height+32),uA=FA.targetNode.position.x||0}),{x:uA,y:rA}}return{x:O.position.x+O.dimensions.width+100,y:O.position.y}}return{x:O.position.x-100-O.dimensions.width,y:O.position.y}},eA=(O,z,q)=>{const rA=Q.value.find(FA=>FA.id===z);if(!rA)return;const uA={id:dt(),type:"step",data:{type:O},position:k(rA,q)};if(n.flowInit){const FA=n.flowInit(uA.data.type);FA&&Object.keys(FA).forEach(P=>{uA.data[P]=FA[P]})}a(uA),q.indexOf("t")===-1?u({id:`${z}-${uA.id}`,source:z,target:uA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}):u({id:`${z}-${uA.id}`,source:uA.id,target:z,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}),T(uA.id)},Y=O=>{const z=Q.value.find(q=>q.id===O);z&&(z.position.x+=100+z.dimensions.width,H.value.filter(q=>q.source===O).forEach(q=>{Y(q.target)}))},sA=(O,z)=>{const q=H.value.find(uA=>uA.id===z);if(!q)return;const rA={id:dt(),type:"step",data:{type:O},position:{x:q.targetNode.position.x,y:q.targetNode.position.y}};if(n.flowInit){const uA=n.flowInit(rA.data.type);uA&&Object.keys(uA).forEach(FA=>{rA.data[FA]=uA[FA]})}a(rA),u({id:`${q.sourceNode.id}-${rA.id}`,source:q.sourceNode.id,target:rA.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}),u({id:`${rA.id}-${q.targetNode.id}`,source:rA.id,target:q.targetNode.id,sourceHandle:"s1",targetHandle:"t1",type:"button",markerEnd:et.Arrow}),d(z),Y(q.target),T(rA.id)};B(O=>{console.log("onConnect",O),O.type="button",O.markerEnd=et.Arrow,u(O),o("connect",O)});const lA=()=>n.components||[],nA=(0,r.ref)(),tA=(0,r.computed)(()=>nA.value?N.value[nA.value.data.type]:void 0);w(O=>{nA.value?.id!==O.node.id&&(nA.value=O.node,J()),o("nodeClick",O.node)}),m(()=>{nA.value=void 0,o("paneClick")}),v(O=>{nA.value=void 0,o("edgeClick",O.edge)});const AA=O=>{nA.value?.id===O&&(nA.value=void 0)},T=O=>{nA.value&&g([nA.value]),nA.value=Q.value.find(z=>z.id===O),nA.value&&(J(),setTimeout(()=>{nA.value&&h([nA.value])},100))},aA=(0,r.ref)(),I={};Object.keys(n.flowComponentConfigs).forEach(O=>{const z={type:"j-collapse",config:{defaultValue:[]},children:[]};n.flowComponentConfigs[O].forEach((q,rA)=>{const uA=`_collapse${rA}`;z.config?.defaultValue.push(uA),z.children?.push(q)}),I[O]=[z]});const J=()=>{const O=I[nA.value?.data.type||""];O&&aA.value?(aA.value.init&&aA.value.init(O,nA.value?.data),n.flowComponentConfigInit&&n.flowComponentConfigInit({configRef:aA,inputParams:n.inputParams,components:Q.value,configData:nA.value?.data})):aA.value&&aA.value.init&&aA.value.init([])},F=(O,z)=>{nA.value&&n.flowComponentConfigChange&&n.flowComponentConfigChange(nA.value.data.type,{configRef:aA,component:O,configData:nA.value.data,...z,isFlowNode:!0})};return(0,r.provide)("d_flow_design_provide",{getFlowComponents:lA,addNode:eA,addNodeByLine:sA,onRemoveNode:AA,getFlowComponentMap:N}),A({getData:()=>{const O=[];return Q.value.forEach(z=>{O.push({config:z.data,id:z.id,position:z.position,type:z.type})}),H.value.forEach(z=>{O.push({id:z.id,source:z.source,target:z.target,sourceHandle:z.sourceHandle,targetHandle:z.targetHandle,type:"line",config:{},position:{x:0,y:0}})}),O},setData:O=>{if(!O||O.length===0)L.data.isInit=!0,R.value=[L],T(L.id);else{L.data.isInit=!1;const z=[],q=[];O.forEach(rA=>{if(rA.type==="line")rA.type="button",rA.markerEnd=et.Arrow,q.push(rA);else{const uA={id:rA.id,type:rA.type,data:rA.config,position:rA.position};z.push(uA)}}),R.value=z,U.value=q}}}),(O,z)=>{const q=(0,r.resolveComponent)("j-icon"),rA=(0,r.resolveComponent)("j-form");return(0,r.openBlock)(),(0,r.createElementBlock)("div",ym,[(0,r.createElementVNode)("div",Qm,[(0,r.createVNode)(vm,{nodes:R.value,edges:U.value},null,8,["nodes","edges"])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Em,[(0,r.createElementVNode)("div",Um,[(0,r.createElementVNode)("div",{class:"d-flow-design-title-icon",style:(0,r.normalizeStyle)({backgroundColor:tA.value?.iconColor||"var(--j-color-primary)"})},[(0,r.createVNode)(q,{icon:tA.value?.icon||"mdi:source-branch"},null,8,["icon"])],4),(0,r.createElementVNode)("div",Fm,(0,r.toDisplayString)(tA.value?.name||""),1)]),(0,r.createElementVNode)("div",bm,[(0,r.createVNode)(rA,{config:{labelPosition:"top"},style:{padding:"0"},ref_key:"configRef",ref:aA,onChange:F},null,512)])],512),[[r.vShow,nA.value&&I[nA.value.data.type]]])])}}}),Im=Hm,nl=ut(Im),_m={class:"d-input-flow j-block"},Sm=(0,r.defineComponent)({name:"DInputFlow",__name:"inputFlow",props:{modelValue:{},type:{},btnText:{default:"事件"},title:{},size:{default:"default"},width:{default:1200},height:{default:800},beforeClose:{},flowComponents:{default:()=>[]},inputParams:{default:()=>({})},flowInit:{},flowComponentConfigInit:{},flowComponentConfigs:{default:()=>({})},flowComponentConfigChange:{}},emits:["update:modelValue","change"],setup(e,{emit:A}){const t=e,n=A,o=(0,r.ref)(),a=(0,r.computed)({get(){return t.modelValue},set(w){n("update:modelValue",w)}}),u=(0,r.computed)(()=>(t.modelValue?.trim(),t.btnText)),d=w=>{const m=typeof w=="string"?w:void 0;try{o.value?.setData(JSON.parse(m||"[]"))}catch{o.value?.setData([])}},h=async()=>{const w=o.value?.getData();return w?JSON.stringify(w):void 0},g=w=>{if(t.beforeClose){const m=typeof w=="string"?w:void 0;return t.beforeClose(m)}return!0},B=w=>{const m=w.value;n("change",{value:typeof m=="string"?m:void 0})};return(w,m)=>{const v=(0,r.resolveComponent)("d-flow-design"),Q=(0,r.resolveComponent)("j-input-button");return(0,r.openBlock)(),(0,r.createBlock)(Q,(0,r.mergeProps)(w.$attrs,{type:e.type,"btn-text":u.value,title:e.title,size:e.size,width:e.width,height:e.height,"before-close":g,ok:h,open:d,"destroy-on-close":"",modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=H=>a.value=H),onChange:B}),{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",_m,[(0,r.createVNode)(v,{ref_key:"flowRef",ref:o,components:e.flowComponents,"flow-init":e.flowInit,"flow-component-config-init":e.flowComponentConfigInit,"flow-component-configs":e.flowComponentConfigs,"flow-component-config-change":e.flowComponentConfigChange,"input-params":e.inputParams},null,8,["components","flow-init","flow-component-config-init","flow-component-configs","flow-component-config-change","input-params"])])]),_:1},16,["type","btn-text","title","size","width","height","modelValue"])}}}),xm=Sm,rl=ut(xm),j=class De{static getElements(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(n&&!isNaN(+A[0])){const a=n.getElementById(A);return a?[a]:[]}let o=t.querySelectorAll(A);if(!o.length&&A[0]!=="."&&A[0]!=="#"&&(o=t.querySelectorAll("."+A),o.length||(o=t.querySelectorAll("#"+A)),!o.length)){const a=t.querySelector(`[gs-id="${A}"]`);return a?[a]:[]}return Array.from(o)}return[A]}static getElement(A,t=document){if(typeof A=="string"){const n="getElementById"in t?t:void 0;if(!A.length)return null;if(n&&A[0]==="#")return n.getElementById(A.substring(1));if(A[0]==="#"||A[0]==="."||A[0]==="[")return t.querySelector(A);if(n&&!isNaN(+A[0]))return n.getElementById(A);let o=t.querySelector(A);return n&&!o&&(o=n.getElementById(A)),o||(o=t.querySelector("."+A)),o}return A}static lazyLoad(A){return A.lazyLoad||A.grid?.opts?.lazyLoad&&A.lazyLoad!==!1}static createDiv(A,t){const n=document.createElement("div");return A.forEach(o=>{o&&n.classList.add(o)}),t?.appendChild(n),n}static shouldSizeToContent(A,t=!1){return A?.grid&&(t?A.sizeToContent===!0||A.grid.opts.sizeToContent===!0&&A.sizeToContent===void 0:!!A.sizeToContent||A.grid.opts.sizeToContent&&A.sizeToContent!==!1)}static isIntercepted(A,t){return!(A.y>=t.y+t.h||A.y+A.h<=t.y||A.x+A.w<=t.x||A.x>=t.x+t.w)}static isTouching(A,t){return De.isIntercepted(A,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(A,t){const n=A.x>t.x?A.x:t.x,o=A.x+A.w<t.x+t.w?A.x+A.w:t.x+t.w;if(o<=n)return 0;const a=A.y>t.y?A.y:t.y,u=A.y+A.h<t.y+t.h?A.y+A.h:t.y+t.h;return u<=a?0:(o-n)*(u-a)}static area(A){return A.w*A.h}static sort(A,t=1){return A.sort((o,a)=>{const u=t*((o.y??1e4)-(a.y??1e4));return u===0?t*((o.x??1e4)-(a.x??1e4)):u})}static find(A,t){return t?A.find(n=>n.id===t):void 0}static toBool(A){return typeof A=="boolean"?A:typeof A=="string"?(A=A.toLowerCase(),!(A===""||A==="no"||A==="false"||A==="0")):!!A}static toNumber(A){return A===null||A.length===0?void 0:Number(A)}static parseHeight(A){let t,n="px";if(typeof A=="string")if(A==="auto"||A==="")t=0;else{const o=A.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!o)throw new Error(`Invalid height val = ${A}`);n=o[2]||"px",t=parseFloat(o[1])}else t=A;return{h:t,unit:n}}static defaults(A,...t){return t.forEach(n=>{for(const o in n){if(!n.hasOwnProperty(o))return;A[o]===null||A[o]===void 0?A[o]=n[o]:typeof n[o]=="object"&&typeof A[o]=="object"&&De.defaults(A[o],n[o])}}),A}static same(A,t){if(typeof A!="object")return A==t;if(typeof A!=typeof t||Object.keys(A).length!==Object.keys(t).length)return!1;for(const n in A)if(A[n]!==t[n])return!1;return!0}static copyPos(A,t,n=!1){return t.x!==void 0&&(A.x=t.x),t.y!==void 0&&(A.y=t.y),t.w!==void 0&&(A.w=t.w),t.h!==void 0&&(A.h=t.h),n&&(t.minW&&(A.minW=t.minW),t.minH&&(A.minH=t.minH),t.maxW&&(A.maxW=t.maxW),t.maxH&&(A.maxH=t.maxH)),A}static samePos(A,t){return A&&t&&A.x===t.x&&A.y===t.y&&(A.w||1)===(t.w||1)&&(A.h||1)===(t.h||1)}static sanitizeMinMax(A){A.minW||delete A.minW,A.minH||delete A.minH,A.maxW||delete A.maxW,A.maxH||delete A.maxH}static removeInternalAndSame(A,t){if(!(typeof A!="object"||typeof t!="object")&&!(Array.isArray(A)||Array.isArray(t)))for(let n in A){const o=A[n],a=t[n];n[0]==="_"||o===a?delete A[n]:o&&typeof o=="object"&&a!==void 0&&(De.removeInternalAndSame(o,a),Object.keys(o).length||delete A[n])}}static removeInternalForSave(A,t=!0){for(let n in A)(n[0]==="_"||A[n]===null||A[n]===void 0)&&delete A[n];delete A.grid,t&&delete A.el,A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,A.locked||delete A.locked,(A.w===1||A.w===A.minW)&&delete A.w,(A.h===1||A.h===A.minH)&&delete A.h}static throttle(A,t){let n=!1;return(...o)=>{n||(n=!0,setTimeout(()=>{A(...o),n=!1},t))}}static removePositioningStyles(A){const t=A.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(A){if(!A)return document.scrollingElement||document.documentElement;const t=getComputedStyle(A);return/(auto|scroll)/.test(t.overflow+t.overflowY)?A:De.getScrollElement(A.parentElement)}static updateScrollPosition(A,t,n){const o=De.getScrollElement(A);if(!o)return;const a=A.getBoundingClientRect(),u=o.getBoundingClientRect(),d=window.innerHeight||document.documentElement.clientHeight,h=a.bottom-Math.min(u.bottom,d),g=a.top-Math.max(u.top,0),B=o.scrollTop;g<0&&n<0?A.offsetHeight>u.height?o.scrollTop+=n:o.scrollTop+=Math.abs(g)>Math.abs(n)?n:g:h>0&&n>0&&(A.offsetHeight>u.height?o.scrollTop+=n:o.scrollTop+=h>n?n:h),t.top+=o.scrollTop-B}static updateScrollResize(A,t,n){const o=De.getScrollElement(t),a=o.clientHeight,u=o===De.getScrollElement()?0:o.getBoundingClientRect().top,d=A.clientY-u,h=d<n,g=d>a-n;h?o.scrollBy({behavior:"smooth",top:d-n}):g&&o.scrollBy({behavior:"smooth",top:n-(a-d)})}static clone(A){return A==null||typeof A!="object"?A:A instanceof Array?[...A]:{...A}}static cloneDeep(A){const t=["parentGrid","el","grid","subGrid","engine"],n=De.clone(A);for(const o in n)n.hasOwnProperty(o)&&typeof n[o]=="object"&&o.substring(0,2)!=="__"&&!t.find(a=>a===o)&&(n[o]=De.cloneDeep(A[o]));return n}static cloneNode(A){const t=A.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(A,t){let n;typeof t=="string"?n=De.getElement(t):n=t,n&&n.appendChild(A)}static addElStyles(A,t){if(t instanceof Object)for(const n in t)t.hasOwnProperty(n)&&(Array.isArray(t[n])?t[n].forEach(o=>{A.style[n]=o}):A.style[n]=t[n])}static initEvent(A,t){const n={type:t.type},o={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:A.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(a=>n[a]=A[a]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(a=>n[a]=A[a]),{...n,...o}}static simulateMouseEvent(A,t,n){const o=A,a=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:A.screenX,screenY:A.screenY,clientX:A.clientX,clientY:A.clientY,ctrlKey:o.ctrlKey??!1,altKey:o.altKey??!1,shiftKey:o.shiftKey??!1,metaKey:o.metaKey??!1,button:0,relatedTarget:A.target});(n||A.target).dispatchEvent(a)}static getValuesFromTransformedElement(A){const t=document.createElement("div");De.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),A.appendChild(t);const n=t.getBoundingClientRect();return A.removeChild(t),t.remove(),{xScale:1/n.width,yScale:1/n.height,xOffset:n.left,yOffset:n.top}}static swap(A,t,n){if(!A)return;const o=A[t];A[t]=A[n],A[n]=o}static canBeRotated(A){return!(!A||A.w===A.h||A.locked||A.noResize||A.grid?.opts.disableResize||A.minW&&A.minW===A.maxW||A.minH&&A.minH===A.maxH)}},mi=class Bn{constructor(A={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=A.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=A.maxRow,this._float=A.float,this.nodes=A.nodes||[],this.onChange=A.onChange}batchUpdate(A=!0,t=!0){return!!this.batchMode===A?this:(this.batchMode=A,A?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,t&&this._packNodes(),this._notify()),this)}_useEntireRowArea(A,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!A._moving||A._skipDown||t.y<=A.y)}_fixCollisions(A,t=A,n,o={}){if(this.sortNodes(-1),n=n||this.collide(A,t),!n)return!1;if(A._moving&&!o.nested&&!this.float&&this.swap(A,n))return!0;let a=t;!this._loading&&this._useEntireRowArea(A,t)&&(a={x:0,w:this.column,y:t.y,h:t.h},n=this.collide(A,a,o.skip));let u=!1;const d={nested:!0,pack:!1};let h=0;for(;n=n||this.collide(A,a,o.skip);){if(h++>this.nodes.length*2)throw new Error("Infinite collide check");let g;if(n.locked||this._loading||A._moving&&!A._skipDown&&t.y>A.y&&!this.float&&(!this.collide(n,{...n,y:A.y},A)||!this.collide(n,{...n,y:t.y-n.h},A))){A._skipDown=A._skipDown||t.y>A.y;const B={...t,y:n.y+n.h,...d};g=this._loading&&j.samePos(A,B)?!0:this.moveNode(A,B),(n.locked||this._loading)&&g?j.copyPos(t,A):!n.locked&&g&&o.pack&&(this._packNodes(),t.y=n.y+n.h,j.copyPos(A,t)),u=u||g}else g=this.moveNode(n,{...n,y:t.y+t.h,skip:A,...d});if(!g)return u;n=void 0}return u}collide(A,t=A,n){const o=A._id,a=n?._id;return this.nodes.find(u=>u._id!==o&&u._id!==a&&j.isIntercepted(u,t))}collideAll(A,t=A,n){const o=A._id,a=n?._id;return this.nodes.filter(u=>u._id!==o&&u._id!==a&&j.isIntercepted(u,t))}directionCollideCoverage(A,t,n){if(!t.rect||!A._rect)return;const o=A._rect,a={...t.rect};a.y>o.y?(a.h+=a.y-o.y,a.y=o.y):a.h+=o.y-a.y,a.x>o.x?(a.w+=a.x-o.x,a.x=o.x):a.w+=o.x-a.x;let u,d=.5;for(let h of n){if(h.locked||!h._rect)break;const g=h._rect;let B=Number.MAX_VALUE,w=Number.MAX_VALUE;o.y<g.y?B=(a.y+a.h-g.y)/g.h:o.y+o.h>g.y+g.h&&(B=(g.y+g.h-a.y)/g.h),o.x<g.x?w=(a.x+a.w-g.x)/g.w:o.x+o.w>g.x+g.w&&(w=(g.x+g.w-a.x)/g.w);const m=Math.min(w,B);m>d&&(d=m,u=h)}return t.collide=u,u}cacheRects(A,t,n,o,a,u){return this.nodes.forEach(d=>d._rect={y:d.y*t+n,x:d.x*A+u,w:d.w*A-u-o,h:d.h*t-n-a}),this}swap(A,t){if(!t||t.locked||!A||A.locked)return!1;function n(){const a=t.x,u=t.y;return t.x=A.x,t.y=A.y,A.h!=t.h?(A.x=a,A.y=t.y+t.h):A.w!=t.w?(A.x=t.x+t.w,A.y=u):(A.x=a,A.y=u),A._dirty=t._dirty=!0,!0}let o;if(A.w===t.w&&A.h===t.h&&(A.x===t.x||A.y===t.y)&&(o=j.isTouching(A,t)))return n();if(o!==!1){if(A.w===t.w&&A.x===t.x&&(o||(o=j.isTouching(A,t)))){if(t.y<A.y){const a=A;A=t,t=a}return n()}if(o!==!1){if(A.h===t.h&&A.y===t.y&&(o||(o=j.isTouching(A,t)))){if(t.x<A.x){const a=A;A=t,t=a}return n()}return!1}}}isAreaEmpty(A,t,n,o){const a={x:A||0,y:t||0,w:n||1,h:o||1};return!this.collide(a)}compact(A="compact",t=!0){if(this.nodes.length===0)return this;t&&this.sortNodes();const n=this.batchMode;n||this.batchUpdate();const o=this._inColumnResize;o||(this._inColumnResize=!0);const a=this.nodes;return this.nodes=[],a.forEach((u,d,h)=>{let g;u.locked||(u.autoPosition=!0,A==="list"&&d&&(g=h[d-1])),this.addNode(u,!1,g)}),o||delete this._inColumnResize,n||this.batchUpdate(!1),this}set float(A){this._float!==A&&(this._float=A||!1,A||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(A=1){return this.nodes=j.sort(this.nodes,A),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(A=>{if(A._updating||A._orig===void 0||A.y===A._orig.y)return;let t=A.y;for(;t>A._orig.y;)--t,this.collide(A,{x:A.x,y:t,w:A.w,h:A.h})||(A._dirty=!0,A.y=t)}):this.nodes.forEach((A,t)=>{if(!A.locked)for(;A.y>0;){const n=t===0?0:A.y-1;if(!(t===0||!this.collide(A,{x:A.x,y:n,w:A.w,h:A.h})))break;A._dirty=A.y!==n,A.y=n}}),this)}prepareNode(A,t){A._id=A._id??Bn._idSeq++;const n=A.id;if(n){let a=1;for(;this.nodes.find(u=>u.id===A.id&&u!==A);)A.id=n+"_"+a++}(A.x===void 0||A.y===void 0||A.x===null||A.y===null)&&(A.autoPosition=!0);const o={x:0,y:0,w:1,h:1};return j.defaults(A,o),A.autoPosition||delete A.autoPosition,A.noResize||delete A.noResize,A.noMove||delete A.noMove,j.sanitizeMinMax(A),typeof A.x=="string"&&(A.x=Number(A.x)),typeof A.y=="string"&&(A.y=Number(A.y)),typeof A.w=="string"&&(A.w=Number(A.w)),typeof A.h=="string"&&(A.h=Number(A.h)),isNaN(A.x)&&(A.x=o.x,A.autoPosition=!0),isNaN(A.y)&&(A.y=o.y,A.autoPosition=!0),isNaN(A.w)&&(A.w=o.w),isNaN(A.h)&&(A.h=o.h),this.nodeBoundFix(A,t),A}nodeBoundFix(A,t){const n=A._orig||j.copyPos({},A);if(A.maxW&&(A.w=Math.min(A.w||1,A.maxW)),A.maxH&&(A.h=Math.min(A.h||1,A.maxH)),A.minW&&(A.w=Math.max(A.w||1,A.minW)),A.minH&&(A.h=Math.max(A.h||1,A.minH)),(A.x||0)+(A.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&A._id!=null&&this.findCacheLayout(A,this.defaultColumn)===-1){const o={...A};o.autoPosition||o.x===void 0?(delete o.x,delete o.y):o.x=Math.min(this.defaultColumn-1,o.x),o.w=Math.min(this.defaultColumn,o.w||1),this.cacheOneLayout(o,this.defaultColumn)}return A.w>this.column?A.w=this.column:A.w<1&&(A.w=1),this.maxRow&&A.h>this.maxRow?A.h=this.maxRow:A.h<1&&(A.h=1),A.x<0&&(A.x=0),A.y<0&&(A.y=0),A.x+A.w>this.column&&(t?A.w=this.column-A.x:A.x=this.column-A.w),this.maxRow&&A.y+A.h>this.maxRow&&(t?A.h=this.maxRow-A.y:A.y=this.maxRow-A.h),j.samePos(A,n)||(A._dirty=!0),this}getDirtyNodes(A){return A?this.nodes.filter(t=>t._dirty&&!j.samePos(t,t._orig)):this.nodes.filter(t=>t._dirty)}_notify(A){if(this.batchMode||!this.onChange)return this;const t=(A||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(A=>{delete A._dirty,delete A._lastTried}),this)}saveInitial(){return this.nodes.forEach(A=>{A._orig=j.copyPos({},A),delete A._dirty}),this._hasLocked=this.nodes.some(A=>A.locked),this}restoreInitial(){return this.nodes.forEach(A=>{!A._orig||j.samePos(A,A._orig)||(j.copyPos(A,A._orig),A._dirty=!0)}),this._notify(),this}findEmptyPosition(A,t=this.nodes,n=this.column,o){const a=o?o.y*n+(o.x+o.w):0;let u=!1;for(let d=a;!u;++d){const h=d%n,g=Math.floor(d/n);if(h+A.w>n)continue;const B={x:h,y:g,w:A.w,h:A.h};t.find(w=>j.isIntercepted(B,w))||((A.x!==h||A.y!==g)&&(A._dirty=!0),A.x=h,A.y=g,delete A.autoPosition,u=!0)}return u}addNode(A,t=!1,n){const o=this.nodes.find(u=>u._id===A._id);if(o)return o;this._inColumnResize?this.nodeBoundFix(A):this.prepareNode(A),delete A._temporaryRemoved,delete A._removeDOM;let a;return A.autoPosition&&this.findEmptyPosition(A,this.nodes,this.column,n)&&(delete A.autoPosition,a=!0),this.nodes.push(A),t&&this.addedNodes.push(A),a||this._fixCollisions(A),this.batchMode||this._packNodes()._notify(),A}removeNode(A,t=!0,n=!1){return this.nodes.find(o=>o._id===A._id)?(n&&this.removedNodes.push(A),t&&(A._removeDOM=!0),this.nodes=this.nodes.filter(o=>o._id!==A._id),A._isAboutToRemove||this._packNodes(),this._notify([A]),this):this}removeAll(A=!0,t=!0){if(delete this._layouts,!this.nodes.length)return this;A&&this.nodes.forEach(o=>o._removeDOM=!0);const n=this.nodes;return this.removedNodes=t?n:[],this.nodes=[],this._notify(n)}moveNodeCheck(A,t){if(!this.changedPosConstrain(A,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(A,t);let n;const o=new Bn({column:this.column,float:this.float,nodes:this.nodes.map(u=>u._id===A._id?(n={...u},n):{...u})});if(!n)return!1;const a=o.moveNode(n,t)&&o.getRow()<=Math.max(this.getRow(),this.maxRow);if(!a&&!t.resizing&&t.collide){const u=t.collide.el.gridstackNode;if(this.swap(A,u))return this._notify(),!0}return a?(o.nodes.filter(u=>u._dirty).forEach(u=>{const d=this.nodes.find(h=>h._id===u._id);d&&(j.copyPos(d,u),d._dirty=!0)}),this._notify(),!0):!1}willItFit(A){if(delete A._willFitPos,!this.maxRow)return!0;const t=new Bn({column:this.column,float:this.float,nodes:this.nodes.map(o=>({...o}))}),n={...A};return this.cleanupNode(n),delete n.el,delete n._id,delete n.content,delete n.grid,t.addNode(n),t.getRow()<=this.maxRow?(A._willFitPos=j.copyPos({},n),!0):!1}changedPosConstrain(A,t){return t.w=t.w||A.w,t.h=t.h||A.h,A.x!==t.x||A.y!==t.y?!0:(A.maxW&&(t.w=Math.min(t.w,A.maxW)),A.maxH&&(t.h=Math.min(t.h,A.maxH)),A.minW&&(t.w=Math.max(t.w,A.minW)),A.minH&&(t.h=Math.max(t.h,A.minH)),A.w!==t.w||A.h!==t.h)}moveNode(A,t){if(!A||!t)return!1;let n;t.pack===void 0&&!this.batchMode&&(n=t.pack=!0),typeof t.x!="number"&&(t.x=A.x),typeof t.y!="number"&&(t.y=A.y),typeof t.w!="number"&&(t.w=A.w),typeof t.h!="number"&&(t.h=A.h);const o=A.w!==t.w||A.h!==t.h,a=j.copyPos({},A,!0);if(j.copyPos(a,t),this.nodeBoundFix(a,o),j.copyPos(t,a),!t.forceCollide&&j.samePos(A,t))return!1;const u=j.copyPos({},A),d=this.collideAll(A,a,t.skip);let h=!0;if(d.length){const g=A._moving&&!t.nested;let B=g?this.directionCollideCoverage(A,t,d):d[0];if(g&&B&&A.grid?.opts?.subGridDynamic&&!A.grid._isTemp){const w=j.areaIntercept(t.rect,B._rect),m=j.area(t.rect),v=j.area(B._rect);w/(m<v?m:v)>.8&&(B.grid.makeSubGrid(B.el,void 0,A),B=void 0)}B?h=!this._fixCollisions(A,a,B,t):(h=!1,n&&delete t.pack)}return h&&!j.samePos(A,a)&&(A._dirty=!0,j.copyPos(A,a)),t.pack&&this._packNodes()._notify(),!j.samePos(A,u)}getRow(){return this.nodes.reduce((A,t)=>Math.max(A,t.y+t.h),0)}beginUpdate(A){return A._updating||(A._updating=!0,delete A._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){const A=this.nodes.find(t=>t._updating);return A&&(delete A._updating,delete A._skipDown),this}save(A=!0,t,n){const o=this._layouts?.length||0;let a;o&&(n?n!==this.column&&(a=this._layouts[n]):this.column!==o-1&&(a=this._layouts[o-1]));const u=[];return this.sortNodes(),this.nodes.forEach(d=>{const h=a?.find(B=>B._id===d._id),g={...d,...h||{}};j.removeInternalForSave(g,!A),t&&t(d,g),u.push(g)}),u}layoutsNodesChange(A){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((t,n)=>{if(!t||n===this.column)return this;if(n<this.column)this._layouts[n]=void 0;else{const o=n/this.column;A.forEach(a=>{if(!a._orig)return;const u=t.find(d=>d._id===a._id);u&&(u.y>=0&&a.y!==a._orig.y&&(u.y+=a.y-a._orig.y,u.y<0&&(u.y=0)),a.x!==a._orig.x&&(u.x=Math.round(a.x*o),u.x<0&&(u.x=0)),a.w!==a._orig.w&&(u.w=Math.round(a.w*o),u.w<1&&(u.w=1)))})}}),this)}columnChanged(A,t,n="moveScale"){if(!this.nodes.length||!t||A===t)return this;const o=n==="compact"||n==="list";o&&this.sortNodes(1),t<A&&this.cacheLayout(this.nodes,A),this.batchUpdate();let a=[],u=o?this.nodes:j.sort(this.nodes,-1);if(t>A&&this._layouts){const d=this._layouts[t]||[],h=this._layouts.length-1;!d.length&&A!==h&&this._layouts[h]?.length&&(A=h,this._layouts[h].forEach(g=>{const B=u.find(w=>w._id===g._id);B&&(!o&&!g.autoPosition&&(B.x=g.x??B.x,B.y=g.y??B.y),B.w=g.w??B.w,(g.x==null||g.y===void 0)&&(B.autoPosition=!0))})),d.forEach(g=>{const B=u.findIndex(w=>w._id===g._id);if(B!==-1){const w=u[B];if(o){w.w=g.w;return}(g.autoPosition||isNaN(g.x)||isNaN(g.y))&&this.findEmptyPosition(g,a),g.autoPosition||(w.x=g.x??w.x,w.y=g.y??w.y,w.w=g.w??w.w,a.push(w)),u.splice(B,1)}})}if(o)this.compact(n,!1);else{if(u.length)if(typeof n=="function")n(t,A,a,u);else{const d=o||n==="none"?1:t/A,h=n==="move"||n==="moveScale",g=n==="scale"||n==="moveScale";u.forEach(B=>{B.x=t===1?0:h?Math.round(B.x*d):Math.min(B.x,t-1),B.w=t===1||A===1?1:g?Math.round(B.w*d)||1:Math.min(B.w,t),a.push(B)}),u=[]}a=j.sort(a,-1),this._inColumnResize=!0,this.nodes=[],a.forEach(d=>{this.addNode(d,!1),delete d._orig})}return this.nodes.forEach(d=>delete d._orig),this.batchUpdate(!1,!o),delete this._inColumnResize,this}cacheLayout(A,t,n=!1){const o=[];return A.forEach((a,u)=>{a._id===void 0&&(a._id=(a.id?this.nodes.find(d=>d.id===a.id):void 0)?._id??Bn._idSeq++),o[u]={x:a.x,y:a.y,w:a.w,_id:a._id}}),this._layouts=n?[]:this._layouts||[],this._layouts[t]=o,this}cacheOneLayout(A,t){A._id=A._id??Bn._idSeq++;const n={x:A.x,y:A.y,w:A.w,_id:A._id};(A.autoPosition||A.x===void 0)&&(delete n.x,delete n.y,A.autoPosition&&(n.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];const o=this.findCacheLayout(A,t);return o===-1?this._layouts[t].push(n):this._layouts[t][o]=n,this}findCacheLayout(A,t){return this._layouts?.[t]?.findIndex(n=>n._id===A._id)??-1}removeNodeFromLayoutCache(A){if(this._layouts)for(let t=0;t<this._layouts.length;t++){const n=this.findCacheLayout(A,t);n!==-1&&this._layouts[t].splice(n,1)}}cleanupNode(A){for(const t in A)t[0]==="_"&&t!=="_id"&&delete A[t];return this}};mi._idSeq=0;var Fe={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"},NA=class{},ke=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),be=class{};function kr(e,A){e.touches.length>1||(e.cancelable&&e.preventDefault(),j.simulateMouseEvent(e.changedTouches[0],A))}function ol(e,A){e.cancelable&&e.preventDefault(),j.simulateMouseEvent(e,A)}function Mr(e){be.touchHandled||(be.touchHandled=!0,kr(e,"mousedown"))}function Kr(e){be.touchHandled&&kr(e,"mousemove")}function Or(e){if(!be.touchHandled)return;be.pointerLeaveTimeout&&(window.clearTimeout(be.pointerLeaveTimeout),delete be.pointerLeaveTimeout);const A=!!NA.dragElement;kr(e,"mouseup"),A||kr(e,"click"),be.touchHandled=!1}function Rr(e){e.pointerType!=="mouse"&&e.target.releasePointerCapture(e.pointerId)}function il(e){NA.dragElement&&e.pointerType!=="mouse"&&ol(e,"mouseenter")}function sl(e){NA.dragElement&&e.pointerType!=="mouse"&&(be.pointerLeaveTimeout=window.setTimeout(()=>{delete be.pointerLeaveTimeout,ol(e,"mouseleave")},10))}var al=class pu{constructor(A,t,n){this.host=A,this.dir=t,this.option=n,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(A){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",A)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${pu.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),ke&&(this.el.addEventListener("touchstart",Mr),this.el.addEventListener("pointerdown",Rr)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),ke&&(this.el.removeEventListener("touchstart",Mr),this.el.removeEventListener("pointerdown",Rr)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(A){this.mouseDownEvent=A,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ke&&(this.el.addEventListener("touchmove",Kr),this.el.addEventListener("touchend",Or)),A.stopPropagation(),A.preventDefault()}_mouseMove(A){const t=this.mouseDownEvent;this.moving?this._triggerEvent("move",A):Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",A),document.addEventListener("keydown",this._keyEvent)),A.stopPropagation()}_mouseUp(A){this.moving&&(this._triggerEvent("stop",A),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ke&&(this.el.removeEventListener("touchmove",Kr),this.el.removeEventListener("touchend",Or)),delete this.moving,delete this.mouseDownEvent,A.stopPropagation(),A.preventDefault()}_keyEvent(A){A.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(A,t){return this.option[A]&&this.option[A](t),this}};al.prefix="ui-resizable-";var wi=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,A){this._eventRegister[e]=A}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,A){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](A)}},ll=class ts extends wi{constructor(A,t={}){super(),this.el=A,this.option=t,this.rectScale={x:1,y:1},this._ui=()=>{const n=this.el.parentElement.getBoundingClientRect(),o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=this.temporalRect||o;return{position:{left:(a.left-n.left)*this.rectScale.x,top:(a.top-n.top)*this.rectScale.y},size:{width:a.width*this.rectScale.x,height:a.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(A){const t=A.handles&&A.handles!==this.option.handles,n=A.autoHide&&A.autoHide!==this.option.autoHide;return Object.keys(A).forEach(o=>this.option[o]=A[o]),t&&(this._removeHandlers(),this._setupHandlers()),n&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(A){return A?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),NA.overResizeElement===this&&delete NA.overResizeElement),this}_mouseOver(A){NA.overResizeElement||NA.dragElement||(NA.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(A){NA.overResizeElement===this&&(delete NA.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(A=>A.trim()).map(A=>new al(this.el,A,{element:this.option.element,start:t=>this._resizeStart(t),stop:t=>this._resizeStop(t),move:t=>this._resizing(t,A)})),this}_resizeStart(A){this.sizeToContent=j.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=j.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=A,this._setupHelper(),this._applyChange();const t=j.initEvent(A,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(A,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(A,t),this._applyChange();const n=j.initEvent(A,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(n,this._ui()),this.triggerEvent("resize",n),this}_resizeStop(A){const t=j.initEvent(A,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=ts._originStyleProp.map(n=>this.el.style[n]),this.parentOriginStylePosition=this.el.parentElement.style.position;const A=this.el.parentElement,t=j.getValuesFromTransformedElement(A);return this.rectScale={x:t.xScale,y:t.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return ts._originStyleProp.forEach((A,t)=>{this.el.style[A]=this.elOriginStyleVal[t]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(A,t){const n=this.startEvent,o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},a=A.clientX-n.clientX,u=this.sizeToContent?0:A.clientY-n.clientY;let d,h;t.indexOf("e")>-1?o.width+=a:t.indexOf("w")>-1&&(o.width-=a,o.left+=a,d=!0),t.indexOf("s")>-1?o.height+=u:t.indexOf("n")>-1&&(o.height-=u,o.top+=u,h=!0);const g=this._constrainSize(o.width,o.height,d,h);return Math.round(o.width)!==Math.round(g.width)&&(t.indexOf("w")>-1&&(o.left+=o.width-g.width),o.width=g.width),Math.round(o.height)!==Math.round(g.height)&&(t.indexOf("n")>-1&&(o.top+=o.height-g.height),o.height=g.height),o}_constrainSize(A,t,n,o){const a=this.option,u=(n?a.maxWidthMoveLeft:a.maxWidth)||Number.MAX_SAFE_INTEGER,d=a.minWidth/this.rectScale.x||A,h=(o?a.maxHeightMoveUp:a.maxHeight)||Number.MAX_SAFE_INTEGER,g=a.minHeight/this.rectScale.y||t;return{width:Math.min(u,Math.max(d,A)),height:Math.min(h,Math.max(g,t))}}_applyChange(){let A={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){const{left:t,top:n}=this.el.parentElement.getBoundingClientRect();A={left:t,top:n,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(t=>{const n=this.temporalRect[t],o=t==="width"||t==="left"?this.rectScale.x:t==="height"||t==="top"?this.rectScale.y:1;this.el.style[t]=(n-A[t])*o+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(A=>A.destroy()),delete this.handlers,this}};ll._originStyleProp=["width","height","position","left","top","opacity","zIndex"];var Dm='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',cl=class ns extends wi{constructor(A,t={}){super(),this.el=A,this.option=t,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};const n=t?.handle?.substring(1),o=A.gridstackNode;this.dragEls=!n||A.classList.contains(n)?[A]:o?.subGrid?[A.querySelector(t.handle)||A]:Array.from(A.querySelectorAll(t.handle)),this.dragEls.length===0&&(this.dragEls=[A]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(A,t){super.on(A,t)}off(A){super.off(A)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(A=>{A.addEventListener("mousedown",this._mouseDown),ke&&(A.addEventListener("touchstart",Mr),A.addEventListener("pointerdown",Rr))}),this.el.classList.remove("ui-draggable-disabled"))}disable(A=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(t=>{t.removeEventListener("mousedown",this._mouseDown),ke&&(t.removeEventListener("touchstart",Mr),t.removeEventListener("pointerdown",Rr))}),A||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(A){return Object.keys(A).forEach(t=>this.option[t]=A[t]),this}_mouseDown(A){if(be.touchHandled&&A.isTrusted&&(be.touchHandled=!1),!NA.mouseHandled)return A.button!==0||!this.dragEls.find(t=>t===A.target)&&A.target.closest(Dm)||this.option.cancel&&A.target.closest(this.option.cancel)||(this.mouseDownEvent=A,delete this.dragging,delete NA.dragElement,delete NA.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),ke&&(A.currentTarget.addEventListener("touchmove",Kr),A.currentTarget.addEventListener("touchend",Or)),A.preventDefault(),document.activeElement&&document.activeElement.blur(),NA.mouseHandled=!0),!0}_callDrag(A){if(!this.dragging)return;const t=j.initEvent(A,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(A){const t=this.mouseDownEvent;if(this.lastDrag=A,this.dragging)if(this._dragFollow(A),NA.pauseDrag){const n=Number.isInteger(NA.pauseDrag)?NA.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(A),n)}else this._callDrag(A);else if(Math.abs(A.x-t.x)+Math.abs(A.y-t.y)>3){this.dragging=!0,NA.dragElement=this;const n=this.el.gridstackNode?.grid;n?NA.dropElement=n.el.ddElement.ddDroppable:delete NA.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=j.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(A,this.el,this.helperContainment),this._setupHelperStyle(A);const o=j.initEvent(A,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(o,this.ui()),this.triggerEvent("dragstart",o),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(A){if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),ke&&A.currentTarget&&(A.currentTarget.removeEventListener("touchmove",Kr,!0),A.currentTarget.removeEventListener("touchend",Or,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),NA.dropElement?.el===this.el.parentElement&&delete NA.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();const t=j.initEvent(A,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(t),this.triggerEvent("dragstop",t),NA.dropElement&&NA.dropElement.drop(A)}delete this.helper,delete this.mouseDownEvent,delete NA.dragElement,delete NA.dropElement,delete NA.mouseHandled,A.preventDefault()}_keyEvent(A){const t=this.el.gridstackNode,n=t?.grid||NA.dropElement?.el?.gridstack;if(A.key==="Escape")t&&t._origRotate&&(t._orig=t._origRotate,delete t._origRotate),n?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(t&&n&&(A.key==="r"||A.key==="R")){if(!j.canBeRotated(t))return;t._origRotate=t._origRotate||{...t._orig},delete t._moving,n.setAnimation(!1).rotate(t.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),t._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,t.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",j.swap(t._orig,"w","h"),delete t._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let A=this.el;return typeof this.option.helper=="function"?A=this.option.helper(this.el):this.option.helper==="clone"&&(A=j.cloneNode(this.el)),A.parentElement||j.appendTo(A,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=ns.originStyleProp.map(t=>this.el.style[t]),A}_setupHelperStyle(A){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");const t=this.helper.style;return t.pointerEvents="none",t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(A),t.transition="none",setTimeout(()=>{this.helper&&(t.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){const A=this.helper,t=this.dragElementOriginStyle.transition||null;A.style.transition=this.dragElementOriginStyle.transition="none",ns.originStyleProp.forEach(n=>A.style[n]=this.dragElementOriginStyle[n]||null),setTimeout(()=>A.style.transition=t,50)}return delete this.dragElementOriginStyle,this}_dragFollow(A){const t={left:0,top:0},n=this.helper.style,o=this.dragOffset;n.left=(A.clientX+o.offsetLeft-t.left)*this.dragTransform.xScale+"px",n.top=(A.clientY+o.offsetTop-t.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(A,t,n){let o=0,a=0;n&&(o=this.dragTransform.xOffset,a=this.dragTransform.yOffset);const u=t.getBoundingClientRect();return{left:u.left,top:u.top,offsetLeft:-A.clientX+u.left-o,offsetTop:-A.clientY+u.top-a,width:u.width*this.dragTransform.xScale,height:u.height*this.dragTransform.yScale}}ui(){const A=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:(t.top-A.top)*this.dragTransform.yScale,left:(t.left-A.left)*this.dragTransform.xScale}}}};cl.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];var Nm=class extends wi{constructor(e,A={}){super(),this.el=e,this.option=A,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,A){super.on(e,A)}off(e){super.off(e)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),ke&&(this.el.addEventListener("pointerenter",il),this.el.addEventListener("pointerleave",sl)))}disable(e=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),ke&&(this.el.removeEventListener("pointerenter",il),this.el.removeEventListener("pointerleave",sl)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach(A=>this.option[A]=e[A]),this._setupAccept(),this}_mouseEnter(e){if(!NA.dragElement||be.touchHandled&&e.isTrusted||!this._canDrop(NA.dragElement.el))return;e.preventDefault(),e.stopPropagation(),NA.dropElement&&NA.dropElement!==this&&NA.dropElement._mouseLeave(e,!0),NA.dropElement=this;const A=j.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(A,this._ui(NA.dragElement)),this.triggerEvent("dropover",A),this.el.classList.add("ui-droppable-over")}_mouseLeave(e,A=!1){if(!NA.dragElement||NA.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const t=j.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(t,this._ui(NA.dragElement)),this.triggerEvent("dropout",t),NA.dropElement===this&&(delete NA.dropElement,!A)){let n,o=this.el.parentElement;for(;!n&&o;)n=o.ddElement?.ddDroppable,o=o.parentElement;n&&n._mouseEnter(e)}}drop(e){e.preventDefault();const A=j.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(A,this._ui(NA.dragElement)),this.triggerEvent("drop",A)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=e=>e.classList.contains(this.option.accept)||e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return{draggable:e.el,...e.ui()}}},Lm=class mu{static init(A){return A.ddElement||(A.ddElement=new mu(A)),A.ddElement}constructor(A){this.el=A}on(A,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.on(A,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.on(A,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.on(A,t),this}off(A){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(A)>-1?this.ddDraggable.off(A):this.ddDroppable&&["drop","dropover","dropout"].indexOf(A)>-1?this.ddDroppable.off(A):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(A)>-1&&this.ddResizable.off(A),this}setupDraggable(A){return this.ddDraggable?this.ddDraggable.updateOption(A):this.ddDraggable=new cl(this.el,A),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(A){return this.ddResizable?this.ddResizable.updateOption(A):this.ddResizable=new ll(this.el,A),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(A){return this.ddDroppable?this.ddDroppable.updateOption(A):this.ddDroppable=new Nm(this.el,A),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}},Tm=class{resizable(e,A,t,n){return this._getDDElements(e,A).forEach(o=>{if(A==="disable"||A==="enable")o.ddResizable&&o.ddResizable[A]();else if(A==="destroy")o.ddResizable&&o.cleanResizable();else if(A==="option")o.setupResizable({[t]:n});else{const a=o.el.gridstackNode.grid;let u=o.el.getAttribute("gs-resize-handles")||a.opts.resizable.handles||"e,s,se";u==="all"&&(u="n,e,s,w,se,sw,ne,nw");const d=!a.opts.alwaysShowResizeHandle;o.setupResizable({...a.opts.resizable,handles:u,autoHide:d,start:A.start,stop:A.stop,resize:A.resize})}}),this}draggable(e,A,t,n){return this._getDDElements(e,A).forEach(o=>{if(A==="disable"||A==="enable")o.ddDraggable&&o.ddDraggable[A]();else if(A==="destroy")o.ddDraggable&&o.cleanDraggable();else if(A==="option")o.setupDraggable({[t]:n});else{const a=o.el.gridstackNode.grid;o.setupDraggable({...a.opts.draggable,start:A.start,stop:A.stop,drag:A.drag})}}),this}dragIn(e,A){return this._getDDElements(e).forEach(t=>t.setupDraggable(A)),this}droppable(e,A,t,n){return typeof A.accept=="function"&&!A._accept&&(A._accept=A.accept,A.accept=o=>A._accept(o)),this._getDDElements(e,A).forEach(o=>{A==="disable"||A==="enable"?o.ddDroppable&&o.ddDroppable[A]():A==="destroy"?o.ddDroppable&&o.cleanDroppable():A==="option"?o.setupDroppable({[t]:n}):o.setupDroppable(A)}),this}isDroppable(e){return!!(e?.ddElement?.ddDroppable&&!e.ddElement.ddDroppable.disabled)}isDraggable(e){return!!(e?.ddElement?.ddDraggable&&!e.ddElement.ddDraggable.disabled)}isResizable(e){return!!(e?.ddElement?.ddResizable&&!e.ddElement.ddResizable.disabled)}on(e,A,t){return this._getDDElements(e).forEach(n=>n.on(A,o=>{t(o,NA.dragElement?NA.dragElement.el:o.target,NA.dragElement?NA.dragElement.helper:null)})),this}off(e,A){return this._getDDElements(e).forEach(t=>t.off(A)),this}_getDDElements(e,A){const t=e.gridstack||A!=="destroy"&&A!=="disable",n=j.getElements(e);return n.length?n.map(o=>o.ddElement||(t?Lm.init(o):null)).filter(o=>o):[]}},me=new Tm,en=class DA{static init(A={},t=".grid-stack"){if(typeof document>"u")return null;const n=DA.getGridElement(t);return n?(n.gridstack||(n.gridstack=new DA(n,j.cloneDeep(A))),n.gridstack):(console.error(typeof t=="string"?'GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
27
27
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(A={},t=".grid-stack"){const n=[];return typeof document>"u"||(DA.getGridElements(t).forEach(o=>{o.gridstack||(o.gridstack=new DA(o,j.cloneDeep(A))),n.push(o.gridstack)}),n.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+t+`" - element missing or wrong selector ?
28
- Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(A,t={}){if(!A)return null;let n=A;if(n.gridstack){const o=n.gridstack;return t&&(o.opts={...o.opts,...t}),t.children!==void 0&&o.load(t.children),o}return(!A.classList.contains("grid-stack")||DA.addRemoveCB)&&(DA.addRemoveCB?n=DA.addRemoveCB(A,t,!0,!0):n=j.createDiv(["grid-stack",t.class],A)),DA.init(t,n)}static registerEngine(A){DA.engineClass=A}get placeholder(){if(!this._placeholder){this._placeholder=j.createDiv([this.opts.placeholderClass,Fe.itemClass,this.opts.itemClass]);const A=j.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(A.textContent=this.opts.placeholderText)}return this._placeholder}constructor(A,t={}){this.el=A,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},A.gridstack=this,this.opts=t=t||{},A.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const n=j.toNumber(A.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const o=t.columnOpts;if(o){const h=o.breakpoints;!o.columnWidth&&!h?.length?delete t.columnOpts:(o.columnMax=o.columnMax||12,h?.length>1&&h.sort((g,B)=>(B.w||0)-(g.w||0)))}const a={...j.cloneDeep(Fe),column:j.toNumber(A.getAttribute("gs-column"))||Fe.column,minRow:n||j.toNumber(A.getAttribute("gs-min-row"))||Fe.minRow,maxRow:n||j.toNumber(A.getAttribute("gs-max-row"))||Fe.maxRow,staticGrid:j.toBool(A.getAttribute("gs-static"))||Fe.staticGrid,sizeToContent:j.toBool(A.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||Fe.draggable.handle},removableOptions:{accept:t.itemClass||Fe.removableOptions.accept,decline:Fe.removableOptions.decline}};A.getAttribute("gs-animate")&&(a.animate=j.toBool(A.getAttribute("gs-animate"))),t=j.defaults(t,a),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=A.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const u=this.el.closest("."+Fe.itemClass)?.gridstackNode;if(u&&(u.subGrid=this,this.parentGridNode=u,this.el.classList.add("grid-stack-nested"),u.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==Fe.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const h=t.cellHeight;delete t.cellHeight,this.cellHeight(h)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=ke),this._setStaticClass();const d=t.engineClass||DA.engineClass||mi;if(this.engine=new d({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:h=>{h.forEach(g=>{const B=g.el;B&&(g._removeDOM?(B&&B.remove(),delete g._removeDOM):this._writePosAttr(B,g))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(h=>this._prepareElement(h)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const h=t.children;delete t.children,h.length&&this.load(h)}this.setAnimation(),t.subGridDynamic&&!NA.pauseDrag&&(NA.pauseDrag=!0),t.draggable?.pause!==void 0&&(NA.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(A=this.opts){this.el.classList.add("gs-"+A.column),typeof A.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/A.column}%`)}addWidget(A){if(!A)return;if(typeof A=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(A.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(A);let t,n=A;if(n.grid=this,n.el?t=n.el:DA.addRemoveCB?t=DA.addRemoveCB(this.el,A,!0,!1):t=this.createWidgetDivs(n),!t)return;if(n=t.gridstackNode,n&&t.parentElement===this.el&&this.engine.nodes.find(a=>a._id===n._id))return t;const o=this._readAttr(t);return j.defaults(A,o),this.engine.prepareNode(A),this.el.appendChild(t),this.makeWidget(t,A),t}createWidgetDivs(A){const t=j.createDiv(["grid-stack-item",this.opts.itemClass]),n=j.createDiv(["grid-stack-item-content"],t);return j.lazyLoad(A)?A.visibleObservable||(A.visibleObservable=new IntersectionObserver(([o])=>{o.isIntersecting&&(A.visibleObservable?.disconnect(),delete A.visibleObservable,DA.renderCB(n,A),A.grid?.prepareDragDrop(A.el))}),window.setTimeout(()=>A.visibleObservable?.observe(t))):DA.renderCB(n,A),t}makeSubGrid(A,t,n,o=!0){let a=A.gridstackNode;if(a||(a=this.makeWidget(A).gridstackNode),a.subGrid?.el)return a.subGrid;let u,d=this;for(;d&&!u;)u=d.opts?.subGridOpts,d=d.parentGridNode?.grid;t=j.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...t||a.subGridOpts||{}}),a.subGridOpts=t;let h;t.column==="auto"&&(h=!0,t.column=Math.max(a.w||1,n?.w||1),delete t.columnOpts);let g=a.el.querySelector(".grid-stack-item-content"),B,w;if(o&&(this._removeDD(a.el),w={...a,x:0,y:0},j.removeInternalForSave(w),delete w.subGridOpts,a.content&&(w.content=a.content,delete a.content),DA.addRemoveCB?B=DA.addRemoveCB(this.el,w,!0,!1):(B=j.createDiv(["grid-stack-item"]),B.appendChild(g),g=j.createDiv(["grid-stack-item-content"],a.el)),this.prepareDragDrop(a.el)),n){const v=h?t.column:a.w,Q=a.h+n.h,H=a.el.style;H.transition="none",this.update(a.el,{w:v,h:Q}),setTimeout(()=>H.transition=null)}const m=a.subGrid=DA.addGrid(g,t);return n?._moving&&(m._isTemp=!0),h&&(m._autoColumn=!0),o&&m.makeWidget(B,w),n&&(n._moving?window.setTimeout(()=>j.simulateMouseEvent(n._event,"mouseenter",m.el),0):m.makeWidget(a.el,a)),this.resizeToContentCheck(!1,a),m}removeAsSubGrid(A){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(n=>{n.x+=this.parentGridNode.x,n.y+=this.parentGridNode.y,t.makeWidget(n.el,n)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,A&&window.setTimeout(()=>j.simulateMouseEvent(A._event,"mouseenter",t.el),0))}save(A=!0,t=!1,n=DA.saveCB,o){const a=this.engine.save(A,n,o);if(a.forEach(u=>{if(A&&u.el&&!u.subGrid&&!n)u.content=u.el.querySelector(".grid-stack-item-content")?.innerHTML,u.content||delete u.content;else if(!A&&!n&&delete u.content,u.subGrid?.el){const d=u.w||u.subGrid.getColumn(),h=u.subGrid.save(A,t,n,d);u.subGridOpts=t?h:{children:h},delete u.subGrid}delete u.el}),t){const u=j.cloneDeep(this.opts);u.marginBottom===u.marginTop&&u.marginRight===u.marginLeft&&u.marginTop===u.marginRight&&(u.margin=u.marginTop,delete u.marginTop,delete u.marginRight,delete u.marginBottom,delete u.marginLeft),u.rtl===(this.el.style.direction==="rtl")&&(u.rtl="auto"),this._isAutoCellHeight&&(u.cellHeight="auto"),this._autoColumn&&(u.column="auto");const d=u._alwaysShowResizeHandle;return delete u._alwaysShowResizeHandle,d!==void 0?u.alwaysShowResizeHandle=d:delete u.alwaysShowResizeHandle,j.removeInternalAndSame(u,Fe),u.children=a,u}return a}load(A,t=DA.addRemoveCB||!0){A=j.cloneDeep(A);const n=this.getColumn();A.forEach(B=>{B.w=B.w||B.minW||1,B.h=B.h||B.minH||1}),A=j.sort(A),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;A.forEach(B=>{o=Math.max(o,(B.x||0)+B.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o),o>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=A,this.engine.columnChanged(o,n,this.responseLayout),A=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(A,o,!0));const a=DA.addRemoveCB;typeof t=="function"&&(DA.addRemoveCB=t);const u=[];this.batchUpdate();const d=!this.engine.nodes.length,h=d&&this.opts.animate;h&&this.setAnimation(!1),!d&&t&&[...this.engine.nodes].forEach(B=>{B.id&&(j.find(A,B.id)||(DA.addRemoveCB&&DA.addRemoveCB(this.el,B,!1,!1),u.push(B),this.removeWidget(B.el,!0,!1)))}),this.engine._loading=!0;const g=[];return this.engine.nodes=this.engine.nodes.filter(B=>j.find(A,B.id)?(g.push(B),!1):!0),A.forEach(B=>{const w=j.find(g,B.id);if(w){if(j.shouldSizeToContent(w)&&(B.h=w.h),this.engine.nodeBoundFix(B),(B.autoPosition||B.x===void 0||B.y===void 0)&&(B.w=B.w||w.w,B.h=B.h||w.h,this.engine.findEmptyPosition(B)),this.engine.nodes.push(w),j.samePos(w,B)&&this.engine.nodes.length>1&&(this.moveNode(w,{...B,forceCollide:!0}),j.copyPos(B,w)),this.update(w.el,B),B.subGridOpts?.children){const m=w.el.querySelector(".grid-stack");m&&m.gridstack&&m.gridstack.load(B.subGridOpts.children)}}else t&&this.addWidget(B)}),delete this.engine._loading,this.engine.removedNodes=u,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,a?DA.addRemoveCB=a:delete DA.addRemoveCB,h&&this.setAnimation(!0,!0),this}batchUpdate(A=!0){return this.engine.batchUpdate(A),A||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(A=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!A||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const o=j.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/o)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(A){if(A!==void 0&&this._isAutoCellHeight!==(A==="auto")&&(this._isAutoCellHeight=A==="auto",this._updateResizeEvent()),(A==="initial"||A==="auto")&&(A=void 0),A===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;A=this.cellWidth()+n}const t=j.parseHeight(A);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(A=!1){return A&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const A=this.opts.columnOpts;if(!A||!A.columnWidth&&!A.breakpoints?.length)return!1;const t=this.getColumn();let n=t;const o=this._widthOrContainer(!0);if(A.columnWidth)n=Math.min(Math.round(o/A.columnWidth)||1,A.columnMax);else{n=A.columnMax;let a=0;for(;a<A.breakpoints.length&&o<=A.breakpoints[a].w;)n=A.breakpoints[a++].c||t}if(n!==t){const a=A.breakpoints?.find(u=>u.c===n);return this.column(n,a?.layout||A.layout),!0}return!1}compact(A="compact",t=!0){return this.engine.compact(A,t),this._triggerChangeEvent(),this}column(A,t="moveScale"){if(!A||A<1||this.opts.column===A)return this;const n=this.getColumn();return this.opts.column=A,this.engine?(this.engine.column=A,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,A,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(A=>A.matches("."+this.opts.itemClass)&&!A.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(A=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),A?this.el.parentNode.removeChild(this.el):(this.removeAll(A),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(A){return this.opts.float!==A&&(this.opts.float=this.engine.float=A,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(A,t=!1){const n=this.el.getBoundingClientRect();let o;t?o={top:n.top+document.documentElement.scrollTop,left:n.left}:o={top:this.el.offsetTop,left:this.el.offsetLeft};const a=A.left-o.left,u=A.top-o.top,d=n.width/this.getColumn(),h=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(a/d),y:Math.floor(u/h)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(A,t,n,o){return this.engine.isAreaEmpty(A,t,n,o)}makeWidget(A,t){const n=DA.getElement(A);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,t);const o=n.gridstackNode;this._updateContainerHeight(),o.subGridOpts&&this.makeSubGrid(n,o.subGridOpts,void 0,!1);let a;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(a=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),a&&delete this._ignoreLayoutsNodeChange,n}on(A,t){return A.indexOf(" ")!==-1?(A.split(" ").forEach(n=>this.on(n,t)),this):(A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable"?(A==="enable"||A==="disable"?this._gsEventHandler[A]=n=>t(n):this._gsEventHandler[A]=n=>{n.detail&&t(n,n.detail)},this.el.addEventListener(A,this._gsEventHandler[A])):A==="drag"||A==="dragstart"||A==="dragstop"||A==="resizestart"||A==="resize"||A==="resizestop"||A==="dropped"||A==="resizecontent"?this._gsEventHandler[A]=t:console.error("GridStack.on("+A+") event not supported"),this)}off(A){return A.indexOf(" ")!==-1?(A.split(" ").forEach(t=>this.off(t)),this):((A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable")&&this._gsEventHandler[A]&&this.el.removeEventListener(A,this._gsEventHandler[A]),delete this._gsEventHandler[A],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(A=>this.off(A)),this}removeWidget(A,t=!0,n=!0){return A?(DA.getElements(A).forEach(o=>{if(o.parentElement&&o.parentElement!==this.el)return;let a=o.gridstackNode;a||(a=this.engine.nodes.find(u=>o===u.el)),a&&(t&&DA.addRemoveCB&&DA.addRemoveCB(this.el,a,!1,!1),delete o.gridstackNode,this._removeDD(o),this.engine.removeNode(a,t,n),t&&o.parentElement&&o.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(A=!0,t=!0){return this.engine.nodes.forEach(n=>{A&&DA.addRemoveCB&&DA.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(A,t),t&&this._triggerRemoveEvent(),this}setAnimation(A=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(A)}):A?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=A,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(A,t=!0,n=!0){return!!this.opts.staticGrid===A?this:(A?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&n&&o.subGrid.setStatic(A,t,n)}),t&&this._setStaticClass(),this)}updateOptions(A){const t=this.opts;return A===t?this:(A.acceptWidgets!==void 0&&(t.acceptWidgets=A.acceptWidgets,this._setupAcceptWidget()),A.animate!==void 0&&this.setAnimation(A.animate),A.cellHeight&&this.cellHeight(A.cellHeight),A.class!==void 0&&A.class!==t.class&&(t.class&&this.el.classList.remove(t.class),A.class&&this.el.classList.add(A.class)),A.columnOpts?(this.opts.columnOpts=A.columnOpts,this.checkDynamicColumn()):A.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof A.column=="number"&&this.column(A.column),A.margin!==void 0&&this.margin(A.margin),A.staticGrid!==void 0&&this.setStatic(A.staticGrid),A.disableDrag!==void 0&&!A.staticGrid&&this.enableMove(!A.disableDrag),A.disableResize!==void 0&&!A.staticGrid&&this.enableResize(!A.disableResize),A.float!==void 0&&this.float(A.float),A.row!==void 0?(t.minRow=t.maxRow=t.row=A.row,this._updateContainerHeight()):(A.minRow!==void 0&&(t.minRow=A.minRow,this._updateContainerHeight()),A.maxRow!==void 0&&(t.maxRow=A.maxRow)),A.lazyLoad!==void 0&&(t.lazyLoad=A.lazyLoad),A.children?.length&&this.load(A.children),this)}update(A,t){return DA.getElements(A).forEach(n=>{const o=n?.gridstackNode;if(!o)return;const a={...j.copyPos({},o),...j.cloneDeep(t)};this.engine.nodeBoundFix(a),delete a.autoPosition;const u=["x","y","w","h"];let d;if(u.some(B=>a[B]!==void 0&&a[B]!==o[B])&&(d={},u.forEach(B=>{d[B]=a[B]!==void 0?a[B]:o[B],delete a[B]})),!d&&(a.minW||a.minH||a.maxW||a.maxH)&&(d={}),a.content!==void 0){const B=n.querySelector(".grid-stack-item-content");B&&B.textContent!==a.content&&(o.content=a.content,DA.renderCB(B,a),o.subGrid?.el&&(B.appendChild(o.subGrid.el),o.subGrid._updateContainerHeight())),delete a.content}let h=!1,g=!1;for(const B in a)B[0]!=="_"&&o[B]!==a[B]&&(o[B]=a[B],h=!0,g=g||!this.opts.staticGrid&&(B==="noResize"||B==="noMove"||B==="locked"));if(j.sanitizeMinMax(o),d){const B=d.w!==void 0&&d.w!==o.w;this.moveNode(o,d),B&&o.subGrid?o.subGrid.onResize(this.hasAnimationCSS()?o.w:void 0):this.resizeToContentCheck(B,o),delete o._orig}(d||h)&&this._writeAttr(n,o),g&&this.prepareDragDrop(o.el),DA.updateCB&&DA.updateCB(o)}),this}moveNode(A,t){const n=A._updating;n||this.engine.cleanNodes().beginUpdate(A),this.engine.moveNode(A,t),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(A){if(!A||(A.classList.remove("size-to-content-max"),!A.clientHeight))return;const t=A.gridstackNode;if(!t)return;const n=t.grid;if(!n||A.parentElement!==n.el)return;const o=n.getCellHeight(!0);if(!o)return;let a=t.h?t.h*o:A.clientHeight,u;if(t.resizeToContentParent&&(u=A.querySelector(t.resizeToContentParent)),u||(u=A.querySelector(DA.resizeToContentParent)),!u)return;const d=A.clientHeight-u.clientHeight,h=t.h?t.h*o-d:u.clientHeight;let g;if(t.subGrid){g=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const m=t.subGrid.el.getBoundingClientRect(),v=A.getBoundingClientRect();g+=m.top-v.top}else{if(t.subGridOpts?.children?.length)return;{const m=u.firstElementChild;if(!m){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${DA.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}g=m.getBoundingClientRect().height||h}}if(h===g)return;a+=g-h;let B=Math.ceil(a/o);const w=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;w&&B>w&&(B=w,A.classList.add("size-to-content-max")),t.minH&&B<t.minH?B=t.minH:t.maxH&&B>t.maxH&&(B=t.maxH),B!==t.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(t,{h:B}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(A){DA.resizeToContentCB?DA.resizeToContentCB(A):this.resizeToContent(A)}rotate(A,t){return DA.getElements(A).forEach(n=>{const o=n.gridstackNode;if(!j.canBeRotated(o))return;const a={w:o.h,h:o.w,minH:o.minW,minW:o.minH,maxH:o.maxW,maxW:o.maxH};if(t){const d=t.left>0?Math.floor(t.left/this.cellWidth()):0,h=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;a.x=o.x+d-(o.h-(h+1)),a.y=o.y+h-d}Object.keys(a).forEach(d=>{a[d]===void 0&&delete a[d]});const u=o._orig;this.update(n,a),o._orig=u}),this}margin(A){if(!(typeof A=="string"&&A.split(" ").length>1)){const t=j.parseHeight(A);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=A,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(A){return this.engine.willItFit(A)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const A=this.engine.getDirtyNodes(!0);return A&&A.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(A),this._triggerEvent("change",A)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(A,t){const n=t?new CustomEvent(A,{bubbles:!1,detail:t}):new Event(A);let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;return o.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const A=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!n)return this;if(!A&&!this.opts.minRow){const a=j.parseHeight(getComputedStyle(this.el).minHeight);if(a.h>0&&a.unit===o){const u=Math.floor(a.h/n);t<u&&(t=u)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[A?"minHeight":"height"]=t*n+o),A&&j.shouldSizeToContent(A)&&A.grid.resizeToContentCBCheck(A.el),this}_prepareElement(A,t=!1,n){n=n||this._readAttr(A),A.gridstackNode=n,n.el=A,n.grid=this,n=this.engine.addNode(n,t),this._writeAttr(A,n),A.classList.add(Fe.itemClass,this.opts.itemClass);const o=j.shouldSizeToContent(n);return o?A.classList.add("size-to-content"):A.classList.remove("size-to-content"),o&&this.resizeToContentCheck(!1,n),j.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(A,t){return(!t._moving&&!t._resizing||this._placeholder===A)&&(A.style.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,A.style.left=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,A.style.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,A.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),A.setAttribute("gs-x",String(t.x)),A.setAttribute("gs-y",String(t.y)),t.w>1?A.setAttribute("gs-w",String(t.w)):A.removeAttribute("gs-w"),t.h>1?A.setAttribute("gs-h",String(t.h)):A.removeAttribute("gs-h"),this}_writeAttr(A,t){if(!t)return this;this._writePosAttr(A,t);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const o in n)t[o]?A.setAttribute(n[o],String(t[o])):A.removeAttribute(n[o]);return this}_readAttr(A,t=!0){const n={};n.x=j.toNumber(A.getAttribute("gs-x")),n.y=j.toNumber(A.getAttribute("gs-y")),n.w=j.toNumber(A.getAttribute("gs-w")),n.h=j.toNumber(A.getAttribute("gs-h")),n.autoPosition=j.toBool(A.getAttribute("gs-auto-position")),n.noResize=j.toBool(A.getAttribute("gs-no-resize")),n.noMove=j.toBool(A.getAttribute("gs-no-move")),n.locked=j.toBool(A.getAttribute("gs-locked"));const o=A.getAttribute("gs-size-to-content");o&&(o==="true"||o==="false"?n.sizeToContent=j.toBool(o):n.sizeToContent=parseInt(o,10)),n.id=A.getAttribute("gs-id"),n.maxW=j.toNumber(A.getAttribute("gs-max-w")),n.minW=j.toNumber(A.getAttribute("gs-min-w")),n.maxH=j.toNumber(A.getAttribute("gs-max-h")),n.minH=j.toNumber(A.getAttribute("gs-min-h")),t&&(n.w===1&&A.removeAttribute("gs-w"),n.h===1&&A.removeAttribute("gs-h"),n.maxW&&A.removeAttribute("gs-max-w"),n.minW&&A.removeAttribute("gs-min-w"),n.maxH&&A.removeAttribute("gs-max-h"),n.minH&&A.removeAttribute("gs-min-h"));for(const a in n){if(!n.hasOwnProperty(a))return;!n[a]&&n[a]!==0&&a!=="sizeToContent"&&delete n[a]}return n}_setStaticClass(){const A=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...A),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...A),this.el.removeAttribute("gs-static")),this}onResize(A=this.el?.clientWidth){if(!A||this.prevWidth===A)return;this.prevWidth=A,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(n=>{n.subGrid&&n.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(A=!1,t=void 0){if(this.engine){if(A&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)j.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(n=>j.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(o=>{j.shouldSizeToContent(o)&&this.resizeToContentCBCheck(o.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(A=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!A&&t&&!this.resizeObserver?(this._sizeThrottle=j.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(A||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(A=".grid-stack-item"){return j.getElement(A)}static getElements(A=".grid-stack-item"){return j.getElements(A)}static getGridElement(A){return DA.getElement(A)}static getGridElements(A){return j.getElements(A)}_initMargin(){let A,t=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(A=j.parseHeight(this.opts.margin),this.opts.marginUnit=A.unit,t=this.opts.margin=A.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=t:(A=j.parseHeight(this.opts[a]),this.opts[a]=A.h,delete this.opts.margin)}),this.opts.marginUnit=A.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return me}static setupDragIn(A,t,n,o=document){t?.pause!==void 0&&(NA.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof A=="string"?j.getElements(A,o):A).forEach((a,u)=>{me.isDraggable(a)||me.dragIn(a,t),n?.[u]&&(a.gridstackNode=n[u])})}movable(A,t){return this.opts.staticGrid?this:(DA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noMove:o.noMove=!0,this.prepareDragDrop(o.el))}),this)}resizable(A,t){return this.opts.staticGrid?this:(DA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noResize:o.noResize=!0,this.prepareDragDrop(o.el))}),this)}disable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!1,A),this.enableResize(!1,A),this._triggerEvent("disable"),this}enable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!0,A),this.enableResize(!0,A),this._triggerEvent("enable"),this}enableMove(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableMove(A,t)}),this)}enableResize(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableResize(A,t)}),this)}cancelDrag(){const A=this._placeholder?.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&DA._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(A){return me.draggable(A,"destroy").resizable(A,"destroy"),A.gridstackNode&&delete A.gridstackNode._initDD,delete A.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return me.droppable(this.el,"destroy"),this;let A,t;const n=(o,a,u)=>{u=u||a;const d=u.gridstackNode;if(!d)return;if(!d.grid?.el){u.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const m=u.getBoundingClientRect();u.style.left=m.x+(this.dragTransform.xScale-1)*(o.clientX-m.x)/this.dragTransform.xScale+"px",u.style.top=m.y+(this.dragTransform.yScale-1)*(o.clientY-m.y)/this.dragTransform.yScale+"px",u.style.transformOrigin="0px 0px"}let{top:h,left:g}=u.getBoundingClientRect();const B=this.el.getBoundingClientRect();g-=B.left,h-=B.top;const w={position:{top:h*this.dragTransform.xScale,left:g*this.dragTransform.yScale}};if(d._temporaryRemoved){if(d.x=Math.max(0,Math.round(g/t)),d.y=Math.max(0,Math.round(h/A)),delete d.autoPosition,this.engine.nodeBoundFix(d),!this.engine.willItFit(d)){if(d.autoPosition=!0,!this.engine.willItFit(d)){me.off(a,"drag");return}d._willFitPos&&(j.copyPos(d,d._willFitPos),delete d._willFitPos)}this._onStartMoving(u,o,w,d,t,A)}else this._dragOrResize(u,o,w,d,t,A)};return me.droppable(this.el,{accept:o=>{const a=o.gridstackNode||this._readAttr(o,!1);if(a?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let u=!0;if(typeof this.opts.acceptWidgets=="function")u=this.opts.acceptWidgets(o);else{const d=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;u=o.matches(d)}if(u&&a&&this.opts.maxRow){const d={w:a.w,h:a.h,minW:a.minW,minH:a.minH};u=this.engine.willItFit(d)}return u}}).on(this.el,"dropover",(o,a,u)=>{let d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._temporaryRemoved)return!1;if(d?._sidebarOrig&&(d.w=d._sidebarOrig.w,d.h=d._sidebarOrig.h),d?.grid&&d.grid!==this&&!d._temporaryRemoved&&d.grid._leave(a,u),u=u||a,t=this.cellWidth(),A=this.getCellHeight(!0),!d){const B=u.getAttribute("data-gs-widget")||u.getAttribute("gridstacknode");if(B){try{d=JSON.parse(B)}catch{console.error("Gridstack dropover: Bad JSON format: ",B)}u.removeAttribute("data-gs-widget"),u.removeAttribute("gridstacknode")}d||(d=this._readAttr(u)),d._sidebarOrig={w:d.w,h:d.h}}d.grid||(d.el||(d={...d}),d._isExternal=!0,u.gridstackNode=d);const h=d.w||Math.round(u.offsetWidth/t)||1,g=d.h||Math.round(u.offsetHeight/A)||1;return d.grid&&d.grid!==this?(a._gridstackNodeOrig||(a._gridstackNodeOrig=d),a.gridstackNode=d={...d,w:h,h:g,grid:this},delete d.x,delete d.y,this.engine.cleanupNode(d).nodeBoundFix(d),d._initDD=d._isExternal=d._temporaryRemoved=!0):(d.w=h,d.h=g,d._temporaryRemoved=!0),DA._itemRemoving(d.el,!1),me.on(a,"drag",n),n(o,a,u),!1}).on(this.el,"dropout",(o,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;return d&&(!d.grid||d.grid===this)&&(this._leave(a,u),this._isTemp&&this.removeAsSubGrid(d)),!1}).on(this.el,"drop",(o,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._isExternal)return!1;const h=!!this.placeholder.parentElement,g=a!==u;this.placeholder.remove(),delete this.placeholder.gridstackNode,h&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const B=a._gridstackNodeOrig;if(delete a._gridstackNodeOrig,h&&B?.grid&&B.grid!==this){const m=B.grid;m.engine.removeNodeFromLayoutCache(B),m.engine.removedNodes.push(B),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!d||(h&&(this.engine.cleanupNode(d),d.grid=this),delete d.grid?._isTemp,me.off(a,"drag"),u!==a?(u.remove(),a=u):a.remove(),this._removeDD(a),!h))return!1;const w=d.subGrid?.el?.gridstack;return j.copyPos(d,this._readAttr(this.placeholder)),j.removePositioningStyles(a),g&&(d.content||d.subGridOpts||DA.addRemoveCB)?(delete d.el,a=this.addWidget(d)):(this._prepareElement(a,!0,d),this.el.appendChild(a),this.resizeToContentCheck(!1,d),w&&(w.parentGridNode=d),this._updateContainerHeight()),this.engine.addedNodes.push(d),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...o,type:"dropped"},B&&B.grid?B:void 0,d),!1}),this}static _itemRemoving(A,t){if(!A)return;const n=A?A.gridstackNode:void 0;!n?.grid||A.classList.contains(n.grid.opts.removableOptions.decline)||(t?n._isAboutToRemove=!0:delete n._isAboutToRemove,t?A.classList.add("grid-stack-item-removing"):A.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const A=document.querySelector(this.opts.removable);return A?(!this.opts.staticGrid&&!me.isDroppable(A)&&me.droppable(A,this.opts.removableOptions).on(A,"dropover",(t,n)=>DA._itemRemoving(n,!0)).on(A,"dropout",(t,n)=>DA._itemRemoving(n,!1)),this):this}prepareDragDrop(A,t=!1){const n=A?.gridstackNode;if(!n)return;const o=n.noMove||this.opts.disableDrag,a=n.noResize||this.opts.disableResize,u=this.opts.staticGrid||o&&a;if((t||u)&&(n._initDD&&(this._removeDD(A),delete n._initDD),u&&A.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!n._initDD){let d,h;const g=(m,v)=>{this.triggerEvent(m,m.target),d=this.cellWidth(),h=this.getCellHeight(!0),this._onStartMoving(A,m,v,n,d,h)},B=(m,v)=>{this._dragOrResize(A,m,v,n,d,h)},w=m=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const v=n.w!==n._orig.w,Q=m.target;if(!(!Q.gridstackNode||Q.gridstackNode.grid!==this)){if(n.el=Q,n._isAboutToRemove){const H=A.gridstackNode.grid;H._gsEventHandler[m.type]&&H._gsEventHandler[m.type](m,Q),H.engine.nodes.push(n),H.removeWidget(A,!0,!0)}else j.removePositioningStyles(Q),n._temporaryRemoved?(this._writePosAttr(Q,n),this.engine.addNode(n)):this._writePosAttr(Q,n),this.triggerEvent(m,Q);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),m.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(v,n))}};me.draggable(A,{start:g,stop:w,drag:B}).resizable(A,{start:g,stop:w,resize:B}),n._initDD=!0}return me.draggable(A,o?"disable":"enable").resizable(A,a?"disable":"enable"),this}_onStartMoving(A,t,n,o,a,u){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=j.getValuesFromTransformedElement(A);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const d=this.placeholder.closest(".grid-stack");this.dragTransform=j.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=n.position,o._prevYPix=n.position.top,o._moving=t.type==="dragstart",o._resizing=t.type==="resizestart",delete o._lastTried,t.type==="dropover"&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(a,u,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const d=this.getColumn()-o.x,h=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;me.resizable(A,"option","minWidth",a*Math.min(o.minW||1,d)).resizable(A,"option","minHeight",u*Math.min(o.minH||1,h)).resizable(A,"option","maxWidth",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,d)).resizable(A,"option","maxWidthMoveLeft",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(A,"option","maxHeight",u*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,h)).resizable(A,"option","maxHeightMoveUp",u*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(A,t,n,o,a,u){const d={...o._orig};let h,g=this.opts.marginLeft,B=this.opts.marginRight,w=this.opts.marginTop,m=this.opts.marginBottom;const v=Math.round(u*.1),Q=Math.round(a*.1);if(g=Math.min(g,Q),B=Math.min(B,Q),w=Math.min(w,v),m=Math.min(m,v),t.type==="drag"){if(o._temporaryRemoved)return;const N=n.position.top-o._prevYPix;o._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&j.updateScrollPosition(A,n.position,N);const T=n.position.left+(n.position.left>o._lastUiPosition.left?-B:g),M=n.position.top+(n.position.top>o._lastUiPosition.top?-m:w);d.x=Math.round(T/a),d.y=Math.round(M/u);const U=this._extraDragRow;if(this.engine.collide(o,d)){const K=this.getRow();let eA=Math.max(0,d.y+o.h-K);this.opts.maxRow&&K+eA>this.opts.maxRow&&(eA=Math.max(0,this.opts.maxRow-K)),this._extraDragRow=eA}else this._extraDragRow=0;if(this._extraDragRow!==U&&this._updateContainerHeight(),o.x===d.x&&o.y===d.y)return}else if(t.type==="resize"){if(d.x<0||(j.updateScrollResize(t,A,u),d.w=Math.round((n.size.width-g)/a),d.h=Math.round((n.size.height-w)/u),o.w===d.w&&o.h===d.h)||o._lastTried&&o._lastTried.w===d.w&&o._lastTried.h===d.h)return;const N=n.position.left+g,T=n.position.top+w;d.x=Math.round(N/a),d.y=Math.round(T/u),h=!0}o._event=t,o._lastTried=d;const H={x:n.position.left+g,y:n.position.top+w,w:(n.size?n.size.width:o.w*a)-g-B,h:(n.size?n.size.height:o.h*u)-w-m};if(this.engine.moveNodeCheck(o,{...d,cellWidth:a,cellHeight:u,rect:H,resizing:h})){o._lastUiPosition=n.position,this.engine.cacheRects(a,u,w,B,m,g),delete o._skipDown,h&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const N=t.target;o._sidebarOrig||this._writePosAttr(N,o),this.triggerEvent(t,N)}}triggerEvent(A,t){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[A.type]&&n._gsEventHandler[A.type](A,t)}_leave(A,t){t=t||A;const n=t.gridstackNode;if(!n||(t.style.transform=t.style.transformOrigin=null,me.off(A,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&t?t:A;const o=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=o,this.opts.removable===!0&&DA._itemRemoving(A,!0),A._gridstackNodeOrig?(A.gridstackNode=A._gridstackNodeOrig,delete A._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}};en.renderCB=(e,A)=>{e&&A?.content&&(e.textContent=A.content)},en.resizeToContentParent=".grid-stack-item-content",en.Utils=j,en.Engine=mi,en.GDRev="12.4.2";var km={class:"d-layout"},Mm=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-locked","gs-no-resize","gs-no-move","gs-min-w","gs-min-h","gs-max-w","gs-max-h"],Km=(0,r.defineComponent)({name:"DLayout",__name:"layout",props:{modelValue:{default:()=>[]},column:{default:24},cellHeight:{default:60},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},float:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removableOptions:{}},emits:["update:modelValue","added","removed","changed","dragStart","dragStop","resizeStart","resizeStop"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)();let u=null;const d=async()=>{a.value&&(await(0,r.nextTick)(),u&&u.destroy(!1),u=en.init({column:n.column,cellHeight:n.cellHeight,disableDrag:!(n.draggable&&!n.disable),disableResize:!(n.resizable&&!n.disable),animate:n.animate,float:n.float,removable:n.removable,removableOptions:n.removableOptions},a.value),u.on("added",(m,v)=>{const Q=v[0];Q&&(o("added",h(Q)),B())}),u.on("removed",(m,v)=>{const Q=v[0];Q&&(o("removed",h(Q)),B())}),u.on("change",()=>{B(),o("changed",(u?.save()||[]).map(m=>h(m)))}),u.on("dragstart",(m,v)=>{v&&o("dragStart",m,h(v.gridstackNode||v))}),u.on("dragstop",(m,v)=>{v&&o("dragStop",m,h(v.gridstackNode||v))}),u.on("resizestart",(m,v)=>{v&&o("resizeStart",m,h(v.gridstackNode||v))}),u.on("resizestop",(m,v)=>{v&&o("resizeStop",m,h(v.gridstackNode||v))}))},h=m=>({id:m.id||m.el?.getAttribute("gs-id")||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1,locked:m.locked||!1,noResize:m.noResize||!1,noMove:m.noMove||!1,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}),g=async()=>{if(!u||!a.value)return;await(0,r.nextTick)();const m=u.engine.nodes;new Set(m.map(Q=>Q.id));const v=new Set(n.modelValue.map(Q=>Q.id));m.forEach(Q=>{if(!v.has(Q.id||"")){const H=Q.el;H&&u&&u.removeWidget(H,!1)}}),n.modelValue.forEach(Q=>{const H=m.find(N=>N.id===Q.id);if(H)H.el&&u&&u.update(H.el,{x:Q.x,y:Q.y,w:Q.w,h:Q.h,locked:Q.locked,noResize:Q.noResize,noMove:Q.noMove,minW:Q.minW,minH:Q.minH,maxW:Q.maxW,maxH:Q.maxH});else{if(!a.value||!u)return;const N=a.value.querySelector(`[gs-id="${Q.id}"]`);N&&u.makeWidget(N)}})},B=()=>{u&&o("update:modelValue",u.save().map(m=>{const v={id:m.id||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1},Q=n.modelValue.find(H=>H.id===v.id);return Q&&Object.keys(Q).forEach(H=>{["id","x","y","w","h"].includes(H)||(v[H]=Q[H])}),v}))},w=(0,r.computed)(()=>n.modelValue);return(0,r.watch)(()=>n.modelValue,async()=>{u&&(await(0,r.nextTick)(),g())},{deep:!0}),(0,r.watch)(()=>[n.column,n.cellHeight,n.draggable,n.resizable,n.disable,n.animate,n.float,n.removable],()=>{d()}),(0,r.onMounted)(()=>{d()}),(0,r.onBeforeUnmount)(()=>{u&&(u.destroy(!1),u=null)}),A({addItem:async m=>{if(u&&a.value){await(0,r.nextTick)();const v=a.value.querySelector(`[gs-id="${m.id}"]`);v&&(u.makeWidget(v),u.update(v,{x:m.x,y:m.y,w:m.w,h:m.h,locked:m.locked,noResize:m.noResize,noMove:m.noMove,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}))}},removeItem:m=>{if(u&&a.value){const v=a.value.querySelector(`[gs-id="${m}"]`);v&&u.removeWidget(v,!1)}},clear:()=>{u&&u.removeAll(!1)},getGrid:()=>u}),(m,v)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",km,[(0,r.createElementVNode)("div",{ref_key:"gridContainerRef",ref:a},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(w.value,Q=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Q.id,"gs-id":Q.id,"gs-x":Q.x,"gs-y":Q.y,"gs-w":Q.w,"gs-h":Q.h,"gs-locked":Q.locked,"gs-no-resize":Q.noResize,"gs-no-move":Q.noMove,"gs-min-w":Q.minW,"gs-min-h":Q.minH,"gs-max-w":Q.maxW,"gs-max-h":Q.maxH,class:"d-layout-item"},[(0,r.renderSlot)(m.$slots,"item",{item:Q})],8,Mm))),128))],512)]))}}),Om=Km,ul=ut(Om),$A=(e,A="",t=!1)=>t?`${e}pt`:A?`${e}${A}`:`${e}px`,Ce=(e,A=0)=>e==null||isNaN(e)?0:Number(Number(e).toFixed(A)),Rm=e=>e*3/4,Vm=e=>e*4/3,Pm=["onMousedown"],Gm={key:2,class:"d-draggable__mask"},zm=(0,r.defineComponent)({name:"DDraggable",__name:"draggable",props:{index:{},mask:{type:Boolean,default:!0},scale:{default:1},readonly:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},step:{default:1},zIndex:{default:1},isActiveBgTransparent:{type:Boolean,default:!1},left:{default:0},top:{default:0},width:{},height:{},activeFlag:{type:Boolean,default:!1},isPt:{type:Boolean,default:!1}},emits:["focus","blur","over","out"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)(),u=(0,r.ref)(),d=(0,r.ref)(0),h=(0,r.ref)(0),g=(0,r.ref)(0),B=(0,r.ref)(0),w=(0,r.ref)(null),m=(0,r.ref)(!1),v=(0,r.ref)(!1),Q=(0,r.ref)(!1),H=(0,r.ref)(!1),N=(0,r.ref)([{classname:"left"},{classname:"right"},{classname:"top"},{classname:"bottom"},{classname:"top-left"},{classname:"top-right"},{classname:"bottom-left"},{classname:"bottom-right"}]),T=(0,r.computed)(()=>n.scale),M=(0,r.computed)(()=>({left:$A(T.value,"",n.isPt)})),U=(0,r.computed)(()=>({left:$A(-T.value,"",n.isPt)})),K=(0,r.computed)(()=>({left:"auto",right:$A(-T.value,"",n.isPt)})),eA=(0,r.computed)(()=>({top:$A(-T.value,"",n.isPt)})),W=(0,r.computed)(()=>({top:"auto",bottom:$A(-T.value,"",n.isPt)})),iA=(0,r.computed)(()=>{const AA=8*T.value;return{width:$A(AA,"",n.isPt),height:$A(AA,"",n.isPt)}}),lA=(0,r.computed)(()=>({fontSize:$A(16*T.value,"",n.isPt)})),nA=(0,r.computed)(()=>Object.assign((()=>{if(H.value){const AA={zIndex:9999,...M.value};return n.isActiveBgTransparent&&(H.value||v.value)&&!n.readonly&&!n.disabled&&(AA.backgroundColor="color-mix(in srgb, var(--j-color-primary-bg) 60%, transparent)"),AA}return{zIndex:n.zIndex}})(),{top:$A(B.value,"",n.isPt),width:$A(d.value,"",n.isPt),height:$A(h.value,"",n.isPt),padding:$A(8*T.value,"",n.isPt),...M.value,left:$A(g.value,"",n.isPt)}));(0,r.watch)(()=>n.width,AA=>{d.value=Ce(q(AA))||(w.value?.offsetWidth??0)}),(0,r.watch)(()=>n.height,AA=>{h.value=Ce(q(AA))||(w.value?.offsetHeight??0)},{deep:!0}),(0,r.watch)(()=>n.left,AA=>{g.value=Ce(q(AA))}),(0,r.watch)(()=>n.top,AA=>{B.value=Ce(q(AA))}),(0,r.watch)(d,AA=>{a.value&&(a.value.style.width=$A(AA,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.width=$A(AA,"",n.isPt)))}),(0,r.watch)(h,AA=>{a.value&&(a.value.style.height=$A(AA,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.height=$A(AA,"",n.isPt)))}),(0,r.watch)(()=>n.activeFlag,AA=>{tA(AA)});const tA=AA=>{H.value=AA},q=AA=>AA===void 0?0:n.isPt?Vm(AA):AA,k=()=>{u.value&&u.value.firstChild&&(w.value=u.value.firstChild,d.value=Ce(q(n.width))||(w.value?.offsetWidth??0),h.value=Ce(q(n.height))||(w.value?.offsetHeight??0),g.value=Ce(q(n.left)),B.value=Ce(q(n.top)),tA(n.activeFlag))},sA=AA=>{g.value=AA},I=AA=>{B.value=AA},Y=AA=>{const cA=8*T.value/2,V={};return AA.split("-").forEach($=>{V[$]=$A(-cA,"",n.isPt)}),V},F=AA=>{v.value=AA},S=AA=>n.isPt?Rm(AA):AA,P=()=>{m.value=!0,o("focus",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)})},R=()=>{m.value=!1,Q.value=!1,o("blur",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)})},z=()=>{document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,R()}},J=(AA,cA)=>{if(n.disabled||n.readonly)return;let V,$,uA,BA,HA,aA;Q.value=!0,P();let wA=AA.clientX,_=AA.clientY;document.onmousemove=b=>{m.value=!0,cA==="right"?(V=!0,$=!1):cA==="left"?(V=!0,uA=!0,HA=!0,$=!1):cA==="top"?(V=!1,$=!0,BA=!0,aA=!0):cA==="bottom"?(V=!1,$=!0):cA==="bottom-right"?(V=!0,$=!0):cA==="bottom-left"?(V=!0,$=!0,uA=!0,HA=!0):cA==="top-right"?(V=!0,$=!0,BA=!0,aA=!0):cA==="top-left"&&(V=!0,$=!0,uA=!0,HA=!0,BA=!0,aA=!0);const D=b.clientX-wA,X=b.clientY-_;if(wA=b.clientX,_=b.clientY,V){let L=D*n.step;HA&&(L=-L),uA&&(g.value=Ce(g.value-L)),d.value=Ce(d.value+L)}if($){let L=X*n.step;aA&&(L=-L),BA&&(B.value=Ce(B.value-L)),h.value=Ce(h.value+L)}},z()},rA=()=>{v.value=!1,o("out",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)})},dA=()=>{n.disabled||n.readonly||(v.value=!0,o("over",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)}))},bA=AA=>{if(n.disabled||n.readonly)return;H.value=!0,P();let cA=AA.clientX,V=AA.clientY;document.onmousemove=$=>{const uA=$.clientX-cA,BA=$.clientY-V;cA=$.clientX,V=$.clientY,g.value=Ce(g.value+uA*n.step),B.value=Ce(B.value+BA*n.step)},z()};return(0,r.onMounted)(()=>{k()}),A({setActive:tA,setLeft:sA,setTop:I,setOverActive:F}),(AA,cA)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["d-draggable",{"d-draggable--active":(H.value||v.value)&&!e.readonly&&!e.disabled},{"d-draggable--pt":e.isPt&&!e.readonly&&!e.disabled},{"d-draggable--move":m.value},{"d-draggable--click":e.disabled}]),onMousedown:(0,r.withModifiers)(bA,["stop"]),onMouseover:(0,r.withModifiers)(dA,["stop"]),onMouseout:(0,r.withModifiers)(rA,["stop"]),style:(0,r.normalizeStyle)(nA.value)},[(0,r.createElementVNode)("div",{class:"d-draggable__wrapper",ref_key:"wrapper",ref:a},[(H.value||v.value||m.value)&&!e.readonly&&!e.disabled?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...eA.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...U.value}),class:"d-draggable__line d-draggable__line--top"},null,4),e.isPt?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...eA.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...U.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...W.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...K.value}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...W.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...M.value,...K.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4)],64)):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"d-draggable__line d-draggable__line--label",style:(0,r.normalizeStyle)(lA.value)},(0,r.toDisplayString)(g.value)+","+(0,r.toDisplayString)(B.value),5))],64)):(0,r.createCommentVNode)("",!0),!e.readonly&&!e.disabled?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(N.value,(V,$)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:$},[H.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["d-draggable__range",`d-draggable__range--${V.classname}`]),style:(0,r.normalizeStyle)([iA.value,Y(V.classname)]),onMousedown:(0,r.withModifiers)(uA=>J(uA,V.classname),["stop"])},null,46,Pm)):(0,r.createCommentVNode)("",!0)],64))),128)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",{class:"d-draggable__item",ref_key:"item",ref:u},[(0,r.renderSlot)(AA.$slots,"default")],512),!e.disabled&&e.mask?((0,r.openBlock)(),(0,r.createElementBlock)("div",Gm)):(0,r.createCommentVNode)("",!0)],512)],38))}}),Xm=zm,dl=ut(Xm),fl=e=>{const A=$m(e.components);return{formConfig:e.form,componentList:A}},gl=(e,A)=>{let t={},n=[];const o={},a=e;t=a.form;const u={};return a.components.forEach(d=>{const h=A[d.type];u[d.containerId]=u[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h?.dragType||"component",componentName:h?.componentName||"",runtimeType:h?.runtimeType,groupId:d.groupId,config:d.config,isInput:h?.isInput!==!1,containerId:d.containerId,level:d.level};h?.dragType==="container"&&(g.children=[]),o[g.id]=g,u[d.containerId].push(g)}),Object.keys(u).forEach(d=>{o[d]&&(o[d].children=u[d])}),n=u.form||[],{formConfig:t,componentList:n,componentDic:o}},Vr=(e,A)=>{const t={ver:"j1",form:{...e},components:[],db:{}};return hl(A||[],t.components),t},hl=(e,A)=>{e.forEach(t=>{if(t.type==="pkey")return;const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&hl(t.children||[],A),A.push(n)})},$m=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{rule:[]}};n.config&&Object.keys(n.config).forEach(a=>{if(a==="required"){n.config.required&&o.config?.rule?.push({required:!0,message:n.config.requiredMsg||"请输入"});return}if(a==="patterns"){n.config.patterns.forEach(u=>{u.reg&&u.msg&&o.config?.rule?.push({pattern:new RegExp(u.reg),message:`请输入${u.msg||""}`})});return}o.config[a]=n.config[a]}),n.type==="pkey"&&(o.config.isPkey=!0),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();u[h]||(u[h]=[]),delete d.slot,u[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=u[d._i]||[],g={label:d.label};d.active&&o.type==="j-collapse"&&(g.active=d.active);let B;if(o.type==="j-tabs"&&o.config?.tabKey&&o.config?.options.length>0){const m=o.config.options.find(v=>v.label===d._i);m&&(B=({formData:v})=>({display:m.value.includes(v[o.config?.tabKey||""])?m.display:!m.display}))}const w={config:g,children:h};return B&&(w.getCompConfig=B),w}),delete o.config.groups}else o.children=a}}),A.form},Bl=(e,A,t,n,o,a,u,d)=>{const h=(0,r.ref)(),g=(0,r.reactive)({}),B=(0,r.computed)(()=>{const F=[];return Object.keys(g).forEach(S=>{const P=g[S];P.dragType==="component"&&P.type!=="pkey"&&F.push(P)}),F}),w=(F=[],S)=>{const P=A?.value?.init;typeof P=="function"&&P(F,S)},m=F=>o?o(F,{componentDic:g,components:B.value,configData:h.value.config}):{},v=(F,S)=>{if(h.value?.id===F)return;const P=g[F]||S;if(P?h.value=P:F===t.id?h.value=t:h.value=null,h.value){const R=a[h.value.type];R?(w(R,h.value.config),m(h.value.type)):w([])}else w([]);S&&ne("dragClick",{id:S.id})},Q=()=>e.value.$el.getBoundingClientRect(),H=F=>F===t.id?t:g[F]||{},N=F=>{const S=[];if(F===t.id)S.push({id:F,name:t.name});else{const P=g[F];if(P){S.push({id:F,name:P.name});const R=N(P.containerId);S.push(...R)}}return S},T=(F,S)=>{const P=g[S];if(P===void 0)return!1;const R=P.containerId;return F===R?!0:R===t.id?!1:T(F,R)},M=F=>n?n(F)||{}:{},U=(F,S,P,R)=>{if(d){const z=H(F);return d(P.componentType,{container:z,groupId:S,configData:P},R)}return!1},K=({name:F,type:S,dragType:P,isInput:R,componentName:z,runtimeType:J},rA,dA,bA,AA=!1)=>{const cA=M(S);if(cA.id=dt(),cA.span=24,cA.componentType=S,eA(rA,cA.componentType))return;U(rA,bA,cA,!0);const V={id:cA.id,name:F,type:S,runtimeType:J,componentName:z||"",dragType:P||"component",containerId:rA,isInput:!!R,level:g[rA]?g[rA].level+1:1,config:cA,isNewAdd:!AA,groupId:bA};return V.dragType==="container"&&(V.children=[]),g[V.id]=V,H(rA).children?.splice(dA,0,V),V},eA=(F,S)=>!!(H(F).config.componentType==="gridtable"&&["divider","label","text","textEditor","viewTable","card","collapse","tabs","qrcode","barcode","tableLayout"].includes(S)),W=(F,S,P=!1)=>{let R=null;const z=H(F).children,J=z?.findIndex(rA=>rA.id===S)||0;if(P&&z&&z.length>1){let rA=J+1;J>0&&(rA=J-1),R=z[rA]}return z?.splice(J,1),R?.id},iA=(F,S,P,R)=>{const z=H(S).children,J=F.containerId!==S;F.containerId=S,F.groupId=R,z?.splice(P,0,F),U(S,R,F.config,J)&&(sA(),v(F.id))},lA=F=>{let S="";const P=H(F);return P&&(P.children&&P.children.length>0&&P.children.forEach(R=>{lA(R.id)}),S=W(P.containerId,F,!0)||"",delete g[F]),h.value&&h.value.id===F&&(h.value=null,A.value.init([])),S},nA=(F,S=[])=>{const P=H(F);if(P&&P.children&&P.children.length>0){const R=[];P.children.forEach(z=>{z.groupId&&S.includes(z.groupId)&&R.push(z.id)}),R.forEach(z=>{lA(z),delete g[z]})}},tA=(F,S)=>{const P=H(F);P&&(P.children&&P.children.length>0&&P.children.forEach(R=>{R.groupId===S&&lA(R.id)}),delete g[F])},q=F=>{const S=pn(H(F));S.id=dt(),S.config.id=S.id,g[S.id]=S;const P=H(S.containerId).children,R=P?.findIndex(z=>z.id===F)||0;P?.splice(R+1,0,S)},k=()=>{t.children=[],bu(g),h.value&&(ne("dragClick",{id:""}),h.value=null,A.value.init([]))},sA=()=>{h.value&&(ne("dragClick",{id:""}),h.value=null,A.value.init([]))},I=F=>{const S=h.value,P=H(S.containerId).children,R=P?.findIndex(z=>z.id===S.id)||0;lA(S.id),(0,r.nextTick)(()=>{const z=u[F],J=M(F);J.id=S.id,J.span=S.config.span,J.componentType=F,J.table=S.config.table,J.field=S.config.field,S.config.isSubTable&&(J.isSubTable=S.config.isSubTable);const rA={id:J.id,name:z.name,type:F,runtimeType:z.runtimeType,componentName:z.componentName||"",dragType:S.dragType,groupId:S.groupId,containerId:S.containerId,isInput:S.isInput,level:S.level,config:J,isNewAdd:!0};g[rA.id]=rA,P?.splice(R,0,rA)})},Y=F=>{ne("dragAddByClick",F)};return(0,r.provide)("d-drag-design-provide",{activedComponent:h,getDesignLocals:Q,getComponent:H,getParentComponents:N,isMyChildComponent:T,selectComponent:v,addComponent:K,deleteComponent:lA,copyComponent:q,removeComponentFromContainer:W,addComponentToContainer:iA,top:t,deleteChildren:tA,deleteChildrens:nA}),{activedComponent:h,clearComponents:k,changeComponent:I,schemaComponentDic:g,clearSelect:sA,addComponent:K,addComponentByTable:Y,designComponentList:B}},Wm=(0,r.defineComponent)({props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){const{t:A}=(0,Ht.useAppInject)();return{labelWidth:(0,r.computed)(()=>e.componentData.config?.notShowLabel?"0px":e.componentData.config?.labelWidth===void 0&&e.globalConfig.labelWidth!==void 0?`${e.globalConfig.labelWidth}px`:e.componentData.config?.labelWidth?`${e.componentData.config?.labelWidth}px`:void 0),inputConfig:(0,r.computed)(()=>{const t={...e.componentData?.config};return e.globalConfig.size===void 0&&(t.size=e.globalConfig.size),t.display=!0,t}),t:A}}}),Ym=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t};function Jm(e,A,t,n,o,a){const u=(0,r.resolveComponent)("j-comp"),d=(0,r.resolveComponent)("el-form-item");return e.componentData.isInput?((0,r.openBlock)(),(0,r.createBlock)(d,{key:0,"label-width":e.labelWidth,label:e.t(e.componentData.config?.notShowLabel?"":e.componentData.config?.label||""),rules:e.componentData.config?.required?[{required:!0,message:""}]:[]},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(u,{type:e.componentData?.componentName||e.componentData?.type,config:e.inputConfig,modelValue:e.componentData?.config.defaultValue},null,8,["type","config","modelValue"])]),_:1},8,["label-width","label","rules"])):e.componentData?.children?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)({key:1},e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"])):((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.normalizeProps)((0,r.mergeProps)({key:2},e.componentData?.config)),null,16))}var pl=Ym(Wm,[["render",Jm]]),Zm={class:"d-form-design j-block"},jm={class:"d-form-design-left"},qm={class:"d-form-design-component-list"},Aw={class:"j-component-tool"},ew={class:"j-component-tool-name"},tw={class:"d-form-design-center"},nw={class:"d-form-design-container"},rw={key:0,class:"d-form-design-empty"},ow={class:"d-form-design-right"},iw={class:"d-form-design-panel-title"},sw={style:{margin:"0","font-size":"14px"}},aw={class:"d-form-design-panel"},lw=(0,r.defineComponent)({name:"DFormDesign",__name:"formDesign",props:{components:{default:()=>[]},componentConfigs:{default:()=>({})},componentInit:{type:Function,default:void 0},containerAddComponent:{type:Function,default:void 0},componentConfigInit:{type:Function,default:void 0},componentConfigChange:{type:Function,default:void 0},componentConfigValidate:{type:Function,default:void 0},flowComponents:{default:()=>[]},flowInit:{type:Function,default:void 0},flowComponentConfigInit:{type:Function,default:void 0},flowComponentConfigChange:{type:Function,default:void 0},flowComponentConfigs:{default:()=>({})},actions:{}},setup(e,{expose:A}){const t=e,{t:n,warning:o,error:a}=(0,Ht.useAppInject)(),u=(0,r.reactive)({name:"表单",id:"form",type:"form",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}}),d=(0,r.ref)([]),h=t.components.length;for(let V=0;V<h;V++)d.value.push(V);t.componentInit&&(u.config=t.componentInit("form")||{});const g={},B=[];t.components.forEach(({children:V})=>{V.forEach($=>{g[$.type]=$,$.dragType=$.dragType||"component",$.isInput!==!1&&($.isInput=!0,B.push({label:$.name,value:$.type}))})});const w=V=>{V.forEach($=>{$.type==="d-input-flow"&&($.config=$.config||{},$.config.flowComponents=t.flowComponents,$.config.flowInit=t.flowInit,$.config.flowComponentConfigInit=uA=>{t.flowComponentConfigInit&&(uA.designComponents=iA.value,uA.component=M.value,t.flowComponentConfigInit(uA))},$.config.flowComponentConfigs=t.flowComponentConfigs,$.config.flowComponentConfigChange=t.flowComponentConfigChange),$.children&&w($.children)})},m={};Object.keys(t.componentConfigs||{}).forEach(V=>{const{hasBase:$,isInput:uA,hasTwoPlaceholder:BA,hasPlaceholder:HA,hasSpan:aA,hasLabel:wA,bindTable:_,labelTitle:b}=g[V]||{hasBase:!1},D=[{id:"componentType",type:"j-select",config:{label:"类型",allowClear:!1,display:uA,options:B}},{id:"label",type:"j-input",config:{label:b||"标题"},getCompConfig:({formData:L})=>({display:wA!==!1&&!L.notShowLabel})},{id:"notShowLabel",type:"j-switch",config:{label:"不显示"+(b||"标题"),activeValue:!0,inactiveValue:!1},getCompConfig:({formData:L})=>({display:wA!==!1&&!L.isSubTable})},{id:"labelWidth",type:"j-number",config:{label:"标题宽度"},getCompConfig:({formData:L})=>({display:uA&&!L.notShowLabel&&!L.isSubTable})},{id:"placeholder",type:"j-input",config:{display:uA&&!BA&&HA!==!1,label:"占位提示"}},{id:"startPlaceholder",type:"j-input",config:{display:!!BA,label:"开始占位"}},{id:"endPlaceholder",type:"j-input",config:{display:!!BA,label:"结束占位"}},{id:"span",type:"j-slider",config:{label:"表单栅栏",min:6,max:24,showTooltip:!0,step:6,showStops:!0,defautValue:24},getCompConfig:({formData:L})=>({display:aA!==!1&&!L.isSubTable})},{id:"width",type:"j-number",config:{label:"单元格宽度",min:1},getCompConfig:({formData:L})=>({display:!!L.isSubTable})},{id:"isNotSave",type:"j-switch",config:{label:"不保存",display:uA&&_!==!1,activeValue:!0,inactiveValue:!1}}],X={type:"j-collapse",config:{defaultValue:[]},children:[]};$!==!1&&(X.children?.push({config:{label:"基础信息"},children:[...D]}),X.config?.defaultValue.push("_collapse0")),X.children?.push(...t.componentConfigs[V]),w(X.children||[]),m[V]=[X]});const v=V=>{const{value:$}=V||{};V.id==="componentType"&&K($),M.value&&t.componentConfigChange&&t.componentConfigChange(M.value.type,{configRef:T,configData:M.value.config,...V})},Q=(V,$)=>{t.componentConfigInit&&t.componentConfigInit(V,{configRef:T,...$})},H=(V,$,uA)=>{let BA=!1;return g[V],$.container.type==="gridtable"?(!$.configData.isSubTable||uA)&&($.configData.isSubTable=!0,BA=!0):$.configData.isSubTable&&(BA=!0,$.configData.isSubTable=!1),t.containerAddComponent&&t.containerAddComponent(V,$),BA},N=(0,r.ref)(),T=(0,r.ref)(),{activedComponent:M,clearComponents:U,changeComponent:K,schemaComponentDic:eA,addComponentByTable:W,designComponentList:iA}=Bl(N,T,u,t.componentInit,Q,m,g,H),lA=(0,r.computed)(()=>M.value?.id!="form"?M.value?`${M.value.name}-${M.value.id}`:"":M.value?`${M.value.name}`:"");(0,r.provide)("dui-design-provide",{designItemName:pl});const nA=()=>{U()},tA=()=>{t.componentInit&&(u.config=t.componentInit("form")||{}),U()},q=()=>Vr(u.config,u.children||[]),k=V=>{const $=gl(V,g);u.config=$.formConfig,u.children?.push(...$.componentList),Object.keys($.componentDic).forEach(uA=>{eA[uA]=$.componentDic[uA]})},sA=()=>I(Vr(u.config,u.children||[]).components),I=V=>{for(const $ of V)if(t.componentConfigValidate&&!t.componentConfigValidate($.type,{configData:$.config,errorTip:a}))return!1;return!0},Y=(0,r.ref)(),F=(0,r.ref)(),S=(0,r.reactive)({width:0,height:0,formConfig:{}});let P=0;const R=V=>{if(F.value)P=0,F.value.init(V||[]);else{if(P>600){console.warn("表单组件加载超时");return}P++,setTimeout(()=>{R(V)},100)}},z=()=>{},J=()=>{};return A({getSchema:()=>q(),setSchema:V=>k(V),reset:()=>tA(),validate:()=>sA(),preview:()=>{const V=Vr(u.config,u.children||[]);S.width=V.form.width||800,S.height=V.form.height||600,Y.value.open("表单预览",V.form.layerType),(0,r.nextTick)(()=>{const{formConfig:$,componentList:uA}=fl(V);S.formConfig=$,R(uA)})},clear:nA}),(V,$)=>{const uA=(0,r.resolveComponent)("j-icon"),BA=(0,r.resolveComponent)("d-drag-tool"),HA=(0,r.resolveComponent)("el-collapse-item"),aA=(0,r.resolveComponent)("el-collapse"),wA=(0,r.resolveComponent)("d-drag-form-list"),_=(0,r.resolveComponent)("el-row"),b=(0,r.resolveComponent)("d-drag-container"),D=(0,r.resolveComponent)("j-form"),X=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Zm,[(0,r.createElementVNode)("div",jm,[(0,r.createElementVNode)("div",qm,[(0,r.createVNode)(aA,{modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=L=>d.value=L)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(L,pA)=>((0,r.openBlock)(),(0,r.createBlock)(HA,{key:pA,title:L.name,name:pA},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(L.children,(fA,FA)=>((0,r.openBlock)(),(0,r.createBlock)(BA,{key:FA,config:fA},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",Aw,[(0,r.createVNode)(uA,{class:"j-component-tool-icon",icon:fA.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",ew,(0,r.toDisplayString)((0,r.unref)(n)(fA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",tw,[(0,r.createElementVNode)("div",nw,[(0,r.createVNode)(b,{ref_key:"dragContainer",ref:N,class:"d-form-design-drag-container","is-component-container":!1,"component-data":u},{default:(0,r.withCtx)(()=>[!u.children||u.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",rw,[(0,r.createElementVNode)("div",null,(0,r.toDisplayString)((0,r.unref)(n)("请从左侧拖拽组件到此处")),1)])):((0,r.openBlock)(),(0,r.createBlock)(_,{key:1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(wA,{"component-list":u.children,"global-config":u.config},null,8,["component-list","global-config"])]),_:1}))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",ow,[(0,r.createElementVNode)("div",iw,[(0,r.createElementVNode)("span",sw,(0,r.toDisplayString)(`${lA.value}`),1)]),(0,r.createElementVNode)("div",aw,[(0,r.createVNode)(D,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:T,onChange:v},null,512)])],512),[[r.vShow,(0,r.unref)(M)]]),(0,r.createVNode)(X,{ref_key:"previewFormLayerRef",ref:Y,width:S.width,height:S.height,onOk:z,onClosed:J},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(D,{config:S.formConfig,"is-preview":!0,ref_key:"previewFormRef",ref:F,actions:e.actions},null,8,["config","actions"])]),_:1},8,["width","height"])])}}}),cw=lw,ml=ut(cw,[pl]),wl=(e,A)=>{const t={ver:"V3",indexPage:{...e},components:[]};return Cl(A||[],t.components),t},Cl=(e,A)=>{e.forEach(t=>{const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&Cl(t.children||[],A),A.push(n)})},uw=e=>{const A=dw(e.components);return{pageConfig:e.indexPage,componentList:A}},dw=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{}};n.config&&Object.keys(n.config).forEach(a=>{o.config[a]=n.config[a]}),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();u[h]||(u[h]=[]),delete d.slot,u[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=u[d._i]||[];return{config:{label:d.label},children:h}}),delete o.config.groups}else o.children=a}}),A.indexPage||[]},fw=(e,A)=>{let t={},n=[];const o={};if(e.ver==="V3"){const a=e;t=a.indexPage;const u={};a.components.forEach(d=>{const h=A[d.type];if(!h)return;u[d.containerId]=u[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h.dragType||"component",componentName:h.componentName||"",runtimeType:h.runtimeType,groupId:d.groupId,config:d.config,isInput:!1,containerId:d.containerId,level:d.level};o[g.id]=g,u[d.containerId].push(g),g.dragType==="container"&&(g.children=[])}),Object.keys(u).forEach(d=>{o[d]&&(o[d].children=u[d])}),n=u.indexPage||[]}return{pageConfig:t,componentList:n,componentDic:o}},gw=(0,r.defineComponent)({name:"DIndexDesignItem",__name:"indexDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)(e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"]))}}),vl=gw,hw={class:"d-index-design j-block"},Bw={class:"d-index-design-left"},pw={class:"j-component-list"},mw={class:"j-component-tool"},ww={class:"j-component-tool-name"},Cw={class:"d-index-design-center"},vw={class:"design-toolbar"},yw={class:"design-container"},Qw={key:0,class:"j-block design-empty"},Ew={class:"d-index-design-right"},Uw={class:"d-index-design-panel-title"},Fw={style:{margin:"0","font-size":"14px"}},bw={class:"d-index-design-panel"},Hw=(0,r.defineComponent)({name:"DIndexDesign",__name:"indexDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,containerAddComponent:Function,componentConfigInit:Function,componentConfigChange:Function,flowComponents:{type:Array,default:()=>[]},flowInit:Function,flowComponentConfigInit:Function,flowComponentConfigChange:Function,flowComponentConfigs:{type:Object,default:()=>({})},actions:{type:Object,default:()=>({})}},setup(e,{expose:A}){const{t}=(0,Ht.useAppInject)(),n=e,o=F=>{F.forEach(S=>{S.type==="d-input-flow"&&(S.config=S.config||{},S.config.flowComponents=n.flowComponents,S.config.flowInit=n.flowInit,S.config.flowComponentConfigInit=P=>{n.flowComponentConfigInit&&(P.designComponents=N.value,P.component=v.value,n.flowComponentConfigInit(P))},S.config.flowComponentConfigs=n.flowComponentConfigs,S.config.flowComponentConfigChange=n.flowComponentConfigChange),S.children&&o(S.children)})},a=(0,r.reactive)({name:"页面",id:"indexPage",type:"indexPage",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}});n.componentInit&&(a.config=n.componentInit("indexPage")||{});const u={},d=[];n.components.forEach(({children:F})=>{F.forEach(S=>{u[S.type]=S,S.dragType=S.dragType||"component",d.push({label:S.name,value:S.type})})});const h={};Object.keys(n.componentConfigs).forEach(F=>{const{hasBase:S}=u[F]||{hasBase:!1},P=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],R={type:"j-collapse",config:{defaultValue:[]},children:[]};S!==!1&&(R.children?.push({config:{label:"基础信息"},children:[...P]}),R.config?.defaultValue.push("_collapse0")),R.children?.push(...n.componentConfigs[F]),o(R.children||[]),h[F]=[R]});const g=F=>{v.value&&n.componentConfigChange&&n.componentConfigChange(v.value.type,{configRef:m,configData:v.value.config,...F})},B=(F,S)=>{n.componentConfigInit&&n.componentConfigInit(F,{configRef:m,...S})},w=(0,r.ref)(),m=(0,r.ref)(),{activedComponent:v,clearComponents:Q,schemaComponentDic:H,designComponentList:N}=Bl(w,m,a,n.componentInit,B,h,u,n.containerAddComponent),T=(0,r.computed)(()=>v.value?`【${v.value.name}】`:""),M=(0,r.ref)([]),U=n.components.length;for(let F=0;F<U;F++)M.value.push(F);(0,r.provide)("dui-design-provide",{designItemName:vl});const K=()=>{Q()},eA=()=>{n.componentInit&&(a.config=n.componentInit("indexPage")||{}),Q()},W=()=>(console.log("pValidate"),!0),iA=()=>wl(a.config,a.children||[]),lA=F=>{const S=fw(F,u);a.config=S.pageConfig,a.children?.push(...S.componentList),Object.keys(S.componentDic).forEach(P=>{H[P]=S.componentDic[P]})},nA=(0,r.ref)(),tA=(0,r.ref)();(0,r.ref)(""),(0,r.reactive)({formConfig:{}});let q=0;const k=F=>{if(tA.value)q=0,tA.value.init(F);else{if(q>600){console.warn("组件加载超时");return}q++,setTimeout(()=>{k(F)},100)}},sA=()=>{},I=()=>{},Y=()=>{const{componentList:F}=uw(wl(a.config,a.children||[]));nA.value.open("页面预览","full"),(0,r.nextTick)(()=>{k(F)})};return A({reset:eA,validate:W,getSchema:iA,setSchema:lA}),(F,S)=>{const P=(0,r.resolveComponent)("j-icon"),R=(0,r.resolveComponent)("d-drag-tool"),z=(0,r.resolveComponent)("el-collapse-item"),J=(0,r.resolveComponent)("el-collapse"),rA=(0,r.resolveComponent)("j-button"),dA=(0,r.resolveComponent)("el-tooltip"),bA=(0,r.resolveComponent)("el-divider"),AA=(0,r.resolveComponent)("el-empty"),cA=(0,r.resolveComponent)("d-drag-index-list"),V=(0,r.resolveComponent)("d-drag-container"),$=(0,r.resolveComponent)("j-form"),uA=(0,r.resolveComponent)("j-page"),BA=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",hw,[(0,r.createElementVNode)("div",Bw,[S[1]||(S[1]=(0,r.createElementVNode)("div",{class:"d-index-design-panel-title"},"组件库",-1)),(0,r.createElementVNode)("div",pw,[(0,r.createVNode)(J,{modelValue:M.value,"onUpdate:modelValue":S[0]||(S[0]=HA=>M.value=HA)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(HA,aA)=>((0,r.openBlock)(),(0,r.createBlock)(z,{key:aA,title:HA.name,name:aA},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(HA.children,(wA,_)=>((0,r.openBlock)(),(0,r.createBlock)(R,{key:_,config:wA},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",mw,[(0,r.createVNode)(P,{class:"j-component-tool-icon",icon:wA.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",ww,(0,r.toDisplayString)((0,r.unref)(t)(wA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",Cw,[(0,r.createElementVNode)("div",vw,[S[2]||(S[2]=(0,r.createElementVNode)("div",null,null,-1)),(0,r.createElementVNode)("div",null,[(0,r.createVNode)(dA,{content:(0,r.unref)(t)("清空")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(rA,{danger:"",type:"text",onClick:K,icon:"mdi:delete-outline"})]),_:1},8,["content"]),(0,r.createVNode)(bA,{direction:"vertical"}),(0,r.createVNode)(dA,{content:(0,r.unref)(t)("预览")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(rA,{type:"text",onClick:Y,icon:"mdi:play-circle-outline"})]),_:1},8,["content"])])]),(0,r.createElementVNode)("div",yw,[(0,r.createVNode)(V,{ref_key:"dragContainer",ref:w,class:"design-drag-container","is-component-container":!1,"component-data":a},{default:(0,r.withCtx)(()=>[!a.children||a.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",Qw,[(0,r.createVNode)(AA,{description:(0,r.unref)(t)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,r.openBlock)(),(0,r.createBlock)(cA,{key:1,"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"]))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Ew,[(0,r.createElementVNode)("div",Uw,[(0,r.createElementVNode)("span",Fw,(0,r.toDisplayString)(`${(0,r.unref)(t)("属性配置")}${T.value}`),1)]),(0,r.createElementVNode)("div",bw,[(0,r.createVNode)($,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:m,onChange:g},null,512)])],512),[[r.vShow,(0,r.unref)(v)&&h[(0,r.unref)(v).type]]]),(0,r.createVNode)(BA,{ref_key:"previewLayerRef",ref:nA,"has-btns":!1,onOk:sA,onClosed:I},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(uA,{ref_key:"previewRef",ref:tA,actions:e.actions},null,8,["actions"])]),_:1},512)])}}}),Iw=Hw,yl=ut(Iw,[vl]),qA=Uu({Vue:()=>r,Vue2:()=>{},del:()=>xw,install:()=>_w,isVue2:()=>!1,isVue3:()=>!0,set:()=>Sw});Fu(qA,require("vue"));var wE=!1,CE=!0,vE=void 0;function _w(){}function Sw(e,A,t){return Array.isArray(e)?(e.length=Math.max(e.length,A),e.splice(A,1,t),t):(e[A]=t,t)}function xw(e,A){if(Array.isArray(e)){e.splice(A,1);return}delete e[A]}var Pr=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Dw=(0,qA.defineComponent)({name:"LineRuler",props:{scale:Number,thick:Number,palette:Object,index:Number,start:Number,vertical:Boolean,value:Number,isShowReferLine:Boolean},emits:["onMouseDown","onRelease","onRemove"],setup(e,{emit:A}){const t=(0,qA.ref)(0),n=(0,qA.ref)(!0);(0,qA.onMounted)(()=>{t.value=e.value});const o=B=>{n.value=B>=0},a=(0,qA.computed)(()=>{const B=(t.value-e.start)*e.scale;o(B);const w=B+"px";return e.vertical?{top:w}:{left:w}}),u=(0,qA.computed)(()=>{var B;const w=`1px solid ${(B=e.palette)==null?void 0:B.lineColor}`,m=e.vertical?{borderTop:w}:{borderLeft:w};return{cursor:e.isShowReferLine?e.vertical?"ns-resize":"ew-resize":"none",...m}}),d=(0,qA.computed)(()=>e.vertical?{left:e.thick+"px"}:{top:e.thick+"px"});return{startValue:t,showLine:n,offset:a,borderCursor:u,actionStyle:d,handleDown:B=>{const w=e.vertical?B.clientY:B.clientX,m=t.value;A("onMouseDown");const v=H=>{const N=e.vertical?H.clientY:H.clientX;t.value=Math.round(m+(N-w)/e.scale)},Q=()=>{A("onRelease",t.value,e.index),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",Q)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",Q)},handleRemove:()=>{A("onRemove",e.index)}}}}),Nw={class:"value"};function Lw(e,A,t,n,o,a){return(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"line",style:(0,r.normalizeStyle)([e.offset,e.borderCursor]),onMousedown:A[1]||(A[1]=(...u)=>e.handleDown&&e.handleDown(...u))},[(0,r.createElementVNode)("div",{class:"action",style:(0,r.normalizeStyle)(e.actionStyle)},[(0,r.createElementVNode)("span",{class:"del",onClick:A[0]||(A[0]=(...u)=>e.handleRemove&&e.handleRemove(...u))},"×"),(0,r.createElementVNode)("span",Nw,(0,r.toDisplayString)(e.startValue),1)],4)],36)),[[r.vShow,e.showLine]])}var Tw=Pr(Dw,[["render",Lw],["__scopeId","data-v-074b3d94"]]),kw=e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1,Ql=.83,Mw=(e,A,t,n,o,a)=>{const{scale:u,width:d,height:h,ratio:g,palette:B}=o,{bgColor:w,fontColor:m,shadowColor:v,longfgColor:Q,shortfgColor:H}=B;if(e.scale(g,g),e.clearRect(0,0,d,h),e.fillStyle=w,e.fillRect(0,0,d,h),n){const nA=(t-A)*u,tA=n*u;e.fillStyle=v,a?e.fillRect(nA,0,tA,h*3/8):e.fillRect(0,nA,d*3/8,tA)}const N=kw(u),T=N*u,M=N*10,U=M*u,K=Math.floor(A/N)*N,eA=Math.floor(A/M)*M,W=(K-A)/N*T,iA=(eA-A)/M*U,lA=A+Math.ceil((a?d:h)/u);e.beginPath(),e.fillStyle=m,e.strokeStyle=Q;for(let nA=eA,tA=0;nA<lA;nA+=M,tA++){const q=iA+tA*U+.5;a?e.moveTo(q,0):e.moveTo(0,q),e.save(),a?e.translate(q,h*.4):e.translate(d*.4,q),a||e.rotate(-Math.PI/2),e.scale(Ql/g,Ql/g),e.fillText(nA.toString(),4*g,7*g),e.restore(),a?e.lineTo(q,h*9/16):e.lineTo(d*9/16,q)}e.stroke(),e.closePath(),e.beginPath(),e.strokeStyle=H;for(let nA=K,tA=0;nA<lA;nA+=N,tA++){const q=W+tA*T+.5;a?e.moveTo(q,0):e.moveTo(0,q),nA%M!==0&&(a?e.lineTo(q,h*1/4):e.lineTo(d*1/4,q))}e.stroke(),e.closePath(),e.setTransform(1,0,0,1,0,0)},Kw=(0,qA.defineComponent)({name:"CanvasRuler",props:{showIndicator:Boolean,valueNum:Number,scale:Number,ratio:Number,palette:Object,vertical:Boolean,start:Number,width:Number,height:Number,selectStart:Number,selectLength:Number},emits:["onAddLine","update:showIndicator","update:valueNum"],setup(e,{emit:A}){const t=(0,qA.reactive)({canvasContext:null});let n=1;const o=(0,qA.ref)(null);(0,qA.onMounted)(()=>{n=e.ratio||window.devicePixelRatio||1,a(),u(n),d(n)});const a=()=>{t.canvasContext=o.value&&o.value.getContext("2d")},u=g=>{if(o.value){o.value.width=e.width*g,o.value.height=e.height*g;const B=t.canvasContext;B&&(B.font=`${12*g}px -apple-system,
28
+ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),n}static addGrid(A,t={}){if(!A)return null;let n=A;if(n.gridstack){const o=n.gridstack;return t&&(o.opts={...o.opts,...t}),t.children!==void 0&&o.load(t.children),o}return(!A.classList.contains("grid-stack")||DA.addRemoveCB)&&(DA.addRemoveCB?n=DA.addRemoveCB(A,t,!0,!0):n=j.createDiv(["grid-stack",t.class],A)),DA.init(t,n)}static registerEngine(A){DA.engineClass=A}get placeholder(){if(!this._placeholder){this._placeholder=j.createDiv([this.opts.placeholderClass,Fe.itemClass,this.opts.itemClass]);const A=j.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(A.textContent=this.opts.placeholderText)}return this._placeholder}constructor(A,t={}){this.el=A,this.opts=t,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},A.gridstack=this,this.opts=t=t||{},A.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);const n=j.toNumber(A.getAttribute("gs-row"));t.column==="auto"&&delete t.column,t.alwaysShowResizeHandle!==void 0&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);const o=t.columnOpts;if(o){const h=o.breakpoints;!o.columnWidth&&!h?.length?delete t.columnOpts:(o.columnMax=o.columnMax||12,h?.length>1&&h.sort((g,B)=>(B.w||0)-(g.w||0)))}const a={...j.cloneDeep(Fe),column:j.toNumber(A.getAttribute("gs-column"))||Fe.column,minRow:n||j.toNumber(A.getAttribute("gs-min-row"))||Fe.minRow,maxRow:n||j.toNumber(A.getAttribute("gs-max-row"))||Fe.maxRow,staticGrid:j.toBool(A.getAttribute("gs-static"))||Fe.staticGrid,sizeToContent:j.toBool(A.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||Fe.draggable.handle},removableOptions:{accept:t.itemClass||Fe.removableOptions.accept,decline:Fe.removableOptions.decline}};A.getAttribute("gs-animate")&&(a.animate=j.toBool(A.getAttribute("gs-animate"))),t=j.defaults(t,a),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(t),t.rtl==="auto"&&(t.rtl=A.style.direction==="rtl"),t.rtl&&this.el.classList.add("grid-stack-rtl");const u=this.el.closest("."+Fe.itemClass)?.gridstackNode;if(u&&(u.subGrid=this,this.parentGridNode=u,this.el.classList.add("grid-stack-nested"),u.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=t.cellHeight==="auto",this._isAutoCellHeight||t.cellHeight==="initial")this.cellHeight(void 0);else{typeof t.cellHeight=="number"&&t.cellHeightUnit&&t.cellHeightUnit!==Fe.cellHeightUnit&&(t.cellHeight=t.cellHeight+t.cellHeightUnit,delete t.cellHeightUnit);const h=t.cellHeight;delete t.cellHeight,this.cellHeight(h)}t.alwaysShowResizeHandle==="mobile"&&(t.alwaysShowResizeHandle=ke),this._setStaticClass();const d=t.engineClass||DA.engineClass||mi;if(this.engine=new d({column:this.getColumn(),float:t.float,maxRow:t.maxRow,onChange:h=>{h.forEach(g=>{const B=g.el;B&&(g._removeDOM?(B&&B.remove(),delete g._removeDOM):this._writePosAttr(B,g))}),this._updateContainerHeight()}}),t.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(h=>this._prepareElement(h)),delete this.engine._loading,this.batchUpdate(!1)),t.children){const h=t.children;delete t.children,h.length&&this.load(h)}this.setAnimation(),t.subGridDynamic&&!NA.pauseDrag&&(NA.pauseDrag=!0),t.draggable?.pause!==void 0&&(NA.pauseDrag=t.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(A=this.opts){this.el.classList.add("gs-"+A.column),typeof A.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/A.column}%`)}addWidget(A){if(!A)return;if(typeof A=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(A.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(A);let t,n=A;if(n.grid=this,n.el?t=n.el:DA.addRemoveCB?t=DA.addRemoveCB(this.el,A,!0,!1):t=this.createWidgetDivs(n),!t)return;if(n=t.gridstackNode,n&&t.parentElement===this.el&&this.engine.nodes.find(a=>a._id===n._id))return t;const o=this._readAttr(t);return j.defaults(A,o),this.engine.prepareNode(A),this.el.appendChild(t),this.makeWidget(t,A),t}createWidgetDivs(A){const t=j.createDiv(["grid-stack-item",this.opts.itemClass]),n=j.createDiv(["grid-stack-item-content"],t);return j.lazyLoad(A)?A.visibleObservable||(A.visibleObservable=new IntersectionObserver(([o])=>{o.isIntersecting&&(A.visibleObservable?.disconnect(),delete A.visibleObservable,DA.renderCB(n,A),A.grid?.prepareDragDrop(A.el))}),window.setTimeout(()=>A.visibleObservable?.observe(t))):DA.renderCB(n,A),t}makeSubGrid(A,t,n,o=!0){let a=A.gridstackNode;if(a||(a=this.makeWidget(A).gridstackNode),a.subGrid?.el)return a.subGrid;let u,d=this;for(;d&&!u;)u=d.opts?.subGridOpts,d=d.parentGridNode?.grid;t=j.cloneDeep({...this.opts,id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0,...u||{},...t||a.subGridOpts||{}}),a.subGridOpts=t;let h;t.column==="auto"&&(h=!0,t.column=Math.max(a.w||1,n?.w||1),delete t.columnOpts);let g=a.el.querySelector(".grid-stack-item-content"),B,w;if(o&&(this._removeDD(a.el),w={...a,x:0,y:0},j.removeInternalForSave(w),delete w.subGridOpts,a.content&&(w.content=a.content,delete a.content),DA.addRemoveCB?B=DA.addRemoveCB(this.el,w,!0,!1):(B=j.createDiv(["grid-stack-item"]),B.appendChild(g),g=j.createDiv(["grid-stack-item-content"],a.el)),this.prepareDragDrop(a.el)),n){const v=h?t.column:a.w,Q=a.h+n.h,H=a.el.style;H.transition="none",this.update(a.el,{w:v,h:Q}),setTimeout(()=>H.transition=null)}const m=a.subGrid=DA.addGrid(g,t);return n?._moving&&(m._isTemp=!0),h&&(m._autoColumn=!0),o&&m.makeWidget(B,w),n&&(n._moving?window.setTimeout(()=>j.simulateMouseEvent(n._event,"mouseenter",m.el),0):m.makeWidget(a.el,a)),this.resizeToContentCheck(!1,a),m}removeAsSubGrid(A){const t=this.parentGridNode?.grid;t&&(t.batchUpdate(),t.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(n=>{n.x+=this.parentGridNode.x,n.y+=this.parentGridNode.y,t.makeWidget(n.el,n)}),t.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,A&&window.setTimeout(()=>j.simulateMouseEvent(A._event,"mouseenter",t.el),0))}save(A=!0,t=!1,n=DA.saveCB,o){const a=this.engine.save(A,n,o);if(a.forEach(u=>{if(A&&u.el&&!u.subGrid&&!n)u.content=u.el.querySelector(".grid-stack-item-content")?.innerHTML,u.content||delete u.content;else if(!A&&!n&&delete u.content,u.subGrid?.el){const d=u.w||u.subGrid.getColumn(),h=u.subGrid.save(A,t,n,d);u.subGridOpts=t?h:{children:h},delete u.subGrid}delete u.el}),t){const u=j.cloneDeep(this.opts);u.marginBottom===u.marginTop&&u.marginRight===u.marginLeft&&u.marginTop===u.marginRight&&(u.margin=u.marginTop,delete u.marginTop,delete u.marginRight,delete u.marginBottom,delete u.marginLeft),u.rtl===(this.el.style.direction==="rtl")&&(u.rtl="auto"),this._isAutoCellHeight&&(u.cellHeight="auto"),this._autoColumn&&(u.column="auto");const d=u._alwaysShowResizeHandle;return delete u._alwaysShowResizeHandle,d!==void 0?u.alwaysShowResizeHandle=d:delete u.alwaysShowResizeHandle,j.removeInternalAndSame(u,Fe),u.children=a,u}return a}load(A,t=DA.addRemoveCB||!0){A=j.cloneDeep(A);const n=this.getColumn();A.forEach(B=>{B.w=B.w||B.minW||1,B.h=B.h||B.minH||1}),A=j.sort(A),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let o=0;A.forEach(B=>{o=Math.max(o,(B.x||0)+B.w)}),o>this.engine.defaultColumn&&(this.engine.defaultColumn=o),o>n&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=A,this.engine.columnChanged(o,n,this.responseLayout),A=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(A,o,!0));const a=DA.addRemoveCB;typeof t=="function"&&(DA.addRemoveCB=t);const u=[];this.batchUpdate();const d=!this.engine.nodes.length,h=d&&this.opts.animate;h&&this.setAnimation(!1),!d&&t&&[...this.engine.nodes].forEach(B=>{B.id&&(j.find(A,B.id)||(DA.addRemoveCB&&DA.addRemoveCB(this.el,B,!1,!1),u.push(B),this.removeWidget(B.el,!0,!1)))}),this.engine._loading=!0;const g=[];return this.engine.nodes=this.engine.nodes.filter(B=>j.find(A,B.id)?(g.push(B),!1):!0),A.forEach(B=>{const w=j.find(g,B.id);if(w){if(j.shouldSizeToContent(w)&&(B.h=w.h),this.engine.nodeBoundFix(B),(B.autoPosition||B.x===void 0||B.y===void 0)&&(B.w=B.w||w.w,B.h=B.h||w.h,this.engine.findEmptyPosition(B)),this.engine.nodes.push(w),j.samePos(w,B)&&this.engine.nodes.length>1&&(this.moveNode(w,{...B,forceCollide:!0}),j.copyPos(B,w)),this.update(w.el,B),B.subGridOpts?.children){const m=w.el.querySelector(".grid-stack");m&&m.gridstack&&m.gridstack.load(B.subGridOpts.children)}}else t&&this.addWidget(B)}),delete this.engine._loading,this.engine.removedNodes=u,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,a?DA.addRemoveCB=a:delete DA.addRemoveCB,h&&this.setAnimation(!0,!0),this}batchUpdate(A=!0){return this.engine.batchUpdate(A),A||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(A=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!A||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;const t=this.el.querySelector("."+this.opts.itemClass);if(t){const o=j.toNumber(t.getAttribute("gs-h"))||1;return Math.round(t.offsetHeight/o)}const n=parseInt(this.el.getAttribute("gs-current-row"));return n?Math.round(this.el.getBoundingClientRect().height/n):this.opts.cellHeight}cellHeight(A){if(A!==void 0&&this._isAutoCellHeight!==(A==="auto")&&(this._isAutoCellHeight=A==="auto",this._updateResizeEvent()),(A==="initial"||A==="auto")&&(A=void 0),A===void 0){const n=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;A=this.cellWidth()+n}const t=j.parseHeight(A);return this.opts.cellHeightUnit===t.unit&&this.opts.cellHeight===t.h?this:(this.opts.cellHeightUnit=t.unit,this.opts.cellHeight=t.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(A=!1){return A&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){const A=this.opts.columnOpts;if(!A||!A.columnWidth&&!A.breakpoints?.length)return!1;const t=this.getColumn();let n=t;const o=this._widthOrContainer(!0);if(A.columnWidth)n=Math.min(Math.round(o/A.columnWidth)||1,A.columnMax);else{n=A.columnMax;let a=0;for(;a<A.breakpoints.length&&o<=A.breakpoints[a].w;)n=A.breakpoints[a++].c||t}if(n!==t){const a=A.breakpoints?.find(u=>u.c===n);return this.column(n,a?.layout||A.layout),!0}return!1}compact(A="compact",t=!0){return this.engine.compact(A,t),this._triggerChangeEvent(),this}column(A,t="moveScale"){if(!A||A<1||this.opts.column===A)return this;const n=this.getColumn();return this.opts.column=A,this.engine?(this.engine.column=A,this.el.classList.remove("gs-"+n),this._updateColumnVar(),this.engine.columnChanged(n,A,t),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=t,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(A=>A.matches("."+this.opts.itemClass)&&!A.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(A=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),A?this.el.parentNode.removeChild(this.el):(this.removeAll(A),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(A){return this.opts.float!==A&&(this.opts.float=this.engine.float=A,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(A,t=!1){const n=this.el.getBoundingClientRect();let o;t?o={top:n.top+document.documentElement.scrollTop,left:n.left}:o={top:this.el.offsetTop,left:this.el.offsetLeft};const a=A.left-o.left,u=A.top-o.top,d=n.width/this.getColumn(),h=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(a/d),y:Math.floor(u/h)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(A,t,n,o){return this.engine.isAreaEmpty(A,t,n,o)}makeWidget(A,t){const n=DA.getElement(A);if(!n||n.gridstackNode)return n;n.parentElement||this.el.appendChild(n),this._prepareElement(n,!0,t);const o=n.gridstackNode;this._updateContainerHeight(),o.subGridOpts&&this.makeSubGrid(n,o.subGridOpts,void 0,!1);let a;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(a=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),a&&delete this._ignoreLayoutsNodeChange,n}on(A,t){return A.indexOf(" ")!==-1?(A.split(" ").forEach(n=>this.on(n,t)),this):(A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable"?(A==="enable"||A==="disable"?this._gsEventHandler[A]=n=>t(n):this._gsEventHandler[A]=n=>{n.detail&&t(n,n.detail)},this.el.addEventListener(A,this._gsEventHandler[A])):A==="drag"||A==="dragstart"||A==="dragstop"||A==="resizestart"||A==="resize"||A==="resizestop"||A==="dropped"||A==="resizecontent"?this._gsEventHandler[A]=t:console.error("GridStack.on("+A+") event not supported"),this)}off(A){return A.indexOf(" ")!==-1?(A.split(" ").forEach(t=>this.off(t)),this):((A==="change"||A==="added"||A==="removed"||A==="enable"||A==="disable")&&this._gsEventHandler[A]&&this.el.removeEventListener(A,this._gsEventHandler[A]),delete this._gsEventHandler[A],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(A=>this.off(A)),this}removeWidget(A,t=!0,n=!0){return A?(DA.getElements(A).forEach(o=>{if(o.parentElement&&o.parentElement!==this.el)return;let a=o.gridstackNode;a||(a=this.engine.nodes.find(u=>o===u.el)),a&&(t&&DA.addRemoveCB&&DA.addRemoveCB(this.el,a,!1,!1),delete o.gridstackNode,this._removeDD(o),this.engine.removeNode(a,t,n),t&&o.parentElement&&o.remove())}),n&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(A=!0,t=!0){return this.engine.nodes.forEach(n=>{A&&DA.addRemoveCB&&DA.addRemoveCB(this.el,n,!1,!1),delete n.el.gridstackNode,this.opts.staticGrid||this._removeDD(n.el)}),this.engine.removeAll(A,t),t&&this._triggerRemoveEvent(),this}setAnimation(A=this.opts.animate,t){return t?setTimeout(()=>{this.opts&&this.setAnimation(A)}):A?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=A,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(A,t=!0,n=!0){return!!this.opts.staticGrid===A?this:(A?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(o=>{this.prepareDragDrop(o.el),o.subGrid&&n&&o.subGrid.setStatic(A,t,n)}),t&&this._setStaticClass(),this)}updateOptions(A){const t=this.opts;return A===t?this:(A.acceptWidgets!==void 0&&(t.acceptWidgets=A.acceptWidgets,this._setupAcceptWidget()),A.animate!==void 0&&this.setAnimation(A.animate),A.cellHeight&&this.cellHeight(A.cellHeight),A.class!==void 0&&A.class!==t.class&&(t.class&&this.el.classList.remove(t.class),A.class&&this.el.classList.add(A.class)),A.columnOpts?(this.opts.columnOpts=A.columnOpts,this.checkDynamicColumn()):A.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof A.column=="number"&&this.column(A.column),A.margin!==void 0&&this.margin(A.margin),A.staticGrid!==void 0&&this.setStatic(A.staticGrid),A.disableDrag!==void 0&&!A.staticGrid&&this.enableMove(!A.disableDrag),A.disableResize!==void 0&&!A.staticGrid&&this.enableResize(!A.disableResize),A.float!==void 0&&this.float(A.float),A.row!==void 0?(t.minRow=t.maxRow=t.row=A.row,this._updateContainerHeight()):(A.minRow!==void 0&&(t.minRow=A.minRow,this._updateContainerHeight()),A.maxRow!==void 0&&(t.maxRow=A.maxRow)),A.lazyLoad!==void 0&&(t.lazyLoad=A.lazyLoad),A.children?.length&&this.load(A.children),this)}update(A,t){return DA.getElements(A).forEach(n=>{const o=n?.gridstackNode;if(!o)return;const a={...j.copyPos({},o),...j.cloneDeep(t)};this.engine.nodeBoundFix(a),delete a.autoPosition;const u=["x","y","w","h"];let d;if(u.some(B=>a[B]!==void 0&&a[B]!==o[B])&&(d={},u.forEach(B=>{d[B]=a[B]!==void 0?a[B]:o[B],delete a[B]})),!d&&(a.minW||a.minH||a.maxW||a.maxH)&&(d={}),a.content!==void 0){const B=n.querySelector(".grid-stack-item-content");B&&B.textContent!==a.content&&(o.content=a.content,DA.renderCB(B,a),o.subGrid?.el&&(B.appendChild(o.subGrid.el),o.subGrid._updateContainerHeight())),delete a.content}let h=!1,g=!1;for(const B in a)B[0]!=="_"&&o[B]!==a[B]&&(o[B]=a[B],h=!0,g=g||!this.opts.staticGrid&&(B==="noResize"||B==="noMove"||B==="locked"));if(j.sanitizeMinMax(o),d){const B=d.w!==void 0&&d.w!==o.w;this.moveNode(o,d),B&&o.subGrid?o.subGrid.onResize(this.hasAnimationCSS()?o.w:void 0):this.resizeToContentCheck(B,o),delete o._orig}(d||h)&&this._writeAttr(n,o),g&&this.prepareDragDrop(o.el),DA.updateCB&&DA.updateCB(o)}),this}moveNode(A,t){const n=A._updating;n||this.engine.cleanNodes().beginUpdate(A),this.engine.moveNode(A,t),this._updateContainerHeight(),n||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(A){if(!A||(A.classList.remove("size-to-content-max"),!A.clientHeight))return;const t=A.gridstackNode;if(!t)return;const n=t.grid;if(!n||A.parentElement!==n.el)return;const o=n.getCellHeight(!0);if(!o)return;let a=t.h?t.h*o:A.clientHeight,u;if(t.resizeToContentParent&&(u=A.querySelector(t.resizeToContentParent)),u||(u=A.querySelector(DA.resizeToContentParent)),!u)return;const d=A.clientHeight-u.clientHeight,h=t.h?t.h*o-d:u.clientHeight;let g;if(t.subGrid){g=t.subGrid.getRow()*t.subGrid.getCellHeight(!0);const m=t.subGrid.el.getBoundingClientRect(),v=A.getBoundingClientRect();g+=m.top-v.top}else{if(t.subGridOpts?.children?.length)return;{const m=u.firstElementChild;if(!m){console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${DA.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}g=m.getBoundingClientRect().height||h}}if(h===g)return;a+=g-h;let B=Math.ceil(a/o);const w=Number.isInteger(t.sizeToContent)?t.sizeToContent:0;w&&B>w&&(B=w,A.classList.add("size-to-content-max")),t.minH&&B<t.minH?B=t.minH:t.maxH&&B>t.maxH&&(B=t.maxH),B!==t.h&&(n._ignoreLayoutsNodeChange=!0,n.moveNode(t,{h:B}),delete n._ignoreLayoutsNodeChange)}resizeToContentCBCheck(A){DA.resizeToContentCB?DA.resizeToContentCB(A):this.resizeToContent(A)}rotate(A,t){return DA.getElements(A).forEach(n=>{const o=n.gridstackNode;if(!j.canBeRotated(o))return;const a={w:o.h,h:o.w,minH:o.minW,minW:o.minH,maxH:o.maxW,maxW:o.maxH};if(t){const d=t.left>0?Math.floor(t.left/this.cellWidth()):0,h=t.top>0?Math.floor(t.top/this.opts.cellHeight):0;a.x=o.x+d-(o.h-(h+1)),a.y=o.y+h-d}Object.keys(a).forEach(d=>{a[d]===void 0&&delete a[d]});const u=o._orig;this.update(n,a),o._orig=u}),this}margin(A){if(!(typeof A=="string"&&A.split(" ").length>1)){const t=j.parseHeight(A);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=A,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(A){return this.engine.willItFit(A)}_triggerChangeEvent(){if(this.engine.batchMode)return this;const A=this.engine.getDirtyNodes(!0);return A&&A.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(A),this._triggerEvent("change",A)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(t=>{delete t._dirty});const A=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",A)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){const A=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",A)}return this}_triggerEvent(A,t){const n=t?new CustomEvent(A,{bubbles:!1,detail:t}):new Event(A);let o=this;for(;o.parentGridNode;)o=o.parentGridNode.grid;return o.el.dispatchEvent(n),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;const A=this.parentGridNode;let t=this.getRow()+this._extraDragRow;const n=this.opts.cellHeight,o=this.opts.cellHeightUnit;if(!n)return this;if(!A&&!this.opts.minRow){const a=j.parseHeight(getComputedStyle(this.el).minHeight);if(a.h>0&&a.unit===o){const u=Math.floor(a.h/n);t<u&&(t=u)}}return this.el.setAttribute("gs-current-row",String(t)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),t&&(this.el.style[A?"minHeight":"height"]=t*n+o),A&&j.shouldSizeToContent(A)&&A.grid.resizeToContentCBCheck(A.el),this}_prepareElement(A,t=!1,n){n=n||this._readAttr(A),A.gridstackNode=n,n.el=A,n.grid=this,n=this.engine.addNode(n,t),this._writeAttr(A,n),A.classList.add(Fe.itemClass,this.opts.itemClass);const o=j.shouldSizeToContent(n);return o?A.classList.add("size-to-content"):A.classList.remove("size-to-content"),o&&this.resizeToContentCheck(!1,n),j.lazyLoad(n)||this.prepareDragDrop(n.el),this}_writePosAttr(A,t){return(!t._moving&&!t._resizing||this._placeholder===A)&&(A.style.top=t.y?t.y===1?"var(--gs-cell-height)":`calc(${t.y} * var(--gs-cell-height))`:null,A.style.left=t.x?t.x===1?"var(--gs-column-width)":`calc(${t.x} * var(--gs-column-width))`:null,A.style.width=t.w>1?`calc(${t.w} * var(--gs-column-width))`:null,A.style.height=t.h>1?`calc(${t.h} * var(--gs-cell-height))`:null),A.setAttribute("gs-x",String(t.x)),A.setAttribute("gs-y",String(t.y)),t.w>1?A.setAttribute("gs-w",String(t.w)):A.removeAttribute("gs-w"),t.h>1?A.setAttribute("gs-h",String(t.h)):A.removeAttribute("gs-h"),this}_writeAttr(A,t){if(!t)return this;this._writePosAttr(A,t);const n={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(const o in n)t[o]?A.setAttribute(n[o],String(t[o])):A.removeAttribute(n[o]);return this}_readAttr(A,t=!0){const n={};n.x=j.toNumber(A.getAttribute("gs-x")),n.y=j.toNumber(A.getAttribute("gs-y")),n.w=j.toNumber(A.getAttribute("gs-w")),n.h=j.toNumber(A.getAttribute("gs-h")),n.autoPosition=j.toBool(A.getAttribute("gs-auto-position")),n.noResize=j.toBool(A.getAttribute("gs-no-resize")),n.noMove=j.toBool(A.getAttribute("gs-no-move")),n.locked=j.toBool(A.getAttribute("gs-locked"));const o=A.getAttribute("gs-size-to-content");o&&(o==="true"||o==="false"?n.sizeToContent=j.toBool(o):n.sizeToContent=parseInt(o,10)),n.id=A.getAttribute("gs-id"),n.maxW=j.toNumber(A.getAttribute("gs-max-w")),n.minW=j.toNumber(A.getAttribute("gs-min-w")),n.maxH=j.toNumber(A.getAttribute("gs-max-h")),n.minH=j.toNumber(A.getAttribute("gs-min-h")),t&&(n.w===1&&A.removeAttribute("gs-w"),n.h===1&&A.removeAttribute("gs-h"),n.maxW&&A.removeAttribute("gs-max-w"),n.minW&&A.removeAttribute("gs-min-w"),n.maxH&&A.removeAttribute("gs-max-h"),n.minH&&A.removeAttribute("gs-min-h"));for(const a in n){if(!n.hasOwnProperty(a))return;!n[a]&&n[a]!==0&&a!=="sizeToContent"&&delete n[a]}return n}_setStaticClass(){const A=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...A),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...A),this.el.removeAttribute("gs-static")),this}onResize(A=this.el?.clientWidth){if(!A||this.prevWidth===A)return;this.prevWidth=A,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(n=>{n.subGrid&&n.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(A=!1,t=void 0){if(this.engine){if(A&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,t),this.animationDelay);if(t)j.shouldSizeToContent(t)&&this.resizeToContentCBCheck(t.el);else if(this.engine.nodes.some(n=>j.shouldSizeToContent(n))){const n=[...this.engine.nodes];this.batchUpdate(),n.forEach(o=>{j.shouldSizeToContent(o)&&this.resizeToContentCBCheck(o.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,t?[t]:this.engine.nodes)}}_updateResizeEvent(A=!1){const t=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(n=>n.sizeToContent));return!A&&t&&!this.resizeObserver?(this._sizeThrottle=j.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(A||!t)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(A=".grid-stack-item"){return j.getElement(A)}static getElements(A=".grid-stack-item"){return j.getElements(A)}static getGridElement(A){return DA.getElement(A)}static getGridElements(A){return j.getElements(A)}_initMargin(){let A,t=0,n=[];typeof this.opts.margin=="string"&&(n=this.opts.margin.split(" ")),n.length===2?(this.opts.marginTop=this.opts.marginBottom=n[0],this.opts.marginLeft=this.opts.marginRight=n[1]):n.length===4?(this.opts.marginTop=n[0],this.opts.marginRight=n[1],this.opts.marginBottom=n[2],this.opts.marginLeft=n[3]):(A=j.parseHeight(this.opts.margin),this.opts.marginUnit=A.unit,t=this.opts.margin=A.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(a=>{this.opts[a]===void 0?this.opts[a]=t:(A=j.parseHeight(this.opts[a]),this.opts[a]=A.h,delete this.opts.margin)}),this.opts.marginUnit=A.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);const o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return me}static setupDragIn(A,t,n,o=document){t?.pause!==void 0&&(NA.pauseDrag=t.pause),t={appendTo:"body",helper:"clone",...t||{}},(typeof A=="string"?j.getElements(A,o):A).forEach((a,u)=>{me.isDraggable(a)||me.dragIn(a,t),n?.[u]&&(a.gridstackNode=n[u])})}movable(A,t){return this.opts.staticGrid?this:(DA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noMove:o.noMove=!0,this.prepareDragDrop(o.el))}),this)}resizable(A,t){return this.opts.staticGrid?this:(DA.getElements(A).forEach(n=>{const o=n.gridstackNode;o&&(t?delete o.noResize:o.noResize=!0,this.prepareDragDrop(o.el))}),this)}disable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!1,A),this.enableResize(!1,A),this._triggerEvent("disable"),this}enable(A=!0){if(!this.opts.staticGrid)return this.enableMove(!0,A),this.enableResize(!0,A),this._triggerEvent("enable"),this}enableMove(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableMove(A,t)}),this)}enableResize(A,t=!0){return this.opts.staticGrid?this:(A?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(n=>{this.prepareDragDrop(n.el),n.subGrid&&t&&n.subGrid.enableResize(A,t)}),this)}cancelDrag(){const A=this._placeholder?.gridstackNode;A&&(A._isExternal?(A._isAboutToRemove=!0,this.engine.removeNode(A)):A._isAboutToRemove&&DA._itemRemoving(A.el,!1),this.engine.restoreInitial())}_removeDD(A){return me.draggable(A,"destroy").resizable(A,"destroy"),A.gridstackNode&&delete A.gridstackNode._initDD,delete A.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return me.droppable(this.el,"destroy"),this;let A,t;const n=(o,a,u)=>{u=u||a;const d=u.gridstackNode;if(!d)return;if(!d.grid?.el){u.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;const m=u.getBoundingClientRect();u.style.left=m.x+(this.dragTransform.xScale-1)*(o.clientX-m.x)/this.dragTransform.xScale+"px",u.style.top=m.y+(this.dragTransform.yScale-1)*(o.clientY-m.y)/this.dragTransform.yScale+"px",u.style.transformOrigin="0px 0px"}let{top:h,left:g}=u.getBoundingClientRect();const B=this.el.getBoundingClientRect();g-=B.left,h-=B.top;const w={position:{top:h*this.dragTransform.xScale,left:g*this.dragTransform.yScale}};if(d._temporaryRemoved){if(d.x=Math.max(0,Math.round(g/t)),d.y=Math.max(0,Math.round(h/A)),delete d.autoPosition,this.engine.nodeBoundFix(d),!this.engine.willItFit(d)){if(d.autoPosition=!0,!this.engine.willItFit(d)){me.off(a,"drag");return}d._willFitPos&&(j.copyPos(d,d._willFitPos),delete d._willFitPos)}this._onStartMoving(u,o,w,d,t,A)}else this._dragOrResize(u,o,w,d,t,A)};return me.droppable(this.el,{accept:o=>{const a=o.gridstackNode||this._readAttr(o,!1);if(a?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let u=!0;if(typeof this.opts.acceptWidgets=="function")u=this.opts.acceptWidgets(o);else{const d=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;u=o.matches(d)}if(u&&a&&this.opts.maxRow){const d={w:a.w,h:a.h,minW:a.minW,minH:a.minH};u=this.engine.willItFit(d)}return u}}).on(this.el,"dropover",(o,a,u)=>{let d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._temporaryRemoved)return!1;if(d?._sidebarOrig&&(d.w=d._sidebarOrig.w,d.h=d._sidebarOrig.h),d?.grid&&d.grid!==this&&!d._temporaryRemoved&&d.grid._leave(a,u),u=u||a,t=this.cellWidth(),A=this.getCellHeight(!0),!d){const B=u.getAttribute("data-gs-widget")||u.getAttribute("gridstacknode");if(B){try{d=JSON.parse(B)}catch{console.error("Gridstack dropover: Bad JSON format: ",B)}u.removeAttribute("data-gs-widget"),u.removeAttribute("gridstacknode")}d||(d=this._readAttr(u)),d._sidebarOrig={w:d.w,h:d.h}}d.grid||(d.el||(d={...d}),d._isExternal=!0,u.gridstackNode=d);const h=d.w||Math.round(u.offsetWidth/t)||1,g=d.h||Math.round(u.offsetHeight/A)||1;return d.grid&&d.grid!==this?(a._gridstackNodeOrig||(a._gridstackNodeOrig=d),a.gridstackNode=d={...d,w:h,h:g,grid:this},delete d.x,delete d.y,this.engine.cleanupNode(d).nodeBoundFix(d),d._initDD=d._isExternal=d._temporaryRemoved=!0):(d.w=h,d.h=g,d._temporaryRemoved=!0),DA._itemRemoving(d.el,!1),me.on(a,"drag",n),n(o,a,u),!1}).on(this.el,"dropout",(o,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;return d&&(!d.grid||d.grid===this)&&(this._leave(a,u),this._isTemp&&this.removeAsSubGrid(d)),!1}).on(this.el,"drop",(o,a,u)=>{const d=u?.gridstackNode||a.gridstackNode;if(d?.grid===this&&!d._isExternal)return!1;const h=!!this.placeholder.parentElement,g=a!==u;this.placeholder.remove(),delete this.placeholder.gridstackNode,h&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));const B=a._gridstackNodeOrig;if(delete a._gridstackNodeOrig,h&&B?.grid&&B.grid!==this){const m=B.grid;m.engine.removeNodeFromLayoutCache(B),m.engine.removedNodes.push(B),m._triggerRemoveEvent()._triggerChangeEvent(),m.parentGridNode&&!m.engine.nodes.length&&m.opts.subGridDynamic&&m.removeAsSubGrid()}if(!d||(h&&(this.engine.cleanupNode(d),d.grid=this),delete d.grid?._isTemp,me.off(a,"drag"),u!==a?(u.remove(),a=u):a.remove(),this._removeDD(a),!h))return!1;const w=d.subGrid?.el?.gridstack;return j.copyPos(d,this._readAttr(this.placeholder)),j.removePositioningStyles(a),g&&(d.content||d.subGridOpts||DA.addRemoveCB)?(delete d.el,a=this.addWidget(d)):(this._prepareElement(a,!0,d),this.el.appendChild(a),this.resizeToContentCheck(!1,d),w&&(w.parentGridNode=d),this._updateContainerHeight()),this.engine.addedNodes.push(d),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped({...o,type:"dropped"},B&&B.grid?B:void 0,d),!1}),this}static _itemRemoving(A,t){if(!A)return;const n=A?A.gridstackNode:void 0;!n?.grid||A.classList.contains(n.grid.opts.removableOptions.decline)||(t?n._isAboutToRemove=!0:delete n._isAboutToRemove,t?A.classList.add("grid-stack-item-removing"):A.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;const A=document.querySelector(this.opts.removable);return A?(!this.opts.staticGrid&&!me.isDroppable(A)&&me.droppable(A,this.opts.removableOptions).on(A,"dropover",(t,n)=>DA._itemRemoving(n,!0)).on(A,"dropout",(t,n)=>DA._itemRemoving(n,!1)),this):this}prepareDragDrop(A,t=!1){const n=A?.gridstackNode;if(!n)return;const o=n.noMove||this.opts.disableDrag,a=n.noResize||this.opts.disableResize,u=this.opts.staticGrid||o&&a;if((t||u)&&(n._initDD&&(this._removeDD(A),delete n._initDD),u&&A.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!t))return this;if(!n._initDD){let d,h;const g=(m,v)=>{this.triggerEvent(m,m.target),d=this.cellWidth(),h=this.getCellHeight(!0),this._onStartMoving(A,m,v,n,d,h)},B=(m,v)=>{this._dragOrResize(A,m,v,n,d,h)},w=m=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete n._moving,delete n._resizing,delete n._event,delete n._lastTried;const v=n.w!==n._orig.w,Q=m.target;if(!(!Q.gridstackNode||Q.gridstackNode.grid!==this)){if(n.el=Q,n._isAboutToRemove){const H=A.gridstackNode.grid;H._gsEventHandler[m.type]&&H._gsEventHandler[m.type](m,Q),H.engine.nodes.push(n),H.removeWidget(A,!0,!0)}else j.removePositioningStyles(Q),n._temporaryRemoved?(this._writePosAttr(Q,n),this.engine.addNode(n)):this._writePosAttr(Q,n),this.triggerEvent(m,Q);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),m.type==="resizestop"&&(Number.isInteger(n.sizeToContent)&&(n.sizeToContent=n.h),this.resizeToContentCheck(v,n))}};me.draggable(A,{start:g,stop:w,drag:B}).resizable(A,{start:g,stop:w,resize:B}),n._initDD=!0}return me.draggable(A,o?"disable":"enable").resizable(A,a?"disable":"enable"),this}_onStartMoving(A,t,n,o,a,u){if(this.engine.cleanNodes().beginUpdate(o),this._writePosAttr(this.placeholder,o),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=o,o.grid?.el)this.dragTransform=j.getValuesFromTransformedElement(A);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){const d=this.placeholder.closest(".grid-stack");this.dragTransform=j.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(o.el=this.placeholder,o._lastUiPosition=n.position,o._prevYPix=n.position.top,o._moving=t.type==="dragstart",o._resizing=t.type==="resizestart",delete o._lastTried,t.type==="dropover"&&o._temporaryRemoved&&(this.engine.addNode(o),o._moving=!0),this.engine.cacheRects(a,u,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),t.type==="resizestart"){const d=this.getColumn()-o.x,h=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-o.y;me.resizable(A,"option","minWidth",a*Math.min(o.minW||1,d)).resizable(A,"option","minHeight",u*Math.min(o.minH||1,h)).resizable(A,"option","maxWidth",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,d)).resizable(A,"option","maxWidthMoveLeft",a*Math.min(o.maxW||Number.MAX_SAFE_INTEGER,o.x+o.w)).resizable(A,"option","maxHeight",u*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,h)).resizable(A,"option","maxHeightMoveUp",u*Math.min(o.maxH||Number.MAX_SAFE_INTEGER,o.y+o.h))}}_dragOrResize(A,t,n,o,a,u){const d={...o._orig};let h,g=this.opts.marginLeft,B=this.opts.marginRight,w=this.opts.marginTop,m=this.opts.marginBottom;const v=Math.round(u*.1),Q=Math.round(a*.1);if(g=Math.min(g,Q),B=Math.min(B,Q),w=Math.min(w,v),m=Math.min(m,v),t.type==="drag"){if(o._temporaryRemoved)return;const N=n.position.top-o._prevYPix;o._prevYPix=n.position.top,this.opts.draggable.scroll!==!1&&j.updateScrollPosition(A,n.position,N);const L=n.position.left+(n.position.left>o._lastUiPosition.left?-B:g),R=n.position.top+(n.position.top>o._lastUiPosition.top?-m:w);d.x=Math.round(L/a),d.y=Math.round(R/u);const U=this._extraDragRow;if(this.engine.collide(o,d)){const k=this.getRow();let eA=Math.max(0,d.y+o.h-k);this.opts.maxRow&&k+eA>this.opts.maxRow&&(eA=Math.max(0,this.opts.maxRow-k)),this._extraDragRow=eA}else this._extraDragRow=0;if(this._extraDragRow!==U&&this._updateContainerHeight(),o.x===d.x&&o.y===d.y)return}else if(t.type==="resize"){if(d.x<0||(j.updateScrollResize(t,A,u),d.w=Math.round((n.size.width-g)/a),d.h=Math.round((n.size.height-w)/u),o.w===d.w&&o.h===d.h)||o._lastTried&&o._lastTried.w===d.w&&o._lastTried.h===d.h)return;const N=n.position.left+g,L=n.position.top+w;d.x=Math.round(N/a),d.y=Math.round(L/u),h=!0}o._event=t,o._lastTried=d;const H={x:n.position.left+g,y:n.position.top+w,w:(n.size?n.size.width:o.w*a)-g-B,h:(n.size?n.size.height:o.h*u)-w-m};if(this.engine.moveNodeCheck(o,{...d,cellWidth:a,cellHeight:u,rect:H,resizing:h})){o._lastUiPosition=n.position,this.engine.cacheRects(a,u,w,B,m,g),delete o._skipDown,h&&o.subGrid&&o.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();const N=t.target;o._sidebarOrig||this._writePosAttr(N,o),this.triggerEvent(t,N)}}triggerEvent(A,t){let n=this;for(;n.parentGridNode;)n=n.parentGridNode.grid;n._gsEventHandler[A.type]&&n._gsEventHandler[A.type](A,t)}_leave(A,t){t=t||A;const n=t.gridstackNode;if(!n||(t.style.transform=t.style.transformOrigin=null,me.off(A,"drag"),n._temporaryRemoved))return;n._temporaryRemoved=!0,this.engine.removeNode(n),n.el=n._isExternal&&t?t:A;const o=n._sidebarOrig;n._isExternal&&this.engine.cleanupNode(n),n._sidebarOrig=o,this.opts.removable===!0&&DA._itemRemoving(A,!0),A._gridstackNodeOrig?(A.gridstackNode=A._gridstackNodeOrig,delete A._gridstackNodeOrig):n._isExternal&&this.engine.restoreInitial()}};en.renderCB=(e,A)=>{e&&A?.content&&(e.textContent=A.content)},en.resizeToContentParent=".grid-stack-item-content",en.Utils=j,en.Engine=mi,en.GDRev="12.4.2";var km={class:"d-layout"},Mm=["gs-id","gs-x","gs-y","gs-w","gs-h","gs-locked","gs-no-resize","gs-no-move","gs-min-w","gs-min-h","gs-max-w","gs-max-h"],Km=(0,r.defineComponent)({name:"DLayout",__name:"layout",props:{modelValue:{default:()=>[]},column:{default:24},cellHeight:{default:60},draggable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},float:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removableOptions:{}},emits:["update:modelValue","added","removed","changed","dragStart","dragStop","resizeStart","resizeStop"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)();let u=null;const d=async()=>{a.value&&(await(0,r.nextTick)(),u&&u.destroy(!1),u=en.init({column:n.column,cellHeight:n.cellHeight,disableDrag:!(n.draggable&&!n.disable),disableResize:!(n.resizable&&!n.disable),animate:n.animate,float:n.float,removable:n.removable,removableOptions:n.removableOptions},a.value),u.on("added",(m,v)=>{const Q=v[0];Q&&(o("added",h(Q)),B())}),u.on("removed",(m,v)=>{const Q=v[0];Q&&(o("removed",h(Q)),B())}),u.on("change",()=>{B(),o("changed",(u?.save()||[]).map(m=>h(m)))}),u.on("dragstart",(m,v)=>{v&&o("dragStart",m,h(v.gridstackNode||v))}),u.on("dragstop",(m,v)=>{v&&o("dragStop",m,h(v.gridstackNode||v))}),u.on("resizestart",(m,v)=>{v&&o("resizeStart",m,h(v.gridstackNode||v))}),u.on("resizestop",(m,v)=>{v&&o("resizeStop",m,h(v.gridstackNode||v))}))},h=m=>({id:m.id||m.el?.getAttribute("gs-id")||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1,locked:m.locked||!1,noResize:m.noResize||!1,noMove:m.noMove||!1,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}),g=async()=>{if(!u||!a.value)return;await(0,r.nextTick)();const m=u.engine.nodes;new Set(m.map(Q=>Q.id));const v=new Set(n.modelValue.map(Q=>Q.id));m.forEach(Q=>{if(!v.has(Q.id||"")){const H=Q.el;H&&u&&u.removeWidget(H,!1)}}),n.modelValue.forEach(Q=>{const H=m.find(N=>N.id===Q.id);if(H)H.el&&u&&u.update(H.el,{x:Q.x,y:Q.y,w:Q.w,h:Q.h,locked:Q.locked,noResize:Q.noResize,noMove:Q.noMove,minW:Q.minW,minH:Q.minH,maxW:Q.maxW,maxH:Q.maxH});else{if(!a.value||!u)return;const N=a.value.querySelector(`[gs-id="${Q.id}"]`);N&&u.makeWidget(N)}})},B=()=>{u&&o("update:modelValue",u.save().map(m=>{const v={id:m.id||"",x:m.x||0,y:m.y||0,w:m.w||1,h:m.h||1},Q=n.modelValue.find(H=>H.id===v.id);return Q&&Object.keys(Q).forEach(H=>{["id","x","y","w","h"].includes(H)||(v[H]=Q[H])}),v}))},w=(0,r.computed)(()=>n.modelValue);return(0,r.watch)(()=>n.modelValue,async()=>{u&&(await(0,r.nextTick)(),g())},{deep:!0}),(0,r.watch)(()=>[n.column,n.cellHeight,n.draggable,n.resizable,n.disable,n.animate,n.float,n.removable],()=>{d()}),(0,r.onMounted)(()=>{d()}),(0,r.onBeforeUnmount)(()=>{u&&(u.destroy(!1),u=null)}),A({addItem:async m=>{if(u&&a.value){await(0,r.nextTick)();const v=a.value.querySelector(`[gs-id="${m.id}"]`);v&&(u.makeWidget(v),u.update(v,{x:m.x,y:m.y,w:m.w,h:m.h,locked:m.locked,noResize:m.noResize,noMove:m.noMove,minW:m.minW,minH:m.minH,maxW:m.maxW,maxH:m.maxH}))}},removeItem:m=>{if(u&&a.value){const v=a.value.querySelector(`[gs-id="${m}"]`);v&&u.removeWidget(v,!1)}},clear:()=>{u&&u.removeAll(!1)},getGrid:()=>u}),(m,v)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",km,[(0,r.createElementVNode)("div",{ref_key:"gridContainerRef",ref:a},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(w.value,Q=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Q.id,"gs-id":Q.id,"gs-x":Q.x,"gs-y":Q.y,"gs-w":Q.w,"gs-h":Q.h,"gs-locked":Q.locked,"gs-no-resize":Q.noResize,"gs-no-move":Q.noMove,"gs-min-w":Q.minW,"gs-min-h":Q.minH,"gs-max-w":Q.maxW,"gs-max-h":Q.maxH,class:"d-layout-item"},[(0,r.renderSlot)(m.$slots,"item",{item:Q})],8,Mm))),128))],512)]))}}),Om=Km,ul=ut(Om),$A=(e,A="",t=!1)=>t?`${e}pt`:A?`${e}${A}`:`${e}px`,Ce=(e,A=0)=>e==null||isNaN(e)?0:Number(Number(e).toFixed(A)),Rm=e=>e*3/4,Vm=e=>e*4/3,Pm=["onMousedown"],Gm={key:2,class:"d-draggable__mask"},zm=(0,r.defineComponent)({name:"DDraggable",__name:"draggable",props:{index:{},mask:{type:Boolean,default:!0},scale:{default:1},readonly:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},step:{default:1},zIndex:{default:1},isActiveBgTransparent:{type:Boolean,default:!1},left:{default:0},top:{default:0},width:{},height:{},activeFlag:{type:Boolean,default:!1},isPt:{type:Boolean,default:!1}},emits:["focus","blur","over","out"],setup(e,{expose:A,emit:t}){const n=e,o=t,a=(0,r.ref)(),u=(0,r.ref)(),d=(0,r.ref)(0),h=(0,r.ref)(0),g=(0,r.ref)(0),B=(0,r.ref)(0),w=(0,r.ref)(null),m=(0,r.ref)(!1),v=(0,r.ref)(!1),Q=(0,r.ref)(!1),H=(0,r.ref)(!1),N=(0,r.ref)([{classname:"left"},{classname:"right"},{classname:"top"},{classname:"bottom"},{classname:"top-left"},{classname:"top-right"},{classname:"bottom-left"},{classname:"bottom-right"}]),L=(0,r.computed)(()=>n.scale),R=(0,r.computed)(()=>({left:$A(L.value,"",n.isPt)})),U=(0,r.computed)(()=>({left:$A(-L.value,"",n.isPt)})),k=(0,r.computed)(()=>({left:"auto",right:$A(-L.value,"",n.isPt)})),eA=(0,r.computed)(()=>({top:$A(-L.value,"",n.isPt)})),Y=(0,r.computed)(()=>({top:"auto",bottom:$A(-L.value,"",n.isPt)})),sA=(0,r.computed)(()=>{const P=8*L.value;return{width:$A(P,"",n.isPt),height:$A(P,"",n.isPt)}}),lA=(0,r.computed)(()=>({fontSize:$A(16*L.value,"",n.isPt)})),nA=(0,r.computed)(()=>Object.assign((()=>{if(H.value){const P={zIndex:9999,...R.value};return n.isActiveBgTransparent&&(H.value||v.value)&&!n.readonly&&!n.disabled&&(P.backgroundColor="color-mix(in srgb, var(--j-color-primary-bg) 60%, transparent)"),P}return{zIndex:n.zIndex}})(),{top:$A(B.value,"",n.isPt),width:$A(d.value,"",n.isPt),height:$A(h.value,"",n.isPt),padding:$A(8*L.value,"",n.isPt),...R.value,left:$A(g.value,"",n.isPt)}));(0,r.watch)(()=>n.width,P=>{d.value=Ce(AA(P))||(w.value?.offsetWidth??0)}),(0,r.watch)(()=>n.height,P=>{h.value=Ce(AA(P))||(w.value?.offsetHeight??0)},{deep:!0}),(0,r.watch)(()=>n.left,P=>{g.value=Ce(AA(P))}),(0,r.watch)(()=>n.top,P=>{B.value=Ce(AA(P))}),(0,r.watch)(d,P=>{a.value&&(a.value.style.width=$A(P,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.width=$A(P,"",n.isPt)))}),(0,r.watch)(h,P=>{a.value&&(a.value.style.height=$A(P,"",n.isPt),n.resize&&w.value?.style&&(w.value.style.height=$A(P,"",n.isPt)))}),(0,r.watch)(()=>n.activeFlag,P=>{tA(P)});const tA=P=>{H.value=P},AA=P=>P===void 0?0:n.isPt?Vm(P):P,T=()=>{u.value&&u.value.firstChild&&(w.value=u.value.firstChild,d.value=Ce(AA(n.width))||(w.value?.offsetWidth??0),h.value=Ce(AA(n.height))||(w.value?.offsetHeight??0),g.value=Ce(AA(n.left)),B.value=Ce(AA(n.top)),tA(n.activeFlag))},aA=P=>{g.value=P},I=P=>{B.value=P},J=P=>{const W=8*L.value/2,X={};return P.split("-").forEach(oA=>{X[oA]=$A(-W,"",n.isPt)}),X},F=P=>{v.value=P},S=P=>n.isPt?Rm(P):P,V=()=>{m.value=!0,o("focus",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)})},O=()=>{m.value=!1,Q.value=!1,o("blur",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)})},z=()=>{document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,O()}},q=(P,W)=>{if(n.disabled||n.readonly)return;let X,oA,hA,wA,bA,cA;Q.value=!0,V();let mA=P.clientX,_=P.clientY;document.onmousemove=b=>{m.value=!0,W==="right"?(X=!0,oA=!1):W==="left"?(X=!0,hA=!0,bA=!0,oA=!1):W==="top"?(X=!1,oA=!0,wA=!0,cA=!0):W==="bottom"?(X=!1,oA=!0):W==="bottom-right"?(X=!0,oA=!0):W==="bottom-left"?(X=!0,oA=!0,hA=!0,bA=!0):W==="top-right"?(X=!0,oA=!0,wA=!0,cA=!0):W==="top-left"&&(X=!0,oA=!0,hA=!0,bA=!0,wA=!0,cA=!0);const x=b.clientX-mA,$=b.clientY-_;if(mA=b.clientX,_=b.clientY,X){let K=x*n.step;bA&&(K=-K),hA&&(g.value=Ce(g.value-K)),d.value=Ce(d.value+K)}if(oA){let K=$*n.step;cA&&(K=-K),wA&&(B.value=Ce(B.value-K)),h.value=Ce(h.value+K)}},z()},rA=()=>{v.value=!1,o("out",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)})},uA=()=>{n.disabled||n.readonly||(v.value=!0,o("over",{index:n.index,width:S(d.value),height:S(h.value),left:S(g.value),top:S(B.value)}))},FA=P=>{if(n.disabled||n.readonly)return;H.value=!0,V();let W=P.clientX,X=P.clientY;document.onmousemove=oA=>{const hA=oA.clientX-W,wA=oA.clientY-X;W=oA.clientX,X=oA.clientY,g.value=Ce(g.value+hA*n.step),B.value=Ce(B.value+wA*n.step)},z()};return(0,r.onMounted)(()=>{T()}),A({setActive:tA,setLeft:aA,setTop:I,setOverActive:F}),(P,W)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(["d-draggable",{"d-draggable--active":(H.value||v.value)&&!e.readonly&&!e.disabled},{"d-draggable--pt":e.isPt&&!e.readonly&&!e.disabled},{"d-draggable--move":m.value},{"d-draggable--click":e.disabled}]),onMousedown:(0,r.withModifiers)(FA,["stop"]),onMouseover:(0,r.withModifiers)(uA,["stop"]),onMouseout:(0,r.withModifiers)(rA,["stop"]),style:(0,r.normalizeStyle)(nA.value)},[(0,r.createElementVNode)("div",{class:"d-draggable__wrapper",ref_key:"wrapper",ref:a},[(H.value||v.value||m.value)&&!e.readonly&&!e.disabled?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...eA.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...U.value}),class:"d-draggable__line d-draggable__line--top"},null,4),e.isPt?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...eA.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...U.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...Y.value}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...k.value}),class:"d-draggable__line d-draggable__line--top"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...Y.value,transform:"none"}),class:"d-draggable__line d-draggable__line--left"},null,4),(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)({...R.value,...k.value,transform:"none"}),class:"d-draggable__line d-draggable__line--top"},null,4)],64)):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"d-draggable__line d-draggable__line--label",style:(0,r.normalizeStyle)(lA.value)},(0,r.toDisplayString)(g.value)+","+(0,r.toDisplayString)(B.value),5))],64)):(0,r.createCommentVNode)("",!0),!e.readonly&&!e.disabled?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(N.value,(X,oA)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:oA},[H.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:(0,r.normalizeClass)(["d-draggable__range",`d-draggable__range--${X.classname}`]),style:(0,r.normalizeStyle)([sA.value,J(X.classname)]),onMousedown:(0,r.withModifiers)(hA=>q(hA,X.classname),["stop"])},null,46,Pm)):(0,r.createCommentVNode)("",!0)],64))),128)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",{class:"d-draggable__item",ref_key:"item",ref:u},[(0,r.renderSlot)(P.$slots,"default")],512),!e.disabled&&e.mask?((0,r.openBlock)(),(0,r.createElementBlock)("div",Gm)):(0,r.createCommentVNode)("",!0)],512)],38))}}),Xm=zm,dl=ut(Xm),fl=e=>{const A=$m(e.components);return{formConfig:e.form,componentList:A}},gl=(e,A)=>{let t={},n=[];const o={},a=e;t=a.form;const u={};return a.components.forEach(d=>{const h=A[d.type];u[d.containerId]=u[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h?.dragType||"component",componentName:h?.componentName||"",runtimeType:h?.runtimeType,groupId:d.groupId,config:d.config,isInput:h?.isInput!==!1,containerId:d.containerId,level:d.level};h?.dragType==="container"&&(g.children=[]),o[g.id]=g,u[d.containerId].push(g)}),Object.keys(u).forEach(d=>{o[d]&&(o[d].children=u[d])}),n=u.form||[],{formConfig:t,componentList:n,componentDic:o}},Vr=(e,A)=>{const t={ver:"j1",form:{...e},components:[],db:{}};return hl(A||[],t.components),t},hl=(e,A)=>{e.forEach(t=>{if(t.type==="pkey")return;const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&hl(t.children||[],A),A.push(n)})},$m=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{rule:[]}};n.config&&Object.keys(n.config).forEach(a=>{if(a==="required"){n.config.required&&o.config?.rule?.push({required:!0,message:n.config.requiredMsg||"请输入"});return}if(a==="patterns"){n.config.patterns.forEach(u=>{u.reg&&u.msg&&o.config?.rule?.push({pattern:new RegExp(u.reg),message:`请输入${u.msg||""}`})});return}o.config[a]=n.config[a]}),n.type==="pkey"&&(o.config.isPkey=!0),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();u[h]||(u[h]=[]),delete d.slot,u[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=u[d._i]||[],g={label:d.label};d.active&&o.type==="j-collapse"&&(g.active=d.active);let B;if(o.type==="j-tabs"&&o.config?.tabKey&&o.config?.options.length>0){const m=o.config.options.find(v=>v.label===d._i);m&&(B=({formData:v})=>({display:m.value.includes(v[o.config?.tabKey||""])?m.display:!m.display}))}const w={config:g,children:h};return B&&(w.getCompConfig=B),w}),delete o.config.groups}else o.children=a}}),A.form},Bl=(e,A,t,n,o,a,u,d)=>{const h=(0,r.ref)(),g=(0,r.reactive)({}),B=(0,r.computed)(()=>{const F=[];return Object.keys(g).forEach(S=>{const V=g[S];V.dragType==="component"&&V.type!=="pkey"&&F.push(V)}),F}),w=(F=[],S)=>{const V=A?.value?.init;typeof V=="function"&&V(F,S)},m=F=>o?o(F,{componentDic:g,components:B.value,configData:h.value.config}):{},v=(F,S)=>{if(h.value?.id===F)return;const V=g[F]||S;if(V?h.value=V:F===t.id?h.value=t:h.value=null,h.value){const O=a[h.value.type];O?(w(O,h.value.config),m(h.value.type)):w([])}else w([]);S&&ne("dragClick",{id:S.id})},Q=()=>e.value.$el.getBoundingClientRect(),H=F=>F===t.id?t:g[F]||{},N=F=>{const S=[];if(F===t.id)S.push({id:F,name:t.name});else{const V=g[F];if(V){S.push({id:F,name:V.name});const O=N(V.containerId);S.push(...O)}}return S},L=(F,S)=>{const V=g[S];if(V===void 0)return!1;const O=V.containerId;return F===O?!0:O===t.id?!1:L(F,O)},R=F=>n?n(F)||{}:{},U=(F,S,V,O)=>{if(d){const z=H(F);return d(V.componentType,{container:z,groupId:S,configData:V},O)}return!1},k=({name:F,type:S,dragType:V,isInput:O,componentName:z,runtimeType:q},rA,uA,FA,P=!1)=>{const W=R(S);if(W.id=dt(),W.span=24,W.componentType=S,eA(rA,W.componentType))return;U(rA,FA,W,!0);const X={id:W.id,name:F,type:S,runtimeType:q,componentName:z||"",dragType:V||"component",containerId:rA,isInput:!!O,level:g[rA]?g[rA].level+1:1,config:W,isNewAdd:!P,groupId:FA};return X.dragType==="container"&&(X.children=[]),g[X.id]=X,H(rA).children?.splice(uA,0,X),X},eA=(F,S)=>!!(H(F).config.componentType==="gridtable"&&["divider","label","text","textEditor","viewTable","card","collapse","tabs","qrcode","barcode","tableLayout"].includes(S)),Y=(F,S,V=!1)=>{let O=null;const z=H(F).children,q=z?.findIndex(rA=>rA.id===S)||0;if(V&&z&&z.length>1){let rA=q+1;q>0&&(rA=q-1),O=z[rA]}return z?.splice(q,1),O?.id},sA=(F,S,V,O)=>{const z=H(S).children,q=F.containerId!==S;F.containerId=S,F.groupId=O,z?.splice(V,0,F),U(S,O,F.config,q)&&(aA(),v(F.id))},lA=F=>{let S="";const V=H(F);return V&&(V.children&&V.children.length>0&&V.children.forEach(O=>{lA(O.id)}),S=Y(V.containerId,F,!0)||"",delete g[F]),h.value&&h.value.id===F&&(h.value=null,A.value.init([])),S},nA=(F,S=[])=>{const V=H(F);if(V&&V.children&&V.children.length>0){const O=[];V.children.forEach(z=>{z.groupId&&S.includes(z.groupId)&&O.push(z.id)}),O.forEach(z=>{lA(z),delete g[z]})}},tA=(F,S)=>{const V=H(F);V&&(V.children&&V.children.length>0&&V.children.forEach(O=>{O.groupId===S&&lA(O.id)}),delete g[F])},AA=F=>{const S=pn(H(F));S.id=dt(),S.config.id=S.id,g[S.id]=S;const V=H(S.containerId).children,O=V?.findIndex(z=>z.id===F)||0;V?.splice(O+1,0,S)},T=()=>{t.children=[],bu(g),h.value&&(ne("dragClick",{id:""}),h.value=null,A.value.init([]))},aA=()=>{h.value&&(ne("dragClick",{id:""}),h.value=null,A.value.init([]))},I=F=>{const S=h.value,V=H(S.containerId).children,O=V?.findIndex(z=>z.id===S.id)||0;lA(S.id),(0,r.nextTick)(()=>{const z=u[F],q=R(F);q.id=S.id,q.span=S.config.span,q.componentType=F,q.table=S.config.table,q.field=S.config.field,S.config.isSubTable&&(q.isSubTable=S.config.isSubTable);const rA={id:q.id,name:z.name,type:F,runtimeType:z.runtimeType,componentName:z.componentName||"",dragType:S.dragType,groupId:S.groupId,containerId:S.containerId,isInput:S.isInput,level:S.level,config:q,isNewAdd:!0};g[rA.id]=rA,V?.splice(O,0,rA)})},J=F=>{ne("dragAddByClick",F)};return(0,r.provide)("d-drag-design-provide",{activedComponent:h,getDesignLocals:Q,getComponent:H,getParentComponents:N,isMyChildComponent:L,selectComponent:v,addComponent:k,deleteComponent:lA,copyComponent:AA,removeComponentFromContainer:Y,addComponentToContainer:sA,top:t,deleteChildren:tA,deleteChildrens:nA}),{activedComponent:h,clearComponents:T,changeComponent:I,schemaComponentDic:g,clearSelect:aA,addComponent:k,addComponentByTable:J,designComponentList:B}},Wm=(0,r.defineComponent)({props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){const{t:A}=(0,Ht.useAppInject)();return{labelWidth:(0,r.computed)(()=>e.componentData.config?.notShowLabel?"0px":e.componentData.config?.labelWidth===void 0&&e.globalConfig.labelWidth!==void 0?`${e.globalConfig.labelWidth}px`:e.componentData.config?.labelWidth?`${e.componentData.config?.labelWidth}px`:void 0),inputConfig:(0,r.computed)(()=>{const t={...e.componentData?.config};return e.globalConfig.size===void 0&&(t.size=e.globalConfig.size),t.display=!0,t}),t:A}}}),Ym=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t};function Jm(e,A,t,n,o,a){const u=(0,r.resolveComponent)("j-comp"),d=(0,r.resolveComponent)("el-form-item");return e.componentData.isInput?((0,r.openBlock)(),(0,r.createBlock)(d,{key:0,"label-width":e.labelWidth,label:e.t(e.componentData.config?.notShowLabel?"":e.componentData.config?.label||""),rules:e.componentData.config?.required?[{required:!0,message:""}]:[]},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(u,{type:e.componentData?.componentName||e.componentData?.type,config:e.inputConfig,modelValue:e.componentData?.config.defaultValue},null,8,["type","config","modelValue"])]),_:1},8,["label-width","label","rules"])):e.componentData?.children?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)({key:1},e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"])):((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.normalizeProps)((0,r.mergeProps)({key:2},e.componentData?.config)),null,16))}var pl=Ym(Wm,[["render",Jm]]),Zm={class:"d-form-design j-block"},jm={class:"d-form-design-left"},qm={class:"d-form-design-component-list"},Aw={class:"j-component-tool"},ew={class:"j-component-tool-name"},tw={class:"d-form-design-center"},nw={class:"d-form-design-container"},rw={key:0,class:"d-form-design-empty"},ow={class:"d-form-design-right"},iw={class:"d-form-design-panel-title"},sw={style:{margin:"0","font-size":"14px"}},aw={class:"d-form-design-panel"},lw=(0,r.defineComponent)({name:"DFormDesign",__name:"formDesign",props:{components:{default:()=>[]},componentConfigs:{default:()=>({})},componentInit:{type:Function,default:void 0},containerAddComponent:{type:Function,default:void 0},componentConfigInit:{type:Function,default:void 0},componentConfigChange:{type:Function,default:void 0},componentConfigValidate:{type:Function,default:void 0},flowComponents:{default:()=>[]},flowInit:{type:Function,default:void 0},flowComponentConfigInit:{type:Function,default:void 0},flowComponentConfigChange:{type:Function,default:void 0},flowComponentConfigs:{default:()=>({})},actions:{}},setup(e,{expose:A}){const t=e,{t:n,error:o}=(0,Ht.useAppInject)(),a=(0,r.reactive)({name:"表单",id:"form",type:"form",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}}),u=(0,r.ref)([]),d=t.components.length;for(let P=0;P<d;P++)u.value.push(P);t.componentInit&&(a.config=t.componentInit("form")||{});const h={},g=[];t.components.forEach(({children:P})=>{P.forEach(W=>{h[W.type]=W,W.dragType=W.dragType||"component",W.isInput!==!1&&(W.isInput=!0,g.push({label:W.name,value:W.type}))})});const B=P=>{P.forEach(W=>{W.type==="d-input-flow"&&(W.config=W.config||{},W.config.flowComponents=t.flowComponents,W.config.flowInit=t.flowInit,W.config.flowComponentConfigInit=X=>{t.flowComponentConfigInit&&(X.designComponents=eA.value,X.component=L.value,t.flowComponentConfigInit(X))},W.config.flowComponentConfigs=t.flowComponentConfigs,W.config.flowComponentConfigChange=t.flowComponentConfigChange),W.children&&B(W.children)})},w={};Object.keys(t.componentConfigs||{}).forEach(P=>{const{hasBase:W,isInput:X,hasTwoPlaceholder:oA,hasPlaceholder:hA,hasSpan:wA,hasLabel:bA,bindTable:cA,labelTitle:mA}=h[P]||{hasBase:!1},_=[{id:"componentType",type:"j-select",config:{label:"类型",allowClear:!1,display:X,options:g}},{id:"label",type:"j-input",config:{label:mA||"标题"},getCompConfig:({formData:x})=>({display:bA!==!1&&!x.notShowLabel})},{id:"notShowLabel",type:"j-switch",config:{label:"不显示"+(mA||"标题"),activeValue:!0,inactiveValue:!1},getCompConfig:({formData:x})=>({display:bA!==!1&&!x.isSubTable})},{id:"labelWidth",type:"j-number",config:{label:"标题宽度"},getCompConfig:({formData:x})=>({display:X&&!x.notShowLabel&&!x.isSubTable})},{id:"placeholder",type:"j-input",config:{display:X&&!oA&&hA!==!1,label:"占位提示"}},{id:"startPlaceholder",type:"j-input",config:{display:!!oA,label:"开始占位"}},{id:"endPlaceholder",type:"j-input",config:{display:!!oA,label:"结束占位"}},{id:"span",type:"j-slider",config:{label:"表单栅栏",min:6,max:24,showTooltip:!0,step:6,showStops:!0,defautValue:24},getCompConfig:({formData:x})=>({display:wA!==!1&&!x.isSubTable})},{id:"width",type:"j-number",config:{label:"单元格宽度",min:1},getCompConfig:({formData:x})=>({display:!!x.isSubTable})}],b={type:"j-collapse",config:{defaultValue:[]},children:[]};W!==!1&&b.children?.push({config:{label:"基础信息"},children:[..._]}),b.children?.push(...t.componentConfigs[P]),b.children?.forEach((x,$)=>{b.config?.defaultValue.push(`_collapse${$}`)}),B(b.children||[]),w[P]=[b]});const m=P=>{const{value:W}=P||{};P.id==="componentType"&&U(W),L.value&&t.componentConfigChange&&t.componentConfigChange(L.value.type,{configRef:N,configData:L.value.config,...P})},v=(P,W)=>{t.componentConfigInit&&t.componentConfigInit(P,{configRef:N,...W})},Q=(P,W,X)=>{let oA=!1;return W.container.type==="gridtable"?(!W.configData.isSubTable||X)&&(W.configData.isSubTable=!0,oA=!0):W.configData.isSubTable&&(oA=!0,W.configData.isSubTable=!1),t.containerAddComponent&&t.containerAddComponent(P,W),oA},H=(0,r.ref)(),N=(0,r.ref)(),{activedComponent:L,clearComponents:R,changeComponent:U,schemaComponentDic:k,designComponentList:eA}=Bl(H,N,a,t.componentInit,v,w,h,Q),Y=(0,r.computed)(()=>L.value?.id!="form"?L.value?`${L.value.name}-${L.value.id}`:"":L.value?`${L.value.name}`:"");(0,r.provide)("dui-design-provide",{designItemName:pl});const sA=()=>{R()},lA=()=>{t.componentInit&&(a.config=t.componentInit("form")||{}),R()},nA=()=>Vr(a.config,a.children||[]),tA=P=>{const W=gl(P,h);a.config=W.formConfig,a.children?.push(...W.componentList),Object.keys(W.componentDic).forEach(X=>{k[X]=W.componentDic[X]})},AA=()=>T(Vr(a.config,a.children||[]).components),T=P=>{for(const W of P)if(t.componentConfigValidate&&!t.componentConfigValidate(W.type,{configData:W.config,errorTip:o}))return!1;return!0},aA=(0,r.ref)(),I=(0,r.ref)(),J=(0,r.reactive)({width:0,height:0,formConfig:{}});let F=0;const S=P=>{if(I.value)F=0,I.value.init(P||[]);else{if(F>600){console.warn("表单组件加载超时");return}F++,setTimeout(()=>{S(P)},100)}},V=()=>{},O=()=>{};return A({getSchema:()=>nA(),setSchema:P=>tA(P),reset:()=>lA(),validate:()=>AA(),preview:()=>{const P=Vr(a.config,a.children||[]);J.width=P.form.width||800,J.height=P.form.height||600,aA.value.open("表单预览",P.form.layerType),(0,r.nextTick)(()=>{const{formConfig:W,componentList:X}=fl(P);J.formConfig=W,S(X)})},clear:sA}),(P,W)=>{const X=(0,r.resolveComponent)("j-icon"),oA=(0,r.resolveComponent)("d-drag-tool"),hA=(0,r.resolveComponent)("el-collapse-item"),wA=(0,r.resolveComponent)("el-collapse"),bA=(0,r.resolveComponent)("d-drag-form-list"),cA=(0,r.resolveComponent)("el-row"),mA=(0,r.resolveComponent)("d-drag-container"),_=(0,r.resolveComponent)("j-form"),b=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Zm,[(0,r.createElementVNode)("div",jm,[(0,r.createElementVNode)("div",qm,[(0,r.createVNode)(wA,{modelValue:u.value,"onUpdate:modelValue":W[0]||(W[0]=x=>u.value=x)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(x,$)=>((0,r.openBlock)(),(0,r.createBlock)(hA,{key:$,title:x.name,name:$},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(x.children,(K,BA)=>((0,r.openBlock)(),(0,r.createBlock)(oA,{key:BA,config:K},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",Aw,[(0,r.createVNode)(X,{class:"j-component-tool-icon",icon:K.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",ew,(0,r.toDisplayString)((0,r.unref)(n)(K.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",tw,[(0,r.createElementVNode)("div",nw,[(0,r.createVNode)(mA,{ref_key:"dragContainer",ref:H,class:"d-form-design-drag-container","is-component-container":!1,"component-data":a},{default:(0,r.withCtx)(()=>[!a.children||a.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",rw,[(0,r.createElementVNode)("div",null,(0,r.toDisplayString)((0,r.unref)(n)("请从左侧拖拽组件到此处")),1)])):((0,r.openBlock)(),(0,r.createBlock)(cA,{key:1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(bA,{"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"])]),_:1}))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",ow,[(0,r.createElementVNode)("div",iw,[(0,r.createElementVNode)("span",sw,(0,r.toDisplayString)(`${Y.value}`),1)]),(0,r.createElementVNode)("div",aw,[(0,r.createVNode)(_,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:N,onChange:m},null,512)])],512),[[r.vShow,(0,r.unref)(L)]]),(0,r.createVNode)(b,{ref_key:"previewFormLayerRef",ref:aA,width:J.width,height:J.height,onOk:V,onClosed:O},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(_,{config:J.formConfig,"is-preview":!0,ref_key:"previewFormRef",ref:I,actions:e.actions},null,8,["config","actions"])]),_:1},8,["width","height"])])}}}),cw=lw,ml=ut(cw,[pl]),wl=(e,A)=>{const t={ver:"V3",indexPage:{...e},components:[]};return Cl(A||[],t.components),t},Cl=(e,A)=>{e.forEach(t=>{const n={id:t.id,name:t.name,type:t.type,runtimeType:t.runtimeType||t.componentName||t.type,groupId:t.groupId||"",config:t.config,containerId:t.containerId,level:t.level};t.dragType==="container"&&Cl(t.children||[],A),A.push(n)})},uw=e=>{const A=dw(e.components);return{pageConfig:e.indexPage,componentList:A}},dw=e=>{const A={},t={};return e.forEach(n=>{A[n.containerId]=A[n.containerId]||[];const o={id:n.id,type:n.runtimeType,slot:n.groupId,config:{}};n.config&&Object.keys(n.config).forEach(a=>{o.config[a]=n.config[a]}),A[n.containerId].push(o),t[n.id]=o}),Object.keys(A).forEach(n=>{const o=t[n];if(o){const a=A[n];if(["j-tabs","j-collapse"].includes(o.type||"")&&o.config?.groups){const u={};a.forEach(d=>{if(d.slot!==void 0&&d.slot!==null){const h=d.slot.toString();u[h]||(u[h]=[]),delete d.slot,u[h].push(d)}}),o.children=o.config.groups.map(d=>{const h=u[d._i]||[];return{config:{label:d.label},children:h}}),delete o.config.groups}else o.children=a}}),A.indexPage||[]},fw=(e,A)=>{let t={},n=[];const o={};if(e.ver==="V3"){const a=e;t=a.indexPage;const u={};a.components.forEach(d=>{const h=A[d.type];if(!h)return;u[d.containerId]=u[d.containerId]||[];const g={id:d.id,name:d.name,type:d.type,dragType:h.dragType||"component",componentName:h.componentName||"",runtimeType:h.runtimeType,groupId:d.groupId,config:d.config,isInput:!1,containerId:d.containerId,level:d.level};o[g.id]=g,u[d.containerId].push(g),g.dragType==="container"&&(g.children=[])}),Object.keys(u).forEach(d=>{o[d]&&(o[d].children=u[d])}),n=u.indexPage||[]}return{pageConfig:t,componentList:n,componentDic:o}},gw=(0,r.defineComponent)({name:"DIndexDesignItem",__name:"indexDesignItem",props:{componentData:{type:Object,default:()=>({})},globalConfig:{type:Object,default:()=>({})}},setup(e){return(A,t)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(e.componentData?.componentName),(0,r.mergeProps)(e.componentData?.config,{"global-config":e.globalConfig,"component-data":e.componentData}),null,16,["global-config","component-data"]))}}),vl=gw,hw={class:"d-index-design j-block"},Bw={class:"d-index-design-left"},pw={class:"j-component-list"},mw={class:"j-component-tool"},ww={class:"j-component-tool-name"},Cw={class:"d-index-design-center"},vw={class:"design-toolbar"},yw={class:"design-container"},Qw={key:0,class:"j-block design-empty"},Ew={class:"d-index-design-right"},Uw={class:"d-index-design-panel-title"},Fw={style:{margin:"0","font-size":"14px"}},bw={class:"d-index-design-panel"},Hw=(0,r.defineComponent)({name:"DIndexDesign",__name:"indexDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,containerAddComponent:Function,componentConfigInit:Function,componentConfigChange:Function,flowComponents:{type:Array,default:()=>[]},flowInit:Function,flowComponentConfigInit:Function,flowComponentConfigChange:Function,flowComponentConfigs:{type:Object,default:()=>({})},actions:{type:Object,default:()=>({})}},setup(e,{expose:A}){const{t}=(0,Ht.useAppInject)(),n=e,o=F=>{F.forEach(S=>{S.type==="d-input-flow"&&(S.config=S.config||{},S.config.flowComponents=n.flowComponents,S.config.flowInit=n.flowInit,S.config.flowComponentConfigInit=V=>{n.flowComponentConfigInit&&(V.designComponents=N.value,V.component=v.value,n.flowComponentConfigInit(V))},S.config.flowComponentConfigs=n.flowComponentConfigs,S.config.flowComponentConfigChange=n.flowComponentConfigChange),S.children&&o(S.children)})},a=(0,r.reactive)({name:"页面",id:"indexPage",type:"indexPage",level:0,children:[],dragType:"container",componentName:"",containerId:"",isInput:!1,config:{}});n.componentInit&&(a.config=n.componentInit("indexPage")||{});const u={},d=[];n.components.forEach(({children:F})=>{F.forEach(S=>{u[S.type]=S,S.dragType=S.dragType||"component",d.push({label:S.name,value:S.type})})});const h={};Object.keys(n.componentConfigs).forEach(F=>{const{hasBase:S}=u[F]||{hasBase:!1},V=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],O={type:"j-collapse",config:{defaultValue:[]},children:[]};S!==!1&&(O.children?.push({config:{label:"基础信息"},children:[...V]}),O.config?.defaultValue.push("_collapse0")),O.children?.push(...n.componentConfigs[F]),o(O.children||[]),h[F]=[O]});const g=F=>{v.value&&n.componentConfigChange&&n.componentConfigChange(v.value.type,{configRef:m,configData:v.value.config,...F})},B=(F,S)=>{n.componentConfigInit&&n.componentConfigInit(F,{configRef:m,...S})},w=(0,r.ref)(),m=(0,r.ref)(),{activedComponent:v,clearComponents:Q,schemaComponentDic:H,designComponentList:N}=Bl(w,m,a,n.componentInit,B,h,u,n.containerAddComponent),L=(0,r.computed)(()=>v.value?`【${v.value.name}】`:""),R=(0,r.ref)([]),U=n.components.length;for(let F=0;F<U;F++)R.value.push(F);(0,r.provide)("dui-design-provide",{designItemName:vl});const k=()=>{Q()},eA=()=>{n.componentInit&&(a.config=n.componentInit("indexPage")||{}),Q()},Y=()=>(console.log("pValidate"),!0),sA=()=>wl(a.config,a.children||[]),lA=F=>{const S=fw(F,u);a.config=S.pageConfig,a.children?.push(...S.componentList),Object.keys(S.componentDic).forEach(V=>{H[V]=S.componentDic[V]})},nA=(0,r.ref)(),tA=(0,r.ref)();(0,r.ref)(""),(0,r.reactive)({formConfig:{}});let AA=0;const T=F=>{if(tA.value)AA=0,tA.value.init(F);else{if(AA>600){console.warn("组件加载超时");return}AA++,setTimeout(()=>{T(F)},100)}},aA=()=>{},I=()=>{},J=()=>{const{componentList:F}=uw(wl(a.config,a.children||[]));nA.value.open("页面预览","full"),(0,r.nextTick)(()=>{T(F)})};return A({reset:eA,validate:Y,getSchema:sA,setSchema:lA}),(F,S)=>{const V=(0,r.resolveComponent)("j-icon"),O=(0,r.resolveComponent)("d-drag-tool"),z=(0,r.resolveComponent)("el-collapse-item"),q=(0,r.resolveComponent)("el-collapse"),rA=(0,r.resolveComponent)("j-button"),uA=(0,r.resolveComponent)("el-tooltip"),FA=(0,r.resolveComponent)("el-divider"),P=(0,r.resolveComponent)("el-empty"),W=(0,r.resolveComponent)("d-drag-index-list"),X=(0,r.resolveComponent)("d-drag-container"),oA=(0,r.resolveComponent)("j-form"),hA=(0,r.resolveComponent)("j-page"),wA=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",hw,[(0,r.createElementVNode)("div",Bw,[S[1]||(S[1]=(0,r.createElementVNode)("div",{class:"d-index-design-panel-title"},"组件库",-1)),(0,r.createElementVNode)("div",pw,[(0,r.createVNode)(q,{modelValue:R.value,"onUpdate:modelValue":S[0]||(S[0]=bA=>R.value=bA)},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(bA,cA)=>((0,r.openBlock)(),(0,r.createBlock)(z,{key:cA,title:bA.name,name:cA},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(bA.children,(mA,_)=>((0,r.openBlock)(),(0,r.createBlock)(O,{key:_,config:mA},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",mw,[(0,r.createVNode)(V,{class:"j-component-tool-icon",icon:mA.icon,size:14},null,8,["icon"]),(0,r.createElementVNode)("div",ww,(0,r.toDisplayString)((0,r.unref)(t)(mA.name)),1)])]),_:2},1032,["config"]))),128))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])]),(0,r.createElementVNode)("div",Cw,[(0,r.createElementVNode)("div",vw,[S[2]||(S[2]=(0,r.createElementVNode)("div",null,null,-1)),(0,r.createElementVNode)("div",null,[(0,r.createVNode)(uA,{content:(0,r.unref)(t)("清空")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(rA,{danger:"",type:"text",onClick:k,icon:"mdi:delete-outline"})]),_:1},8,["content"]),(0,r.createVNode)(FA,{direction:"vertical"}),(0,r.createVNode)(uA,{content:(0,r.unref)(t)("预览")},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(rA,{type:"text",onClick:J,icon:"mdi:play-circle-outline"})]),_:1},8,["content"])])]),(0,r.createElementVNode)("div",yw,[(0,r.createVNode)(X,{ref_key:"dragContainer",ref:w,class:"design-drag-container","is-component-container":!1,"component-data":a},{default:(0,r.withCtx)(()=>[!a.children||a.children.length===0?((0,r.openBlock)(),(0,r.createElementBlock)("div",Qw,[(0,r.createVNode)(P,{description:(0,r.unref)(t)("请从左侧拖拽组件到此处"),"image-size":100},null,8,["description"])])):((0,r.openBlock)(),(0,r.createBlock)(W,{key:1,"component-list":a.children,"global-config":a.config},null,8,["component-list","global-config"]))]),_:1},8,["component-data"])])]),(0,r.withDirectives)((0,r.createElementVNode)("div",Ew,[(0,r.createElementVNode)("div",Uw,[(0,r.createElementVNode)("span",Fw,(0,r.toDisplayString)(`${(0,r.unref)(t)("属性配置")}${L.value}`),1)]),(0,r.createElementVNode)("div",bw,[(0,r.createVNode)(oA,{config:{labelPosition:"top",size:"small"},collapseAnimate:!1,style:{padding:"0"},ref_key:"configRef",ref:m,onChange:g},null,512)])],512),[[r.vShow,(0,r.unref)(v)&&h[(0,r.unref)(v).type]]]),(0,r.createVNode)(wA,{ref_key:"previewLayerRef",ref:nA,"has-btns":!1,onOk:aA,onClosed:I},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(hA,{ref_key:"previewRef",ref:tA,actions:e.actions},null,8,["actions"])]),_:1},512)])}}}),Iw=Hw,yl=ut(Iw,[vl]),qA=Uu({Vue:()=>r,Vue2:()=>{},del:()=>xw,install:()=>_w,isVue2:()=>!1,isVue3:()=>!0,set:()=>Sw});Fu(qA,require("vue"));var wE=!1,CE=!0,vE=void 0;function _w(){}function Sw(e,A,t){return Array.isArray(e)?(e.length=Math.max(e.length,A),e.splice(A,1,t),t):(e[A]=t,t)}function xw(e,A){if(Array.isArray(e)){e.splice(A,1);return}delete e[A]}var Pr=(e,A)=>{const t=e.__vccOpts||e;for(const[n,o]of A)t[n]=o;return t},Dw=(0,qA.defineComponent)({name:"LineRuler",props:{scale:Number,thick:Number,palette:Object,index:Number,start:Number,vertical:Boolean,value:Number,isShowReferLine:Boolean},emits:["onMouseDown","onRelease","onRemove"],setup(e,{emit:A}){const t=(0,qA.ref)(0),n=(0,qA.ref)(!0);(0,qA.onMounted)(()=>{t.value=e.value});const o=B=>{n.value=B>=0},a=(0,qA.computed)(()=>{const B=(t.value-e.start)*e.scale;o(B);const w=B+"px";return e.vertical?{top:w}:{left:w}}),u=(0,qA.computed)(()=>{var B;const w=`1px solid ${(B=e.palette)==null?void 0:B.lineColor}`,m=e.vertical?{borderTop:w}:{borderLeft:w};return{cursor:e.isShowReferLine?e.vertical?"ns-resize":"ew-resize":"none",...m}}),d=(0,qA.computed)(()=>e.vertical?{left:e.thick+"px"}:{top:e.thick+"px"});return{startValue:t,showLine:n,offset:a,borderCursor:u,actionStyle:d,handleDown:B=>{const w=e.vertical?B.clientY:B.clientX,m=t.value;A("onMouseDown");const v=H=>{const N=e.vertical?H.clientY:H.clientX;t.value=Math.round(m+(N-w)/e.scale)},Q=()=>{A("onRelease",t.value,e.index),document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",Q)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",Q)},handleRemove:()=>{A("onRemove",e.index)}}}}),Nw={class:"value"};function Lw(e,A,t,n,o,a){return(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"line",style:(0,r.normalizeStyle)([e.offset,e.borderCursor]),onMousedown:A[1]||(A[1]=(...u)=>e.handleDown&&e.handleDown(...u))},[(0,r.createElementVNode)("div",{class:"action",style:(0,r.normalizeStyle)(e.actionStyle)},[(0,r.createElementVNode)("span",{class:"del",onClick:A[0]||(A[0]=(...u)=>e.handleRemove&&e.handleRemove(...u))},"×"),(0,r.createElementVNode)("span",Nw,(0,r.toDisplayString)(e.startValue),1)],4)],36)),[[r.vShow,e.showLine]])}var Tw=Pr(Dw,[["render",Lw],["__scopeId","data-v-074b3d94"]]),kw=e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1,Ql=.83,Mw=(e,A,t,n,o,a)=>{const{scale:u,width:d,height:h,ratio:g,palette:B}=o,{bgColor:w,fontColor:m,shadowColor:v,longfgColor:Q,shortfgColor:H}=B;if(e.scale(g,g),e.clearRect(0,0,d,h),e.fillStyle=w,e.fillRect(0,0,d,h),n){const nA=(t-A)*u,tA=n*u;e.fillStyle=v,a?e.fillRect(nA,0,tA,h*3/8):e.fillRect(0,nA,d*3/8,tA)}const N=kw(u),L=N*u,R=N*10,U=R*u,k=Math.floor(A/N)*N,eA=Math.floor(A/R)*R,Y=(k-A)/N*L,sA=(eA-A)/R*U,lA=A+Math.ceil((a?d:h)/u);e.beginPath(),e.fillStyle=m,e.strokeStyle=Q;for(let nA=eA,tA=0;nA<lA;nA+=R,tA++){const AA=sA+tA*U+.5;a?e.moveTo(AA,0):e.moveTo(0,AA),e.save(),a?e.translate(AA,h*.4):e.translate(d*.4,AA),a||e.rotate(-Math.PI/2),e.scale(Ql/g,Ql/g),e.fillText(nA.toString(),4*g,7*g),e.restore(),a?e.lineTo(AA,h*9/16):e.lineTo(d*9/16,AA)}e.stroke(),e.closePath(),e.beginPath(),e.strokeStyle=H;for(let nA=k,tA=0;nA<lA;nA+=N,tA++){const AA=Y+tA*L+.5;a?e.moveTo(AA,0):e.moveTo(0,AA),nA%R!==0&&(a?e.lineTo(AA,h*1/4):e.lineTo(d*1/4,AA))}e.stroke(),e.closePath(),e.setTransform(1,0,0,1,0,0)},Kw=(0,qA.defineComponent)({name:"CanvasRuler",props:{showIndicator:Boolean,valueNum:Number,scale:Number,ratio:Number,palette:Object,vertical:Boolean,start:Number,width:Number,height:Number,selectStart:Number,selectLength:Number},emits:["onAddLine","update:showIndicator","update:valueNum"],setup(e,{emit:A}){const t=(0,qA.reactive)({canvasContext:null});let n=1;const o=(0,qA.ref)(null);(0,qA.onMounted)(()=>{n=e.ratio||window.devicePixelRatio||1,a(),u(n),d(n)});const a=()=>{t.canvasContext=o.value&&o.value.getContext("2d")},u=g=>{if(o.value){o.value.width=e.width*g,o.value.height=e.height*g;const B=t.canvasContext;B&&(B.font=`${12*g}px -apple-system,
29
29
  "Helvetica Neue", ".SFNSText-Regular",
30
30
  "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB",
31
- "Microsoft YaHei", "WenQuanYi Zen Hei", sans-serif`,B.lineWidth=1,B.textBaseline="middle")}},d=g=>{const B={scale:e.scale,width:e.width,height:e.height,palette:e.palette,ratio:g};t.canvasContext&&Mw(t.canvasContext,e.start,e.selectStart,e.selectLength,B,!e.vertical)};return(0,qA.watch)(()=>e.start,()=>d(n)),(0,qA.watch)([()=>e.width,()=>e.height],()=>{u(n),d(n)}),{handle:(g,B)=>{const m=((v,Q,H)=>Math.round(Q+v/H))(e.vertical?g.offsetY:g.offsetX,e.start,e.scale);switch(B){case"click":A("onAddLine",m);break;case"enter":A("update:valueNum",m),A("update:showIndicator",!0);break;default:A("update:valueNum",m);break}},canvas:o}}});function Ow(e,A,t,n,o,a){return(0,r.openBlock)(),(0,r.createElementBlock)("canvas",{ref:"canvas",class:"ruler",onClick:A[0]||(A[0]=u=>e.handle(u,"click")),onMouseenter:A[1]||(A[1]=u=>e.handle(u,"enter")),onMousemove:A[2]||(A[2]=u=>e.handle(u,"move")),onMouseleave:A[3]||(A[3]=u=>e.$emit("update:showIndicator",!1))},null,544)}var Rw=(0,qA.defineComponent)({name:"RulerWrapper",components:{CanvasRuler:Pr(Kw,[["render",Ow]]),RulerLine:Tw},props:{scale:Number,ratio:Number,thick:Number,palette:Object,vertical:{type:Boolean,default:!0},width:{type:Number,default:200},height:{type:Number,default:200},start:{type:Number,default:0},lines:{type:Array,default:()=>[]},selectStart:{type:Number},selectLength:{type:Number},isShowReferLine:{type:Boolean}},setup(e){const A=(0,qA.ref)(!1),t=(0,qA.ref)(0),n=(0,qA.computed)(()=>e.vertical?"v-container":"h-container"),o=(0,qA.computed)(()=>{const g={width:`calc(100% - ${e.thick}px)`,height:`${e.thick+1}px`,left:`${e.thick}px`},B={width:`${e.thick&&e.thick+1}px`,height:`calc(100% - ${e.thick}px)`,top:`${e.thick}px`};return e.vertical?B:g}),a=(0,qA.computed)(()=>{var g;const B=(t.value-e.start)*e.scale;let w="top",m="borderLeft";return w=e.vertical?"top":"left",m=e.vertical?"borderBottom":"borderLeft",{[w]:B+"px",[m]:`1px solid ${(g=e.palette)==null?void 0:g.lineColor}`}}),u=g=>{e.lines.push(g)},d=(g,B)=>{const w=g-e.start,m=(e.vertical?e.height:e.width)/e.scale;w<0||w>m?h(B):e.lines[B]=g},h=g=>{e.lines.splice(g,1)};return{showIndicator:A,valueNum:t,rwClassName:n,rwStyle:o,indicatorStyle:a,handleNewLine:u,handleLineRelease:d,handleLineRemove:h}}}),Vw={class:"lines"},Pw={class:"value"};function Gw(e,A,t,n,o,a){const u=(0,r.resolveComponent)("CanvasRuler"),d=(0,r.resolveComponent)("RulerLine");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(e.rwClassName),style:(0,r.normalizeStyle)(e.rwStyle)},[(0,r.createVNode)(u,{vertical:e.vertical,scale:e.scale,width:e.width,height:e.height,start:e.start,ratio:e.ratio,"select-start":e.selectStart,"select-length":e.selectLength,palette:e.palette,valueNum:e.valueNum,"onUpdate:valueNum":A[0]||(A[0]=h=>e.valueNum=h),showIndicator:e.showIndicator,"onUpdate:showIndicator":A[1]||(A[1]=h=>e.showIndicator=h),onOnAddLine:e.handleNewLine},null,8,["vertical","scale","width","height","start","ratio","select-start","select-length","palette","valueNum","showIndicator","onOnAddLine"]),(0,r.withDirectives)((0,r.createElementVNode)("div",Vw,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.lines,(h,g)=>((0,r.openBlock)(),(0,r.createBlock)(d,{key:h+g,index:g,value:h>>0,scale:e.scale,start:e.start,thick:e.thick,palette:e.palette,vertical:e.vertical,"is-show-refer-line":e.isShowReferLine,onOnRemove:e.handleLineRemove,onOnRelease:e.handleLineRelease},null,8,["index","value","scale","start","thick","palette","vertical","is-show-refer-line","onOnRemove","onOnRelease"]))),128))],512),[[r.vShow,e.isShowReferLine]]),(0,r.withDirectives)((0,r.createElementVNode)("div",{class:"indicator",style:(0,r.normalizeStyle)(e.indicatorStyle)},[(0,r.createElementVNode)("div",Pw,(0,r.toDisplayString)(e.valueNum),1)],4),[[r.vShow,e.showIndicator]])],6)}var zw=Pr(Rw,[["render",Gw],["__scopeId","data-v-5cc064d4"]]),Xw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAopJREFUOE/FlE9IVEEcx7+/N9ouds1Mu0QUSFZYdIgoUqQoKPBQHsKozpXE7jbTO/U8xLJvn6usBHWQ6hBFXupSkQeVbh0KJEPp0sH+eLGTsKs77xcj78m0ax0E8cHjzZv5zef3/c33xxA24KENYGJzoEEQbNNaN4Zh2OQ4znwYhr9c1/39vwrXVDo0NNS0tLR0GYB5D64BmAMwzMyvlFKz1es10Hw+f4mZ7wHYBeA9gNdENFepVOaEEM3M3OI4Thczn41gt6WUgQ3+C+r7/h0AWQD3mXnYqPA8L9nQ0HCemduIaFpKOWoAhUJhT6VSuQXgOjP3K6W8GLwKzeVyp4jonR0QBEErM48w8zFLyayUsjX+z+VyHhHdZebTSqkxM78CHRgYOKS1/ghgVErZY214RkQ7ADyRUj72ff8qgCtmXUrZGcf5vv8CwEUhxOF0Ov1pBRpla5dSdseBhUJhpznH6tIsZb1KqacW+BGArUaUXX63UuplHJTNZjuEEONSyhozfd/n6mQ1RkXZL2itz7mu+80EDA4ONi8vL/8AcM2UbikyR2BU9cSmmTU70YqKIAj2hWFo2uenlHK/BRg3Y2aeNO5GyU8S0ZbFxcUuz/NKEXAGQKPjOCcymcyX1dIi8DSAiWQyeaavr68cbSgCuBknYubnQoj+TCYzUywWE6VS6S2ADsdx2gxw1X3L7SNENMbMnwE8qK+vf5NKpRaMaeVyeW8ikfiaSqW+R7BuZr5BRMe11p2u607U9Gk8kc/ntzPzQwCmExYATDLzVBiGE0KIowAOADDf3QA+aK2VDaxRajto3K+rq+tl5nYAzQBamHmeiOYBTGmtR6ph/1Rqg9c73pz7dD1qN0TpHyNQRCUDJXrAAAAAAElFTkSuQmCC",$w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAjtJREFUOE/NlD9oFEEUxn9v9ghC0hpRUogIAUmniGAT/5Q2FrETPSNRJILg7RwimI0ox85eQFCEBGIUO1PYpFM0jSConQoBEZGgGPsgl+w+2eM2bC57SopAFqYZ3v7m+977ZoQt+GQLmGxPaBiGgYiMWWvXBHZUGoZhH3BERPYC+4F+4Keq/urt7b1RLpf/ZEBVHa9Wq0HWyg3QKIoGVPU8cA7wgK/pUtXPQJ8xZk+pVBpuNBqXUoUiEvi+P56fzTpo6+SbwHNg1lo7WzTITGEKXFlZeeB53tVCpa3CK8AFa+1cBgvD8LKIXAQOJkkyICJDeYVBEJS6u7s/qeoLa+1o+l9TqXNuBLhmjDlbqVQ+5ICjInIfOBPH8W9jzGCR5YmJiRNxHM+papgqzqDvgSlr7VTernPuO3An3c9bBt74vv+yrdaKyLDv+/1Sq9UGPc97nY9EVuycU2AQOA7cAm4Dr4D5TvVxHB9rKo2iaEFVp621Ln96FEUngaOqGmSxabVqsh3a2h+x1h5qQjNrae/yE4+iaCwDJkky73neTuBZe129Xk+H+BS4l7ZqLVIZ2BhzuFKpvMsDVXXWGPMxFdAedOfcKeCRqj7MYrUhpz09PfXl5eXrectFWXXODQHpOq2qd/95o/JXr6ura3J1dXU6SZIfwKKIHAD2tVYMPBGRx77vN10UXtO85fTkmZmZHUtLSzUR2QXsBhaAL6r6DXhbrVYXi1yss59GqOgub/bN3Z7v6X/tb9Zmp/q/kN8s+lJb8oEAAAAASUVORK5CYII=",Ww=(0,qA.defineComponent)({name:"SketchRule",components:{RulerWrapper:zw},props:{eyeIcon:{type:String},closeEyeIcon:{type:String},scale:{type:Number,default:1},ratio:{type:Number},thick:{type:Number,default:16},palette:Object,startX:{type:Number},startY:{type:Number,default:0},width:{type:Number,default:200},height:{type:Number,default:200},shadow:{type:Object,default:()=>({x:0,y:0,width:0,height:0})},lines:{type:Object,default:()=>({h:[],v:[]})},isShowReferLine:{type:Boolean,default:!0}},emits:["onCornerClick","handleLine"],setup(e,{emit:A}){let t=(0,qA.ref)(!0);t.value=e.isShowReferLine;const n=(0,qA.computed)(()=>{function u(d,h){return Object.keys(d).forEach(g=>{g&&d.hasOwnProperty(g)&&(typeof h.key=="object"?d[g]=u(d[g],h[g]):h.hasOwnProperty(g)&&(d[g]=h[g]))}),d}return u({bgColor:"rgba(225,225,225, 0)",longfgColor:"#BABBBC",shortfgColor:"#C8CDD0",fontColor:"#7D8694",shadowColor:"#E8E8E8",lineColor:"#EB5648",borderColor:"#DADADC",cornerActiveColor:"rgb(235, 86, 72, 0.6)",menu:{bgColor:"#fff",dividerColor:"#DBDBDB",listItem:{textColor:"#415058",hoverTextColor:"#298DF8",disabledTextColor:"rgba(65, 80, 88, 0.4)",bgColor:"#fff",hoverBgColor:"#F2F2F2"}}},e.palette||{})}),o=(0,qA.computed)(()=>({backgroundImage:t.value?`url(${e.eyeIcon||Xw})`:`url(${e.closeEyeIcon||$w})`,width:e.thick+"px",height:e.thick+"px",borderRight:`1px solid ${n.value.borderColor}`,borderBottom:`1px solid ${n.value.borderColor}`})),a=u=>{t.value=!t.value,A("handleCornerClick",t.value)};return(0,qA.watch)([()=>e.isShowReferLine],()=>{t.value=e.isShowReferLine}),{showReferLine:t,paletteCpu:n,cornerStyle:o,onCornerClick:a}}}),Yw={id:"mb-ruler",class:"style-ruler mb-ruler"};function Jw(e,A,t,n,o,a){const u=(0,r.resolveComponent)("RulerWrapper");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Yw,[(0,r.createVNode)(u,{vertical:!1,width:e.width,height:e.thick,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startX,lines:e.lines.h,"select-start":e.shadow.x,"select-length":e.shadow.width,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,r.createVNode)(u,{vertical:!0,width:e.thick,height:e.height,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startY,lines:e.lines.v,"select-start":e.shadow.y,"select-length":e.shadow.height,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,r.createElementVNode)("a",{class:"corner",style:(0,r.normalizeStyle)(e.cornerStyle),onClick:A[0]||(A[0]=(...d)=>e.onCornerClick&&e.onCornerClick(...d))},null,4)])}var Zw=Pr(Ww,[["render",Jw]]),jw=Eu(((e,A)=>{(function(t,n){typeof e=="object"&&typeof A<"u"?A.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.html2canvas=n())})(e,(function(){"use strict";var t=function(s,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f])},t(s,i)};function n(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(s,i);function c(){this.constructor=s}s.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}var o=function(){return o=Object.assign||function(i){for(var c,l=1,f=arguments.length;l<f;l++){c=arguments[l];for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(i[p]=c[p])}return i},o.apply(this,arguments)};function a(s,i,c,l){function f(p){return p instanceof c?p:new c(function(C){C(p)})}return new(c||(c=Promise))(function(p,C){function y(O){try{x(l.next(O))}catch(G){C(G)}}function E(O){try{x(l.throw(O))}catch(G){C(G)}}function x(O){O.done?p(O.value):f(O.value).then(y,E)}x((l=l.apply(s,i||[])).next())})}function u(s,i){var c={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},l,f,p,C;return C={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function y(x){return function(O){return E([x,O])}}function E(x){if(l)throw new TypeError("Generator is already executing.");for(;c;)try{if(l=1,f&&(p=x[0]&2?f.return:x[0]?f.throw||((p=f.return)&&p.call(f),0):f.next)&&!(p=p.call(f,x[1])).done)return p;switch(f=0,p&&(x=[x[0]&2,p.value]),x[0]){case 0:case 1:p=x;break;case 4:return c.label++,{value:x[1],done:!1};case 5:c.label++,f=x[1],x=[0];continue;case 7:x=c.ops.pop(),c.trys.pop();continue;default:if(p=c.trys,!(p=p.length>0&&p[p.length-1])&&(x[0]===6||x[0]===2)){c=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]<p[3])){c.label=x[1];break}if(x[0]===6&&c.label<p[1]){c.label=p[1],p=x;break}if(p&&c.label<p[2]){c.label=p[2],c.ops.push(x);break}p[2]&&c.ops.pop(),c.trys.pop();continue}x=i.call(s,c)}catch(O){x=[6,O],f=0}finally{l=p=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}}function d(s,i,c){if(c||arguments.length===2)for(var l=0,f=i.length,p;l<f;l++)(p||!(l in i))&&(p||(p=Array.prototype.slice.call(i,0,l)),p[l]=i[l]);return s.concat(p||i)}for(var h=(function(){function s(i,c,l,f){this.left=i,this.top=c,this.width=l,this.height=f}return s.prototype.add=function(i,c,l,f){return new s(this.left+i,this.top+c,this.width+l,this.height+f)},s.fromClientRect=function(i,c){return new s(c.left+i.windowBounds.left,c.top+i.windowBounds.top,c.width,c.height)},s.fromDOMRectList=function(i,c){var l=Array.from(c).find(function(f){return f.width!==0});return l?new s(l.left+i.windowBounds.left,l.top+i.windowBounds.top,l.width,l.height):s.EMPTY},s.EMPTY=new s(0,0,0,0),s})(),g=function(s,i){return h.fromClientRect(s,i.getBoundingClientRect())},B=function(s){var i=s.body,c=s.documentElement;if(!i||!c)throw new Error("Unable to get document size");return new h(0,0,Math.max(Math.max(i.scrollWidth,c.scrollWidth),Math.max(i.offsetWidth,c.offsetWidth),Math.max(i.clientWidth,c.clientWidth)),Math.max(Math.max(i.scrollHeight,c.scrollHeight),Math.max(i.offsetHeight,c.offsetHeight),Math.max(i.clientHeight,c.clientHeight)))},w=function(s){for(var i=[],c=0,l=s.length;c<l;){var f=s.charCodeAt(c++);if(f>=55296&&f<=56319&&c<l){var p=s.charCodeAt(c++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),c--)}else i.push(f)}return i},m=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var c=s.length;if(!c)return"";for(var l=[],f=-1,p="";++f<c;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===c||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q=typeof Uint8Array>"u"?[]:new Uint8Array(256),H=0;H<v.length;H++)Q[v.charCodeAt(H)]=H;for(var N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=typeof Uint8Array>"u"?[]:new Uint8Array(256),M=0;M<N.length;M++)T[N.charCodeAt(M)]=M;for(var U=function(s){var i=s.length*.75,c=s.length,l,f=0,p,C,y,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var x=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),O=Array.isArray(x)?x:new Uint8Array(x);for(l=0;l<c;l+=4)p=T[s.charCodeAt(l)],C=T[s.charCodeAt(l+1)],y=T[s.charCodeAt(l+2)],E=T[s.charCodeAt(l+3)],O[f++]=p<<2|C>>4,O[f++]=(C&15)<<4|y>>2,O[f++]=(y&3)<<6|E&63;return x},K=function(s){for(var i=s.length,c=[],l=0;l<i;l+=2)c.push(s[l+1]<<8|s[l]);return c},eA=function(s){for(var i=s.length,c=[],l=0;l<i;l+=4)c.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return c},W=5,iA=11,lA=2,nA=iA-W,tA=65536>>W,q=(1<<W)-1,k=tA+(1024>>W)+32,sA=65536>>iA,I=(1<<nA)-1,Y=function(s,i,c){return s.slice?s.slice(i,c):new Uint16Array(Array.prototype.slice.call(s,i,c))},F=function(s,i,c){return s.slice?s.slice(i,c):new Uint32Array(Array.prototype.slice.call(s,i,c))},S=function(s,i){var c=U(s),l=Array.isArray(c)?eA(c):new Uint32Array(c),f=Array.isArray(c)?K(c):new Uint16Array(c),p=24,C=Y(f,p/2,l[4]/2),y=l[5]===2?Y(f,(p+l[4])/2):F(l,Math.ceil((p+l[4])/4));return new P(l[0],l[1],l[2],l[3],C,y)},P=(function(){function s(i,c,l,f,p,C){this.initialValue=i,this.errorValue=c,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var c;if(i>=0){if(i<55296||i>56319&&i<=65535)return c=this.index[i>>W],c=(c<<lA)+(i&q),this.data[c];if(i<=65535)return c=this.index[tA+(i-55296>>W)],c=(c<<lA)+(i&q),this.data[c];if(i<this.highStart)return c=k-sA+(i>>iA),c=this.index[c],c+=i>>W&I,c=this.index[c],c=(c<<lA)+(i&q),this.data[c];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z=typeof Uint8Array>"u"?[]:new Uint8Array(256),J=0;J<R.length;J++)z[R.charCodeAt(J)]=J;var rA="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZ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AcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCE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CCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgow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HLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11AN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KwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUA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HgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACU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eAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACs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UAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAl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QAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",dA=50,bA=1,AA=2,cA=3,V=4,$=5,uA=7,BA=8,HA=9,aA=10,wA=11,_=12,b=13,D=14,X=15,L=16,pA=17,fA=18,FA=19,CA=20,LA=21,KA=22,XA=23,ue=24,re=25,nt=26,pt=27,ze=28,Hl=29,oA=30,hA=31,xA=32,kA=33,rt=34,Mn=35,Tt=36,kt=37,Kn=38,tn=39,VA=40,Me=41,ot=42,b0=43,H0=[9001,65288],Il="!",RA="×",Gr="÷",Ci=S(rA),it=[oA,Tt],vi=[bA,AA,cA,$],_l=[aA,BA],Sl=[pt,nt],I0=vi.concat(_l),xl=[Kn,tn,VA,rt,Mn],_0=[X,b],S0=function(s,i){i===void 0&&(i="strict");var c=[],l=[],f=[];return s.forEach(function(p,C){var y=Ci.get(p);if(y>dA?(f.push(!0),y-=dA):f.push(!1),["normal","auto","loose"].indexOf(i)!==-1&&[8208,8211,12316,12448].indexOf(p)!==-1)return l.push(C),c.push(L);if(y===V||y===wA){if(C===0)return l.push(C),c.push(oA);var E=c[C-1];return I0.indexOf(E)===-1?(l.push(l[C-1]),c.push(E)):(l.push(C),c.push(oA))}if(l.push(C),y===hA)return c.push(i==="strict"?LA:kt);if(y===ot||y===Hl)return c.push(oA);if(y===b0)return p>=131072&&p<=196605||p>=196608&&p<=262141?c.push(kt):c.push(oA);c.push(y)}),[l,c,f]},yi=function(s,i,c,l){var f=l[c];if(Array.isArray(s)?s.indexOf(f)!==-1:s===f)for(var p=c;p<=l.length;){p++;var C=l[p];if(C===i)return!0;if(C!==aA)break}if(f===aA)for(var p=c;p>0;){p--;var y=l[p];if(Array.isArray(s)?s.indexOf(y)!==-1:s===y)for(var E=c;E<=l.length;){E++;var C=l[E];if(C===i)return!0;if(C!==aA)break}if(y!==aA)break}return!1},Dl=function(s,i){for(var c=s;c>=0;){var l=i[c];if(l===aA)c--;else return l}return 0},x0=function(s,i,c,l,f){if(c[l]===0)return RA;var p=l-1;if(Array.isArray(f)&&f[p]===!0)return RA;var C=p-1,y=p+1,E=i[p],x=C>=0?i[C]:0,O=i[y];if(E===AA&&O===cA)return RA;if(vi.indexOf(E)!==-1)return Il;if(vi.indexOf(O)!==-1||_l.indexOf(O)!==-1)return RA;if(Dl(p,i)===BA)return Gr;if(Ci.get(s[p])===wA||(E===xA||E===kA)&&Ci.get(s[y])===wA||E===uA||O===uA||E===HA||[aA,b,X].indexOf(E)===-1&&O===HA||[pA,fA,FA,ue,ze].indexOf(O)!==-1||Dl(p,i)===KA||yi(XA,KA,p,i)||yi([pA,fA],LA,p,i)||yi(_,_,p,i))return RA;if(E===aA)return Gr;if(E===XA||O===XA)return RA;if(O===L||E===L)return Gr;if([b,X,LA].indexOf(O)!==-1||E===D||x===Tt&&_0.indexOf(E)!==-1||E===ze&&O===Tt||O===CA||it.indexOf(O)!==-1&&E===re||it.indexOf(E)!==-1&&O===re||E===pt&&[kt,xA,kA].indexOf(O)!==-1||[kt,xA,kA].indexOf(E)!==-1&&O===nt||it.indexOf(E)!==-1&&Sl.indexOf(O)!==-1||Sl.indexOf(E)!==-1&&it.indexOf(O)!==-1||[pt,nt].indexOf(E)!==-1&&(O===re||[KA,X].indexOf(O)!==-1&&i[y+1]===re)||[KA,X].indexOf(E)!==-1&&O===re||E===re&&[re,ze,ue].indexOf(O)!==-1)return RA;if([re,ze,ue,pA,fA].indexOf(O)!==-1)for(var G=p;G>=0;){var Z=i[G];if(Z===re)return RA;if([ze,ue].indexOf(Z)!==-1)G--;else break}if([pt,nt].indexOf(O)!==-1)for(var G=[pA,fA].indexOf(E)!==-1?C:p;G>=0;){var Z=i[G];if(Z===re)return RA;if([ze,ue].indexOf(Z)!==-1)G--;else break}if(Kn===E&&[Kn,tn,rt,Mn].indexOf(O)!==-1||[tn,rt].indexOf(E)!==-1&&[tn,VA].indexOf(O)!==-1||[VA,Mn].indexOf(E)!==-1&&O===VA||xl.indexOf(E)!==-1&&[CA,nt].indexOf(O)!==-1||xl.indexOf(O)!==-1&&E===pt||it.indexOf(E)!==-1&&it.indexOf(O)!==-1||E===ue&&it.indexOf(O)!==-1||it.concat(re).indexOf(E)!==-1&&O===KA&&H0.indexOf(s[y])===-1||it.concat(re).indexOf(O)!==-1&&E===fA)return RA;if(E===Me&&O===Me){for(var vA=c[p],gA=1;vA>0&&(vA--,i[vA]===Me);)gA++;if(gA%2!==0)return RA}return E===xA&&O===kA?RA:Gr},D0=function(s,i){i||(i={lineBreak:"normal",wordBreak:"normal"});var c=S0(s,i.lineBreak),l=c[0],f=c[1],p=c[2];(i.wordBreak==="break-all"||i.wordBreak==="break-word")&&(f=f.map(function(y){return[re,oA,ot].indexOf(y)!==-1?kt:y}));var C=i.wordBreak==="keep-all"?p.map(function(y,E){return y&&s[E]>=19968&&s[E]<=40959}):void 0;return[l,f,C]},N0=(function(){function s(i,c,l,f){this.codePoints=i,this.required=c===Il,this.start=l,this.end=f}return s.prototype.slice=function(){return m.apply(void 0,this.codePoints.slice(this.start,this.end))},s})(),L0=function(s,i){var c=w(s),l=D0(c,i),f=l[0],p=l[1],C=l[2],y=c.length,E=0,x=0;return{next:function(){if(x>=y)return{done:!0,value:null};for(var O=RA;x<y&&(O=x0(c,p,f,++x,C))===RA;);if(O!==RA||x===y){var G=new N0(c,O,E,x);return E=x,{value:G,done:!1}}return{done:!0,value:null}}}},T0=1,k0=2,On=4,Nl=8,zr=10,Ll=47,Rn=92,M0=9,K0=32,Xr=34,Vn=61,O0=35,R0=36,V0=37,$r=39,Wr=40,Pn=41,P0=95,ve=45,G0=33,z0=60,X0=62,$0=64,W0=91,Y0=93,J0=61,Z0=123,Yr=63,j0=125,Tl=124,q0=126,AC=128,kl=65533,Qi=42,Mt=43,eC=44,tC=58,nC=59,Gn=46,rC=0,oC=8,iC=11,sC=14,aC=31,lC=127,Xe=-1,Ml=48,Kl=97,Ol=101,cC=102,uC=117,dC=122,Rl=65,Vl=69,Pl=70,fC=85,gC=90,pe=function(s){return s>=Ml&&s<=57},hC=function(s){return s>=55296&&s<=57343},nn=function(s){return pe(s)||s>=Rl&&s<=Pl||s>=Kl&&s<=cC},BC=function(s){return s>=Kl&&s<=dC},pC=function(s){return s>=Rl&&s<=gC},mC=function(s){return BC(s)||pC(s)},wC=function(s){return s>=AC},Jr=function(s){return s===zr||s===M0||s===K0},Zr=function(s){return mC(s)||wC(s)||s===P0},Gl=function(s){return Zr(s)||pe(s)||s===ve},CC=function(s){return s>=rC&&s<=oC||s===iC||s>=sC&&s<=aC||s===lC},mt=function(s,i){return s!==Rn?!1:i!==zr},jr=function(s,i,c){return s===ve?Zr(i)||mt(i,c):Zr(s)?!0:!!(s===Rn&&mt(s,i))},Ei=function(s,i,c){return s===Mt||s===ve?pe(i)?!0:i===Gn&&pe(c):pe(s===Gn?i:s)},vC=function(s){var i=0,c=1;(s[i]===Mt||s[i]===ve)&&(s[i]===ve&&(c=-1),i++);for(var l=[];pe(s[i]);)l.push(s[i++]);var f=l.length?parseInt(m.apply(void 0,l),10):0;s[i]===Gn&&i++;for(var p=[];pe(s[i]);)p.push(s[i++]);var C=p.length,y=C?parseInt(m.apply(void 0,p),10):0;(s[i]===Vl||s[i]===Ol)&&i++;var E=1;(s[i]===Mt||s[i]===ve)&&(s[i]===ve&&(E=-1),i++);for(var x=[];pe(s[i]);)x.push(s[i++]);var O=x.length?parseInt(m.apply(void 0,x),10):0;return c*(f+y*Math.pow(10,-C))*Math.pow(10,E*O)},yC={type:2},QC={type:3},EC={type:4},UC={type:13},FC={type:8},bC={type:21},HC={type:9},IC={type:10},_C={type:11},SC={type:12},xC={type:14},qr={type:23},DC={type:1},NC={type:25},LC={type:24},TC={type:26},kC={type:27},MC={type:28},KC={type:29},OC={type:31},Ui={type:32},zl=(function(){function s(){this._value=[]}return s.prototype.write=function(i){this._value=this._value.concat(w(i))},s.prototype.read=function(){for(var i=[],c=this.consumeToken();c!==Ui;)i.push(c),c=this.consumeToken();return i},s.prototype.consumeToken=function(){var i=this.consumeCodePoint();switch(i){case Xr:return this.consumeStringToken(Xr);case O0:var c=this.peekCodePoint(0),l=this.peekCodePoint(1),f=this.peekCodePoint(2);if(Gl(c)||mt(l,f)){var p=jr(c,l,f)?k0:T0,C=this.consumeName();return{type:5,value:C,flags:p}}break;case R0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),UC;break;case $r:return this.consumeStringToken($r);case Wr:return yC;case Pn:return QC;case Qi:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),xC;break;case Mt:if(Ei(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case eC:return EC;case ve:var y=i,E=this.peekCodePoint(0),x=this.peekCodePoint(1);if(Ei(y,E,x))return this.reconsumeCodePoint(i),this.consumeNumericToken();if(jr(y,E,x))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();if(E===ve&&x===X0)return this.consumeCodePoint(),this.consumeCodePoint(),LC;break;case Gn:if(Ei(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case Ll:if(this.peekCodePoint(0)===Qi)for(this.consumeCodePoint();;){var O=this.consumeCodePoint();if(O===Qi&&(O=this.consumeCodePoint(),O===Ll))return this.consumeToken();if(O===Xe)return this.consumeToken()}break;case tC:return TC;case nC:return kC;case z0:if(this.peekCodePoint(0)===G0&&this.peekCodePoint(1)===ve&&this.peekCodePoint(2)===ve)return this.consumeCodePoint(),this.consumeCodePoint(),NC;break;case $0:if(jr(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2))){var C=this.consumeName();return{type:7,value:C}}break;case W0:return MC;case Rn:if(mt(i,this.peekCodePoint(0)))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();break;case Y0:return KC;case J0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),FC;break;case Z0:return _C;case j0:return SC;case uC:case fC:var G=this.peekCodePoint(0),Z=this.peekCodePoint(1);return G===Mt&&(nn(Z)||Z===Yr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(i),this.consumeIdentLikeToken();case Tl:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),HC;if(this.peekCodePoint(0)===Tl)return this.consumeCodePoint(),bC;break;case q0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),IC;break;case Xe:return Ui}return Jr(i)?(this.consumeWhiteSpace(),OC):pe(i)?(this.reconsumeCodePoint(i),this.consumeNumericToken()):Zr(i)?(this.reconsumeCodePoint(i),this.consumeIdentLikeToken()):{type:6,value:m(i)}},s.prototype.consumeCodePoint=function(){var i=this._value.shift();return typeof i>"u"?-1:i},s.prototype.reconsumeCodePoint=function(i){this._value.unshift(i)},s.prototype.peekCodePoint=function(i){return i>=this._value.length?-1:this._value[i]},s.prototype.consumeUnicodeRangeToken=function(){for(var i=[],c=this.consumeCodePoint();nn(c)&&i.length<6;)i.push(c),c=this.consumeCodePoint();for(var l=!1;c===Yr&&i.length<6;)i.push(c),c=this.consumeCodePoint(),l=!0;if(l){var f=parseInt(m.apply(void 0,i.map(function(E){return E===Yr?Ml:E})),16),p=parseInt(m.apply(void 0,i.map(function(E){return E===Yr?Pl:E})),16);return{type:30,start:f,end:p}}var C=parseInt(m.apply(void 0,i),16);if(this.peekCodePoint(0)===ve&&nn(this.peekCodePoint(1))){this.consumeCodePoint(),c=this.consumeCodePoint();for(var y=[];nn(c)&&y.length<6;)y.push(c),c=this.consumeCodePoint();var p=parseInt(m.apply(void 0,y),16);return{type:30,start:C,end:p}}else return{type:30,start:C,end:C}},s.prototype.consumeIdentLikeToken=function(){var i=this.consumeName();return i.toLowerCase()==="url"&&this.peekCodePoint(0)===Wr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Wr?(this.consumeCodePoint(),{type:19,value:i}):{type:20,value:i}},s.prototype.consumeUrlToken=function(){var i=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Xe)return{type:22,value:""};var c=this.peekCodePoint(0);if(c===$r||c===Xr){var l=this.consumeStringToken(this.consumeCodePoint());return l.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Xe||this.peekCodePoint(0)===Pn)?(this.consumeCodePoint(),{type:22,value:l.value}):(this.consumeBadUrlRemnants(),qr)}for(;;){var f=this.consumeCodePoint();if(f===Xe||f===Pn)return{type:22,value:m.apply(void 0,i)};if(Jr(f))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Xe||this.peekCodePoint(0)===Pn?(this.consumeCodePoint(),{type:22,value:m.apply(void 0,i)}):(this.consumeBadUrlRemnants(),qr);if(f===Xr||f===$r||f===Wr||CC(f))return this.consumeBadUrlRemnants(),qr;if(f===Rn)if(mt(f,this.peekCodePoint(0)))i.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),qr;else i.push(f)}},s.prototype.consumeWhiteSpace=function(){for(;Jr(this.peekCodePoint(0));)this.consumeCodePoint()},s.prototype.consumeBadUrlRemnants=function(){for(;;){var i=this.consumeCodePoint();if(i===Pn||i===Xe)return;mt(i,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},s.prototype.consumeStringSlice=function(i){for(var c=5e4,l="";i>0;){var f=Math.min(c,i);l+=m.apply(void 0,this._value.splice(0,f)),i-=f}return this._value.shift(),l},s.prototype.consumeStringToken=function(i){var c="",l=0;do{var f=this._value[l];if(f===Xe||f===void 0||f===i)return c+=this.consumeStringSlice(l),{type:0,value:c};if(f===zr)return this._value.splice(0,l),DC;if(f===Rn){var p=this._value[l+1];p!==Xe&&p!==void 0&&(p===zr?(c+=this.consumeStringSlice(l),l=-1,this._value.shift()):mt(f,p)&&(c+=this.consumeStringSlice(l),c+=m(this.consumeEscapedCodePoint()),l=-1))}l++}while(!0)},s.prototype.consumeNumber=function(){var i=[],c=On,l=this.peekCodePoint(0);for((l===Mt||l===ve)&&i.push(this.consumeCodePoint());pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0);var f=this.peekCodePoint(1);if(l===Gn&&pe(f))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),c=Nl;pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0),f=this.peekCodePoint(1);var p=this.peekCodePoint(2);if((l===Vl||l===Ol)&&((f===Mt||f===ve)&&pe(p)||pe(f)))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),c=Nl;pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());return[vC(i),c]},s.prototype.consumeNumericToken=function(){var i=this.consumeNumber(),c=i[0],l=i[1],f=this.peekCodePoint(0);return jr(f,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:c,flags:l,unit:this.consumeName()}:f===V0?(this.consumeCodePoint(),{type:16,number:c,flags:l}):{type:17,number:c,flags:l}},s.prototype.consumeEscapedCodePoint=function(){var i=this.consumeCodePoint();if(nn(i)){for(var c=m(i);nn(this.peekCodePoint(0))&&c.length<6;)c+=m(this.consumeCodePoint());Jr(this.peekCodePoint(0))&&this.consumeCodePoint();var l=parseInt(c,16);return l===0||hC(l)||l>1114111?kl:l}return i===Xe?kl:i},s.prototype.consumeName=function(){for(var i="";;){var c=this.consumeCodePoint();if(Gl(c))i+=m(c);else if(mt(c,this.peekCodePoint(0)))i+=m(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(c),i}},s})(),Xl=(function(){function s(i){this._tokens=i}return s.create=function(i){var c=new zl;return c.write(i),new s(c.read())},s.parseValue=function(i){return s.create(i).parseComponentValue()},s.parseValues=function(i){return s.create(i).parseComponentValues()},s.prototype.parseComponentValue=function(){for(var i=this.consumeToken();i.type===31;)i=this.consumeToken();if(i.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(i);var c=this.consumeComponentValue();do i=this.consumeToken();while(i.type===31);if(i.type===32)return c;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},s.prototype.parseComponentValues=function(){for(var i=[];;){var c=this.consumeComponentValue();if(c.type===32)return i;i.push(c),i.push()}},s.prototype.consumeComponentValue=function(){var i=this.consumeToken();switch(i.type){case 11:case 28:case 2:return this.consumeSimpleBlock(i.type);case 19:return this.consumeFunction(i)}return i},s.prototype.consumeSimpleBlock=function(i){for(var c={type:i,values:[]},l=this.consumeToken();;){if(l.type===32||VC(l,i))return c;this.reconsumeToken(l),c.values.push(this.consumeComponentValue()),l=this.consumeToken()}},s.prototype.consumeFunction=function(i){for(var c={name:i.value,values:[],type:18};;){var l=this.consumeToken();if(l.type===32||l.type===3)return c;this.reconsumeToken(l),c.values.push(this.consumeComponentValue())}},s.prototype.consumeToken=function(){var i=this._tokens.shift();return typeof i>"u"?Ui:i},s.prototype.reconsumeToken=function(i){this._tokens.unshift(i)},s})(),zn=function(s){return s.type===15},rn=function(s){return s.type===17},JA=function(s){return s.type===20},RC=function(s){return s.type===0},Fi=function(s,i){return JA(s)&&s.value===i},$l=function(s){return s.type!==31},on=function(s){return s.type!==31&&s.type!==4},$e=function(s){var i=[],c=[];return s.forEach(function(l){if(l.type===4){if(c.length===0)throw new Error("Error parsing function args, zero tokens for arg");i.push(c),c=[];return}l.type!==31&&c.push(l)}),c.length&&i.push(c),i},VC=function(s,i){return i===11&&s.type===12||i===28&&s.type===29?!0:i===2&&s.type===3},wt=function(s){return s.type===17||s.type===15},ae=function(s){return s.type===16||wt(s)},Wl=function(s){return s.length>1?[s[0],s[1]]:[s[0]]},ge={type:17,number:0,flags:On},bi={type:16,number:50,flags:On},Ct={type:16,number:100,flags:On},Xn=function(s,i,c){var l=s[0],f=s[1];return[jA(l,i),jA(typeof f<"u"?f:l,c)]},jA=function(s,i){if(s.type===16)return s.number/100*i;if(zn(s))switch(s.unit){case"rem":case"em":return 16*s.number;default:return s.number}return s.number},Yl="deg",Jl="grad",Zl="rad",jl="turn",Ao={name:"angle",parse:function(s,i){if(i.type===15)switch(i.unit){case Yl:return Math.PI*i.number/180;case Jl:return Math.PI/200*i.number;case Zl:return i.number;case jl:return Math.PI*2*i.number}throw new Error("Unsupported angle type")}},ql=function(s){return s.type===15&&(s.unit===Yl||s.unit===Jl||s.unit===Zl||s.unit===jl)},Ac=function(s){switch(s.filter(JA).map(function(i){return i.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ge,ge];case"to top":case"bottom":return Ie(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ge,Ct];case"to right":case"left":return Ie(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ct,Ct];case"to bottom":case"top":return Ie(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ct,ge];case"to left":case"right":return Ie(270)}return 0},Ie=function(s){return Math.PI*s/180},vt={name:"color",parse:function(s,i){if(i.type===18){var c=PC[i.name];if(typeof c>"u")throw new Error('Attempting to parse an unsupported color function "'+i.name+'"');return c(s,i.values)}if(i.type===5){if(i.value.length===3){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3);return Qt(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),1)}if(i.value.length===4){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3),C=i.value.substring(3,4);return Qt(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),parseInt(C+C,16)/255)}if(i.value.length===6){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6);return Qt(parseInt(l,16),parseInt(f,16),parseInt(p,16),1)}if(i.value.length===8){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6),C=i.value.substring(6,8);return Qt(parseInt(l,16),parseInt(f,16),parseInt(p,16),parseInt(C,16)/255)}}if(i.type===20){var y=st[i.value.toUpperCase()];if(typeof y<"u")return y}return st.TRANSPARENT}},yt=function(s){return(255&s)===0},fe=function(s){var i=255&s,c=255&s>>8,l=255&s>>16,f=255&s>>24;return i<255?"rgba("+f+","+l+","+c+","+i/255+")":"rgb("+f+","+l+","+c+")"},Qt=function(s,i,c,l){return(s<<24|i<<16|c<<8|Math.round(l*255)<<0)>>>0},ec=function(s,i){if(s.type===17)return s.number;if(s.type===16){var c=i===3?1:255;return i===3?s.number/100*c:Math.round(s.number/100*c)}return 0},tc=function(s,i){var c=i.filter(on);if(c.length===3){var l=c.map(ec),f=l[0],p=l[1],C=l[2];return Qt(f,p,C,1)}if(c.length===4){var y=c.map(ec),f=y[0],p=y[1],C=y[2],E=y[3];return Qt(f,p,C,E)}return 0};function Hi(s,i,c){return c<0&&(c+=1),c>=1&&(c-=1),c<1/6?(i-s)*c*6+s:c<1/2?i:c<2/3?(i-s)*6*(2/3-c)+s:s}var nc=function(s,i){var c=i.filter(on),l=c[0],f=c[1],p=c[2],C=c[3],y=(l.type===17?Ie(l.number):Ao.parse(s,l))/(Math.PI*2),E=ae(f)?f.number/100:0,x=ae(p)?p.number/100:0,O=typeof C<"u"&&ae(C)?jA(C,1):1;if(E===0)return Qt(x*255,x*255,x*255,1);var G=x<=.5?x*(E+1):x+E-x*E,Z=x*2-G,vA=Hi(Z,G,y+1/3),gA=Hi(Z,G,y),mA=Hi(Z,G,y-1/3);return Qt(vA*255,gA*255,mA*255,O)},PC={hsl:nc,hsla:nc,rgb:tc,rgba:tc},$n=function(s,i){return vt.parse(s,Xl.create(i).parseComponentValue())},st={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},GC={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(c){if(JA(c))switch(c.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},zC={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},eo=function(s,i){var c=vt.parse(s,i[0]),l=i[1];return l&&ae(l)?{color:c,stop:l}:{color:c,stop:null}},rc=function(s,i){var c=s[0],l=s[s.length-1];c.stop===null&&(c.stop=ge),l.stop===null&&(l.stop=Ct);for(var f=[],p=0,C=0;C<s.length;C++){var y=s[C].stop;if(y!==null){var E=jA(y,i);E>p?f.push(E):f.push(p),p=E}else f.push(null)}for(var x=null,C=0;C<f.length;C++){var O=f[C];if(O===null)x===null&&(x=C);else if(x!==null){for(var G=C-x,Z=(O-f[x-1])/(G+1),vA=1;vA<=G;vA++)f[x+vA-1]=Z*vA;x=null}}return s.map(function(gA,mA){return{color:gA.color,stop:Math.max(Math.min(1,f[mA]/i),0)}})},XC=function(s,i,c){var l=i/2,f=c/2,p=jA(s[0],i)-l,C=f-jA(s[1],c);return(Math.atan2(C,p)+Math.PI*2)%(Math.PI*2)},$C=function(s,i,c){var l=typeof s=="number"?s:XC(s,i,c),f=Math.abs(i*Math.sin(l))+Math.abs(c*Math.cos(l)),p=i/2,C=c/2,y=f/2,E=Math.sin(l-Math.PI/2)*y,x=Math.cos(l-Math.PI/2)*y;return[f,p-x,p+x,C-E,C+E]},Ke=function(s,i){return Math.sqrt(s*s+i*i)},oc=function(s,i,c,l,f){return[[0,0],[0,i],[s,0],[s,i]].reduce(function(p,C){var y=C[0],E=C[1],x=Ke(c-y,l-E);return(f?x<p.optimumDistance:x>p.optimumDistance)?{optimumCorner:C,optimumDistance:x}:p},{optimumDistance:f?1/0:-1/0,optimumCorner:null}).optimumCorner},WC=function(s,i,c,l,f){var p=0,C=0;switch(s.size){case 0:s.shape===0?p=C=Math.min(Math.abs(i),Math.abs(i-l),Math.abs(c),Math.abs(c-f)):s.shape===1&&(p=Math.min(Math.abs(i),Math.abs(i-l)),C=Math.min(Math.abs(c),Math.abs(c-f)));break;case 2:if(s.shape===0)p=C=Math.min(Ke(i,c),Ke(i,c-f),Ke(i-l,c),Ke(i-l,c-f));else if(s.shape===1){var y=Math.min(Math.abs(c),Math.abs(c-f))/Math.min(Math.abs(i),Math.abs(i-l)),E=oc(l,f,i,c,!0),x=E[0],O=E[1];p=Ke(x-i,(O-c)/y),C=y*p}break;case 1:s.shape===0?p=C=Math.max(Math.abs(i),Math.abs(i-l),Math.abs(c),Math.abs(c-f)):s.shape===1&&(p=Math.max(Math.abs(i),Math.abs(i-l)),C=Math.max(Math.abs(c),Math.abs(c-f)));break;case 3:if(s.shape===0)p=C=Math.max(Ke(i,c),Ke(i,c-f),Ke(i-l,c),Ke(i-l,c-f));else if(s.shape===1){var y=Math.max(Math.abs(c),Math.abs(c-f))/Math.max(Math.abs(i),Math.abs(i-l)),G=oc(l,f,i,c,!1),x=G[0],O=G[1];p=Ke(x-i,(O-c)/y),C=y*p}break}return Array.isArray(s.size)&&(p=jA(s.size[0],l),C=s.size.length===2?jA(s.size[1],f):p),[p,C]},YC=function(s,i){var c=Ie(180),l=[];return $e(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&C.value==="to"){c=Ac(f);return}else if(ql(C)){c=Ao.parse(s,C);return}}var y=eo(s,f);l.push(y)}),{angle:c,stops:l,type:1}},to=function(s,i){var c=Ie(180),l=[];return $e(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&["top","left","right","bottom"].indexOf(C.value)!==-1){c=Ac(f);return}else if(ql(C)){c=(Ao.parse(s,C)+Ie(270))%Ie(360);return}}var y=eo(s,f);l.push(y)}),{angle:c,stops:l,type:1}},JC=function(s,i){var c=Ie(180),l=[],f=1,p=0,C=3,y=[];return $e(i).forEach(function(E,x){var O=E[0];if(x===0){if(JA(O)&&O.value==="linear"){f=1;return}else if(JA(O)&&O.value==="radial"){f=2;return}}if(O.type===18){if(O.name==="from"){var G=vt.parse(s,O.values[0]);l.push({stop:ge,color:G})}else if(O.name==="to"){var G=vt.parse(s,O.values[0]);l.push({stop:Ct,color:G})}else if(O.name==="color-stop"){var Z=O.values.filter(on);if(Z.length===2){var G=vt.parse(s,Z[1]),vA=Z[0];rn(vA)&&l.push({stop:{type:16,number:vA.number*100,flags:vA.flags},color:G})}}}}),f===1?{angle:(c+Ie(180))%Ie(360),stops:l,type:f}:{size:C,shape:p,stops:l,position:y,type:f}},ic="closest-side",sc="farthest-side",ac="closest-corner",lc="farthest-corner",cc="circle",uc="ellipse",dc="cover",fc="contain",ZC=function(s,i){var c=0,l=3,f=[],p=[];return $e(i).forEach(function(C,y){var E=!0;if(y===0){var x=!1;E=C.reduce(function(G,Z){if(x)if(JA(Z))switch(Z.value){case"center":return p.push(bi),G;case"top":case"left":return p.push(ge),G;case"right":case"bottom":return p.push(Ct),G}else(ae(Z)||wt(Z))&&p.push(Z);else if(JA(Z))switch(Z.value){case cc:return c=0,!1;case uc:return c=1,!1;case"at":return x=!0,!1;case ic:return l=0,!1;case dc:case sc:return l=1,!1;case fc:case ac:return l=2,!1;case lc:return l=3,!1}else if(wt(Z)||ae(Z))return Array.isArray(l)||(l=[]),l.push(Z),!1;return G},E)}if(E){var O=eo(s,C);f.push(O)}}),{size:l,shape:c,stops:f,position:p,type:2}},no=function(s,i){var c=0,l=3,f=[],p=[];return $e(i).forEach(function(C,y){var E=!0;if(y===0?E=C.reduce(function(O,G){if(JA(G))switch(G.value){case"center":return p.push(bi),!1;case"top":case"left":return p.push(ge),!1;case"right":case"bottom":return p.push(Ct),!1}else if(ae(G)||wt(G))return p.push(G),!1;return O},E):y===1&&(E=C.reduce(function(O,G){if(JA(G))switch(G.value){case cc:return c=0,!1;case uc:return c=1,!1;case fc:case ic:return l=0,!1;case sc:return l=1,!1;case ac:return l=2,!1;case dc:case lc:return l=3,!1}else if(wt(G)||ae(G))return Array.isArray(l)||(l=[]),l.push(G),!1;return O},E)),E){var x=eo(s,C);f.push(x)}}),{size:l,shape:c,stops:f,position:p,type:2}},jC=function(s){return s.type===1},qC=function(s){return s.type===2},Ii={name:"image",parse:function(s,i){if(i.type===22){var c={url:i.value,type:0};return s.cache.addImage(i.value),c}if(i.type===18){var l=gc[i.name];if(typeof l>"u")throw new Error('Attempting to parse an unsupported image function "'+i.name+'"');return l(s,i.values)}throw new Error("Unsupported image type "+i.type)}};function Av(s){return!(s.type===20&&s.value==="none")&&(s.type!==18||!!gc[s.name])}var gc={"linear-gradient":YC,"-moz-linear-gradient":to,"-ms-linear-gradient":to,"-o-linear-gradient":to,"-webkit-linear-gradient":to,"radial-gradient":ZC,"-moz-radial-gradient":no,"-ms-radial-gradient":no,"-o-radial-gradient":no,"-webkit-radial-gradient":no,"-webkit-gradient":JC},ev={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var c=i[0];return c.type===20&&c.value==="none"?[]:i.filter(function(l){return on(l)&&Av(l)}).map(function(l){return Ii.parse(s,l)})}},tv={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(c){if(JA(c))switch(c.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},nv={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(s,i){return $e(i).map(function(c){return c.filter(ae)}).map(Wl)}},rv={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(s,i){return $e(i).map(function(c){return c.filter(JA).map(function(l){return l.value}).join(" ")}).map(ov)}},ov=function(s){switch(s){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},sn;(function(s){s.AUTO="auto",s.CONTAIN="contain",s.COVER="cover"})(sn||(sn={}));var iv={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(s,i){return $e(i).map(function(c){return c.filter(sv)})}},sv=function(s){return JA(s)||ae(s)},ro=function(s){return{name:"border-"+s+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},av=ro("top"),lv=ro("right"),cv=ro("bottom"),uv=ro("left"),oo=function(s){return{name:"border-radius-"+s,initialValue:"0 0",prefix:!1,type:1,parse:function(i,c){return Wl(c.filter(ae))}}},dv=oo("top-left"),fv=oo("top-right"),gv=oo("bottom-right"),hv=oo("bottom-left"),io=function(s){return{name:"border-"+s+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(i,c){switch(c){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Bv=io("top"),pv=io("right"),mv=io("bottom"),wv=io("left"),so=function(s){return{name:"border-"+s+"-width",initialValue:"0",type:0,prefix:!1,parse:function(i,c){return zn(c)?c.number:0}}},Cv=so("top"),vv=so("right"),yv=so("bottom"),Qv=so("left"),Ev={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Uv={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(s,i){return i==="rtl"?1:0}},Fv={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(s,i){return i.filter(JA).reduce(function(c,l){return c|bv(l.value)},0)}},bv=function(s){switch(s){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Hv={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Iv={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(s,i){return i.type===20&&i.value==="normal"?0:i.type===17||i.type===15?i.number:0}},ao;(function(s){s.NORMAL="normal",s.STRICT="strict"})(ao||(ao={}));var _v={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="strict"?ao.STRICT:ao.NORMAL}},Sv={name:"line-height",initialValue:"normal",prefix:!1,type:4},hc=function(s,i){return JA(s)&&s.value==="normal"?1.2*i:s.type===17?i*s.number:ae(s)?jA(s,i):i},xv={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(s,i){return i.type===20&&i.value==="none"?null:Ii.parse(s,i)}},Dv={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(s,i){return i==="inside"?0:1}},_i={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},lo=function(s){return{name:"margin-"+s,initialValue:"0",prefix:!1,type:4}},Nv=lo("top"),Lv=lo("right"),Tv=lo("bottom"),kv=lo("left"),Mv={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(s,i){return i.filter(JA).map(function(c){switch(c.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},Kv={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="break-word"?"break-word":"normal"}},co=function(s){return{name:"padding-"+s,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ov=co("top"),Rv=co("right"),Vv=co("bottom"),Pv=co("left"),Gv={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(s,i){switch(i){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},zv={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(s,i){switch(i){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Xv={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&Fi(i[0],"none")?[]:$e(i).map(function(c){for(var l={color:st.TRANSPARENT,offsetX:ge,offsetY:ge,blur:ge},f=0,p=0;p<c.length;p++){var C=c[p];wt(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:l.blur=C,f++):l.color=vt.parse(s,C)}return l})}},$v={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Wv={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(s,i){if(i.type===20&&i.value==="none")return null;if(i.type===18){var c=Zv[i.name];if(typeof c>"u")throw new Error('Attempting to parse an unsupported transform function "'+i.name+'"');return c(i.values)}return null}},Yv=function(s){var i=s.filter(function(c){return c.type===17}).map(function(c){return c.number});return i.length===6?i:null},Jv=function(s){var i=s.filter(function(E){return E.type===17}).map(function(E){return E.number}),c=i[0],l=i[1];i[2],i[3];var f=i[4],p=i[5];i[6],i[7],i[8],i[9],i[10],i[11];var C=i[12],y=i[13];return i[14],i[15],i.length===16?[c,l,f,p,C,y]:null},Zv={matrix:Yv,matrix3d:Jv},Bc={type:16,number:50,flags:On},jv=[Bc,Bc],qv={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(s,i){var c=i.filter(ae);return c.length!==2?jv:[c[0],c[1]]}},Ay={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Wn;(function(s){s.NORMAL="normal",s.BREAK_ALL="break-all",s.KEEP_ALL="keep-all"})(Wn||(Wn={}));for(var ey={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"break-all":return Wn.BREAK_ALL;case"keep-all":return Wn.KEEP_ALL;default:return Wn.NORMAL}}},ty={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(s,i){if(i.type===20)return{auto:!0,order:0};if(rn(i))return{auto:!1,order:i.number};throw new Error("Invalid z-index number parsed")}},pc={name:"time",parse:function(s,i){if(i.type===15)switch(i.unit.toLowerCase()){case"s":return 1e3*i.number;case"ms":return i.number}throw new Error("Unsupported time type")}},ny={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(s,i){return rn(i)?i.number:1}},ry={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},oy={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(s,i){return i.filter(JA).map(function(c){switch(c.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(c){return c!==0})}},iy={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(s,i){var c=[],l=[];return i.forEach(function(f){switch(f.type){case 20:case 0:c.push(f.value);break;case 17:c.push(f.number.toString());break;case 4:l.push(c.join(" ")),c.length=0;break}}),c.length&&l.push(c.join(" ")),l.map(function(f){return f.indexOf(" ")===-1?f:"'"+f+"'"})}},sy={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ay={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(s,i){return rn(i)?i.number:JA(i)&&i.value==="bold"?700:400}},ly={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.filter(JA).map(function(c){return c.value})}},cy={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},de=function(s,i){return(s&i)!==0},uy={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var c=i[0];return c.type===20&&c.value==="none"?[]:i}},dy={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var c=i[0];if(c.type===20&&c.value==="none")return null;for(var l=[],f=i.filter($l),p=0;p<f.length;p++){var C=f[p],y=f[p+1];if(C.type===20){var E=y&&rn(y)?y.number:1;l.push({counter:C.value,increment:E})}}return l}},fy={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return[];for(var c=[],l=i.filter($l),f=0;f<l.length;f++){var p=l[f],C=l[f+1];if(JA(p)&&p.value!=="none"){var y=C&&rn(C)?C.number:0;c.push({counter:p.value,reset:y})}}return c}},gy={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(s,i){return i.filter(zn).map(function(c){return pc.parse(s,c)})}},hy={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var c=i[0];if(c.type===20&&c.value==="none")return null;var l=[],f=i.filter(RC);if(f.length%2!==0)return null;for(var p=0;p<f.length;p+=2){var C=f[p].value,y=f[p+1].value;l.push({open:C,close:y})}return l}},mc=function(s,i,c){if(!s)return"";var l=s[Math.min(i,s.length-1)];return l?c?l.open:l.close:""},By={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&Fi(i[0],"none")?[]:$e(i).map(function(c){for(var l={color:255,offsetX:ge,offsetY:ge,blur:ge,spread:ge,inset:!1},f=0,p=0;p<c.length;p++){var C=c[p];Fi(C,"inset")?l.inset=!0:wt(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:f===2?l.blur=C:l.spread=C,f++):l.color=vt.parse(s,C)}return l})}},py={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(s,i){var c=[0,1,2],l=[];return i.filter(JA).forEach(function(f){switch(f.value){case"stroke":l.push(1);break;case"fill":l.push(0);break;case"markers":l.push(2);break}}),c.forEach(function(f){l.indexOf(f)===-1&&l.push(f)}),l}},my={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},wy={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(s,i){return zn(i)?i.number:0}},Cy=(function(){function s(i,c){var l,f;this.animationDuration=UA(i,gy,c.animationDuration),this.backgroundClip=UA(i,GC,c.backgroundClip),this.backgroundColor=UA(i,zC,c.backgroundColor),this.backgroundImage=UA(i,ev,c.backgroundImage),this.backgroundOrigin=UA(i,tv,c.backgroundOrigin),this.backgroundPosition=UA(i,nv,c.backgroundPosition),this.backgroundRepeat=UA(i,rv,c.backgroundRepeat),this.backgroundSize=UA(i,iv,c.backgroundSize),this.borderTopColor=UA(i,av,c.borderTopColor),this.borderRightColor=UA(i,lv,c.borderRightColor),this.borderBottomColor=UA(i,cv,c.borderBottomColor),this.borderLeftColor=UA(i,uv,c.borderLeftColor),this.borderTopLeftRadius=UA(i,dv,c.borderTopLeftRadius),this.borderTopRightRadius=UA(i,fv,c.borderTopRightRadius),this.borderBottomRightRadius=UA(i,gv,c.borderBottomRightRadius),this.borderBottomLeftRadius=UA(i,hv,c.borderBottomLeftRadius),this.borderTopStyle=UA(i,Bv,c.borderTopStyle),this.borderRightStyle=UA(i,pv,c.borderRightStyle),this.borderBottomStyle=UA(i,mv,c.borderBottomStyle),this.borderLeftStyle=UA(i,wv,c.borderLeftStyle),this.borderTopWidth=UA(i,Cv,c.borderTopWidth),this.borderRightWidth=UA(i,vv,c.borderRightWidth),this.borderBottomWidth=UA(i,yv,c.borderBottomWidth),this.borderLeftWidth=UA(i,Qv,c.borderLeftWidth),this.boxShadow=UA(i,By,c.boxShadow),this.color=UA(i,Ev,c.color),this.direction=UA(i,Uv,c.direction),this.display=UA(i,Fv,c.display),this.float=UA(i,Hv,c.cssFloat),this.fontFamily=UA(i,iy,c.fontFamily),this.fontSize=UA(i,sy,c.fontSize),this.fontStyle=UA(i,cy,c.fontStyle),this.fontVariant=UA(i,ly,c.fontVariant),this.fontWeight=UA(i,ay,c.fontWeight),this.letterSpacing=UA(i,Iv,c.letterSpacing),this.lineBreak=UA(i,_v,c.lineBreak),this.lineHeight=UA(i,Sv,c.lineHeight),this.listStyleImage=UA(i,xv,c.listStyleImage),this.listStylePosition=UA(i,Dv,c.listStylePosition),this.listStyleType=UA(i,_i,c.listStyleType),this.marginTop=UA(i,Nv,c.marginTop),this.marginRight=UA(i,Lv,c.marginRight),this.marginBottom=UA(i,Tv,c.marginBottom),this.marginLeft=UA(i,kv,c.marginLeft),this.opacity=UA(i,ny,c.opacity);var p=UA(i,Mv,c.overflow);this.overflowX=p[0],this.overflowY=p[p.length>1?1:0],this.overflowWrap=UA(i,Kv,c.overflowWrap),this.paddingTop=UA(i,Ov,c.paddingTop),this.paddingRight=UA(i,Rv,c.paddingRight),this.paddingBottom=UA(i,Vv,c.paddingBottom),this.paddingLeft=UA(i,Pv,c.paddingLeft),this.paintOrder=UA(i,py,c.paintOrder),this.position=UA(i,zv,c.position),this.textAlign=UA(i,Gv,c.textAlign),this.textDecorationColor=UA(i,ry,(l=c.textDecorationColor)!==null&&l!==void 0?l:c.color),this.textDecorationLine=UA(i,oy,(f=c.textDecorationLine)!==null&&f!==void 0?f:c.textDecoration),this.textShadow=UA(i,Xv,c.textShadow),this.textTransform=UA(i,$v,c.textTransform),this.transform=UA(i,Wv,c.transform),this.transformOrigin=UA(i,qv,c.transformOrigin),this.visibility=UA(i,Ay,c.visibility),this.webkitTextStrokeColor=UA(i,my,c.webkitTextStrokeColor),this.webkitTextStrokeWidth=UA(i,wy,c.webkitTextStrokeWidth),this.wordBreak=UA(i,ey,c.wordBreak),this.zIndex=UA(i,ty,c.zIndex)}return s.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},s.prototype.isTransparent=function(){return yt(this.backgroundColor)},s.prototype.isTransformed=function(){return this.transform!==null},s.prototype.isPositioned=function(){return this.position!==0},s.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},s.prototype.isFloating=function(){return this.float!==0},s.prototype.isInlineLevel=function(){return de(this.display,4)||de(this.display,33554432)||de(this.display,268435456)||de(this.display,536870912)||de(this.display,67108864)||de(this.display,134217728)},s})(),vy=(function(){function s(i,c){this.content=UA(i,uy,c.content),this.quotes=UA(i,hy,c.quotes)}return s})(),wc=(function(){function s(i,c){this.counterIncrement=UA(i,dy,c.counterIncrement),this.counterReset=UA(i,fy,c.counterReset)}return s})(),UA=function(s,i,c){var l=new zl,f=c!==null&&typeof c<"u"?c.toString():i.initialValue;l.write(f);var p=new Xl(l.read());switch(i.type){case 2:var C=p.parseComponentValue();return i.parse(s,JA(C)?C.value:i.initialValue);case 0:return i.parse(s,p.parseComponentValue());case 1:return i.parse(s,p.parseComponentValues());case 4:return p.parseComponentValue();case 3:switch(i.format){case"angle":return Ao.parse(s,p.parseComponentValue());case"color":return vt.parse(s,p.parseComponentValue());case"image":return Ii.parse(s,p.parseComponentValue());case"length":var y=p.parseComponentValue();return wt(y)?y:ge;case"length-percentage":var E=p.parseComponentValue();return ae(E)?E:ge;case"time":return pc.parse(s,p.parseComponentValue())}break}},yy="data-html2canvas-debug",Qy=function(s){switch(s.getAttribute(yy)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Si=function(s,i){var c=Qy(s);return c===1||i===c},We=(function(){function s(i,c){if(this.context=i,this.textNodes=[],this.elements=[],this.flags=0,Si(c,3))debugger;this.styles=new Cy(i,window.getComputedStyle(c,null)),zi(c)&&(this.styles.animationDuration.some(function(l){return l>0})&&(c.style.animationDuration="0s"),this.styles.transform!==null&&(c.style.transform="none")),this.bounds=g(this.context,c),Si(c,4)&&(this.flags|=16)}return s})(),Ey="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgF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IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgAC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ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Cc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yn=typeof Uint8Array>"u"?[]:new Uint8Array(256),uo=0;uo<Cc.length;uo++)Yn[Cc.charCodeAt(uo)]=uo;for(var Uy=function(s){var i=s.length*.75,c=s.length,l,f=0,p,C,y,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var x=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),O=Array.isArray(x)?x:new Uint8Array(x);for(l=0;l<c;l+=4)p=Yn[s.charCodeAt(l)],C=Yn[s.charCodeAt(l+1)],y=Yn[s.charCodeAt(l+2)],E=Yn[s.charCodeAt(l+3)],O[f++]=p<<2|C>>4,O[f++]=(C&15)<<4|y>>2,O[f++]=(y&3)<<6|E&63;return x},Fy=function(s){for(var i=s.length,c=[],l=0;l<i;l+=2)c.push(s[l+1]<<8|s[l]);return c},by=function(s){for(var i=s.length,c=[],l=0;l<i;l+=4)c.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return c},Kt=5,xi=11,Di=2,Hy=xi-Kt,vc=65536>>Kt,Ni=(1<<Kt)-1,Iy=vc+(1024>>Kt)+32,_y=65536>>xi,Sy=(1<<Hy)-1,yc=function(s,i,c){return s.slice?s.slice(i,c):new Uint16Array(Array.prototype.slice.call(s,i,c))},xy=function(s,i,c){return s.slice?s.slice(i,c):new Uint32Array(Array.prototype.slice.call(s,i,c))},Dy=function(s,i){var c=Uy(s),l=Array.isArray(c)?by(c):new Uint32Array(c),f=Array.isArray(c)?Fy(c):new Uint16Array(c),p=24,C=yc(f,p/2,l[4]/2),y=l[5]===2?yc(f,(p+l[4])/2):xy(l,Math.ceil((p+l[4])/4));return new Ny(l[0],l[1],l[2],l[3],C,y)},Ny=(function(){function s(i,c,l,f,p,C){this.initialValue=i,this.errorValue=c,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var c;if(i>=0){if(i<55296||i>56319&&i<=65535)return c=this.index[i>>Kt],c=(c<<Di)+(i&Ni),this.data[c];if(i<=65535)return c=this.index[vc+(i-55296>>Kt)],c=(c<<Di)+(i&Ni),this.data[c];if(i<this.highStart)return c=Iy-_y+(i>>xi),c=this.index[c],c+=i>>Kt&Sy,c=this.index[c],c=(c<<Di)+(i&Ni),this.data[c];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),Qc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ly=typeof Uint8Array>"u"?[]:new Uint8Array(256),fo=0;fo<Qc.length;fo++)Ly[Qc.charCodeAt(fo)]=fo;var Ty=1,Li=2,Ti=3,Ec=4,Uc=5,ky=7,Fc=8,ki=9,Mi=10,bc=11,Hc=12,Ic=13,_c=14,Ki=15,My=function(s){for(var i=[],c=0,l=s.length;c<l;){var f=s.charCodeAt(c++);if(f>=55296&&f<=56319&&c<l){var p=s.charCodeAt(c++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),c--)}else i.push(f)}return i},Ky=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var c=s.length;if(!c)return"";for(var l=[],f=-1,p="";++f<c;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===c||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},Oy=Dy(Ey),_e="×",Oi="÷",Ry=function(s){return Oy.get(s)},Vy=function(s,i,c){var l=c-2,f=i[l],p=i[c-1],C=i[c];if(p===Li&&C===Ti)return _e;if(p===Li||p===Ti||p===Ec||C===Li||C===Ti||C===Ec)return Oi;if(p===Fc&&[Fc,ki,bc,Hc].indexOf(C)!==-1||(p===bc||p===ki)&&(C===ki||C===Mi)||(p===Hc||p===Mi)&&C===Mi||C===Ic||C===Uc||C===ky||p===Ty)return _e;if(p===Ic&&C===_c){for(;f===Uc;)f=i[--l];if(f===_c)return _e}if(p===Ki&&C===Ki){for(var y=0;f===Ki;)y++,f=i[--l];if(y%2===0)return _e}return Oi},Py=function(s){var i=My(s),c=i.length,l=0,f=0,p=i.map(Ry);return{next:function(){if(l>=c)return{done:!0,value:null};for(var C=_e;l<c&&(C=Vy(i,p,++l))===_e;);if(C!==_e||l===c){var y=Ky.apply(null,i.slice(f,l));return f=l,{value:y,done:!1}}return{done:!0,value:null}}}},Gy=function(s){for(var i=Py(s),c=[],l;!(l=i.next()).done;)l.value&&c.push(l.value.slice());return c},zy=function(s){var i=123;if(s.createRange){var c=s.createRange();if(c.getBoundingClientRect){var l=s.createElement("boundtest");l.style.height=i+"px",l.style.display="block",s.body.appendChild(l),c.selectNode(l);var f=c.getBoundingClientRect(),p=Math.round(f.height);if(s.body.removeChild(l),p===i)return!0}}return!1},Xy=function(s){var i=s.createElement("boundtest");i.style.width="50px",i.style.display="block",i.style.fontSize="12px",i.style.letterSpacing="0px",i.style.wordSpacing="0px",s.body.appendChild(i);var c=s.createRange();i.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var l=i.firstChild,f=w(l.data).map(function(E){return m(E)}),p=0,C={},y=f.every(function(E,x){c.setStart(l,p),c.setEnd(l,p+E.length);var O=c.getBoundingClientRect();p+=E.length;var G=O.x>C.x||O.y>C.y;return C=O,x===0?!0:G});return s.body.removeChild(i),y},$y=function(){return typeof new Image().crossOrigin<"u"},Wy=function(){return typeof new XMLHttpRequest().responseType=="string"},Yy=function(s){var i=new Image,c=s.createElement("canvas"),l=c.getContext("2d");if(!l)return!1;i.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{l.drawImage(i,0,0),c.toDataURL()}catch{return!1}return!0},Sc=function(s){return s[0]===0&&s[1]===255&&s[2]===0&&s[3]===255},Jy=function(s){var i=s.createElement("canvas"),c=100;i.width=c,i.height=c;var l=i.getContext("2d");if(!l)return Promise.reject(!1);l.fillStyle="rgb(0, 255, 0)",l.fillRect(0,0,c,c);var f=new Image,p=i.toDataURL();f.src=p;var C=Ri(c,c,0,0,f);return l.fillStyle="red",l.fillRect(0,0,c,c),xc(C).then(function(y){l.drawImage(y,0,0);var E=l.getImageData(0,0,c,c).data;l.fillStyle="red",l.fillRect(0,0,c,c);var x=s.createElement("div");return x.style.backgroundImage="url("+p+")",x.style.height=c+"px",Sc(E)?xc(Ri(c,c,0,0,x)):Promise.reject(!1)}).then(function(y){return l.drawImage(y,0,0),Sc(l.getImageData(0,0,c,c).data)}).catch(function(){return!1})},Ri=function(s,i,c,l,f){var p="http://www.w3.org/2000/svg",C=document.createElementNS(p,"svg"),y=document.createElementNS(p,"foreignObject");return C.setAttributeNS(null,"width",s.toString()),C.setAttributeNS(null,"height",i.toString()),y.setAttributeNS(null,"width","100%"),y.setAttributeNS(null,"height","100%"),y.setAttributeNS(null,"x",c.toString()),y.setAttributeNS(null,"y",l.toString()),y.setAttributeNS(null,"externalResourcesRequired","true"),C.appendChild(y),y.appendChild(f),C},xc=function(s){return new Promise(function(i,c){var l=new Image;l.onload=function(){return i(l)},l.onerror=c,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},he={get SUPPORT_RANGE_BOUNDS(){var s=zy(document);return Object.defineProperty(he,"SUPPORT_RANGE_BOUNDS",{value:s}),s},get SUPPORT_WORD_BREAKING(){var s=he.SUPPORT_RANGE_BOUNDS&&Xy(document);return Object.defineProperty(he,"SUPPORT_WORD_BREAKING",{value:s}),s},get SUPPORT_SVG_DRAWING(){var s=Yy(document);return Object.defineProperty(he,"SUPPORT_SVG_DRAWING",{value:s}),s},get SUPPORT_FOREIGNOBJECT_DRAWING(){var s=typeof Array.from=="function"&&typeof window.fetch=="function"?Jy(document):Promise.resolve(!1);return Object.defineProperty(he,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:s}),s},get SUPPORT_CORS_IMAGES(){var s=$y();return Object.defineProperty(he,"SUPPORT_CORS_IMAGES",{value:s}),s},get SUPPORT_RESPONSE_TYPE(){var s=Wy();return Object.defineProperty(he,"SUPPORT_RESPONSE_TYPE",{value:s}),s},get SUPPORT_CORS_XHR(){var s="withCredentials"in new XMLHttpRequest;return Object.defineProperty(he,"SUPPORT_CORS_XHR",{value:s}),s},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var s=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(he,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:s}),s}},Jn=(function(){function s(i,c){this.text=i,this.bounds=c}return s})(),Zy=function(s,i,c,l){var f=AQ(i,c),p=[],C=0;return f.forEach(function(y){if(c.textDecorationLine.length||y.trim().length>0)if(he.SUPPORT_RANGE_BOUNDS){var E=Dc(l,C,y.length).getClientRects();if(E.length>1){var x=Vi(y),O=0;x.forEach(function(Z){p.push(new Jn(Z,h.fromDOMRectList(s,Dc(l,O+C,Z.length).getClientRects()))),O+=Z.length})}else p.push(new Jn(y,h.fromDOMRectList(s,E)))}else{var G=l.splitText(y.length);p.push(new Jn(y,jy(s,l))),l=G}else he.SUPPORT_RANGE_BOUNDS||(l=l.splitText(y.length));C+=y.length}),p},jy=function(s,i){var c=i.ownerDocument;if(c){var l=c.createElement("html2canvaswrapper");l.appendChild(i.cloneNode(!0));var f=i.parentNode;if(f){f.replaceChild(l,i);var p=g(s,l);return l.firstChild&&f.replaceChild(l.firstChild,l),p}}return h.EMPTY},Dc=function(s,i,c){var l=s.ownerDocument;if(!l)throw new Error("Node has no owner document");var f=l.createRange();return f.setStart(s,i),f.setEnd(s,i+c),f},Vi=function(s){if(he.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(i.segment(s)).map(function(c){return c.segment})}return Gy(s)},qy=function(s,i){if(he.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(c.segment(s)).map(function(l){return l.segment})}return tQ(s,i)},AQ=function(s,i){return i.letterSpacing!==0?Vi(s):qy(s,i)},eQ=[32,160,4961,65792,65793,4153,4241],tQ=function(s,i){for(var c=L0(s,{lineBreak:i.lineBreak,wordBreak:i.overflowWrap==="break-word"?"break-word":i.wordBreak}),l=[],f,p=function(){if(f.value){var C=w(f.value.slice()),y="";C.forEach(function(E){eQ.indexOf(E)===-1?y+=m(E):(y.length&&l.push(y),l.push(m(E)),y="")}),y.length&&l.push(y)}};!(f=c.next()).done;)p();return l},nQ=(function(){function s(i,c,l){this.text=rQ(c.data,l.textTransform),this.textBounds=Zy(i,this.text,l,c)}return s})(),rQ=function(s,i){switch(i){case 1:return s.toLowerCase();case 3:return s.replace(oQ,iQ);case 2:return s.toUpperCase();default:return s}},oQ=/(^|\s|:|-|\(|\))([a-z])/g,iQ=function(s,i,c){return s.length>0?i+c.toUpperCase():s},Nc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.src=l.currentSrc||l.src,f.intrinsicWidth=l.naturalWidth,f.intrinsicHeight=l.naturalHeight,f.context.cache.addImage(f.src),f}return i})(We),Lc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.canvas=l,f.intrinsicWidth=l.width,f.intrinsicHeight=l.height,f}return i})(We),Tc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this,p=new XMLSerializer,C=g(c,l);return l.setAttribute("width",C.width+"px"),l.setAttribute("height",C.height+"px"),f.svg="data:image/svg+xml,"+encodeURIComponent(p.serializeToString(l)),f.intrinsicWidth=l.width.baseVal.value,f.intrinsicHeight=l.height.baseVal.value,f.context.cache.addImage(f.svg),f}return i})(We),kc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.value=l.value,f}return i})(We),Pi=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.start=l.start,f.reversed=typeof l.reversed=="boolean"&&l.reversed===!0,f}return i})(We),sQ=[{type:15,flags:0,unit:"px",number:3}],aQ=[{type:16,flags:0,number:50}],lQ=function(s){return s.width>s.height?new h(s.left+(s.width-s.height)/2,s.top,s.height,s.height):s.width<s.height?new h(s.left,s.top+(s.height-s.width)/2,s.width,s.width):s},cQ=function(s){var i=s.type===uQ?new Array(s.value.length+1).join("•"):s.value;return i.length===0?s.placeholder||"":i},go="checkbox",ho="radio",uQ="password",Mc=707406591,Gi=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;switch(f.type=l.type.toLowerCase(),f.checked=l.checked,f.value=cQ(l),(f.type===go||f.type===ho)&&(f.styles.backgroundColor=3739148031,f.styles.borderTopColor=f.styles.borderRightColor=f.styles.borderBottomColor=f.styles.borderLeftColor=2779096575,f.styles.borderTopWidth=f.styles.borderRightWidth=f.styles.borderBottomWidth=f.styles.borderLeftWidth=1,f.styles.borderTopStyle=f.styles.borderRightStyle=f.styles.borderBottomStyle=f.styles.borderLeftStyle=1,f.styles.backgroundClip=[0],f.styles.backgroundOrigin=[0],f.bounds=lQ(f.bounds)),f.type){case go:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=sQ;break;case ho:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=aQ;break}return f}return i})(We),Kc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this,p=l.options[l.selectedIndex||0];return f.value=p&&p.text||"",f}return i})(We),Oc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.value=l.value,f}return i})(We),Rc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;f.src=l.src,f.width=parseInt(l.width,10)||0,f.height=parseInt(l.height,10)||0,f.backgroundColor=f.styles.backgroundColor;try{if(l.contentWindow&&l.contentWindow.document&&l.contentWindow.document.documentElement){f.tree=Pc(c,l.contentWindow.document.documentElement);var p=l.contentWindow.document.documentElement?$n(c,getComputedStyle(l.contentWindow.document.documentElement).backgroundColor):st.TRANSPARENT,C=l.contentWindow.document.body?$n(c,getComputedStyle(l.contentWindow.document.body).backgroundColor):st.TRANSPARENT;f.backgroundColor=yt(p)?yt(C)?f.styles.backgroundColor:C:p}}catch{}return f}return i})(We),dQ=["OL","UL","MENU"],Bo=function(s,i,c,l){for(var f=i.firstChild,p=void 0;f;f=p)if(p=f.nextSibling,Gc(f)&&f.data.trim().length>0)c.textNodes.push(new nQ(s,f,c.styles));else if(an(f))if(Jc(f)&&f.assignedNodes)f.assignedNodes().forEach(function(y){return Bo(s,y,c,l)});else{var C=Vc(s,f);C.styles.isVisible()&&(fQ(f,C,l)?C.flags|=4:gQ(C.styles)&&(C.flags|=2),dQ.indexOf(f.tagName)!==-1&&(C.flags|=8),c.elements.push(C),f.slot,f.shadowRoot?Bo(s,f.shadowRoot,C,l):!mo(f)&&!zc(f)&&!wo(f)&&Bo(s,f,C,l))}},Vc=function(s,i){return $i(i)?new Nc(s,i):Xc(i)?new Lc(s,i):zc(i)?new Tc(s,i):hQ(i)?new kc(s,i):BQ(i)?new Pi(s,i):pQ(i)?new Gi(s,i):wo(i)?new Kc(s,i):mo(i)?new Oc(s,i):Wc(i)?new Rc(s,i):new We(s,i)},Pc=function(s,i){var c=Vc(s,i);return c.flags|=4,Bo(s,i,c,c),c},fQ=function(s,i,c){return i.styles.isPositionedWithZIndex()||i.styles.opacity<1||i.styles.isTransformed()||Xi(s)&&c.styles.isTransparent()},gQ=function(s){return s.isPositioned()||s.isFloating()},Gc=function(s){return s.nodeType===Node.TEXT_NODE},an=function(s){return s.nodeType===Node.ELEMENT_NODE},zi=function(s){return an(s)&&typeof s.style<"u"&&!po(s)},po=function(s){return typeof s.className=="object"},hQ=function(s){return s.tagName==="LI"},BQ=function(s){return s.tagName==="OL"},pQ=function(s){return s.tagName==="INPUT"},mQ=function(s){return s.tagName==="HTML"},zc=function(s){return s.tagName==="svg"},Xi=function(s){return s.tagName==="BODY"},Xc=function(s){return s.tagName==="CANVAS"},$c=function(s){return s.tagName==="VIDEO"},$i=function(s){return s.tagName==="IMG"},Wc=function(s){return s.tagName==="IFRAME"},Yc=function(s){return s.tagName==="STYLE"},wQ=function(s){return s.tagName==="SCRIPT"},mo=function(s){return s.tagName==="TEXTAREA"},wo=function(s){return s.tagName==="SELECT"},Jc=function(s){return s.tagName==="SLOT"},Zc=function(s){return s.tagName.indexOf("-")>0},CQ=(function(){function s(){this.counters={}}return s.prototype.getCounterValue=function(i){var c=this.counters[i];return c&&c.length?c[c.length-1]:1},s.prototype.getCounterValues=function(i){var c=this.counters[i];return c||[]},s.prototype.pop=function(i){var c=this;i.forEach(function(l){return c.counters[l].pop()})},s.prototype.parse=function(i){var c=this,l=i.counterIncrement,f=i.counterReset,p=!0;l!==null&&l.forEach(function(y){var E=c.counters[y.counter];E&&y.increment!==0&&(p=!1,E.length||E.push(1),E[Math.max(0,E.length-1)]+=y.increment)});var C=[];return p&&f.forEach(function(y){var E=c.counters[y.counter];C.push(y.counter),E||(E=c.counters[y.counter]=[]),E.push(y.reset)}),C},s})(),jc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},qc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},vQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},yQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ln=function(s,i,c,l,f,p){return s<i||s>c?jn(s,f,p.length>0):l.integers.reduce(function(C,y,E){for(;s>=y;)s-=y,C+=l.values[E];return C},"")+p},Au=function(s,i,c,l){var f="";do c||s--,f=l(s)+f,s/=i;while(s*i>=i);return f},oe=function(s,i,c,l,f){var p=c-i+1;return(s<0?"-":"")+(Au(Math.abs(s),p,l,function(C){return m(Math.floor(C%p)+i)})+f)},Ot=function(s,i,c){c===void 0&&(c=". ");var l=i.length;return Au(Math.abs(s),l,!1,function(f){return i[Math.floor(f%l)]})+c},cn=1,Et=2,Ut=4,Zn=8,at=function(s,i,c,l,f,p){if(s<-9999||s>9999)return jn(s,4,f.length>0);var C=Math.abs(s),y=f;if(C===0)return i[0]+y;for(var E=0;C>0&&E<=4;E++){var x=C%10;x===0&&de(p,cn)&&y!==""?y=i[x]+y:x>1||x===1&&E===0||x===1&&E===1&&de(p,Et)||x===1&&E===1&&de(p,Ut)&&s>100||x===1&&E>1&&de(p,Zn)?y=i[x]+(E>0?c[E-1]:"")+y:x===1&&E>0&&(y=c[E-1]+y),C=Math.floor(C/10)}return(s<0?l:"")+y},eu="十百千萬",tu="拾佰仟萬",nu="マイナス",Wi="마이너스",jn=function(s,i,c){var l=c?". ":"",f=c?"、":"",p=c?", ":"",C=c?" ":"";switch(i){case 0:return"•"+C;case 1:return"◦"+C;case 2:return"◾"+C;case 5:var y=oe(s,48,57,!0,l);return y.length<4?"0"+y:y;case 4:return Ot(s,"〇一二三四五六七八九",f);case 6:return ln(s,1,3999,jc,3,l).toLowerCase();case 7:return ln(s,1,3999,jc,3,l);case 8:return oe(s,945,969,!1,l);case 9:return oe(s,97,122,!1,l);case 10:return oe(s,65,90,!1,l);case 11:return oe(s,1632,1641,!0,l);case 12:case 49:return ln(s,1,9999,qc,3,l);case 35:return ln(s,1,9999,qc,3,l).toLowerCase();case 13:return oe(s,2534,2543,!0,l);case 14:case 30:return oe(s,6112,6121,!0,l);case 15:return Ot(s,"子丑寅卯辰巳午未申酉戌亥",f);case 16:return Ot(s,"甲乙丙丁戊己庚辛壬癸",f);case 17:case 48:return at(s,"零一二三四五六七八九",eu,"負",f,Et|Ut|Zn);case 47:return at(s,"零壹貳參肆伍陸柒捌玖",tu,"負",f,cn|Et|Ut|Zn);case 42:return at(s,"零一二三四五六七八九",eu,"负",f,Et|Ut|Zn);case 41:return at(s,"零壹贰叁肆伍陆柒捌玖",tu,"负",f,cn|Et|Ut|Zn);case 26:return at(s,"〇一二三四五六七八九","十百千万",nu,f,0);case 25:return at(s,"零壱弐参四伍六七八九","拾百千万",nu,f,cn|Et|Ut);case 31:return at(s,"영일이삼사오육칠팔구","십백천만",Wi,p,cn|Et|Ut);case 33:return at(s,"零一二三四五六七八九","十百千萬",Wi,p,0);case 32:return at(s,"零壹貳參四五六七八九","拾百千",Wi,p,cn|Et|Ut);case 18:return oe(s,2406,2415,!0,l);case 20:return ln(s,1,19999,yQ,3,l);case 21:return oe(s,2790,2799,!0,l);case 22:return oe(s,2662,2671,!0,l);case 22:return ln(s,1,10999,vQ,3,l);case 23:return Ot(s,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ot(s,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return oe(s,3302,3311,!0,l);case 28:return Ot(s,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",f);case 29:return Ot(s,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",f);case 34:return oe(s,3792,3801,!0,l);case 37:return oe(s,6160,6169,!0,l);case 38:return oe(s,4160,4169,!0,l);case 39:return oe(s,2918,2927,!0,l);case 40:return oe(s,1776,1785,!0,l);case 43:return oe(s,3046,3055,!0,l);case 44:return oe(s,3174,3183,!0,l);case 45:return oe(s,3664,3673,!0,l);case 46:return oe(s,3872,3881,!0,l);default:return oe(s,48,57,!0,l)}},ru="data-html2canvas-ignore",ou=(function(){function s(i,c,l){if(this.context=i,this.options=l,this.scrolledElements=[],this.referenceElement=c,this.counters=new CQ,this.quoteDepth=0,!c.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(c.ownerDocument.documentElement,!1)}return s.prototype.toIFrame=function(i,c){var l=this,f=QQ(i,c);if(!f.contentWindow)return Promise.reject("Unable to find iframe window");var p=i.defaultView.pageXOffset,C=i.defaultView.pageYOffset,y=f.contentWindow,E=y.document,x=FQ(f).then(function(){return a(l,void 0,void 0,function(){var O,G;return u(this,function(Z){switch(Z.label){case 0:return this.scrolledElements.forEach(_Q),y&&(y.scrollTo(c.left,c.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(y.scrollY!==c.top||y.scrollX!==c.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(y.scrollX-c.left,y.scrollY-c.top,0,0))),O=this.options.onclone,G=this.clonedReferenceElement,typeof G>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:E.fonts&&E.fonts.ready?[4,E.fonts.ready]:[3,2];case 1:Z.sent(),Z.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,UQ(E)]:[3,4];case 3:Z.sent(),Z.label=4;case 4:return typeof O=="function"?[2,Promise.resolve().then(function(){return O(E,G)}).then(function(){return f})]:[2,f]}})})});return E.open(),E.write(HQ(document.doctype)+"<html></html>"),IQ(this.referenceElement.ownerDocument,p,C),E.replaceChild(E.adoptNode(this.documentElement),E.documentElement),E.close(),x},s.prototype.createElementClone=function(i){if(Si(i,2))debugger;if(Xc(i))return this.createCanvasClone(i);if($c(i))return this.createVideoClone(i);if(Yc(i))return this.createStyleClone(i);var c=i.cloneNode(!1);return $i(c)&&($i(i)&&i.currentSrc&&i.currentSrc!==i.src&&(c.src=i.currentSrc,c.srcset=""),c.loading==="lazy"&&(c.loading="eager")),Zc(c)?this.createCustomElementClone(c):c},s.prototype.createCustomElementClone=function(i){var c=document.createElement("html2canvascustomelement");return Yi(i.style,c),c},s.prototype.createStyleClone=function(i){try{var c=i.sheet;if(c&&c.cssRules){var l=[].slice.call(c.cssRules,0).reduce(function(p,C){return C&&typeof C.cssText=="string"?p+C.cssText:p},""),f=i.cloneNode(!1);return f.textContent=l,f}}catch(p){if(this.context.logger.error("Unable to access cssRules property",p),p.name!=="SecurityError")throw p}return i.cloneNode(!1)},s.prototype.createCanvasClone=function(i){var c;if(this.options.inlineImages&&i.ownerDocument){var l=i.ownerDocument.createElement("img");try{return l.src=i.toDataURL(),l}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",i)}}var f=i.cloneNode(!1);try{f.width=i.width,f.height=i.height;var p=i.getContext("2d"),C=f.getContext("2d");if(C)if(!this.options.allowTaint&&p)C.putImageData(p.getImageData(0,0,i.width,i.height),0,0);else{var y=(c=i.getContext("webgl2"))!==null&&c!==void 0?c:i.getContext("webgl");if(y){var E=y.getContextAttributes();E?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",i)}C.drawImage(i,0,0)}return f}catch{this.context.logger.info("Unable to clone canvas as it is tainted",i)}return f},s.prototype.createVideoClone=function(i){var c=i.ownerDocument.createElement("canvas");c.width=i.offsetWidth,c.height=i.offsetHeight;var l=c.getContext("2d");try{return l&&(l.drawImage(i,0,0,c.width,c.height),this.options.allowTaint||l.getImageData(0,0,c.width,c.height)),c}catch{this.context.logger.info("Unable to clone video as it is tainted",i)}var f=i.ownerDocument.createElement("canvas");return f.width=i.offsetWidth,f.height=i.offsetHeight,f},s.prototype.appendChildNode=function(i,c,l){(!an(c)||!wQ(c)&&!c.hasAttribute(ru)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(c)))&&(!this.options.copyStyles||!an(c)||!Yc(c))&&i.appendChild(this.cloneNode(c,l))},s.prototype.cloneChildNodes=function(i,c,l){for(var f=this,p=i.shadowRoot?i.shadowRoot.firstChild:i.firstChild;p;p=p.nextSibling)if(an(p)&&Jc(p)&&typeof p.assignedNodes=="function"){var C=p.assignedNodes();C.length&&C.forEach(function(y){return f.appendChildNode(c,y,l)})}else this.appendChildNode(c,p,l)},s.prototype.cloneNode=function(i,c){if(Gc(i))return document.createTextNode(i.data);if(!i.ownerDocument)return i.cloneNode(!1);var l=i.ownerDocument.defaultView;if(l&&an(i)&&(zi(i)||po(i))){var f=this.createElementClone(i);f.style.transitionProperty="none";var p=l.getComputedStyle(i),C=l.getComputedStyle(i,":before"),y=l.getComputedStyle(i,":after");this.referenceElement===i&&zi(f)&&(this.clonedReferenceElement=f),Xi(f)&&DQ(f);var E=this.counters.parse(new wc(this.context,p)),x=this.resolvePseudoContent(i,f,C,qn.BEFORE);Zc(i)&&(c=!0),$c(i)||this.cloneChildNodes(i,f,c),x&&f.insertBefore(x,f.firstChild);var O=this.resolvePseudoContent(i,f,y,qn.AFTER);return O&&f.appendChild(O),this.counters.pop(E),(p&&(this.options.copyStyles||po(i))&&!Wc(i)||c)&&Yi(p,f),(i.scrollTop!==0||i.scrollLeft!==0)&&this.scrolledElements.push([f,i.scrollLeft,i.scrollTop]),(mo(i)||wo(i))&&(mo(f)||wo(f))&&(f.value=i.value),f}return i.cloneNode(!1)},s.prototype.resolvePseudoContent=function(i,c,l,f){var p=this;if(l){var C=l.content,y=c.ownerDocument;if(!(!y||!C||C==="none"||C==="-moz-alt-content"||l.display==="none")){this.counters.parse(new wc(this.context,l));var E=new vy(this.context,l),x=y.createElement("html2canvaspseudoelement");Yi(l,x),E.content.forEach(function(G){if(G.type===0)x.appendChild(y.createTextNode(G.value));else if(G.type===22){var Z=y.createElement("img");Z.src=G.value,Z.style.opacity="1",x.appendChild(Z)}else if(G.type===18){if(G.name==="attr"){var vA=G.values.filter(JA);vA.length&&x.appendChild(y.createTextNode(i.getAttribute(vA[0].value)||""))}else if(G.name==="counter"){var gA=G.values.filter(on),mA=gA[0],OA=gA[1];if(mA&&JA(mA)){var SA=p.counters.getCounterValue(mA.value),_A=OA&&JA(OA)?_i.parse(p.context,OA.value):3;x.appendChild(y.createTextNode(jn(SA,_A,!1)))}}else if(G.name==="counters"){var Ae=G.values.filter(on),mA=Ae[0],zA=Ae[1],OA=Ae[2];if(mA&&JA(mA)){var TA=p.counters.getCounterValues(mA.value),EA=OA&&JA(OA)?_i.parse(p.context,OA.value):3,PA=zA&&zA.type===0?zA.value:"",GA=TA.map(function(ye){return jn(ye,EA,!1)}).join(PA);x.appendChild(y.createTextNode(GA))}}}else if(G.type===20)switch(G.value){case"open-quote":x.appendChild(y.createTextNode(mc(E.quotes,p.quoteDepth++,!0)));break;case"close-quote":x.appendChild(y.createTextNode(mc(E.quotes,--p.quoteDepth,!1)));break;default:x.appendChild(y.createTextNode(G.value))}}),x.className=Ji+" "+Zi;var O=f===qn.BEFORE?" "+Ji:" "+Zi;return po(c)?c.className.baseValue+=O:c.className+=O,x}}},s.destroy=function(i){return i.parentNode?(i.parentNode.removeChild(i),!0):!1},s})(),qn;(function(s){s[s.BEFORE=0]="BEFORE",s[s.AFTER=1]="AFTER"})(qn||(qn={}));var QQ=function(s,i){var c=s.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i.width.toString(),c.height=i.height.toString(),c.scrolling="no",c.setAttribute(ru,"true"),s.body.appendChild(c),c},EQ=function(s){return new Promise(function(i){if(s.complete){i();return}if(!s.src){i();return}s.onload=i,s.onerror=i})},UQ=function(s){return Promise.all([].slice.call(s.images,0).map(EQ))},FQ=function(s){return new Promise(function(i,c){var l=s.contentWindow;if(!l)return c("No window assigned for iframe");var f=l.document;l.onload=s.onload=function(){l.onload=s.onload=null;var p=setInterval(function(){f.body.childNodes.length>0&&f.readyState==="complete"&&(clearInterval(p),i(s))},50)}})},bQ=["all","d","content"],Yi=function(s,i){for(var c=s.length-1;c>=0;c--){var l=s.item(c);bQ.indexOf(l)===-1&&i.style.setProperty(l,s.getPropertyValue(l))}return i},HQ=function(s){var i="";return s&&(i+="<!DOCTYPE ",s.name&&(i+=s.name),s.internalSubset&&(i+=s.internalSubset),s.publicId&&(i+='"'+s.publicId+'"'),s.systemId&&(i+='"'+s.systemId+'"'),i+=">"),i},IQ=function(s,i,c){s&&s.defaultView&&(i!==s.defaultView.pageXOffset||c!==s.defaultView.pageYOffset)&&s.defaultView.scrollTo(i,c)},_Q=function(s){var i=s[0],c=s[1],l=s[2];i.scrollLeft=c,i.scrollTop=l},SQ=":before",xQ=":after",Ji="___html2canvas___pseudoelement_before",Zi="___html2canvas___pseudoelement_after",iu=`{
31
+ "Microsoft YaHei", "WenQuanYi Zen Hei", sans-serif`,B.lineWidth=1,B.textBaseline="middle")}},d=g=>{const B={scale:e.scale,width:e.width,height:e.height,palette:e.palette,ratio:g};t.canvasContext&&Mw(t.canvasContext,e.start,e.selectStart,e.selectLength,B,!e.vertical)};return(0,qA.watch)(()=>e.start,()=>d(n)),(0,qA.watch)([()=>e.width,()=>e.height],()=>{u(n),d(n)}),{handle:(g,B)=>{const m=((v,Q,H)=>Math.round(Q+v/H))(e.vertical?g.offsetY:g.offsetX,e.start,e.scale);switch(B){case"click":A("onAddLine",m);break;case"enter":A("update:valueNum",m),A("update:showIndicator",!0);break;default:A("update:valueNum",m);break}},canvas:o}}});function Ow(e,A,t,n,o,a){return(0,r.openBlock)(),(0,r.createElementBlock)("canvas",{ref:"canvas",class:"ruler",onClick:A[0]||(A[0]=u=>e.handle(u,"click")),onMouseenter:A[1]||(A[1]=u=>e.handle(u,"enter")),onMousemove:A[2]||(A[2]=u=>e.handle(u,"move")),onMouseleave:A[3]||(A[3]=u=>e.$emit("update:showIndicator",!1))},null,544)}var Rw=(0,qA.defineComponent)({name:"RulerWrapper",components:{CanvasRuler:Pr(Kw,[["render",Ow]]),RulerLine:Tw},props:{scale:Number,ratio:Number,thick:Number,palette:Object,vertical:{type:Boolean,default:!0},width:{type:Number,default:200},height:{type:Number,default:200},start:{type:Number,default:0},lines:{type:Array,default:()=>[]},selectStart:{type:Number},selectLength:{type:Number},isShowReferLine:{type:Boolean}},setup(e){const A=(0,qA.ref)(!1),t=(0,qA.ref)(0),n=(0,qA.computed)(()=>e.vertical?"v-container":"h-container"),o=(0,qA.computed)(()=>{const g={width:`calc(100% - ${e.thick}px)`,height:`${e.thick+1}px`,left:`${e.thick}px`},B={width:`${e.thick&&e.thick+1}px`,height:`calc(100% - ${e.thick}px)`,top:`${e.thick}px`};return e.vertical?B:g}),a=(0,qA.computed)(()=>{var g;const B=(t.value-e.start)*e.scale;let w="top",m="borderLeft";return w=e.vertical?"top":"left",m=e.vertical?"borderBottom":"borderLeft",{[w]:B+"px",[m]:`1px solid ${(g=e.palette)==null?void 0:g.lineColor}`}}),u=g=>{e.lines.push(g)},d=(g,B)=>{const w=g-e.start,m=(e.vertical?e.height:e.width)/e.scale;w<0||w>m?h(B):e.lines[B]=g},h=g=>{e.lines.splice(g,1)};return{showIndicator:A,valueNum:t,rwClassName:n,rwStyle:o,indicatorStyle:a,handleNewLine:u,handleLineRelease:d,handleLineRemove:h}}}),Vw={class:"lines"},Pw={class:"value"};function Gw(e,A,t,n,o,a){const u=(0,r.resolveComponent)("CanvasRuler"),d=(0,r.resolveComponent)("RulerLine");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:(0,r.normalizeClass)(e.rwClassName),style:(0,r.normalizeStyle)(e.rwStyle)},[(0,r.createVNode)(u,{vertical:e.vertical,scale:e.scale,width:e.width,height:e.height,start:e.start,ratio:e.ratio,"select-start":e.selectStart,"select-length":e.selectLength,palette:e.palette,valueNum:e.valueNum,"onUpdate:valueNum":A[0]||(A[0]=h=>e.valueNum=h),showIndicator:e.showIndicator,"onUpdate:showIndicator":A[1]||(A[1]=h=>e.showIndicator=h),onOnAddLine:e.handleNewLine},null,8,["vertical","scale","width","height","start","ratio","select-start","select-length","palette","valueNum","showIndicator","onOnAddLine"]),(0,r.withDirectives)((0,r.createElementVNode)("div",Vw,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.lines,(h,g)=>((0,r.openBlock)(),(0,r.createBlock)(d,{key:h+g,index:g,value:h>>0,scale:e.scale,start:e.start,thick:e.thick,palette:e.palette,vertical:e.vertical,"is-show-refer-line":e.isShowReferLine,onOnRemove:e.handleLineRemove,onOnRelease:e.handleLineRelease},null,8,["index","value","scale","start","thick","palette","vertical","is-show-refer-line","onOnRemove","onOnRelease"]))),128))],512),[[r.vShow,e.isShowReferLine]]),(0,r.withDirectives)((0,r.createElementVNode)("div",{class:"indicator",style:(0,r.normalizeStyle)(e.indicatorStyle)},[(0,r.createElementVNode)("div",Pw,(0,r.toDisplayString)(e.valueNum),1)],4),[[r.vShow,e.showIndicator]])],6)}var zw=Pr(Rw,[["render",Gw],["__scopeId","data-v-5cc064d4"]]),Xw="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAopJREFUOE/FlE9IVEEcx7+/N9ouds1Mu0QUSFZYdIgoUqQoKPBQHsKozpXE7jbTO/U8xLJvn6usBHWQ6hBFXupSkQeVbh0KJEPp0sH+eLGTsKs77xcj78m0ax0E8cHjzZv5zef3/c33xxA24KENYGJzoEEQbNNaN4Zh2OQ4znwYhr9c1/39vwrXVDo0NNS0tLR0GYB5D64BmAMwzMyvlFKz1es10Hw+f4mZ7wHYBeA9gNdENFepVOaEEM3M3OI4Thczn41gt6WUgQ3+C+r7/h0AWQD3mXnYqPA8L9nQ0HCemduIaFpKOWoAhUJhT6VSuQXgOjP3K6W8GLwKzeVyp4jonR0QBEErM48w8zFLyayUsjX+z+VyHhHdZebTSqkxM78CHRgYOKS1/ghgVErZY214RkQ7ADyRUj72ff8qgCtmXUrZGcf5vv8CwEUhxOF0Ov1pBRpla5dSdseBhUJhpznH6tIsZb1KqacW+BGArUaUXX63UuplHJTNZjuEEONSyhozfd/n6mQ1RkXZL2itz7mu+80EDA4ONi8vL/8AcM2UbikyR2BU9cSmmTU70YqKIAj2hWFo2uenlHK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TkmZmZHUtLSzUR2QXsBhaAL6r6DXhbrVYXi1yss59GqOgub/bN3Z7v6X/tb9Zmp/q/kN8s+lJb8oEAAAAASUVORK5CYII=",Ww=(0,qA.defineComponent)({name:"SketchRule",components:{RulerWrapper:zw},props:{eyeIcon:{type:String},closeEyeIcon:{type:String},scale:{type:Number,default:1},ratio:{type:Number},thick:{type:Number,default:16},palette:Object,startX:{type:Number},startY:{type:Number,default:0},width:{type:Number,default:200},height:{type:Number,default:200},shadow:{type:Object,default:()=>({x:0,y:0,width:0,height:0})},lines:{type:Object,default:()=>({h:[],v:[]})},isShowReferLine:{type:Boolean,default:!0}},emits:["onCornerClick","handleLine"],setup(e,{emit:A}){let t=(0,qA.ref)(!0);t.value=e.isShowReferLine;const n=(0,qA.computed)(()=>{function u(d,h){return Object.keys(d).forEach(g=>{g&&d.hasOwnProperty(g)&&(typeof h.key=="object"?d[g]=u(d[g],h[g]):h.hasOwnProperty(g)&&(d[g]=h[g]))}),d}return u({bgColor:"rgba(225,225,225, 0)",longfgColor:"#BABBBC",shortfgColor:"#C8CDD0",fontColor:"#7D8694",shadowColor:"#E8E8E8",lineColor:"#EB5648",borderColor:"#DADADC",cornerActiveColor:"rgb(235, 86, 72, 0.6)",menu:{bgColor:"#fff",dividerColor:"#DBDBDB",listItem:{textColor:"#415058",hoverTextColor:"#298DF8",disabledTextColor:"rgba(65, 80, 88, 0.4)",bgColor:"#fff",hoverBgColor:"#F2F2F2"}}},e.palette||{})}),o=(0,qA.computed)(()=>({backgroundImage:t.value?`url(${e.eyeIcon||Xw})`:`url(${e.closeEyeIcon||$w})`,width:e.thick+"px",height:e.thick+"px",borderRight:`1px solid ${n.value.borderColor}`,borderBottom:`1px solid ${n.value.borderColor}`})),a=u=>{t.value=!t.value,A("handleCornerClick",t.value)};return(0,qA.watch)([()=>e.isShowReferLine],()=>{t.value=e.isShowReferLine}),{showReferLine:t,paletteCpu:n,cornerStyle:o,onCornerClick:a}}}),Yw={id:"mb-ruler",class:"style-ruler mb-ruler"};function Jw(e,A,t,n,o,a){const u=(0,r.resolveComponent)("RulerWrapper");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Yw,[(0,r.createVNode)(u,{vertical:!1,width:e.width,height:e.thick,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startX,lines:e.lines.h,"select-start":e.shadow.x,"select-length":e.shadow.width,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,r.createVNode)(u,{vertical:!0,width:e.thick,height:e.height,"is-show-refer-line":e.showReferLine,thick:e.thick,ratio:e.ratio,start:e.startY,lines:e.lines.v,"select-start":e.shadow.y,"select-length":e.shadow.height,scale:e.scale,palette:e.paletteCpu},null,8,["width","height","is-show-refer-line","thick","ratio","start","lines","select-start","select-length","scale","palette"]),(0,r.createElementVNode)("a",{class:"corner",style:(0,r.normalizeStyle)(e.cornerStyle),onClick:A[0]||(A[0]=(...d)=>e.onCornerClick&&e.onCornerClick(...d))},null,4)])}var Zw=Pr(Ww,[["render",Jw]]),jw=Eu(((e,A)=>{(function(t,n){typeof e=="object"&&typeof A<"u"?A.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.html2canvas=n())})(e,(function(){"use strict";var t=function(s,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(c[f]=l[f])},t(s,i)};function n(s,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(s,i);function c(){this.constructor=s}s.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}var o=function(){return o=Object.assign||function(i){for(var c,l=1,f=arguments.length;l<f;l++){c=arguments[l];for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(i[p]=c[p])}return i},o.apply(this,arguments)};function a(s,i,c,l){function f(p){return p instanceof c?p:new c(function(C){C(p)})}return new(c||(c=Promise))(function(p,C){function y(M){try{D(l.next(M))}catch(G){C(G)}}function E(M){try{D(l.throw(M))}catch(G){C(G)}}function D(M){M.done?p(M.value):f(M.value).then(y,E)}D((l=l.apply(s,i||[])).next())})}function u(s,i){var c={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},l,f,p,C;return C={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function y(D){return function(M){return E([D,M])}}function E(D){if(l)throw new TypeError("Generator is already executing.");for(;c;)try{if(l=1,f&&(p=D[0]&2?f.return:D[0]?f.throw||((p=f.return)&&p.call(f),0):f.next)&&!(p=p.call(f,D[1])).done)return p;switch(f=0,p&&(D=[D[0]&2,p.value]),D[0]){case 0:case 1:p=D;break;case 4:return c.label++,{value:D[1],done:!1};case 5:c.label++,f=D[1],D=[0];continue;case 7:D=c.ops.pop(),c.trys.pop();continue;default:if(p=c.trys,!(p=p.length>0&&p[p.length-1])&&(D[0]===6||D[0]===2)){c=0;continue}if(D[0]===3&&(!p||D[1]>p[0]&&D[1]<p[3])){c.label=D[1];break}if(D[0]===6&&c.label<p[1]){c.label=p[1],p=D;break}if(p&&c.label<p[2]){c.label=p[2],c.ops.push(D);break}p[2]&&c.ops.pop(),c.trys.pop();continue}D=i.call(s,c)}catch(M){D=[6,M],f=0}finally{l=p=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}function d(s,i,c){if(c||arguments.length===2)for(var l=0,f=i.length,p;l<f;l++)(p||!(l in i))&&(p||(p=Array.prototype.slice.call(i,0,l)),p[l]=i[l]);return s.concat(p||i)}for(var h=(function(){function s(i,c,l,f){this.left=i,this.top=c,this.width=l,this.height=f}return s.prototype.add=function(i,c,l,f){return new s(this.left+i,this.top+c,this.width+l,this.height+f)},s.fromClientRect=function(i,c){return new s(c.left+i.windowBounds.left,c.top+i.windowBounds.top,c.width,c.height)},s.fromDOMRectList=function(i,c){var l=Array.from(c).find(function(f){return f.width!==0});return l?new s(l.left+i.windowBounds.left,l.top+i.windowBounds.top,l.width,l.height):s.EMPTY},s.EMPTY=new s(0,0,0,0),s})(),g=function(s,i){return h.fromClientRect(s,i.getBoundingClientRect())},B=function(s){var i=s.body,c=s.documentElement;if(!i||!c)throw new Error("Unable to get document size");return new h(0,0,Math.max(Math.max(i.scrollWidth,c.scrollWidth),Math.max(i.offsetWidth,c.offsetWidth),Math.max(i.clientWidth,c.clientWidth)),Math.max(Math.max(i.scrollHeight,c.scrollHeight),Math.max(i.offsetHeight,c.offsetHeight),Math.max(i.clientHeight,c.clientHeight)))},w=function(s){for(var i=[],c=0,l=s.length;c<l;){var f=s.charCodeAt(c++);if(f>=55296&&f<=56319&&c<l){var p=s.charCodeAt(c++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),c--)}else i.push(f)}return i},m=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var c=s.length;if(!c)return"";for(var l=[],f=-1,p="";++f<c;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===c||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q=typeof Uint8Array>"u"?[]:new Uint8Array(256),H=0;H<v.length;H++)Q[v.charCodeAt(H)]=H;for(var N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=typeof Uint8Array>"u"?[]:new Uint8Array(256),R=0;R<N.length;R++)L[N.charCodeAt(R)]=R;for(var U=function(s){var i=s.length*.75,c=s.length,l,f=0,p,C,y,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var D=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),M=Array.isArray(D)?D:new Uint8Array(D);for(l=0;l<c;l+=4)p=L[s.charCodeAt(l)],C=L[s.charCodeAt(l+1)],y=L[s.charCodeAt(l+2)],E=L[s.charCodeAt(l+3)],M[f++]=p<<2|C>>4,M[f++]=(C&15)<<4|y>>2,M[f++]=(y&3)<<6|E&63;return D},k=function(s){for(var i=s.length,c=[],l=0;l<i;l+=2)c.push(s[l+1]<<8|s[l]);return c},eA=function(s){for(var i=s.length,c=[],l=0;l<i;l+=4)c.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return c},Y=5,sA=11,lA=2,nA=sA-Y,tA=65536>>Y,AA=(1<<Y)-1,T=tA+(1024>>Y)+32,aA=65536>>sA,I=(1<<nA)-1,J=function(s,i,c){return s.slice?s.slice(i,c):new Uint16Array(Array.prototype.slice.call(s,i,c))},F=function(s,i,c){return s.slice?s.slice(i,c):new Uint32Array(Array.prototype.slice.call(s,i,c))},S=function(s,i){var c=U(s),l=Array.isArray(c)?eA(c):new Uint32Array(c),f=Array.isArray(c)?k(c):new Uint16Array(c),p=24,C=J(f,p/2,l[4]/2),y=l[5]===2?J(f,(p+l[4])/2):F(l,Math.ceil((p+l[4])/4));return new V(l[0],l[1],l[2],l[3],C,y)},V=(function(){function s(i,c,l,f,p,C){this.initialValue=i,this.errorValue=c,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var c;if(i>=0){if(i<55296||i>56319&&i<=65535)return c=this.index[i>>Y],c=(c<<lA)+(i&AA),this.data[c];if(i<=65535)return c=this.index[tA+(i-55296>>Y)],c=(c<<lA)+(i&AA),this.data[c];if(i<this.highStart)return c=T-aA+(i>>sA),c=this.index[c],c+=i>>Y&I,c=this.index[c],c=(c<<lA)+(i&AA),this.data[c];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy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dQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcs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CIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB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wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMA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AAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAF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eAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHA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AQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBV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AAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4A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KwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQ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4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",uA=50,FA=1,P=2,W=3,X=4,oA=5,hA=7,wA=8,bA=9,cA=10,mA=11,_=12,b=13,x=14,$=15,K=16,BA=17,gA=18,HA=19,CA=20,LA=21,KA=22,XA=23,ue=24,re=25,nt=26,pt=27,ze=28,Hl=29,iA=30,fA=31,xA=32,kA=33,rt=34,Mn=35,Tt=36,kt=37,Kn=38,tn=39,VA=40,Me=41,ot=42,b0=43,H0=[9001,65288],Il="!",RA="×",Gr="÷",Ci=S(rA),it=[iA,Tt],vi=[FA,P,W,oA],_l=[cA,wA],Sl=[pt,nt],I0=vi.concat(_l),xl=[Kn,tn,VA,rt,Mn],_0=[$,b],S0=function(s,i){i===void 0&&(i="strict");var c=[],l=[],f=[];return s.forEach(function(p,C){var y=Ci.get(p);if(y>uA?(f.push(!0),y-=uA):f.push(!1),["normal","auto","loose"].indexOf(i)!==-1&&[8208,8211,12316,12448].indexOf(p)!==-1)return l.push(C),c.push(K);if(y===X||y===mA){if(C===0)return l.push(C),c.push(iA);var E=c[C-1];return I0.indexOf(E)===-1?(l.push(l[C-1]),c.push(E)):(l.push(C),c.push(iA))}if(l.push(C),y===fA)return c.push(i==="strict"?LA:kt);if(y===ot||y===Hl)return c.push(iA);if(y===b0)return p>=131072&&p<=196605||p>=196608&&p<=262141?c.push(kt):c.push(iA);c.push(y)}),[l,c,f]},yi=function(s,i,c,l){var f=l[c];if(Array.isArray(s)?s.indexOf(f)!==-1:s===f)for(var p=c;p<=l.length;){p++;var C=l[p];if(C===i)return!0;if(C!==cA)break}if(f===cA)for(var p=c;p>0;){p--;var y=l[p];if(Array.isArray(s)?s.indexOf(y)!==-1:s===y)for(var E=c;E<=l.length;){E++;var C=l[E];if(C===i)return!0;if(C!==cA)break}if(y!==cA)break}return!1},Dl=function(s,i){for(var c=s;c>=0;){var l=i[c];if(l===cA)c--;else return l}return 0},x0=function(s,i,c,l,f){if(c[l]===0)return RA;var p=l-1;if(Array.isArray(f)&&f[p]===!0)return RA;var C=p-1,y=p+1,E=i[p],D=C>=0?i[C]:0,M=i[y];if(E===P&&M===W)return RA;if(vi.indexOf(E)!==-1)return Il;if(vi.indexOf(M)!==-1||_l.indexOf(M)!==-1)return RA;if(Dl(p,i)===wA)return Gr;if(Ci.get(s[p])===mA||(E===xA||E===kA)&&Ci.get(s[y])===mA||E===hA||M===hA||E===bA||[cA,b,$].indexOf(E)===-1&&M===bA||[BA,gA,HA,ue,ze].indexOf(M)!==-1||Dl(p,i)===KA||yi(XA,KA,p,i)||yi([BA,gA],LA,p,i)||yi(_,_,p,i))return RA;if(E===cA)return Gr;if(E===XA||M===XA)return RA;if(M===K||E===K)return Gr;if([b,$,LA].indexOf(M)!==-1||E===x||D===Tt&&_0.indexOf(E)!==-1||E===ze&&M===Tt||M===CA||it.indexOf(M)!==-1&&E===re||it.indexOf(E)!==-1&&M===re||E===pt&&[kt,xA,kA].indexOf(M)!==-1||[kt,xA,kA].indexOf(E)!==-1&&M===nt||it.indexOf(E)!==-1&&Sl.indexOf(M)!==-1||Sl.indexOf(E)!==-1&&it.indexOf(M)!==-1||[pt,nt].indexOf(E)!==-1&&(M===re||[KA,$].indexOf(M)!==-1&&i[y+1]===re)||[KA,$].indexOf(E)!==-1&&M===re||E===re&&[re,ze,ue].indexOf(M)!==-1)return RA;if([re,ze,ue,BA,gA].indexOf(M)!==-1)for(var G=p;G>=0;){var Z=i[G];if(Z===re)return RA;if([ze,ue].indexOf(Z)!==-1)G--;else break}if([pt,nt].indexOf(M)!==-1)for(var G=[BA,gA].indexOf(E)!==-1?C:p;G>=0;){var Z=i[G];if(Z===re)return RA;if([ze,ue].indexOf(Z)!==-1)G--;else break}if(Kn===E&&[Kn,tn,rt,Mn].indexOf(M)!==-1||[tn,rt].indexOf(E)!==-1&&[tn,VA].indexOf(M)!==-1||[VA,Mn].indexOf(E)!==-1&&M===VA||xl.indexOf(E)!==-1&&[CA,nt].indexOf(M)!==-1||xl.indexOf(M)!==-1&&E===pt||it.indexOf(E)!==-1&&it.indexOf(M)!==-1||E===ue&&it.indexOf(M)!==-1||it.concat(re).indexOf(E)!==-1&&M===KA&&H0.indexOf(s[y])===-1||it.concat(re).indexOf(M)!==-1&&E===gA)return RA;if(E===Me&&M===Me){for(var vA=c[p],dA=1;vA>0&&(vA--,i[vA]===Me);)dA++;if(dA%2!==0)return RA}return E===xA&&M===kA?RA:Gr},D0=function(s,i){i||(i={lineBreak:"normal",wordBreak:"normal"});var c=S0(s,i.lineBreak),l=c[0],f=c[1],p=c[2];(i.wordBreak==="break-all"||i.wordBreak==="break-word")&&(f=f.map(function(y){return[re,iA,ot].indexOf(y)!==-1?kt:y}));var C=i.wordBreak==="keep-all"?p.map(function(y,E){return y&&s[E]>=19968&&s[E]<=40959}):void 0;return[l,f,C]},N0=(function(){function s(i,c,l,f){this.codePoints=i,this.required=c===Il,this.start=l,this.end=f}return s.prototype.slice=function(){return m.apply(void 0,this.codePoints.slice(this.start,this.end))},s})(),L0=function(s,i){var c=w(s),l=D0(c,i),f=l[0],p=l[1],C=l[2],y=c.length,E=0,D=0;return{next:function(){if(D>=y)return{done:!0,value:null};for(var M=RA;D<y&&(M=x0(c,p,f,++D,C))===RA;);if(M!==RA||D===y){var G=new N0(c,M,E,D);return E=D,{value:G,done:!1}}return{done:!0,value:null}}}},T0=1,k0=2,On=4,Nl=8,zr=10,Ll=47,Rn=92,M0=9,K0=32,Xr=34,Vn=61,O0=35,R0=36,V0=37,$r=39,Wr=40,Pn=41,P0=95,ve=45,G0=33,z0=60,X0=62,$0=64,W0=91,Y0=93,J0=61,Z0=123,Yr=63,j0=125,Tl=124,q0=126,AC=128,kl=65533,Qi=42,Mt=43,eC=44,tC=58,nC=59,Gn=46,rC=0,oC=8,iC=11,sC=14,aC=31,lC=127,Xe=-1,Ml=48,Kl=97,Ol=101,cC=102,uC=117,dC=122,Rl=65,Vl=69,Pl=70,fC=85,gC=90,pe=function(s){return s>=Ml&&s<=57},hC=function(s){return s>=55296&&s<=57343},nn=function(s){return pe(s)||s>=Rl&&s<=Pl||s>=Kl&&s<=cC},BC=function(s){return s>=Kl&&s<=dC},pC=function(s){return s>=Rl&&s<=gC},mC=function(s){return BC(s)||pC(s)},wC=function(s){return s>=AC},Jr=function(s){return s===zr||s===M0||s===K0},Zr=function(s){return mC(s)||wC(s)||s===P0},Gl=function(s){return Zr(s)||pe(s)||s===ve},CC=function(s){return s>=rC&&s<=oC||s===iC||s>=sC&&s<=aC||s===lC},mt=function(s,i){return s!==Rn?!1:i!==zr},jr=function(s,i,c){return s===ve?Zr(i)||mt(i,c):Zr(s)?!0:!!(s===Rn&&mt(s,i))},Ei=function(s,i,c){return s===Mt||s===ve?pe(i)?!0:i===Gn&&pe(c):pe(s===Gn?i:s)},vC=function(s){var i=0,c=1;(s[i]===Mt||s[i]===ve)&&(s[i]===ve&&(c=-1),i++);for(var l=[];pe(s[i]);)l.push(s[i++]);var f=l.length?parseInt(m.apply(void 0,l),10):0;s[i]===Gn&&i++;for(var p=[];pe(s[i]);)p.push(s[i++]);var C=p.length,y=C?parseInt(m.apply(void 0,p),10):0;(s[i]===Vl||s[i]===Ol)&&i++;var E=1;(s[i]===Mt||s[i]===ve)&&(s[i]===ve&&(E=-1),i++);for(var D=[];pe(s[i]);)D.push(s[i++]);var M=D.length?parseInt(m.apply(void 0,D),10):0;return c*(f+y*Math.pow(10,-C))*Math.pow(10,E*M)},yC={type:2},QC={type:3},EC={type:4},UC={type:13},FC={type:8},bC={type:21},HC={type:9},IC={type:10},_C={type:11},SC={type:12},xC={type:14},qr={type:23},DC={type:1},NC={type:25},LC={type:24},TC={type:26},kC={type:27},MC={type:28},KC={type:29},OC={type:31},Ui={type:32},zl=(function(){function s(){this._value=[]}return s.prototype.write=function(i){this._value=this._value.concat(w(i))},s.prototype.read=function(){for(var i=[],c=this.consumeToken();c!==Ui;)i.push(c),c=this.consumeToken();return i},s.prototype.consumeToken=function(){var i=this.consumeCodePoint();switch(i){case Xr:return this.consumeStringToken(Xr);case O0:var c=this.peekCodePoint(0),l=this.peekCodePoint(1),f=this.peekCodePoint(2);if(Gl(c)||mt(l,f)){var p=jr(c,l,f)?k0:T0,C=this.consumeName();return{type:5,value:C,flags:p}}break;case R0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),UC;break;case $r:return this.consumeStringToken($r);case Wr:return yC;case Pn:return QC;case Qi:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),xC;break;case Mt:if(Ei(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case eC:return EC;case ve:var y=i,E=this.peekCodePoint(0),D=this.peekCodePoint(1);if(Ei(y,E,D))return this.reconsumeCodePoint(i),this.consumeNumericToken();if(jr(y,E,D))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();if(E===ve&&D===X0)return this.consumeCodePoint(),this.consumeCodePoint(),LC;break;case Gn:if(Ei(i,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(i),this.consumeNumericToken();break;case Ll:if(this.peekCodePoint(0)===Qi)for(this.consumeCodePoint();;){var M=this.consumeCodePoint();if(M===Qi&&(M=this.consumeCodePoint(),M===Ll))return this.consumeToken();if(M===Xe)return this.consumeToken()}break;case tC:return TC;case nC:return kC;case z0:if(this.peekCodePoint(0)===G0&&this.peekCodePoint(1)===ve&&this.peekCodePoint(2)===ve)return this.consumeCodePoint(),this.consumeCodePoint(),NC;break;case $0:if(jr(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2))){var C=this.consumeName();return{type:7,value:C}}break;case W0:return MC;case Rn:if(mt(i,this.peekCodePoint(0)))return this.reconsumeCodePoint(i),this.consumeIdentLikeToken();break;case Y0:return KC;case J0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),FC;break;case Z0:return _C;case j0:return SC;case uC:case fC:var G=this.peekCodePoint(0),Z=this.peekCodePoint(1);return G===Mt&&(nn(Z)||Z===Yr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(i),this.consumeIdentLikeToken();case Tl:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),HC;if(this.peekCodePoint(0)===Tl)return this.consumeCodePoint(),bC;break;case q0:if(this.peekCodePoint(0)===Vn)return this.consumeCodePoint(),IC;break;case Xe:return Ui}return Jr(i)?(this.consumeWhiteSpace(),OC):pe(i)?(this.reconsumeCodePoint(i),this.consumeNumericToken()):Zr(i)?(this.reconsumeCodePoint(i),this.consumeIdentLikeToken()):{type:6,value:m(i)}},s.prototype.consumeCodePoint=function(){var i=this._value.shift();return typeof i>"u"?-1:i},s.prototype.reconsumeCodePoint=function(i){this._value.unshift(i)},s.prototype.peekCodePoint=function(i){return i>=this._value.length?-1:this._value[i]},s.prototype.consumeUnicodeRangeToken=function(){for(var i=[],c=this.consumeCodePoint();nn(c)&&i.length<6;)i.push(c),c=this.consumeCodePoint();for(var l=!1;c===Yr&&i.length<6;)i.push(c),c=this.consumeCodePoint(),l=!0;if(l){var f=parseInt(m.apply(void 0,i.map(function(E){return E===Yr?Ml:E})),16),p=parseInt(m.apply(void 0,i.map(function(E){return E===Yr?Pl:E})),16);return{type:30,start:f,end:p}}var C=parseInt(m.apply(void 0,i),16);if(this.peekCodePoint(0)===ve&&nn(this.peekCodePoint(1))){this.consumeCodePoint(),c=this.consumeCodePoint();for(var y=[];nn(c)&&y.length<6;)y.push(c),c=this.consumeCodePoint();var p=parseInt(m.apply(void 0,y),16);return{type:30,start:C,end:p}}else return{type:30,start:C,end:C}},s.prototype.consumeIdentLikeToken=function(){var i=this.consumeName();return i.toLowerCase()==="url"&&this.peekCodePoint(0)===Wr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Wr?(this.consumeCodePoint(),{type:19,value:i}):{type:20,value:i}},s.prototype.consumeUrlToken=function(){var i=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Xe)return{type:22,value:""};var c=this.peekCodePoint(0);if(c===$r||c===Xr){var l=this.consumeStringToken(this.consumeCodePoint());return l.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Xe||this.peekCodePoint(0)===Pn)?(this.consumeCodePoint(),{type:22,value:l.value}):(this.consumeBadUrlRemnants(),qr)}for(;;){var f=this.consumeCodePoint();if(f===Xe||f===Pn)return{type:22,value:m.apply(void 0,i)};if(Jr(f))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Xe||this.peekCodePoint(0)===Pn?(this.consumeCodePoint(),{type:22,value:m.apply(void 0,i)}):(this.consumeBadUrlRemnants(),qr);if(f===Xr||f===$r||f===Wr||CC(f))return this.consumeBadUrlRemnants(),qr;if(f===Rn)if(mt(f,this.peekCodePoint(0)))i.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),qr;else i.push(f)}},s.prototype.consumeWhiteSpace=function(){for(;Jr(this.peekCodePoint(0));)this.consumeCodePoint()},s.prototype.consumeBadUrlRemnants=function(){for(;;){var i=this.consumeCodePoint();if(i===Pn||i===Xe)return;mt(i,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},s.prototype.consumeStringSlice=function(i){for(var c=5e4,l="";i>0;){var f=Math.min(c,i);l+=m.apply(void 0,this._value.splice(0,f)),i-=f}return this._value.shift(),l},s.prototype.consumeStringToken=function(i){var c="",l=0;do{var f=this._value[l];if(f===Xe||f===void 0||f===i)return c+=this.consumeStringSlice(l),{type:0,value:c};if(f===zr)return this._value.splice(0,l),DC;if(f===Rn){var p=this._value[l+1];p!==Xe&&p!==void 0&&(p===zr?(c+=this.consumeStringSlice(l),l=-1,this._value.shift()):mt(f,p)&&(c+=this.consumeStringSlice(l),c+=m(this.consumeEscapedCodePoint()),l=-1))}l++}while(!0)},s.prototype.consumeNumber=function(){var i=[],c=On,l=this.peekCodePoint(0);for((l===Mt||l===ve)&&i.push(this.consumeCodePoint());pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0);var f=this.peekCodePoint(1);if(l===Gn&&pe(f))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),c=Nl;pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());l=this.peekCodePoint(0),f=this.peekCodePoint(1);var p=this.peekCodePoint(2);if((l===Vl||l===Ol)&&((f===Mt||f===ve)&&pe(p)||pe(f)))for(i.push(this.consumeCodePoint(),this.consumeCodePoint()),c=Nl;pe(this.peekCodePoint(0));)i.push(this.consumeCodePoint());return[vC(i),c]},s.prototype.consumeNumericToken=function(){var i=this.consumeNumber(),c=i[0],l=i[1],f=this.peekCodePoint(0);return jr(f,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:c,flags:l,unit:this.consumeName()}:f===V0?(this.consumeCodePoint(),{type:16,number:c,flags:l}):{type:17,number:c,flags:l}},s.prototype.consumeEscapedCodePoint=function(){var i=this.consumeCodePoint();if(nn(i)){for(var c=m(i);nn(this.peekCodePoint(0))&&c.length<6;)c+=m(this.consumeCodePoint());Jr(this.peekCodePoint(0))&&this.consumeCodePoint();var l=parseInt(c,16);return l===0||hC(l)||l>1114111?kl:l}return i===Xe?kl:i},s.prototype.consumeName=function(){for(var i="";;){var c=this.consumeCodePoint();if(Gl(c))i+=m(c);else if(mt(c,this.peekCodePoint(0)))i+=m(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(c),i}},s})(),Xl=(function(){function s(i){this._tokens=i}return s.create=function(i){var c=new zl;return c.write(i),new s(c.read())},s.parseValue=function(i){return s.create(i).parseComponentValue()},s.parseValues=function(i){return s.create(i).parseComponentValues()},s.prototype.parseComponentValue=function(){for(var i=this.consumeToken();i.type===31;)i=this.consumeToken();if(i.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(i);var c=this.consumeComponentValue();do i=this.consumeToken();while(i.type===31);if(i.type===32)return c;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},s.prototype.parseComponentValues=function(){for(var i=[];;){var c=this.consumeComponentValue();if(c.type===32)return i;i.push(c),i.push()}},s.prototype.consumeComponentValue=function(){var i=this.consumeToken();switch(i.type){case 11:case 28:case 2:return this.consumeSimpleBlock(i.type);case 19:return this.consumeFunction(i)}return i},s.prototype.consumeSimpleBlock=function(i){for(var c={type:i,values:[]},l=this.consumeToken();;){if(l.type===32||VC(l,i))return c;this.reconsumeToken(l),c.values.push(this.consumeComponentValue()),l=this.consumeToken()}},s.prototype.consumeFunction=function(i){for(var c={name:i.value,values:[],type:18};;){var l=this.consumeToken();if(l.type===32||l.type===3)return c;this.reconsumeToken(l),c.values.push(this.consumeComponentValue())}},s.prototype.consumeToken=function(){var i=this._tokens.shift();return typeof i>"u"?Ui:i},s.prototype.reconsumeToken=function(i){this._tokens.unshift(i)},s})(),zn=function(s){return s.type===15},rn=function(s){return s.type===17},JA=function(s){return s.type===20},RC=function(s){return s.type===0},Fi=function(s,i){return JA(s)&&s.value===i},$l=function(s){return s.type!==31},on=function(s){return s.type!==31&&s.type!==4},$e=function(s){var i=[],c=[];return s.forEach(function(l){if(l.type===4){if(c.length===0)throw new Error("Error parsing function args, zero tokens for arg");i.push(c),c=[];return}l.type!==31&&c.push(l)}),c.length&&i.push(c),i},VC=function(s,i){return i===11&&s.type===12||i===28&&s.type===29?!0:i===2&&s.type===3},wt=function(s){return s.type===17||s.type===15},ae=function(s){return s.type===16||wt(s)},Wl=function(s){return s.length>1?[s[0],s[1]]:[s[0]]},ge={type:17,number:0,flags:On},bi={type:16,number:50,flags:On},Ct={type:16,number:100,flags:On},Xn=function(s,i,c){var l=s[0],f=s[1];return[jA(l,i),jA(typeof f<"u"?f:l,c)]},jA=function(s,i){if(s.type===16)return s.number/100*i;if(zn(s))switch(s.unit){case"rem":case"em":return 16*s.number;default:return s.number}return s.number},Yl="deg",Jl="grad",Zl="rad",jl="turn",Ao={name:"angle",parse:function(s,i){if(i.type===15)switch(i.unit){case Yl:return Math.PI*i.number/180;case Jl:return Math.PI/200*i.number;case Zl:return i.number;case jl:return Math.PI*2*i.number}throw new Error("Unsupported angle type")}},ql=function(s){return s.type===15&&(s.unit===Yl||s.unit===Jl||s.unit===Zl||s.unit===jl)},Ac=function(s){switch(s.filter(JA).map(function(i){return i.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ge,ge];case"to top":case"bottom":return Ie(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ge,Ct];case"to right":case"left":return Ie(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ct,Ct];case"to bottom":case"top":return Ie(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ct,ge];case"to left":case"right":return Ie(270)}return 0},Ie=function(s){return Math.PI*s/180},vt={name:"color",parse:function(s,i){if(i.type===18){var c=PC[i.name];if(typeof c>"u")throw new Error('Attempting to parse an unsupported color function "'+i.name+'"');return c(s,i.values)}if(i.type===5){if(i.value.length===3){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3);return Qt(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),1)}if(i.value.length===4){var l=i.value.substring(0,1),f=i.value.substring(1,2),p=i.value.substring(2,3),C=i.value.substring(3,4);return Qt(parseInt(l+l,16),parseInt(f+f,16),parseInt(p+p,16),parseInt(C+C,16)/255)}if(i.value.length===6){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6);return Qt(parseInt(l,16),parseInt(f,16),parseInt(p,16),1)}if(i.value.length===8){var l=i.value.substring(0,2),f=i.value.substring(2,4),p=i.value.substring(4,6),C=i.value.substring(6,8);return Qt(parseInt(l,16),parseInt(f,16),parseInt(p,16),parseInt(C,16)/255)}}if(i.type===20){var y=st[i.value.toUpperCase()];if(typeof y<"u")return y}return st.TRANSPARENT}},yt=function(s){return(255&s)===0},fe=function(s){var i=255&s,c=255&s>>8,l=255&s>>16,f=255&s>>24;return i<255?"rgba("+f+","+l+","+c+","+i/255+")":"rgb("+f+","+l+","+c+")"},Qt=function(s,i,c,l){return(s<<24|i<<16|c<<8|Math.round(l*255)<<0)>>>0},ec=function(s,i){if(s.type===17)return s.number;if(s.type===16){var c=i===3?1:255;return i===3?s.number/100*c:Math.round(s.number/100*c)}return 0},tc=function(s,i){var c=i.filter(on);if(c.length===3){var l=c.map(ec),f=l[0],p=l[1],C=l[2];return Qt(f,p,C,1)}if(c.length===4){var y=c.map(ec),f=y[0],p=y[1],C=y[2],E=y[3];return Qt(f,p,C,E)}return 0};function Hi(s,i,c){return c<0&&(c+=1),c>=1&&(c-=1),c<1/6?(i-s)*c*6+s:c<1/2?i:c<2/3?(i-s)*6*(2/3-c)+s:s}var nc=function(s,i){var c=i.filter(on),l=c[0],f=c[1],p=c[2],C=c[3],y=(l.type===17?Ie(l.number):Ao.parse(s,l))/(Math.PI*2),E=ae(f)?f.number/100:0,D=ae(p)?p.number/100:0,M=typeof C<"u"&&ae(C)?jA(C,1):1;if(E===0)return Qt(D*255,D*255,D*255,1);var G=D<=.5?D*(E+1):D+E-D*E,Z=D*2-G,vA=Hi(Z,G,y+1/3),dA=Hi(Z,G,y),pA=Hi(Z,G,y-1/3);return Qt(vA*255,dA*255,pA*255,M)},PC={hsl:nc,hsla:nc,rgb:tc,rgba:tc},$n=function(s,i){return vt.parse(s,Xl.create(i).parseComponentValue())},st={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},GC={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(c){if(JA(c))switch(c.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},zC={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},eo=function(s,i){var c=vt.parse(s,i[0]),l=i[1];return l&&ae(l)?{color:c,stop:l}:{color:c,stop:null}},rc=function(s,i){var c=s[0],l=s[s.length-1];c.stop===null&&(c.stop=ge),l.stop===null&&(l.stop=Ct);for(var f=[],p=0,C=0;C<s.length;C++){var y=s[C].stop;if(y!==null){var E=jA(y,i);E>p?f.push(E):f.push(p),p=E}else f.push(null)}for(var D=null,C=0;C<f.length;C++){var M=f[C];if(M===null)D===null&&(D=C);else if(D!==null){for(var G=C-D,Z=(M-f[D-1])/(G+1),vA=1;vA<=G;vA++)f[D+vA-1]=Z*vA;D=null}}return s.map(function(dA,pA){return{color:dA.color,stop:Math.max(Math.min(1,f[pA]/i),0)}})},XC=function(s,i,c){var l=i/2,f=c/2,p=jA(s[0],i)-l,C=f-jA(s[1],c);return(Math.atan2(C,p)+Math.PI*2)%(Math.PI*2)},$C=function(s,i,c){var l=typeof s=="number"?s:XC(s,i,c),f=Math.abs(i*Math.sin(l))+Math.abs(c*Math.cos(l)),p=i/2,C=c/2,y=f/2,E=Math.sin(l-Math.PI/2)*y,D=Math.cos(l-Math.PI/2)*y;return[f,p-D,p+D,C-E,C+E]},Ke=function(s,i){return Math.sqrt(s*s+i*i)},oc=function(s,i,c,l,f){return[[0,0],[0,i],[s,0],[s,i]].reduce(function(p,C){var y=C[0],E=C[1],D=Ke(c-y,l-E);return(f?D<p.optimumDistance:D>p.optimumDistance)?{optimumCorner:C,optimumDistance:D}:p},{optimumDistance:f?1/0:-1/0,optimumCorner:null}).optimumCorner},WC=function(s,i,c,l,f){var p=0,C=0;switch(s.size){case 0:s.shape===0?p=C=Math.min(Math.abs(i),Math.abs(i-l),Math.abs(c),Math.abs(c-f)):s.shape===1&&(p=Math.min(Math.abs(i),Math.abs(i-l)),C=Math.min(Math.abs(c),Math.abs(c-f)));break;case 2:if(s.shape===0)p=C=Math.min(Ke(i,c),Ke(i,c-f),Ke(i-l,c),Ke(i-l,c-f));else if(s.shape===1){var y=Math.min(Math.abs(c),Math.abs(c-f))/Math.min(Math.abs(i),Math.abs(i-l)),E=oc(l,f,i,c,!0),D=E[0],M=E[1];p=Ke(D-i,(M-c)/y),C=y*p}break;case 1:s.shape===0?p=C=Math.max(Math.abs(i),Math.abs(i-l),Math.abs(c),Math.abs(c-f)):s.shape===1&&(p=Math.max(Math.abs(i),Math.abs(i-l)),C=Math.max(Math.abs(c),Math.abs(c-f)));break;case 3:if(s.shape===0)p=C=Math.max(Ke(i,c),Ke(i,c-f),Ke(i-l,c),Ke(i-l,c-f));else if(s.shape===1){var y=Math.max(Math.abs(c),Math.abs(c-f))/Math.max(Math.abs(i),Math.abs(i-l)),G=oc(l,f,i,c,!1),D=G[0],M=G[1];p=Ke(D-i,(M-c)/y),C=y*p}break}return Array.isArray(s.size)&&(p=jA(s.size[0],l),C=s.size.length===2?jA(s.size[1],f):p),[p,C]},YC=function(s,i){var c=Ie(180),l=[];return $e(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&C.value==="to"){c=Ac(f);return}else if(ql(C)){c=Ao.parse(s,C);return}}var y=eo(s,f);l.push(y)}),{angle:c,stops:l,type:1}},to=function(s,i){var c=Ie(180),l=[];return $e(i).forEach(function(f,p){if(p===0){var C=f[0];if(C.type===20&&["top","left","right","bottom"].indexOf(C.value)!==-1){c=Ac(f);return}else if(ql(C)){c=(Ao.parse(s,C)+Ie(270))%Ie(360);return}}var y=eo(s,f);l.push(y)}),{angle:c,stops:l,type:1}},JC=function(s,i){var c=Ie(180),l=[],f=1,p=0,C=3,y=[];return $e(i).forEach(function(E,D){var M=E[0];if(D===0){if(JA(M)&&M.value==="linear"){f=1;return}else if(JA(M)&&M.value==="radial"){f=2;return}}if(M.type===18){if(M.name==="from"){var G=vt.parse(s,M.values[0]);l.push({stop:ge,color:G})}else if(M.name==="to"){var G=vt.parse(s,M.values[0]);l.push({stop:Ct,color:G})}else if(M.name==="color-stop"){var Z=M.values.filter(on);if(Z.length===2){var G=vt.parse(s,Z[1]),vA=Z[0];rn(vA)&&l.push({stop:{type:16,number:vA.number*100,flags:vA.flags},color:G})}}}}),f===1?{angle:(c+Ie(180))%Ie(360),stops:l,type:f}:{size:C,shape:p,stops:l,position:y,type:f}},ic="closest-side",sc="farthest-side",ac="closest-corner",lc="farthest-corner",cc="circle",uc="ellipse",dc="cover",fc="contain",ZC=function(s,i){var c=0,l=3,f=[],p=[];return $e(i).forEach(function(C,y){var E=!0;if(y===0){var D=!1;E=C.reduce(function(G,Z){if(D)if(JA(Z))switch(Z.value){case"center":return p.push(bi),G;case"top":case"left":return p.push(ge),G;case"right":case"bottom":return p.push(Ct),G}else(ae(Z)||wt(Z))&&p.push(Z);else if(JA(Z))switch(Z.value){case cc:return c=0,!1;case uc:return c=1,!1;case"at":return D=!0,!1;case ic:return l=0,!1;case dc:case sc:return l=1,!1;case fc:case ac:return l=2,!1;case lc:return l=3,!1}else if(wt(Z)||ae(Z))return Array.isArray(l)||(l=[]),l.push(Z),!1;return G},E)}if(E){var M=eo(s,C);f.push(M)}}),{size:l,shape:c,stops:f,position:p,type:2}},no=function(s,i){var c=0,l=3,f=[],p=[];return $e(i).forEach(function(C,y){var E=!0;if(y===0?E=C.reduce(function(M,G){if(JA(G))switch(G.value){case"center":return p.push(bi),!1;case"top":case"left":return p.push(ge),!1;case"right":case"bottom":return p.push(Ct),!1}else if(ae(G)||wt(G))return p.push(G),!1;return M},E):y===1&&(E=C.reduce(function(M,G){if(JA(G))switch(G.value){case cc:return c=0,!1;case uc:return c=1,!1;case fc:case ic:return l=0,!1;case sc:return l=1,!1;case ac:return l=2,!1;case dc:case lc:return l=3,!1}else if(wt(G)||ae(G))return Array.isArray(l)||(l=[]),l.push(G),!1;return M},E)),E){var D=eo(s,C);f.push(D)}}),{size:l,shape:c,stops:f,position:p,type:2}},jC=function(s){return s.type===1},qC=function(s){return s.type===2},Ii={name:"image",parse:function(s,i){if(i.type===22){var c={url:i.value,type:0};return s.cache.addImage(i.value),c}if(i.type===18){var l=gc[i.name];if(typeof l>"u")throw new Error('Attempting to parse an unsupported image function "'+i.name+'"');return l(s,i.values)}throw new Error("Unsupported image type "+i.type)}};function Av(s){return!(s.type===20&&s.value==="none")&&(s.type!==18||!!gc[s.name])}var gc={"linear-gradient":YC,"-moz-linear-gradient":to,"-ms-linear-gradient":to,"-o-linear-gradient":to,"-webkit-linear-gradient":to,"radial-gradient":ZC,"-moz-radial-gradient":no,"-ms-radial-gradient":no,"-o-radial-gradient":no,"-webkit-radial-gradient":no,"-webkit-gradient":JC},ev={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var c=i[0];return c.type===20&&c.value==="none"?[]:i.filter(function(l){return on(l)&&Av(l)}).map(function(l){return Ii.parse(s,l)})}},tv={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(s,i){return i.map(function(c){if(JA(c))switch(c.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},nv={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(s,i){return $e(i).map(function(c){return c.filter(ae)}).map(Wl)}},rv={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(s,i){return $e(i).map(function(c){return c.filter(JA).map(function(l){return l.value}).join(" ")}).map(ov)}},ov=function(s){switch(s){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},sn;(function(s){s.AUTO="auto",s.CONTAIN="contain",s.COVER="cover"})(sn||(sn={}));var iv={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(s,i){return $e(i).map(function(c){return c.filter(sv)})}},sv=function(s){return JA(s)||ae(s)},ro=function(s){return{name:"border-"+s+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},av=ro("top"),lv=ro("right"),cv=ro("bottom"),uv=ro("left"),oo=function(s){return{name:"border-radius-"+s,initialValue:"0 0",prefix:!1,type:1,parse:function(i,c){return Wl(c.filter(ae))}}},dv=oo("top-left"),fv=oo("top-right"),gv=oo("bottom-right"),hv=oo("bottom-left"),io=function(s){return{name:"border-"+s+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(i,c){switch(c){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Bv=io("top"),pv=io("right"),mv=io("bottom"),wv=io("left"),so=function(s){return{name:"border-"+s+"-width",initialValue:"0",type:0,prefix:!1,parse:function(i,c){return zn(c)?c.number:0}}},Cv=so("top"),vv=so("right"),yv=so("bottom"),Qv=so("left"),Ev={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Uv={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(s,i){return i==="rtl"?1:0}},Fv={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(s,i){return i.filter(JA).reduce(function(c,l){return c|bv(l.value)},0)}},bv=function(s){switch(s){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Hv={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Iv={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(s,i){return i.type===20&&i.value==="normal"?0:i.type===17||i.type===15?i.number:0}},ao;(function(s){s.NORMAL="normal",s.STRICT="strict"})(ao||(ao={}));var _v={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="strict"?ao.STRICT:ao.NORMAL}},Sv={name:"line-height",initialValue:"normal",prefix:!1,type:4},hc=function(s,i){return JA(s)&&s.value==="normal"?1.2*i:s.type===17?i*s.number:ae(s)?jA(s,i):i},xv={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(s,i){return i.type===20&&i.value==="none"?null:Ii.parse(s,i)}},Dv={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(s,i){return i==="inside"?0:1}},_i={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},lo=function(s){return{name:"margin-"+s,initialValue:"0",prefix:!1,type:4}},Nv=lo("top"),Lv=lo("right"),Tv=lo("bottom"),kv=lo("left"),Mv={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(s,i){return i.filter(JA).map(function(c){switch(c.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},Kv={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){return i==="break-word"?"break-word":"normal"}},co=function(s){return{name:"padding-"+s,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ov=co("top"),Rv=co("right"),Vv=co("bottom"),Pv=co("left"),Gv={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(s,i){switch(i){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},zv={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(s,i){switch(i){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Xv={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&Fi(i[0],"none")?[]:$e(i).map(function(c){for(var l={color:st.TRANSPARENT,offsetX:ge,offsetY:ge,blur:ge},f=0,p=0;p<c.length;p++){var C=c[p];wt(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:l.blur=C,f++):l.color=vt.parse(s,C)}return l})}},$v={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Wv={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(s,i){if(i.type===20&&i.value==="none")return null;if(i.type===18){var c=Zv[i.name];if(typeof c>"u")throw new Error('Attempting to parse an unsupported transform function "'+i.name+'"');return c(i.values)}return null}},Yv=function(s){var i=s.filter(function(c){return c.type===17}).map(function(c){return c.number});return i.length===6?i:null},Jv=function(s){var i=s.filter(function(E){return E.type===17}).map(function(E){return E.number}),c=i[0],l=i[1];i[2],i[3];var f=i[4],p=i[5];i[6],i[7],i[8],i[9],i[10],i[11];var C=i[12],y=i[13];return i[14],i[15],i.length===16?[c,l,f,p,C,y]:null},Zv={matrix:Yv,matrix3d:Jv},Bc={type:16,number:50,flags:On},jv=[Bc,Bc],qv={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(s,i){var c=i.filter(ae);return c.length!==2?jv:[c[0],c[1]]}},Ay={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(s,i){switch(i){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Wn;(function(s){s.NORMAL="normal",s.BREAK_ALL="break-all",s.KEEP_ALL="keep-all"})(Wn||(Wn={}));for(var ey={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"break-all":return Wn.BREAK_ALL;case"keep-all":return Wn.KEEP_ALL;default:return Wn.NORMAL}}},ty={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(s,i){if(i.type===20)return{auto:!0,order:0};if(rn(i))return{auto:!1,order:i.number};throw new Error("Invalid z-index number parsed")}},pc={name:"time",parse:function(s,i){if(i.type===15)switch(i.unit.toLowerCase()){case"s":return 1e3*i.number;case"ms":return i.number}throw new Error("Unsupported time type")}},ny={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(s,i){return rn(i)?i.number:1}},ry={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},oy={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(s,i){return i.filter(JA).map(function(c){switch(c.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(c){return c!==0})}},iy={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(s,i){var c=[],l=[];return i.forEach(function(f){switch(f.type){case 20:case 0:c.push(f.value);break;case 17:c.push(f.number.toString());break;case 4:l.push(c.join(" ")),c.length=0;break}}),c.length&&l.push(c.join(" ")),l.map(function(f){return f.indexOf(" ")===-1?f:"'"+f+"'"})}},sy={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ay={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(s,i){return rn(i)?i.number:JA(i)&&i.value==="bold"?700:400}},ly={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.filter(JA).map(function(c){return c.value})}},cy={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(s,i){switch(i){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},de=function(s,i){return(s&i)!==0},uy={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(s,i){if(i.length===0)return[];var c=i[0];return c.type===20&&c.value==="none"?[]:i}},dy={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var c=i[0];if(c.type===20&&c.value==="none")return null;for(var l=[],f=i.filter($l),p=0;p<f.length;p++){var C=f[p],y=f[p+1];if(C.type===20){var E=y&&rn(y)?y.number:1;l.push({counter:C.value,increment:E})}}return l}},fy={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return[];for(var c=[],l=i.filter($l),f=0;f<l.length;f++){var p=l[f],C=l[f+1];if(JA(p)&&p.value!=="none"){var y=C&&rn(C)?C.number:0;c.push({counter:p.value,reset:y})}}return c}},gy={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(s,i){return i.filter(zn).map(function(c){return pc.parse(s,c)})}},hy={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(s,i){if(i.length===0)return null;var c=i[0];if(c.type===20&&c.value==="none")return null;var l=[],f=i.filter(RC);if(f.length%2!==0)return null;for(var p=0;p<f.length;p+=2){var C=f[p].value,y=f[p+1].value;l.push({open:C,close:y})}return l}},mc=function(s,i,c){if(!s)return"";var l=s[Math.min(i,s.length-1)];return l?c?l.open:l.close:""},By={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,i){return i.length===1&&Fi(i[0],"none")?[]:$e(i).map(function(c){for(var l={color:255,offsetX:ge,offsetY:ge,blur:ge,spread:ge,inset:!1},f=0,p=0;p<c.length;p++){var C=c[p];Fi(C,"inset")?l.inset=!0:wt(C)?(f===0?l.offsetX=C:f===1?l.offsetY=C:f===2?l.blur=C:l.spread=C,f++):l.color=vt.parse(s,C)}return l})}},py={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(s,i){var c=[0,1,2],l=[];return i.filter(JA).forEach(function(f){switch(f.value){case"stroke":l.push(1);break;case"fill":l.push(0);break;case"markers":l.push(2);break}}),c.forEach(function(f){l.indexOf(f)===-1&&l.push(f)}),l}},my={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},wy={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(s,i){return zn(i)?i.number:0}},Cy=(function(){function s(i,c){var l,f;this.animationDuration=UA(i,gy,c.animationDuration),this.backgroundClip=UA(i,GC,c.backgroundClip),this.backgroundColor=UA(i,zC,c.backgroundColor),this.backgroundImage=UA(i,ev,c.backgroundImage),this.backgroundOrigin=UA(i,tv,c.backgroundOrigin),this.backgroundPosition=UA(i,nv,c.backgroundPosition),this.backgroundRepeat=UA(i,rv,c.backgroundRepeat),this.backgroundSize=UA(i,iv,c.backgroundSize),this.borderTopColor=UA(i,av,c.borderTopColor),this.borderRightColor=UA(i,lv,c.borderRightColor),this.borderBottomColor=UA(i,cv,c.borderBottomColor),this.borderLeftColor=UA(i,uv,c.borderLeftColor),this.borderTopLeftRadius=UA(i,dv,c.borderTopLeftRadius),this.borderTopRightRadius=UA(i,fv,c.borderTopRightRadius),this.borderBottomRightRadius=UA(i,gv,c.borderBottomRightRadius),this.borderBottomLeftRadius=UA(i,hv,c.borderBottomLeftRadius),this.borderTopStyle=UA(i,Bv,c.borderTopStyle),this.borderRightStyle=UA(i,pv,c.borderRightStyle),this.borderBottomStyle=UA(i,mv,c.borderBottomStyle),this.borderLeftStyle=UA(i,wv,c.borderLeftStyle),this.borderTopWidth=UA(i,Cv,c.borderTopWidth),this.borderRightWidth=UA(i,vv,c.borderRightWidth),this.borderBottomWidth=UA(i,yv,c.borderBottomWidth),this.borderLeftWidth=UA(i,Qv,c.borderLeftWidth),this.boxShadow=UA(i,By,c.boxShadow),this.color=UA(i,Ev,c.color),this.direction=UA(i,Uv,c.direction),this.display=UA(i,Fv,c.display),this.float=UA(i,Hv,c.cssFloat),this.fontFamily=UA(i,iy,c.fontFamily),this.fontSize=UA(i,sy,c.fontSize),this.fontStyle=UA(i,cy,c.fontStyle),this.fontVariant=UA(i,ly,c.fontVariant),this.fontWeight=UA(i,ay,c.fontWeight),this.letterSpacing=UA(i,Iv,c.letterSpacing),this.lineBreak=UA(i,_v,c.lineBreak),this.lineHeight=UA(i,Sv,c.lineHeight),this.listStyleImage=UA(i,xv,c.listStyleImage),this.listStylePosition=UA(i,Dv,c.listStylePosition),this.listStyleType=UA(i,_i,c.listStyleType),this.marginTop=UA(i,Nv,c.marginTop),this.marginRight=UA(i,Lv,c.marginRight),this.marginBottom=UA(i,Tv,c.marginBottom),this.marginLeft=UA(i,kv,c.marginLeft),this.opacity=UA(i,ny,c.opacity);var p=UA(i,Mv,c.overflow);this.overflowX=p[0],this.overflowY=p[p.length>1?1:0],this.overflowWrap=UA(i,Kv,c.overflowWrap),this.paddingTop=UA(i,Ov,c.paddingTop),this.paddingRight=UA(i,Rv,c.paddingRight),this.paddingBottom=UA(i,Vv,c.paddingBottom),this.paddingLeft=UA(i,Pv,c.paddingLeft),this.paintOrder=UA(i,py,c.paintOrder),this.position=UA(i,zv,c.position),this.textAlign=UA(i,Gv,c.textAlign),this.textDecorationColor=UA(i,ry,(l=c.textDecorationColor)!==null&&l!==void 0?l:c.color),this.textDecorationLine=UA(i,oy,(f=c.textDecorationLine)!==null&&f!==void 0?f:c.textDecoration),this.textShadow=UA(i,Xv,c.textShadow),this.textTransform=UA(i,$v,c.textTransform),this.transform=UA(i,Wv,c.transform),this.transformOrigin=UA(i,qv,c.transformOrigin),this.visibility=UA(i,Ay,c.visibility),this.webkitTextStrokeColor=UA(i,my,c.webkitTextStrokeColor),this.webkitTextStrokeWidth=UA(i,wy,c.webkitTextStrokeWidth),this.wordBreak=UA(i,ey,c.wordBreak),this.zIndex=UA(i,ty,c.zIndex)}return s.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},s.prototype.isTransparent=function(){return yt(this.backgroundColor)},s.prototype.isTransformed=function(){return this.transform!==null},s.prototype.isPositioned=function(){return this.position!==0},s.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},s.prototype.isFloating=function(){return this.float!==0},s.prototype.isInlineLevel=function(){return de(this.display,4)||de(this.display,33554432)||de(this.display,268435456)||de(this.display,536870912)||de(this.display,67108864)||de(this.display,134217728)},s})(),vy=(function(){function s(i,c){this.content=UA(i,uy,c.content),this.quotes=UA(i,hy,c.quotes)}return s})(),wc=(function(){function s(i,c){this.counterIncrement=UA(i,dy,c.counterIncrement),this.counterReset=UA(i,fy,c.counterReset)}return s})(),UA=function(s,i,c){var l=new zl,f=c!==null&&typeof c<"u"?c.toString():i.initialValue;l.write(f);var p=new Xl(l.read());switch(i.type){case 2:var C=p.parseComponentValue();return i.parse(s,JA(C)?C.value:i.initialValue);case 0:return i.parse(s,p.parseComponentValue());case 1:return i.parse(s,p.parseComponentValues());case 4:return p.parseComponentValue();case 3:switch(i.format){case"angle":return Ao.parse(s,p.parseComponentValue());case"color":return vt.parse(s,p.parseComponentValue());case"image":return Ii.parse(s,p.parseComponentValue());case"length":var y=p.parseComponentValue();return wt(y)?y:ge;case"length-percentage":var E=p.parseComponentValue();return ae(E)?E:ge;case"time":return pc.parse(s,p.parseComponentValue())}break}},yy="data-html2canvas-debug",Qy=function(s){switch(s.getAttribute(yy)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Si=function(s,i){var c=Qy(s);return c===1||i===c},We=(function(){function s(i,c){if(this.context=i,this.textNodes=[],this.elements=[],this.flags=0,Si(c,3))debugger;this.styles=new Cy(i,window.getComputedStyle(c,null)),zi(c)&&(this.styles.animationDuration.some(function(l){return l>0})&&(c.style.animationDuration="0s"),this.styles.transform!==null&&(c.style.transform="none")),this.bounds=g(this.context,c),Si(c,4)&&(this.flags|=16)}return s})(),Ey="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwM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AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQG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RA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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int8Array(256),uo=0;uo<Cc.length;uo++)Yn[Cc.charCodeAt(uo)]=uo;for(var Uy=function(s){var i=s.length*.75,c=s.length,l,f=0,p,C,y,E;s[s.length-1]==="="&&(i--,s[s.length-2]==="="&&i--);var D=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(i):new Array(i),M=Array.isArray(D)?D:new Uint8Array(D);for(l=0;l<c;l+=4)p=Yn[s.charCodeAt(l)],C=Yn[s.charCodeAt(l+1)],y=Yn[s.charCodeAt(l+2)],E=Yn[s.charCodeAt(l+3)],M[f++]=p<<2|C>>4,M[f++]=(C&15)<<4|y>>2,M[f++]=(y&3)<<6|E&63;return D},Fy=function(s){for(var i=s.length,c=[],l=0;l<i;l+=2)c.push(s[l+1]<<8|s[l]);return c},by=function(s){for(var i=s.length,c=[],l=0;l<i;l+=4)c.push(s[l+3]<<24|s[l+2]<<16|s[l+1]<<8|s[l]);return c},Kt=5,xi=11,Di=2,Hy=xi-Kt,vc=65536>>Kt,Ni=(1<<Kt)-1,Iy=vc+(1024>>Kt)+32,_y=65536>>xi,Sy=(1<<Hy)-1,yc=function(s,i,c){return s.slice?s.slice(i,c):new Uint16Array(Array.prototype.slice.call(s,i,c))},xy=function(s,i,c){return s.slice?s.slice(i,c):new Uint32Array(Array.prototype.slice.call(s,i,c))},Dy=function(s,i){var c=Uy(s),l=Array.isArray(c)?by(c):new Uint32Array(c),f=Array.isArray(c)?Fy(c):new Uint16Array(c),p=24,C=yc(f,p/2,l[4]/2),y=l[5]===2?yc(f,(p+l[4])/2):xy(l,Math.ceil((p+l[4])/4));return new Ny(l[0],l[1],l[2],l[3],C,y)},Ny=(function(){function s(i,c,l,f,p,C){this.initialValue=i,this.errorValue=c,this.highStart=l,this.highValueIndex=f,this.index=p,this.data=C}return s.prototype.get=function(i){var c;if(i>=0){if(i<55296||i>56319&&i<=65535)return c=this.index[i>>Kt],c=(c<<Di)+(i&Ni),this.data[c];if(i<=65535)return c=this.index[vc+(i-55296>>Kt)],c=(c<<Di)+(i&Ni),this.data[c];if(i<this.highStart)return c=Iy-_y+(i>>xi),c=this.index[c],c+=i>>Kt&Sy,c=this.index[c],c=(c<<Di)+(i&Ni),this.data[c];if(i<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),Qc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ly=typeof Uint8Array>"u"?[]:new Uint8Array(256),fo=0;fo<Qc.length;fo++)Ly[Qc.charCodeAt(fo)]=fo;var Ty=1,Li=2,Ti=3,Ec=4,Uc=5,ky=7,Fc=8,ki=9,Mi=10,bc=11,Hc=12,Ic=13,_c=14,Ki=15,My=function(s){for(var i=[],c=0,l=s.length;c<l;){var f=s.charCodeAt(c++);if(f>=55296&&f<=56319&&c<l){var p=s.charCodeAt(c++);(p&64512)===56320?i.push(((f&1023)<<10)+(p&1023)+65536):(i.push(f),c--)}else i.push(f)}return i},Ky=function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var c=s.length;if(!c)return"";for(var l=[],f=-1,p="";++f<c;){var C=s[f];C<=65535?l.push(C):(C-=65536,l.push((C>>10)+55296,C%1024+56320)),(f+1===c||l.length>16384)&&(p+=String.fromCharCode.apply(String,l),l.length=0)}return p},Oy=Dy(Ey),_e="×",Oi="÷",Ry=function(s){return Oy.get(s)},Vy=function(s,i,c){var l=c-2,f=i[l],p=i[c-1],C=i[c];if(p===Li&&C===Ti)return _e;if(p===Li||p===Ti||p===Ec||C===Li||C===Ti||C===Ec)return Oi;if(p===Fc&&[Fc,ki,bc,Hc].indexOf(C)!==-1||(p===bc||p===ki)&&(C===ki||C===Mi)||(p===Hc||p===Mi)&&C===Mi||C===Ic||C===Uc||C===ky||p===Ty)return _e;if(p===Ic&&C===_c){for(;f===Uc;)f=i[--l];if(f===_c)return _e}if(p===Ki&&C===Ki){for(var y=0;f===Ki;)y++,f=i[--l];if(y%2===0)return _e}return Oi},Py=function(s){var i=My(s),c=i.length,l=0,f=0,p=i.map(Ry);return{next:function(){if(l>=c)return{done:!0,value:null};for(var C=_e;l<c&&(C=Vy(i,p,++l))===_e;);if(C!==_e||l===c){var y=Ky.apply(null,i.slice(f,l));return f=l,{value:y,done:!1}}return{done:!0,value:null}}}},Gy=function(s){for(var i=Py(s),c=[],l;!(l=i.next()).done;)l.value&&c.push(l.value.slice());return c},zy=function(s){var i=123;if(s.createRange){var c=s.createRange();if(c.getBoundingClientRect){var l=s.createElement("boundtest");l.style.height=i+"px",l.style.display="block",s.body.appendChild(l),c.selectNode(l);var f=c.getBoundingClientRect(),p=Math.round(f.height);if(s.body.removeChild(l),p===i)return!0}}return!1},Xy=function(s){var i=s.createElement("boundtest");i.style.width="50px",i.style.display="block",i.style.fontSize="12px",i.style.letterSpacing="0px",i.style.wordSpacing="0px",s.body.appendChild(i);var c=s.createRange();i.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var l=i.firstChild,f=w(l.data).map(function(E){return m(E)}),p=0,C={},y=f.every(function(E,D){c.setStart(l,p),c.setEnd(l,p+E.length);var M=c.getBoundingClientRect();p+=E.length;var G=M.x>C.x||M.y>C.y;return C=M,D===0?!0:G});return s.body.removeChild(i),y},$y=function(){return typeof new Image().crossOrigin<"u"},Wy=function(){return typeof new XMLHttpRequest().responseType=="string"},Yy=function(s){var i=new Image,c=s.createElement("canvas"),l=c.getContext("2d");if(!l)return!1;i.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{l.drawImage(i,0,0),c.toDataURL()}catch{return!1}return!0},Sc=function(s){return s[0]===0&&s[1]===255&&s[2]===0&&s[3]===255},Jy=function(s){var i=s.createElement("canvas"),c=100;i.width=c,i.height=c;var l=i.getContext("2d");if(!l)return Promise.reject(!1);l.fillStyle="rgb(0, 255, 0)",l.fillRect(0,0,c,c);var f=new Image,p=i.toDataURL();f.src=p;var C=Ri(c,c,0,0,f);return l.fillStyle="red",l.fillRect(0,0,c,c),xc(C).then(function(y){l.drawImage(y,0,0);var E=l.getImageData(0,0,c,c).data;l.fillStyle="red",l.fillRect(0,0,c,c);var D=s.createElement("div");return D.style.backgroundImage="url("+p+")",D.style.height=c+"px",Sc(E)?xc(Ri(c,c,0,0,D)):Promise.reject(!1)}).then(function(y){return l.drawImage(y,0,0),Sc(l.getImageData(0,0,c,c).data)}).catch(function(){return!1})},Ri=function(s,i,c,l,f){var p="http://www.w3.org/2000/svg",C=document.createElementNS(p,"svg"),y=document.createElementNS(p,"foreignObject");return C.setAttributeNS(null,"width",s.toString()),C.setAttributeNS(null,"height",i.toString()),y.setAttributeNS(null,"width","100%"),y.setAttributeNS(null,"height","100%"),y.setAttributeNS(null,"x",c.toString()),y.setAttributeNS(null,"y",l.toString()),y.setAttributeNS(null,"externalResourcesRequired","true"),C.appendChild(y),y.appendChild(f),C},xc=function(s){return new Promise(function(i,c){var l=new Image;l.onload=function(){return i(l)},l.onerror=c,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},he={get SUPPORT_RANGE_BOUNDS(){var s=zy(document);return Object.defineProperty(he,"SUPPORT_RANGE_BOUNDS",{value:s}),s},get SUPPORT_WORD_BREAKING(){var s=he.SUPPORT_RANGE_BOUNDS&&Xy(document);return Object.defineProperty(he,"SUPPORT_WORD_BREAKING",{value:s}),s},get SUPPORT_SVG_DRAWING(){var s=Yy(document);return Object.defineProperty(he,"SUPPORT_SVG_DRAWING",{value:s}),s},get SUPPORT_FOREIGNOBJECT_DRAWING(){var s=typeof Array.from=="function"&&typeof window.fetch=="function"?Jy(document):Promise.resolve(!1);return Object.defineProperty(he,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:s}),s},get SUPPORT_CORS_IMAGES(){var s=$y();return Object.defineProperty(he,"SUPPORT_CORS_IMAGES",{value:s}),s},get SUPPORT_RESPONSE_TYPE(){var s=Wy();return Object.defineProperty(he,"SUPPORT_RESPONSE_TYPE",{value:s}),s},get SUPPORT_CORS_XHR(){var s="withCredentials"in new XMLHttpRequest;return Object.defineProperty(he,"SUPPORT_CORS_XHR",{value:s}),s},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var s=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(he,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:s}),s}},Jn=(function(){function s(i,c){this.text=i,this.bounds=c}return s})(),Zy=function(s,i,c,l){var f=AQ(i,c),p=[],C=0;return f.forEach(function(y){if(c.textDecorationLine.length||y.trim().length>0)if(he.SUPPORT_RANGE_BOUNDS){var E=Dc(l,C,y.length).getClientRects();if(E.length>1){var D=Vi(y),M=0;D.forEach(function(Z){p.push(new Jn(Z,h.fromDOMRectList(s,Dc(l,M+C,Z.length).getClientRects()))),M+=Z.length})}else p.push(new Jn(y,h.fromDOMRectList(s,E)))}else{var G=l.splitText(y.length);p.push(new Jn(y,jy(s,l))),l=G}else he.SUPPORT_RANGE_BOUNDS||(l=l.splitText(y.length));C+=y.length}),p},jy=function(s,i){var c=i.ownerDocument;if(c){var l=c.createElement("html2canvaswrapper");l.appendChild(i.cloneNode(!0));var f=i.parentNode;if(f){f.replaceChild(l,i);var p=g(s,l);return l.firstChild&&f.replaceChild(l.firstChild,l),p}}return h.EMPTY},Dc=function(s,i,c){var l=s.ownerDocument;if(!l)throw new Error("Node has no owner document");var f=l.createRange();return f.setStart(s,i),f.setEnd(s,i+c),f},Vi=function(s){if(he.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(i.segment(s)).map(function(c){return c.segment})}return Gy(s)},qy=function(s,i){if(he.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(c.segment(s)).map(function(l){return l.segment})}return tQ(s,i)},AQ=function(s,i){return i.letterSpacing!==0?Vi(s):qy(s,i)},eQ=[32,160,4961,65792,65793,4153,4241],tQ=function(s,i){for(var c=L0(s,{lineBreak:i.lineBreak,wordBreak:i.overflowWrap==="break-word"?"break-word":i.wordBreak}),l=[],f,p=function(){if(f.value){var C=w(f.value.slice()),y="";C.forEach(function(E){eQ.indexOf(E)===-1?y+=m(E):(y.length&&l.push(y),l.push(m(E)),y="")}),y.length&&l.push(y)}};!(f=c.next()).done;)p();return l},nQ=(function(){function s(i,c,l){this.text=rQ(c.data,l.textTransform),this.textBounds=Zy(i,this.text,l,c)}return s})(),rQ=function(s,i){switch(i){case 1:return s.toLowerCase();case 3:return s.replace(oQ,iQ);case 2:return s.toUpperCase();default:return s}},oQ=/(^|\s|:|-|\(|\))([a-z])/g,iQ=function(s,i,c){return s.length>0?i+c.toUpperCase():s},Nc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.src=l.currentSrc||l.src,f.intrinsicWidth=l.naturalWidth,f.intrinsicHeight=l.naturalHeight,f.context.cache.addImage(f.src),f}return i})(We),Lc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.canvas=l,f.intrinsicWidth=l.width,f.intrinsicHeight=l.height,f}return i})(We),Tc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this,p=new XMLSerializer,C=g(c,l);return l.setAttribute("width",C.width+"px"),l.setAttribute("height",C.height+"px"),f.svg="data:image/svg+xml,"+encodeURIComponent(p.serializeToString(l)),f.intrinsicWidth=l.width.baseVal.value,f.intrinsicHeight=l.height.baseVal.value,f.context.cache.addImage(f.svg),f}return i})(We),kc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.value=l.value,f}return i})(We),Pi=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.start=l.start,f.reversed=typeof l.reversed=="boolean"&&l.reversed===!0,f}return i})(We),sQ=[{type:15,flags:0,unit:"px",number:3}],aQ=[{type:16,flags:0,number:50}],lQ=function(s){return s.width>s.height?new h(s.left+(s.width-s.height)/2,s.top,s.height,s.height):s.width<s.height?new h(s.left,s.top+(s.height-s.width)/2,s.width,s.width):s},cQ=function(s){var i=s.type===uQ?new Array(s.value.length+1).join("•"):s.value;return i.length===0?s.placeholder||"":i},go="checkbox",ho="radio",uQ="password",Mc=707406591,Gi=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;switch(f.type=l.type.toLowerCase(),f.checked=l.checked,f.value=cQ(l),(f.type===go||f.type===ho)&&(f.styles.backgroundColor=3739148031,f.styles.borderTopColor=f.styles.borderRightColor=f.styles.borderBottomColor=f.styles.borderLeftColor=2779096575,f.styles.borderTopWidth=f.styles.borderRightWidth=f.styles.borderBottomWidth=f.styles.borderLeftWidth=1,f.styles.borderTopStyle=f.styles.borderRightStyle=f.styles.borderBottomStyle=f.styles.borderLeftStyle=1,f.styles.backgroundClip=[0],f.styles.backgroundOrigin=[0],f.bounds=lQ(f.bounds)),f.type){case go:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=sQ;break;case ho:f.styles.borderTopRightRadius=f.styles.borderTopLeftRadius=f.styles.borderBottomRightRadius=f.styles.borderBottomLeftRadius=aQ;break}return f}return i})(We),Kc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this,p=l.options[l.selectedIndex||0];return f.value=p&&p.text||"",f}return i})(We),Oc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.value=l.value,f}return i})(We),Rc=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;f.src=l.src,f.width=parseInt(l.width,10)||0,f.height=parseInt(l.height,10)||0,f.backgroundColor=f.styles.backgroundColor;try{if(l.contentWindow&&l.contentWindow.document&&l.contentWindow.document.documentElement){f.tree=Pc(c,l.contentWindow.document.documentElement);var p=l.contentWindow.document.documentElement?$n(c,getComputedStyle(l.contentWindow.document.documentElement).backgroundColor):st.TRANSPARENT,C=l.contentWindow.document.body?$n(c,getComputedStyle(l.contentWindow.document.body).backgroundColor):st.TRANSPARENT;f.backgroundColor=yt(p)?yt(C)?f.styles.backgroundColor:C:p}}catch{}return f}return i})(We),dQ=["OL","UL","MENU"],Bo=function(s,i,c,l){for(var f=i.firstChild,p=void 0;f;f=p)if(p=f.nextSibling,Gc(f)&&f.data.trim().length>0)c.textNodes.push(new nQ(s,f,c.styles));else if(an(f))if(Jc(f)&&f.assignedNodes)f.assignedNodes().forEach(function(y){return Bo(s,y,c,l)});else{var C=Vc(s,f);C.styles.isVisible()&&(fQ(f,C,l)?C.flags|=4:gQ(C.styles)&&(C.flags|=2),dQ.indexOf(f.tagName)!==-1&&(C.flags|=8),c.elements.push(C),f.slot,f.shadowRoot?Bo(s,f.shadowRoot,C,l):!mo(f)&&!zc(f)&&!wo(f)&&Bo(s,f,C,l))}},Vc=function(s,i){return $i(i)?new Nc(s,i):Xc(i)?new Lc(s,i):zc(i)?new Tc(s,i):hQ(i)?new kc(s,i):BQ(i)?new Pi(s,i):pQ(i)?new Gi(s,i):wo(i)?new Kc(s,i):mo(i)?new Oc(s,i):Wc(i)?new Rc(s,i):new We(s,i)},Pc=function(s,i){var c=Vc(s,i);return c.flags|=4,Bo(s,i,c,c),c},fQ=function(s,i,c){return i.styles.isPositionedWithZIndex()||i.styles.opacity<1||i.styles.isTransformed()||Xi(s)&&c.styles.isTransparent()},gQ=function(s){return s.isPositioned()||s.isFloating()},Gc=function(s){return s.nodeType===Node.TEXT_NODE},an=function(s){return s.nodeType===Node.ELEMENT_NODE},zi=function(s){return an(s)&&typeof s.style<"u"&&!po(s)},po=function(s){return typeof s.className=="object"},hQ=function(s){return s.tagName==="LI"},BQ=function(s){return s.tagName==="OL"},pQ=function(s){return s.tagName==="INPUT"},mQ=function(s){return s.tagName==="HTML"},zc=function(s){return s.tagName==="svg"},Xi=function(s){return s.tagName==="BODY"},Xc=function(s){return s.tagName==="CANVAS"},$c=function(s){return s.tagName==="VIDEO"},$i=function(s){return s.tagName==="IMG"},Wc=function(s){return s.tagName==="IFRAME"},Yc=function(s){return s.tagName==="STYLE"},wQ=function(s){return s.tagName==="SCRIPT"},mo=function(s){return s.tagName==="TEXTAREA"},wo=function(s){return s.tagName==="SELECT"},Jc=function(s){return s.tagName==="SLOT"},Zc=function(s){return s.tagName.indexOf("-")>0},CQ=(function(){function s(){this.counters={}}return s.prototype.getCounterValue=function(i){var c=this.counters[i];return c&&c.length?c[c.length-1]:1},s.prototype.getCounterValues=function(i){var c=this.counters[i];return c||[]},s.prototype.pop=function(i){var c=this;i.forEach(function(l){return c.counters[l].pop()})},s.prototype.parse=function(i){var c=this,l=i.counterIncrement,f=i.counterReset,p=!0;l!==null&&l.forEach(function(y){var E=c.counters[y.counter];E&&y.increment!==0&&(p=!1,E.length||E.push(1),E[Math.max(0,E.length-1)]+=y.increment)});var C=[];return p&&f.forEach(function(y){var E=c.counters[y.counter];C.push(y.counter),E||(E=c.counters[y.counter]=[]),E.push(y.reset)}),C},s})(),jc={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},qc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},vQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},yQ={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ln=function(s,i,c,l,f,p){return s<i||s>c?jn(s,f,p.length>0):l.integers.reduce(function(C,y,E){for(;s>=y;)s-=y,C+=l.values[E];return C},"")+p},Au=function(s,i,c,l){var f="";do c||s--,f=l(s)+f,s/=i;while(s*i>=i);return f},oe=function(s,i,c,l,f){var p=c-i+1;return(s<0?"-":"")+(Au(Math.abs(s),p,l,function(C){return m(Math.floor(C%p)+i)})+f)},Ot=function(s,i,c){c===void 0&&(c=". ");var l=i.length;return Au(Math.abs(s),l,!1,function(f){return i[Math.floor(f%l)]})+c},cn=1,Et=2,Ut=4,Zn=8,at=function(s,i,c,l,f,p){if(s<-9999||s>9999)return jn(s,4,f.length>0);var C=Math.abs(s),y=f;if(C===0)return i[0]+y;for(var E=0;C>0&&E<=4;E++){var D=C%10;D===0&&de(p,cn)&&y!==""?y=i[D]+y:D>1||D===1&&E===0||D===1&&E===1&&de(p,Et)||D===1&&E===1&&de(p,Ut)&&s>100||D===1&&E>1&&de(p,Zn)?y=i[D]+(E>0?c[E-1]:"")+y:D===1&&E>0&&(y=c[E-1]+y),C=Math.floor(C/10)}return(s<0?l:"")+y},eu="十百千萬",tu="拾佰仟萬",nu="マイナス",Wi="마이너스",jn=function(s,i,c){var l=c?". ":"",f=c?"、":"",p=c?", ":"",C=c?" ":"";switch(i){case 0:return"•"+C;case 1:return"◦"+C;case 2:return"◾"+C;case 5:var y=oe(s,48,57,!0,l);return y.length<4?"0"+y:y;case 4:return Ot(s,"〇一二三四五六七八九",f);case 6:return ln(s,1,3999,jc,3,l).toLowerCase();case 7:return ln(s,1,3999,jc,3,l);case 8:return oe(s,945,969,!1,l);case 9:return oe(s,97,122,!1,l);case 10:return oe(s,65,90,!1,l);case 11:return oe(s,1632,1641,!0,l);case 12:case 49:return ln(s,1,9999,qc,3,l);case 35:return ln(s,1,9999,qc,3,l).toLowerCase();case 13:return oe(s,2534,2543,!0,l);case 14:case 30:return oe(s,6112,6121,!0,l);case 15:return Ot(s,"子丑寅卯辰巳午未申酉戌亥",f);case 16:return Ot(s,"甲乙丙丁戊己庚辛壬癸",f);case 17:case 48:return at(s,"零一二三四五六七八九",eu,"負",f,Et|Ut|Zn);case 47:return at(s,"零壹貳參肆伍陸柒捌玖",tu,"負",f,cn|Et|Ut|Zn);case 42:return at(s,"零一二三四五六七八九",eu,"负",f,Et|Ut|Zn);case 41:return at(s,"零壹贰叁肆伍陆柒捌玖",tu,"负",f,cn|Et|Ut|Zn);case 26:return at(s,"〇一二三四五六七八九","十百千万",nu,f,0);case 25:return at(s,"零壱弐参四伍六七八九","拾百千万",nu,f,cn|Et|Ut);case 31:return at(s,"영일이삼사오육칠팔구","십백천만",Wi,p,cn|Et|Ut);case 33:return at(s,"零一二三四五六七八九","十百千萬",Wi,p,0);case 32:return at(s,"零壹貳參四五六七八九","拾百千",Wi,p,cn|Et|Ut);case 18:return oe(s,2406,2415,!0,l);case 20:return ln(s,1,19999,yQ,3,l);case 21:return oe(s,2790,2799,!0,l);case 22:return oe(s,2662,2671,!0,l);case 22:return ln(s,1,10999,vQ,3,l);case 23:return Ot(s,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ot(s,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return oe(s,3302,3311,!0,l);case 28:return Ot(s,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",f);case 29:return Ot(s,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",f);case 34:return oe(s,3792,3801,!0,l);case 37:return oe(s,6160,6169,!0,l);case 38:return oe(s,4160,4169,!0,l);case 39:return oe(s,2918,2927,!0,l);case 40:return oe(s,1776,1785,!0,l);case 43:return oe(s,3046,3055,!0,l);case 44:return oe(s,3174,3183,!0,l);case 45:return oe(s,3664,3673,!0,l);case 46:return oe(s,3872,3881,!0,l);default:return oe(s,48,57,!0,l)}},ru="data-html2canvas-ignore",ou=(function(){function s(i,c,l){if(this.context=i,this.options=l,this.scrolledElements=[],this.referenceElement=c,this.counters=new CQ,this.quoteDepth=0,!c.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(c.ownerDocument.documentElement,!1)}return s.prototype.toIFrame=function(i,c){var l=this,f=QQ(i,c);if(!f.contentWindow)return Promise.reject("Unable to find iframe window");var p=i.defaultView.pageXOffset,C=i.defaultView.pageYOffset,y=f.contentWindow,E=y.document,D=FQ(f).then(function(){return a(l,void 0,void 0,function(){var M,G;return u(this,function(Z){switch(Z.label){case 0:return this.scrolledElements.forEach(_Q),y&&(y.scrollTo(c.left,c.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(y.scrollY!==c.top||y.scrollX!==c.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(y.scrollX-c.left,y.scrollY-c.top,0,0))),M=this.options.onclone,G=this.clonedReferenceElement,typeof G>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:E.fonts&&E.fonts.ready?[4,E.fonts.ready]:[3,2];case 1:Z.sent(),Z.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,UQ(E)]:[3,4];case 3:Z.sent(),Z.label=4;case 4:return typeof M=="function"?[2,Promise.resolve().then(function(){return M(E,G)}).then(function(){return f})]:[2,f]}})})});return E.open(),E.write(HQ(document.doctype)+"<html></html>"),IQ(this.referenceElement.ownerDocument,p,C),E.replaceChild(E.adoptNode(this.documentElement),E.documentElement),E.close(),D},s.prototype.createElementClone=function(i){if(Si(i,2))debugger;if(Xc(i))return this.createCanvasClone(i);if($c(i))return this.createVideoClone(i);if(Yc(i))return this.createStyleClone(i);var c=i.cloneNode(!1);return $i(c)&&($i(i)&&i.currentSrc&&i.currentSrc!==i.src&&(c.src=i.currentSrc,c.srcset=""),c.loading==="lazy"&&(c.loading="eager")),Zc(c)?this.createCustomElementClone(c):c},s.prototype.createCustomElementClone=function(i){var c=document.createElement("html2canvascustomelement");return Yi(i.style,c),c},s.prototype.createStyleClone=function(i){try{var c=i.sheet;if(c&&c.cssRules){var l=[].slice.call(c.cssRules,0).reduce(function(p,C){return C&&typeof C.cssText=="string"?p+C.cssText:p},""),f=i.cloneNode(!1);return f.textContent=l,f}}catch(p){if(this.context.logger.error("Unable to access cssRules property",p),p.name!=="SecurityError")throw p}return i.cloneNode(!1)},s.prototype.createCanvasClone=function(i){var c;if(this.options.inlineImages&&i.ownerDocument){var l=i.ownerDocument.createElement("img");try{return l.src=i.toDataURL(),l}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",i)}}var f=i.cloneNode(!1);try{f.width=i.width,f.height=i.height;var p=i.getContext("2d"),C=f.getContext("2d");if(C)if(!this.options.allowTaint&&p)C.putImageData(p.getImageData(0,0,i.width,i.height),0,0);else{var y=(c=i.getContext("webgl2"))!==null&&c!==void 0?c:i.getContext("webgl");if(y){var E=y.getContextAttributes();E?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",i)}C.drawImage(i,0,0)}return f}catch{this.context.logger.info("Unable to clone canvas as it is tainted",i)}return f},s.prototype.createVideoClone=function(i){var c=i.ownerDocument.createElement("canvas");c.width=i.offsetWidth,c.height=i.offsetHeight;var l=c.getContext("2d");try{return l&&(l.drawImage(i,0,0,c.width,c.height),this.options.allowTaint||l.getImageData(0,0,c.width,c.height)),c}catch{this.context.logger.info("Unable to clone video as it is tainted",i)}var f=i.ownerDocument.createElement("canvas");return f.width=i.offsetWidth,f.height=i.offsetHeight,f},s.prototype.appendChildNode=function(i,c,l){(!an(c)||!wQ(c)&&!c.hasAttribute(ru)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(c)))&&(!this.options.copyStyles||!an(c)||!Yc(c))&&i.appendChild(this.cloneNode(c,l))},s.prototype.cloneChildNodes=function(i,c,l){for(var f=this,p=i.shadowRoot?i.shadowRoot.firstChild:i.firstChild;p;p=p.nextSibling)if(an(p)&&Jc(p)&&typeof p.assignedNodes=="function"){var C=p.assignedNodes();C.length&&C.forEach(function(y){return f.appendChildNode(c,y,l)})}else this.appendChildNode(c,p,l)},s.prototype.cloneNode=function(i,c){if(Gc(i))return document.createTextNode(i.data);if(!i.ownerDocument)return i.cloneNode(!1);var l=i.ownerDocument.defaultView;if(l&&an(i)&&(zi(i)||po(i))){var f=this.createElementClone(i);f.style.transitionProperty="none";var p=l.getComputedStyle(i),C=l.getComputedStyle(i,":before"),y=l.getComputedStyle(i,":after");this.referenceElement===i&&zi(f)&&(this.clonedReferenceElement=f),Xi(f)&&DQ(f);var E=this.counters.parse(new wc(this.context,p)),D=this.resolvePseudoContent(i,f,C,qn.BEFORE);Zc(i)&&(c=!0),$c(i)||this.cloneChildNodes(i,f,c),D&&f.insertBefore(D,f.firstChild);var M=this.resolvePseudoContent(i,f,y,qn.AFTER);return M&&f.appendChild(M),this.counters.pop(E),(p&&(this.options.copyStyles||po(i))&&!Wc(i)||c)&&Yi(p,f),(i.scrollTop!==0||i.scrollLeft!==0)&&this.scrolledElements.push([f,i.scrollLeft,i.scrollTop]),(mo(i)||wo(i))&&(mo(f)||wo(f))&&(f.value=i.value),f}return i.cloneNode(!1)},s.prototype.resolvePseudoContent=function(i,c,l,f){var p=this;if(l){var C=l.content,y=c.ownerDocument;if(!(!y||!C||C==="none"||C==="-moz-alt-content"||l.display==="none")){this.counters.parse(new wc(this.context,l));var E=new vy(this.context,l),D=y.createElement("html2canvaspseudoelement");Yi(l,D),E.content.forEach(function(G){if(G.type===0)D.appendChild(y.createTextNode(G.value));else if(G.type===22){var Z=y.createElement("img");Z.src=G.value,Z.style.opacity="1",D.appendChild(Z)}else if(G.type===18){if(G.name==="attr"){var vA=G.values.filter(JA);vA.length&&D.appendChild(y.createTextNode(i.getAttribute(vA[0].value)||""))}else if(G.name==="counter"){var dA=G.values.filter(on),pA=dA[0],OA=dA[1];if(pA&&JA(pA)){var SA=p.counters.getCounterValue(pA.value),_A=OA&&JA(OA)?_i.parse(p.context,OA.value):3;D.appendChild(y.createTextNode(jn(SA,_A,!1)))}}else if(G.name==="counters"){var Ae=G.values.filter(on),pA=Ae[0],zA=Ae[1],OA=Ae[2];if(pA&&JA(pA)){var TA=p.counters.getCounterValues(pA.value),EA=OA&&JA(OA)?_i.parse(p.context,OA.value):3,PA=zA&&zA.type===0?zA.value:"",GA=TA.map(function(ye){return jn(ye,EA,!1)}).join(PA);D.appendChild(y.createTextNode(GA))}}}else if(G.type===20)switch(G.value){case"open-quote":D.appendChild(y.createTextNode(mc(E.quotes,p.quoteDepth++,!0)));break;case"close-quote":D.appendChild(y.createTextNode(mc(E.quotes,--p.quoteDepth,!1)));break;default:D.appendChild(y.createTextNode(G.value))}}),D.className=Ji+" "+Zi;var M=f===qn.BEFORE?" "+Ji:" "+Zi;return po(c)?c.className.baseValue+=M:c.className+=M,D}}},s.destroy=function(i){return i.parentNode?(i.parentNode.removeChild(i),!0):!1},s})(),qn;(function(s){s[s.BEFORE=0]="BEFORE",s[s.AFTER=1]="AFTER"})(qn||(qn={}));var QQ=function(s,i){var c=s.createElement("iframe");return c.className="html2canvas-container",c.style.visibility="hidden",c.style.position="fixed",c.style.left="-10000px",c.style.top="0px",c.style.border="0",c.width=i.width.toString(),c.height=i.height.toString(),c.scrolling="no",c.setAttribute(ru,"true"),s.body.appendChild(c),c},EQ=function(s){return new Promise(function(i){if(s.complete){i();return}if(!s.src){i();return}s.onload=i,s.onerror=i})},UQ=function(s){return Promise.all([].slice.call(s.images,0).map(EQ))},FQ=function(s){return new Promise(function(i,c){var l=s.contentWindow;if(!l)return c("No window assigned for iframe");var f=l.document;l.onload=s.onload=function(){l.onload=s.onload=null;var p=setInterval(function(){f.body.childNodes.length>0&&f.readyState==="complete"&&(clearInterval(p),i(s))},50)}})},bQ=["all","d","content"],Yi=function(s,i){for(var c=s.length-1;c>=0;c--){var l=s.item(c);bQ.indexOf(l)===-1&&i.style.setProperty(l,s.getPropertyValue(l))}return i},HQ=function(s){var i="";return s&&(i+="<!DOCTYPE ",s.name&&(i+=s.name),s.internalSubset&&(i+=s.internalSubset),s.publicId&&(i+='"'+s.publicId+'"'),s.systemId&&(i+='"'+s.systemId+'"'),i+=">"),i},IQ=function(s,i,c){s&&s.defaultView&&(i!==s.defaultView.pageXOffset||c!==s.defaultView.pageYOffset)&&s.defaultView.scrollTo(i,c)},_Q=function(s){var i=s[0],c=s[1],l=s[2];i.scrollLeft=c,i.scrollTop=l},SQ=":before",xQ=":after",Ji="___html2canvas___pseudoelement_before",Zi="___html2canvas___pseudoelement_after",iu=`{
32
32
  content: "" !important;
33
33
  display: none !important;
34
34
  }`,DQ=function(s){NQ(s,"."+Ji+SQ+iu+`
35
- .`+Zi+xQ+iu)},NQ=function(s,i){var c=s.ownerDocument;if(c){var l=c.createElement("style");l.textContent=i,s.appendChild(l)}},su=(function(){function s(){}return s.getOrigin=function(i){var c=s._link;return c?(c.href=i,c.href=c.href,c.protocol+c.hostname+c.port):"about:blank"},s.isSameOrigin=function(i){return s.getOrigin(i)===s._origin},s.setContext=function(i){s._link=i.document.createElement("a"),s._origin=s.getOrigin(i.location.href)},s._origin="about:blank",s})(),LQ=(function(){function s(i,c){this.context=i,this._options=c,this._cache={}}return s.prototype.addImage=function(i){var c=Promise.resolve();return this.has(i)||(qi(i)||KQ(i))&&(this._cache[i]=this.loadImage(i)).catch(function(){}),c},s.prototype.match=function(i){return this._cache[i]},s.prototype.loadImage=function(i){return a(this,void 0,void 0,function(){var c,l,f,p,C=this;return u(this,function(y){switch(y.label){case 0:return c=su.isSameOrigin(i),l=!ji(i)&&this._options.useCORS===!0&&he.SUPPORT_CORS_IMAGES&&!c,f=!ji(i)&&!c&&!qi(i)&&typeof this._options.proxy=="string"&&he.SUPPORT_CORS_XHR&&!l,!c&&this._options.allowTaint===!1&&!ji(i)&&!qi(i)&&!f&&!l?[2]:(p=i,f?[4,this.proxy(p)]:[3,2]);case 1:p=y.sent(),y.label=2;case 2:return this.context.logger.debug("Added image "+i.substring(0,256)),[4,new Promise(function(E,x){var O=new Image;O.onload=function(){return E(O)},O.onerror=x,(OQ(p)||l)&&(O.crossOrigin="anonymous"),O.src=p,O.complete===!0&&setTimeout(function(){return E(O)},500),C._options.imageTimeout>0&&setTimeout(function(){return x("Timed out ("+C._options.imageTimeout+"ms) loading image")},C._options.imageTimeout)})];case 3:return[2,y.sent()]}})})},s.prototype.has=function(i){return typeof this._cache[i]<"u"},s.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},s.prototype.proxy=function(i){var c=this,l=this._options.proxy;if(!l)throw new Error("No proxy defined");var f=i.substring(0,256);return new Promise(function(p,C){var y=he.SUPPORT_RESPONSE_TYPE?"blob":"text",E=new XMLHttpRequest;E.onload=function(){if(E.status===200)if(y==="text")p(E.response);else{var G=new FileReader;G.addEventListener("load",function(){return p(G.result)},!1),G.addEventListener("error",function(Z){return C(Z)},!1),G.readAsDataURL(E.response)}else C("Failed to proxy resource "+f+" with status code "+E.status)},E.onerror=C;var x=l.indexOf("?")>-1?"&":"?";if(E.open("GET",""+l+x+"url="+encodeURIComponent(i)+"&responseType="+y),y!=="text"&&E instanceof XMLHttpRequest&&(E.responseType=y),c._options.imageTimeout){var O=c._options.imageTimeout;E.timeout=O,E.ontimeout=function(){return C("Timed out ("+O+"ms) proxying "+f)}}E.send()})},s})(),TQ=/^data:image\/svg\+xml/i,kQ=/^data:image\/.*;base64,/i,MQ=/^data:image\/.*/i,KQ=function(s){return he.SUPPORT_SVG_DRAWING||!RQ(s)},ji=function(s){return MQ.test(s)},OQ=function(s){return kQ.test(s)},qi=function(s){return s.substr(0,4)==="blob"},RQ=function(s){return s.substr(-3).toLowerCase()==="svg"||TQ.test(s)},yA=(function(){function s(i,c){this.type=0,this.x=i,this.y=c}return s.prototype.add=function(i,c){return new s(this.x+i,this.y+c)},s})(),un=function(s,i,c){return new yA(s.x+(i.x-s.x)*c,s.y+(i.y-s.y)*c)},Co=(function(){function s(i,c,l,f){this.type=1,this.start=i,this.startControl=c,this.endControl=l,this.end=f}return s.prototype.subdivide=function(i,c){var l=un(this.start,this.startControl,i),f=un(this.startControl,this.endControl,i),p=un(this.endControl,this.end,i),C=un(l,f,i),y=un(f,p,i),E=un(C,y,i);return c?new s(this.start,l,C,E):new s(E,y,p,this.end)},s.prototype.add=function(i,c){return new s(this.start.add(i,c),this.startControl.add(i,c),this.endControl.add(i,c),this.end.add(i,c))},s.prototype.reverse=function(){return new s(this.end,this.endControl,this.startControl,this.start)},s})(),Se=function(s){return s.type===1},VQ=(function(){function s(i){var c=i.styles,l=i.bounds,f=Xn(c.borderTopLeftRadius,l.width,l.height),p=f[0],C=f[1],y=Xn(c.borderTopRightRadius,l.width,l.height),E=y[0],x=y[1],O=Xn(c.borderBottomRightRadius,l.width,l.height),G=O[0],Z=O[1],vA=Xn(c.borderBottomLeftRadius,l.width,l.height),gA=vA[0],mA=vA[1],OA=[];OA.push((p+E)/l.width),OA.push((gA+G)/l.width),OA.push((C+mA)/l.height),OA.push((x+Z)/l.height);var SA=Math.max.apply(Math,OA);SA>1&&(p/=SA,C/=SA,E/=SA,x/=SA,G/=SA,Z/=SA,gA/=SA,mA/=SA);var _A=l.width-E,Ae=l.height-Z,zA=l.width-G,TA=l.height-mA,EA=c.borderTopWidth,PA=c.borderRightWidth,GA=c.borderBottomWidth,MA=c.borderLeftWidth,le=jA(c.paddingTop,i.bounds.width),ye=jA(c.paddingRight,i.bounds.width),He=jA(c.paddingBottom,i.bounds.width),ZA=jA(c.paddingLeft,i.bounds.width);this.topLeftBorderDoubleOuterBox=p>0||C>0?ee(l.left+MA/3,l.top+EA/3,p-MA/3,C-EA/3,WA.TOP_LEFT):new yA(l.left+MA/3,l.top+EA/3),this.topRightBorderDoubleOuterBox=p>0||C>0?ee(l.left+_A,l.top+EA/3,E-PA/3,x-EA/3,WA.TOP_RIGHT):new yA(l.left+l.width-PA/3,l.top+EA/3),this.bottomRightBorderDoubleOuterBox=G>0||Z>0?ee(l.left+zA,l.top+Ae,G-PA/3,Z-GA/3,WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA/3,l.top+l.height-GA/3),this.bottomLeftBorderDoubleOuterBox=gA>0||mA>0?ee(l.left+MA/3,l.top+TA,gA-MA/3,mA-GA/3,WA.BOTTOM_LEFT):new yA(l.left+MA/3,l.top+l.height-GA/3),this.topLeftBorderDoubleInnerBox=p>0||C>0?ee(l.left+MA*2/3,l.top+EA*2/3,p-MA*2/3,C-EA*2/3,WA.TOP_LEFT):new yA(l.left+MA*2/3,l.top+EA*2/3),this.topRightBorderDoubleInnerBox=p>0||C>0?ee(l.left+_A,l.top+EA*2/3,E-PA*2/3,x-EA*2/3,WA.TOP_RIGHT):new yA(l.left+l.width-PA*2/3,l.top+EA*2/3),this.bottomRightBorderDoubleInnerBox=G>0||Z>0?ee(l.left+zA,l.top+Ae,G-PA*2/3,Z-GA*2/3,WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA*2/3,l.top+l.height-GA*2/3),this.bottomLeftBorderDoubleInnerBox=gA>0||mA>0?ee(l.left+MA*2/3,l.top+TA,gA-MA*2/3,mA-GA*2/3,WA.BOTTOM_LEFT):new yA(l.left+MA*2/3,l.top+l.height-GA*2/3),this.topLeftBorderStroke=p>0||C>0?ee(l.left+MA/2,l.top+EA/2,p-MA/2,C-EA/2,WA.TOP_LEFT):new yA(l.left+MA/2,l.top+EA/2),this.topRightBorderStroke=p>0||C>0?ee(l.left+_A,l.top+EA/2,E-PA/2,x-EA/2,WA.TOP_RIGHT):new yA(l.left+l.width-PA/2,l.top+EA/2),this.bottomRightBorderStroke=G>0||Z>0?ee(l.left+zA,l.top+Ae,G-PA/2,Z-GA/2,WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA/2,l.top+l.height-GA/2),this.bottomLeftBorderStroke=gA>0||mA>0?ee(l.left+MA/2,l.top+TA,gA-MA/2,mA-GA/2,WA.BOTTOM_LEFT):new yA(l.left+MA/2,l.top+l.height-GA/2),this.topLeftBorderBox=p>0||C>0?ee(l.left,l.top,p,C,WA.TOP_LEFT):new yA(l.left,l.top),this.topRightBorderBox=E>0||x>0?ee(l.left+_A,l.top,E,x,WA.TOP_RIGHT):new yA(l.left+l.width,l.top),this.bottomRightBorderBox=G>0||Z>0?ee(l.left+zA,l.top+Ae,G,Z,WA.BOTTOM_RIGHT):new yA(l.left+l.width,l.top+l.height),this.bottomLeftBorderBox=gA>0||mA>0?ee(l.left,l.top+TA,gA,mA,WA.BOTTOM_LEFT):new yA(l.left,l.top+l.height),this.topLeftPaddingBox=p>0||C>0?ee(l.left+MA,l.top+EA,Math.max(0,p-MA),Math.max(0,C-EA),WA.TOP_LEFT):new yA(l.left+MA,l.top+EA),this.topRightPaddingBox=E>0||x>0?ee(l.left+Math.min(_A,l.width-PA),l.top+EA,_A>l.width+PA?0:Math.max(0,E-PA),Math.max(0,x-EA),WA.TOP_RIGHT):new yA(l.left+l.width-PA,l.top+EA),this.bottomRightPaddingBox=G>0||Z>0?ee(l.left+Math.min(zA,l.width-MA),l.top+Math.min(Ae,l.height-GA),Math.max(0,G-PA),Math.max(0,Z-GA),WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA,l.top+l.height-GA),this.bottomLeftPaddingBox=gA>0||mA>0?ee(l.left+MA,l.top+Math.min(TA,l.height-GA),Math.max(0,gA-MA),Math.max(0,mA-GA),WA.BOTTOM_LEFT):new yA(l.left+MA,l.top+l.height-GA),this.topLeftContentBox=p>0||C>0?ee(l.left+MA+ZA,l.top+EA+le,Math.max(0,p-(MA+ZA)),Math.max(0,C-(EA+le)),WA.TOP_LEFT):new yA(l.left+MA+ZA,l.top+EA+le),this.topRightContentBox=E>0||x>0?ee(l.left+Math.min(_A,l.width+MA+ZA),l.top+EA+le,_A>l.width+MA+ZA?0:E-MA+ZA,x-(EA+le),WA.TOP_RIGHT):new yA(l.left+l.width-(PA+ye),l.top+EA+le),this.bottomRightContentBox=G>0||Z>0?ee(l.left+Math.min(zA,l.width-(MA+ZA)),l.top+Math.min(Ae,l.height+EA+le),Math.max(0,G-(PA+ye)),Z-(GA+He),WA.BOTTOM_RIGHT):new yA(l.left+l.width-(PA+ye),l.top+l.height-(GA+He)),this.bottomLeftContentBox=gA>0||mA>0?ee(l.left+MA+ZA,l.top+TA,Math.max(0,gA-(MA+ZA)),mA-(GA+He),WA.BOTTOM_LEFT):new yA(l.left+MA+ZA,l.top+l.height-(GA+He))}return s})(),WA;(function(s){s[s.TOP_LEFT=0]="TOP_LEFT",s[s.TOP_RIGHT=1]="TOP_RIGHT",s[s.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",s[s.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(WA||(WA={}));var ee=function(s,i,c,l,f){var p=4*((Math.sqrt(2)-1)/3),C=c*p,y=l*p,E=s+c,x=i+l;switch(f){case WA.TOP_LEFT:return new Co(new yA(s,x),new yA(s,x-y),new yA(E-C,i),new yA(E,i));case WA.TOP_RIGHT:return new Co(new yA(s,i),new yA(s+C,i),new yA(E,x-y),new yA(E,x));case WA.BOTTOM_RIGHT:return new Co(new yA(E,i),new yA(E,i+y),new yA(s+C,x),new yA(s,x));case WA.BOTTOM_LEFT:default:return new Co(new yA(E,x),new yA(E-C,x),new yA(s,i+y),new yA(s,i))}},vo=function(s){return[s.topLeftBorderBox,s.topRightBorderBox,s.bottomRightBorderBox,s.bottomLeftBorderBox]},PQ=function(s){return[s.topLeftContentBox,s.topRightContentBox,s.bottomRightContentBox,s.bottomLeftContentBox]},yo=function(s){return[s.topLeftPaddingBox,s.topRightPaddingBox,s.bottomRightPaddingBox,s.bottomLeftPaddingBox]},GQ=(function(){function s(i,c,l){this.offsetX=i,this.offsetY=c,this.matrix=l,this.type=0,this.target=6}return s})(),Qo=(function(){function s(i,c){this.path=i,this.target=c,this.type=1}return s})(),zQ=(function(){function s(i){this.opacity=i,this.type=2,this.target=6}return s})(),XQ=function(s){return s.type===0},au=function(s){return s.type===1},$Q=function(s){return s.type===2},lu=function(s,i){return s.length===i.length?s.some(function(c,l){return c===i[l]}):!1},WQ=function(s,i,c,l,f){return s.map(function(p,C){switch(C){case 0:return p.add(i,c);case 1:return p.add(i+l,c);case 2:return p.add(i+l,c+f);case 3:return p.add(i,c+f)}return p})},cu=(function(){function s(i){this.element=i,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return s})(),uu=(function(){function s(i,c){if(this.container=i,this.parent=c,this.effects=[],this.curves=new VQ(this.container),this.container.styles.opacity<1&&this.effects.push(new zQ(this.container.styles.opacity)),this.container.styles.transform!==null){var l=this.container.bounds.left+this.container.styles.transformOrigin[0].number,f=this.container.bounds.top+this.container.styles.transformOrigin[1].number,p=this.container.styles.transform;this.effects.push(new GQ(l,f,p))}if(this.container.styles.overflowX!==0){var C=vo(this.curves),y=yo(this.curves);lu(C,y)?this.effects.push(new Qo(C,6)):(this.effects.push(new Qo(C,2)),this.effects.push(new Qo(y,4)))}}return s.prototype.getEffects=function(i){for(var c=[2,3].indexOf(this.container.styles.position)===-1,l=this.parent,f=this.effects.slice(0);l;){var p=l.effects.filter(function(E){return!au(E)});if(c||l.container.styles.position!==0||!l.parent){if(f.unshift.apply(f,p),c=[2,3].indexOf(l.container.styles.position)===-1,l.container.styles.overflowX!==0){var C=vo(l.curves),y=yo(l.curves);lu(C,y)||f.unshift(new Qo(y,6))}}else f.unshift.apply(f,p);l=l.parent}return f.filter(function(E){return de(E.target,i)})},s})(),As=function(s,i,c,l){s.container.elements.forEach(function(f){var p=de(f.flags,4),C=de(f.flags,2),y=new uu(f,s);de(f.styles.display,2048)&&l.push(y);var E=de(f.flags,8)?[]:l;if(p||C){var x=p||f.styles.isPositioned()?c:i,O=new cu(y);if(f.styles.isPositioned()||f.styles.opacity<1||f.styles.isTransformed()){var G=f.styles.zIndex.order;if(G<0){var Z=0;x.negativeZIndex.some(function(gA,mA){return G>gA.element.container.styles.zIndex.order?(Z=mA,!1):Z>0}),x.negativeZIndex.splice(Z,0,O)}else if(G>0){var vA=0;x.positiveZIndex.some(function(gA,mA){return G>=gA.element.container.styles.zIndex.order?(vA=mA+1,!1):vA>0}),x.positiveZIndex.splice(vA,0,O)}else x.zeroOrAutoZIndexOrTransformedOrOpacity.push(O)}else f.styles.isFloating()?x.nonPositionedFloats.push(O):x.nonPositionedInlineLevel.push(O);As(y,O,p?O:c,E)}else f.styles.isInlineLevel()?i.inlineLevel.push(y):i.nonInlineLevel.push(y),As(y,i,c,E);de(f.flags,8)&&du(f,E)})},du=function(s,i){for(var c=s instanceof Pi?s.start:1,l=s instanceof Pi?s.reversed:!1,f=0;f<i.length;f++){var p=i[f];p.container instanceof kc&&typeof p.container.value=="number"&&p.container.value!==0&&(c=p.container.value),p.listValue=jn(c,p.container.styles.listStyleType,!0),c+=l?-1:1}},YQ=function(s){var i=new uu(s,null),c=new cu(i),l=[];return As(i,c,c,l),du(i.container,l),c},fu=function(s,i){switch(i){case 0:return xe(s.topLeftBorderBox,s.topLeftPaddingBox,s.topRightBorderBox,s.topRightPaddingBox);case 1:return xe(s.topRightBorderBox,s.topRightPaddingBox,s.bottomRightBorderBox,s.bottomRightPaddingBox);case 2:return xe(s.bottomRightBorderBox,s.bottomRightPaddingBox,s.bottomLeftBorderBox,s.bottomLeftPaddingBox);default:return xe(s.bottomLeftBorderBox,s.bottomLeftPaddingBox,s.topLeftBorderBox,s.topLeftPaddingBox)}},JQ=function(s,i){switch(i){case 0:return xe(s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox,s.topRightBorderBox,s.topRightBorderDoubleOuterBox);case 1:return xe(s.topRightBorderBox,s.topRightBorderDoubleOuterBox,s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox);case 2:return xe(s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox,s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox);default:return xe(s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox,s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox)}},ZQ=function(s,i){switch(i){case 0:return xe(s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox,s.topRightBorderDoubleInnerBox,s.topRightPaddingBox);case 1:return xe(s.topRightBorderDoubleInnerBox,s.topRightPaddingBox,s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox);case 2:return xe(s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox,s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox);default:return xe(s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox,s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox)}},jQ=function(s,i){switch(i){case 0:return Eo(s.topLeftBorderStroke,s.topRightBorderStroke);case 1:return Eo(s.topRightBorderStroke,s.bottomRightBorderStroke);case 2:return Eo(s.bottomRightBorderStroke,s.bottomLeftBorderStroke);default:return Eo(s.bottomLeftBorderStroke,s.topLeftBorderStroke)}},Eo=function(s,i){var c=[];return Se(s)?c.push(s.subdivide(.5,!1)):c.push(s),Se(i)?c.push(i.subdivide(.5,!0)):c.push(i),c},xe=function(s,i,c,l){var f=[];return Se(s)?f.push(s.subdivide(.5,!1)):f.push(s),Se(c)?f.push(c.subdivide(.5,!0)):f.push(c),Se(l)?f.push(l.subdivide(.5,!0).reverse()):f.push(l),Se(i)?f.push(i.subdivide(.5,!1).reverse()):f.push(i),f},gu=function(s){var i=s.bounds,c=s.styles;return i.add(c.borderLeftWidth,c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth),-(c.borderTopWidth+c.borderBottomWidth))},Uo=function(s){var i=s.styles,c=s.bounds,l=jA(i.paddingLeft,c.width),f=jA(i.paddingRight,c.width),p=jA(i.paddingTop,c.width),C=jA(i.paddingBottom,c.width);return c.add(l+i.borderLeftWidth,p+i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth+l+f),-(i.borderTopWidth+i.borderBottomWidth+p+C))},qQ=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},AE=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},es=function(s,i,c){var l=qQ(fn(s.styles.backgroundOrigin,i),s),f=AE(fn(s.styles.backgroundClip,i),s),p=eE(fn(s.styles.backgroundSize,i),c,l),C=p[0],y=p[1],E=Xn(fn(s.styles.backgroundPosition,i),l.width-C,l.height-y);return[tE(fn(s.styles.backgroundRepeat,i),E,p,l,f),Math.round(l.left+E[0]),Math.round(l.top+E[1]),C,y]},dn=function(s){return JA(s)&&s.value===sn.AUTO},Fo=function(s){return typeof s=="number"},eE=function(s,i,c){var l=i[0],f=i[1],p=i[2],C=s[0],y=s[1];if(!C)return[0,0];if(ae(C)&&y&&ae(y))return[jA(C,c.width),jA(y,c.height)];var E=Fo(p);if(JA(C)&&(C.value===sn.CONTAIN||C.value===sn.COVER))return Fo(p)?c.width/c.height<p!=(C.value===sn.COVER)?[c.width,c.width/p]:[c.height*p,c.height]:[c.width,c.height];var x=Fo(l),O=Fo(f),G=x||O;if(dn(C)&&(!y||dn(y)))return x&&O?[l,f]:!E&&!G?[c.width,c.height]:G&&E?[x?l:f*p,O?f:l/p]:[x?l:c.width,O?f:c.height];if(E){var Z=0,vA=0;return ae(C)?Z=jA(C,c.width):ae(y)&&(vA=jA(y,c.height)),dn(C)?Z=vA*p:(!y||dn(y))&&(vA=Z/p),[Z,vA]}var gA=null,mA=null;if(ae(C)?gA=jA(C,c.width):y&&ae(y)&&(mA=jA(y,c.height)),gA!==null&&(!y||dn(y))&&(mA=x&&O?gA/l*f:c.height),mA!==null&&dn(C)&&(gA=x&&O?mA/f*l:c.width),gA!==null&&mA!==null)return[gA,mA];throw new Error("Unable to calculate background-size for element")},fn=function(s,i){var c=s[i];return typeof c>"u"?s[0]:c},tE=function(s,i,c,l,f){var p=i[0],C=i[1],y=c[0],E=c[1];switch(s){case 2:return[new yA(Math.round(l.left),Math.round(l.top+C)),new yA(Math.round(l.left+l.width),Math.round(l.top+C)),new yA(Math.round(l.left+l.width),Math.round(E+l.top+C)),new yA(Math.round(l.left),Math.round(E+l.top+C))];case 3:return[new yA(Math.round(l.left+p),Math.round(l.top)),new yA(Math.round(l.left+p+y),Math.round(l.top)),new yA(Math.round(l.left+p+y),Math.round(l.height+l.top)),new yA(Math.round(l.left+p),Math.round(l.height+l.top))];case 1:return[new yA(Math.round(l.left+p),Math.round(l.top+C)),new yA(Math.round(l.left+p+y),Math.round(l.top+C)),new yA(Math.round(l.left+p+y),Math.round(l.top+C+E)),new yA(Math.round(l.left+p),Math.round(l.top+C+E))];default:return[new yA(Math.round(f.left),Math.round(f.top)),new yA(Math.round(f.left+f.width),Math.round(f.top)),new yA(Math.round(f.left+f.width),Math.round(f.height+f.top)),new yA(Math.round(f.left),Math.round(f.height+f.top))]}},nE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",hu="Hidden Text",rE=(function(){function s(i){this._data={},this._document=i}return s.prototype.parseMetrics=function(i,c){var l=this._document.createElement("div"),f=this._document.createElement("img"),p=this._document.createElement("span"),C=this._document.body;l.style.visibility="hidden",l.style.fontFamily=i,l.style.fontSize=c,l.style.margin="0",l.style.padding="0",l.style.whiteSpace="nowrap",C.appendChild(l),f.src=nE,f.width=1,f.height=1,f.style.margin="0",f.style.padding="0",f.style.verticalAlign="baseline",p.style.fontFamily=i,p.style.fontSize=c,p.style.margin="0",p.style.padding="0",p.appendChild(this._document.createTextNode(hu)),l.appendChild(p),l.appendChild(f);var y=f.offsetTop-p.offsetTop+2;l.removeChild(p),l.appendChild(this._document.createTextNode(hu)),l.style.lineHeight="normal",f.style.verticalAlign="super";var E=f.offsetTop-l.offsetTop+2;return C.removeChild(l),{baseline:y,middle:E}},s.prototype.getMetrics=function(i,c){var l=i+" "+c;return typeof this._data[l]>"u"&&(this._data[l]=this.parseMetrics(i,c)),this._data[l]},s})(),Bu=(function(){function s(i,c){this.context=i,this.options=c}return s})(),oE=1e4,iE=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f._activeEffects=[],f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),l.canvas||(f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px"),f.fontMetrics=new rE(document),f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.ctx.textBaseline="bottom",f._activeEffects=[],f.context.logger.debug("Canvas renderer initialized ("+l.width+"x"+l.height+") with scale "+l.scale),f}return i.prototype.applyEffects=function(c){for(var l=this;this._activeEffects.length;)this.popEffect();c.forEach(function(f){return l.applyEffect(f)})},i.prototype.applyEffect=function(c){this.ctx.save(),$Q(c)&&(this.ctx.globalAlpha=c.opacity),XQ(c)&&(this.ctx.translate(c.offsetX,c.offsetY),this.ctx.transform(c.matrix[0],c.matrix[1],c.matrix[2],c.matrix[3],c.matrix[4],c.matrix[5]),this.ctx.translate(-c.offsetX,-c.offsetY)),au(c)&&(this.path(c.path),this.ctx.clip()),this._activeEffects.push(c)},i.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},i.prototype.renderStack=function(c){return a(this,void 0,void 0,function(){var l;return u(this,function(f){switch(f.label){case 0:return l=c.element.container.styles,l.isVisible()?[4,this.renderStackContent(c)]:[3,2];case 1:f.sent(),f.label=2;case 2:return[2]}})})},i.prototype.renderNode=function(c){return a(this,void 0,void 0,function(){return u(this,function(l){switch(l.label){case 0:if(de(c.container.flags,16))debugger;return c.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(c)]:[3,3];case 1:return l.sent(),[4,this.renderNodeContent(c)];case 2:l.sent(),l.label=3;case 3:return[2]}})})},i.prototype.renderTextWithLetterSpacing=function(c,l,f){var p=this;l===0?this.ctx.fillText(c.text,c.bounds.left,c.bounds.top+f):Vi(c.text).reduce(function(C,y){return p.ctx.fillText(y,C,c.bounds.top+f),C+p.ctx.measureText(y).width},c.bounds.left)},i.prototype.createFontStyle=function(c){var l=c.fontVariant.filter(function(C){return C==="normal"||C==="small-caps"}).join(""),f=uE(c.fontFamily).join(", "),p=zn(c.fontSize)?""+c.fontSize.number+c.fontSize.unit:c.fontSize.number+"px";return[[c.fontStyle,l,c.fontWeight,p,f].join(" "),f,p]},i.prototype.renderTextNode=function(c,l){return a(this,void 0,void 0,function(){var f,p,C,y,E,x,O,G,Z=this;return u(this,function(vA){return f=this.createFontStyle(l),p=f[0],C=f[1],y=f[2],this.ctx.font=p,this.ctx.direction=l.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",E=this.fontMetrics.getMetrics(C,y),x=E.baseline,O=E.middle,G=l.paintOrder,c.textBounds.forEach(function(gA){G.forEach(function(mA){switch(mA){case 0:Z.ctx.fillStyle=fe(l.color),Z.renderTextWithLetterSpacing(gA,l.letterSpacing,x);var OA=l.textShadow;OA.length&&gA.text.trim().length&&(OA.slice(0).reverse().forEach(function(SA){Z.ctx.shadowColor=fe(SA.color),Z.ctx.shadowOffsetX=SA.offsetX.number*Z.options.scale,Z.ctx.shadowOffsetY=SA.offsetY.number*Z.options.scale,Z.ctx.shadowBlur=SA.blur.number,Z.renderTextWithLetterSpacing(gA,l.letterSpacing,x)}),Z.ctx.shadowColor="",Z.ctx.shadowOffsetX=0,Z.ctx.shadowOffsetY=0,Z.ctx.shadowBlur=0),l.textDecorationLine.length&&(Z.ctx.fillStyle=fe(l.textDecorationColor||l.color),l.textDecorationLine.forEach(function(SA){switch(SA){case 1:Z.ctx.fillRect(gA.bounds.left,Math.round(gA.bounds.top+x),gA.bounds.width,1);break;case 2:Z.ctx.fillRect(gA.bounds.left,Math.round(gA.bounds.top),gA.bounds.width,1);break;case 3:Z.ctx.fillRect(gA.bounds.left,Math.ceil(gA.bounds.top+O),gA.bounds.width,1);break}}));break;case 1:l.webkitTextStrokeWidth&&gA.text.trim().length&&(Z.ctx.strokeStyle=fe(l.webkitTextStrokeColor),Z.ctx.lineWidth=l.webkitTextStrokeWidth,Z.ctx.lineJoin=window.chrome?"miter":"round",Z.ctx.strokeText(gA.text,gA.bounds.left,gA.bounds.top+x)),Z.ctx.strokeStyle="",Z.ctx.lineWidth=0,Z.ctx.lineJoin="miter";break}})}),[2]})})},i.prototype.renderReplacedElement=function(c,l,f){if(f&&c.intrinsicWidth>0&&c.intrinsicHeight>0){var p=Uo(c),C=yo(l);this.path(C),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(f,0,0,c.intrinsicWidth,c.intrinsicHeight,p.left,p.top,p.width,p.height),this.ctx.restore()}},i.prototype.renderNodeContent=function(c){return a(this,void 0,void 0,function(){var l,f,p,C,y,E,_A,_A,x,O,G,Z,zA,vA,gA,TA,mA,OA,SA,_A,Ae,zA,TA;return u(this,function(EA){switch(EA.label){case 0:this.applyEffects(c.getEffects(4)),l=c.container,f=c.curves,p=l.styles,C=0,y=l.textNodes,EA.label=1;case 1:return C<y.length?(E=y[C],[4,this.renderTextNode(E,p)]):[3,4];case 2:EA.sent(),EA.label=3;case 3:return C++,[3,1];case 4:if(!(l instanceof Nc))return[3,8];EA.label=5;case 5:return EA.trys.push([5,7,,8]),[4,this.context.cache.match(l.src)];case 6:return _A=EA.sent(),this.renderReplacedElement(l,f,_A),[3,8];case 7:return EA.sent(),this.context.logger.error("Error loading image "+l.src),[3,8];case 8:if(l instanceof Lc&&this.renderReplacedElement(l,f,l.canvas),!(l instanceof Tc))return[3,12];EA.label=9;case 9:return EA.trys.push([9,11,,12]),[4,this.context.cache.match(l.svg)];case 10:return _A=EA.sent(),this.renderReplacedElement(l,f,_A),[3,12];case 11:return EA.sent(),this.context.logger.error("Error loading svg "+l.svg.substring(0,255)),[3,12];case 12:return l instanceof Rc&&l.tree?(x=new i(this.context,{scale:this.options.scale,backgroundColor:l.backgroundColor,x:0,y:0,width:l.width,height:l.height}),[4,x.render(l.tree)]):[3,14];case 13:O=EA.sent(),l.width&&l.height&&this.ctx.drawImage(O,0,0,l.width,l.height,l.bounds.left,l.bounds.top,l.bounds.width,l.bounds.height),EA.label=14;case 14:if(l instanceof Gi&&(G=Math.min(l.bounds.width,l.bounds.height),l.type===go?l.checked&&(this.ctx.save(),this.path([new yA(l.bounds.left+G*.39363,l.bounds.top+G*.79),new yA(l.bounds.left+G*.16,l.bounds.top+G*.5549),new yA(l.bounds.left+G*.27347,l.bounds.top+G*.44071),new yA(l.bounds.left+G*.39694,l.bounds.top+G*.5649),new yA(l.bounds.left+G*.72983,l.bounds.top+G*.23),new yA(l.bounds.left+G*.84,l.bounds.top+G*.34085),new yA(l.bounds.left+G*.39363,l.bounds.top+G*.79)]),this.ctx.fillStyle=fe(Mc),this.ctx.fill(),this.ctx.restore()):l.type===ho&&l.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(l.bounds.left+G/2,l.bounds.top+G/2,G/4,0,Math.PI*2,!0),this.ctx.fillStyle=fe(Mc),this.ctx.fill(),this.ctx.restore())),sE(l)&&l.value.length){switch(Z=this.createFontStyle(p),zA=Z[0],vA=Z[1],gA=this.fontMetrics.getMetrics(zA,vA).baseline,this.ctx.font=zA,this.ctx.fillStyle=fe(p.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=lE(l.styles.textAlign),TA=Uo(l),mA=0,l.styles.textAlign){case 1:mA+=TA.width/2;break;case 2:mA+=TA.width;break}OA=TA.add(mA,0,0,-TA.height/2+1),this.ctx.save(),this.path([new yA(TA.left,TA.top),new yA(TA.left+TA.width,TA.top),new yA(TA.left+TA.width,TA.top+TA.height),new yA(TA.left,TA.top+TA.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Jn(l.value,OA),p.letterSpacing,gA),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!de(l.styles.display,2048))return[3,20];if(l.styles.listStyleImage===null)return[3,19];if(SA=l.styles.listStyleImage,SA.type!==0)return[3,18];_A=void 0,Ae=SA.url,EA.label=15;case 15:return EA.trys.push([15,17,,18]),[4,this.context.cache.match(Ae)];case 16:return _A=EA.sent(),this.ctx.drawImage(_A,l.bounds.left-(_A.width+10),l.bounds.top),[3,18];case 17:return EA.sent(),this.context.logger.error("Error loading list-style-image "+Ae),[3,18];case 18:return[3,20];case 19:c.listValue&&l.styles.listStyleType!==-1&&(zA=this.createFontStyle(p)[0],this.ctx.font=zA,this.ctx.fillStyle=fe(p.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",TA=new h(l.bounds.left,l.bounds.top+jA(l.styles.paddingTop,l.bounds.width),l.bounds.width,hc(p.lineHeight,p.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Jn(c.listValue,TA),p.letterSpacing,hc(p.lineHeight,p.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),EA.label=20;case 20:return[2]}})})},i.prototype.renderStackContent=function(c){return a(this,void 0,void 0,function(){var l,f,SA,p,C,SA,y,E,SA,x,O,SA,G,Z,SA,vA,gA,SA,mA,OA,SA;return u(this,function(_A){switch(_A.label){case 0:if(de(c.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(c.element)];case 1:_A.sent(),l=0,f=c.negativeZIndex,_A.label=2;case 2:return l<f.length?(SA=f[l],[4,this.renderStack(SA)]):[3,5];case 3:_A.sent(),_A.label=4;case 4:return l++,[3,2];case 5:return[4,this.renderNodeContent(c.element)];case 6:_A.sent(),p=0,C=c.nonInlineLevel,_A.label=7;case 7:return p<C.length?(SA=C[p],[4,this.renderNode(SA)]):[3,10];case 8:_A.sent(),_A.label=9;case 9:return p++,[3,7];case 10:y=0,E=c.nonPositionedFloats,_A.label=11;case 11:return y<E.length?(SA=E[y],[4,this.renderStack(SA)]):[3,14];case 12:_A.sent(),_A.label=13;case 13:return y++,[3,11];case 14:x=0,O=c.nonPositionedInlineLevel,_A.label=15;case 15:return x<O.length?(SA=O[x],[4,this.renderStack(SA)]):[3,18];case 16:_A.sent(),_A.label=17;case 17:return x++,[3,15];case 18:G=0,Z=c.inlineLevel,_A.label=19;case 19:return G<Z.length?(SA=Z[G],[4,this.renderNode(SA)]):[3,22];case 20:_A.sent(),_A.label=21;case 21:return G++,[3,19];case 22:vA=0,gA=c.zeroOrAutoZIndexOrTransformedOrOpacity,_A.label=23;case 23:return vA<gA.length?(SA=gA[vA],[4,this.renderStack(SA)]):[3,26];case 24:_A.sent(),_A.label=25;case 25:return vA++,[3,23];case 26:mA=0,OA=c.positiveZIndex,_A.label=27;case 27:return mA<OA.length?(SA=OA[mA],[4,this.renderStack(SA)]):[3,30];case 28:_A.sent(),_A.label=29;case 29:return mA++,[3,27];case 30:return[2]}})})},i.prototype.mask=function(c){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(c.slice(0).reverse()),this.ctx.closePath()},i.prototype.path=function(c){this.ctx.beginPath(),this.formatPath(c),this.ctx.closePath()},i.prototype.formatPath=function(c){var l=this;c.forEach(function(f,p){var C=Se(f)?f.start:f;p===0?l.ctx.moveTo(C.x,C.y):l.ctx.lineTo(C.x,C.y),Se(f)&&l.ctx.bezierCurveTo(f.startControl.x,f.startControl.y,f.endControl.x,f.endControl.y,f.end.x,f.end.y)})},i.prototype.renderRepeat=function(c,l,f,p){this.path(c),this.ctx.fillStyle=l,this.ctx.translate(f,p),this.ctx.fill(),this.ctx.translate(-f,-p)},i.prototype.resizeImage=function(c,l,f){var p;if(c.width===l&&c.height===f)return c;var C=((p=this.canvas.ownerDocument)!==null&&p!==void 0?p:document).createElement("canvas");return C.width=Math.max(1,l),C.height=Math.max(1,f),C.getContext("2d").drawImage(c,0,0,c.width,c.height,0,0,l,f),C},i.prototype.renderBackgroundImage=function(c){return a(this,void 0,void 0,function(){var l,f,p,C,y,E;return u(this,function(x){switch(x.label){case 0:l=c.styles.backgroundImage.length-1,f=function(O){var G,Z,vA,le,Qe,Ee,ZA,Be,GA,gA,le,Qe,Ee,ZA,Be,mA,OA,SA,_A,Ae,zA,TA,EA,PA,GA,MA,le,ye,He,ZA,Be,Ft,Qe,Ee,Rt,Ye,bt,Vt,Pt,lt,Gt,ct;return u(this,function(gn){switch(gn.label){case 0:if(O.type!==0)return[3,5];G=void 0,Z=O.url,gn.label=1;case 1:return gn.trys.push([1,3,,4]),[4,p.context.cache.match(Z)];case 2:return G=gn.sent(),[3,4];case 3:return gn.sent(),p.context.logger.error("Error loading background-image "+Z),[3,4];case 4:return G&&(vA=es(c,l,[G.width,G.height,G.width/G.height]),le=vA[0],Qe=vA[1],Ee=vA[2],ZA=vA[3],Be=vA[4],GA=p.ctx.createPattern(p.resizeImage(G,ZA,Be),"repeat"),p.renderRepeat(le,GA,Qe,Ee)),[3,6];case 5:jC(O)?(gA=es(c,l,[null,null,null]),le=gA[0],Qe=gA[1],Ee=gA[2],ZA=gA[3],Be=gA[4],mA=$C(O.angle,ZA,Be),OA=mA[0],SA=mA[1],_A=mA[2],Ae=mA[3],zA=mA[4],TA=document.createElement("canvas"),TA.width=ZA,TA.height=Be,EA=TA.getContext("2d"),PA=EA.createLinearGradient(SA,Ae,_A,zA),rc(O.stops,OA).forEach(function(Ar){return PA.addColorStop(Ar.stop,fe(Ar.color))}),EA.fillStyle=PA,EA.fillRect(0,0,ZA,Be),ZA>0&&Be>0&&(GA=p.ctx.createPattern(TA,"repeat"),p.renderRepeat(le,GA,Qe,Ee))):qC(O)&&(MA=es(c,l,[null,null,null]),le=MA[0],ye=MA[1],He=MA[2],ZA=MA[3],Be=MA[4],Ft=O.position.length===0?[bi]:O.position,Qe=jA(Ft[0],ZA),Ee=jA(Ft[Ft.length-1],Be),Rt=WC(O,Qe,Ee,ZA,Be),Ye=Rt[0],bt=Rt[1],Ye>0&&bt>0&&(Vt=p.ctx.createRadialGradient(ye+Qe,He+Ee,0,ye+Qe,He+Ee,Ye),rc(O.stops,Ye*2).forEach(function(Ar){return Vt.addColorStop(Ar.stop,fe(Ar.color))}),p.path(le),p.ctx.fillStyle=Vt,Ye!==bt?(Pt=c.bounds.left+.5*c.bounds.width,lt=c.bounds.top+.5*c.bounds.height,Gt=bt/Ye,ct=1/Gt,p.ctx.save(),p.ctx.translate(Pt,lt),p.ctx.transform(1,0,0,Gt,0,0),p.ctx.translate(-Pt,-lt),p.ctx.fillRect(ye,ct*(He-lt)+lt,ZA,Be*ct),p.ctx.restore()):p.ctx.fill())),gn.label=6;case 6:return l--,[2]}})},p=this,C=0,y=c.styles.backgroundImage.slice(0).reverse(),x.label=1;case 1:return C<y.length?(E=y[C],[5,f(E)]):[3,4];case 2:x.sent(),x.label=3;case 3:return C++,[3,1];case 4:return[2]}})})},i.prototype.renderSolidBorder=function(c,l,f){return a(this,void 0,void 0,function(){return u(this,function(p){return this.path(fu(f,l)),this.ctx.fillStyle=fe(c),this.ctx.fill(),[2]})})},i.prototype.renderDoubleBorder=function(c,l,f,p){return a(this,void 0,void 0,function(){var C,y;return u(this,function(E){switch(E.label){case 0:return l<3?[4,this.renderSolidBorder(c,f,p)]:[3,2];case 1:return E.sent(),[2];case 2:return C=JQ(p,f),this.path(C),this.ctx.fillStyle=fe(c),this.ctx.fill(),y=ZQ(p,f),this.path(y),this.ctx.fill(),[2]}})})},i.prototype.renderNodeBackgroundAndBorders=function(c){return a(this,void 0,void 0,function(){var l,f,p,C,y,E,x,O,G=this;return u(this,function(Z){switch(Z.label){case 0:return this.applyEffects(c.getEffects(2)),l=c.container.styles,f=!yt(l.backgroundColor)||l.backgroundImage.length,p=[{style:l.borderTopStyle,color:l.borderTopColor,width:l.borderTopWidth},{style:l.borderRightStyle,color:l.borderRightColor,width:l.borderRightWidth},{style:l.borderBottomStyle,color:l.borderBottomColor,width:l.borderBottomWidth},{style:l.borderLeftStyle,color:l.borderLeftColor,width:l.borderLeftWidth}],C=aE(fn(l.backgroundClip,0),c.curves),f||l.boxShadow.length?(this.ctx.save(),this.path(C),this.ctx.clip(),yt(l.backgroundColor)||(this.ctx.fillStyle=fe(l.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(c.container)]):[3,2];case 1:Z.sent(),this.ctx.restore(),l.boxShadow.slice(0).reverse().forEach(function(vA){G.ctx.save();var gA=vo(c.curves),mA=vA.inset?0:oE,OA=WQ(gA,-mA+(vA.inset?1:-1)*vA.spread.number,(vA.inset?1:-1)*vA.spread.number,vA.spread.number*(vA.inset?-2:2),vA.spread.number*(vA.inset?-2:2));vA.inset?(G.path(gA),G.ctx.clip(),G.mask(OA)):(G.mask(gA),G.ctx.clip(),G.path(OA)),G.ctx.shadowOffsetX=vA.offsetX.number+mA,G.ctx.shadowOffsetY=vA.offsetY.number,G.ctx.shadowColor=fe(vA.color),G.ctx.shadowBlur=vA.blur.number,G.ctx.fillStyle=vA.inset?fe(vA.color):"rgba(0,0,0,1)",G.ctx.fill(),G.ctx.restore()}),Z.label=2;case 2:y=0,E=0,x=p,Z.label=3;case 3:return E<x.length?(O=x[E],O.style!==0&&!yt(O.color)&&O.width>0?O.style!==2?[3,5]:[4,this.renderDashedDottedBorder(O.color,O.width,y,c.curves,2)]:[3,11]):[3,13];case 4:return Z.sent(),[3,11];case 5:return O.style!==3?[3,7]:[4,this.renderDashedDottedBorder(O.color,O.width,y,c.curves,3)];case 6:return Z.sent(),[3,11];case 7:return O.style!==4?[3,9]:[4,this.renderDoubleBorder(O.color,O.width,y,c.curves)];case 8:return Z.sent(),[3,11];case 9:return[4,this.renderSolidBorder(O.color,y,c.curves)];case 10:Z.sent(),Z.label=11;case 11:y++,Z.label=12;case 12:return E++,[3,3];case 13:return[2]}})})},i.prototype.renderDashedDottedBorder=function(c,l,f,p,C){return a(this,void 0,void 0,function(){var y,E,x,O,G,Z,vA,gA,mA,OA,SA,_A,Ae,zA,TA,EA,TA,EA;return u(this,function(PA){return this.ctx.save(),y=jQ(p,f),E=fu(p,f),C===2&&(this.path(E),this.ctx.clip()),Se(E[0])?(x=E[0].start.x,O=E[0].start.y):(x=E[0].x,O=E[0].y),Se(E[1])?(G=E[1].end.x,Z=E[1].end.y):(G=E[1].x,Z=E[1].y),f===0||f===2?vA=Math.abs(x-G):vA=Math.abs(O-Z),this.ctx.beginPath(),C===3?this.formatPath(y):this.formatPath(E.slice(0,2)),gA=l<3?l*3:l*2,mA=l<3?l*2:l,C===3&&(gA=l,mA=l),OA=!0,vA<=gA*2?OA=!1:vA<=gA*2+mA?(SA=vA/(2*gA+mA),gA*=SA,mA*=SA):(_A=Math.floor((vA+mA)/(gA+mA)),Ae=(vA-_A*gA)/(_A-1),zA=(vA-(_A+1)*gA)/_A,mA=zA<=0||Math.abs(mA-Ae)<Math.abs(mA-zA)?Ae:zA),OA&&(C===3?this.ctx.setLineDash([0,gA+mA]):this.ctx.setLineDash([gA,mA])),C===3?(this.ctx.lineCap="round",this.ctx.lineWidth=l):this.ctx.lineWidth=l*2+1.1,this.ctx.strokeStyle=fe(c),this.ctx.stroke(),this.ctx.setLineDash([]),C===2&&(Se(E[0])&&(TA=E[3],EA=E[0],this.ctx.beginPath(),this.formatPath([new yA(TA.end.x,TA.end.y),new yA(EA.start.x,EA.start.y)]),this.ctx.stroke()),Se(E[1])&&(TA=E[1],EA=E[2],this.ctx.beginPath(),this.formatPath([new yA(TA.end.x,TA.end.y),new yA(EA.start.x,EA.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},i.prototype.render=function(c){return a(this,void 0,void 0,function(){var l;return u(this,function(f){switch(f.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=fe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),l=YQ(c),[4,this.renderStack(l)];case 1:return f.sent(),this.applyEffects([]),[2,this.canvas]}})})},i})(Bu),sE=function(s){return s instanceof Oc||s instanceof Kc?!0:s instanceof Gi&&s.type!==ho&&s.type!==go},aE=function(s,i){switch(s){case 0:return vo(i);case 2:return PQ(i);default:return yo(i)}},lE=function(s){switch(s){case 1:return"center";case 2:return"right";default:return"left"}},cE=["-apple-system","system-ui"],uE=function(s){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?s.filter(function(i){return cE.indexOf(i)===-1}):s},dE=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),f.options=l,f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px",f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+l.width+"x"+l.height+" at "+l.x+","+l.y+") with scale "+l.scale),f}return i.prototype.render=function(c){return a(this,void 0,void 0,function(){var l,f;return u(this,function(p){switch(p.label){case 0:return l=Ri(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,c),[4,fE(l)];case 1:return f=p.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=fe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(f,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},i})(Bu),fE=function(s){return new Promise(function(i,c){var l=new Image;l.onload=function(){i(l)},l.onerror=c,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},gE=(function(){function s(i){var c=i.id,l=i.enabled;this.id=c,this.enabled=l,this.start=Date.now()}return s.prototype.debug=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.getTime=function(){return Date.now()-this.start},s.prototype.info=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,d([this.id,this.getTime()+"ms"],i))},s.prototype.warn=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.error=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.instances={},s})(),hE=(function(){function s(i,c){var l;this.windowBounds=c,this.instanceName="#"+s.instanceCount++,this.logger=new gE({id:this.instanceName,enabled:i.logging}),this.cache=(l=i.cache)!==null&&l!==void 0?l:new LQ(this,i)}return s.instanceCount=1,s})(),BE=function(s,i){return i===void 0&&(i={}),pE(s,i)};typeof window<"u"&&su.setContext(window);var pE=function(s,i){return a(void 0,void 0,void 0,function(){var c,l,f,p,C,y,E,x,O,G,Z,vA,gA,mA,OA,SA,_A,Ae,zA,TA,PA,EA,PA,GA,MA,le,ye,He,ZA,Be,Ft,Qe,Ee,Rt,Ye,bt,Vt,Pt,lt,Gt;return u(this,function(ct){switch(ct.label){case 0:if(!s||typeof s!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(c=s.ownerDocument,!c)throw new Error("Element is not attached to a Document");if(l=c.defaultView,!l)throw new Error("Document is not attached to a Window");return f={allowTaint:(GA=i.allowTaint)!==null&&GA!==void 0?GA:!1,imageTimeout:(MA=i.imageTimeout)!==null&&MA!==void 0?MA:15e3,proxy:i.proxy,useCORS:(le=i.useCORS)!==null&&le!==void 0?le:!1},p=o({logging:(ye=i.logging)!==null&&ye!==void 0?ye:!0,cache:i.cache},f),C={windowWidth:(He=i.windowWidth)!==null&&He!==void 0?He:l.innerWidth,windowHeight:(ZA=i.windowHeight)!==null&&ZA!==void 0?ZA:l.innerHeight,scrollX:(Be=i.scrollX)!==null&&Be!==void 0?Be:l.pageXOffset,scrollY:(Ft=i.scrollY)!==null&&Ft!==void 0?Ft:l.pageYOffset},y=new h(C.scrollX,C.scrollY,C.windowWidth,C.windowHeight),E=new hE(p,y),x=(Qe=i.foreignObjectRendering)!==null&&Qe!==void 0?Qe:!1,O={allowTaint:(Ee=i.allowTaint)!==null&&Ee!==void 0?Ee:!1,onclone:i.onclone,ignoreElements:i.ignoreElements,inlineImages:x,copyStyles:x},E.logger.debug("Starting document clone with size "+y.width+"x"+y.height+" scrolled to "+-y.left+","+-y.top),G=new ou(E,s,O),Z=G.clonedReferenceElement,Z?[4,G.toIFrame(c,y)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return vA=ct.sent(),gA=Xi(Z)||mQ(Z)?B(Z.ownerDocument):g(E,Z),mA=gA.width,OA=gA.height,SA=gA.left,_A=gA.top,Ae=mE(E,Z,i.backgroundColor),zA={canvas:i.canvas,backgroundColor:Ae,scale:(Ye=(Rt=i.scale)!==null&&Rt!==void 0?Rt:l.devicePixelRatio)!==null&&Ye!==void 0?Ye:1,x:((bt=i.x)!==null&&bt!==void 0?bt:0)+SA,y:((Vt=i.y)!==null&&Vt!==void 0?Vt:0)+_A,width:(Pt=i.width)!==null&&Pt!==void 0?Pt:Math.ceil(mA),height:(lt=i.height)!==null&&lt!==void 0?lt:Math.ceil(OA)},x?(E.logger.debug("Document cloned, using foreign object rendering"),PA=new dE(E,zA),[4,PA.render(Z)]):[3,3];case 2:return TA=ct.sent(),[3,5];case 3:return E.logger.debug("Document cloned, element located at "+SA+","+_A+" with size "+mA+"x"+OA+" using computed rendering"),E.logger.debug("Starting DOM parsing"),EA=Pc(E,Z),Ae===EA.styles.backgroundColor&&(EA.styles.backgroundColor=st.TRANSPARENT),E.logger.debug("Starting renderer for element at "+zA.x+","+zA.y+" with size "+zA.width+"x"+zA.height),PA=new iE(E,zA),[4,PA.render(EA)];case 4:TA=ct.sent(),ct.label=5;case 5:return(!((Gt=i.removeContainer)!==null&&Gt!==void 0)||Gt)&&(ou.destroy(vA)||E.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),E.logger.debug("Finished rendering"),[2,TA]}})})},mE=function(s,i,c){var l=i.ownerDocument,f=l.documentElement?$n(s,getComputedStyle(l.documentElement).backgroundColor):st.TRANSPARENT,p=l.body?$n(s,getComputedStyle(l.body).backgroundColor):st.TRANSPARENT,C=typeof c=="string"?$n(s,c):c===null?st.TRANSPARENT:4294967295;return i===l.documentElement?yt(f)?yt(p)?C:p:f:C};return BE}))})),qw=rs(jw(),1),A0=(0,r.defineComponent)({name:"DBiDesignContainer",__name:"biDesignContainer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})},activedComponent:{type:Object,default:()=>({})},scale:{type:Number,default:1}},emits:["select","move"],setup(e,{emit:A}){const t=e,n=A,{apiUrl:o,token:a}=(0,Ht.useAppInject)(),u=(0,r.computed)(()=>{const B={transform:`scale(${t.scale}, ${t.scale})`,transformOrigin:"left top",position:"relative",width:$A(t.indexPage.config.w||1920),height:$A(t.indexPage.config.h||1080),backgroundColor:t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"};return t.indexPage.config.backgroundImage&&(B.background=`url(${o}/system/annexesfile/${t.indexPage.config.backgroundImage}?token=${a?.value}) 0% 0% / 100% 100% ${t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"}`),B}),d=B=>{n("select",B)},h=B=>{n("move",B)},g=B=>{B?.target?.getAttribute("id")==="j-bi-design-container"&&n("select",t.indexPage)};return(B,w)=>{const m=(0,r.resolveComponent)("d-draggable");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{onClick:(0,r.withModifiers)(g,["stop"]),id:"j-bi-design-container",style:(0,r.normalizeStyle)(u.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.layout,(v,Q)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:v.id},[v.display?((0,r.openBlock)(),(0,r.createBlock)(m,{key:0,id:v.id,left:v.config.x,top:v.config.y,width:v.config.w,height:v.config.h,scale:1/e.scale,step:1/e.scale,"active-flag":v.id==e.activedComponent.id,readonly:v.lock,"data-id":v.id,onFocus:H=>d(v),onBlur:h,"z-index":e.layout.length-Q,"is-active-bg-transparent":!0},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(v.componentName),(0,r.mergeProps)({style:{width:(0,r.unref)($A)(v.config.w),height:(0,r.unref)($A)(v.config.h)}},{ref_for:!0},v.config,{"is-design":!0}),null,16,["style"]))]),_:2},1032,["id","left","top","width","height","scale","step","active-flag","readonly","data-id","onFocus","z-index"])):(0,r.createCommentVNode)("",!0)],64))),128))],4)}}}),El=A0,e0=(0,r.defineComponent)({name:"DBiViewer",__name:"biViewer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})}},setup(e){const A=e,{apiUrl:t,token:n,httpGet:o,httpPost:a}=(0,Ht.useAppInject)(),u=(0,r.computed)(()=>A.layout),d=(0,r.ref)(),h=(0,r.ref)(1),g=(0,r.ref)(1),B=()=>{d.value&&w(d.value.offsetWidth,d.value.offsetHeight)},w=(U,K)=>{const eA=A.indexPage.config?.w||1920,W=A.indexPage.config?.h||1080,iA=A.indexPage.config?.screenFit||"1";iA==="1"?(g.value=U/eA,h.value=g.value):iA==="2"?(h.value=K/W,g.value=h.value):iA==="3"&&(g.value=U/eA,h.value=K/W)},m=(0,r.computed)(()=>{const U={transform:`scale(${g.value}, ${h.value})`,transformOrigin:"left top",position:"relative",overflow:"hidden",width:$A(A.indexPage.config?.w||1920),height:$A(A.indexPage.config?.h||1080),backgroundColor:A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"};return A.indexPage.config?.backgroundImage&&(U.background=`url(${t}/system/annexesfile/${A.indexPage.config?.backgroundImage}?token=${n?.value}) 0% 0% / 100% 100% ${A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"}`),U}),v=(0,r.computed)(()=>({width:$A((A.indexPage.config?.w||1920)*g.value),height:$A((A.indexPage.config?.h||1080)*h.value)})),Q={},H=(U,K)=>{U&&(Q[K]=U)},N=new ResizeObserver(B);(0,r.onMounted)(()=>{N.observe(d.value)});const T=(U,K)=>{M(K,{params:U})},M=async(U,K)=>{if(U&&U.trim()){U=`async (jcode) => {${U}}`;const{res:eA,msg:W,fn:iA}=(0,Ht.getFunction)(U)}};return(0,r.provide)("jcode_bi_viewer",{executeEvent:M}),(U,K)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"j-block",style:(0,r.normalizeStyle)({"overflow-y":!e.indexPage.config?.screenFit||e.indexPage.config?.screenFit=="1"?"auto":"hidden","overflow-x":e.indexPage.config?.screenFit=="2"?"auto":"hidden"}),ref_key:"biViewer",ref:d},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(v.value)},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(m.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(u.value,(eA,W)=>(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(eA.componentName),(0,r.mergeProps)({key:eA.id,ref_for:!0,ref:iA=>H(iA,eA.id),style:{position:"absolute",width:(0,r.unref)($A)(eA.config.w),height:(0,r.unref)($A)(eA.config.h),top:(0,r.unref)($A)(eA.config.y),left:(0,r.unref)($A)(eA.config.x),zIndex:e.layout.length-W}},{ref_for:!0},eA.config,{onClick:iA=>T(iA,eA.config.clickevent)}),null,16,["style","onClick"])),[[r.vShow,eA.display!==!1]])),128))],4)],4)],4))}}),Ul=e0,t0={class:"j-bi-design"},n0={class:"j-bi-design-left"},r0={style:{padding:"0 4px"}},o0=["onClick"],i0={class:"j-bi-design-left2"},s0={key:0,class:"j-block",style:{"padding-top":"28px"}},a0={class:"search-input-wraper"},l0=["onClick","data-id"],c0={class:"j-bi-design-layer-item-img"},u0=["src"],d0={class:"j-bi-design-layer-item-btns"},f0=["onClick"],g0=["onClick"],h0=["onClick"],B0=["onDragend"],p0={class:"component-item2-text"},m0=["src"],w0={class:"j-bi-design-right"},C0={class:"j-bi-design-title"},v0={class:"j-bi-design-panel"},y0=(0,r.defineComponent)({name:"DBiDesign",__name:"biDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,componentConfigInit:Function,componentConfigChange:Function,imgUrlPrefix:{type:String,default:"/"},scale:{type:Number,default:-1}},emits:["update:scale"],setup(e,{expose:A,emit:t}){const{t:n}=(0,Ht.useAppInject)(),o=e,a=t,u=(0,r.ref)({name:"页面",id:"indexPage",type:"indexPage",layerId:"0",config:{},display:!0,lock:!1,componentName:""});o.componentInit&&(u.value.config=o.componentInit("indexPage")||{},u.value.config.id="indexPage");const d=(0,r.computed)(()=>{const oA={};return o.components.forEach(hA=>{hA.children.forEach(xA=>{oA[xA.type]=xA})}),oA}),h=(0,r.ref)(0),g=(0,r.ref)(),B=(0,r.ref)([]),w=(0,r.ref)(!1),m=(0,r.ref)(0),v=(0,r.ref)(0),Q=(0,r.ref)(""),H=(0,r.computed)(()=>Q.value===""?{}:B.value.find(oA=>oA.id===Q.value)),N=()=>{w.value=!1,Q.value=""},T=oA=>{oA.target.className.indexOf("j-bi-design-contentmenu__btn")===-1&&N(),window.removeEventListener("mousedown",T)},M=oA=>{let{target:hA}=oA,xA=!1;hA.className.indexOf&&hA.className.indexOf("d-draggable__mask")>-1?(hA=hA.parentNode.parentNode,xA=!0):hA.className.indexOf&&hA.className.indexOf("j-bi-design-layer-item")>-1?xA=!0:hA.parentNode.className.indexOf&&hA.parentNode.className.indexOf("j-bi-design-layer-item")>-1?(hA=hA.parentNode,xA=!0):hA.parentNode.parentNode.className.indexOf("j-bi-design-layer-item")>-1&&(hA=hA.parentNode.parentNode,xA=!0),xA&&(oA.preventDefault(),oA.stopPropagation(),m.value=oA.clientX,v.value=oA.clientY-8,v.value+260>document.body.clientHeight&&(v.value=document.body.clientHeight-260),Q.value=hA.getAttribute("data-id"),w.value=!0,window.addEventListener("mousedown",T))},U=(0,r.ref)(""),K=(0,r.computed)(()=>U.value?B.value.filter(oA=>oA.config.label.indexOf(U.value)>-1):B.value),eA=oA=>{oA.display=!oA.display,N()},W=oA=>{oA.lock=!oA.lock,N(),oA.lock&&oA.id===g.value?.id&&CA(u.value)},iA=(oA,hA)=>{if(!hA||B.value.length<1){N();return}const xA=B.value.findIndex(kA=>kA.id===hA.id);switch(oA){case"up":if(xA===-1||xA===0)break;B.value=lA(B.value,xA,xA-1);break;case"down":if(xA===-1||xA===B.value.length-1)break;B.value=lA(B.value,xA,xA+1);break;case"top":if(xA!==-1){const[kA]=B.value.splice(xA,1);B.value.unshift(kA)}break;case"bottom":if(xA!==-1){const[kA]=B.value.splice(xA,1);B.value.push(kA)}break}N()},lA=(oA,hA,xA)=>{const kA=oA[hA];return oA[hA]=oA[xA],oA[xA]=kA,oA},nA=(0,r.ref)(),tA=(0,r.ref)(20),q=(0,r.ref)(document.body.clientWidth),k=(0,r.ref)(document.body.clientHeight),sA=(0,r.ref)(0),I=(0,r.ref)(0),Y=(0,r.ref)({bgColor:"rgba(225,225,225, 0)",longfgColor:"rgba(0, 0, 0, 0.45)",shortfgColor:"rgba(0, 0, 0, 0.45)",fontColor:"rgba(0, 0, 0, 0.65)",shadowColor:"rgba(225,225,225, 0)",lineColor:"var(--j-color-primary)",borderColor:"#d9d9d9",cornerActiveColor:"var(--j-color-primary)"}),F=(0,r.computed)(()=>({x:0,y:0,width:q.value,height:k.value})),S=(0,r.ref)({h:[],v:[]}),P=(0,r.ref)(),R=(0,r.ref)(),z=(0,r.ref)(!1),J=(0,r.ref)({}),rA=(0,r.ref)(100),dA=(0,r.computed)({set(oA){rA.value=oA,a("update:scale",oA)},get(){let{scale:oA}=o;return oA===-1&&(oA=rA.value),oA/100}}),bA=(0,r.computed)(()=>(u.value.config.h||1080)*2),AA=(0,r.computed)(()=>(u.value.config.w||1920)*2),cA=()=>{nA.value&&(q.value=nA.value.offsetWidth-tA.value,k.value=nA.value.offsetHeight-tA.value,P.value.scrollLeft=AA.value/2-tA.value,P.value.scrollTop=bA.value/2-tA.value,V())},V=()=>{const oA=u.value.config.w||1920;q.value<oA&&(dA.value=q.value*100/oA)},$=()=>{document.onkeydown=oA=>{if(oA.target?.nodeName==="TEXTAREA"||oA.target?.nodeName==="INPUT")return;const hA=oA.keyCode||oA.which;hA===32&&(oA.preventDefault(),J.value.space=!0),hA===17&&(oA.preventDefault(),J.value.ctrl=!0)},document.onkeyup=()=>{J.value={}}},uA=oA=>{J.value.space&&(z.value=!0,window.stardragEvent=oA,window.startSlideX=P.value.scrollLeft,window.startSlideY=P.value.scrollTop,document.onmousemove=hA=>{if(z.value){const xA=hA.clientX-window.stardragEvent.clientX,kA=hA.clientY-window.stardragEvent.clientY;P.value.scrollLeft=window.startSlideX-xA,P.value.scrollTop=window.startSlideY-kA}},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,z.value=!1})},BA=()=>{const oA=P.value.getBoundingClientRect(),hA=R.value.getBoundingClientRect(),xA=dA.value,kA=(oA.left+tA.value-hA.left)/xA,rt=(oA.top+tA.value-hA.top)/xA;sA.value=kA>>0,I.value=rt>>0},HA=oA=>{if(oA.preventDefault(),oA.ctrlKey||oA.metaKey){const hA=dA.value;dA.value=parseFloat(Math.max(.2,hA-oA.deltaY/500).toFixed(2))*100,hA!==dA.value&&(0,r.nextTick)(()=>{BA()})}},aA=(0,r.ref)(),wA=(0,r.computed)(()=>g.value?`【${g.value.name}】`:""),_={};Object.keys(o.componentConfigs).forEach(oA=>{const hA=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],xA=[{id:"w",type:"j-number",config:{label:"宽度",min:0}},{id:"h",type:"j-number",config:{label:"高度",min:0}},{id:"x",type:"j-number",config:{label:"x轴",min:0}},{id:"y",type:"j-number",config:{label:"y轴",min:0}}],kA={type:"j-collapse",config:{defaultValue:[]},children:[]};oA!=="indexPage"&&kA.children?.push({config:{label:"基础信息"},children:[...hA]}),kA.children?.push(...o.componentConfigs[oA]),oA!=="indexPage"?(kA.children?.push({config:{label:"大小定位"},children:[...xA]}),kA.config?.defaultValue.push("_collapse0","_collapse1")):kA.children&&kA.children.length>0&&kA.config?.defaultValue.push("_collapse0"),_[oA]=[kA]});const b=()=>{if(g.value){const oA=_[g.value.type];oA?aA.value.init(oA,g.value.config):aA.value.init([]),o.componentConfigInit&&o.componentConfigInit(g.value.type,{configRef:aA,components:B.value,configData:g.value.config})}else aA.value.init([])},D=(oA,hA)=>{g.value&&o.componentConfigChange&&(g.value.id==="indexPage"&&(oA.id==="w"||oA.id==="h")&&(0,r.nextTick)(()=>{cA()}),o.componentConfigChange(g.value.type,{configRef:aA,component:oA,configData:g.value.config,...hA}))},X=oA=>o.componentInit?o.componentInit(oA)||{}:{},L=(oA,hA,xA)=>{const kA={name:oA.name,id:dt(),type:oA.type,layerId:"0",config:X(oA.type),display:!0,lock:!1,componentName:oA.componentName};kA.config.id=kA.id,kA.config.label=oA.name,kA.config.h=oA.h||100,kA.config.w=oA.w||100,kA.config.x=hA,kA.config.y=xA,B.value.unshift(kA),g.value=kA,b()},pA=(oA,hA)=>{const xA=document.getElementById("j-bi-design-container").getBoundingClientRect(),kA=oA.clientX-xA.left,rt=oA.clientY-xA.top;L(hA,kA/dA.value-hA.w/2,rt/dA.value-hA.h/2)},fA=oA=>{B.value=B.value.filter(hA=>hA.id!==oA),g.value.id===oA&&(g.value=u.value,b()),N()},FA=oA=>{const hA=pn(oA),xA=dt();hA.id=xA,hA.config.id=xA,B.value.push(hA),g.value=hA,b(),N()},CA=oA=>{g.value?.id!==oA.id&&(g.value=oA,b())},LA=({left:oA,top:hA,width:xA,height:kA})=>{g.value&&(g.value.config.x=oA,g.value.config.y=hA,g.value.config.w=xA,g.value.config.h=kA,aA.value.setFormData({main:{x:oA,y:hA,w:xA,h:kA}}))},KA=new ResizeObserver(cA);(0,r.onMounted)(()=>{KA.observe(nA.value),$(),CA(u.value)});const XA=()=>({ver:"1.0.0",components:pn(B.value),page:u.value}),ue=oA=>{oA.components?.forEach(hA=>{hA.componentName=d.value[hA.type].componentName}),B.value=oA.components||[],u.value=oA.page||u.value,CA(u.value)},re=()=>{B.value=[],CA(u.value)},nt=()=>new Promise(oA=>{(0,qw.default)(R.value,{useCORS:!0,backgroundColor:null,allowTaint:!0}).then(hA=>{if(hA.width!==0&&hA.height!==0){oA(hA.toDataURL("image/png"));return}oA("")})}),pt=(0,r.ref)(),ze=(0,r.ref)({});return A({clear:re,setData:ue,getData:XA,getImg:nt,preview:()=>{ze.value=XA(),pt.value.open("大屏预览","full")}}),(oA,hA)=>{const xA=(0,r.resolveComponent)("el-divider"),kA=(0,r.resolveComponent)("j-icon"),rt=(0,r.resolveComponent)("el-button"),Mn=(0,r.resolveComponent)("el-input"),Tt=(0,r.resolveComponent)("el-text"),kt=(0,r.resolveComponent)("el-space"),Kn=(0,r.resolveComponent)("j-form"),tn=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",t0,[w.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"j-bi-design-contentmenu",style:(0,r.normalizeStyle)({left:m.value+"px",top:v.value+"px"})},[(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[0]||(hA[0]=VA=>FA(H.value))},(0,r.toDisplayString)((0,r.unref)(n)("复制")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[1]||(hA[1]=VA=>eA(H.value))},(0,r.toDisplayString)(H.value&&H.value.display?"隐藏":"显示"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[2]||(hA[2]=VA=>W(H.value))},(0,r.toDisplayString)(H.value&&H.value.lock?"解锁":"锁定"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[3]||(hA[3]=VA=>iA("top",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("置顶图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[4]||(hA[4]=VA=>iA("bottom",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("置底图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[5]||(hA[5]=VA=>iA("up",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("上移一层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:hA[6]||(hA[6]=VA=>iA("down",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("下移一层")),1),(0,r.createVNode)(xA,{style:{margin:"4px 0"}}),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",style:{color:"var(--j-color-danger)"},onClick:hA[7]||(hA[7]=VA=>fA(H.value?.id))},(0,r.toDisplayString)((0,r.unref)(n)("删除")),1)],4)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",n0,[(0,r.createElementVNode)("div",{onClick:hA[8]||(hA[8]=(0,r.withModifiers)(VA=>h.value=-1,["stop"])),class:(0,r.normalizeClass)(["component-item",{active:h.value==-1}])},[(0,r.createVNode)(kA,{size:24,icon:"mdi:bookmark-box-multiple-outline"}),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)("图层")),1)],2),(0,r.createElementVNode)("div",r0,[(0,r.createVNode)(xA)]),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(VA,Me)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Me,onClick:(0,r.withModifiers)(ot=>h.value=Me,["stop"]),class:(0,r.normalizeClass)(["component-item",{active:h.value==Me}])},[(0,r.createVNode)(kA,{size:24,icon:VA.icon},null,8,["icon"]),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)(VA.name)),1)],10,o0))),128))]),(0,r.createElementVNode)("div",i0,[h.value==-1?((0,r.openBlock)(),(0,r.createElementBlock)("div",s0,[(0,r.createElementVNode)("div",a0,[(0,r.createVNode)(Mn,{modelValue:U.value,"onUpdate:modelValue":hA[9]||(hA[9]=VA=>U.value=VA),class:"search-input",placeholder:"搜索图层"},{append:(0,r.withCtx)(()=>[(0,r.createVNode)(rt,null,{icon:(0,r.withCtx)(()=>[(0,r.createVNode)(kA,{icon:"ep:search"})]),_:1})]),_:1},8,["modelValue"])]),(0,r.createElementVNode)("div",{class:"j-block",style:{"padding-top":"8px",overflow:"auto"},onContextmenu:(0,r.withModifiers)(M,["prevent"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(K.value,(VA,Me)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Me},[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item",{active:g.value.id==VA.id}]),onClick:(0,r.withModifiers)(ot=>CA(VA),["stop"]),"data-id":VA.id},[(0,r.createElementVNode)("div",c0,[(0,r.createElementVNode)("img",{style:{height:"100%"},src:`${e.imgUrlPrefix}${d.value[VA.type].img}`},null,8,u0)]),(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(VA.config.label)),1)]),_:2},1024),(0,r.createElementVNode)("div",d0,[(0,r.createVNode)(kt,{size:2},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:!VA.display}]),onClick:(0,r.withModifiers)(ot=>eA(VA),["stop"])},[(0,r.createVNode)(kA,{icon:"mdi:eye-off-outline"})],10,f0),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:VA.lock}]),onClick:(0,r.withModifiers)(ot=>W(VA),["stop"])},[(0,r.createVNode)(kA,{icon:"mdi:lock-outline"})],10,g0)]),_:2},1024)])],10,l0)]))),128))],32)])):e.components[h.value]?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(e.components[h.value].children,(VA,Me)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Me,onClick:ot=>L(VA,0,0)},[(0,r.createElementVNode)("div",{class:"component-item2",onDragend:ot=>pA(ot,VA),draggable:"true"},[(0,r.createElementVNode)("div",p0,[(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(VA.name)),1)]),_:2},1024)]),(0,r.createElementVNode)("img",{class:"component-item2-img",src:`${e.imgUrlPrefix}${VA.img}`},null,8,m0)],40,B0)],8,h0))),128)):(0,r.createCommentVNode)("",!0)]),(0,r.createElementVNode)("div",{class:"j-bi-design-mid",ref_key:"contentRef",ref:nA},[((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Zw),{key:dA.value,thick:tA.value,scale:dA.value,width:q.value,height:k.value,"start-x":sA.value,"start-y":I.value,palette:Y.value,shadow:F.value,"hor-line-arr":S.value.h,"ver-line-arr":S.value.v},null,8,["thick","scale","width","height","start-x","start-y","palette","shadow","hor-line-arr","ver-line-arr"])),(0,r.createElementVNode)("div",{ref_key:"screensRef",ref:P,class:"j-bi-design-main",style:(0,r.normalizeStyle)({cursor:z.value?"pointer":""}),onMousedown:(0,r.withModifiers)(uA,["stop"]),onWheel:HA,onScroll:BA},[(0,r.createElementVNode)("div",{class:"screen-container",style:(0,r.normalizeStyle)({height:bA.value+"px",width:AA.value+"px"}),onClick:hA[10]||(hA[10]=(0,r.withModifiers)(VA=>CA(u.value),["stop"]))},[(0,r.createElementVNode)("div",{ref_key:"canvasRef",ref:R,class:"canvas",onContextmenu:(0,r.withModifiers)(M,["prevent"])},[(0,r.createVNode)(El,{layout:B.value,"index-page":u.value,"actived-component":g.value,scale:dA.value,onSelect:CA,onMove:LA},null,8,["layout","index-page","actived-component","scale"])],544)],4)],36)],512),(0,r.createElementVNode)("div",w0,[(0,r.createElementVNode)("div",C0,[(0,r.createVNode)(Tt,{truncated:"",style:{margin:"0","font-size":"14px"}},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(`${(0,r.unref)(n)("属性配置")}${wA.value} `),1)]),_:1})]),(0,r.createElementVNode)("div",v0,[(0,r.createVNode)(Kn,{config:{labelPosition:"top",size:"small"},style:{padding:"0"},ref_key:"configRef",ref:aA,onChange:D},null,512)])]),(0,r.createVNode)(tn,{ref_key:"previewFormLayerRef",ref:pt,destroyOnClose:!0,hasHeader:!1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Ul,{indexPage:ze.value.page,layout:ze.value.components},null,8,["indexPage","layout"])]),_:1},512)])}}}),Q0=y0,Fl=ut(Q0,[El,Ul]),E0=[as,_o,So,xo,Do,nl,rl,ul,dl,ml,yl,Fl],bl=new WeakSet,U0=e=>{bl.has(e)||(bl.add(e),E0.forEach(A=>{const t=A.name;t&&e.component(t,A)}))},F0={install:U0};te.DBiDesign=Fl,te.DDrag=as,te.DDraggable=dl,te.DFlowDesign=nl,te.DFormDesign=ml,te.DIndexDesign=yl,te.DInputFlow=rl,te.DLayout=ul,te.default=F0,te.dragContainer=So,te.dragFormList=xo,te.dragIndexList=Do,te.dragTool=_o,te.toFormDesignSchema=gl,te.toFormSaveSchema=Vr,te.toFormSchema=fl});
35
+ .`+Zi+xQ+iu)},NQ=function(s,i){var c=s.ownerDocument;if(c){var l=c.createElement("style");l.textContent=i,s.appendChild(l)}},su=(function(){function s(){}return s.getOrigin=function(i){var c=s._link;return c?(c.href=i,c.href=c.href,c.protocol+c.hostname+c.port):"about:blank"},s.isSameOrigin=function(i){return s.getOrigin(i)===s._origin},s.setContext=function(i){s._link=i.document.createElement("a"),s._origin=s.getOrigin(i.location.href)},s._origin="about:blank",s})(),LQ=(function(){function s(i,c){this.context=i,this._options=c,this._cache={}}return s.prototype.addImage=function(i){var c=Promise.resolve();return this.has(i)||(qi(i)||KQ(i))&&(this._cache[i]=this.loadImage(i)).catch(function(){}),c},s.prototype.match=function(i){return this._cache[i]},s.prototype.loadImage=function(i){return a(this,void 0,void 0,function(){var c,l,f,p,C=this;return u(this,function(y){switch(y.label){case 0:return c=su.isSameOrigin(i),l=!ji(i)&&this._options.useCORS===!0&&he.SUPPORT_CORS_IMAGES&&!c,f=!ji(i)&&!c&&!qi(i)&&typeof this._options.proxy=="string"&&he.SUPPORT_CORS_XHR&&!l,!c&&this._options.allowTaint===!1&&!ji(i)&&!qi(i)&&!f&&!l?[2]:(p=i,f?[4,this.proxy(p)]:[3,2]);case 1:p=y.sent(),y.label=2;case 2:return this.context.logger.debug("Added image "+i.substring(0,256)),[4,new Promise(function(E,D){var M=new Image;M.onload=function(){return E(M)},M.onerror=D,(OQ(p)||l)&&(M.crossOrigin="anonymous"),M.src=p,M.complete===!0&&setTimeout(function(){return E(M)},500),C._options.imageTimeout>0&&setTimeout(function(){return D("Timed out ("+C._options.imageTimeout+"ms) loading image")},C._options.imageTimeout)})];case 3:return[2,y.sent()]}})})},s.prototype.has=function(i){return typeof this._cache[i]<"u"},s.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},s.prototype.proxy=function(i){var c=this,l=this._options.proxy;if(!l)throw new Error("No proxy defined");var f=i.substring(0,256);return new Promise(function(p,C){var y=he.SUPPORT_RESPONSE_TYPE?"blob":"text",E=new XMLHttpRequest;E.onload=function(){if(E.status===200)if(y==="text")p(E.response);else{var G=new FileReader;G.addEventListener("load",function(){return p(G.result)},!1),G.addEventListener("error",function(Z){return C(Z)},!1),G.readAsDataURL(E.response)}else C("Failed to proxy resource "+f+" with status code "+E.status)},E.onerror=C;var D=l.indexOf("?")>-1?"&":"?";if(E.open("GET",""+l+D+"url="+encodeURIComponent(i)+"&responseType="+y),y!=="text"&&E instanceof XMLHttpRequest&&(E.responseType=y),c._options.imageTimeout){var M=c._options.imageTimeout;E.timeout=M,E.ontimeout=function(){return C("Timed out ("+M+"ms) proxying "+f)}}E.send()})},s})(),TQ=/^data:image\/svg\+xml/i,kQ=/^data:image\/.*;base64,/i,MQ=/^data:image\/.*/i,KQ=function(s){return he.SUPPORT_SVG_DRAWING||!RQ(s)},ji=function(s){return MQ.test(s)},OQ=function(s){return kQ.test(s)},qi=function(s){return s.substr(0,4)==="blob"},RQ=function(s){return s.substr(-3).toLowerCase()==="svg"||TQ.test(s)},yA=(function(){function s(i,c){this.type=0,this.x=i,this.y=c}return s.prototype.add=function(i,c){return new s(this.x+i,this.y+c)},s})(),un=function(s,i,c){return new yA(s.x+(i.x-s.x)*c,s.y+(i.y-s.y)*c)},Co=(function(){function s(i,c,l,f){this.type=1,this.start=i,this.startControl=c,this.endControl=l,this.end=f}return s.prototype.subdivide=function(i,c){var l=un(this.start,this.startControl,i),f=un(this.startControl,this.endControl,i),p=un(this.endControl,this.end,i),C=un(l,f,i),y=un(f,p,i),E=un(C,y,i);return c?new s(this.start,l,C,E):new s(E,y,p,this.end)},s.prototype.add=function(i,c){return new s(this.start.add(i,c),this.startControl.add(i,c),this.endControl.add(i,c),this.end.add(i,c))},s.prototype.reverse=function(){return new s(this.end,this.endControl,this.startControl,this.start)},s})(),Se=function(s){return s.type===1},VQ=(function(){function s(i){var c=i.styles,l=i.bounds,f=Xn(c.borderTopLeftRadius,l.width,l.height),p=f[0],C=f[1],y=Xn(c.borderTopRightRadius,l.width,l.height),E=y[0],D=y[1],M=Xn(c.borderBottomRightRadius,l.width,l.height),G=M[0],Z=M[1],vA=Xn(c.borderBottomLeftRadius,l.width,l.height),dA=vA[0],pA=vA[1],OA=[];OA.push((p+E)/l.width),OA.push((dA+G)/l.width),OA.push((C+pA)/l.height),OA.push((D+Z)/l.height);var SA=Math.max.apply(Math,OA);SA>1&&(p/=SA,C/=SA,E/=SA,D/=SA,G/=SA,Z/=SA,dA/=SA,pA/=SA);var _A=l.width-E,Ae=l.height-Z,zA=l.width-G,TA=l.height-pA,EA=c.borderTopWidth,PA=c.borderRightWidth,GA=c.borderBottomWidth,MA=c.borderLeftWidth,le=jA(c.paddingTop,i.bounds.width),ye=jA(c.paddingRight,i.bounds.width),He=jA(c.paddingBottom,i.bounds.width),ZA=jA(c.paddingLeft,i.bounds.width);this.topLeftBorderDoubleOuterBox=p>0||C>0?ee(l.left+MA/3,l.top+EA/3,p-MA/3,C-EA/3,WA.TOP_LEFT):new yA(l.left+MA/3,l.top+EA/3),this.topRightBorderDoubleOuterBox=p>0||C>0?ee(l.left+_A,l.top+EA/3,E-PA/3,D-EA/3,WA.TOP_RIGHT):new yA(l.left+l.width-PA/3,l.top+EA/3),this.bottomRightBorderDoubleOuterBox=G>0||Z>0?ee(l.left+zA,l.top+Ae,G-PA/3,Z-GA/3,WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA/3,l.top+l.height-GA/3),this.bottomLeftBorderDoubleOuterBox=dA>0||pA>0?ee(l.left+MA/3,l.top+TA,dA-MA/3,pA-GA/3,WA.BOTTOM_LEFT):new yA(l.left+MA/3,l.top+l.height-GA/3),this.topLeftBorderDoubleInnerBox=p>0||C>0?ee(l.left+MA*2/3,l.top+EA*2/3,p-MA*2/3,C-EA*2/3,WA.TOP_LEFT):new yA(l.left+MA*2/3,l.top+EA*2/3),this.topRightBorderDoubleInnerBox=p>0||C>0?ee(l.left+_A,l.top+EA*2/3,E-PA*2/3,D-EA*2/3,WA.TOP_RIGHT):new yA(l.left+l.width-PA*2/3,l.top+EA*2/3),this.bottomRightBorderDoubleInnerBox=G>0||Z>0?ee(l.left+zA,l.top+Ae,G-PA*2/3,Z-GA*2/3,WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA*2/3,l.top+l.height-GA*2/3),this.bottomLeftBorderDoubleInnerBox=dA>0||pA>0?ee(l.left+MA*2/3,l.top+TA,dA-MA*2/3,pA-GA*2/3,WA.BOTTOM_LEFT):new yA(l.left+MA*2/3,l.top+l.height-GA*2/3),this.topLeftBorderStroke=p>0||C>0?ee(l.left+MA/2,l.top+EA/2,p-MA/2,C-EA/2,WA.TOP_LEFT):new yA(l.left+MA/2,l.top+EA/2),this.topRightBorderStroke=p>0||C>0?ee(l.left+_A,l.top+EA/2,E-PA/2,D-EA/2,WA.TOP_RIGHT):new yA(l.left+l.width-PA/2,l.top+EA/2),this.bottomRightBorderStroke=G>0||Z>0?ee(l.left+zA,l.top+Ae,G-PA/2,Z-GA/2,WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA/2,l.top+l.height-GA/2),this.bottomLeftBorderStroke=dA>0||pA>0?ee(l.left+MA/2,l.top+TA,dA-MA/2,pA-GA/2,WA.BOTTOM_LEFT):new yA(l.left+MA/2,l.top+l.height-GA/2),this.topLeftBorderBox=p>0||C>0?ee(l.left,l.top,p,C,WA.TOP_LEFT):new yA(l.left,l.top),this.topRightBorderBox=E>0||D>0?ee(l.left+_A,l.top,E,D,WA.TOP_RIGHT):new yA(l.left+l.width,l.top),this.bottomRightBorderBox=G>0||Z>0?ee(l.left+zA,l.top+Ae,G,Z,WA.BOTTOM_RIGHT):new yA(l.left+l.width,l.top+l.height),this.bottomLeftBorderBox=dA>0||pA>0?ee(l.left,l.top+TA,dA,pA,WA.BOTTOM_LEFT):new yA(l.left,l.top+l.height),this.topLeftPaddingBox=p>0||C>0?ee(l.left+MA,l.top+EA,Math.max(0,p-MA),Math.max(0,C-EA),WA.TOP_LEFT):new yA(l.left+MA,l.top+EA),this.topRightPaddingBox=E>0||D>0?ee(l.left+Math.min(_A,l.width-PA),l.top+EA,_A>l.width+PA?0:Math.max(0,E-PA),Math.max(0,D-EA),WA.TOP_RIGHT):new yA(l.left+l.width-PA,l.top+EA),this.bottomRightPaddingBox=G>0||Z>0?ee(l.left+Math.min(zA,l.width-MA),l.top+Math.min(Ae,l.height-GA),Math.max(0,G-PA),Math.max(0,Z-GA),WA.BOTTOM_RIGHT):new yA(l.left+l.width-PA,l.top+l.height-GA),this.bottomLeftPaddingBox=dA>0||pA>0?ee(l.left+MA,l.top+Math.min(TA,l.height-GA),Math.max(0,dA-MA),Math.max(0,pA-GA),WA.BOTTOM_LEFT):new yA(l.left+MA,l.top+l.height-GA),this.topLeftContentBox=p>0||C>0?ee(l.left+MA+ZA,l.top+EA+le,Math.max(0,p-(MA+ZA)),Math.max(0,C-(EA+le)),WA.TOP_LEFT):new yA(l.left+MA+ZA,l.top+EA+le),this.topRightContentBox=E>0||D>0?ee(l.left+Math.min(_A,l.width+MA+ZA),l.top+EA+le,_A>l.width+MA+ZA?0:E-MA+ZA,D-(EA+le),WA.TOP_RIGHT):new yA(l.left+l.width-(PA+ye),l.top+EA+le),this.bottomRightContentBox=G>0||Z>0?ee(l.left+Math.min(zA,l.width-(MA+ZA)),l.top+Math.min(Ae,l.height+EA+le),Math.max(0,G-(PA+ye)),Z-(GA+He),WA.BOTTOM_RIGHT):new yA(l.left+l.width-(PA+ye),l.top+l.height-(GA+He)),this.bottomLeftContentBox=dA>0||pA>0?ee(l.left+MA+ZA,l.top+TA,Math.max(0,dA-(MA+ZA)),pA-(GA+He),WA.BOTTOM_LEFT):new yA(l.left+MA+ZA,l.top+l.height-(GA+He))}return s})(),WA;(function(s){s[s.TOP_LEFT=0]="TOP_LEFT",s[s.TOP_RIGHT=1]="TOP_RIGHT",s[s.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",s[s.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(WA||(WA={}));var ee=function(s,i,c,l,f){var p=4*((Math.sqrt(2)-1)/3),C=c*p,y=l*p,E=s+c,D=i+l;switch(f){case WA.TOP_LEFT:return new Co(new yA(s,D),new yA(s,D-y),new yA(E-C,i),new yA(E,i));case WA.TOP_RIGHT:return new Co(new yA(s,i),new yA(s+C,i),new yA(E,D-y),new yA(E,D));case WA.BOTTOM_RIGHT:return new Co(new yA(E,i),new yA(E,i+y),new yA(s+C,D),new yA(s,D));case WA.BOTTOM_LEFT:default:return new Co(new yA(E,D),new yA(E-C,D),new yA(s,i+y),new yA(s,i))}},vo=function(s){return[s.topLeftBorderBox,s.topRightBorderBox,s.bottomRightBorderBox,s.bottomLeftBorderBox]},PQ=function(s){return[s.topLeftContentBox,s.topRightContentBox,s.bottomRightContentBox,s.bottomLeftContentBox]},yo=function(s){return[s.topLeftPaddingBox,s.topRightPaddingBox,s.bottomRightPaddingBox,s.bottomLeftPaddingBox]},GQ=(function(){function s(i,c,l){this.offsetX=i,this.offsetY=c,this.matrix=l,this.type=0,this.target=6}return s})(),Qo=(function(){function s(i,c){this.path=i,this.target=c,this.type=1}return s})(),zQ=(function(){function s(i){this.opacity=i,this.type=2,this.target=6}return s})(),XQ=function(s){return s.type===0},au=function(s){return s.type===1},$Q=function(s){return s.type===2},lu=function(s,i){return s.length===i.length?s.some(function(c,l){return c===i[l]}):!1},WQ=function(s,i,c,l,f){return s.map(function(p,C){switch(C){case 0:return p.add(i,c);case 1:return p.add(i+l,c);case 2:return p.add(i+l,c+f);case 3:return p.add(i,c+f)}return p})},cu=(function(){function s(i){this.element=i,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return s})(),uu=(function(){function s(i,c){if(this.container=i,this.parent=c,this.effects=[],this.curves=new VQ(this.container),this.container.styles.opacity<1&&this.effects.push(new zQ(this.container.styles.opacity)),this.container.styles.transform!==null){var l=this.container.bounds.left+this.container.styles.transformOrigin[0].number,f=this.container.bounds.top+this.container.styles.transformOrigin[1].number,p=this.container.styles.transform;this.effects.push(new GQ(l,f,p))}if(this.container.styles.overflowX!==0){var C=vo(this.curves),y=yo(this.curves);lu(C,y)?this.effects.push(new Qo(C,6)):(this.effects.push(new Qo(C,2)),this.effects.push(new Qo(y,4)))}}return s.prototype.getEffects=function(i){for(var c=[2,3].indexOf(this.container.styles.position)===-1,l=this.parent,f=this.effects.slice(0);l;){var p=l.effects.filter(function(E){return!au(E)});if(c||l.container.styles.position!==0||!l.parent){if(f.unshift.apply(f,p),c=[2,3].indexOf(l.container.styles.position)===-1,l.container.styles.overflowX!==0){var C=vo(l.curves),y=yo(l.curves);lu(C,y)||f.unshift(new Qo(y,6))}}else f.unshift.apply(f,p);l=l.parent}return f.filter(function(E){return de(E.target,i)})},s})(),As=function(s,i,c,l){s.container.elements.forEach(function(f){var p=de(f.flags,4),C=de(f.flags,2),y=new uu(f,s);de(f.styles.display,2048)&&l.push(y);var E=de(f.flags,8)?[]:l;if(p||C){var D=p||f.styles.isPositioned()?c:i,M=new cu(y);if(f.styles.isPositioned()||f.styles.opacity<1||f.styles.isTransformed()){var G=f.styles.zIndex.order;if(G<0){var Z=0;D.negativeZIndex.some(function(dA,pA){return G>dA.element.container.styles.zIndex.order?(Z=pA,!1):Z>0}),D.negativeZIndex.splice(Z,0,M)}else if(G>0){var vA=0;D.positiveZIndex.some(function(dA,pA){return G>=dA.element.container.styles.zIndex.order?(vA=pA+1,!1):vA>0}),D.positiveZIndex.splice(vA,0,M)}else D.zeroOrAutoZIndexOrTransformedOrOpacity.push(M)}else f.styles.isFloating()?D.nonPositionedFloats.push(M):D.nonPositionedInlineLevel.push(M);As(y,M,p?M:c,E)}else f.styles.isInlineLevel()?i.inlineLevel.push(y):i.nonInlineLevel.push(y),As(y,i,c,E);de(f.flags,8)&&du(f,E)})},du=function(s,i){for(var c=s instanceof Pi?s.start:1,l=s instanceof Pi?s.reversed:!1,f=0;f<i.length;f++){var p=i[f];p.container instanceof kc&&typeof p.container.value=="number"&&p.container.value!==0&&(c=p.container.value),p.listValue=jn(c,p.container.styles.listStyleType,!0),c+=l?-1:1}},YQ=function(s){var i=new uu(s,null),c=new cu(i),l=[];return As(i,c,c,l),du(i.container,l),c},fu=function(s,i){switch(i){case 0:return xe(s.topLeftBorderBox,s.topLeftPaddingBox,s.topRightBorderBox,s.topRightPaddingBox);case 1:return xe(s.topRightBorderBox,s.topRightPaddingBox,s.bottomRightBorderBox,s.bottomRightPaddingBox);case 2:return xe(s.bottomRightBorderBox,s.bottomRightPaddingBox,s.bottomLeftBorderBox,s.bottomLeftPaddingBox);default:return xe(s.bottomLeftBorderBox,s.bottomLeftPaddingBox,s.topLeftBorderBox,s.topLeftPaddingBox)}},JQ=function(s,i){switch(i){case 0:return xe(s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox,s.topRightBorderBox,s.topRightBorderDoubleOuterBox);case 1:return xe(s.topRightBorderBox,s.topRightBorderDoubleOuterBox,s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox);case 2:return xe(s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox,s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox);default:return xe(s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox,s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox)}},ZQ=function(s,i){switch(i){case 0:return xe(s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox,s.topRightBorderDoubleInnerBox,s.topRightPaddingBox);case 1:return xe(s.topRightBorderDoubleInnerBox,s.topRightPaddingBox,s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox);case 2:return xe(s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox,s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox);default:return xe(s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox,s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox)}},jQ=function(s,i){switch(i){case 0:return Eo(s.topLeftBorderStroke,s.topRightBorderStroke);case 1:return Eo(s.topRightBorderStroke,s.bottomRightBorderStroke);case 2:return Eo(s.bottomRightBorderStroke,s.bottomLeftBorderStroke);default:return Eo(s.bottomLeftBorderStroke,s.topLeftBorderStroke)}},Eo=function(s,i){var c=[];return Se(s)?c.push(s.subdivide(.5,!1)):c.push(s),Se(i)?c.push(i.subdivide(.5,!0)):c.push(i),c},xe=function(s,i,c,l){var f=[];return Se(s)?f.push(s.subdivide(.5,!1)):f.push(s),Se(c)?f.push(c.subdivide(.5,!0)):f.push(c),Se(l)?f.push(l.subdivide(.5,!0).reverse()):f.push(l),Se(i)?f.push(i.subdivide(.5,!1).reverse()):f.push(i),f},gu=function(s){var i=s.bounds,c=s.styles;return i.add(c.borderLeftWidth,c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth),-(c.borderTopWidth+c.borderBottomWidth))},Uo=function(s){var i=s.styles,c=s.bounds,l=jA(i.paddingLeft,c.width),f=jA(i.paddingRight,c.width),p=jA(i.paddingTop,c.width),C=jA(i.paddingBottom,c.width);return c.add(l+i.borderLeftWidth,p+i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth+l+f),-(i.borderTopWidth+i.borderBottomWidth+p+C))},qQ=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},AE=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},es=function(s,i,c){var l=qQ(fn(s.styles.backgroundOrigin,i),s),f=AE(fn(s.styles.backgroundClip,i),s),p=eE(fn(s.styles.backgroundSize,i),c,l),C=p[0],y=p[1],E=Xn(fn(s.styles.backgroundPosition,i),l.width-C,l.height-y);return[tE(fn(s.styles.backgroundRepeat,i),E,p,l,f),Math.round(l.left+E[0]),Math.round(l.top+E[1]),C,y]},dn=function(s){return JA(s)&&s.value===sn.AUTO},Fo=function(s){return typeof s=="number"},eE=function(s,i,c){var l=i[0],f=i[1],p=i[2],C=s[0],y=s[1];if(!C)return[0,0];if(ae(C)&&y&&ae(y))return[jA(C,c.width),jA(y,c.height)];var E=Fo(p);if(JA(C)&&(C.value===sn.CONTAIN||C.value===sn.COVER))return Fo(p)?c.width/c.height<p!=(C.value===sn.COVER)?[c.width,c.width/p]:[c.height*p,c.height]:[c.width,c.height];var D=Fo(l),M=Fo(f),G=D||M;if(dn(C)&&(!y||dn(y)))return D&&M?[l,f]:!E&&!G?[c.width,c.height]:G&&E?[D?l:f*p,M?f:l/p]:[D?l:c.width,M?f:c.height];if(E){var Z=0,vA=0;return ae(C)?Z=jA(C,c.width):ae(y)&&(vA=jA(y,c.height)),dn(C)?Z=vA*p:(!y||dn(y))&&(vA=Z/p),[Z,vA]}var dA=null,pA=null;if(ae(C)?dA=jA(C,c.width):y&&ae(y)&&(pA=jA(y,c.height)),dA!==null&&(!y||dn(y))&&(pA=D&&M?dA/l*f:c.height),pA!==null&&dn(C)&&(dA=D&&M?pA/f*l:c.width),dA!==null&&pA!==null)return[dA,pA];throw new Error("Unable to calculate background-size for element")},fn=function(s,i){var c=s[i];return typeof c>"u"?s[0]:c},tE=function(s,i,c,l,f){var p=i[0],C=i[1],y=c[0],E=c[1];switch(s){case 2:return[new yA(Math.round(l.left),Math.round(l.top+C)),new yA(Math.round(l.left+l.width),Math.round(l.top+C)),new yA(Math.round(l.left+l.width),Math.round(E+l.top+C)),new yA(Math.round(l.left),Math.round(E+l.top+C))];case 3:return[new yA(Math.round(l.left+p),Math.round(l.top)),new yA(Math.round(l.left+p+y),Math.round(l.top)),new yA(Math.round(l.left+p+y),Math.round(l.height+l.top)),new yA(Math.round(l.left+p),Math.round(l.height+l.top))];case 1:return[new yA(Math.round(l.left+p),Math.round(l.top+C)),new yA(Math.round(l.left+p+y),Math.round(l.top+C)),new yA(Math.round(l.left+p+y),Math.round(l.top+C+E)),new yA(Math.round(l.left+p),Math.round(l.top+C+E))];default:return[new yA(Math.round(f.left),Math.round(f.top)),new yA(Math.round(f.left+f.width),Math.round(f.top)),new yA(Math.round(f.left+f.width),Math.round(f.height+f.top)),new yA(Math.round(f.left),Math.round(f.height+f.top))]}},nE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",hu="Hidden Text",rE=(function(){function s(i){this._data={},this._document=i}return s.prototype.parseMetrics=function(i,c){var l=this._document.createElement("div"),f=this._document.createElement("img"),p=this._document.createElement("span"),C=this._document.body;l.style.visibility="hidden",l.style.fontFamily=i,l.style.fontSize=c,l.style.margin="0",l.style.padding="0",l.style.whiteSpace="nowrap",C.appendChild(l),f.src=nE,f.width=1,f.height=1,f.style.margin="0",f.style.padding="0",f.style.verticalAlign="baseline",p.style.fontFamily=i,p.style.fontSize=c,p.style.margin="0",p.style.padding="0",p.appendChild(this._document.createTextNode(hu)),l.appendChild(p),l.appendChild(f);var y=f.offsetTop-p.offsetTop+2;l.removeChild(p),l.appendChild(this._document.createTextNode(hu)),l.style.lineHeight="normal",f.style.verticalAlign="super";var E=f.offsetTop-l.offsetTop+2;return C.removeChild(l),{baseline:y,middle:E}},s.prototype.getMetrics=function(i,c){var l=i+" "+c;return typeof this._data[l]>"u"&&(this._data[l]=this.parseMetrics(i,c)),this._data[l]},s})(),Bu=(function(){function s(i,c){this.context=i,this.options=c}return s})(),oE=1e4,iE=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f._activeEffects=[],f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),l.canvas||(f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px"),f.fontMetrics=new rE(document),f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.ctx.textBaseline="bottom",f._activeEffects=[],f.context.logger.debug("Canvas renderer initialized ("+l.width+"x"+l.height+") with scale "+l.scale),f}return i.prototype.applyEffects=function(c){for(var l=this;this._activeEffects.length;)this.popEffect();c.forEach(function(f){return l.applyEffect(f)})},i.prototype.applyEffect=function(c){this.ctx.save(),$Q(c)&&(this.ctx.globalAlpha=c.opacity),XQ(c)&&(this.ctx.translate(c.offsetX,c.offsetY),this.ctx.transform(c.matrix[0],c.matrix[1],c.matrix[2],c.matrix[3],c.matrix[4],c.matrix[5]),this.ctx.translate(-c.offsetX,-c.offsetY)),au(c)&&(this.path(c.path),this.ctx.clip()),this._activeEffects.push(c)},i.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},i.prototype.renderStack=function(c){return a(this,void 0,void 0,function(){var l;return u(this,function(f){switch(f.label){case 0:return l=c.element.container.styles,l.isVisible()?[4,this.renderStackContent(c)]:[3,2];case 1:f.sent(),f.label=2;case 2:return[2]}})})},i.prototype.renderNode=function(c){return a(this,void 0,void 0,function(){return u(this,function(l){switch(l.label){case 0:if(de(c.container.flags,16))debugger;return c.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(c)]:[3,3];case 1:return l.sent(),[4,this.renderNodeContent(c)];case 2:l.sent(),l.label=3;case 3:return[2]}})})},i.prototype.renderTextWithLetterSpacing=function(c,l,f){var p=this;l===0?this.ctx.fillText(c.text,c.bounds.left,c.bounds.top+f):Vi(c.text).reduce(function(C,y){return p.ctx.fillText(y,C,c.bounds.top+f),C+p.ctx.measureText(y).width},c.bounds.left)},i.prototype.createFontStyle=function(c){var l=c.fontVariant.filter(function(C){return C==="normal"||C==="small-caps"}).join(""),f=uE(c.fontFamily).join(", "),p=zn(c.fontSize)?""+c.fontSize.number+c.fontSize.unit:c.fontSize.number+"px";return[[c.fontStyle,l,c.fontWeight,p,f].join(" "),f,p]},i.prototype.renderTextNode=function(c,l){return a(this,void 0,void 0,function(){var f,p,C,y,E,D,M,G,Z=this;return u(this,function(vA){return f=this.createFontStyle(l),p=f[0],C=f[1],y=f[2],this.ctx.font=p,this.ctx.direction=l.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",E=this.fontMetrics.getMetrics(C,y),D=E.baseline,M=E.middle,G=l.paintOrder,c.textBounds.forEach(function(dA){G.forEach(function(pA){switch(pA){case 0:Z.ctx.fillStyle=fe(l.color),Z.renderTextWithLetterSpacing(dA,l.letterSpacing,D);var OA=l.textShadow;OA.length&&dA.text.trim().length&&(OA.slice(0).reverse().forEach(function(SA){Z.ctx.shadowColor=fe(SA.color),Z.ctx.shadowOffsetX=SA.offsetX.number*Z.options.scale,Z.ctx.shadowOffsetY=SA.offsetY.number*Z.options.scale,Z.ctx.shadowBlur=SA.blur.number,Z.renderTextWithLetterSpacing(dA,l.letterSpacing,D)}),Z.ctx.shadowColor="",Z.ctx.shadowOffsetX=0,Z.ctx.shadowOffsetY=0,Z.ctx.shadowBlur=0),l.textDecorationLine.length&&(Z.ctx.fillStyle=fe(l.textDecorationColor||l.color),l.textDecorationLine.forEach(function(SA){switch(SA){case 1:Z.ctx.fillRect(dA.bounds.left,Math.round(dA.bounds.top+D),dA.bounds.width,1);break;case 2:Z.ctx.fillRect(dA.bounds.left,Math.round(dA.bounds.top),dA.bounds.width,1);break;case 3:Z.ctx.fillRect(dA.bounds.left,Math.ceil(dA.bounds.top+M),dA.bounds.width,1);break}}));break;case 1:l.webkitTextStrokeWidth&&dA.text.trim().length&&(Z.ctx.strokeStyle=fe(l.webkitTextStrokeColor),Z.ctx.lineWidth=l.webkitTextStrokeWidth,Z.ctx.lineJoin=window.chrome?"miter":"round",Z.ctx.strokeText(dA.text,dA.bounds.left,dA.bounds.top+D)),Z.ctx.strokeStyle="",Z.ctx.lineWidth=0,Z.ctx.lineJoin="miter";break}})}),[2]})})},i.prototype.renderReplacedElement=function(c,l,f){if(f&&c.intrinsicWidth>0&&c.intrinsicHeight>0){var p=Uo(c),C=yo(l);this.path(C),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(f,0,0,c.intrinsicWidth,c.intrinsicHeight,p.left,p.top,p.width,p.height),this.ctx.restore()}},i.prototype.renderNodeContent=function(c){return a(this,void 0,void 0,function(){var l,f,p,C,y,E,_A,_A,D,M,G,Z,zA,vA,dA,TA,pA,OA,SA,_A,Ae,zA,TA;return u(this,function(EA){switch(EA.label){case 0:this.applyEffects(c.getEffects(4)),l=c.container,f=c.curves,p=l.styles,C=0,y=l.textNodes,EA.label=1;case 1:return C<y.length?(E=y[C],[4,this.renderTextNode(E,p)]):[3,4];case 2:EA.sent(),EA.label=3;case 3:return C++,[3,1];case 4:if(!(l instanceof Nc))return[3,8];EA.label=5;case 5:return EA.trys.push([5,7,,8]),[4,this.context.cache.match(l.src)];case 6:return _A=EA.sent(),this.renderReplacedElement(l,f,_A),[3,8];case 7:return EA.sent(),this.context.logger.error("Error loading image "+l.src),[3,8];case 8:if(l instanceof Lc&&this.renderReplacedElement(l,f,l.canvas),!(l instanceof Tc))return[3,12];EA.label=9;case 9:return EA.trys.push([9,11,,12]),[4,this.context.cache.match(l.svg)];case 10:return _A=EA.sent(),this.renderReplacedElement(l,f,_A),[3,12];case 11:return EA.sent(),this.context.logger.error("Error loading svg "+l.svg.substring(0,255)),[3,12];case 12:return l instanceof Rc&&l.tree?(D=new i(this.context,{scale:this.options.scale,backgroundColor:l.backgroundColor,x:0,y:0,width:l.width,height:l.height}),[4,D.render(l.tree)]):[3,14];case 13:M=EA.sent(),l.width&&l.height&&this.ctx.drawImage(M,0,0,l.width,l.height,l.bounds.left,l.bounds.top,l.bounds.width,l.bounds.height),EA.label=14;case 14:if(l instanceof Gi&&(G=Math.min(l.bounds.width,l.bounds.height),l.type===go?l.checked&&(this.ctx.save(),this.path([new yA(l.bounds.left+G*.39363,l.bounds.top+G*.79),new yA(l.bounds.left+G*.16,l.bounds.top+G*.5549),new yA(l.bounds.left+G*.27347,l.bounds.top+G*.44071),new yA(l.bounds.left+G*.39694,l.bounds.top+G*.5649),new yA(l.bounds.left+G*.72983,l.bounds.top+G*.23),new yA(l.bounds.left+G*.84,l.bounds.top+G*.34085),new yA(l.bounds.left+G*.39363,l.bounds.top+G*.79)]),this.ctx.fillStyle=fe(Mc),this.ctx.fill(),this.ctx.restore()):l.type===ho&&l.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(l.bounds.left+G/2,l.bounds.top+G/2,G/4,0,Math.PI*2,!0),this.ctx.fillStyle=fe(Mc),this.ctx.fill(),this.ctx.restore())),sE(l)&&l.value.length){switch(Z=this.createFontStyle(p),zA=Z[0],vA=Z[1],dA=this.fontMetrics.getMetrics(zA,vA).baseline,this.ctx.font=zA,this.ctx.fillStyle=fe(p.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=lE(l.styles.textAlign),TA=Uo(l),pA=0,l.styles.textAlign){case 1:pA+=TA.width/2;break;case 2:pA+=TA.width;break}OA=TA.add(pA,0,0,-TA.height/2+1),this.ctx.save(),this.path([new yA(TA.left,TA.top),new yA(TA.left+TA.width,TA.top),new yA(TA.left+TA.width,TA.top+TA.height),new yA(TA.left,TA.top+TA.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Jn(l.value,OA),p.letterSpacing,dA),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!de(l.styles.display,2048))return[3,20];if(l.styles.listStyleImage===null)return[3,19];if(SA=l.styles.listStyleImage,SA.type!==0)return[3,18];_A=void 0,Ae=SA.url,EA.label=15;case 15:return EA.trys.push([15,17,,18]),[4,this.context.cache.match(Ae)];case 16:return _A=EA.sent(),this.ctx.drawImage(_A,l.bounds.left-(_A.width+10),l.bounds.top),[3,18];case 17:return EA.sent(),this.context.logger.error("Error loading list-style-image "+Ae),[3,18];case 18:return[3,20];case 19:c.listValue&&l.styles.listStyleType!==-1&&(zA=this.createFontStyle(p)[0],this.ctx.font=zA,this.ctx.fillStyle=fe(p.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",TA=new h(l.bounds.left,l.bounds.top+jA(l.styles.paddingTop,l.bounds.width),l.bounds.width,hc(p.lineHeight,p.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Jn(c.listValue,TA),p.letterSpacing,hc(p.lineHeight,p.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),EA.label=20;case 20:return[2]}})})},i.prototype.renderStackContent=function(c){return a(this,void 0,void 0,function(){var l,f,SA,p,C,SA,y,E,SA,D,M,SA,G,Z,SA,vA,dA,SA,pA,OA,SA;return u(this,function(_A){switch(_A.label){case 0:if(de(c.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(c.element)];case 1:_A.sent(),l=0,f=c.negativeZIndex,_A.label=2;case 2:return l<f.length?(SA=f[l],[4,this.renderStack(SA)]):[3,5];case 3:_A.sent(),_A.label=4;case 4:return l++,[3,2];case 5:return[4,this.renderNodeContent(c.element)];case 6:_A.sent(),p=0,C=c.nonInlineLevel,_A.label=7;case 7:return p<C.length?(SA=C[p],[4,this.renderNode(SA)]):[3,10];case 8:_A.sent(),_A.label=9;case 9:return p++,[3,7];case 10:y=0,E=c.nonPositionedFloats,_A.label=11;case 11:return y<E.length?(SA=E[y],[4,this.renderStack(SA)]):[3,14];case 12:_A.sent(),_A.label=13;case 13:return y++,[3,11];case 14:D=0,M=c.nonPositionedInlineLevel,_A.label=15;case 15:return D<M.length?(SA=M[D],[4,this.renderStack(SA)]):[3,18];case 16:_A.sent(),_A.label=17;case 17:return D++,[3,15];case 18:G=0,Z=c.inlineLevel,_A.label=19;case 19:return G<Z.length?(SA=Z[G],[4,this.renderNode(SA)]):[3,22];case 20:_A.sent(),_A.label=21;case 21:return G++,[3,19];case 22:vA=0,dA=c.zeroOrAutoZIndexOrTransformedOrOpacity,_A.label=23;case 23:return vA<dA.length?(SA=dA[vA],[4,this.renderStack(SA)]):[3,26];case 24:_A.sent(),_A.label=25;case 25:return vA++,[3,23];case 26:pA=0,OA=c.positiveZIndex,_A.label=27;case 27:return pA<OA.length?(SA=OA[pA],[4,this.renderStack(SA)]):[3,30];case 28:_A.sent(),_A.label=29;case 29:return pA++,[3,27];case 30:return[2]}})})},i.prototype.mask=function(c){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(c.slice(0).reverse()),this.ctx.closePath()},i.prototype.path=function(c){this.ctx.beginPath(),this.formatPath(c),this.ctx.closePath()},i.prototype.formatPath=function(c){var l=this;c.forEach(function(f,p){var C=Se(f)?f.start:f;p===0?l.ctx.moveTo(C.x,C.y):l.ctx.lineTo(C.x,C.y),Se(f)&&l.ctx.bezierCurveTo(f.startControl.x,f.startControl.y,f.endControl.x,f.endControl.y,f.end.x,f.end.y)})},i.prototype.renderRepeat=function(c,l,f,p){this.path(c),this.ctx.fillStyle=l,this.ctx.translate(f,p),this.ctx.fill(),this.ctx.translate(-f,-p)},i.prototype.resizeImage=function(c,l,f){var p;if(c.width===l&&c.height===f)return c;var C=((p=this.canvas.ownerDocument)!==null&&p!==void 0?p:document).createElement("canvas");return C.width=Math.max(1,l),C.height=Math.max(1,f),C.getContext("2d").drawImage(c,0,0,c.width,c.height,0,0,l,f),C},i.prototype.renderBackgroundImage=function(c){return a(this,void 0,void 0,function(){var l,f,p,C,y,E;return u(this,function(D){switch(D.label){case 0:l=c.styles.backgroundImage.length-1,f=function(M){var G,Z,vA,le,Qe,Ee,ZA,Be,GA,dA,le,Qe,Ee,ZA,Be,pA,OA,SA,_A,Ae,zA,TA,EA,PA,GA,MA,le,ye,He,ZA,Be,Ft,Qe,Ee,Rt,Ye,bt,Vt,Pt,lt,Gt,ct;return u(this,function(gn){switch(gn.label){case 0:if(M.type!==0)return[3,5];G=void 0,Z=M.url,gn.label=1;case 1:return gn.trys.push([1,3,,4]),[4,p.context.cache.match(Z)];case 2:return G=gn.sent(),[3,4];case 3:return gn.sent(),p.context.logger.error("Error loading background-image "+Z),[3,4];case 4:return G&&(vA=es(c,l,[G.width,G.height,G.width/G.height]),le=vA[0],Qe=vA[1],Ee=vA[2],ZA=vA[3],Be=vA[4],GA=p.ctx.createPattern(p.resizeImage(G,ZA,Be),"repeat"),p.renderRepeat(le,GA,Qe,Ee)),[3,6];case 5:jC(M)?(dA=es(c,l,[null,null,null]),le=dA[0],Qe=dA[1],Ee=dA[2],ZA=dA[3],Be=dA[4],pA=$C(M.angle,ZA,Be),OA=pA[0],SA=pA[1],_A=pA[2],Ae=pA[3],zA=pA[4],TA=document.createElement("canvas"),TA.width=ZA,TA.height=Be,EA=TA.getContext("2d"),PA=EA.createLinearGradient(SA,Ae,_A,zA),rc(M.stops,OA).forEach(function(Ar){return PA.addColorStop(Ar.stop,fe(Ar.color))}),EA.fillStyle=PA,EA.fillRect(0,0,ZA,Be),ZA>0&&Be>0&&(GA=p.ctx.createPattern(TA,"repeat"),p.renderRepeat(le,GA,Qe,Ee))):qC(M)&&(MA=es(c,l,[null,null,null]),le=MA[0],ye=MA[1],He=MA[2],ZA=MA[3],Be=MA[4],Ft=M.position.length===0?[bi]:M.position,Qe=jA(Ft[0],ZA),Ee=jA(Ft[Ft.length-1],Be),Rt=WC(M,Qe,Ee,ZA,Be),Ye=Rt[0],bt=Rt[1],Ye>0&&bt>0&&(Vt=p.ctx.createRadialGradient(ye+Qe,He+Ee,0,ye+Qe,He+Ee,Ye),rc(M.stops,Ye*2).forEach(function(Ar){return Vt.addColorStop(Ar.stop,fe(Ar.color))}),p.path(le),p.ctx.fillStyle=Vt,Ye!==bt?(Pt=c.bounds.left+.5*c.bounds.width,lt=c.bounds.top+.5*c.bounds.height,Gt=bt/Ye,ct=1/Gt,p.ctx.save(),p.ctx.translate(Pt,lt),p.ctx.transform(1,0,0,Gt,0,0),p.ctx.translate(-Pt,-lt),p.ctx.fillRect(ye,ct*(He-lt)+lt,ZA,Be*ct),p.ctx.restore()):p.ctx.fill())),gn.label=6;case 6:return l--,[2]}})},p=this,C=0,y=c.styles.backgroundImage.slice(0).reverse(),D.label=1;case 1:return C<y.length?(E=y[C],[5,f(E)]):[3,4];case 2:D.sent(),D.label=3;case 3:return C++,[3,1];case 4:return[2]}})})},i.prototype.renderSolidBorder=function(c,l,f){return a(this,void 0,void 0,function(){return u(this,function(p){return this.path(fu(f,l)),this.ctx.fillStyle=fe(c),this.ctx.fill(),[2]})})},i.prototype.renderDoubleBorder=function(c,l,f,p){return a(this,void 0,void 0,function(){var C,y;return u(this,function(E){switch(E.label){case 0:return l<3?[4,this.renderSolidBorder(c,f,p)]:[3,2];case 1:return E.sent(),[2];case 2:return C=JQ(p,f),this.path(C),this.ctx.fillStyle=fe(c),this.ctx.fill(),y=ZQ(p,f),this.path(y),this.ctx.fill(),[2]}})})},i.prototype.renderNodeBackgroundAndBorders=function(c){return a(this,void 0,void 0,function(){var l,f,p,C,y,E,D,M,G=this;return u(this,function(Z){switch(Z.label){case 0:return this.applyEffects(c.getEffects(2)),l=c.container.styles,f=!yt(l.backgroundColor)||l.backgroundImage.length,p=[{style:l.borderTopStyle,color:l.borderTopColor,width:l.borderTopWidth},{style:l.borderRightStyle,color:l.borderRightColor,width:l.borderRightWidth},{style:l.borderBottomStyle,color:l.borderBottomColor,width:l.borderBottomWidth},{style:l.borderLeftStyle,color:l.borderLeftColor,width:l.borderLeftWidth}],C=aE(fn(l.backgroundClip,0),c.curves),f||l.boxShadow.length?(this.ctx.save(),this.path(C),this.ctx.clip(),yt(l.backgroundColor)||(this.ctx.fillStyle=fe(l.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(c.container)]):[3,2];case 1:Z.sent(),this.ctx.restore(),l.boxShadow.slice(0).reverse().forEach(function(vA){G.ctx.save();var dA=vo(c.curves),pA=vA.inset?0:oE,OA=WQ(dA,-pA+(vA.inset?1:-1)*vA.spread.number,(vA.inset?1:-1)*vA.spread.number,vA.spread.number*(vA.inset?-2:2),vA.spread.number*(vA.inset?-2:2));vA.inset?(G.path(dA),G.ctx.clip(),G.mask(OA)):(G.mask(dA),G.ctx.clip(),G.path(OA)),G.ctx.shadowOffsetX=vA.offsetX.number+pA,G.ctx.shadowOffsetY=vA.offsetY.number,G.ctx.shadowColor=fe(vA.color),G.ctx.shadowBlur=vA.blur.number,G.ctx.fillStyle=vA.inset?fe(vA.color):"rgba(0,0,0,1)",G.ctx.fill(),G.ctx.restore()}),Z.label=2;case 2:y=0,E=0,D=p,Z.label=3;case 3:return E<D.length?(M=D[E],M.style!==0&&!yt(M.color)&&M.width>0?M.style!==2?[3,5]:[4,this.renderDashedDottedBorder(M.color,M.width,y,c.curves,2)]:[3,11]):[3,13];case 4:return Z.sent(),[3,11];case 5:return M.style!==3?[3,7]:[4,this.renderDashedDottedBorder(M.color,M.width,y,c.curves,3)];case 6:return Z.sent(),[3,11];case 7:return M.style!==4?[3,9]:[4,this.renderDoubleBorder(M.color,M.width,y,c.curves)];case 8:return Z.sent(),[3,11];case 9:return[4,this.renderSolidBorder(M.color,y,c.curves)];case 10:Z.sent(),Z.label=11;case 11:y++,Z.label=12;case 12:return E++,[3,3];case 13:return[2]}})})},i.prototype.renderDashedDottedBorder=function(c,l,f,p,C){return a(this,void 0,void 0,function(){var y,E,D,M,G,Z,vA,dA,pA,OA,SA,_A,Ae,zA,TA,EA,TA,EA;return u(this,function(PA){return this.ctx.save(),y=jQ(p,f),E=fu(p,f),C===2&&(this.path(E),this.ctx.clip()),Se(E[0])?(D=E[0].start.x,M=E[0].start.y):(D=E[0].x,M=E[0].y),Se(E[1])?(G=E[1].end.x,Z=E[1].end.y):(G=E[1].x,Z=E[1].y),f===0||f===2?vA=Math.abs(D-G):vA=Math.abs(M-Z),this.ctx.beginPath(),C===3?this.formatPath(y):this.formatPath(E.slice(0,2)),dA=l<3?l*3:l*2,pA=l<3?l*2:l,C===3&&(dA=l,pA=l),OA=!0,vA<=dA*2?OA=!1:vA<=dA*2+pA?(SA=vA/(2*dA+pA),dA*=SA,pA*=SA):(_A=Math.floor((vA+pA)/(dA+pA)),Ae=(vA-_A*dA)/(_A-1),zA=(vA-(_A+1)*dA)/_A,pA=zA<=0||Math.abs(pA-Ae)<Math.abs(pA-zA)?Ae:zA),OA&&(C===3?this.ctx.setLineDash([0,dA+pA]):this.ctx.setLineDash([dA,pA])),C===3?(this.ctx.lineCap="round",this.ctx.lineWidth=l):this.ctx.lineWidth=l*2+1.1,this.ctx.strokeStyle=fe(c),this.ctx.stroke(),this.ctx.setLineDash([]),C===2&&(Se(E[0])&&(TA=E[3],EA=E[0],this.ctx.beginPath(),this.formatPath([new yA(TA.end.x,TA.end.y),new yA(EA.start.x,EA.start.y)]),this.ctx.stroke()),Se(E[1])&&(TA=E[1],EA=E[2],this.ctx.beginPath(),this.formatPath([new yA(TA.end.x,TA.end.y),new yA(EA.start.x,EA.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},i.prototype.render=function(c){return a(this,void 0,void 0,function(){var l;return u(this,function(f){switch(f.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=fe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),l=YQ(c),[4,this.renderStack(l)];case 1:return f.sent(),this.applyEffects([]),[2,this.canvas]}})})},i})(Bu),sE=function(s){return s instanceof Oc||s instanceof Kc?!0:s instanceof Gi&&s.type!==ho&&s.type!==go},aE=function(s,i){switch(s){case 0:return vo(i);case 2:return PQ(i);default:return yo(i)}},lE=function(s){switch(s){case 1:return"center";case 2:return"right";default:return"left"}},cE=["-apple-system","system-ui"],uE=function(s){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?s.filter(function(i){return cE.indexOf(i)===-1}):s},dE=(function(s){n(i,s);function i(c,l){var f=s.call(this,c,l)||this;return f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),f.options=l,f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px",f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+l.width+"x"+l.height+" at "+l.x+","+l.y+") with scale "+l.scale),f}return i.prototype.render=function(c){return a(this,void 0,void 0,function(){var l,f;return u(this,function(p){switch(p.label){case 0:return l=Ri(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,c),[4,fE(l)];case 1:return f=p.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=fe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(f,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},i})(Bu),fE=function(s){return new Promise(function(i,c){var l=new Image;l.onload=function(){i(l)},l.onerror=c,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},gE=(function(){function s(i){var c=i.id,l=i.enabled;this.id=c,this.enabled=l,this.start=Date.now()}return s.prototype.debug=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.getTime=function(){return Date.now()-this.start},s.prototype.info=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,d([this.id,this.getTime()+"ms"],i))},s.prototype.warn=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.error=function(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.instances={},s})(),hE=(function(){function s(i,c){var l;this.windowBounds=c,this.instanceName="#"+s.instanceCount++,this.logger=new gE({id:this.instanceName,enabled:i.logging}),this.cache=(l=i.cache)!==null&&l!==void 0?l:new LQ(this,i)}return s.instanceCount=1,s})(),BE=function(s,i){return i===void 0&&(i={}),pE(s,i)};typeof window<"u"&&su.setContext(window);var pE=function(s,i){return a(void 0,void 0,void 0,function(){var c,l,f,p,C,y,E,D,M,G,Z,vA,dA,pA,OA,SA,_A,Ae,zA,TA,PA,EA,PA,GA,MA,le,ye,He,ZA,Be,Ft,Qe,Ee,Rt,Ye,bt,Vt,Pt,lt,Gt;return u(this,function(ct){switch(ct.label){case 0:if(!s||typeof s!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(c=s.ownerDocument,!c)throw new Error("Element is not attached to a Document");if(l=c.defaultView,!l)throw new Error("Document is not attached to a Window");return f={allowTaint:(GA=i.allowTaint)!==null&&GA!==void 0?GA:!1,imageTimeout:(MA=i.imageTimeout)!==null&&MA!==void 0?MA:15e3,proxy:i.proxy,useCORS:(le=i.useCORS)!==null&&le!==void 0?le:!1},p=o({logging:(ye=i.logging)!==null&&ye!==void 0?ye:!0,cache:i.cache},f),C={windowWidth:(He=i.windowWidth)!==null&&He!==void 0?He:l.innerWidth,windowHeight:(ZA=i.windowHeight)!==null&&ZA!==void 0?ZA:l.innerHeight,scrollX:(Be=i.scrollX)!==null&&Be!==void 0?Be:l.pageXOffset,scrollY:(Ft=i.scrollY)!==null&&Ft!==void 0?Ft:l.pageYOffset},y=new h(C.scrollX,C.scrollY,C.windowWidth,C.windowHeight),E=new hE(p,y),D=(Qe=i.foreignObjectRendering)!==null&&Qe!==void 0?Qe:!1,M={allowTaint:(Ee=i.allowTaint)!==null&&Ee!==void 0?Ee:!1,onclone:i.onclone,ignoreElements:i.ignoreElements,inlineImages:D,copyStyles:D},E.logger.debug("Starting document clone with size "+y.width+"x"+y.height+" scrolled to "+-y.left+","+-y.top),G=new ou(E,s,M),Z=G.clonedReferenceElement,Z?[4,G.toIFrame(c,y)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return vA=ct.sent(),dA=Xi(Z)||mQ(Z)?B(Z.ownerDocument):g(E,Z),pA=dA.width,OA=dA.height,SA=dA.left,_A=dA.top,Ae=mE(E,Z,i.backgroundColor),zA={canvas:i.canvas,backgroundColor:Ae,scale:(Ye=(Rt=i.scale)!==null&&Rt!==void 0?Rt:l.devicePixelRatio)!==null&&Ye!==void 0?Ye:1,x:((bt=i.x)!==null&&bt!==void 0?bt:0)+SA,y:((Vt=i.y)!==null&&Vt!==void 0?Vt:0)+_A,width:(Pt=i.width)!==null&&Pt!==void 0?Pt:Math.ceil(pA),height:(lt=i.height)!==null&&lt!==void 0?lt:Math.ceil(OA)},D?(E.logger.debug("Document cloned, using foreign object rendering"),PA=new dE(E,zA),[4,PA.render(Z)]):[3,3];case 2:return TA=ct.sent(),[3,5];case 3:return E.logger.debug("Document cloned, element located at "+SA+","+_A+" with size "+pA+"x"+OA+" using computed rendering"),E.logger.debug("Starting DOM parsing"),EA=Pc(E,Z),Ae===EA.styles.backgroundColor&&(EA.styles.backgroundColor=st.TRANSPARENT),E.logger.debug("Starting renderer for element at "+zA.x+","+zA.y+" with size "+zA.width+"x"+zA.height),PA=new iE(E,zA),[4,PA.render(EA)];case 4:TA=ct.sent(),ct.label=5;case 5:return(!((Gt=i.removeContainer)!==null&&Gt!==void 0)||Gt)&&(ou.destroy(vA)||E.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),E.logger.debug("Finished rendering"),[2,TA]}})})},mE=function(s,i,c){var l=i.ownerDocument,f=l.documentElement?$n(s,getComputedStyle(l.documentElement).backgroundColor):st.TRANSPARENT,p=l.body?$n(s,getComputedStyle(l.body).backgroundColor):st.TRANSPARENT,C=typeof c=="string"?$n(s,c):c===null?st.TRANSPARENT:4294967295;return i===l.documentElement?yt(f)?yt(p)?C:p:f:C};return BE}))})),qw=rs(jw(),1),A0=(0,r.defineComponent)({name:"DBiDesignContainer",__name:"biDesignContainer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})},activedComponent:{type:Object,default:()=>({})},scale:{type:Number,default:1}},emits:["select","move"],setup(e,{emit:A}){const t=e,n=A,{apiUrl:o,token:a}=(0,Ht.useAppInject)(),u=(0,r.computed)(()=>{const B={transform:`scale(${t.scale}, ${t.scale})`,transformOrigin:"left top",position:"relative",width:$A(t.indexPage.config.w||1920),height:$A(t.indexPage.config.h||1080),backgroundColor:t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"};return t.indexPage.config.backgroundImage&&(B.background=`url(${o}/system/annexesfile/${t.indexPage.config.backgroundImage}?token=${a?.value}) 0% 0% / 100% 100% ${t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"}`),B}),d=B=>{n("select",B)},h=B=>{n("move",B)},g=B=>{B?.target?.getAttribute("id")==="j-bi-design-container"&&n("select",t.indexPage)};return(B,w)=>{const m=(0,r.resolveComponent)("d-draggable");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{onClick:(0,r.withModifiers)(g,["stop"]),id:"j-bi-design-container",style:(0,r.normalizeStyle)(u.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.layout,(v,Q)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:v.id},[v.display?((0,r.openBlock)(),(0,r.createBlock)(m,{key:0,id:v.id,left:v.config.x,top:v.config.y,width:v.config.w,height:v.config.h,scale:1/e.scale,step:1/e.scale,"active-flag":v.id==e.activedComponent.id,readonly:v.lock,"data-id":v.id,onFocus:H=>d(v),onBlur:h,"z-index":e.layout.length-Q,"is-active-bg-transparent":!0},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(v.componentName),(0,r.mergeProps)({style:{width:(0,r.unref)($A)(v.config.w),height:(0,r.unref)($A)(v.config.h)}},{ref_for:!0},v.config,{"is-design":!0}),null,16,["style"]))]),_:2},1032,["id","left","top","width","height","scale","step","active-flag","readonly","data-id","onFocus","z-index"])):(0,r.createCommentVNode)("",!0)],64))),128))],4)}}}),El=A0,e0=(0,r.defineComponent)({name:"DBiViewer",__name:"biViewer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})}},setup(e){const A=e,{apiUrl:t,token:n,httpGet:o,httpPost:a}=(0,Ht.useAppInject)(),u=(0,r.computed)(()=>A.layout),d=(0,r.ref)(),h=(0,r.ref)(1),g=(0,r.ref)(1),B=()=>{d.value&&w(d.value.offsetWidth,d.value.offsetHeight)},w=(U,k)=>{const eA=A.indexPage.config?.w||1920,Y=A.indexPage.config?.h||1080,sA=A.indexPage.config?.screenFit||"1";sA==="1"?(g.value=U/eA,h.value=g.value):sA==="2"?(h.value=k/Y,g.value=h.value):sA==="3"&&(g.value=U/eA,h.value=k/Y)},m=(0,r.computed)(()=>{const U={transform:`scale(${g.value}, ${h.value})`,transformOrigin:"left top",position:"relative",overflow:"hidden",width:$A(A.indexPage.config?.w||1920),height:$A(A.indexPage.config?.h||1080),backgroundColor:A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"};return A.indexPage.config?.backgroundImage&&(U.background=`url(${t}/system/annexesfile/${A.indexPage.config?.backgroundImage}?token=${n?.value}) 0% 0% / 100% 100% ${A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"}`),U}),v=(0,r.computed)(()=>({width:$A((A.indexPage.config?.w||1920)*g.value),height:$A((A.indexPage.config?.h||1080)*h.value)})),Q={},H=(U,k)=>{U&&(Q[k]=U)},N=new ResizeObserver(B);(0,r.onMounted)(()=>{N.observe(d.value)});const L=(U,k)=>{R(k,{params:U})},R=async(U,k)=>{if(U&&U.trim()){U=`async (jcode) => {${U}}`;const{res:eA,msg:Y,fn:sA}=(0,Ht.getFunction)(U)}};return(0,r.provide)("jcode_bi_viewer",{executeEvent:R}),(U,k)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"j-block",style:(0,r.normalizeStyle)({"overflow-y":!e.indexPage.config?.screenFit||e.indexPage.config?.screenFit=="1"?"auto":"hidden","overflow-x":e.indexPage.config?.screenFit=="2"?"auto":"hidden"}),ref_key:"biViewer",ref:d},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(v.value)},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(m.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(u.value,(eA,Y)=>(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(eA.componentName),(0,r.mergeProps)({key:eA.id,ref_for:!0,ref:sA=>H(sA,eA.id),style:{position:"absolute",width:(0,r.unref)($A)(eA.config.w),height:(0,r.unref)($A)(eA.config.h),top:(0,r.unref)($A)(eA.config.y),left:(0,r.unref)($A)(eA.config.x),zIndex:e.layout.length-Y}},{ref_for:!0},eA.config,{onClick:sA=>L(sA,eA.config.clickevent)}),null,16,["style","onClick"])),[[r.vShow,eA.display!==!1]])),128))],4)],4)],4))}}),Ul=e0,t0={class:"j-bi-design"},n0={class:"j-bi-design-left"},r0={style:{padding:"0 4px"}},o0=["onClick"],i0={class:"j-bi-design-left2"},s0={key:0,class:"j-block",style:{"padding-top":"28px"}},a0={class:"search-input-wraper"},l0=["onClick","data-id"],c0={class:"j-bi-design-layer-item-img"},u0=["src"],d0={class:"j-bi-design-layer-item-btns"},f0=["onClick"],g0=["onClick"],h0=["onClick"],B0=["onDragend"],p0={class:"component-item2-text"},m0=["src"],w0={class:"j-bi-design-right"},C0={class:"j-bi-design-title"},v0={class:"j-bi-design-panel"},y0=(0,r.defineComponent)({name:"DBiDesign",__name:"biDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,componentConfigInit:Function,componentConfigChange:Function,imgUrlPrefix:{type:String,default:"/"},scale:{type:Number,default:-1}},emits:["update:scale"],setup(e,{expose:A,emit:t}){const{t:n}=(0,Ht.useAppInject)(),o=e,a=t,u=(0,r.ref)({name:"页面",id:"indexPage",type:"indexPage",layerId:"0",config:{},display:!0,lock:!1,componentName:""});o.componentInit&&(u.value.config=o.componentInit("indexPage")||{},u.value.config.id="indexPage");const d=(0,r.computed)(()=>{const iA={};return o.components.forEach(fA=>{fA.children.forEach(xA=>{iA[xA.type]=xA})}),iA}),h=(0,r.ref)(0),g=(0,r.ref)(),B=(0,r.ref)([]),w=(0,r.ref)(!1),m=(0,r.ref)(0),v=(0,r.ref)(0),Q=(0,r.ref)(""),H=(0,r.computed)(()=>Q.value===""?{}:B.value.find(iA=>iA.id===Q.value)),N=()=>{w.value=!1,Q.value=""},L=iA=>{iA.target.className.indexOf("j-bi-design-contentmenu__btn")===-1&&N(),window.removeEventListener("mousedown",L)},R=iA=>{let{target:fA}=iA,xA=!1;fA.className.indexOf&&fA.className.indexOf("d-draggable__mask")>-1?(fA=fA.parentNode.parentNode,xA=!0):fA.className.indexOf&&fA.className.indexOf("j-bi-design-layer-item")>-1?xA=!0:fA.parentNode.className.indexOf&&fA.parentNode.className.indexOf("j-bi-design-layer-item")>-1?(fA=fA.parentNode,xA=!0):fA.parentNode.parentNode.className.indexOf("j-bi-design-layer-item")>-1&&(fA=fA.parentNode.parentNode,xA=!0),xA&&(iA.preventDefault(),iA.stopPropagation(),m.value=iA.clientX,v.value=iA.clientY-8,v.value+260>document.body.clientHeight&&(v.value=document.body.clientHeight-260),Q.value=fA.getAttribute("data-id"),w.value=!0,window.addEventListener("mousedown",L))},U=(0,r.ref)(""),k=(0,r.computed)(()=>U.value?B.value.filter(iA=>iA.config.label.indexOf(U.value)>-1):B.value),eA=iA=>{iA.display=!iA.display,N()},Y=iA=>{iA.lock=!iA.lock,N(),iA.lock&&iA.id===g.value?.id&&CA(u.value)},sA=(iA,fA)=>{if(!fA||B.value.length<1){N();return}const xA=B.value.findIndex(kA=>kA.id===fA.id);switch(iA){case"up":if(xA===-1||xA===0)break;B.value=lA(B.value,xA,xA-1);break;case"down":if(xA===-1||xA===B.value.length-1)break;B.value=lA(B.value,xA,xA+1);break;case"top":if(xA!==-1){const[kA]=B.value.splice(xA,1);B.value.unshift(kA)}break;case"bottom":if(xA!==-1){const[kA]=B.value.splice(xA,1);B.value.push(kA)}break}N()},lA=(iA,fA,xA)=>{const kA=iA[fA];return iA[fA]=iA[xA],iA[xA]=kA,iA},nA=(0,r.ref)(),tA=(0,r.ref)(20),AA=(0,r.ref)(document.body.clientWidth),T=(0,r.ref)(document.body.clientHeight),aA=(0,r.ref)(0),I=(0,r.ref)(0),J=(0,r.ref)({bgColor:"rgba(225,225,225, 0)",longfgColor:"rgba(0, 0, 0, 0.45)",shortfgColor:"rgba(0, 0, 0, 0.45)",fontColor:"rgba(0, 0, 0, 0.65)",shadowColor:"rgba(225,225,225, 0)",lineColor:"var(--j-color-primary)",borderColor:"#d9d9d9",cornerActiveColor:"var(--j-color-primary)"}),F=(0,r.computed)(()=>({x:0,y:0,width:AA.value,height:T.value})),S=(0,r.ref)({h:[],v:[]}),V=(0,r.ref)(),O=(0,r.ref)(),z=(0,r.ref)(!1),q=(0,r.ref)({}),rA=(0,r.ref)(100),uA=(0,r.computed)({set(iA){rA.value=iA,a("update:scale",iA)},get(){let{scale:iA}=o;return iA===-1&&(iA=rA.value),iA/100}}),FA=(0,r.computed)(()=>(u.value.config.h||1080)*2),P=(0,r.computed)(()=>(u.value.config.w||1920)*2),W=()=>{nA.value&&(AA.value=nA.value.offsetWidth-tA.value,T.value=nA.value.offsetHeight-tA.value,V.value.scrollLeft=P.value/2-tA.value,V.value.scrollTop=FA.value/2-tA.value,X())},X=()=>{const iA=u.value.config.w||1920;AA.value<iA&&(uA.value=AA.value*100/iA)},oA=()=>{document.onkeydown=iA=>{if(iA.target?.nodeName==="TEXTAREA"||iA.target?.nodeName==="INPUT")return;const fA=iA.keyCode||iA.which;fA===32&&(iA.preventDefault(),q.value.space=!0),fA===17&&(iA.preventDefault(),q.value.ctrl=!0)},document.onkeyup=()=>{q.value={}}},hA=iA=>{q.value.space&&(z.value=!0,window.stardragEvent=iA,window.startSlideX=V.value.scrollLeft,window.startSlideY=V.value.scrollTop,document.onmousemove=fA=>{if(z.value){const xA=fA.clientX-window.stardragEvent.clientX,kA=fA.clientY-window.stardragEvent.clientY;V.value.scrollLeft=window.startSlideX-xA,V.value.scrollTop=window.startSlideY-kA}},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,z.value=!1})},wA=()=>{const iA=V.value.getBoundingClientRect(),fA=O.value.getBoundingClientRect(),xA=uA.value,kA=(iA.left+tA.value-fA.left)/xA,rt=(iA.top+tA.value-fA.top)/xA;aA.value=kA>>0,I.value=rt>>0},bA=iA=>{if(iA.preventDefault(),iA.ctrlKey||iA.metaKey){const fA=uA.value;uA.value=parseFloat(Math.max(.2,fA-iA.deltaY/500).toFixed(2))*100,fA!==uA.value&&(0,r.nextTick)(()=>{wA()})}},cA=(0,r.ref)(),mA=(0,r.computed)(()=>g.value?`【${g.value.name}】`:""),_={};Object.keys(o.componentConfigs).forEach(iA=>{const fA=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],xA=[{id:"w",type:"j-number",config:{label:"宽度",min:0}},{id:"h",type:"j-number",config:{label:"高度",min:0}},{id:"x",type:"j-number",config:{label:"x轴",min:0}},{id:"y",type:"j-number",config:{label:"y轴",min:0}}],kA={type:"j-collapse",config:{defaultValue:[]},children:[]};iA!=="indexPage"&&kA.children?.push({config:{label:"基础信息"},children:[...fA]}),kA.children?.push(...o.componentConfigs[iA]),iA!=="indexPage"?(kA.children?.push({config:{label:"大小定位"},children:[...xA]}),kA.config?.defaultValue.push("_collapse0","_collapse1")):kA.children&&kA.children.length>0&&kA.config?.defaultValue.push("_collapse0"),_[iA]=[kA]});const b=()=>{if(g.value){const iA=_[g.value.type];iA?cA.value.init(iA,g.value.config):cA.value.init([]),o.componentConfigInit&&o.componentConfigInit(g.value.type,{configRef:cA,components:B.value,configData:g.value.config})}else cA.value.init([])},x=(iA,fA)=>{g.value&&o.componentConfigChange&&(g.value.id==="indexPage"&&(iA.id==="w"||iA.id==="h")&&(0,r.nextTick)(()=>{W()}),o.componentConfigChange(g.value.type,{configRef:cA,component:iA,configData:g.value.config,...fA}))},$=iA=>o.componentInit?o.componentInit(iA)||{}:{},K=(iA,fA,xA)=>{const kA={name:iA.name,id:dt(),type:iA.type,layerId:"0",config:$(iA.type),display:!0,lock:!1,componentName:iA.componentName};kA.config.id=kA.id,kA.config.label=iA.name,kA.config.h=iA.h||100,kA.config.w=iA.w||100,kA.config.x=fA,kA.config.y=xA,B.value.unshift(kA),g.value=kA,b()},BA=(iA,fA)=>{const xA=document.getElementById("j-bi-design-container").getBoundingClientRect(),kA=iA.clientX-xA.left,rt=iA.clientY-xA.top;K(fA,kA/uA.value-fA.w/2,rt/uA.value-fA.h/2)},gA=iA=>{B.value=B.value.filter(fA=>fA.id!==iA),g.value.id===iA&&(g.value=u.value,b()),N()},HA=iA=>{const fA=pn(iA),xA=dt();fA.id=xA,fA.config.id=xA,B.value.push(fA),g.value=fA,b(),N()},CA=iA=>{g.value?.id!==iA.id&&(g.value=iA,b())},LA=({left:iA,top:fA,width:xA,height:kA})=>{g.value&&(g.value.config.x=iA,g.value.config.y=fA,g.value.config.w=xA,g.value.config.h=kA,cA.value.setFormData({main:{x:iA,y:fA,w:xA,h:kA}}))},KA=new ResizeObserver(W);(0,r.onMounted)(()=>{KA.observe(nA.value),oA(),CA(u.value)});const XA=()=>({ver:"1.0.0",components:pn(B.value),page:u.value}),ue=iA=>{iA.components?.forEach(fA=>{fA.componentName=d.value[fA.type].componentName}),B.value=iA.components||[],u.value=iA.page||u.value,CA(u.value)},re=()=>{B.value=[],CA(u.value)},nt=()=>new Promise(iA=>{(0,qw.default)(O.value,{useCORS:!0,backgroundColor:null,allowTaint:!0}).then(fA=>{if(fA.width!==0&&fA.height!==0){iA(fA.toDataURL("image/png"));return}iA("")})}),pt=(0,r.ref)(),ze=(0,r.ref)({});return A({clear:re,setData:ue,getData:XA,getImg:nt,preview:()=>{ze.value=XA(),pt.value.open("大屏预览","full")}}),(iA,fA)=>{const xA=(0,r.resolveComponent)("el-divider"),kA=(0,r.resolveComponent)("j-icon"),rt=(0,r.resolveComponent)("el-button"),Mn=(0,r.resolveComponent)("el-input"),Tt=(0,r.resolveComponent)("el-text"),kt=(0,r.resolveComponent)("el-space"),Kn=(0,r.resolveComponent)("j-form"),tn=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",t0,[w.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"j-bi-design-contentmenu",style:(0,r.normalizeStyle)({left:m.value+"px",top:v.value+"px"})},[(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[0]||(fA[0]=VA=>HA(H.value))},(0,r.toDisplayString)((0,r.unref)(n)("复制")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[1]||(fA[1]=VA=>eA(H.value))},(0,r.toDisplayString)(H.value&&H.value.display?"隐藏":"显示"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[2]||(fA[2]=VA=>Y(H.value))},(0,r.toDisplayString)(H.value&&H.value.lock?"解锁":"锁定"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[3]||(fA[3]=VA=>sA("top",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("置顶图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[4]||(fA[4]=VA=>sA("bottom",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("置底图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[5]||(fA[5]=VA=>sA("up",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("上移一层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:fA[6]||(fA[6]=VA=>sA("down",H.value))},(0,r.toDisplayString)((0,r.unref)(n)("下移一层")),1),(0,r.createVNode)(xA,{style:{margin:"4px 0"}}),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",style:{color:"var(--j-color-danger)"},onClick:fA[7]||(fA[7]=VA=>gA(H.value?.id))},(0,r.toDisplayString)((0,r.unref)(n)("删除")),1)],4)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",n0,[(0,r.createElementVNode)("div",{onClick:fA[8]||(fA[8]=(0,r.withModifiers)(VA=>h.value=-1,["stop"])),class:(0,r.normalizeClass)(["component-item",{active:h.value==-1}])},[(0,r.createVNode)(kA,{size:24,icon:"mdi:bookmark-box-multiple-outline"}),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)("图层")),1)],2),(0,r.createElementVNode)("div",r0,[(0,r.createVNode)(xA)]),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(VA,Me)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Me,onClick:(0,r.withModifiers)(ot=>h.value=Me,["stop"]),class:(0,r.normalizeClass)(["component-item",{active:h.value==Me}])},[(0,r.createVNode)(kA,{size:24,icon:VA.icon},null,8,["icon"]),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)(VA.name)),1)],10,o0))),128))]),(0,r.createElementVNode)("div",i0,[h.value==-1?((0,r.openBlock)(),(0,r.createElementBlock)("div",s0,[(0,r.createElementVNode)("div",a0,[(0,r.createVNode)(Mn,{modelValue:U.value,"onUpdate:modelValue":fA[9]||(fA[9]=VA=>U.value=VA),class:"search-input",placeholder:"搜索图层"},{append:(0,r.withCtx)(()=>[(0,r.createVNode)(rt,null,{icon:(0,r.withCtx)(()=>[(0,r.createVNode)(kA,{icon:"ep:search"})]),_:1})]),_:1},8,["modelValue"])]),(0,r.createElementVNode)("div",{class:"j-block",style:{"padding-top":"8px",overflow:"auto"},onContextmenu:(0,r.withModifiers)(R,["prevent"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(k.value,(VA,Me)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Me},[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item",{active:g.value.id==VA.id}]),onClick:(0,r.withModifiers)(ot=>CA(VA),["stop"]),"data-id":VA.id},[(0,r.createElementVNode)("div",c0,[(0,r.createElementVNode)("img",{style:{height:"100%"},src:`${e.imgUrlPrefix}${d.value[VA.type].img}`},null,8,u0)]),(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(VA.config.label)),1)]),_:2},1024),(0,r.createElementVNode)("div",d0,[(0,r.createVNode)(kt,{size:2},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:!VA.display}]),onClick:(0,r.withModifiers)(ot=>eA(VA),["stop"])},[(0,r.createVNode)(kA,{icon:"mdi:eye-off-outline"})],10,f0),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:VA.lock}]),onClick:(0,r.withModifiers)(ot=>Y(VA),["stop"])},[(0,r.createVNode)(kA,{icon:"mdi:lock-outline"})],10,g0)]),_:2},1024)])],10,l0)]))),128))],32)])):e.components[h.value]?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(e.components[h.value].children,(VA,Me)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Me,onClick:ot=>K(VA,0,0)},[(0,r.createElementVNode)("div",{class:"component-item2",onDragend:ot=>BA(ot,VA),draggable:"true"},[(0,r.createElementVNode)("div",p0,[(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(VA.name)),1)]),_:2},1024)]),(0,r.createElementVNode)("img",{class:"component-item2-img",src:`${e.imgUrlPrefix}${VA.img}`},null,8,m0)],40,B0)],8,h0))),128)):(0,r.createCommentVNode)("",!0)]),(0,r.createElementVNode)("div",{class:"j-bi-design-mid",ref_key:"contentRef",ref:nA},[((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(Zw),{key:uA.value,thick:tA.value,scale:uA.value,width:AA.value,height:T.value,"start-x":aA.value,"start-y":I.value,palette:J.value,shadow:F.value,"hor-line-arr":S.value.h,"ver-line-arr":S.value.v},null,8,["thick","scale","width","height","start-x","start-y","palette","shadow","hor-line-arr","ver-line-arr"])),(0,r.createElementVNode)("div",{ref_key:"screensRef",ref:V,class:"j-bi-design-main",style:(0,r.normalizeStyle)({cursor:z.value?"pointer":""}),onMousedown:(0,r.withModifiers)(hA,["stop"]),onWheel:bA,onScroll:wA},[(0,r.createElementVNode)("div",{class:"screen-container",style:(0,r.normalizeStyle)({height:FA.value+"px",width:P.value+"px"}),onClick:fA[10]||(fA[10]=(0,r.withModifiers)(VA=>CA(u.value),["stop"]))},[(0,r.createElementVNode)("div",{ref_key:"canvasRef",ref:O,class:"canvas",onContextmenu:(0,r.withModifiers)(R,["prevent"])},[(0,r.createVNode)(El,{layout:B.value,"index-page":u.value,"actived-component":g.value,scale:uA.value,onSelect:CA,onMove:LA},null,8,["layout","index-page","actived-component","scale"])],544)],4)],36)],512),(0,r.createElementVNode)("div",w0,[(0,r.createElementVNode)("div",C0,[(0,r.createVNode)(Tt,{truncated:"",style:{margin:"0","font-size":"14px"}},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(`${(0,r.unref)(n)("属性配置")}${mA.value} `),1)]),_:1})]),(0,r.createElementVNode)("div",v0,[(0,r.createVNode)(Kn,{config:{labelPosition:"top",size:"small"},style:{padding:"0"},ref_key:"configRef",ref:cA,onChange:x},null,512)])]),(0,r.createVNode)(tn,{ref_key:"previewFormLayerRef",ref:pt,destroyOnClose:!0,hasHeader:!1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Ul,{indexPage:ze.value.page,layout:ze.value.components},null,8,["indexPage","layout"])]),_:1},512)])}}}),Q0=y0,Fl=ut(Q0,[El,Ul]),E0=[as,_o,So,xo,Do,nl,rl,ul,dl,ml,yl,Fl],bl=new WeakSet,U0=e=>{bl.has(e)||(bl.add(e),E0.forEach(A=>{const t=A.name;t&&e.component(t,A)}))},F0={install:U0};te.DBiDesign=Fl,te.DDrag=as,te.DDraggable=dl,te.DFlowDesign=nl,te.DFormDesign=ml,te.DIndexDesign=yl,te.DInputFlow=rl,te.DLayout=ul,te.default=F0,te.dragContainer=So,te.dragFormList=xo,te.dragIndexList=Do,te.dragTool=_o,te.toFormDesignSchema=gl,te.toFormSaveSchema=Vr,te.toFormSchema=fl});