@highstate/designer 0.9.19 → 0.9.20
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BhWccYlK.js → 20zRBBOT.js} +21 -21
- package/.output/public/_nuxt/{HgwTqqUo.js → 3cWt8vz3.js} +1 -1
- package/.output/public/_nuxt/{24pzIZRr.js → 4-z0BBBK.js} +1 -1
- package/.output/public/_nuxt/{B2umP1rN.js → B6Kaf1Zv.js} +1 -1
- package/.output/public/_nuxt/{DEKgA0CD.js → B7eyK5kF.js} +1 -1
- package/.output/public/_nuxt/{C39wRh4i.js → BBm9Ui4P.js} +1 -1
- package/.output/public/_nuxt/{CBdGpnmw.js → BCeRv53V.js} +1 -1
- package/.output/public/_nuxt/{CND6o3oI.js → BFHRoLmv.js} +1 -1
- package/.output/public/_nuxt/{Bq9zGKGH.js → BKG_vmA6.js} +1 -1
- package/.output/public/_nuxt/{CzVLS6f1.js → BMQs3vM5.js} +1 -1
- package/.output/public/_nuxt/{BSVaCi82.js → BTT16DZE.js} +1 -1
- package/.output/public/_nuxt/{COCm9MC_.js → BUBm2gu0.js} +1 -1
- package/.output/public/_nuxt/{UczlX-c9.js → BUVU2BiV.js} +1 -1
- package/.output/public/_nuxt/{DTnN7l_n.js → BZsnSVZa.js} +1 -1
- package/.output/public/_nuxt/{Bwy6lXZI.js → BZxTtwKO.js} +1 -1
- package/.output/public/_nuxt/{BODfYi5x.js → Bc22Y1oD.js} +1 -1
- package/.output/public/_nuxt/{DDCXd-ua.js → BdJnfSuv.js} +1 -1
- package/.output/public/_nuxt/{CF5B4EM_.js → BfUh6PEC.js} +1 -1
- package/.output/public/_nuxt/{DxOL29Up.js → BhJD15Lv.js} +1 -1
- package/.output/public/_nuxt/{D1TquUAQ.js → BvXvCmL7.js} +1 -1
- package/.output/public/_nuxt/{DLQCiJf0.js → C1NBlWY6.js} +1 -1
- package/.output/public/_nuxt/{Dy4MTz6g.js → C3tTPg4E.js} +1 -1
- package/.output/public/_nuxt/{ttev5MDP.js → CJbwedTO.js} +1 -1
- package/.output/public/_nuxt/CXMRj2GR.js +1 -0
- package/.output/public/_nuxt/{_d0M4KuU.js → CgH_TWd3.js} +1 -1
- package/.output/public/_nuxt/{DwmUhPpj.js → CjzOrk9n.js} +1 -1
- package/.output/public/_nuxt/{DPWtH2b9.js → CnSrlJ1t.js} +1 -1
- package/.output/public/_nuxt/{BeBKEPaV.js → CpdUDRp-.js} +1 -1
- package/.output/public/_nuxt/{CIv7p5Hd.js → CucSXtnI.js} +1 -1
- package/.output/public/_nuxt/{Bj2v5zwu.js → D0GxoeXH.js} +1 -1
- package/.output/public/_nuxt/{BjQbGaFu.js → D2QRMlri.js} +1 -1
- package/.output/public/_nuxt/{BkhU0P2a.js → D5OlmvkM.js} +1 -1
- package/.output/public/_nuxt/{DO3LUuFM.js → D6E-gKom.js} +1 -1
- package/.output/public/_nuxt/{JokPmHXv.js → DBdpdpK3.js} +1 -1
- package/.output/public/_nuxt/{DFPGdAue.js → DEnsbvQE.js} +1 -1
- package/.output/public/_nuxt/{00PavPNr.js → DFH86FKQ.js} +1 -1
- package/.output/public/_nuxt/{BH2j9ZdL.js → DKZb-7H-.js} +1 -1
- package/.output/public/_nuxt/{O074qcLn.js → DMvBTgJm.js} +1 -1
- package/.output/public/_nuxt/{CAEVHbCq.js → DOgaXG8Y.js} +1 -1
- package/.output/public/_nuxt/{DjVGtenp.js → DRIP7i-G.js} +1 -1
- package/.output/public/_nuxt/{BLPLmiCg.js → DUARq8BM.js} +1 -1
- package/.output/public/_nuxt/{D9qQxcz2.js → DVV-1Xgo.js} +1 -1
- package/.output/public/_nuxt/{DLaRxjQz.js → DW9frVpz.js} +1 -1
- package/.output/public/_nuxt/{DYtuF1mO.js → DWDpKQJN.js} +1 -1
- package/.output/public/_nuxt/{T7hNoCXG.js → Dbgx9Kfk.js} +1 -1
- package/.output/public/_nuxt/{DbnWrFmt.js → DbomWJMC.js} +1 -1
- package/.output/public/_nuxt/{DarxiN41.js → Df5-uBpS.js} +1 -1
- package/.output/public/_nuxt/{B8z64P5r.js → DgxepGqe.js} +1 -1
- package/.output/public/_nuxt/{DIpLW5D5.js → DjN4qVUp.js} +1 -1
- package/.output/public/_nuxt/{DoLmvh98.js → DmQuAe0a.js} +1 -1
- package/.output/public/_nuxt/{v9bSWb7m.js → DnkIt1sE.js} +1 -1
- package/.output/public/_nuxt/{D9rAj-Tm.js → DpdC86Cg.js} +1 -1
- package/.output/public/_nuxt/{C28Ky4mM.js → DrMaf3PA.js} +1 -1
- package/.output/public/_nuxt/{Ck1nftBx.js → Dsv_PvmI.js} +1 -1
- package/.output/public/_nuxt/{DP4clH6m.js → DxhSsuVH.js} +1 -1
- package/.output/public/_nuxt/{kFPB2rqp.js → G46Y9AKK.js} +1 -1
- package/.output/public/_nuxt/{i3Pf1NPu.js → TqsILp0j.js} +1 -1
- package/.output/public/_nuxt/{BLIjXRbp.js → XVH4GPVs.js} +1 -1
- package/.output/public/_nuxt/{N0qQ3IYs.js → apt5CXWJ.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/4aa61a2b-8c04-489d-bc5e-b3c10756c7d5.json +1 -0
- package/.output/public/_nuxt/{graph-resolver-DwBTX8MB.js → graph-resolver-r_0JlXH_.js} +5 -5
- package/.output/public/_nuxt/{mwDqsUrW.js → j6gS8Wqd.js} +1 -1
- package/.output/public/_nuxt/{DInZfUJa.js → jhVMpA5V.js} +1 -1
- package/.output/public/_nuxt/{DcrT2YVS.js → rwNeRj8A.js} +1 -1
- package/.output/public/_nuxt/{JJ2MHRK2.js → whD7B6hi.js} +1 -1
- package/.output/public/_nuxt/{fqUPtzRv.js → yJRFOr9c.js} +1 -1
- package/.output/public/_nuxt/{CasefD2V.js → yb5mHxB5.js} +1 -1
- package/.output/server/index.mjs +1223 -1223
- package/.output/server/package.json +1 -1
- package/package.json +5 -5
- package/.output/public/_nuxt/BEFlL3Zb.js +0 -1
- package/.output/public/_nuxt/builds/meta/c89eb61d-80e1-4ca1-b13e-521c420f664e.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ad as kn,_ as J,at as Pt,au as yi,av as Sn,aw as wi,ax as $n,ay as bi,l as ki,az as Cn,aA as ot,aB as Dt,aC as In,aD as Vn,aE as Si,aF as $i,aG as Ze,aH as ze,aI as Ci,aJ as Ii,am as Vi,aK as An,aL as Ai,i as Mt,aM as Kt,aN as Mi,aO as Ni,I as Mn,aP as Nn,ao as zi,aQ as Ei,aR as Ri,aS as Jt}from"./BhWccYlK.js";import{F as x,j as O,Z as A,W as g,ai as Z,G as m,a1 as k,X as I,a0 as K,a2 as L,a3 as j,t as Fe,L as R,ab as Q,$ as G,_ as B,aa as ke,H as zn,a9 as D,af as ie,b3 as Oi,aE as Lt,ac as Ce,ae as Bi,a7 as En,r as _e,q as Ti,i as Fi,ak as Ve,a8 as rt,a5 as _i,I as Hi,b4 as Pi,al as Oe,aT as Rn,aO as we,av as Ue,az as On,b5 as Di,b6 as Li,aK as Bn,b7 as xi,w as Ui,a as Tn,aw as Fn,aA as be,ay as pt,ax as qi,b as Nt,aM as _n,aC as gt,aD as He,n as at,aI as Xi,a_ as Yi,aH as Gi,aP as st,aS as Wi,aj as ji,aX as Ki}from"./koatKMQr.js";import{C as Zt,s as Ji,a as Hn,_ as Zi}from"./BSVaCi82.js";import"./SQImb3Xm.js";import{V as Qt}from"./DcrT2YVS.js";import{_ as Qi}from"./DxOL29Up.js";function eo(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return Zt(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>Zt(o,i),i)}throw new Error("Wrong number of arguments")}function to(...e){return eo(no,e)}function no(){let e=new Set;return t=>e.has(t)?Ji:(e.add(t),{done:!1,hasNext:!0,next:t})}const io=x({__name:"InlineCopyButton",props:{content:{}},setup(e){const{copy:t,copied:n}=kn(),i=O(()=>n.value?"mdi-check":"mdi-content-copy");return(o,r)=>(g(),A(Z,{size:"small",variant:"text",class:"copy-button d-flex ml-1",onClick:r[0]||(r[0]=a=>m(t)(o.content))},{default:k(()=>[I(K,{size:16},{default:k(()=>[L(j(m(i)),1)]),_:1})]),_:1}))}}),oo=J(io,[["__scopeId","data-v-9df8c2df"]]);var he=(e=>(e.Lines="lines",e.Dots="dots",e))(he||{});const Pn=function({dimensions:e,size:t,color:n}){return zn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Dn=function({radius:e,color:t}){return zn("circle",{cx:e,cy:e,r:e,fill:t})};he.Lines+"",he.Dots+"";const ro={[he.Dots]:"#81818a",[he.Lines]:"#eee"},ao=["id","x","y","width","height","patternTransform"],so={key:2,height:"100",width:"100"},lo=["fill"],uo=["x","y","fill"],co={name:"Background",compatConfig:{MODE:3}},fo=x({...co,props:{id:{},variant:{default:()=>he.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:t,viewport:n}=Pt(),i=O(()=>{const a=n.value.zoom,[s,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*a||1,u*a||1],l=e.size*a,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],p=[d*a||1+c[0]/2,f*a||1+c[1]/2];return{scaledGap:c,offset:p,size:l}}),o=Fe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=Fe(()=>e.color||e.patternColor||ro[e.variant||he.Dots]);return(a,s)=>(g(),R("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[Q(a.$slots,"pattern-container",{id:o.value},()=>[G("pattern",{id:o.value,x:m(n).x%i.value.scaledGap[0],y:m(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Q(a.$slots,"pattern",{},()=>[a.variant===m(he).Lines?(g(),A(m(Pn),{key:0,size:a.lineWidth,color:r.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===m(he).Dots?(g(),A(m(Dn),{key:1,color:r.value,radius:i.value.size/2},null,8,["color","radius"])):B("",!0),a.bgColor?(g(),R("svg",so,[G("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,lo)])):B("",!0)])],8,ao)]),G("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,uo),Q(a.$slots,"default",{id:o.value})],4))}});function ho(e,t,n){const i=Array.from({length:n},()=>[]),o=t,a=-(o*(n-1))/2,s=Array.from({length:n},(l,d)=>a+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],p=f[0]-d[0],V=f[1]-d[1],$=Math.sqrt(p*p+V*V);let w=-V,y=p;$!==0&&(w/=$,y/=$),u.push({x:w,y})}function c(l,d,f,p){const V=l[0],$=l[1],w=d[0],y=d[1],C=f[0],E=f[1],T=p[0],_=p[1],H=(V-w)*(E-_)-($-y)*(C-T);if(H===0)return null;const P=((V-C)*(E-_)-($-E)*(C-T))/H;return[V+P*(w-V),$+P*(y-$)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let p=0,V=0;if(d===0)p=u[0].x*s[l],V=u[0].y*s[l];else if(d===e.length-1)p=u[u.length-1].x*s[l],V=u[u.length-1].y*s[l];else{const $=u[d-1],w=u[d],y=e[d-1],C=e[d+1],E=[y[0]+$.x*s[l],y[1]+$.y*s[l]],T=[f[0]+$.x*s[l],f[1]+$.y*s[l]],_=[f[0]+w.x*s[l],f[1]+w.y*s[l]],H=[C[0]+w.x*s[l],C[1]+w.y*s[l]],P=c(E,T,_,H);P?(p=P[0]-f[0],V=P[1]-f[1]):(p=($.x+w.x)/2*s[l],V=($.y+w.y)/2*s[l])}i[l].push(`${f[0]+p},${f[1]+V}`)}return i}const mo=["points","stroke"],po=["points"],Ye=3,go=x({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){Oi(C=>({c5384110:Ye}));const t=Pt(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s,inputNodeType:u}=yi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=O(()=>{if(u==="outputs"){const E=e.components[n.type].outputs[s];return{all:E?[E.type]:[]}}if(i&&n){const E=e.components[n.type].inputs[s];return{all:E?[E.type]:[]}}if(r&&n&&s)return{all:(Sn(e.inputResolverOutputs,n.id)[s]??[]).map(E=>E.type)};if(r&&n)return{all:$n(e.inputResolverOutputs,n.id).map(C=>C.type),visible:wi(e.inputResolverOutputs,n.id).map(C=>C.type)};if(i&&o){const E=e.components[i.type].outputs[a];return{all:E?[E.type]:[]}}if(r&&o)return{all:bi(e.inputResolverOutputs,r.id).flat().map(C=>C.type)};throw ki.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s}),new Error("Invalid connection")}),l=O(()=>to(c.value.all).map(C=>e.entities[C])),d=O(()=>r?c.value.visible?c.value.visible.length===0:c.value.all.length===0:!1),f=O(()=>d.value?1:l.value.length),p=C=>d.value?"#9E9E9E":l.value[C%l.value.length].meta.color??"#607D8B",V=C=>d.value?!0:c.value.visible?c.value.visible.includes(l.value[C].type):!0,$=(C,E)=>C[0]===E[0]&&C[1]===E[1],w=O(()=>{if(!e.data.points)return[];const C=[e.sourceX,e.sourceY],E=[e.targetX,e.targetY],T=[...e.data.points];return(!T[0]||!$(T[0],C))&&T.unshift(C),(!T[T.length-1]||!$(T[T.length-1],E))&&T.push(E),ho(T,Ye,f.value)}),y=C=>{const T=1/f.value;return`-${C*T}s`};return(C,E)=>(g(),R(D,null,[(g(!0),R(D,null,ie(w.value,(T,_)=>(g(),R(D,{key:`static-${_}`},[V(_)?(g(),R("polyline",{key:0,points:T.join(" "),stroke:p(_),fill:"none","stroke-width":Ye,style:{opacity:"0.8"}},null,8,mo)):B("",!0)],64))),128)),(g(!0),R(D,null,ie(w.value,(T,_)=>(g(),R(D,{key:`highlight-${_}`},[V(_)?(g(),R("polyline",{key:0,points:T.join(" "),stroke:"white",fill:"none","stroke-width":Ye,class:"highlight-polyline animated-highlight",style:ke({animationDelay:y(_)})},null,12,po)):B("",!0)],64))),128))],64))}}),vo=J(go,[["__scopeId","data-v-4bf748bc"]]);function yo(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const wo=x({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(g(),A(Lt,{variant:"flat",style:ke(m(yo)(t.selected,t.blueprintStatus)),color:"#2d2d2d"},{default:k(()=>[I(K,{class:"ma-2",size:74},{default:k(()=>n[0]||(n[0]=[L("mdi-router")])),_:1,__:[0]}),Q(t.$slots,"default")]),_:3},8,["style"]))}}),bo=x({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(g(),R(D,null,[I(m(Cn),{id:"",type:t.side==="left"?"target":"source",position:t.side==="left"?m(ot).Left:m(ot).Right,class:Ce(["handle",[t.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":t.isValidConnection},null,8,["type","position","class","is-valid-connection"]),G("div",{class:Ce(["handle-dot",[t.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:t.handleColor})},null,6)],64))}}),en=J(bo,[["__scopeId","data-v-1aff1180"]]),ko={class:"handles"},So=x({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Dt(),r=In(),a=O(()=>Vn(r.node,i));return(s,u)=>(g(),A(wo,{class:"hub-card",selected:m(o).isNodeSelected(m(r).node),"blueprint-status":m(a),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:k(()=>[Q(s.$slots,"default",{},void 0,!0),G("div",ko,[I(en,{"handle-color":"#3F51B5",side:"left","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"]),I(en,{"handle-color":"#3F51B5",side:"right","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Zl=J(So,[["__scopeId","data-v-79b30d7c"]]),$o=x({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=O(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>m(t)?(g(),R("div",{key:0,class:"selection-rectangle",style:ke(m(t))},null,4)):B("",!0)}}),Co=J($o,[["__scopeId","data-v-6118cbbb"]]);var Io={value:()=>{}};function xt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Qe(n)}function Qe(e){this._=e}function Vo(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Qe.prototype=xt.prototype={constructor:Qe,on:function(e,t){var n=this._,i=Vo(e+"",n),o,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((o=(e=i[r]).type)&&(o=Ao(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(o=(e=i[r]).type)n[o]=tn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=tn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Qe(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,r;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};function Ao(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function tn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Io,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var zt="http://www.w3.org/1999/xhtml";const nn={svg:"http://www.w3.org/2000/svg",xhtml:zt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nn.hasOwnProperty(t)?{space:nn[t],local:e}:e}function Mo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===zt&&t.documentElement.namespaceURI===zt?t.createElement(e):t.createElementNS(n,e)}}function No(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ln(e){var t=vt(e);return(t.local?No:Mo)(t)}function zo(){}function Ut(e){return e==null?zo:function(){return this.querySelector(e)}}function Eo(e){typeof e!="function"&&(e=Ut(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=new Array(a),u,c,l=0;l<a;++l)(u=r[l])&&(c=e.call(u,u.__data__,l,r))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new oe(i,this._parents)}function Ro(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Oo(){return[]}function xn(e){return e==null?Oo:function(){return this.querySelectorAll(e)}}function Bo(e){return function(){return Ro(e.apply(this,arguments))}}function To(e){typeof e=="function"?e=Bo(e):e=xn(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a=t[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(i.push(e.call(u,u.__data__,c,a)),o.push(u));return new oe(i,o)}function Un(e){return function(){return this.matches(e)}}function qn(e){return function(t){return t.matches(e)}}var Fo=Array.prototype.find;function _o(e){return function(){return Fo.call(this.children,e)}}function Ho(){return this.firstElementChild}function Po(e){return this.select(e==null?Ho:_o(typeof e=="function"?e:qn(e)))}var Do=Array.prototype.filter;function Lo(){return Array.from(this.children)}function xo(e){return function(){return Do.call(this.children,e)}}function Uo(e){return this.selectAll(e==null?Lo:xo(typeof e=="function"?e:qn(e)))}function qo(e){typeof e!="function"&&(e=Un(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new oe(i,this._parents)}function Xn(e){return new Array(e.length)}function Xo(){return new oe(this._enter||this._groups.map(Xn),this._parents)}function lt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lt.prototype={constructor:lt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Yo(e){return function(){return e}}function Go(e,t,n,i,o,r){for(var a=0,s,u=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new lt(e,r[a]);for(;a<u;++a)(s=t[a])&&(o[a]=s)}function Wo(e,t,n,i,o,r,a){var s,u,c=new Map,l=t.length,d=r.length,f=new Array(l),p;for(s=0;s<l;++s)(u=t[s])&&(f[s]=p=a.call(u,u.__data__,s,t)+"",c.has(p)?o[s]=u:c.set(p,u));for(s=0;s<d;++s)p=a.call(e,r[s],s,r)+"",(u=c.get(p))?(i[s]=u,u.__data__=r[s],c.delete(p)):n[s]=new lt(e,r[s]);for(s=0;s<l;++s)(u=t[s])&&c.get(f[s])===u&&(o[s]=u)}function jo(e){return e.__data__}function Ko(e,t){if(!arguments.length)return Array.from(this,jo);var n=t?Wo:Go,i=this._parents,o=this._groups;typeof e!="function"&&(e=Yo(e));for(var r=o.length,a=new Array(r),s=new Array(r),u=new Array(r),c=0;c<r;++c){var l=i[c],d=o[c],f=d.length,p=Jo(e.call(l,l&&l.__data__,c,i)),V=p.length,$=s[c]=new Array(V),w=a[c]=new Array(V),y=u[c]=new Array(f);n(l,d,$,w,y,p,t);for(var C=0,E=0,T,_;C<V;++C)if(T=$[C]){for(C>=E&&(E=C+1);!(_=w[E])&&++E<V;);T._next=_||null}}return a=new oe(a,i),a._enter=s,a._exit=u,a}function Jo(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Zo(){return new oe(this._exit||this._groups.map(Xn),this._parents)}function Qo(e,t,n){var i=this.enter(),o=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?r.remove():n(r),i&&o?i.merge(o).order():o}function er(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),u=0;u<a;++u)for(var c=n[u],l=i[u],d=c.length,f=s[u]=new Array(d),p,V=0;V<d;++V)(p=c[V]||l[V])&&(f[V]=p);for(;u<o;++u)s[u]=n[u];return new oe(s,this._parents)}function tr(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,r=i[o],a;--o>=0;)(a=i[o])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function nr(e){e||(e=ir);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a=n[r],s=a.length,u=o[r]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(t)}return new oe(o,this._parents).order()}function ir(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function or(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function rr(){return Array.from(this)}function ar(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function sr(){let e=0;for(const t of this)++e;return e}function lr(){return!this.node()}function ur(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],r=0,a=o.length,s;r<a;++r)(s=o[r])&&e.call(s,s.__data__,r,o);return this}function cr(e){return function(){this.removeAttribute(e)}}function dr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function fr(e,t){return function(){this.setAttribute(e,t)}}function hr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function pr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function gr(e,t){var n=vt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?dr:cr:typeof t=="function"?n.local?pr:mr:n.local?hr:fr)(n,t))}function Yn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function vr(e){return function(){this.style.removeProperty(e)}}function yr(e,t,n){return function(){this.style.setProperty(e,t,n)}}function wr(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function br(e,t,n){return arguments.length>1?this.each((t==null?vr:typeof t=="function"?wr:yr)(e,t,n??"")):Me(this.node(),e)}function Me(e,t){return e.style.getPropertyValue(t)||Yn(e).getComputedStyle(e,null).getPropertyValue(t)}function kr(e){return function(){delete this[e]}}function Sr(e,t){return function(){this[e]=t}}function $r(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Cr(e,t){return arguments.length>1?this.each((t==null?kr:typeof t=="function"?$r:Sr)(e,t)):this.node()[e]}function Gn(e){return e.trim().split(/^|\s+/)}function qt(e){return e.classList||new Wn(e)}function Wn(e){this._node=e,this._names=Gn(e.getAttribute("class")||"")}Wn.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function Kn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function Ir(e){return function(){jn(this,e)}}function Vr(e){return function(){Kn(this,e)}}function Ar(e,t){return function(){(t.apply(this,arguments)?jn:Kn)(this,e)}}function Mr(e,t){var n=Gn(e+"");if(arguments.length<2){for(var i=qt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Ar:t?Ir:Vr)(n,t))}function Nr(){this.textContent=""}function zr(e){return function(){this.textContent=e}}function Er(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Rr(e){return arguments.length?this.each(e==null?Nr:(typeof e=="function"?Er:zr)(e)):this.node().textContent}function Or(){this.innerHTML=""}function Br(e){return function(){this.innerHTML=e}}function Tr(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Fr(e){return arguments.length?this.each(e==null?Or:(typeof e=="function"?Tr:Br)(e)):this.node().innerHTML}function _r(){this.nextSibling&&this.parentNode.appendChild(this)}function Hr(){return this.each(_r)}function Pr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dr(){return this.each(Pr)}function Lr(e){var t=typeof e=="function"?e:Ln(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xr(){return null}function Ur(e,t){var n=typeof e=="function"?e:Ln(e),i=t==null?xr:typeof t=="function"?t:Ut(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function qr(){var e=this.parentNode;e&&e.removeChild(this)}function Xr(){return this.each(qr)}function Yr(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wr(e){return this.select(e?Gr:Yr)}function jr(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Kr(e){return function(t){e.call(this,t,this.__data__)}}function Jr(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Zr(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,r;n<o;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++i]=r;++i?t.length=i:delete this.__on}}}function Qr(e,t,n){return function(){var i=this.__on,o,r=Kr(t);if(i){for(var a=0,s=i.length;a<s;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),o.value=t;return}}this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function ea(e,t,n){var i=Jr(e+""),o,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(o=0,l=s[u];o<r;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?Qr:Zr,o=0;o<r;++o)this.each(s(i[o],t,n));return this}function Jn(e,t,n){var i=Yn(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function ta(e,t){return function(){return Jn(this,e,t)}}function na(e,t){return function(){return Jn(this,e,t.apply(this,arguments))}}function ia(e,t){return this.each((typeof t=="function"?na:ta)(e,t))}function*oa(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length,a;o<r;++o)(a=i[o])&&(yield a)}var Zn=[null];function oe(e,t){this._groups=e,this._parents=t}function qe(){return new oe([[document.documentElement]],Zn)}function ra(){return this}oe.prototype=qe.prototype={constructor:oe,select:Eo,selectAll:To,selectChild:Po,selectChildren:Uo,filter:qo,data:Ko,enter:Xo,exit:Zo,join:Qo,merge:er,selection:ra,order:tr,sort:nr,call:or,nodes:rr,node:ar,size:sr,empty:lr,each:ur,attr:gr,style:br,property:Cr,classed:Mr,text:Rr,html:Fr,raise:Hr,lower:Dr,append:Lr,insert:Ur,remove:Xr,clone:Wr,datum:jr,on:ea,dispatch:ia,[Symbol.iterator]:oa};function ye(e){return typeof e=="string"?new oe([[document.querySelector(e)]],[document.documentElement]):new oe([[e]],Zn)}function aa(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ge(e,t){if(e=aa(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Et={capture:!0,passive:!1};function Rt(e){e.preventDefault(),e.stopImmediatePropagation()}function sa(e){var t=e.document.documentElement,n=ye(e).on("dragstart.drag",Rt,Et);"onselectstart"in t?n.on("selectstart.drag",Rt,Et):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function la(e,t){var n=e.document.documentElement,i=ye(e).on("dragstart.drag",null);t&&(i.on("click.drag",Rt,Et),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Xt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Qn(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Xe(){}var Pe=.7,ut=1/Pe,Ae="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ua=/^#([0-9a-f]{3,8})$/,ca=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),da=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),fa=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${De}\\)$`),ha=new RegExp(`^rgba\\(${ue},${ue},${ue},${De}\\)$`),ma=new RegExp(`^hsl\\(${De},${ue},${ue}\\)$`),pa=new RegExp(`^hsla\\(${De},${ue},${ue},${De}\\)$`),on={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};Xt(Xe,Le,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHex8:ga,formatHsl:va,formatRgb:an,toString:an});function rn(){return this.rgb().formatHex()}function ga(){return this.rgb().formatHex8()}function va(){return ei(this).formatHsl()}function an(){return this.rgb().formatRgb()}function Le(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ua.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sn(t):n===3?new ee(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ge(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ge(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ca.exec(e))?new ee(t[1],t[2],t[3],1):(t=da.exec(e))?new ee(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fa.exec(e))?Ge(t[1],t[2],t[3],t[4]):(t=ha.exec(e))?Ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ma.exec(e))?cn(t[1],t[2]/100,t[3]/100,1):(t=pa.exec(e))?cn(t[1],t[2]/100,t[3]/100,t[4]):on.hasOwnProperty(e)?sn(on[e]):e==="transparent"?new ee(NaN,NaN,NaN,0):null}function sn(e){return new ee(e>>16&255,e>>8&255,e&255,1)}function Ge(e,t,n,i){return i<=0&&(e=t=n=NaN),new ee(e,t,n,i)}function ya(e){return e instanceof Xe||(e=Le(e)),e?(e=e.rgb(),new ee(e.r,e.g,e.b,e.opacity)):new ee}function Ot(e,t,n,i){return arguments.length===1?ya(e):new ee(e,t,n,i??1)}function ee(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Xt(ee,Ot,Qn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pe:Math.pow(Pe,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ee($e(this.r),$e(this.g),$e(this.b),ct(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:ln,formatHex:ln,formatHex8:wa,formatRgb:un,toString:un}));function ln(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}`}function wa(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}${Se((isNaN(this.opacity)?1:this.opacity)*255)}`}function un(){const e=ct(this.opacity);return`${e===1?"rgb(":"rgba("}${$e(this.r)}, ${$e(this.g)}, ${$e(this.b)}${e===1?")":`, ${e})`}`}function ct(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $e(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Se(e){return e=$e(e),(e<16?"0":"")+e.toString(16)}function cn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new se(e,t,n,i)}function ei(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);if(e instanceof Xe||(e=Le(e)),!e)return new se;if(e instanceof se)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,u=(r+o)/2;return s?(t===r?a=(n-i)/s+(n<i)*6:n===r?a=(i-t)/s+2:a=(t-n)/s+4,s/=u<.5?r+o:2-r-o,a*=60):s=u>0&&u<1?0:a,new se(a,s,u,e.opacity)}function ba(e,t,n,i){return arguments.length===1?ei(e):new se(e,t,n,i??1)}function se(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Xt(se,ba,Qn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pe:Math.pow(Pe,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new ee(It(e>=240?e-240:e+120,o,i),It(e,o,i),It(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new se(dn(this.h),We(this.s),We(this.l),ct(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=ct(this.opacity);return`${e===1?"hsl(":"hsla("}${dn(this.h)}, ${We(this.s)*100}%, ${We(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dn(e){return e=(e||0)%360,e<0?e+360:e}function We(e){return Math.max(0,Math.min(1,e||0))}function It(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ti=e=>()=>e;function ka(e,t){return function(n){return e+n*t}}function Sa(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function $a(e){return(e=+e)==1?ni:function(t,n){return n-t?Sa(t,n,e):ti(isNaN(t)?n:t)}}function ni(e,t){var n=t-e;return n?ka(e,n):ti(isNaN(e)?t:e)}const fn=function e(t){var n=$a(t);function i(o,r){var a=n((o=Ot(o)).r,(r=Ot(r)).r),s=n(o.g,r.g),u=n(o.b,r.b),c=ni(o.opacity,r.opacity);return function(l){return o.r=a(l),o.g=s(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i}(1);function ve(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Bt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vt=new RegExp(Bt.source,"g");function Ca(e){return function(){return e}}function Ia(e){return function(t){return e(t)+""}}function Va(e,t){var n=Bt.lastIndex=Vt.lastIndex=0,i,o,r,a=-1,s=[],u=[];for(e=e+"",t=t+"";(i=Bt.exec(e))&&(o=Vt.exec(t));)(r=o.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:ve(i,o)})),n=Vt.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?Ia(u[0].x):Ca(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)s[(d=u[l]).i]=d.x(c);return s.join("")})}var hn=180/Math.PI,Tt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ii(e,t,n,i,o,r){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),e*i<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*hn,skewX:Math.atan(u)*hn,scaleX:a,scaleY:s}}var je;function Aa(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tt:ii(t.a,t.b,t.c,t.d,t.e,t.f)}function Ma(e){return e==null||(je||(je=document.createElementNS("http://www.w3.org/2000/svg","g")),je.setAttribute("transform",e),!(e=je.transform.baseVal.consolidate()))?Tt:(e=e.matrix,ii(e.a,e.b,e.c,e.d,e.e,e.f))}function oi(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function r(c,l,d,f,p,V){if(c!==d||l!==f){var $=p.push("translate(",null,t,null,n);V.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function a(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:ve(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function s(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:ve(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,p,V){if(c!==d||l!==f){var $=p.push(o(p)+"scale(",null,",",null,")");V.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d!==1||f!==1)&&p.push(o(p)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),r(c.translateX,c.translateY,l.translateX,l.translateY,d,f),a(c.rotate,l.rotate,d,f),s(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(p){for(var V=-1,$=f.length,w;++V<$;)d[(w=f[V]).i]=w.x(p);return d.join("")}}}var Na=oi(Aa,"px, ","px)","deg)"),za=oi(Ma,", ",")",")"),Ea=1e-12;function mn(e){return((e=Math.exp(e))+1/e)/2}function Ra(e){return((e=Math.exp(e))-1/e)/2}function Oa(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ba=function e(t,n,i){function o(r,a){var s=r[0],u=r[1],c=r[2],l=a[0],d=a[1],f=a[2],p=l-s,V=d-u,$=p*p+V*V,w,y;if($<Ea)y=Math.log(f/c)/t,w=function(P){return[s+P*p,u+P*V,c*Math.exp(t*P*y)]};else{var C=Math.sqrt($),E=(f*f-c*c+i*$)/(2*c*n*C),T=(f*f-c*c-i*$)/(2*f*n*C),_=Math.log(Math.sqrt(E*E+1)-E),H=Math.log(Math.sqrt(T*T+1)-T);y=(H-_)/t,w=function(P){var te=P*y,de=mn(_),X=c/(n*C)*(de*Oa(t*te+_)-Ra(_));return[s+X*p,u+X*V,c*de/mn(t*te+_)]}}return w.duration=y*1e3*t/Math.SQRT2,w}return o.rho=function(r){var a=Math.max(.001,+r),s=a*a,u=s*s;return e(a,s,u)},o}(Math.SQRT2,2,4);var Ne=0,Be=0,Ee=0,ri=1e3,dt,Te,ft=0,Ie=0,yt=0,xe=typeof performance=="object"&&performance.now?performance:Date,ai=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yt(){return Ie||(ai(Ta),Ie=xe.now()+yt)}function Ta(){Ie=0}function ht(){this._call=this._time=this._next=null}ht.prototype=si.prototype={constructor:ht,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yt():+n)+(t==null?0:+t),!this._next&&Te!==this&&(Te?Te._next=this:dt=this,Te=this),this._call=e,this._time=n,Ft()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ft())}};function si(e,t,n){var i=new ht;return i.restart(e,t,n),i}function Fa(){Yt(),++Ne;for(var e=dt,t;e;)(t=Ie-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ne}function pn(){Ie=(ft=xe.now())+yt,Ne=Be=0;try{Fa()}finally{Ne=0,Ha(),Ie=0}}function _a(){var e=xe.now(),t=e-ft;t>ri&&(yt-=t,ft=e)}function Ha(){for(var e,t=dt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:dt=n);Te=e,Ft(i)}function Ft(e){if(!Ne){Be&&(Be=clearTimeout(Be));var t=e-Ie;t>24?(e<1/0&&(Be=setTimeout(pn,e-xe.now()-yt)),Ee&&(Ee=clearInterval(Ee))):(Ee||(ft=xe.now(),Ee=setInterval(_a,ri)),Ne=1,ai(pn))}}function gn(e,t,n){var i=new ht;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var Pa=xt("start","end","cancel","interrupt"),Da=[],li=0,vn=1,_t=2,et=3,yn=4,Ht=5,tt=6;function wt(e,t,n,i,o,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;La(e,n,{name:t,index:i,group:o,on:Pa,tween:Da,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:li})}function Gt(e,t){var n=le(e,t);if(n.state>li)throw new Error("too late; already scheduled");return n}function ce(e,t){var n=le(e,t);if(n.state>et)throw new Error("too late; already running");return n}function le(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function La(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=si(r,0,n.time);function r(c){n.state=vn,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,d,f,p;if(n.state!==vn)return u();for(l in i)if(p=i[l],p.name===n.name){if(p.state===et)return gn(a);p.state===yn?(p.state=tt,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[l]):+l<t&&(p.state=tt,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[l])}if(gn(function(){n.state===et&&(n.state=yn,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=_t,n.on.call("start",e,e.__data__,n.index,n.group),n.state===_t){for(n.state=et,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(p=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Ht,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Ht&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=tt,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function nt(e,t){var n=e.__transition,i,o,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){r=!1;continue}o=i.state>_t&&i.state<Ht,i.state=tt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}r&&delete e.__transition}}function xa(e){return this.each(function(){nt(this,e)})}function Ua(e,t){var n,i;return function(){var o=ce(this,e),r=o.tween;if(r!==n){i=n=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function qa(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var r=ce(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=s;break}u===c&&o.push(s)}r.tween=o}}function Xa(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),n).tween,o=0,r=i.length,a;o<r;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?Ua:qa)(n,e,t))}function Wt(e,t,n){var i=e._id;return e.each(function(){var o=ce(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return le(o,i).value[t]}}function ui(e,t){var n;return(typeof t=="number"?ve:t instanceof Le?fn:(n=Le(t))?(t=n,fn):Va)(e,t)}function Ya(e){return function(){this.removeAttribute(e)}}function Ga(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wa(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttribute(e);return a===o?null:a===i?r:r=t(i=a,n)}}function ja(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?r:r=t(i=a,n)}}function Ka(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Ja(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Za(e,t){var n=vt(e),i=n==="transform"?za:ui;return this.attrTween(e,typeof t=="function"?(n.local?Ja:Ka)(n,i,Wt(this,"attr."+e,t)):t==null?(n.local?Ga:Ya)(n):(n.local?ja:Wa)(n,i,t))}function Qa(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function es(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ts(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&es(e,r)),n}return o._value=t,o}function ns(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Qa(e,r)),n}return o._value=t,o}function is(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=vt(e);return this.tween(n,(i.local?ts:ns)(i,t))}function os(e,t){return function(){Gt(this,e).delay=+t.apply(this,arguments)}}function rs(e,t){return t=+t,function(){Gt(this,e).delay=t}}function as(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?os:rs)(t,e)):le(this.node(),t).delay}function ss(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function ls(e,t){return t=+t,function(){ce(this,e).duration=t}}function us(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ss:ls)(t,e)):le(this.node(),t).duration}function cs(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function ds(e){var t=this._id;return arguments.length?this.each(cs(t,e)):le(this.node(),t).ease}function fs(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ce(this,e).ease=n}}function hs(e){if(typeof e!="function")throw new Error;return this.each(fs(this._id,e))}function ms(e){typeof e!="function"&&(e=Un(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new pe(i,this._parents,this._name,this._id)}function ps(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var u=t[s],c=n[s],l=u.length,d=a[s]=new Array(l),f,p=0;p<l;++p)(f=u[p]||c[p])&&(d[p]=f);for(;s<i;++s)a[s]=t[s];return new pe(a,this._parents,this._name,this._id)}function gs(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function vs(e,t,n){var i,o,r=gs(t)?Gt:ce;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}function ys(e,t){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(e):this.each(vs(n,e,t))}function ws(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function bs(){return this.on("end.remove",ws(this._id))}function ks(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ut(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s=i[a],u=s.length,c=r[a]=new Array(u),l,d,f=0;f<u;++f)(l=s[f])&&(d=e.call(l,l.__data__,f,s))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,wt(c[f],t,n,f,c,le(l,n)));return new pe(r,this._parents,t,n)}function Ss(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xn(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var u=i[s],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),p,V=le(l,n),$=0,w=f.length;$<w;++$)(p=f[$])&&wt(p,t,n,$,f,V);r.push(f),a.push(l)}return new pe(r,a,t,n)}var $s=qe.prototype.constructor;function Cs(){return new $s(this._groups,this._parents)}function Is(e,t){var n,i,o;return function(){var r=Me(this,e),a=(this.style.removeProperty(e),Me(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}function ci(e){return function(){this.style.removeProperty(e)}}function Vs(e,t,n){var i,o=n+"",r;return function(){var a=Me(this,e);return a===o?null:a===i?r:r=t(i=a,n)}}function As(e,t,n){var i,o,r;return function(){var a=Me(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Me(this,e))),a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s))}}function Ms(e,t){var n,i,o,r="style."+t,a="end."+r,s;return function(){var u=ce(this,e),c=u.on,l=u.value[r]==null?s||(s=ci(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(a,o=l),u.on=i}}function Ns(e,t,n){var i=(e+="")=="transform"?Na:ui;return t==null?this.styleTween(e,Is(e,i)).on("end.style."+e,ci(e)):typeof t=="function"?this.styleTween(e,As(e,i,Wt(this,"style."+e,t))).each(Ms(this._id,e)):this.styleTween(e,Vs(e,i,t),n).on("end.style."+e,null)}function zs(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Es(e,t,n){var i,o;function r(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&zs(e,a,n)),i}return r._value=t,r}function Rs(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Es(e,t,n??""))}function Os(e){return function(){this.textContent=e}}function Bs(e){return function(){var t=e(this);this.textContent=t??""}}function Ts(e){return this.tween("text",typeof e=="function"?Bs(Wt(this,"text",e)):Os(e==null?"":e+""))}function Fs(e){return function(t){this.textContent=e.call(this,t)}}function _s(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Fs(o)),t}return i._value=e,i}function Hs(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,_s(e))}function Ps(){for(var e=this._name,t=this._id,n=di(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=le(u,t);wt(u,e,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new pe(i,this._parents,e,n)}function Ds(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(r,a){var s={value:a},u={value:function(){--o===0&&r()}};n.each(function(){var c=ce(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),c.on=t}),o===0&&r()})}var Ls=0;function pe(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function di(){return++Ls}var fe=qe.prototype;pe.prototype={constructor:pe,select:ks,selectAll:Ss,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:ms,merge:ps,selection:Cs,transition:Ps,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:ys,attr:Za,attrTween:is,style:Ns,styleTween:Rs,text:Ts,textTween:Hs,remove:bs,tween:Xa,delay:as,duration:us,ease:ds,easeVarying:hs,end:Ds,[Symbol.iterator]:fe[Symbol.iterator]};function xs(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Us={time:null,delay:0,duration:250,ease:xs};function qs(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Xs(e){var t,n;e instanceof pe?(t=e._id,e=e._name):(t=di(),(n=Us).time=Yt(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&wt(u,e,t,c,a,n||qs(u,t));return new pe(i,this._parents,e,t)}qe.prototype.interrupt=xa;qe.prototype.transition=Xs;const Ke=e=>()=>e;function Ys(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function me(e,t,n){this.k=e,this.x=t,this.y=n}me.prototype={constructor:me,scale:function(e){return e===1?this:new me(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new me(this.k,this.x+this.k*e,this.y+this.k*t)},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 me(1,0,0);me.prototype;function At(e){e.stopImmediatePropagation()}function Re(e){e.preventDefault(),e.stopImmediatePropagation()}function Gs(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ws(){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 wn(){return this.__zoom||jt}function js(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ks(){return navigator.maxTouchPoints||"ontouchstart"in this}function Js(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Zs(){var e=Gs,t=Ws,n=Js,i=js,o=Ks,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Ba,c=xt("start","zoom","end"),l,d,f,p=500,V=150,$=0,w=10;function y(h){h.property("__zoom",wn).on("wheel.zoom",te,{passive:!1}).on("mousedown.zoom",de).on("dblclick.zoom",X).filter(o).on("touchstart.zoom",kt).on("touchmove.zoom",St).on("touchend.zoom touchcancel.zoom",$t).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(h,N,v,z){var b=h.selection?h.selection():h;b.property("__zoom",wn),h!==b?_(h,N,v,z):b.interrupt().each(function(){H(this,arguments).event(z).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},y.scaleBy=function(h,N,v,z){y.scaleTo(h,function(){var b=this.__zoom.k,M=typeof N=="function"?N.apply(this,arguments):N;return b*M},v,z)},y.scaleTo=function(h,N,v,z){y.transform(h,function(){var b=t.apply(this,arguments),M=this.__zoom,S=v==null?T(b):typeof v=="function"?v.apply(this,arguments):v,F=M.invert(S),U=typeof N=="function"?N.apply(this,arguments):N;return n(E(C(M,U),S,F),b,a)},v,z)},y.translateBy=function(h,N,v,z){y.transform(h,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),a)},null,z)},y.translateTo=function(h,N,v,z,b){y.transform(h,function(){var M=t.apply(this,arguments),S=this.__zoom,F=z==null?T(M):typeof z=="function"?z.apply(this,arguments):z;return n(jt.translate(F[0],F[1]).scale(S.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof v=="function"?-v.apply(this,arguments):-v),M,a)},z,b)};function C(h,N){return N=Math.max(r[0],Math.min(r[1],N)),N===h.k?h:new me(N,h.x,h.y)}function E(h,N,v){var z=N[0]-v[0]*h.k,b=N[1]-v[1]*h.k;return z===h.x&&b===h.y?h:new me(h.k,z,b)}function T(h){return[(+h[0][0]+ +h[1][0])/2,(+h[0][1]+ +h[1][1])/2]}function _(h,N,v,z){h.on("start.zoom",function(){H(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(z).end()}).tween("zoom",function(){var b=this,M=arguments,S=H(b,M).event(z),F=t.apply(b,M),U=v==null?T(F):typeof v=="function"?v.apply(b,M):v,Y=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),q=b.__zoom,W=typeof N=="function"?N.apply(b,M):N,re=u(q.invert(U).concat(Y/q.k),W.invert(U).concat(Y/W.k));return function(ne){if(ne===1)ne=W;else{var ae=re(ne),Ct=Y/ae[2];ne=new me(Ct,U[0]-ae[0]*Ct,U[1]-ae[1]*Ct)}S.zoom(null,ne)}})}function H(h,N,v){return!v&&h.__zooming||new P(h,N)}function P(h,N){this.that=h,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(h,N),this.taps=0}P.prototype={event:function(h){return h&&(this.sourceEvent=h),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(h,N){return this.mouse&&h!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&h!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&h!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(h){var N=ye(this.that).datum();c.call(h,this.that,new Ys(h,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:c}),N)}};function te(h,...N){if(!e.apply(this,arguments))return;var v=H(this,N).event(h),z=this.__zoom,b=Math.max(r[0],Math.min(r[1],z.k*Math.pow(2,i.apply(this,arguments)))),M=ge(h);if(v.wheel)(v.mouse[0][0]!==M[0]||v.mouse[0][1]!==M[1])&&(v.mouse[1]=z.invert(v.mouse[0]=M)),clearTimeout(v.wheel);else{if(z.k===b)return;v.mouse=[M,z.invert(M)],nt(this),v.start()}Re(h),v.wheel=setTimeout(S,V),v.zoom("mouse",n(E(C(z,b),v.mouse[0],v.mouse[1]),v.extent,a));function S(){v.wheel=null,v.end()}}function de(h,...N){if(f||!e.apply(this,arguments))return;var v=h.currentTarget,z=H(this,N,!0).event(h),b=ye(h.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",Y,!0),M=ge(h,v),S=h.clientX,F=h.clientY;sa(h.view),At(h),z.mouse=[M,this.__zoom.invert(M)],nt(this),z.start();function U(q){if(Re(q),!z.moved){var W=q.clientX-S,re=q.clientY-F;z.moved=W*W+re*re>$}z.event(q).zoom("mouse",n(E(z.that.__zoom,z.mouse[0]=ge(q,v),z.mouse[1]),z.extent,a))}function Y(q){b.on("mousemove.zoom mouseup.zoom",null),la(q.view,z.moved),Re(q),z.event(q).end()}}function X(h,...N){if(e.apply(this,arguments)){var v=this.__zoom,z=ge(h.changedTouches?h.changedTouches[0]:h,this),b=v.invert(z),M=v.k*(h.shiftKey?.5:2),S=n(E(C(v,M),z,b),t.apply(this,N),a);Re(h),s>0?ye(this).transition().duration(s).call(_,S,z,h):ye(this).call(y.transform,S,z,h)}}function kt(h,...N){if(e.apply(this,arguments)){var v=h.touches,z=v.length,b=H(this,N,h.changedTouches.length===z).event(h),M,S,F,U;for(At(h),S=0;S<z;++S)F=v[S],U=ge(F,this),U=[U,this.__zoom.invert(U),F.identifier],b.touch0?!b.touch1&&b.touch0[2]!==U[2]&&(b.touch1=U,b.taps=0):(b.touch0=U,M=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(b.taps<2&&(d=U[0],l=setTimeout(function(){l=null},p)),nt(this),b.start())}}function St(h,...N){if(this.__zooming){var v=H(this,N).event(h),z=h.changedTouches,b=z.length,M,S,F,U;for(Re(h),M=0;M<b;++M)S=z[M],F=ge(S,this),v.touch0&&v.touch0[2]===S.identifier?v.touch0[0]=F:v.touch1&&v.touch1[2]===S.identifier&&(v.touch1[0]=F);if(S=v.that.__zoom,v.touch1){var Y=v.touch0[0],q=v.touch0[1],W=v.touch1[0],re=v.touch1[1],ne=(ne=W[0]-Y[0])*ne+(ne=W[1]-Y[1])*ne,ae=(ae=re[0]-q[0])*ae+(ae=re[1]-q[1])*ae;S=C(S,Math.sqrt(ne/ae)),F=[(Y[0]+W[0])/2,(Y[1]+W[1])/2],U=[(q[0]+re[0])/2,(q[1]+re[1])/2]}else if(v.touch0)F=v.touch0[0],U=v.touch0[1];else return;v.zoom("touch",n(E(S,F,U),v.extent,a))}}function $t(h,...N){if(this.__zooming){var v=H(this,N).event(h),z=h.changedTouches,b=z.length,M,S;for(At(h),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),M=0;M<b;++M)S=z[M],v.touch0&&v.touch0[2]===S.identifier?delete v.touch0:v.touch1&&v.touch1[2]===S.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(S=ge(S,this),Math.hypot(d[0]-S[0],d[1]-S[1])<w)){var F=ye(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(h){return arguments.length?(i=typeof h=="function"?h:Ke(+h),y):i},y.filter=function(h){return arguments.length?(e=typeof h=="function"?h:Ke(!!h),y):e},y.touchable=function(h){return arguments.length?(o=typeof h=="function"?h:Ke(!!h),y):o},y.extent=function(h){return arguments.length?(t=typeof h=="function"?h:Ke([[+h[0][0],+h[0][1]],[+h[1][0],+h[1][1]]]),y):t},y.scaleExtent=function(h){return arguments.length?(r[0]=+h[0],r[1]=+h[1],y):[r[0],r[1]]},y.translateExtent=function(h){return arguments.length?(a[0][0]=+h[0][0],a[1][0]=+h[1][0],a[0][1]=+h[0][1],a[1][1]=+h[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(h){return arguments.length?(n=h,y):n},y.duration=function(h){return arguments.length?(s=+h,y):s},y.interpolate=function(h){return arguments.length?(u=h,y):u},y.on=function(){var h=c.on.apply(c,arguments);return h===c?y:h},y.clickDistance=function(h){return arguments.length?($=(h=+h)*h,y):Math.sqrt($)},y.tapDistance=function(h){return arguments.length?(w=+h,y):w},y}const fi=Symbol("MiniMapSlots"),Qs=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],el={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},tl=x({...el,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=Fi(fi),o=En(),r=Fe(()=>o.style??{});function a(d){t("click",d)}function s(d){t("dblclick",d)}function u(d){t("mouseenter",d)}function c(d){t("mousemove",d)}function l(d){t("mouseleave",d)}return(d,f)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(g(),R(D,{key:0},[m(i)[`node-${n.type}`]?(g(),A(_i(m(i)[`node-${n.type}`]),Ve(rt({key:0},{...n,...d.$attrs})),null,16)):(g(),R("rect",rt({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||r.value.background||r.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:a,onDblclick:s,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,Qs))],64)):B("",!0)}}),nl=["width","height","viewBox","aria-labelledby"],il=["id"],ol=["d","fill","stroke","stroke-width"],rl={name:"MiniMap",compatConfig:{MODE:3}},al=x({...rl,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:10},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Bi(),i=En(),o=200,r=150,{id:a,edges:s,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:p,getNodesInitialized:V}=Pt(),$=_e();Hi(fi,n);const w=Fe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),y=Fe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??r}),C=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",E=O(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=O(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),_=O(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),H=O(()=>Si(V.value.filter(b=>!b.hidden))),P=O(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),te=O(()=>V.value&&V.value.length?$i(H.value,P.value):P.value),de=O(()=>{const b=te.value.width/w.value,M=te.value.height/y.value;return Math.max(b,M)}),X=O(()=>{const b=de.value*w.value,M=de.value*y.value,S=e.offsetScale*de.value;return{offset:S,x:te.value.x-(b-te.value.width)/2-S,y:te.value.y-(M-te.value.height)/2-S,width:b+S*2,height:M+S*2}}),kt=O(()=>!X.value.x||!X.value.y?"":`
|
|
1
|
+
import{ad as kn,_ as J,at as Pt,au as yi,av as Sn,aw as wi,ax as $n,ay as bi,l as ki,az as Cn,aA as ot,aB as Dt,aC as In,aD as Vn,aE as Si,aF as $i,aG as Ze,aH as ze,aI as Ci,aJ as Ii,am as Vi,aK as An,aL as Ai,i as Mt,aM as Kt,aN as Mi,aO as Ni,I as Mn,aP as Nn,ao as zi,aQ as Ei,aR as Ri,aS as Jt}from"./20zRBBOT.js";import{F as x,j as O,Z as A,W as g,ai as Z,G as m,a1 as k,X as I,a0 as K,a2 as L,a3 as j,t as Fe,L as R,ab as Q,$ as G,_ as B,aa as ke,H as zn,a9 as D,af as ie,b3 as Oi,aE as Lt,ac as Ce,ae as Bi,a7 as En,r as _e,q as Ti,i as Fi,ak as Ve,a8 as rt,a5 as _i,I as Hi,b4 as Pi,al as Oe,aT as Rn,aO as we,av as Ue,az as On,b5 as Di,b6 as Li,aK as Bn,b7 as xi,w as Ui,a as Tn,aw as Fn,aA as be,ay as pt,ax as qi,b as Nt,aM as _n,aC as gt,aD as He,n as at,aI as Xi,a_ as Yi,aH as Gi,aP as st,aS as Wi,aj as ji,aX as Ki}from"./koatKMQr.js";import{C as Zt,s as Ji,a as Hn,_ as Zi}from"./BTT16DZE.js";import"./SQImb3Xm.js";import{V as Qt}from"./rwNeRj8A.js";import{_ as Qi}from"./BhJD15Lv.js";function eo(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return Zt(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>Zt(o,i),i)}throw new Error("Wrong number of arguments")}function to(...e){return eo(no,e)}function no(){let e=new Set;return t=>e.has(t)?Ji:(e.add(t),{done:!1,hasNext:!0,next:t})}const io=x({__name:"InlineCopyButton",props:{content:{}},setup(e){const{copy:t,copied:n}=kn(),i=O(()=>n.value?"mdi-check":"mdi-content-copy");return(o,r)=>(g(),A(Z,{size:"small",variant:"text",class:"copy-button d-flex ml-1",onClick:r[0]||(r[0]=a=>m(t)(o.content))},{default:k(()=>[I(K,{size:16},{default:k(()=>[L(j(m(i)),1)]),_:1})]),_:1}))}}),oo=J(io,[["__scopeId","data-v-9df8c2df"]]);var he=(e=>(e.Lines="lines",e.Dots="dots",e))(he||{});const Pn=function({dimensions:e,size:t,color:n}){return zn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Dn=function({radius:e,color:t}){return zn("circle",{cx:e,cy:e,r:e,fill:t})};he.Lines+"",he.Dots+"";const ro={[he.Dots]:"#81818a",[he.Lines]:"#eee"},ao=["id","x","y","width","height","patternTransform"],so={key:2,height:"100",width:"100"},lo=["fill"],uo=["x","y","fill"],co={name:"Background",compatConfig:{MODE:3}},fo=x({...co,props:{id:{},variant:{default:()=>he.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:t,viewport:n}=Pt(),i=O(()=>{const a=n.value.zoom,[s,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*a||1,u*a||1],l=e.size*a,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],p=[d*a||1+c[0]/2,f*a||1+c[1]/2];return{scaledGap:c,offset:p,size:l}}),o=Fe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=Fe(()=>e.color||e.patternColor||ro[e.variant||he.Dots]);return(a,s)=>(g(),R("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[Q(a.$slots,"pattern-container",{id:o.value},()=>[G("pattern",{id:o.value,x:m(n).x%i.value.scaledGap[0],y:m(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Q(a.$slots,"pattern",{},()=>[a.variant===m(he).Lines?(g(),A(m(Pn),{key:0,size:a.lineWidth,color:r.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===m(he).Dots?(g(),A(m(Dn),{key:1,color:r.value,radius:i.value.size/2},null,8,["color","radius"])):B("",!0),a.bgColor?(g(),R("svg",so,[G("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,lo)])):B("",!0)])],8,ao)]),G("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,uo),Q(a.$slots,"default",{id:o.value})],4))}});function ho(e,t,n){const i=Array.from({length:n},()=>[]),o=t,a=-(o*(n-1))/2,s=Array.from({length:n},(l,d)=>a+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],p=f[0]-d[0],V=f[1]-d[1],$=Math.sqrt(p*p+V*V);let w=-V,y=p;$!==0&&(w/=$,y/=$),u.push({x:w,y})}function c(l,d,f,p){const V=l[0],$=l[1],w=d[0],y=d[1],C=f[0],E=f[1],T=p[0],_=p[1],H=(V-w)*(E-_)-($-y)*(C-T);if(H===0)return null;const P=((V-C)*(E-_)-($-E)*(C-T))/H;return[V+P*(w-V),$+P*(y-$)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let p=0,V=0;if(d===0)p=u[0].x*s[l],V=u[0].y*s[l];else if(d===e.length-1)p=u[u.length-1].x*s[l],V=u[u.length-1].y*s[l];else{const $=u[d-1],w=u[d],y=e[d-1],C=e[d+1],E=[y[0]+$.x*s[l],y[1]+$.y*s[l]],T=[f[0]+$.x*s[l],f[1]+$.y*s[l]],_=[f[0]+w.x*s[l],f[1]+w.y*s[l]],H=[C[0]+w.x*s[l],C[1]+w.y*s[l]],P=c(E,T,_,H);P?(p=P[0]-f[0],V=P[1]-f[1]):(p=($.x+w.x)/2*s[l],V=($.y+w.y)/2*s[l])}i[l].push(`${f[0]+p},${f[1]+V}`)}return i}const mo=["points","stroke"],po=["points"],Ye=3,go=x({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){Oi(C=>({c5384110:Ye}));const t=Pt(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s,inputNodeType:u}=yi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=O(()=>{if(u==="outputs"){const E=e.components[n.type].outputs[s];return{all:E?[E.type]:[]}}if(i&&n){const E=e.components[n.type].inputs[s];return{all:E?[E.type]:[]}}if(r&&n&&s)return{all:(Sn(e.inputResolverOutputs,n.id)[s]??[]).map(E=>E.type)};if(r&&n)return{all:$n(e.inputResolverOutputs,n.id).map(C=>C.type),visible:wi(e.inputResolverOutputs,n.id).map(C=>C.type)};if(i&&o){const E=e.components[i.type].outputs[a];return{all:E?[E.type]:[]}}if(r&&o)return{all:bi(e.inputResolverOutputs,r.id).flat().map(C=>C.type)};throw ki.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s}),new Error("Invalid connection")}),l=O(()=>to(c.value.all).map(C=>e.entities[C])),d=O(()=>r?c.value.visible?c.value.visible.length===0:c.value.all.length===0:!1),f=O(()=>d.value?1:l.value.length),p=C=>d.value?"#9E9E9E":l.value[C%l.value.length].meta.color??"#607D8B",V=C=>d.value?!0:c.value.visible?c.value.visible.includes(l.value[C].type):!0,$=(C,E)=>C[0]===E[0]&&C[1]===E[1],w=O(()=>{if(!e.data.points)return[];const C=[e.sourceX,e.sourceY],E=[e.targetX,e.targetY],T=[...e.data.points];return(!T[0]||!$(T[0],C))&&T.unshift(C),(!T[T.length-1]||!$(T[T.length-1],E))&&T.push(E),ho(T,Ye,f.value)}),y=C=>{const T=1/f.value;return`-${C*T}s`};return(C,E)=>(g(),R(D,null,[(g(!0),R(D,null,ie(w.value,(T,_)=>(g(),R(D,{key:`static-${_}`},[V(_)?(g(),R("polyline",{key:0,points:T.join(" "),stroke:p(_),fill:"none","stroke-width":Ye,style:{opacity:"0.8"}},null,8,mo)):B("",!0)],64))),128)),(g(!0),R(D,null,ie(w.value,(T,_)=>(g(),R(D,{key:`highlight-${_}`},[V(_)?(g(),R("polyline",{key:0,points:T.join(" "),stroke:"white",fill:"none","stroke-width":Ye,class:"highlight-polyline animated-highlight",style:ke({animationDelay:y(_)})},null,12,po)):B("",!0)],64))),128))],64))}}),vo=J(go,[["__scopeId","data-v-4bf748bc"]]);function yo(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const wo=x({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(g(),A(Lt,{variant:"flat",style:ke(m(yo)(t.selected,t.blueprintStatus)),color:"#2d2d2d"},{default:k(()=>[I(K,{class:"ma-2",size:74},{default:k(()=>n[0]||(n[0]=[L("mdi-router")])),_:1,__:[0]}),Q(t.$slots,"default")]),_:3},8,["style"]))}}),bo=x({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(g(),R(D,null,[I(m(Cn),{id:"",type:t.side==="left"?"target":"source",position:t.side==="left"?m(ot).Left:m(ot).Right,class:Ce(["handle",[t.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":t.isValidConnection},null,8,["type","position","class","is-valid-connection"]),G("div",{class:Ce(["handle-dot",[t.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:t.handleColor})},null,6)],64))}}),en=J(bo,[["__scopeId","data-v-1aff1180"]]),ko={class:"handles"},So=x({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Dt(),r=In(),a=O(()=>Vn(r.node,i));return(s,u)=>(g(),A(wo,{class:"hub-card",selected:m(o).isNodeSelected(m(r).node),"blueprint-status":m(a),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:k(()=>[Q(s.$slots,"default",{},void 0,!0),G("div",ko,[I(en,{"handle-color":"#3F51B5",side:"left","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"]),I(en,{"handle-color":"#3F51B5",side:"right","is-valid-connection":s.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Zl=J(So,[["__scopeId","data-v-79b30d7c"]]),$o=x({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=O(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>m(t)?(g(),R("div",{key:0,class:"selection-rectangle",style:ke(m(t))},null,4)):B("",!0)}}),Co=J($o,[["__scopeId","data-v-6118cbbb"]]);var Io={value:()=>{}};function xt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Qe(n)}function Qe(e){this._=e}function Vo(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Qe.prototype=xt.prototype={constructor:Qe,on:function(e,t){var n=this._,i=Vo(e+"",n),o,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((o=(e=i[r]).type)&&(o=Ao(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(o=(e=i[r]).type)n[o]=tn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=tn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Qe(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,r;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};function Ao(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function tn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=Io,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var zt="http://www.w3.org/1999/xhtml";const nn={svg:"http://www.w3.org/2000/svg",xhtml:zt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nn.hasOwnProperty(t)?{space:nn[t],local:e}:e}function Mo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===zt&&t.documentElement.namespaceURI===zt?t.createElement(e):t.createElementNS(n,e)}}function No(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ln(e){var t=vt(e);return(t.local?No:Mo)(t)}function zo(){}function Ut(e){return e==null?zo:function(){return this.querySelector(e)}}function Eo(e){typeof e!="function"&&(e=Ut(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=new Array(a),u,c,l=0;l<a;++l)(u=r[l])&&(c=e.call(u,u.__data__,l,r))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new oe(i,this._parents)}function Ro(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Oo(){return[]}function xn(e){return e==null?Oo:function(){return this.querySelectorAll(e)}}function Bo(e){return function(){return Ro(e.apply(this,arguments))}}function To(e){typeof e=="function"?e=Bo(e):e=xn(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a=t[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(i.push(e.call(u,u.__data__,c,a)),o.push(u));return new oe(i,o)}function Un(e){return function(){return this.matches(e)}}function qn(e){return function(t){return t.matches(e)}}var Fo=Array.prototype.find;function _o(e){return function(){return Fo.call(this.children,e)}}function Ho(){return this.firstElementChild}function Po(e){return this.select(e==null?Ho:_o(typeof e=="function"?e:qn(e)))}var Do=Array.prototype.filter;function Lo(){return Array.from(this.children)}function xo(e){return function(){return Do.call(this.children,e)}}function Uo(e){return this.selectAll(e==null?Lo:xo(typeof e=="function"?e:qn(e)))}function qo(e){typeof e!="function"&&(e=Un(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new oe(i,this._parents)}function Xn(e){return new Array(e.length)}function Xo(){return new oe(this._enter||this._groups.map(Xn),this._parents)}function lt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lt.prototype={constructor:lt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Yo(e){return function(){return e}}function Go(e,t,n,i,o,r){for(var a=0,s,u=t.length,c=r.length;a<c;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new lt(e,r[a]);for(;a<u;++a)(s=t[a])&&(o[a]=s)}function Wo(e,t,n,i,o,r,a){var s,u,c=new Map,l=t.length,d=r.length,f=new Array(l),p;for(s=0;s<l;++s)(u=t[s])&&(f[s]=p=a.call(u,u.__data__,s,t)+"",c.has(p)?o[s]=u:c.set(p,u));for(s=0;s<d;++s)p=a.call(e,r[s],s,r)+"",(u=c.get(p))?(i[s]=u,u.__data__=r[s],c.delete(p)):n[s]=new lt(e,r[s]);for(s=0;s<l;++s)(u=t[s])&&c.get(f[s])===u&&(o[s]=u)}function jo(e){return e.__data__}function Ko(e,t){if(!arguments.length)return Array.from(this,jo);var n=t?Wo:Go,i=this._parents,o=this._groups;typeof e!="function"&&(e=Yo(e));for(var r=o.length,a=new Array(r),s=new Array(r),u=new Array(r),c=0;c<r;++c){var l=i[c],d=o[c],f=d.length,p=Jo(e.call(l,l&&l.__data__,c,i)),V=p.length,$=s[c]=new Array(V),w=a[c]=new Array(V),y=u[c]=new Array(f);n(l,d,$,w,y,p,t);for(var C=0,E=0,T,_;C<V;++C)if(T=$[C]){for(C>=E&&(E=C+1);!(_=w[E])&&++E<V;);T._next=_||null}}return a=new oe(a,i),a._enter=s,a._exit=u,a}function Jo(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Zo(){return new oe(this._exit||this._groups.map(Xn),this._parents)}function Qo(e,t,n){var i=this.enter(),o=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?r.remove():n(r),i&&o?i.merge(o).order():o}function er(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),u=0;u<a;++u)for(var c=n[u],l=i[u],d=c.length,f=s[u]=new Array(d),p,V=0;V<d;++V)(p=c[V]||l[V])&&(f[V]=p);for(;u<o;++u)s[u]=n[u];return new oe(s,this._parents)}function tr(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,r=i[o],a;--o>=0;)(a=i[o])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function nr(e){e||(e=ir);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a=n[r],s=a.length,u=o[r]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(t)}return new oe(o,this._parents).order()}function ir(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function or(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function rr(){return Array.from(this)}function ar(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function sr(){let e=0;for(const t of this)++e;return e}function lr(){return!this.node()}function ur(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],r=0,a=o.length,s;r<a;++r)(s=o[r])&&e.call(s,s.__data__,r,o);return this}function cr(e){return function(){this.removeAttribute(e)}}function dr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function fr(e,t){return function(){this.setAttribute(e,t)}}function hr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function pr(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function gr(e,t){var n=vt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?dr:cr:typeof t=="function"?n.local?pr:mr:n.local?hr:fr)(n,t))}function Yn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function vr(e){return function(){this.style.removeProperty(e)}}function yr(e,t,n){return function(){this.style.setProperty(e,t,n)}}function wr(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function br(e,t,n){return arguments.length>1?this.each((t==null?vr:typeof t=="function"?wr:yr)(e,t,n??"")):Me(this.node(),e)}function Me(e,t){return e.style.getPropertyValue(t)||Yn(e).getComputedStyle(e,null).getPropertyValue(t)}function kr(e){return function(){delete this[e]}}function Sr(e,t){return function(){this[e]=t}}function $r(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Cr(e,t){return arguments.length>1?this.each((t==null?kr:typeof t=="function"?$r:Sr)(e,t)):this.node()[e]}function Gn(e){return e.trim().split(/^|\s+/)}function qt(e){return e.classList||new Wn(e)}function Wn(e){this._node=e,this._names=Gn(e.getAttribute("class")||"")}Wn.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function Kn(e,t){for(var n=qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function Ir(e){return function(){jn(this,e)}}function Vr(e){return function(){Kn(this,e)}}function Ar(e,t){return function(){(t.apply(this,arguments)?jn:Kn)(this,e)}}function Mr(e,t){var n=Gn(e+"");if(arguments.length<2){for(var i=qt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Ar:t?Ir:Vr)(n,t))}function Nr(){this.textContent=""}function zr(e){return function(){this.textContent=e}}function Er(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Rr(e){return arguments.length?this.each(e==null?Nr:(typeof e=="function"?Er:zr)(e)):this.node().textContent}function Or(){this.innerHTML=""}function Br(e){return function(){this.innerHTML=e}}function Tr(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Fr(e){return arguments.length?this.each(e==null?Or:(typeof e=="function"?Tr:Br)(e)):this.node().innerHTML}function _r(){this.nextSibling&&this.parentNode.appendChild(this)}function Hr(){return this.each(_r)}function Pr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dr(){return this.each(Pr)}function Lr(e){var t=typeof e=="function"?e:Ln(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xr(){return null}function Ur(e,t){var n=typeof e=="function"?e:Ln(e),i=t==null?xr:typeof t=="function"?t:Ut(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function qr(){var e=this.parentNode;e&&e.removeChild(this)}function Xr(){return this.each(qr)}function Yr(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wr(e){return this.select(e?Gr:Yr)}function jr(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Kr(e){return function(t){e.call(this,t,this.__data__)}}function Jr(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Zr(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,r;n<o;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++i]=r;++i?t.length=i:delete this.__on}}}function Qr(e,t,n){return function(){var i=this.__on,o,r=Kr(t);if(i){for(var a=0,s=i.length;a<s;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),o.value=t;return}}this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function ea(e,t,n){var i=Jr(e+""),o,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(o=0,l=s[u];o<r;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?Qr:Zr,o=0;o<r;++o)this.each(s(i[o],t,n));return this}function Jn(e,t,n){var i=Yn(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function ta(e,t){return function(){return Jn(this,e,t)}}function na(e,t){return function(){return Jn(this,e,t.apply(this,arguments))}}function ia(e,t){return this.each((typeof t=="function"?na:ta)(e,t))}function*oa(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length,a;o<r;++o)(a=i[o])&&(yield a)}var Zn=[null];function oe(e,t){this._groups=e,this._parents=t}function qe(){return new oe([[document.documentElement]],Zn)}function ra(){return this}oe.prototype=qe.prototype={constructor:oe,select:Eo,selectAll:To,selectChild:Po,selectChildren:Uo,filter:qo,data:Ko,enter:Xo,exit:Zo,join:Qo,merge:er,selection:ra,order:tr,sort:nr,call:or,nodes:rr,node:ar,size:sr,empty:lr,each:ur,attr:gr,style:br,property:Cr,classed:Mr,text:Rr,html:Fr,raise:Hr,lower:Dr,append:Lr,insert:Ur,remove:Xr,clone:Wr,datum:jr,on:ea,dispatch:ia,[Symbol.iterator]:oa};function ye(e){return typeof e=="string"?new oe([[document.querySelector(e)]],[document.documentElement]):new oe([[e]],Zn)}function aa(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ge(e,t){if(e=aa(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Et={capture:!0,passive:!1};function Rt(e){e.preventDefault(),e.stopImmediatePropagation()}function sa(e){var t=e.document.documentElement,n=ye(e).on("dragstart.drag",Rt,Et);"onselectstart"in t?n.on("selectstart.drag",Rt,Et):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function la(e,t){var n=e.document.documentElement,i=ye(e).on("dragstart.drag",null);t&&(i.on("click.drag",Rt,Et),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Xt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Qn(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Xe(){}var Pe=.7,ut=1/Pe,Ae="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ua=/^#([0-9a-f]{3,8})$/,ca=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),da=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),fa=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${De}\\)$`),ha=new RegExp(`^rgba\\(${ue},${ue},${ue},${De}\\)$`),ma=new RegExp(`^hsl\\(${De},${ue},${ue}\\)$`),pa=new RegExp(`^hsla\\(${De},${ue},${ue},${De}\\)$`),on={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};Xt(Xe,Le,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHex8:ga,formatHsl:va,formatRgb:an,toString:an});function rn(){return this.rgb().formatHex()}function ga(){return this.rgb().formatHex8()}function va(){return ei(this).formatHsl()}function an(){return this.rgb().formatRgb()}function Le(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ua.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sn(t):n===3?new ee(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ge(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ge(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ca.exec(e))?new ee(t[1],t[2],t[3],1):(t=da.exec(e))?new ee(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fa.exec(e))?Ge(t[1],t[2],t[3],t[4]):(t=ha.exec(e))?Ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ma.exec(e))?cn(t[1],t[2]/100,t[3]/100,1):(t=pa.exec(e))?cn(t[1],t[2]/100,t[3]/100,t[4]):on.hasOwnProperty(e)?sn(on[e]):e==="transparent"?new ee(NaN,NaN,NaN,0):null}function sn(e){return new ee(e>>16&255,e>>8&255,e&255,1)}function Ge(e,t,n,i){return i<=0&&(e=t=n=NaN),new ee(e,t,n,i)}function ya(e){return e instanceof Xe||(e=Le(e)),e?(e=e.rgb(),new ee(e.r,e.g,e.b,e.opacity)):new ee}function Ot(e,t,n,i){return arguments.length===1?ya(e):new ee(e,t,n,i??1)}function ee(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Xt(ee,Ot,Qn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pe:Math.pow(Pe,e),new ee(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ee($e(this.r),$e(this.g),$e(this.b),ct(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:ln,formatHex:ln,formatHex8:wa,formatRgb:un,toString:un}));function ln(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}`}function wa(){return`#${Se(this.r)}${Se(this.g)}${Se(this.b)}${Se((isNaN(this.opacity)?1:this.opacity)*255)}`}function un(){const e=ct(this.opacity);return`${e===1?"rgb(":"rgba("}${$e(this.r)}, ${$e(this.g)}, ${$e(this.b)}${e===1?")":`, ${e})`}`}function ct(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $e(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Se(e){return e=$e(e),(e<16?"0":"")+e.toString(16)}function cn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new se(e,t,n,i)}function ei(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);if(e instanceof Xe||(e=Le(e)),!e)return new se;if(e instanceof se)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,u=(r+o)/2;return s?(t===r?a=(n-i)/s+(n<i)*6:n===r?a=(i-t)/s+2:a=(t-n)/s+4,s/=u<.5?r+o:2-r-o,a*=60):s=u>0&&u<1?0:a,new se(a,s,u,e.opacity)}function ba(e,t,n,i){return arguments.length===1?ei(e):new se(e,t,n,i??1)}function se(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Xt(se,ba,Qn(Xe,{brighter(e){return e=e==null?ut:Math.pow(ut,e),new se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pe:Math.pow(Pe,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new ee(It(e>=240?e-240:e+120,o,i),It(e,o,i),It(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new se(dn(this.h),We(this.s),We(this.l),ct(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=ct(this.opacity);return`${e===1?"hsl(":"hsla("}${dn(this.h)}, ${We(this.s)*100}%, ${We(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dn(e){return e=(e||0)%360,e<0?e+360:e}function We(e){return Math.max(0,Math.min(1,e||0))}function It(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ti=e=>()=>e;function ka(e,t){return function(n){return e+n*t}}function Sa(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function $a(e){return(e=+e)==1?ni:function(t,n){return n-t?Sa(t,n,e):ti(isNaN(t)?n:t)}}function ni(e,t){var n=t-e;return n?ka(e,n):ti(isNaN(e)?t:e)}const fn=function e(t){var n=$a(t);function i(o,r){var a=n((o=Ot(o)).r,(r=Ot(r)).r),s=n(o.g,r.g),u=n(o.b,r.b),c=ni(o.opacity,r.opacity);return function(l){return o.r=a(l),o.g=s(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i}(1);function ve(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Bt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vt=new RegExp(Bt.source,"g");function Ca(e){return function(){return e}}function Ia(e){return function(t){return e(t)+""}}function Va(e,t){var n=Bt.lastIndex=Vt.lastIndex=0,i,o,r,a=-1,s=[],u=[];for(e=e+"",t=t+"";(i=Bt.exec(e))&&(o=Vt.exec(t));)(r=o.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:ve(i,o)})),n=Vt.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?Ia(u[0].x):Ca(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)s[(d=u[l]).i]=d.x(c);return s.join("")})}var hn=180/Math.PI,Tt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ii(e,t,n,i,o,r){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),e*i<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*hn,skewX:Math.atan(u)*hn,scaleX:a,scaleY:s}}var je;function Aa(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tt:ii(t.a,t.b,t.c,t.d,t.e,t.f)}function Ma(e){return e==null||(je||(je=document.createElementNS("http://www.w3.org/2000/svg","g")),je.setAttribute("transform",e),!(e=je.transform.baseVal.consolidate()))?Tt:(e=e.matrix,ii(e.a,e.b,e.c,e.d,e.e,e.f))}function oi(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function r(c,l,d,f,p,V){if(c!==d||l!==f){var $=p.push("translate(",null,t,null,n);V.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function a(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:ve(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function s(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:ve(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,p,V){if(c!==d||l!==f){var $=p.push(o(p)+"scale(",null,",",null,")");V.push({i:$-4,x:ve(c,d)},{i:$-2,x:ve(l,f)})}else(d!==1||f!==1)&&p.push(o(p)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),r(c.translateX,c.translateY,l.translateX,l.translateY,d,f),a(c.rotate,l.rotate,d,f),s(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(p){for(var V=-1,$=f.length,w;++V<$;)d[(w=f[V]).i]=w.x(p);return d.join("")}}}var Na=oi(Aa,"px, ","px)","deg)"),za=oi(Ma,", ",")",")"),Ea=1e-12;function mn(e){return((e=Math.exp(e))+1/e)/2}function Ra(e){return((e=Math.exp(e))-1/e)/2}function Oa(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ba=function e(t,n,i){function o(r,a){var s=r[0],u=r[1],c=r[2],l=a[0],d=a[1],f=a[2],p=l-s,V=d-u,$=p*p+V*V,w,y;if($<Ea)y=Math.log(f/c)/t,w=function(P){return[s+P*p,u+P*V,c*Math.exp(t*P*y)]};else{var C=Math.sqrt($),E=(f*f-c*c+i*$)/(2*c*n*C),T=(f*f-c*c-i*$)/(2*f*n*C),_=Math.log(Math.sqrt(E*E+1)-E),H=Math.log(Math.sqrt(T*T+1)-T);y=(H-_)/t,w=function(P){var te=P*y,de=mn(_),X=c/(n*C)*(de*Oa(t*te+_)-Ra(_));return[s+X*p,u+X*V,c*de/mn(t*te+_)]}}return w.duration=y*1e3*t/Math.SQRT2,w}return o.rho=function(r){var a=Math.max(.001,+r),s=a*a,u=s*s;return e(a,s,u)},o}(Math.SQRT2,2,4);var Ne=0,Be=0,Ee=0,ri=1e3,dt,Te,ft=0,Ie=0,yt=0,xe=typeof performance=="object"&&performance.now?performance:Date,ai=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yt(){return Ie||(ai(Ta),Ie=xe.now()+yt)}function Ta(){Ie=0}function ht(){this._call=this._time=this._next=null}ht.prototype=si.prototype={constructor:ht,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yt():+n)+(t==null?0:+t),!this._next&&Te!==this&&(Te?Te._next=this:dt=this,Te=this),this._call=e,this._time=n,Ft()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ft())}};function si(e,t,n){var i=new ht;return i.restart(e,t,n),i}function Fa(){Yt(),++Ne;for(var e=dt,t;e;)(t=Ie-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ne}function pn(){Ie=(ft=xe.now())+yt,Ne=Be=0;try{Fa()}finally{Ne=0,Ha(),Ie=0}}function _a(){var e=xe.now(),t=e-ft;t>ri&&(yt-=t,ft=e)}function Ha(){for(var e,t=dt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:dt=n);Te=e,Ft(i)}function Ft(e){if(!Ne){Be&&(Be=clearTimeout(Be));var t=e-Ie;t>24?(e<1/0&&(Be=setTimeout(pn,e-xe.now()-yt)),Ee&&(Ee=clearInterval(Ee))):(Ee||(ft=xe.now(),Ee=setInterval(_a,ri)),Ne=1,ai(pn))}}function gn(e,t,n){var i=new ht;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var Pa=xt("start","end","cancel","interrupt"),Da=[],li=0,vn=1,_t=2,et=3,yn=4,Ht=5,tt=6;function wt(e,t,n,i,o,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;La(e,n,{name:t,index:i,group:o,on:Pa,tween:Da,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:li})}function Gt(e,t){var n=le(e,t);if(n.state>li)throw new Error("too late; already scheduled");return n}function ce(e,t){var n=le(e,t);if(n.state>et)throw new Error("too late; already running");return n}function le(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function La(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=si(r,0,n.time);function r(c){n.state=vn,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,d,f,p;if(n.state!==vn)return u();for(l in i)if(p=i[l],p.name===n.name){if(p.state===et)return gn(a);p.state===yn?(p.state=tt,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[l]):+l<t&&(p.state=tt,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete i[l])}if(gn(function(){n.state===et&&(n.state=yn,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=_t,n.on.call("start",e,e.__data__,n.index,n.group),n.state===_t){for(n.state=et,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(p=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=p);o.length=d+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Ht,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Ht&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=tt,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function nt(e,t){var n=e.__transition,i,o,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){r=!1;continue}o=i.state>_t&&i.state<Ht,i.state=tt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}r&&delete e.__transition}}function xa(e){return this.each(function(){nt(this,e)})}function Ua(e,t){var n,i;return function(){var o=ce(this,e),r=o.tween;if(r!==n){i=n=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function qa(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var r=ce(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=s;break}u===c&&o.push(s)}r.tween=o}}function Xa(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),n).tween,o=0,r=i.length,a;o<r;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?Ua:qa)(n,e,t))}function Wt(e,t,n){var i=e._id;return e.each(function(){var o=ce(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return le(o,i).value[t]}}function ui(e,t){var n;return(typeof t=="number"?ve:t instanceof Le?fn:(n=Le(t))?(t=n,fn):Va)(e,t)}function Ya(e){return function(){this.removeAttribute(e)}}function Ga(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wa(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttribute(e);return a===o?null:a===i?r:r=t(i=a,n)}}function ja(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?r:r=t(i=a,n)}}function Ka(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Ja(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Za(e,t){var n=vt(e),i=n==="transform"?za:ui;return this.attrTween(e,typeof t=="function"?(n.local?Ja:Ka)(n,i,Wt(this,"attr."+e,t)):t==null?(n.local?Ga:Ya)(n):(n.local?ja:Wa)(n,i,t))}function Qa(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function es(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ts(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&es(e,r)),n}return o._value=t,o}function ns(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Qa(e,r)),n}return o._value=t,o}function is(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=vt(e);return this.tween(n,(i.local?ts:ns)(i,t))}function os(e,t){return function(){Gt(this,e).delay=+t.apply(this,arguments)}}function rs(e,t){return t=+t,function(){Gt(this,e).delay=t}}function as(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?os:rs)(t,e)):le(this.node(),t).delay}function ss(e,t){return function(){ce(this,e).duration=+t.apply(this,arguments)}}function ls(e,t){return t=+t,function(){ce(this,e).duration=t}}function us(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ss:ls)(t,e)):le(this.node(),t).duration}function cs(e,t){if(typeof t!="function")throw new Error;return function(){ce(this,e).ease=t}}function ds(e){var t=this._id;return arguments.length?this.each(cs(t,e)):le(this.node(),t).ease}function fs(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ce(this,e).ease=n}}function hs(e){if(typeof e!="function")throw new Error;return this.each(fs(this._id,e))}function ms(e){typeof e!="function"&&(e=Un(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,c=0;c<a;++c)(u=r[c])&&e.call(u,u.__data__,c,r)&&s.push(u);return new pe(i,this._parents,this._name,this._id)}function ps(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var u=t[s],c=n[s],l=u.length,d=a[s]=new Array(l),f,p=0;p<l;++p)(f=u[p]||c[p])&&(d[p]=f);for(;s<i;++s)a[s]=t[s];return new pe(a,this._parents,this._name,this._id)}function gs(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function vs(e,t,n){var i,o,r=gs(t)?Gt:ce;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}function ys(e,t){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(e):this.each(vs(n,e,t))}function ws(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function bs(){return this.on("end.remove",ws(this._id))}function ks(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ut(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s=i[a],u=s.length,c=r[a]=new Array(u),l,d,f=0;f<u;++f)(l=s[f])&&(d=e.call(l,l.__data__,f,s))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,wt(c[f],t,n,f,c,le(l,n)));return new pe(r,this._parents,t,n)}function Ss(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xn(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var u=i[s],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),p,V=le(l,n),$=0,w=f.length;$<w;++$)(p=f[$])&&wt(p,t,n,$,f,V);r.push(f),a.push(l)}return new pe(r,a,t,n)}var $s=qe.prototype.constructor;function Cs(){return new $s(this._groups,this._parents)}function Is(e,t){var n,i,o;return function(){var r=Me(this,e),a=(this.style.removeProperty(e),Me(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}function ci(e){return function(){this.style.removeProperty(e)}}function Vs(e,t,n){var i,o=n+"",r;return function(){var a=Me(this,e);return a===o?null:a===i?r:r=t(i=a,n)}}function As(e,t,n){var i,o,r;return function(){var a=Me(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Me(this,e))),a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s))}}function Ms(e,t){var n,i,o,r="style."+t,a="end."+r,s;return function(){var u=ce(this,e),c=u.on,l=u.value[r]==null?s||(s=ci(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(a,o=l),u.on=i}}function Ns(e,t,n){var i=(e+="")=="transform"?Na:ui;return t==null?this.styleTween(e,Is(e,i)).on("end.style."+e,ci(e)):typeof t=="function"?this.styleTween(e,As(e,i,Wt(this,"style."+e,t))).each(Ms(this._id,e)):this.styleTween(e,Vs(e,i,t),n).on("end.style."+e,null)}function zs(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Es(e,t,n){var i,o;function r(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&zs(e,a,n)),i}return r._value=t,r}function Rs(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Es(e,t,n??""))}function Os(e){return function(){this.textContent=e}}function Bs(e){return function(){var t=e(this);this.textContent=t??""}}function Ts(e){return this.tween("text",typeof e=="function"?Bs(Wt(this,"text",e)):Os(e==null?"":e+""))}function Fs(e){return function(t){this.textContent=e.call(this,t)}}function _s(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Fs(o)),t}return i._value=e,i}function Hs(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,_s(e))}function Ps(){for(var e=this._name,t=this._id,n=di(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=le(u,t);wt(u,e,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new pe(i,this._parents,e,n)}function Ds(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(r,a){var s={value:a},u={value:function(){--o===0&&r()}};n.each(function(){var c=ce(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),c.on=t}),o===0&&r()})}var Ls=0;function pe(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function di(){return++Ls}var fe=qe.prototype;pe.prototype={constructor:pe,select:ks,selectAll:Ss,selectChild:fe.selectChild,selectChildren:fe.selectChildren,filter:ms,merge:ps,selection:Cs,transition:Ps,call:fe.call,nodes:fe.nodes,node:fe.node,size:fe.size,empty:fe.empty,each:fe.each,on:ys,attr:Za,attrTween:is,style:Ns,styleTween:Rs,text:Ts,textTween:Hs,remove:bs,tween:Xa,delay:as,duration:us,ease:ds,easeVarying:hs,end:Ds,[Symbol.iterator]:fe[Symbol.iterator]};function xs(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Us={time:null,delay:0,duration:250,ease:xs};function qs(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Xs(e){var t,n;e instanceof pe?(t=e._id,e=e._name):(t=di(),(n=Us).time=Yt(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,c=0;c<s;++c)(u=a[c])&&wt(u,e,t,c,a,n||qs(u,t));return new pe(i,this._parents,e,t)}qe.prototype.interrupt=xa;qe.prototype.transition=Xs;const Ke=e=>()=>e;function Ys(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function me(e,t,n){this.k=e,this.x=t,this.y=n}me.prototype={constructor:me,scale:function(e){return e===1?this:new me(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new me(this.k,this.x+this.k*e,this.y+this.k*t)},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 me(1,0,0);me.prototype;function At(e){e.stopImmediatePropagation()}function Re(e){e.preventDefault(),e.stopImmediatePropagation()}function Gs(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ws(){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 wn(){return this.__zoom||jt}function js(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ks(){return navigator.maxTouchPoints||"ontouchstart"in this}function Js(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Zs(){var e=Gs,t=Ws,n=Js,i=js,o=Ks,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Ba,c=xt("start","zoom","end"),l,d,f,p=500,V=150,$=0,w=10;function y(h){h.property("__zoom",wn).on("wheel.zoom",te,{passive:!1}).on("mousedown.zoom",de).on("dblclick.zoom",X).filter(o).on("touchstart.zoom",kt).on("touchmove.zoom",St).on("touchend.zoom touchcancel.zoom",$t).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(h,N,v,z){var b=h.selection?h.selection():h;b.property("__zoom",wn),h!==b?_(h,N,v,z):b.interrupt().each(function(){H(this,arguments).event(z).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},y.scaleBy=function(h,N,v,z){y.scaleTo(h,function(){var b=this.__zoom.k,M=typeof N=="function"?N.apply(this,arguments):N;return b*M},v,z)},y.scaleTo=function(h,N,v,z){y.transform(h,function(){var b=t.apply(this,arguments),M=this.__zoom,S=v==null?T(b):typeof v=="function"?v.apply(this,arguments):v,F=M.invert(S),U=typeof N=="function"?N.apply(this,arguments):N;return n(E(C(M,U),S,F),b,a)},v,z)},y.translateBy=function(h,N,v,z){y.transform(h,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof v=="function"?v.apply(this,arguments):v),t.apply(this,arguments),a)},null,z)},y.translateTo=function(h,N,v,z,b){y.transform(h,function(){var M=t.apply(this,arguments),S=this.__zoom,F=z==null?T(M):typeof z=="function"?z.apply(this,arguments):z;return n(jt.translate(F[0],F[1]).scale(S.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof v=="function"?-v.apply(this,arguments):-v),M,a)},z,b)};function C(h,N){return N=Math.max(r[0],Math.min(r[1],N)),N===h.k?h:new me(N,h.x,h.y)}function E(h,N,v){var z=N[0]-v[0]*h.k,b=N[1]-v[1]*h.k;return z===h.x&&b===h.y?h:new me(h.k,z,b)}function T(h){return[(+h[0][0]+ +h[1][0])/2,(+h[0][1]+ +h[1][1])/2]}function _(h,N,v,z){h.on("start.zoom",function(){H(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(z).end()}).tween("zoom",function(){var b=this,M=arguments,S=H(b,M).event(z),F=t.apply(b,M),U=v==null?T(F):typeof v=="function"?v.apply(b,M):v,Y=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),q=b.__zoom,W=typeof N=="function"?N.apply(b,M):N,re=u(q.invert(U).concat(Y/q.k),W.invert(U).concat(Y/W.k));return function(ne){if(ne===1)ne=W;else{var ae=re(ne),Ct=Y/ae[2];ne=new me(Ct,U[0]-ae[0]*Ct,U[1]-ae[1]*Ct)}S.zoom(null,ne)}})}function H(h,N,v){return!v&&h.__zooming||new P(h,N)}function P(h,N){this.that=h,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(h,N),this.taps=0}P.prototype={event:function(h){return h&&(this.sourceEvent=h),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(h,N){return this.mouse&&h!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&h!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&h!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(h){var N=ye(this.that).datum();c.call(h,this.that,new Ys(h,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:c}),N)}};function te(h,...N){if(!e.apply(this,arguments))return;var v=H(this,N).event(h),z=this.__zoom,b=Math.max(r[0],Math.min(r[1],z.k*Math.pow(2,i.apply(this,arguments)))),M=ge(h);if(v.wheel)(v.mouse[0][0]!==M[0]||v.mouse[0][1]!==M[1])&&(v.mouse[1]=z.invert(v.mouse[0]=M)),clearTimeout(v.wheel);else{if(z.k===b)return;v.mouse=[M,z.invert(M)],nt(this),v.start()}Re(h),v.wheel=setTimeout(S,V),v.zoom("mouse",n(E(C(z,b),v.mouse[0],v.mouse[1]),v.extent,a));function S(){v.wheel=null,v.end()}}function de(h,...N){if(f||!e.apply(this,arguments))return;var v=h.currentTarget,z=H(this,N,!0).event(h),b=ye(h.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",Y,!0),M=ge(h,v),S=h.clientX,F=h.clientY;sa(h.view),At(h),z.mouse=[M,this.__zoom.invert(M)],nt(this),z.start();function U(q){if(Re(q),!z.moved){var W=q.clientX-S,re=q.clientY-F;z.moved=W*W+re*re>$}z.event(q).zoom("mouse",n(E(z.that.__zoom,z.mouse[0]=ge(q,v),z.mouse[1]),z.extent,a))}function Y(q){b.on("mousemove.zoom mouseup.zoom",null),la(q.view,z.moved),Re(q),z.event(q).end()}}function X(h,...N){if(e.apply(this,arguments)){var v=this.__zoom,z=ge(h.changedTouches?h.changedTouches[0]:h,this),b=v.invert(z),M=v.k*(h.shiftKey?.5:2),S=n(E(C(v,M),z,b),t.apply(this,N),a);Re(h),s>0?ye(this).transition().duration(s).call(_,S,z,h):ye(this).call(y.transform,S,z,h)}}function kt(h,...N){if(e.apply(this,arguments)){var v=h.touches,z=v.length,b=H(this,N,h.changedTouches.length===z).event(h),M,S,F,U;for(At(h),S=0;S<z;++S)F=v[S],U=ge(F,this),U=[U,this.__zoom.invert(U),F.identifier],b.touch0?!b.touch1&&b.touch0[2]!==U[2]&&(b.touch1=U,b.taps=0):(b.touch0=U,M=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(b.taps<2&&(d=U[0],l=setTimeout(function(){l=null},p)),nt(this),b.start())}}function St(h,...N){if(this.__zooming){var v=H(this,N).event(h),z=h.changedTouches,b=z.length,M,S,F,U;for(Re(h),M=0;M<b;++M)S=z[M],F=ge(S,this),v.touch0&&v.touch0[2]===S.identifier?v.touch0[0]=F:v.touch1&&v.touch1[2]===S.identifier&&(v.touch1[0]=F);if(S=v.that.__zoom,v.touch1){var Y=v.touch0[0],q=v.touch0[1],W=v.touch1[0],re=v.touch1[1],ne=(ne=W[0]-Y[0])*ne+(ne=W[1]-Y[1])*ne,ae=(ae=re[0]-q[0])*ae+(ae=re[1]-q[1])*ae;S=C(S,Math.sqrt(ne/ae)),F=[(Y[0]+W[0])/2,(Y[1]+W[1])/2],U=[(q[0]+re[0])/2,(q[1]+re[1])/2]}else if(v.touch0)F=v.touch0[0],U=v.touch0[1];else return;v.zoom("touch",n(E(S,F,U),v.extent,a))}}function $t(h,...N){if(this.__zooming){var v=H(this,N).event(h),z=h.changedTouches,b=z.length,M,S;for(At(h),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),M=0;M<b;++M)S=z[M],v.touch0&&v.touch0[2]===S.identifier?delete v.touch0:v.touch1&&v.touch1[2]===S.identifier&&delete v.touch1;if(v.touch1&&!v.touch0&&(v.touch0=v.touch1,delete v.touch1),v.touch0)v.touch0[1]=this.__zoom.invert(v.touch0[0]);else if(v.end(),v.taps===2&&(S=ge(S,this),Math.hypot(d[0]-S[0],d[1]-S[1])<w)){var F=ye(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(h){return arguments.length?(i=typeof h=="function"?h:Ke(+h),y):i},y.filter=function(h){return arguments.length?(e=typeof h=="function"?h:Ke(!!h),y):e},y.touchable=function(h){return arguments.length?(o=typeof h=="function"?h:Ke(!!h),y):o},y.extent=function(h){return arguments.length?(t=typeof h=="function"?h:Ke([[+h[0][0],+h[0][1]],[+h[1][0],+h[1][1]]]),y):t},y.scaleExtent=function(h){return arguments.length?(r[0]=+h[0],r[1]=+h[1],y):[r[0],r[1]]},y.translateExtent=function(h){return arguments.length?(a[0][0]=+h[0][0],a[1][0]=+h[1][0],a[0][1]=+h[0][1],a[1][1]=+h[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(h){return arguments.length?(n=h,y):n},y.duration=function(h){return arguments.length?(s=+h,y):s},y.interpolate=function(h){return arguments.length?(u=h,y):u},y.on=function(){var h=c.on.apply(c,arguments);return h===c?y:h},y.clickDistance=function(h){return arguments.length?($=(h=+h)*h,y):Math.sqrt($)},y.tapDistance=function(h){return arguments.length?(w=+h,y):w},y}const fi=Symbol("MiniMapSlots"),Qs=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],el={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},tl=x({...el,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=Fi(fi),o=En(),r=Fe(()=>o.style??{});function a(d){t("click",d)}function s(d){t("dblclick",d)}function u(d){t("mouseenter",d)}function c(d){t("mousemove",d)}function l(d){t("mouseleave",d)}return(d,f)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(g(),R(D,{key:0},[m(i)[`node-${n.type}`]?(g(),A(_i(m(i)[`node-${n.type}`]),Ve(rt({key:0},{...n,...d.$attrs})),null,16)):(g(),R("rect",rt({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||r.value.background||r.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:a,onDblclick:s,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,Qs))],64)):B("",!0)}}),nl=["width","height","viewBox","aria-labelledby"],il=["id"],ol=["d","fill","stroke","stroke-width"],rl={name:"MiniMap",compatConfig:{MODE:3}},al=x({...rl,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:10},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Bi(),i=En(),o=200,r=150,{id:a,edges:s,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:p,getNodesInitialized:V}=Pt(),$=_e();Hi(fi,n);const w=Fe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),y=Fe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??r}),C=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",E=O(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=O(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),_=O(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),H=O(()=>Si(V.value.filter(b=>!b.hidden))),P=O(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),te=O(()=>V.value&&V.value.length?$i(H.value,P.value):P.value),de=O(()=>{const b=te.value.width/w.value,M=te.value.height/y.value;return Math.max(b,M)}),X=O(()=>{const b=de.value*w.value,M=de.value*y.value,S=e.offsetScale*de.value;return{offset:S,x:te.value.x-(b-te.value.width)/2-S,y:te.value.y-(M-te.value.height)/2-S,width:b+S*2,height:M+S*2}}),kt=O(()=>!X.value.x||!X.value.y?"":`
|
|
2
2
|
M${X.value.x-X.value.offset},${X.value.y-X.value.offset}
|
|
3
3
|
h${X.value.width+X.value.offset*2}
|
|
4
4
|
v${X.value.height+X.value.offset*2}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as Y,aj as ut}from"./BhWccYlK.js";import{F as je,av as Zt,aX as $e,Z as Pe,W as Ve,az as We,a1 as Jt,X as Xe,a0 as Ge,a2 as De,a3 as qe}from"./koatKMQr.js";const at=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ye(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function V(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ft(e,...t){if(!ye(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function It(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");V(e.outputLen),V(e.blockLen)}function At(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ye(e,t){ft(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function St(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ct(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function K(e,t){return e<<t|e>>>32-t>>>0}const Ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qe(e){for(let t=0;t<e.length;t++)e[t]=Je(e[t]);return e}const Qt=Ze?e=>e:Qe,pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function en(e){if(ft(e),pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=tn[e[n]];return t}const tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function te(e){if(e>=tt._0&&e<=tt._9)return e-tt._0;if(e>=tt.A&&e<=tt.F)return e-(tt.A-10);if(e>=tt.a&&e<=tt.f)return e-(tt.a-10)}function ge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(pe)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=te(e.charCodeAt(s)),c=te(e.charCodeAt(s+1));if(i===void 0||c===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=i*16+c}return r}function we(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xt(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function ee(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function xe(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class be{}function nn(e){const t=r=>e().update(xt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ot(e=32){if(at&&typeof at.getRandomValues=="function")return at.getRandomValues(new Uint8Array(e));if(at&&typeof at.randomBytes=="function")return Uint8Array.from(at.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class me extends be{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,It(t);const r=xt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),ct(s)}update(t){return At(this),this.iHash.update(t),this}digestInto(t){At(this),ft(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const gt=(e,t,n)=>new me(e,t).update(n).digest();gt.create=(e,t)=>new me(e,t);function Ee(e,t,n){return It(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gt(e,xt(n),xt(t))}const kt=Uint8Array.from([0]),ne=Uint8Array.of();function rn(e,t,n,r=32){It(e),V(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ne);const i=new Uint8Array(s*o),c=gt.create(e,t),f=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let a=0;a<s;a++)kt[0]=a+1,f.update(a===0?ne:h).update(n).update(kt).digestInto(h),i.set(h,o*a),c._cloneInto(f);return c.destroy(),f.destroy(),ct(h,kt),i.slice(0,r)}const dt=(e,t,n,r,o)=>rn(e,Ee(e,t,n),r,o);function sn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=r?4:0,h=r?0:4;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function on(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class fn extends be{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Et(this.buffer)}update(t){At(this),t=xt(t),ft(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const f=Et(t);for(;o<=s-i;i+=o)this.process(f,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){At(this),Ye(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,ct(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let l=i;l<o;l++)n[l]=0;sn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Et(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=f/4,a=this.get();if(h>a.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<h;l++)c.setUint32(4*l,a[l],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:c}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const nt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),an=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),rt=new Uint32Array(64);class ln extends fn{constructor(t=32){super(64,t,8,!1),this.A=nt[0]|0,this.B=nt[1]|0,this.C=nt[2]|0,this.D=nt[3]|0,this.E=nt[4]|0,this.F=nt[5]|0,this.G=nt[6]|0,this.H=nt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:f}=this;return[t,n,r,o,s,i,c,f]}set(t,n,r,o,s,i,c,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=f|0}process(t,n){for(let l=0;l<16;l++,n+=4)rt[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const w=rt[l-15],g=rt[l-2],b=q(w,7)^q(w,18)^w>>>3,p=q(g,17)^q(g,19)^g>>>10;rt[l]=p+rt[l-7]+b+rt[l-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:f,G:h,H:a}=this;for(let l=0;l<64;l++){const w=q(c,6)^q(c,11)^q(c,25),g=a+w+on(c,f,h)+an[l]+rt[l]|0,p=(q(r,2)^q(r,13)^q(r,22))+cn(r,o,s)|0;a=h,h=f,f=c,c=i+g|0,i=s,s=o,o=r,r=g+p|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,f=f+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,i,c,f,h,a)}roundClean(){ct(rt)}destroy(){this.set(0,0,0,0,0,0,0,0),ct(this.buffer)}}const $t=nn(()=>new ln),et=$t;function hn(e,t,n,r){It(e);const o=xe({dkLen:32,asyncTick:10},r),{c:s,dkLen:i,asyncTick:c}=o;if(V(s),V(i),V(c),s<1)throw new Error("iterations (c) should be >= 1");const f=ee(t),h=ee(n),a=new Uint8Array(i),l=gt.create(e,f),w=l._cloneInto().update(h);return{c:s,dkLen:i,asyncTick:c,DK:a,PRF:l,PRFSalt:w}}function un(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ct(o),n}function Ae(e,t,n,r){const{c:o,dkLen:s,DK:i,PRF:c,PRFSalt:f}=hn(e,t,n,r);let h;const a=new Uint8Array(4),l=Et(a),w=new Uint8Array(c.outputLen);for(let g=1,b=0;b<s;g++,b+=c.outputLen){const p=i.subarray(b,b+c.outputLen);l.setInt32(0,g,!1),(h=f._cloneInto(h)).update(a).digestInto(w),p.set(w.subarray(0,p.length));for(let y=1;y<o;y++){c._cloneInto(h).update(w).digestInto(w);for(let B=0;B<p.length;B++)p[B]^=w[B]}}return un(c,f,i,h,w)}function re(e,t,n,r,o,s){let i=e[t++]^n[r++],c=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],b=e[t++]^n[r++],p=e[t++]^n[r++],y=e[t++]^n[r++],B=e[t++]^n[r++],M=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],j=e[t++]^n[r++],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let F=0;F<8;F+=2)_^=K(v+A|0,7),x^=K(_+v|0,9),A^=K(x+_|0,13),v^=K(A+x|0,18),m^=K(S+H|0,7),u^=K(m+S|0,9),H^=K(u+m|0,13),S^=K(H+u|0,18),U^=K(I+k|0,7),R^=K(U+I|0,9),k^=K(R+U|0,13),I^=K(k+R|0,18),C^=K(L+E|0,7),d^=K(C+L|0,9),E^=K(d+C|0,13),L^=K(E+d|0,18),H^=K(v+C|0,7),R^=K(H+v|0,9),C^=K(R+H|0,13),v^=K(C+R|0,18),k^=K(S+_|0,7),d^=K(k+S|0,9),_^=K(d+k|0,13),S^=K(_+d|0,18),E^=K(I+m|0,7),x^=K(E+I|0,9),m^=K(x+E|0,13),I^=K(m+x|0,18),A^=K(L+U|0,7),u^=K(A+L|0,9),U^=K(u+A|0,13),L^=K(U+u|0,18);o[s++]=i+v|0,o[s++]=c+H|0,o[s++]=f+R|0,o[s++]=h+C|0,o[s++]=a+_|0,o[s++]=l+S|0,o[s++]=w+k|0,o[s++]=g+d|0,o[s++]=b+x|0,o[s++]=p+m|0,o[s++]=y+I|0,o[s++]=B+E|0,o[s++]=M+A|0,o[s++]=z+u|0,o[s++]=O+U|0,o[s++]=j+L|0}function vt(e,t,n,r,o){let s=r+0,i=r+16*o;for(let c=0;c<16;c++)n[i+c]=e[t+(2*o-1)*16+c];for(let c=0;c<o;c++,s+=16,t+=16)re(n,i,e,t,n,s),c>0&&(i+=16),re(n,s,e,t+=16,n,i)}function dn(e,t,n){const r=xe({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:i,dkLen:c,asyncTick:f,maxmem:h,onProgress:a}=r;if(V(o),V(s),V(i),V(c),V(f),V(h),a!==void 0&&typeof a!="function")throw new Error("progressCb should be function");const l=128*s,w=l/4,g=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>g)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(i<0||i>(g-1)*32/l)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(g-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(l*(o+i)>h)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+h);const p=Ae($t,e,t,{c:1,dkLen:l*i}),y=St(p),B=St(new Uint8Array(l*o)),M=St(new Uint8Array(l));let z=()=>{};if(a){const O=2*o*i,j=Math.max(Math.floor(O/1e4),1);let v=0;z=()=>{v++,a&&(!(v%j)||v===O)&&a(v/O)}}return{N:o,r:s,p:i,dkLen:c,blockSize32:w,V:B,B32:y,B:p,tmp:M,blockMixCb:z,asyncTick:f}}function yn(e,t,n,r,o){const s=Ae($t,e,n,{c:1,dkLen:t});return ct(n,r,o),s}function Be(e,t,n){const{N:r,r:o,p:s,dkLen:i,blockSize32:c,V:f,B32:h,B:a,tmp:l,blockMixCb:w}=dn(e,t,n);Qt(h);for(let g=0;g<s;g++){const b=c*g;for(let p=0;p<c;p++)f[p]=h[b+p];for(let p=0,y=0;p<r-1;p++)vt(f,y,f,y+=c,o),w();vt(f,(r-1)*c,h,b,o),w();for(let p=0;p<r;p++){const y=h[b+c-16]%r;for(let B=0;B<c;B++)l[B]=h[b+B]^f[y*c+B];vt(l,0,h,b,o),w()}}return Qt(h),yn(e,i,a,f,l)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ht(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Kt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function se(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function pn(e,t){$(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function st(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const wn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ft(e){if(typeof e=="string")e=xn(e);else if(Ue(e))e=Rt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function mn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const En=(e,t)=>{function n(r,...o){if($(r),!wn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const a=o[0];if(!a)throw new Error("nonce / iv required");e.varSizeNonce?$(a):$(a,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&$(o[1]);const i=t(r,...o),c=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");$(l)}};let f=!1;return{encrypt(a,l){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,$(a),c(i.encrypt.length,l),i.encrypt(a,l)},decrypt(a,l){if($(a),s&&a.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(i.decrypt.length,l),i.decrypt(a,l)}}}return Object.assign(n,e),n};function oe(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!Bn(t))throw new Error("invalid output, must be aligned");return t}function ie(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=4,h=0;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function An(e,t,n){Ht(n);const r=new Uint8Array(16),o=gn(r);return ie(o,0,BigInt(t),n),ie(o,8,BigInt(e),n),r}function Bn(e){return e.byteOffset%4===0}function Rt(e){return Uint8Array.from(e)}const Ie=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Un=Ie("expand 16-byte k"),In=Ie("expand 32-byte k"),Ln=st(Un),Cn=st(In);function T(e,t){return e<<t|e>>>32-t}function Mt(e){return e.byteOffset%4===0}const bt=64,_n=16,Le=2**32-1,ce=new Uint32Array;function Sn(e,t,n,r,o,s,i,c){const f=o.length,h=new Uint8Array(bt),a=st(h),l=Mt(o)&&Mt(s),w=l?st(o):ce,g=l?st(s):ce;for(let b=0;b<f;i++){if(e(t,n,r,a,i,c),i>=Le)throw new Error("arx: counter overflow");const p=Math.min(bt,f-b);if(l&&p===bt){const y=b/4;if(b%4!==0)throw new Error("arx: invalid block position");for(let B=0,M;B<_n;B++)M=y+B,g[M]=w[M]^a[B];b+=bt;continue}for(let y=0,B;y<p;y++)B=b+y,s[B]=o[B]^h[y];b+=p}}function kn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=bn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Kt(o),Kt(i),Ht(s),Ht(n),(c,f,h,a,l=0)=>{$(c),$(f),$(h);const w=h.length;if(a===void 0&&(a=new Uint8Array(w)),$(a),Kt(l),l<0||l>=Le)throw new Error("arx: counter overflow");if(a.length<w)throw new Error(`arx: output (${a.length}) is shorter than data (${w})`);const g=[];let b=c.length,p,y;if(b===32)g.push(p=Rt(c)),y=Cn;else if(b===16&&n)p=new Uint8Array(32),p.set(c),p.set(c,16),y=Ln,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${b}`);Mt(f)||g.push(f=Rt(f));const B=st(p);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,B,st(f.subarray(0,16)),B),f=f.subarray(16)}const M=16-o;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,g.push(f)}const z=st(f);return Sn(e,y,B,z,h,a,l,i),yt(...g),a}}const N=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class vn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Ft(t),$(t,32);const n=N(t,0),r=N(t,2),o=N(t,4),s=N(t,6),i=N(t,8),c=N(t,10),f=N(t,12),h=N(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|c<<2)&8191,this.r[7]=(c>>>11|f<<5)&8065,this.r[8]=(f>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=N(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,c=i[0],f=i[1],h=i[2],a=i[3],l=i[4],w=i[5],g=i[6],b=i[7],p=i[8],y=i[9],B=N(t,n+0),M=N(t,n+2),z=N(t,n+4),O=N(t,n+6),j=N(t,n+8),v=N(t,n+10),H=N(t,n+12),R=N(t,n+14);let C=s[0]+(B&8191),_=s[1]+((B>>>13|M<<3)&8191),S=s[2]+((M>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),d=s[4]+((O>>>4|j<<12)&8191),x=s[5]+(j>>>1&8191),m=s[6]+((j>>>14|v<<2)&8191),I=s[7]+((v>>>11|H<<5)&8191),E=s[8]+((H>>>8|R<<8)&8191),A=s[9]+(R>>>5|o),u=0,U=u+C*c+_*(5*y)+S*(5*p)+k*(5*b)+d*(5*g);u=U>>>13,U&=8191,U+=x*(5*w)+m*(5*l)+I*(5*a)+E*(5*h)+A*(5*f),u+=U>>>13,U&=8191;let L=u+C*f+_*c+S*(5*y)+k*(5*p)+d*(5*b);u=L>>>13,L&=8191,L+=x*(5*g)+m*(5*w)+I*(5*l)+E*(5*a)+A*(5*h),u+=L>>>13,L&=8191;let F=u+C*h+_*f+S*c+k*(5*y)+d*(5*p);u=F>>>13,F&=8191,F+=x*(5*b)+m*(5*g)+I*(5*w)+E*(5*l)+A*(5*a),u+=F>>>13,F&=8191;let P=u+C*a+_*h+S*f+k*c+d*(5*y);u=P>>>13,P&=8191,P+=x*(5*p)+m*(5*b)+I*(5*g)+E*(5*w)+A*(5*l),u+=P>>>13,P&=8191;let Z=u+C*l+_*a+S*h+k*f+d*c;u=Z>>>13,Z&=8191,Z+=x*(5*y)+m*(5*p)+I*(5*b)+E*(5*g)+A*(5*w),u+=Z>>>13,Z&=8191;let X=u+C*w+_*l+S*a+k*h+d*f;u=X>>>13,X&=8191,X+=x*c+m*(5*y)+I*(5*p)+E*(5*b)+A*(5*g),u+=X>>>13,X&=8191;let G=u+C*g+_*w+S*l+k*a+d*h;u=G>>>13,G&=8191,G+=x*f+m*c+I*(5*y)+E*(5*p)+A*(5*b),u+=G>>>13,G&=8191;let D=u+C*b+_*g+S*w+k*l+d*a;u=D>>>13,D&=8191,D+=x*h+m*f+I*c+E*(5*y)+A*(5*p),u+=D>>>13,D&=8191;let J=u+C*p+_*b+S*g+k*w+d*l;u=J>>>13,J&=8191,J+=x*a+m*h+I*f+E*c+A*(5*y),u+=J>>>13,J&=8191;let Q=u+C*y+_*p+S*b+k*g+d*w;u=Q>>>13,Q&=8191,Q+=x*l+m*a+I*h+E*f+A*c,u+=Q>>>13,Q&=8191,u=(u<<2)+u|0,u=u+U|0,U=u&8191,u=u>>>13,L+=u,s[0]=U,s[1]=L,s[2]=F,s[3]=P,s[4]=Z,s[5]=X,s[6]=G,s[7]=D,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let c=1;c<10;c++)r[c]=t[c]+o,o=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(o^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let i=t[0]+n[0];t[0]=i&65535;for(let c=1;c<8;c++)i=(t[c]+n[c]|0)+(i>>>16)|0,t[c]=i&65535;yt(r)}update(t){se(this),t=Ft(t),$(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){yt(this.h,this.r,this.buffer,this.pad)}digestInto(t){se(this),pn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Kn(e){const t=(r,o)=>e(o).update(Ft(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Tn=Kn(e=>new vn(e));function Hn(e,t,n,r,o,s=20){let i=e[0],c=e[1],f=e[2],h=e[3],a=t[0],l=t[1],w=t[2],g=t[3],b=t[4],p=t[5],y=t[6],B=t[7],M=o,z=n[0],O=n[1],j=n[2],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let P=0;P<s;P+=2)v=v+_|0,A=T(A^v,16),x=x+A|0,_=T(_^x,12),v=v+_|0,A=T(A^v,8),x=x+A|0,_=T(_^x,7),H=H+S|0,u=T(u^H,16),m=m+u|0,S=T(S^m,12),H=H+S|0,u=T(u^H,8),m=m+u|0,S=T(S^m,7),R=R+k|0,U=T(U^R,16),I=I+U|0,k=T(k^I,12),R=R+k|0,U=T(U^R,8),I=I+U|0,k=T(k^I,7),C=C+d|0,L=T(L^C,16),E=E+L|0,d=T(d^E,12),C=C+d|0,L=T(L^C,8),E=E+L|0,d=T(d^E,7),v=v+S|0,L=T(L^v,16),I=I+L|0,S=T(S^I,12),v=v+S|0,L=T(L^v,8),I=I+L|0,S=T(S^I,7),H=H+k|0,A=T(A^H,16),E=E+A|0,k=T(k^E,12),H=H+k|0,A=T(A^H,8),E=E+A|0,k=T(k^E,7),R=R+d|0,u=T(u^R,16),x=x+u|0,d=T(d^x,12),R=R+d|0,u=T(u^R,8),x=x+u|0,d=T(d^x,7),C=C+_|0,U=T(U^C,16),m=m+U|0,_=T(_^m,12),C=C+_|0,U=T(U^C,8),m=m+U|0,_=T(_^m,7);let F=0;r[F++]=i+v|0,r[F++]=c+H|0,r[F++]=f+R|0,r[F++]=h+C|0,r[F++]=a+_|0,r[F++]=l+S|0,r[F++]=w+k|0,r[F++]=g+d|0,r[F++]=b+x|0,r[F++]=p+m|0,r[F++]=y+I|0,r[F++]=B+E|0,r[F++]=M+A|0,r[F++]=z+u|0,r[F++]=O+U|0,r[F++]=j+L|0}const Fn=kn(Hn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Rn=new Uint8Array(16),fe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Rn.subarray(n))},Mn=new Uint8Array(32);function ae(e,t,n,r,o){const s=e(t,n,Mn),i=Tn.create(s);o&&fe(i,o),fe(i,r);const c=An(r.length,o?o.length:0,!0);i.update(c);const f=i.digest();return yt(s,c),f}const On=e=>(t,n,r)=>({encrypt(s,i){const c=s.length;i=oe(c+16,i,!1),i.set(s);const f=i.subarray(0,-16);e(t,n,f,f,1);const h=ae(e,t,n,f,r);return i.set(h,c),yt(h),i},decrypt(s,i){i=oe(s.length-16,i,!1);const c=s.subarray(0,-16),f=s.subarray(-16),h=ae(e,t,n,c,r);if(!mn(f,h))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),yt(h),i}}),pt=En({blockSize:64,nonceLength:12,tagLength:16},On(Fn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0);function Nn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ce:BigInt("0x"+e)}function le(e){return ft(e),Nn(en(Uint8Array.from(e).reverse()))}function zn(e,t){return ge(e.toString(16).padStart(t*2,"0"))}function jn(e,t){return zn(e,t).reverse()}function he(e,t,n){let r;if(typeof t=="string")try{r=ge(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(ye(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const Tt=e=>typeof e=="bigint"&&Ce<=e;function $n(e,t,n){return Tt(e)&&Tt(t)&&Tt(n)&&t<=e&&e<n}function ue(e,t,n,r){if(!$n(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Pn(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const c=e[o];if(i&&c===void 0)return;const f=typeof c;if(f!==s||c===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _e=BigInt(0);BigInt(1);function Se(e,t){const n=e%t;return n>=_e?n:t+n}function W(e,t,n){let r=e;for(;t-- >_e;)r*=r,r%=n;return r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wt=BigInt(0),lt=BigInt(1),mt=BigInt(2);function Vn(e){return Pn(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function Wn(e){const t=Vn(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const f=i||ot,h=c?255:448,a=c?32:56,l=BigInt(c?9:5),w=BigInt(c?121665:39081),g=c?mt**BigInt(254):mt**BigInt(447),b=c?BigInt(8)*mt**BigInt(251)-lt:BigInt(4)*mt**BigInt(445)-lt,p=g+b+lt,y=d=>Se(d,n),B=M(l);function M(d){return jn(y(d),a)}function z(d){const x=he("u coordinate",d,a);return c&&(x[31]&=127),y(le(x))}function O(d){return le(o(he("scalar",d,a)))}function j(d,x){const m=R(z(x),O(d));if(m===wt)throw new Error("invalid private or public key received");return M(m)}function v(d){return j(d,B)}function H(d,x,m){const I=y(d*(x-m));return x=y(x-I),m=y(m+I),{x_2:x,x_3:m}}function R(d,x){ue("u",d,wt,n),ue("scalar",x,g,p);const m=x,I=d;let E=lt,A=wt,u=d,U=lt,L=wt;for(let P=BigInt(h-1);P>=wt;P--){const Z=m>>P<L^=Z,{x_2:E,x_3:u}=H(L,E,u),{x_2:A,x_3:U}=H(L,A,U),L=Z;const X=E+A,G=y(X*X),D=E-A,J=y(D*D),Q=G-J,Ne=u+U,ze=u-U,Gt=y(ze*X),Dt=y(Ne*D),qt=Gt+Dt,Yt=Gt-Dt;u=y(qt*qt),U=y(I*y(Yt*Yt)),E=y(G*J),A=y(Q*(G+y(w*Q)))}({x_2:E,x_3:u}=H(L,E,u)),{x_2:A,x_3:U}=H(L,A,U);const F=s(A);return y(E*F)}const C=(d=f(a))=>d,_={randomSecretKey:C,randomPrivateKey:C};function S(d){const x=_.randomSecretKey(d);return{secretKey:x,publicKey:v(x)}}const k={secret:a,public:a,seed:a};return{keygen:S,getSharedSecret:(d,x)=>j(d,x),getPublicKey:d=>v(d),scalarMult:j,scalarMultBase:v,utils:_,GuBytes:B.slice(),info:{type:"montgomery",lengths:k}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Xn=BigInt(1),de=BigInt(2),Gn=BigInt(3),Dn=BigInt(5);BigInt(8);const ke={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qn(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ke.p,c=e*e%s*e%s,f=W(c,de,s)*c%s,h=W(f,Xn,s)*e%s,a=W(h,Dn,s)*h%s,l=W(a,t,s)*a%s,w=W(l,n,s)*l%s,g=W(w,r,s)*w%s,b=W(g,o,s)*g%s,p=W(b,o,s)*g%s,y=W(p,t,s)*a%s;return{pow_p_5_8:W(y,de,s)*e%s,b2:c}}function Yn(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ot=(()=>{const e=ke.p;return Wn({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=qn(t);return Se(W(n,Gn,e)*r,e)},adjustScalarBytes:Yn})})(),ve=!1;async function Ke(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Pt(e,t){return await Ke(async()=>{const n=Nt(e)?e:await Jn(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},ve,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMult(e,t)})}async function Bt(e){return await Ke(async()=>Pt(e,Ot.GuBytes),()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMultBase(e)})}const Zn=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Jn(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Zn,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},ve,["deriveBits"])}function Nt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Qn{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),tr(ht(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=ht(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:ht(this.transcript)}}}function tr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function ht(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Ut(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function zt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Te(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function er(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function nr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:h}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(h),o+=h.length}n.releaseLock();const s=ht(r),i=s.subarray(0,t),c=Ut(e,s.subarray(t));return{data:i,rest:c}}class Lt{args;body;constructor(t,n){this.args=t,this.body=n}}async function rr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const i=Y.decode(s);if(i.length>48)throw Error("invalid stanza");if(r.push(i),i.length<48)break}const o=ht(r);return{s:new Lt(n,o)}}async function sr(e){const t=new Qn(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await rr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const i=Y.decode(s.slice(4)),{rest:c,transcript:f}=t.close(),h=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:h,MAC:i,headerSize:f.length,rest:Ut(e,c)}}}function He(e){const t=[];t.push(`age-encryption.org/v1
|
|
1
|
+
import{ai as Y,aj as ut}from"./20zRBBOT.js";import{F as je,av as Zt,aX as $e,Z as Pe,W as Ve,az as We,a1 as Jt,X as Xe,a0 as Ge,a2 as De,a3 as qe}from"./koatKMQr.js";const at=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ye(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function V(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ft(e,...t){if(!ye(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function It(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");V(e.outputLen),V(e.blockLen)}function At(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ye(e,t){ft(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function St(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ct(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function K(e,t){return e<<t|e>>>32-t>>>0}const Ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qe(e){for(let t=0;t<e.length;t++)e[t]=Je(e[t]);return e}const Qt=Ze?e=>e:Qe,pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function en(e){if(ft(e),pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=tn[e[n]];return t}const tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function te(e){if(e>=tt._0&&e<=tt._9)return e-tt._0;if(e>=tt.A&&e<=tt.F)return e-(tt.A-10);if(e>=tt.a&&e<=tt.f)return e-(tt.a-10)}function ge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(pe)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=te(e.charCodeAt(s)),c=te(e.charCodeAt(s+1));if(i===void 0||c===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=i*16+c}return r}function we(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xt(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function ee(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function xe(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class be{}function nn(e){const t=r=>e().update(xt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ot(e=32){if(at&&typeof at.getRandomValues=="function")return at.getRandomValues(new Uint8Array(e));if(at&&typeof at.randomBytes=="function")return Uint8Array.from(at.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class me extends be{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,It(t);const r=xt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),ct(s)}update(t){return At(this),this.iHash.update(t),this}digestInto(t){At(this),ft(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const gt=(e,t,n)=>new me(e,t).update(n).digest();gt.create=(e,t)=>new me(e,t);function Ee(e,t,n){return It(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gt(e,xt(n),xt(t))}const kt=Uint8Array.from([0]),ne=Uint8Array.of();function rn(e,t,n,r=32){It(e),V(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ne);const i=new Uint8Array(s*o),c=gt.create(e,t),f=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let a=0;a<s;a++)kt[0]=a+1,f.update(a===0?ne:h).update(n).update(kt).digestInto(h),i.set(h,o*a),c._cloneInto(f);return c.destroy(),f.destroy(),ct(h,kt),i.slice(0,r)}const dt=(e,t,n,r,o)=>rn(e,Ee(e,t,n),r,o);function sn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=r?4:0,h=r?0:4;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function on(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class fn extends be{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Et(this.buffer)}update(t){At(this),t=xt(t),ft(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const f=Et(t);for(;o<=s-i;i+=o)this.process(f,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){At(this),Ye(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,ct(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let l=i;l<o;l++)n[l]=0;sn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Et(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=f/4,a=this.get();if(h>a.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<h;l++)c.setUint32(4*l,a[l],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:c}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const nt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),an=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),rt=new Uint32Array(64);class ln extends fn{constructor(t=32){super(64,t,8,!1),this.A=nt[0]|0,this.B=nt[1]|0,this.C=nt[2]|0,this.D=nt[3]|0,this.E=nt[4]|0,this.F=nt[5]|0,this.G=nt[6]|0,this.H=nt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:f}=this;return[t,n,r,o,s,i,c,f]}set(t,n,r,o,s,i,c,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=f|0}process(t,n){for(let l=0;l<16;l++,n+=4)rt[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const w=rt[l-15],g=rt[l-2],b=q(w,7)^q(w,18)^w>>>3,p=q(g,17)^q(g,19)^g>>>10;rt[l]=p+rt[l-7]+b+rt[l-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:f,G:h,H:a}=this;for(let l=0;l<64;l++){const w=q(c,6)^q(c,11)^q(c,25),g=a+w+on(c,f,h)+an[l]+rt[l]|0,p=(q(r,2)^q(r,13)^q(r,22))+cn(r,o,s)|0;a=h,h=f,f=c,c=i+g|0,i=s,s=o,o=r,r=g+p|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,f=f+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,i,c,f,h,a)}roundClean(){ct(rt)}destroy(){this.set(0,0,0,0,0,0,0,0),ct(this.buffer)}}const $t=nn(()=>new ln),et=$t;function hn(e,t,n,r){It(e);const o=xe({dkLen:32,asyncTick:10},r),{c:s,dkLen:i,asyncTick:c}=o;if(V(s),V(i),V(c),s<1)throw new Error("iterations (c) should be >= 1");const f=ee(t),h=ee(n),a=new Uint8Array(i),l=gt.create(e,f),w=l._cloneInto().update(h);return{c:s,dkLen:i,asyncTick:c,DK:a,PRF:l,PRFSalt:w}}function un(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ct(o),n}function Ae(e,t,n,r){const{c:o,dkLen:s,DK:i,PRF:c,PRFSalt:f}=hn(e,t,n,r);let h;const a=new Uint8Array(4),l=Et(a),w=new Uint8Array(c.outputLen);for(let g=1,b=0;b<s;g++,b+=c.outputLen){const p=i.subarray(b,b+c.outputLen);l.setInt32(0,g,!1),(h=f._cloneInto(h)).update(a).digestInto(w),p.set(w.subarray(0,p.length));for(let y=1;y<o;y++){c._cloneInto(h).update(w).digestInto(w);for(let B=0;B<p.length;B++)p[B]^=w[B]}}return un(c,f,i,h,w)}function re(e,t,n,r,o,s){let i=e[t++]^n[r++],c=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],b=e[t++]^n[r++],p=e[t++]^n[r++],y=e[t++]^n[r++],B=e[t++]^n[r++],M=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],j=e[t++]^n[r++],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let F=0;F<8;F+=2)_^=K(v+A|0,7),x^=K(_+v|0,9),A^=K(x+_|0,13),v^=K(A+x|0,18),m^=K(S+H|0,7),u^=K(m+S|0,9),H^=K(u+m|0,13),S^=K(H+u|0,18),U^=K(I+k|0,7),R^=K(U+I|0,9),k^=K(R+U|0,13),I^=K(k+R|0,18),C^=K(L+E|0,7),d^=K(C+L|0,9),E^=K(d+C|0,13),L^=K(E+d|0,18),H^=K(v+C|0,7),R^=K(H+v|0,9),C^=K(R+H|0,13),v^=K(C+R|0,18),k^=K(S+_|0,7),d^=K(k+S|0,9),_^=K(d+k|0,13),S^=K(_+d|0,18),E^=K(I+m|0,7),x^=K(E+I|0,9),m^=K(x+E|0,13),I^=K(m+x|0,18),A^=K(L+U|0,7),u^=K(A+L|0,9),U^=K(u+A|0,13),L^=K(U+u|0,18);o[s++]=i+v|0,o[s++]=c+H|0,o[s++]=f+R|0,o[s++]=h+C|0,o[s++]=a+_|0,o[s++]=l+S|0,o[s++]=w+k|0,o[s++]=g+d|0,o[s++]=b+x|0,o[s++]=p+m|0,o[s++]=y+I|0,o[s++]=B+E|0,o[s++]=M+A|0,o[s++]=z+u|0,o[s++]=O+U|0,o[s++]=j+L|0}function vt(e,t,n,r,o){let s=r+0,i=r+16*o;for(let c=0;c<16;c++)n[i+c]=e[t+(2*o-1)*16+c];for(let c=0;c<o;c++,s+=16,t+=16)re(n,i,e,t,n,s),c>0&&(i+=16),re(n,s,e,t+=16,n,i)}function dn(e,t,n){const r=xe({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:i,dkLen:c,asyncTick:f,maxmem:h,onProgress:a}=r;if(V(o),V(s),V(i),V(c),V(f),V(h),a!==void 0&&typeof a!="function")throw new Error("progressCb should be function");const l=128*s,w=l/4,g=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>g)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(i<0||i>(g-1)*32/l)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(g-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(l*(o+i)>h)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+h);const p=Ae($t,e,t,{c:1,dkLen:l*i}),y=St(p),B=St(new Uint8Array(l*o)),M=St(new Uint8Array(l));let z=()=>{};if(a){const O=2*o*i,j=Math.max(Math.floor(O/1e4),1);let v=0;z=()=>{v++,a&&(!(v%j)||v===O)&&a(v/O)}}return{N:o,r:s,p:i,dkLen:c,blockSize32:w,V:B,B32:y,B:p,tmp:M,blockMixCb:z,asyncTick:f}}function yn(e,t,n,r,o){const s=Ae($t,e,n,{c:1,dkLen:t});return ct(n,r,o),s}function Be(e,t,n){const{N:r,r:o,p:s,dkLen:i,blockSize32:c,V:f,B32:h,B:a,tmp:l,blockMixCb:w}=dn(e,t,n);Qt(h);for(let g=0;g<s;g++){const b=c*g;for(let p=0;p<c;p++)f[p]=h[b+p];for(let p=0,y=0;p<r-1;p++)vt(f,y,f,y+=c,o),w();vt(f,(r-1)*c,h,b,o),w();for(let p=0;p<r;p++){const y=h[b+c-16]%r;for(let B=0;B<c;B++)l[B]=h[b+B]^f[y*c+B];vt(l,0,h,b,o),w()}}return Qt(h),yn(e,i,a,f,l)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ht(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Kt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function se(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function pn(e,t){$(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function st(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const wn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ft(e){if(typeof e=="string")e=xn(e);else if(Ue(e))e=Rt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function mn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const En=(e,t)=>{function n(r,...o){if($(r),!wn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const a=o[0];if(!a)throw new Error("nonce / iv required");e.varSizeNonce?$(a):$(a,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&$(o[1]);const i=t(r,...o),c=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");$(l)}};let f=!1;return{encrypt(a,l){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,$(a),c(i.encrypt.length,l),i.encrypt(a,l)},decrypt(a,l){if($(a),s&&a.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(i.decrypt.length,l),i.decrypt(a,l)}}}return Object.assign(n,e),n};function oe(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!Bn(t))throw new Error("invalid output, must be aligned");return t}function ie(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=4,h=0;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function An(e,t,n){Ht(n);const r=new Uint8Array(16),o=gn(r);return ie(o,0,BigInt(t),n),ie(o,8,BigInt(e),n),r}function Bn(e){return e.byteOffset%4===0}function Rt(e){return Uint8Array.from(e)}const Ie=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Un=Ie("expand 16-byte k"),In=Ie("expand 32-byte k"),Ln=st(Un),Cn=st(In);function T(e,t){return e<<t|e>>>32-t}function Mt(e){return e.byteOffset%4===0}const bt=64,_n=16,Le=2**32-1,ce=new Uint32Array;function Sn(e,t,n,r,o,s,i,c){const f=o.length,h=new Uint8Array(bt),a=st(h),l=Mt(o)&&Mt(s),w=l?st(o):ce,g=l?st(s):ce;for(let b=0;b<f;i++){if(e(t,n,r,a,i,c),i>=Le)throw new Error("arx: counter overflow");const p=Math.min(bt,f-b);if(l&&p===bt){const y=b/4;if(b%4!==0)throw new Error("arx: invalid block position");for(let B=0,M;B<_n;B++)M=y+B,g[M]=w[M]^a[B];b+=bt;continue}for(let y=0,B;y<p;y++)B=b+y,s[B]=o[B]^h[y];b+=p}}function kn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=bn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Kt(o),Kt(i),Ht(s),Ht(n),(c,f,h,a,l=0)=>{$(c),$(f),$(h);const w=h.length;if(a===void 0&&(a=new Uint8Array(w)),$(a),Kt(l),l<0||l>=Le)throw new Error("arx: counter overflow");if(a.length<w)throw new Error(`arx: output (${a.length}) is shorter than data (${w})`);const g=[];let b=c.length,p,y;if(b===32)g.push(p=Rt(c)),y=Cn;else if(b===16&&n)p=new Uint8Array(32),p.set(c),p.set(c,16),y=Ln,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${b}`);Mt(f)||g.push(f=Rt(f));const B=st(p);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,B,st(f.subarray(0,16)),B),f=f.subarray(16)}const M=16-o;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,g.push(f)}const z=st(f);return Sn(e,y,B,z,h,a,l,i),yt(...g),a}}const N=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class vn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Ft(t),$(t,32);const n=N(t,0),r=N(t,2),o=N(t,4),s=N(t,6),i=N(t,8),c=N(t,10),f=N(t,12),h=N(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|c<<2)&8191,this.r[7]=(c>>>11|f<<5)&8065,this.r[8]=(f>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=N(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,c=i[0],f=i[1],h=i[2],a=i[3],l=i[4],w=i[5],g=i[6],b=i[7],p=i[8],y=i[9],B=N(t,n+0),M=N(t,n+2),z=N(t,n+4),O=N(t,n+6),j=N(t,n+8),v=N(t,n+10),H=N(t,n+12),R=N(t,n+14);let C=s[0]+(B&8191),_=s[1]+((B>>>13|M<<3)&8191),S=s[2]+((M>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),d=s[4]+((O>>>4|j<<12)&8191),x=s[5]+(j>>>1&8191),m=s[6]+((j>>>14|v<<2)&8191),I=s[7]+((v>>>11|H<<5)&8191),E=s[8]+((H>>>8|R<<8)&8191),A=s[9]+(R>>>5|o),u=0,U=u+C*c+_*(5*y)+S*(5*p)+k*(5*b)+d*(5*g);u=U>>>13,U&=8191,U+=x*(5*w)+m*(5*l)+I*(5*a)+E*(5*h)+A*(5*f),u+=U>>>13,U&=8191;let L=u+C*f+_*c+S*(5*y)+k*(5*p)+d*(5*b);u=L>>>13,L&=8191,L+=x*(5*g)+m*(5*w)+I*(5*l)+E*(5*a)+A*(5*h),u+=L>>>13,L&=8191;let F=u+C*h+_*f+S*c+k*(5*y)+d*(5*p);u=F>>>13,F&=8191,F+=x*(5*b)+m*(5*g)+I*(5*w)+E*(5*l)+A*(5*a),u+=F>>>13,F&=8191;let P=u+C*a+_*h+S*f+k*c+d*(5*y);u=P>>>13,P&=8191,P+=x*(5*p)+m*(5*b)+I*(5*g)+E*(5*w)+A*(5*l),u+=P>>>13,P&=8191;let Z=u+C*l+_*a+S*h+k*f+d*c;u=Z>>>13,Z&=8191,Z+=x*(5*y)+m*(5*p)+I*(5*b)+E*(5*g)+A*(5*w),u+=Z>>>13,Z&=8191;let X=u+C*w+_*l+S*a+k*h+d*f;u=X>>>13,X&=8191,X+=x*c+m*(5*y)+I*(5*p)+E*(5*b)+A*(5*g),u+=X>>>13,X&=8191;let G=u+C*g+_*w+S*l+k*a+d*h;u=G>>>13,G&=8191,G+=x*f+m*c+I*(5*y)+E*(5*p)+A*(5*b),u+=G>>>13,G&=8191;let D=u+C*b+_*g+S*w+k*l+d*a;u=D>>>13,D&=8191,D+=x*h+m*f+I*c+E*(5*y)+A*(5*p),u+=D>>>13,D&=8191;let J=u+C*p+_*b+S*g+k*w+d*l;u=J>>>13,J&=8191,J+=x*a+m*h+I*f+E*c+A*(5*y),u+=J>>>13,J&=8191;let Q=u+C*y+_*p+S*b+k*g+d*w;u=Q>>>13,Q&=8191,Q+=x*l+m*a+I*h+E*f+A*c,u+=Q>>>13,Q&=8191,u=(u<<2)+u|0,u=u+U|0,U=u&8191,u=u>>>13,L+=u,s[0]=U,s[1]=L,s[2]=F,s[3]=P,s[4]=Z,s[5]=X,s[6]=G,s[7]=D,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let c=1;c<10;c++)r[c]=t[c]+o,o=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(o^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let i=t[0]+n[0];t[0]=i&65535;for(let c=1;c<8;c++)i=(t[c]+n[c]|0)+(i>>>16)|0,t[c]=i&65535;yt(r)}update(t){se(this),t=Ft(t),$(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){yt(this.h,this.r,this.buffer,this.pad)}digestInto(t){se(this),pn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Kn(e){const t=(r,o)=>e(o).update(Ft(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Tn=Kn(e=>new vn(e));function Hn(e,t,n,r,o,s=20){let i=e[0],c=e[1],f=e[2],h=e[3],a=t[0],l=t[1],w=t[2],g=t[3],b=t[4],p=t[5],y=t[6],B=t[7],M=o,z=n[0],O=n[1],j=n[2],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let P=0;P<s;P+=2)v=v+_|0,A=T(A^v,16),x=x+A|0,_=T(_^x,12),v=v+_|0,A=T(A^v,8),x=x+A|0,_=T(_^x,7),H=H+S|0,u=T(u^H,16),m=m+u|0,S=T(S^m,12),H=H+S|0,u=T(u^H,8),m=m+u|0,S=T(S^m,7),R=R+k|0,U=T(U^R,16),I=I+U|0,k=T(k^I,12),R=R+k|0,U=T(U^R,8),I=I+U|0,k=T(k^I,7),C=C+d|0,L=T(L^C,16),E=E+L|0,d=T(d^E,12),C=C+d|0,L=T(L^C,8),E=E+L|0,d=T(d^E,7),v=v+S|0,L=T(L^v,16),I=I+L|0,S=T(S^I,12),v=v+S|0,L=T(L^v,8),I=I+L|0,S=T(S^I,7),H=H+k|0,A=T(A^H,16),E=E+A|0,k=T(k^E,12),H=H+k|0,A=T(A^H,8),E=E+A|0,k=T(k^E,7),R=R+d|0,u=T(u^R,16),x=x+u|0,d=T(d^x,12),R=R+d|0,u=T(u^R,8),x=x+u|0,d=T(d^x,7),C=C+_|0,U=T(U^C,16),m=m+U|0,_=T(_^m,12),C=C+_|0,U=T(U^C,8),m=m+U|0,_=T(_^m,7);let F=0;r[F++]=i+v|0,r[F++]=c+H|0,r[F++]=f+R|0,r[F++]=h+C|0,r[F++]=a+_|0,r[F++]=l+S|0,r[F++]=w+k|0,r[F++]=g+d|0,r[F++]=b+x|0,r[F++]=p+m|0,r[F++]=y+I|0,r[F++]=B+E|0,r[F++]=M+A|0,r[F++]=z+u|0,r[F++]=O+U|0,r[F++]=j+L|0}const Fn=kn(Hn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Rn=new Uint8Array(16),fe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Rn.subarray(n))},Mn=new Uint8Array(32);function ae(e,t,n,r,o){const s=e(t,n,Mn),i=Tn.create(s);o&&fe(i,o),fe(i,r);const c=An(r.length,o?o.length:0,!0);i.update(c);const f=i.digest();return yt(s,c),f}const On=e=>(t,n,r)=>({encrypt(s,i){const c=s.length;i=oe(c+16,i,!1),i.set(s);const f=i.subarray(0,-16);e(t,n,f,f,1);const h=ae(e,t,n,f,r);return i.set(h,c),yt(h),i},decrypt(s,i){i=oe(s.length-16,i,!1);const c=s.subarray(0,-16),f=s.subarray(-16),h=ae(e,t,n,c,r);if(!mn(f,h))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),yt(h),i}}),pt=En({blockSize:64,nonceLength:12,tagLength:16},On(Fn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0);function Nn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ce:BigInt("0x"+e)}function le(e){return ft(e),Nn(en(Uint8Array.from(e).reverse()))}function zn(e,t){return ge(e.toString(16).padStart(t*2,"0"))}function jn(e,t){return zn(e,t).reverse()}function he(e,t,n){let r;if(typeof t=="string")try{r=ge(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(ye(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const Tt=e=>typeof e=="bigint"&&Ce<=e;function $n(e,t,n){return Tt(e)&&Tt(t)&&Tt(n)&&t<=e&&e<n}function ue(e,t,n,r){if(!$n(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Pn(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const c=e[o];if(i&&c===void 0)return;const f=typeof c;if(f!==s||c===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _e=BigInt(0);BigInt(1);function Se(e,t){const n=e%t;return n>=_e?n:t+n}function W(e,t,n){let r=e;for(;t-- >_e;)r*=r,r%=n;return r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wt=BigInt(0),lt=BigInt(1),mt=BigInt(2);function Vn(e){return Pn(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function Wn(e){const t=Vn(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const f=i||ot,h=c?255:448,a=c?32:56,l=BigInt(c?9:5),w=BigInt(c?121665:39081),g=c?mt**BigInt(254):mt**BigInt(447),b=c?BigInt(8)*mt**BigInt(251)-lt:BigInt(4)*mt**BigInt(445)-lt,p=g+b+lt,y=d=>Se(d,n),B=M(l);function M(d){return jn(y(d),a)}function z(d){const x=he("u coordinate",d,a);return c&&(x[31]&=127),y(le(x))}function O(d){return le(o(he("scalar",d,a)))}function j(d,x){const m=R(z(x),O(d));if(m===wt)throw new Error("invalid private or public key received");return M(m)}function v(d){return j(d,B)}function H(d,x,m){const I=y(d*(x-m));return x=y(x-I),m=y(m+I),{x_2:x,x_3:m}}function R(d,x){ue("u",d,wt,n),ue("scalar",x,g,p);const m=x,I=d;let E=lt,A=wt,u=d,U=lt,L=wt;for(let P=BigInt(h-1);P>=wt;P--){const Z=m>>P<L^=Z,{x_2:E,x_3:u}=H(L,E,u),{x_2:A,x_3:U}=H(L,A,U),L=Z;const X=E+A,G=y(X*X),D=E-A,J=y(D*D),Q=G-J,Ne=u+U,ze=u-U,Gt=y(ze*X),Dt=y(Ne*D),qt=Gt+Dt,Yt=Gt-Dt;u=y(qt*qt),U=y(I*y(Yt*Yt)),E=y(G*J),A=y(Q*(G+y(w*Q)))}({x_2:E,x_3:u}=H(L,E,u)),{x_2:A,x_3:U}=H(L,A,U);const F=s(A);return y(E*F)}const C=(d=f(a))=>d,_={randomSecretKey:C,randomPrivateKey:C};function S(d){const x=_.randomSecretKey(d);return{secretKey:x,publicKey:v(x)}}const k={secret:a,public:a,seed:a};return{keygen:S,getSharedSecret:(d,x)=>j(d,x),getPublicKey:d=>v(d),scalarMult:j,scalarMultBase:v,utils:_,GuBytes:B.slice(),info:{type:"montgomery",lengths:k}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Xn=BigInt(1),de=BigInt(2),Gn=BigInt(3),Dn=BigInt(5);BigInt(8);const ke={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qn(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ke.p,c=e*e%s*e%s,f=W(c,de,s)*c%s,h=W(f,Xn,s)*e%s,a=W(h,Dn,s)*h%s,l=W(a,t,s)*a%s,w=W(l,n,s)*l%s,g=W(w,r,s)*w%s,b=W(g,o,s)*g%s,p=W(b,o,s)*g%s,y=W(p,t,s)*a%s;return{pow_p_5_8:W(y,de,s)*e%s,b2:c}}function Yn(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ot=(()=>{const e=ke.p;return Wn({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=qn(t);return Se(W(n,Gn,e)*r,e)},adjustScalarBytes:Yn})})(),ve=!1;async function Ke(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Pt(e,t){return await Ke(async()=>{const n=Nt(e)?e:await Jn(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},ve,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMult(e,t)})}async function Bt(e){return await Ke(async()=>Pt(e,Ot.GuBytes),()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMultBase(e)})}const Zn=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Jn(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Zn,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},ve,["deriveBits"])}function Nt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Qn{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),tr(ht(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=ht(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:ht(this.transcript)}}}function tr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function ht(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Ut(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function zt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Te(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function er(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function nr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:h}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(h),o+=h.length}n.releaseLock();const s=ht(r),i=s.subarray(0,t),c=Ut(e,s.subarray(t));return{data:i,rest:c}}class Lt{args;body;constructor(t,n){this.args=t,this.body=n}}async function rr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const i=Y.decode(s);if(i.length>48)throw Error("invalid stanza");if(r.push(i),i.length<48)break}const o=ht(r);return{s:new Lt(n,o)}}async function sr(e){const t=new Qn(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await rr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const i=Y.decode(s.slice(4)),{rest:c,transcript:f}=t.close(),h=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:h,MAC:i,headerSize:f.length,rest:Ut(e,c)}}}function He(e){const t=[];t.push(`age-encryption.org/v1
|
|
2
2
|
`);for(const n of e){t.push("-> "+n.args.join(" ")+`
|
|
3
3
|
`);for(let r=0;r<n.body.length;r+=48){let o=r+48;o>n.body.length&&(o=n.body.length),t.push(Y.encode(n.body.subarray(r,o))+`
|
|
4
4
|
`)}n.body.length%48===0&&t.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as r,t as u,s as p}from"./
|
|
1
|
+
import{q as r,t as u,s as p}from"./20zRBBOT.js";import{S as f,_ as k,I as _}from"./BdJnfSuv.js";import{D as h,a as y}from"./XVH4GPVs.js";import{u as M}from"./gt3opOQe.js";import{_ as I}from"./D2AD0cA7.js";import{F as g,aL as l,Z as w,W as C,a1 as n,G as t,X as s}from"./koatKMQr.js";import"./SQImb3Xm.js";import"./0A0GXgOL.js";import"./BhJD15Lv.js";const T=g({__name:"[unlockMethodId]",props:{params:{}},async setup(c){let e,a;const{settingsStore:d}=r(),{projectStore:i}=r();i.initializing?([e,a]=l(()=>p(()=>i.initialized).toBe(!0)),await e,a(),i.addLibraryRoot()):([e,a]=l(()=>i.initialize1()),await e,a(),[e,a]=l(()=>i.initialize2()),await e,a());const o=([e,a]=l(()=>d.getUnlockMethodDetails(c.params.unlockMethodId)),e=await e,a(),e);if(!o)throw u({statusCode:404,statusMessage:"Unlock Method not found"});const m=[{key:"unlockMethodId",label:"Unlock Method ID"},{key:"type",label:"Type"},{key:"createdAt",label:"Created"}];return(b,D)=>(C(),w(t(h),null,{default:n(()=>[s(f,{meta:t(o).meta,"fallback-icon":"mdi-lock-outline",title:t(o).meta.title||`${t(o).type} Unlock Method`,description:t(o).meta.description},null,8,["meta","title","description"]),s(t(y),{title:"Unlock Method Details",items:m},{"item.unlockMethodId":n(()=>[s(t(_),{value:t(o).id},null,8,["value"])]),"item.type":n(()=>[s(t(I),{status:t(o).type,"status-map":t(M)},null,8,["status","status-map"])]),"item.createdAt":n(()=>[s(t(k),{value:t(o).createdAt},null,8,["value"])]),_:1})]),_:1}))}});export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as j,aU as T,aV as E,aB as O,aW as D,aX as H,z as A,A as G,B as W,s as X,_ as q,k as J}from"./
|
|
1
|
+
import{q as j,aU as T,aV as E,aB as O,aW as D,aX as H,z as A,A as G,B as W,s as X,_ as q,k as J}from"./20zRBBOT.js";import"./SQImb3Xm.js";import{c as K,_ as U,a as Z,b as Q}from"./CXMRj2GR.js";import{_ as Y,b as tt,G as et}from"./CucSXtnI.js";import{I as nt}from"./apt5CXWJ.js";import{F as S,j as y,aX as st,Z as v,W as m,G as t,a1 as l,X as g,u as ot,aL as _,J as at,ak as $,al as B,_ as P,a8 as F,L as it,$ as N,a3 as rt}from"./koatKMQr.js";import{_ as ct}from"./BTT16DZE.js";import{P as pt}from"./DOgaXG8Y.js";import"./0A0GXgOL.js";import"./D6E-gKom.js";import"./rwNeRj8A.js";import"./BhJD15Lv.js";import"./DRIP7i-G.js";import"./D0GxoeXH.js";const ut=S({__name:"CompositeInstanceInputNode",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{},instance:{}},setup(s){const e=j(),{instancesStore:n,libraryStore:i,stateStore:p,validationStore:a,operationsStore:o}=e,b=y(()=>p.instanceLocks.get(s.instance.id)),I=y(()=>i.library.components[s.instance.type]),r=y(()=>p.getInstanceState(s.instance.id)),C=st("contextMenu");return(d,u)=>(m(),v(t(Y),{instance:d.instance,component:t(I),entities:t(i).library.entities,state:t(r),editable:t(n).instances.has(d.instance.id),"input-resolver-outputs":t(n).inputResolverOutputs,"input-resolver-dependent-map":t(n).inputResolverDependentMap,"io-type":"inputs","io-mirror":!0,"hide-show-composite":!0,"onSave:args":u[0]||(u[0]=(f,w,h)=>t(n).updateInstance(f,w,h)),"onOperation:launch":u[1]||(u[1]=f=>t(o).launchInstanceOperation(f,d.data.instance)),"onOperation:cancel":u[2]||(u[2]=f=>t(o).cancelInstanceOperation(t(r).lastOperationState.operationId,d.data.instance.id)),onContextmenu:u[3]||(u[3]=f=>t(C)?.showContextMenu(f))},{status:l(()=>[g(t(nt),{state:t(r),"expected-input-hash":t(p).inputHashOutputs.get(d.instance.id)?.inputHash,"validation-output":t(a).validationOutputs.get(d.instance.id)},null,8,["state","expected-input-hash","validation-output"])]),default:l(()=>[g(t(K),{ref_key:"contextMenu",ref:C,stores:t(e),instance:d.instance,component:t(I),state:t(r),editable:!1,locked:!!t(b)},null,8,["stores","instance","component","state","locked"])]),_:1},8,["instance","component","entities","state","editable","input-resolver-outputs","input-resolver-dependent-map"]))}}),dt=S({__name:"CompositeInstanceOutputNode",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{},instance:{}},setup(s){const{libraryStore:e}=j(),n=y(()=>e.library.components[s.instance.type]);return(i,p)=>(m(),v(t(ct),{component:t(n),subtitle:"Outputs",style:{overflow:"visible"}},{default:l(()=>[g(t(tt),{instance:i.instance,component:t(n),entities:t(e).library.entities,type:"outputs",mirror:!0},null,8,["instance","component","entities"])]),_:1},8,["component"]))}}),z=T({name:"instance",getStoreId:(s,e,n)=>`projects/${s}/composites/${e}/${n}`,create:({storeId:s,id:[e,n,i],logger:p})=>E(s,()=>{const{vueFlowStore:a,nodeFactory:o,onNodesMoved:b}=O("instance",e,n,i),{$client:I}=ot(),{instancesStore:r,stateStore:C}=D(e),d=y(()=>C.stateIdToStateMap.get(n)),u=y(()=>{const c=d.value;return c?r.instances.get(c.instanceId):void 0}),f=async()=>{p.info({projectId:e},"initializing composite instance store");const c=await I.workspace.getCompositeViewport.query({projectId:e,stateId:n});c&&(a.defaultViewport.value=c),p.info({projectId:e,stateId:n},"composite instance store initialized")},w=()=>{const c=u.value;if(!c)throw new Error(`Virtual instance not found for state: ${n}`);const M=o.createNodeFromInstance(c,{type:"inputs"}),x=r.getInstanceChildren(c.id);if(o.createNodesForModels(x,[],{readonly:!0}),c.outputs&&Object.keys(c.outputs).length>0){o.createNodeFromInstance(c,{id:"outputs",type:"outputs",readonly:!0}),o.instanceIdToNodeIdMap.set(c.id,M.id);for(const[R,L]of Object.entries(c.outputs))for(const k of L){const V=r.instances.get(k.instanceId);V&&o.createEdgeForInstanceOutput(V,R,k)}}A(a).then(()=>G(a)).then(()=>a.fitView()).then(()=>W(a,b))},h=H(async c=>{await I.workspace.setCompositeViewport.mutate({projectId:e,stateId:n,viewport:c})},1e3);return a.onViewportChange(h),{initialize:f,placeNodes:w,stateId:n,instanceState:d,instance:u,version:i}})}),lt=S({__name:"CompositeInstanceCanvas",async setup(s){let e,n;const{projectStore:i,instancesStore:p,libraryStore:a}=j(),o=z();return i.initializing?([e,n]=_(()=>X(()=>i.initialized).toBe(!0)),await e,n(),i.addLibraryRoot()):([e,n]=_(()=>i.initialize1()),await e,n(),[e,n]=_(()=>i.initialize2()),await e,n()),[e,n]=_(()=>o.initialize()),await e,n(),at(o.placeNodes),(b,I)=>(m(),v(t(et),{canvasId:["instance",t(i).projectId,t(o).stateId,t(o).version],components:t(a).library.components,entities:t(a).library.entities,"input-resolver-outputs":t(p).inputResolverOutputs,editable:""},{"node-instance":l(r=>[g(t(Q),$(B(r)),null,16)]),"node-inputs":l(r=>[t(o).instance?(m(),v(ut,F({key:0},r,{instance:t(o).instance}),null,16,["instance"])):P("",!0)]),"node-outputs":l(r=>[t(o).instance?(m(),v(dt,F({key:0},r,{instance:t(o).instance,type:"outputs"}),null,16,["instance"])):P("",!0)]),"node-hub":l(r=>[g(t(Z),$(B(r)),null,16)]),"panel-bottom-left":l(()=>[g(t(U))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),mt=q(lt,[["__scopeId","data-v-2e3534bb"]]),ft=S({__name:"CompositeInstanceWrapper",props:{projectId:{},stateId:{},version:{}},setup(s){return O.ensureCreated("instance",s.projectId,s.stateId,s.version),z.ensureCreated(s.projectId,s.stateId,s.version),(e,n)=>(m(),v(mt,{"project-id":e.projectId,"state-id":e.stateId,version:e.version},null,8,["project-id","state-id","version"]))}}),yt={key:1,class:"d-flex justify-center align-center h-100"},vt={class:"text-center"},Pt=S({__name:"index",props:{params:{}},setup(s){const{instancesStore:e,stateStore:n}=J(s.params.projectId),i=y(()=>n.stateIdToStateMap.get(s.params.stateId)),p=y(()=>{const a=i.value;return a?e.instances.get(a.instanceId):void 0});return(a,o)=>(m(),v(t(pt),{"project-id":a.params.projectId,"can-unlock":""},{default:l(()=>[t(i)&&t(p)?(m(),v(t(ft),{key:t(e).evaluationVersion,"project-id":a.params.projectId,"state-id":a.params.stateId,version:t(e).evaluationVersion},null,8,["project-id","state-id","version"])):(m(),it("div",yt,[N("div",vt,[o[0]||(o[0]=N("h3",null,"Instance state not found",-1)),N("p",null,"No instance state found for state ID: "+rt(a.params.stateId),1)])]))]),_:1},8,["project-id"]))}});export{Pt as default};
|