@highstate/designer 0.21.1 → 0.26.0
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/{BdRuKvw2.js → -aI73seg.js} +1 -1
- package/.output/public/_nuxt/39D0VL7r.js +1 -0
- package/.output/public/_nuxt/{rscZxuQ2.js → 3T5CmBSF.js} +1 -1
- package/.output/public/_nuxt/4R6BJ3GI.js +1 -0
- package/.output/public/_nuxt/{sB5TSp0H.js → 77UvFSdd.js} +7 -7
- package/.output/public/_nuxt/{B4FDp1sn.js → B0E2rEnI.js} +1 -1
- package/.output/public/_nuxt/B1x03f8R.js +1 -0
- package/.output/public/_nuxt/B2CVdECd.js +1 -0
- package/.output/public/_nuxt/{CTRkBkra.js → B2_u9ZKl.js} +1 -1
- package/.output/public/_nuxt/{5gjbd9sK.js → B8uKU-iG.js} +1 -1
- package/.output/public/_nuxt/{CemiMtCX.js → B9BJCsIg.js} +1 -1
- package/.output/public/_nuxt/{xnReCuE4.js → BBmoak6l.js} +1 -1
- package/.output/public/_nuxt/BEOSfHJT.js +1 -0
- package/.output/public/_nuxt/{DsG1SoRB.js → BJV0IIsR.js} +1 -1
- package/.output/public/_nuxt/{CPsHsqGU.js → BKaSp7fy.js} +1 -1
- package/.output/public/_nuxt/{DKWXhhCy.js → BOujskTX.js} +1 -1
- package/.output/public/_nuxt/{Fcs-0n6A.js → BPboW4rx.js} +1 -1
- package/.output/public/_nuxt/{Djg8J2AC.js → BR4jrf3-.js} +1 -1
- package/.output/public/_nuxt/{CpGRan2R.js → BSRetNRl.js} +1 -1
- package/.output/public/_nuxt/{CqQg8Ldy.js → Ba9NwIJp.js} +1 -1
- package/.output/public/_nuxt/{CJN4g-3R.js → BbWhHw7B.js} +1 -1
- package/.output/public/_nuxt/Bcyj9glE.js +6 -0
- package/.output/public/_nuxt/{CvSiusML.js → Be4ezMZK.js} +1 -1
- package/.output/public/_nuxt/{DkkrdwgN.js → BgvYz3Nr.js} +1 -1
- package/.output/public/_nuxt/BlGDdimO.js +1 -0
- package/.output/public/_nuxt/{D_wY_uke.js → Bn5R9WlL.js} +1 -1
- package/.output/public/_nuxt/{Bs8TB6Bu.js → BqJDg8iS.js} +1 -1
- package/.output/public/_nuxt/BxD6MFcJ.js +1 -0
- package/.output/public/_nuxt/{CaehGOgh.js → BxvmPvww.js} +1 -1
- package/.output/public/_nuxt/{DEtIJe2u.js → By1Fxx6d.js} +1 -1
- package/.output/public/_nuxt/{CnhVSb6R.js → ByBXn3Vz.js} +1 -1
- package/.output/public/_nuxt/C1bzPMRu.js +14 -0
- package/.output/public/_nuxt/{BIPWeF69.js → C29gnYT3.js} +1 -1
- package/.output/public/_nuxt/{BCJKqJxW.js → C5DRPdxC.js} +1 -1
- package/.output/public/_nuxt/{Cs-GjQ8R.js → C794qwo0.js} +1 -1
- package/.output/public/_nuxt/{DSDbyhpJ.js → C9OJ0gQB.js} +1 -1
- package/.output/public/_nuxt/{EnN6XTXK.js → C9n5vGW7.js} +1 -1
- package/.output/public/_nuxt/{B2SoM2pd.js → CCBTuGSI.js} +2 -2
- package/.output/public/_nuxt/{DTPYfUid.js → CGLWlIpJ.js} +1 -1
- package/.output/public/_nuxt/CI40hKzv.js +2 -0
- package/.output/public/_nuxt/{BTd2ZN65.js → CLsyMJ1X.js} +1 -1
- package/.output/public/_nuxt/{ByE1aAlg.js → CNWyx-82.js} +1 -1
- package/.output/public/_nuxt/CRZrAKrA.js +2 -0
- package/.output/public/_nuxt/{B7RpoNQl.js → CRb2z3Pg.js} +1 -1
- package/.output/public/_nuxt/{BzhaMbyl.js → CWA5Cfde.js} +1 -1
- package/.output/public/_nuxt/{CmJE87KM.js → C_yayEmb.js} +1 -1
- package/.output/public/_nuxt/{BwKAHWnp.js → CaZj7sno.js} +1 -1
- package/.output/public/_nuxt/CiaugisX.js +1 -0
- package/.output/public/_nuxt/Cjs5trkS.js +1 -0
- package/.output/public/_nuxt/CoqwalnO.js +2 -0
- package/.output/public/_nuxt/{OuCcJFrZ.js → CscXh7Vy.js} +1 -1
- package/.output/public/_nuxt/{9OHRRPkh.js → CwWsKBf5.js} +1 -1
- package/.output/public/_nuxt/Cwefpg1x.js +1 -0
- package/.output/public/_nuxt/{DtBrxin9.js → CyFj-Mv9.js} +1 -1
- package/.output/public/_nuxt/{C973_vs5.js → D1BdWMiq.js} +1 -1
- package/.output/public/_nuxt/D1yXAE_w.js +1 -0
- package/.output/public/_nuxt/{Bl_Sz9PU.js → D2lHwbtX.js} +1 -1
- package/.output/public/_nuxt/{Dahes9VH.js → D46u9gXN.js} +1 -1
- package/.output/public/_nuxt/{D-7HtdRe.js → D4H6aUyZ.js} +7 -7
- package/.output/public/_nuxt/D9ITfHnZ.js +269 -0
- package/.output/public/_nuxt/{C2zyO9uX.js → DFwfZeyL.js} +1 -1
- package/.output/public/_nuxt/{UD_auLNX.js → DMM9kDc1.js} +1 -1
- package/.output/public/_nuxt/{wCosSBIO.js → DNVXBFXP.js} +1 -1
- package/.output/public/_nuxt/{DXyfavJr.js → DPQHj1GW.js} +1 -1
- package/.output/public/_nuxt/{CBIEPWAA.js → DRTFVhVr.js} +1 -1
- package/.output/public/_nuxt/{GXzlut8R.js → DTYY2tCY.js} +1 -1
- package/.output/public/_nuxt/{hAFXcJ2_.js → DVKmRHSk.js} +1 -1
- package/.output/public/_nuxt/{DdvHdmGh.js → DYYyOkJe.js} +1 -1
- package/.output/public/_nuxt/{DUHba1vY.js → DcV32yum.js} +1 -1
- package/.output/public/_nuxt/DdhYQ3Tv.js +1 -0
- package/.output/public/_nuxt/DmMgvbsF.js +1 -0
- package/.output/public/_nuxt/{DnpKvmH_.js → DrQCNsTo.js} +1 -1
- package/.output/public/_nuxt/{DSpiceQe.js → DvCXikgN.js} +1 -1
- package/.output/public/_nuxt/DzQULtcW.js +1 -0
- package/.output/public/_nuxt/{BArXRmKu.js → DzowYWbi.js} +1 -1
- package/.output/public/_nuxt/{CtbC3i8L.js → I4u-TRO-.js} +1 -1
- package/.output/public/_nuxt/{y0GN4iGv.js → O3nsZ-Uz.js} +1 -1
- package/.output/public/_nuxt/Qj4UhtaN.js +1 -0
- package/.output/public/_nuxt/{Bdd5S2WL.js → VF7GAmoY.js} +1 -1
- package/.output/public/_nuxt/{Lks7C8cK.js → YpnHruhZ.js} +1 -1
- package/.output/public/_nuxt/_pageId_.C5KTkEfy.css +1 -0
- package/.output/public/_nuxt/_panelId_.CKSHyLNC.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/53add2c3-4d7c-4a4f-a116-e73c3787cf98.json +1 -0
- package/.output/public/_nuxt/components.a-P9dVi2.css +1 -0
- package/.output/public/_nuxt/{entry.Bc0aTA0K.css → entry.DsBbjDm-.css} +1 -1
- package/.output/public/_nuxt/error-404.DnBTUElh.css +1 -0
- package/.output/public/_nuxt/error-500.BNyYF0qG.css +1 -0
- package/.output/public/_nuxt/{CBVcjGJL.js → fbfpKHgl.js} +1 -1
- package/.output/public/_nuxt/{BD_Kvn-W.js → fxmP1KZw.js} +1 -1
- package/.output/public/_nuxt/graph-resolver-DhjyrFRu.js +180 -0
- package/.output/public/_nuxt/{DCK6hB22.js → hunqYsQf.js} +1 -1
- package/.output/public/_nuxt/iJghVVcV.js +1 -0
- package/.output/public/_nuxt/{Bu1xs0Fv.js → m4Sxwg8n.js} +1 -1
- package/.output/public/_nuxt/{C4XpvUuq.js → rpHuDh4d.js} +1 -1
- package/.output/public/_nuxt/{vuetify.BzdWZaIq.css → vuetify.DtnS3-VQ.css} +1 -1
- package/.output/server/index.mjs +2040 -1079
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/ws/lib/buffer-util.js +131 -0
- package/.output/server/node_modules/ws/lib/constants.js +19 -0
- package/.output/server/node_modules/ws/lib/event-target.js +292 -0
- package/.output/server/node_modules/ws/lib/extension.js +203 -0
- package/.output/server/node_modules/ws/lib/limiter.js +55 -0
- package/.output/server/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/.output/server/node_modules/ws/lib/receiver.js +706 -0
- package/.output/server/node_modules/ws/lib/sender.js +602 -0
- package/.output/server/node_modules/ws/lib/stream.js +161 -0
- package/.output/server/node_modules/ws/lib/subprotocol.js +62 -0
- package/.output/server/node_modules/ws/lib/validation.js +152 -0
- package/.output/server/node_modules/ws/lib/websocket-server.js +554 -0
- package/.output/server/node_modules/ws/lib/websocket.js +1393 -0
- package/.output/server/node_modules/ws/package.json +70 -0
- package/.output/server/node_modules/ws/wrapper.mjs +21 -0
- package/.output/server/package.json +2 -1
- package/package.json +4 -4
- package/.output/public/_nuxt/-OnKOwAh.js +0 -1
- package/.output/public/_nuxt/B-dJABhs.js +0 -1
- package/.output/public/_nuxt/BKIVPvZX.js +0 -1
- package/.output/public/_nuxt/BXphdu9w.js +0 -2
- package/.output/public/_nuxt/BYmSxWA_.js +0 -1
- package/.output/public/_nuxt/BhozkjGO.js +0 -1
- package/.output/public/_nuxt/BtrNScOx.js +0 -1
- package/.output/public/_nuxt/BupMEc6X.js +0 -6
- package/.output/public/_nuxt/Bv_vOb-Y.js +0 -14
- package/.output/public/_nuxt/CYL3VlR9.js +0 -1
- package/.output/public/_nuxt/Cz-197mS.js +0 -1
- package/.output/public/_nuxt/DHJ62FKo.js +0 -2
- package/.output/public/_nuxt/DrWe3t51.js +0 -2
- package/.output/public/_nuxt/M0WOzN-S.js +0 -269
- package/.output/public/_nuxt/ZpmLW6rw.js +0 -1
- package/.output/public/_nuxt/builds/meta/d356de5d-6230-4e66-aba2-c48f455ae207.json +0 -1
- package/.output/public/_nuxt/builds/meta/ed797280-2bf0-44e6-a601-2ff2462bfbbc.json +0 -1
- package/.output/public/_nuxt/c6k-jVO-.js +0 -1
- package/.output/public/_nuxt/components.CIe9upZ4.css +0 -1
- package/.output/public/_nuxt/error-404.iOXvqd5J.css +0 -1
- package/.output/public/_nuxt/error-500.D0BgXBui.css +0 -1
- package/.output/public/_nuxt/graph-resolver-E9RSC1Ga.js +0 -180
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{a1 as Yt,a0 as Oi,m as an,a2 as zt,a3 as Ri,a4 as Mn,a5 as Nt,_ as oe,a6 as En,a7 as gt,Z as Wt,a8 as Nn,a9 as On,aa as Ti,ab as zi,ac as ut,ad as He,ae as Bi,af as Pi,ag as Hi,ah as Fi,P as ji,ai as Rn,aj as Di,ak as De,k as Bt,al as sn,am as Li,an as Ui,ao as qi,I as Tn,ap as Xi,aq as zn,Q as Yi,ar as Wi,L as Bn,as as Gi}from"#entry";import{E as X,b4 as Ki,V as v,J as O,aa as D,ab as te,a1 as z,a6 as ke,j as A,Y as C,ai as Gt,D as h,_ as k,W as I,Z as ne,$ as U,a5 as Z,a7 as Ce,a2 as F,t as qe,F as Pn,a8 as Ji,af as Hn,l as Zi,a0 as J,r as ce,i as Qi,av as $e,ag as Oe,a4 as _i,G as eo,w as Xe,b5 as to,aw as Ae,aU as Fn,aG as Qe,ak as jn,b6 as no,b7 as io,aN as Dn,b8 as oo,aP as Ve,d as Ln,ah as Un,as as we,aj as St,aH as ao,a as Te,aQ as qn,aJ as $t,aK as Ye,at as ue,n as vt,ap as so,a$ as Xn,am as ro,ao as Me,al as lo,au as Yn,aV as Kt,H as uo,p as rn,b3 as co,aI as fo,b0 as ho,b2 as mo,b9 as go,b1 as vo,u as Wn,ba as yo}from"./sB5TSp0H.js";import{t as ln,a as po,_ as wo}from"./DXyfavJr.js";import{C as Ct}from"./D_wY_uke.js";import{V as un}from"./C973_vs5.js";import{I as Gn}from"./C4XpvUuq.js";import{_ as bo}from"./CBVcjGJL.js";import{_ as Kn}from"./Lks7C8cK.js";import{r as ko,g as xo}from"./BxAss8Tj.js";function Io(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return ln(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>ln(o,i),i)}throw Error("Wrong number of arguments")}function tt(...e){return Io(So,e)}function So(){let e=new Set;return t=>e.has(t)?po:(e.add(t),{done:!1,hasNext:!0,next:t})}function $o(e,t,n){const i=Array.from({length:n},()=>[]),o=t,s=-(o*(n-1))/2,r=Array.from({length:n},(l,d)=>s+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],m=f[0]-d[0],w=f[1]-d[1],x=Math.sqrt(m*m+w*w);let N=-w,V=m;x!==0&&(N/=x,V/=x),u.push({x:N,y:V})}function c(l,d,f,m){const w=l[0],x=l[1],N=d[0],V=d[1],M=f[0],R=f[1],T=m[0],q=m[1],Y=(w-N)*(R-q)-(x-V)*(M-T);if(Y===0)return null;const P=((w-M)*(R-q)-(x-R)*(M-T))/Y;return[w+P*(N-w),x+P*(V-x)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let m=0,w=0;if(d===0)m=u[0].x*r[l],w=u[0].y*r[l];else if(d===e.length-1)m=u[u.length-1].x*r[l],w=u[u.length-1].y*r[l];else{const x=u[d-1],N=u[d],V=e[d-1],M=e[d+1],R=[V[0]+x.x*r[l],V[1]+x.y*r[l]],T=[f[0]+x.x*r[l],f[1]+x.y*r[l]],q=[f[0]+N.x*r[l],f[1]+N.y*r[l]],Y=[M[0]+N.x*r[l],M[1]+N.y*r[l]],P=c(R,T,q,Y);P?(m=P[0]-f[0],w=P[1]-f[1]):(m=(x.x+N.x)/2*r[l],w=(x.y+N.y)/2*r[l])}i[l].push(`${f[0]+m},${f[1]+w}`)}return i}const Co=["points","stroke"],Vo=["points"],nt=3,Ao=X({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},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){Ki(p=>({v04971dc8:nt}));const t=Yt(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:a,outputKey:s,inputKey:r,inputNodeType:u}=Oi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=A(()=>{if(u==="outputs"){const y=e.components[n.type].outputs[r];return{all:y?[y.type]:[]}}if(i&&n){const y=e.components[n.type].inputs[r],S=zt(e.inputResolverOutputs,n.id),b=tt((S[r]??[]).map(E=>E.type));return b.length>0?{all:b,visible:b}:{all:y?[y.type]:[],visible:b}}if(a&&n&&r)return{all:(zt(e.inputResolverOutputs,n.id)[r]??[]).map(y=>y.type)};if(a&&n)return{all:Mn(e.inputResolverOutputs,n.id).map(p=>p.type),visible:Ri(e.inputResolverOutputs,n.id).map(p=>p.type)};if(i&&o){const p=Nt(e.inputResolverOutputs,o.id).filter(b=>b.input.instanceId===i.id&&b.input.output===s).map(b=>b.type);if(p.length>0)return{all:tt(p)};const S=e.components[i.type].outputs[s];return{all:S?[S.type]:[]}}if(a&&o)return{all:Nt(e.inputResolverOutputs,a.id).flat().map(p=>p.type)};throw an.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:a,outputKey:s,inputKey:r}),new Error("Invalid connection")}),l=A(()=>tt(c.value.all).map(p=>e.entities[p])),d=A(()=>{if(!a)return[];const p=Nt(e.inputResolverOutputs,a.id).map(y=>y.type);return tt(p).sort()}),f=A(()=>!!a&&e.data.hubReservedGhostLane),m=A(()=>!!a&&e.data.isPendingHubTyped),w=A(()=>!!a&&!!n&&!!r),x=A(()=>w.value?e.components[n.type].inputs[r]?.type:void 0),N=A(()=>{if(!a||!w.value)return!1;const p=x.value;return p?!d.value.includes(p):!1}),V=A(()=>m.value||N.value),M=A(()=>a?V.value?!0:f.value:!1);e.data.isOutputProjection&&an.debug({source:e.source,target:e.target,sourceHandleId:e.sourceHandleId,targetHandleId:e.targetHandleId,isOutputProjection:e.data.isOutputProjection,isOutputProjectionUnresolved:e.data.isOutputProjectionUnresolved},"rendering projection edge in CustomEdge");const R=A(()=>M.value&&d.value.length>0),T=A(()=>c.value.visible?c.value.visible.length===0:a?c.value.all.length===0:!1),q=A(()=>{if(!a)return T.value?1:l.value.length;if(P.value)return 1;const y=d.value.length+(R.value?1:0);return Math.max(1,y)}),Y=p=>a?d.value.length===0?!0:R.value&&p===q.value-1:T.value,P=A(()=>!!a&&!!n&&!!r),B=()=>P.value?e.components[n.type].inputs[r]?.type:void 0,j=A(()=>{if(!P.value)return!1;const p=B();return p?!d.value.includes(p):!1}),L=p=>{if(e.data.isOutputProjection&&e.data.isOutputProjectionUnresolved)return"#9E9E9E";if(P.value){if(j.value)return"#9E9E9E";const y=B();return(y?e.entities[y]:void 0)?.meta.color??"#607D8B"}if(Y(p))return"#9E9E9E";if(a){const y=d.value[p];return e.entities[y]?.meta.color??"#607D8B"}return l.value[p%l.value.length].meta.color??"#607D8B"},Q=p=>a?P.value?p===0:T.value?Y(p):c.value.visible?Y(p)?!1:c.value.visible.includes(d.value[p]):!Y(p):T.value?!0:c.value.visible?c.value.visible.includes(l.value[p].type):!0,ee=(p,y)=>p[0]===y[0]&&p[1]===y[1],ae=A(()=>{if(!e.data.points)return[];const p=[e.sourceX,e.data.routedSourceY??e.sourceY],y=[e.targetX,e.data.routedTargetY??e.targetY],S=[...e.data.points];return(!S[0]||!ee(S[0],p))&&S.unshift(p),(!S[S.length-1]||!ee(S[S.length-1],y))&&S.push(y),$o(S,nt,q.value)}),g=p=>{const S=1/q.value;return`-${p*S}s`};return(p,y)=>(v(),O(D,null,[(v(!0),O(D,null,te(ae.value,(S,b)=>(v(),O(D,{key:`static-${b}`},[Q(b)?(v(),O("polyline",{key:0,points:S.join(" "),stroke:L(b),fill:"none","stroke-width":nt,style:{opacity:"0.8"}},null,8,Co)):z("",!0)],64))),128)),(v(!0),O(D,null,te(ae.value,(S,b)=>(v(),O(D,{key:`highlight-${b}`},[Q(b)?(v(),O("polyline",{key:0,points:S.join(" "),stroke:"white",fill:"none","stroke-width":nt,class:"highlight-polyline animated-highlight",style:ke({animationDelay:g(b)})},null,12,Vo)):z("",!0)],64))),128))],64))}}),Mo=oe(Ao,[["__scopeId","data-v-58cdfca4"]]);function Eo(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 No=X({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(v(),C(Gt,{variant:"flat",style:ke(h(Eo)(e.selected,e.blueprintStatus)),color:"#2d2d2d"},{default:k(()=>[I(ne,{class:"ma-2",size:74},{default:k(()=>[...n[0]||(n[0]=[U("mdi-router",-1)])]),_:1}),Z(t.$slots,"default")]),_:3},8,["style"]))}}),Oo=X({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(v(),O(D,null,[I(h(En),{id:"",type:e.side==="left"?"target":"source",position:e.side==="left"?h(gt).Left:h(gt).Right,class:Ce(["handle",[e.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":e.isValidConnection},null,8,["type","position","class","is-valid-connection"]),F("div",{class:Ce(["handle-dot",[e.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:e.handleColor})},null,6)],64))}}),cn=oe(Oo,[["__scopeId","data-v-1aff1180"]]),Ro={class:"handles"},To=X({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Wt(),a=Nn(),s=A(()=>On(a.node,i));return(r,u)=>(v(),C(No,{class:"hub-card",selected:h(o).isNodeSelected(h(a).node),"blueprint-status":h(s),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:k(()=>[Z(r.$slots,"default",{},void 0,!0),F("div",Ro,[I(cn,{"handle-color":"#3F51B5",side:"left","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"]),I(cn,{"handle-color":"#3F51B5",side:"right","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Hu=oe(To,[["__scopeId","data-v-79b30d7c"]]),zo=X({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=A(()=>{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)=>h(t)?(v(),O("div",{key:0,class:"selection-rectangle",style:ke(h(t))},null,4)):z("",!0)}}),Bo=oe(zo,[["__scopeId","data-v-6118cbbb"]]);var ye=(e=>(e.Lines="lines",e.Dots="dots",e))(ye||{});const Jn=function({dimensions:e,size:t,color:n}){return Pn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Zn=function({radius:e,color:t}){return Pn("circle",{cx:e,cy:e,r:e,fill:t})};ye.Lines+"",ye.Dots+"";const Po={[ye.Dots]:"#81818a",[ye.Lines]:"#eee"},Ho=["id","x","y","width","height","patternTransform"],Fo={key:2,height:"100",width:"100"},jo=["fill"],Do=["x","y","fill"],Lo={name:"Background",compatConfig:{MODE:3}},Uo=X({...Lo,props:{id:{},variant:{default:()=>ye.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}=Yt(),i=A(()=>{const s=n.value.zoom,[r,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[r*s||1,u*s||1],l=e.size*s,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],m=[d*s||1+c[0]/2,f*s||1+c[1]/2];return{scaledGap:c,offset:m,size:l}}),o=qe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=qe(()=>e.color||e.patternColor||Po[e.variant||ye.Dots]);return(s,r)=>(v(),O("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${s.height>100?100:s.height}%`,width:`${s.width>100?100:s.width}%`})},[Z(s.$slots,"pattern-container",{id:o.value},()=>[F("pattern",{id:o.value,x:h(n).x%i.value.scaledGap[0],y:h(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"},[Z(s.$slots,"pattern",{},()=>[s.variant===h(ye).Lines?(v(),C(h(Jn),{key:0,size:s.lineWidth,color:a.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):s.variant===h(ye).Dots?(v(),C(h(Zn),{key:1,color:a.value,radius:i.value.size/2},null,8,["color","radius"])):z("",!0),s.bgColor?(v(),O("svg",Fo,[F("rect",{width:"100%",height:"100%",fill:s.bgColor},null,8,jo)])):z("",!0)])],8,Ho)]),F("rect",{x:s.x,y:s.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Do),Z(s.$slots,"default",{id:o.value})],4))}});var qo={value:()=>{}};function Jt(){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 ct(n)}function ct(e){this._=e}function Xo(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}})}ct.prototype=Jt.prototype={constructor:ct,on:function(e,t){var n=this._,i=Xo(e+"",n),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=Yo(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(o=(e=i[a]).type)n[o]=dn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=dn(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 ct(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,a;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[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,a=i.length;o<a;++o)i[o].value.apply(t,n)}};function Yo(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function dn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=qo,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Pt="http://www.w3.org/1999/xhtml";const fn={svg:"http://www.w3.org/2000/svg",xhtml:Pt,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)),fn.hasOwnProperty(t)?{space:fn[t],local:e}:e}function Wo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pt&&t.documentElement.namespaceURI===Pt?t.createElement(e):t.createElementNS(n,e)}}function Go(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qn(e){var t=Vt(e);return(t.local?Go:Wo)(t)}function Ko(){}function Zt(e){return e==null?Ko:function(){return this.querySelector(e)}}function Jo(e){typeof e!="function"&&(e=Zt(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=new Array(s),u,c,l=0;l<s;++l)(u=a[l])&&(c=e.call(u,u.__data__,l,a))&&("__data__"in u&&(c.__data__=u.__data__),r[l]=c);return new le(i,this._parents)}function Zo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Qo(){return[]}function _n(e){return e==null?Qo:function(){return this.querySelectorAll(e)}}function _o(e){return function(){return Zo(e.apply(this,arguments))}}function ea(e){typeof e=="function"?e=_o(e):e=_n(e);for(var t=this._groups,n=t.length,i=[],o=[],a=0;a<n;++a)for(var s=t[a],r=s.length,u,c=0;c<r;++c)(u=s[c])&&(i.push(e.call(u,u.__data__,c,s)),o.push(u));return new le(i,o)}function ei(e){return function(){return this.matches(e)}}function ti(e){return function(t){return t.matches(e)}}var ta=Array.prototype.find;function na(e){return function(){return ta.call(this.children,e)}}function ia(){return this.firstElementChild}function oa(e){return this.select(e==null?ia:na(typeof e=="function"?e:ti(e)))}var aa=Array.prototype.filter;function sa(){return Array.from(this.children)}function ra(e){return function(){return aa.call(this.children,e)}}function la(e){return this.selectAll(e==null?sa:ra(typeof e=="function"?e:ti(e)))}function ua(e){typeof e!="function"&&(e=ei(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&r.push(u);return new le(i,this._parents)}function ni(e){return new Array(e.length)}function ca(){return new le(this._enter||this._groups.map(ni),this._parents)}function yt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yt.prototype={constructor:yt,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 da(e){return function(){return e}}function fa(e,t,n,i,o,a){for(var s=0,r,u=t.length,c=a.length;s<c;++s)(r=t[s])?(r.__data__=a[s],i[s]=r):n[s]=new yt(e,a[s]);for(;s<u;++s)(r=t[s])&&(o[s]=r)}function ha(e,t,n,i,o,a,s){var r,u,c=new Map,l=t.length,d=a.length,f=new Array(l),m;for(r=0;r<l;++r)(u=t[r])&&(f[r]=m=s.call(u,u.__data__,r,t)+"",c.has(m)?o[r]=u:c.set(m,u));for(r=0;r<d;++r)m=s.call(e,a[r],r,a)+"",(u=c.get(m))?(i[r]=u,u.__data__=a[r],c.delete(m)):n[r]=new yt(e,a[r]);for(r=0;r<l;++r)(u=t[r])&&c.get(f[r])===u&&(o[r]=u)}function ma(e){return e.__data__}function ga(e,t){if(!arguments.length)return Array.from(this,ma);var n=t?ha:fa,i=this._parents,o=this._groups;typeof e!="function"&&(e=da(e));for(var a=o.length,s=new Array(a),r=new Array(a),u=new Array(a),c=0;c<a;++c){var l=i[c],d=o[c],f=d.length,m=va(e.call(l,l&&l.__data__,c,i)),w=m.length,x=r[c]=new Array(w),N=s[c]=new Array(w),V=u[c]=new Array(f);n(l,d,x,N,V,m,t);for(var M=0,R=0,T,q;M<w;++M)if(T=x[M]){for(M>=R&&(R=M+1);!(q=N[R])&&++R<w;);T._next=q||null}}return s=new le(s,i),s._enter=r,s._exit=u,s}function va(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ya(){return new le(this._exit||this._groups.map(ni),this._parents)}function pa(e,t,n){var i=this.enter(),o=this,a=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?a.remove():n(a),i&&o?i.merge(o).order():o}function wa(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,a=i.length,s=Math.min(o,a),r=new Array(o),u=0;u<s;++u)for(var c=n[u],l=i[u],d=c.length,f=r[u]=new Array(d),m,w=0;w<d;++w)(m=c[w]||l[w])&&(f[w]=m);for(;u<o;++u)r[u]=n[u];return new le(r,this._parents)}function ba(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function ka(e){e||(e=xa);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),a=0;a<i;++a){for(var s=n[a],r=s.length,u=o[a]=new Array(r),c,l=0;l<r;++l)(c=s[l])&&(u[l]=c);u.sort(t)}return new le(o,this._parents).order()}function xa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ia(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Sa(){return Array.from(this)}function $a(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function Ca(){let e=0;for(const t of this)++e;return e}function Va(){return!this.node()}function Aa(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],a=0,s=o.length,r;a<s;++a)(r=o[a])&&e.call(r,r.__data__,a,o);return this}function Ma(e){return function(){this.removeAttribute(e)}}function Ea(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Na(e,t){return function(){this.setAttribute(e,t)}}function Oa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ra(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ta(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 za(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?Ea:Ma:typeof t=="function"?n.local?Ta:Ra:n.local?Oa:Na)(n,t))}function ii(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ba(e){return function(){this.style.removeProperty(e)}}function Pa(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ha(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Fa(e,t,n){return arguments.length>1?this.each((t==null?Ba:typeof t=="function"?Ha:Pa)(e,t,n??"")):Be(this.node(),e)}function Be(e,t){return e.style.getPropertyValue(t)||ii(e).getComputedStyle(e,null).getPropertyValue(t)}function ja(e){return function(){delete this[e]}}function Da(e,t){return function(){this[e]=t}}function La(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ua(e,t){return arguments.length>1?this.each((t==null?ja:typeof t=="function"?La:Da)(e,t)):this.node()[e]}function oi(e){return e.trim().split(/^|\s+/)}function Qt(e){return e.classList||new ai(e)}function ai(e){this._node=e,this._names=oi(e.getAttribute("class")||"")}ai.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 si(e,t){for(var n=Qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function ri(e,t){for(var n=Qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function qa(e){return function(){si(this,e)}}function Xa(e){return function(){ri(this,e)}}function Ya(e,t){return function(){(t.apply(this,arguments)?si:ri)(this,e)}}function Wa(e,t){var n=oi(e+"");if(arguments.length<2){for(var i=Qt(this.node()),o=-1,a=n.length;++o<a;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Ya:t?qa:Xa)(n,t))}function Ga(){this.textContent=""}function Ka(e){return function(){this.textContent=e}}function Ja(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Za(e){return arguments.length?this.each(e==null?Ga:(typeof e=="function"?Ja:Ka)(e)):this.node().textContent}function Qa(){this.innerHTML=""}function _a(e){return function(){this.innerHTML=e}}function es(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ts(e){return arguments.length?this.each(e==null?Qa:(typeof e=="function"?es:_a)(e)):this.node().innerHTML}function ns(){this.nextSibling&&this.parentNode.appendChild(this)}function is(){return this.each(ns)}function os(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function as(){return this.each(os)}function ss(e){var t=typeof e=="function"?e:Qn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function rs(){return null}function ls(e,t){var n=typeof e=="function"?e:Qn(e),i=t==null?rs:typeof t=="function"?t:Zt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function us(){var e=this.parentNode;e&&e.removeChild(this)}function cs(){return this.each(us)}function ds(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fs(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hs(e){return this.select(e?fs:ds)}function ms(e){return arguments.length?this.property("__data__",e):this.node().__data__}function gs(e){return function(t){e.call(this,t,this.__data__)}}function vs(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 ys(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function ps(e,t,n){return function(){var i=this.__on,o,a=gs(t);if(i){for(var s=0,r=i.length;s<r;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(o):this.__on=[o]}}function ws(e,t,n){var i=vs(e+""),o,a=i.length,s;if(arguments.length<2){var r=this.node().__on;if(r){for(var u=0,c=r.length,l;u<c;++u)for(o=0,l=r[u];o<a;++o)if((s=i[o]).type===l.type&&s.name===l.name)return l.value}return}for(r=t?ps:ys,o=0;o<a;++o)this.each(r(i[o],t,n));return this}function li(e,t,n){var i=ii(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 bs(e,t){return function(){return li(this,e,t)}}function ks(e,t){return function(){return li(this,e,t.apply(this,arguments))}}function xs(e,t){return this.each((typeof t=="function"?ks:bs)(e,t))}function*Is(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var ui=[null];function le(e,t){this._groups=e,this._parents=t}function _e(){return new le([[document.documentElement]],ui)}function Ss(){return this}le.prototype=_e.prototype={constructor:le,select:Jo,selectAll:ea,selectChild:oa,selectChildren:la,filter:ua,data:ga,enter:ca,exit:ya,join:pa,merge:wa,selection:Ss,order:ba,sort:ka,call:Ia,nodes:Sa,node:$a,size:Ca,empty:Va,each:Aa,attr:za,style:Fa,property:Ua,classed:Wa,text:Za,html:ts,raise:is,lower:as,append:ss,insert:ls,remove:cs,clone:hs,datum:ms,on:ws,dispatch:xs,[Symbol.iterator]:Is};function Se(e){return typeof e=="string"?new le([[document.querySelector(e)]],[document.documentElement]):new le([[e]],ui)}function $s(e){let t;for(;t=e.sourceEvent;)e=t;return e}function xe(e,t){if(e=$s(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 Ht={capture:!0,passive:!1};function Ft(e){e.preventDefault(),e.stopImmediatePropagation()}function Cs(e){var t=e.document.documentElement,n=Se(e).on("dragstart.drag",Ft,Ht);"onselectstart"in t?n.on("selectstart.drag",Ft,Ht):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Vs(e,t){var n=e.document.documentElement,i=Se(e).on("dragstart.drag",null);t&&(i.on("click.drag",Ft,Ht),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 _t(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ci(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function et(){}var We=.7,pt=1/We,ze="\\s*([+-]?\\d+)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",As=/^#([0-9a-f]{3,8})$/,Ms=new RegExp(`^rgb\\(${ze},${ze},${ze}\\)$`),Es=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),Ns=new RegExp(`^rgba\\(${ze},${ze},${ze},${Ge}\\)$`),Os=new RegExp(`^rgba\\(${me},${me},${me},${Ge}\\)$`),Rs=new RegExp(`^hsl\\(${Ge},${me},${me}\\)$`),Ts=new RegExp(`^hsla\\(${Ge},${me},${me},${Ge}\\)$`),hn={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};_t(et,Ke,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHex8:zs,formatHsl:Bs,formatRgb:gn,toString:gn});function mn(){return this.rgb().formatHex()}function zs(){return this.rgb().formatHex8()}function Bs(){return di(this).formatHsl()}function gn(){return this.rgb().formatRgb()}function Ke(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=As.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vn(t):n===3?new ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?it(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?it(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=Ms.exec(e))?new ie(t[1],t[2],t[3],1):(t=Es.exec(e))?new ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ns.exec(e))?it(t[1],t[2],t[3],t[4]):(t=Os.exec(e))?it(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Rs.exec(e))?wn(t[1],t[2]/100,t[3]/100,1):(t=Ts.exec(e))?wn(t[1],t[2]/100,t[3]/100,t[4]):hn.hasOwnProperty(e)?vn(hn[e]):e==="transparent"?new ie(NaN,NaN,NaN,0):null}function vn(e){return new ie(e>>16&255,e>>8&255,e&255,1)}function it(e,t,n,i){return i<=0&&(e=t=n=NaN),new ie(e,t,n,i)}function Ps(e){return e instanceof et||(e=Ke(e)),e?(e=e.rgb(),new ie(e.r,e.g,e.b,e.opacity)):new ie}function jt(e,t,n,i){return arguments.length===1?Ps(e):new ie(e,t,n,i??1)}function ie(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}_t(ie,jt,ci(et,{brighter(e){return e=e==null?pt:Math.pow(pt,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?We:Math.pow(We,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(Ne(this.r),Ne(this.g),Ne(this.b),wt(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:yn,formatHex:yn,formatHex8:Hs,formatRgb:pn,toString:pn}));function yn(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}`}function Hs(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}${Ee((isNaN(this.opacity)?1:this.opacity)*255)}`}function pn(){const e=wt(this.opacity);return`${e===1?"rgb(":"rgba("}${Ne(this.r)}, ${Ne(this.g)}, ${Ne(this.b)}${e===1?")":`, ${e})`}`}function wt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ne(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ee(e){return e=Ne(e),(e<16?"0":"")+e.toString(16)}function wn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,n,i)}function di(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof et||(e=Ke(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),a=Math.max(t,n,i),s=NaN,r=a-o,u=(a+o)/2;return r?(t===a?s=(n-i)/r+(n<i)*6:n===a?s=(i-t)/r+2:s=(t-n)/r+4,r/=u<.5?a+o:2-a-o,s*=60):r=u>0&&u<1?0:s,new fe(s,r,u,e.opacity)}function Fs(e,t,n,i){return arguments.length===1?di(e):new fe(e,t,n,i??1)}function fe(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}_t(fe,Fs,ci(et,{brighter(e){return e=e==null?pt:Math.pow(pt,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?We:Math.pow(We,e),new fe(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 ie(Ot(e>=240?e-240:e+120,o,i),Ot(e,o,i),Ot(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new fe(bn(this.h),ot(this.s),ot(this.l),wt(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=wt(this.opacity);return`${e===1?"hsl(":"hsla("}${bn(this.h)}, ${ot(this.s)*100}%, ${ot(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bn(e){return e=(e||0)%360,e<0?e+360:e}function ot(e){return Math.max(0,Math.min(1,e||0))}function Ot(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 fi=e=>()=>e;function js(e,t){return function(n){return e+n*t}}function Ds(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 Ls(e){return(e=+e)==1?hi:function(t,n){return n-t?Ds(t,n,e):fi(isNaN(t)?n:t)}}function hi(e,t){var n=t-e;return n?js(e,n):fi(isNaN(e)?t:e)}const kn=(function e(t){var n=Ls(t);function i(o,a){var s=n((o=jt(o)).r,(a=jt(a)).r),r=n(o.g,a.g),u=n(o.b,a.b),c=hi(o.opacity,a.opacity);return function(l){return o.r=s(l),o.g=r(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i})(1);function Ie(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Dt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rt=new RegExp(Dt.source,"g");function Us(e){return function(){return e}}function qs(e){return function(t){return e(t)+""}}function Xs(e,t){var n=Dt.lastIndex=Rt.lastIndex=0,i,o,a,s=-1,r=[],u=[];for(e=e+"",t=t+"";(i=Dt.exec(e))&&(o=Rt.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),r[s]?r[s]+=a:r[++s]=a),(i=i[0])===(o=o[0])?r[s]?r[s]+=o:r[++s]=o:(r[++s]=null,u.push({i:s,x:Ie(i,o)})),n=Rt.lastIndex;return n<t.length&&(a=t.slice(n),r[s]?r[s]+=a:r[++s]=a),r.length<2?u[0]?qs(u[0].x):Us(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)r[(d=u[l]).i]=d.x(c);return r.join("")})}var xn=180/Math.PI,Lt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mi(e,t,n,i,o,a){var s,r,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(r=Math.sqrt(n*n+i*i))&&(n/=r,i/=r,u/=r),e*i<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*xn,skewX:Math.atan(u)*xn,scaleX:s,scaleY:r}}var at;function Ys(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lt:mi(t.a,t.b,t.c,t.d,t.e,t.f)}function Ws(e){return e==null||(at||(at=document.createElementNS("http://www.w3.org/2000/svg","g")),at.setAttribute("transform",e),!(e=at.transform.baseVal.consolidate()))?Lt:(e=e.matrix,mi(e.a,e.b,e.c,e.d,e.e,e.f))}function gi(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function a(c,l,d,f,m,w){if(c!==d||l!==f){var x=m.push("translate(",null,t,null,n);w.push({i:x-4,x:Ie(c,d)},{i:x-2,x:Ie(l,f)})}else(d||f)&&m.push("translate("+d+t+f+n)}function s(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:Ie(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function r(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:Ie(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,m,w){if(c!==d||l!==f){var x=m.push(o(m)+"scale(",null,",",null,")");w.push({i:x-4,x:Ie(c,d)},{i:x-2,x:Ie(l,f)})}else(d!==1||f!==1)&&m.push(o(m)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),a(c.translateX,c.translateY,l.translateX,l.translateY,d,f),s(c.rotate,l.rotate,d,f),r(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(m){for(var w=-1,x=f.length,N;++w<x;)d[(N=f[w]).i]=N.x(m);return d.join("")}}}var Gs=gi(Ys,"px, ","px)","deg)"),Ks=gi(Ws,", ",")",")"),Js=1e-12;function In(e){return((e=Math.exp(e))+1/e)/2}function Zs(e){return((e=Math.exp(e))-1/e)/2}function Qs(e){return((e=Math.exp(2*e))-1)/(e+1)}const _s=(function e(t,n,i){function o(a,s){var r=a[0],u=a[1],c=a[2],l=s[0],d=s[1],f=s[2],m=l-r,w=d-u,x=m*m+w*w,N,V;if(x<Js)V=Math.log(f/c)/t,N=function(P){return[r+P*m,u+P*w,c*Math.exp(t*P*V)]};else{var M=Math.sqrt(x),R=(f*f-c*c+i*x)/(2*c*n*M),T=(f*f-c*c-i*x)/(2*f*n*M),q=Math.log(Math.sqrt(R*R+1)-R),Y=Math.log(Math.sqrt(T*T+1)-T);V=(Y-q)/t,N=function(P){var B=P*V,j=In(q),L=c/(n*M)*(j*Qs(t*B+q)-Zs(q));return[r+L*m,u+L*w,c*j/In(t*B+q)]}}return N.duration=V*1e3*t/Math.SQRT2,N}return o.rho=function(a){var s=Math.max(.001,+a),r=s*s,u=r*r;return e(s,r,u)},o})(Math.SQRT2,2,4);var Pe=0,Le=0,Fe=0,vi=1e3,bt,Ue,kt=0,Re=0,At=0,Je=typeof performance=="object"&&performance.now?performance:Date,yi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function en(){return Re||(yi(er),Re=Je.now()+At)}function er(){Re=0}function xt(){this._call=this._time=this._next=null}xt.prototype=pi.prototype={constructor:xt,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?en():+n)+(t==null?0:+t),!this._next&&Ue!==this&&(Ue?Ue._next=this:bt=this,Ue=this),this._call=e,this._time=n,Ut()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ut())}};function pi(e,t,n){var i=new xt;return i.restart(e,t,n),i}function tr(){en(),++Pe;for(var e=bt,t;e;)(t=Re-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pe}function Sn(){Re=(kt=Je.now())+At,Pe=Le=0;try{tr()}finally{Pe=0,ir(),Re=0}}function nr(){var e=Je.now(),t=e-kt;t>vi&&(At-=t,kt=e)}function ir(){for(var e,t=bt,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:bt=n);Ue=e,Ut(i)}function Ut(e){if(!Pe){Le&&(Le=clearTimeout(Le));var t=e-Re;t>24?(e<1/0&&(Le=setTimeout(Sn,e-Je.now()-At)),Fe&&(Fe=clearInterval(Fe))):(Fe||(kt=Je.now(),Fe=setInterval(nr,vi)),Pe=1,yi(Sn))}}function $n(e,t,n){var i=new xt;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var or=Jt("start","end","cancel","interrupt"),ar=[],wi=0,Cn=1,qt=2,dt=3,Vn=4,Xt=5,ft=6;function Mt(e,t,n,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;sr(e,n,{name:t,index:i,group:o,on:or,tween:ar,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:wi})}function tn(e,t){var n=he(e,t);if(n.state>wi)throw new Error("too late; already scheduled");return n}function ge(e,t){var n=he(e,t);if(n.state>dt)throw new Error("too late; already running");return n}function he(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function sr(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=pi(a,0,n.time);function a(c){n.state=Cn,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var l,d,f,m;if(n.state!==Cn)return u();for(l in i)if(m=i[l],m.name===n.name){if(m.state===dt)return $n(s);m.state===Vn?(m.state=ft,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[l]):+l<t&&(m.state=ft,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[l])}if($n(function(){n.state===dt&&(n.state=Vn,n.timer.restart(r,n.delay,n.time),r(c))}),n.state=qt,n.on.call("start",e,e.__data__,n.index,n.group),n.state===qt){for(n.state=dt,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(m=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=m);o.length=d+1}}function r(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Xt,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Xt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=ft,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function ht(e,t){var n=e.__transition,i,o,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((i=n[s]).name!==t){a=!1;continue}o=i.state>qt&&i.state<Xt,i.state=ft,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[s]}a&&delete e.__transition}}function rr(e){return this.each(function(){ht(this,e)})}function lr(e,t){var n,i;return function(){var o=ge(this,e),a=o.tween;if(a!==n){i=n=a;for(var s=0,r=i.length;s<r;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function ur(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var a=ge(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var r={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=r;break}u===c&&o.push(r)}a.tween=o}}function cr(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=he(this.node(),n).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((t==null?lr:ur)(n,e,t))}function nn(e,t,n){var i=e._id;return e.each(function(){var o=ge(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return he(o,i).value[t]}}function bi(e,t){var n;return(typeof t=="number"?Ie:t instanceof Ke?kn:(n=Ke(t))?(t=n,kn):Xs)(e,t)}function dr(e){return function(){this.removeAttribute(e)}}function fr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hr(e,t,n){var i,o=n+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=t(i=s,n)}}function mr(e,t,n){var i,o=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=t(i=s,n)}}function gr(e,t,n){var i,o,a;return function(){var s,r=n(this),u;return r==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=r+"",s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r)))}}function vr(e,t,n){var i,o,a;return function(){var s,r=n(this),u;return r==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=r+"",s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r)))}}function yr(e,t){var n=Vt(e),i=n==="transform"?Ks:bi;return this.attrTween(e,typeof t=="function"?(n.local?vr:gr)(n,i,nn(this,"attr."+e,t)):t==null?(n.local?fr:dr)(n):(n.local?mr:hr)(n,i,t))}function pr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function br(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&wr(e,a)),n}return o._value=t,o}function kr(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&pr(e,a)),n}return o._value=t,o}function xr(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?br:kr)(i,t))}function Ir(e,t){return function(){tn(this,e).delay=+t.apply(this,arguments)}}function Sr(e,t){return t=+t,function(){tn(this,e).delay=t}}function $r(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ir:Sr)(t,e)):he(this.node(),t).delay}function Cr(e,t){return function(){ge(this,e).duration=+t.apply(this,arguments)}}function Vr(e,t){return t=+t,function(){ge(this,e).duration=t}}function Ar(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Cr:Vr)(t,e)):he(this.node(),t).duration}function Mr(e,t){if(typeof t!="function")throw new Error;return function(){ge(this,e).ease=t}}function Er(e){var t=this._id;return arguments.length?this.each(Mr(t,e)):he(this.node(),t).ease}function Nr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,e).ease=n}}function Or(e){if(typeof e!="function")throw new Error;return this.each(Nr(this._id,e))}function Rr(e){typeof e!="function"&&(e=ei(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&r.push(u);return new be(i,this._parents,this._name,this._id)}function Tr(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,a=Math.min(i,o),s=new Array(i),r=0;r<a;++r)for(var u=t[r],c=n[r],l=u.length,d=s[r]=new Array(l),f,m=0;m<l;++m)(f=u[m]||c[m])&&(d[m]=f);for(;r<i;++r)s[r]=t[r];return new be(s,this._parents,this._name,this._id)}function zr(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 Br(e,t,n){var i,o,a=zr(t)?tn:ge;return function(){var s=a(this,e),r=s.on;r!==i&&(o=(i=r).copy()).on(t,n),s.on=o}}function Pr(e,t){var n=this._id;return arguments.length<2?he(this.node(),n).on.on(e):this.each(Br(n,e,t))}function Hr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fr(){return this.on("end.remove",Hr(this._id))}function jr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zt(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var r=i[s],u=r.length,c=a[s]=new Array(u),l,d,f=0;f<u;++f)(l=r[f])&&(d=e.call(l,l.__data__,f,r))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,Mt(c[f],t,n,f,c,he(l,n)));return new be(a,this._parents,t,n)}function Dr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_n(e));for(var i=this._groups,o=i.length,a=[],s=[],r=0;r<o;++r)for(var u=i[r],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),m,w=he(l,n),x=0,N=f.length;x<N;++x)(m=f[x])&&Mt(m,t,n,x,f,w);a.push(f),s.push(l)}return new be(a,s,t,n)}var Lr=_e.prototype.constructor;function Ur(){return new Lr(this._groups,this._parents)}function qr(e,t){var n,i,o;return function(){var a=Be(this,e),s=(this.style.removeProperty(e),Be(this,e));return a===s?null:a===n&&s===i?o:o=t(n=a,i=s)}}function ki(e){return function(){this.style.removeProperty(e)}}function Xr(e,t,n){var i,o=n+"",a;return function(){var s=Be(this,e);return s===o?null:s===i?a:a=t(i=s,n)}}function Yr(e,t,n){var i,o,a;return function(){var s=Be(this,e),r=n(this),u=r+"";return r==null&&(u=r=(this.style.removeProperty(e),Be(this,e))),s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r))}}function Wr(e,t){var n,i,o,a="style."+t,s="end."+a,r;return function(){var u=ge(this,e),c=u.on,l=u.value[a]==null?r||(r=ki(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(s,o=l),u.on=i}}function Gr(e,t,n){var i=(e+="")=="transform"?Gs:bi;return t==null?this.styleTween(e,qr(e,i)).on("end.style."+e,ki(e)):typeof t=="function"?this.styleTween(e,Yr(e,i,nn(this,"style."+e,t))).each(Wr(this._id,e)):this.styleTween(e,Xr(e,i,t),n).on("end.style."+e,null)}function Kr(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Jr(e,t,n){var i,o;function a(){var s=t.apply(this,arguments);return s!==o&&(i=(o=s)&&Kr(e,s,n)),i}return a._value=t,a}function Zr(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,Jr(e,t,n??""))}function Qr(e){return function(){this.textContent=e}}function _r(e){return function(){var t=e(this);this.textContent=t??""}}function el(e){return this.tween("text",typeof e=="function"?_r(nn(this,"text",e)):Qr(e==null?"":e+""))}function tl(e){return function(t){this.textContent=e.call(this,t)}}function nl(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&tl(o)),t}return i._value=e,i}function il(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,nl(e))}function ol(){for(var e=this._name,t=this._id,n=xi(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],r=s.length,u,c=0;c<r;++c)if(u=s[c]){var l=he(u,t);Mt(u,e,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new be(i,this._parents,e,n)}function al(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(a,s){var r={value:s},u={value:function(){--o===0&&a()}};n.each(function(){var c=ge(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(u)),c.on=t}),o===0&&a()})}var sl=0;function be(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function xi(){return++sl}var ve=_e.prototype;be.prototype={constructor:be,select:jr,selectAll:Dr,selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:Rr,merge:Tr,selection:Ur,transition:ol,call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:Pr,attr:yr,attrTween:xr,style:Gr,styleTween:Zr,text:el,textTween:il,remove:Fr,tween:cr,delay:$r,duration:Ar,ease:Er,easeVarying:Or,end:al,[Symbol.iterator]:ve[Symbol.iterator]};function rl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ll={time:null,delay:0,duration:250,ease:rl};function ul(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 cl(e){var t,n;e instanceof be?(t=e._id,e=e._name):(t=xi(),(n=ll).time=en(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],r=s.length,u,c=0;c<r;++c)(u=s[c])&&Mt(u,e,t,c,s,n||ul(u,t));return new be(i,this._parents,e,t)}_e.prototype.interrupt=rr;_e.prototype.transition=cl;const st=e=>()=>e;function dl(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 pe(e,t,n){this.k=e,this.x=t,this.y=n}pe.prototype={constructor:pe,scale:function(e){return e===1?this:new pe(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new pe(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 on=new pe(1,0,0);pe.prototype;function Tt(e){e.stopImmediatePropagation()}function je(e){e.preventDefault(),e.stopImmediatePropagation()}function fl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function hl(){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 An(){return this.__zoom||on}function ml(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function gl(){return navigator.maxTouchPoints||"ontouchstart"in this}function vl(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function yl(){var e=fl,t=hl,n=vl,i=ml,o=gl,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],r=250,u=_s,c=Jt("start","zoom","end"),l,d,f,m=500,w=150,x=0,N=10;function V(g){g.property("__zoom",An).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",L).filter(o).on("touchstart.zoom",Q).on("touchmove.zoom",ee).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}V.transform=function(g,p,y,S){var b=g.selection?g.selection():g;b.property("__zoom",An),g!==b?q(g,p,y,S):b.interrupt().each(function(){Y(this,arguments).event(S).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()})},V.scaleBy=function(g,p,y,S){V.scaleTo(g,function(){var b=this.__zoom.k,E=typeof p=="function"?p.apply(this,arguments):p;return b*E},y,S)},V.scaleTo=function(g,p,y,S){V.transform(g,function(){var b=t.apply(this,arguments),E=this.__zoom,$=y==null?T(b):typeof y=="function"?y.apply(this,arguments):y,H=E.invert($),W=typeof p=="function"?p.apply(this,arguments):p;return n(R(M(E,W),$,H),b,s)},y,S)},V.translateBy=function(g,p,y,S){V.transform(g,function(){return n(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof y=="function"?y.apply(this,arguments):y),t.apply(this,arguments),s)},null,S)},V.translateTo=function(g,p,y,S,b){V.transform(g,function(){var E=t.apply(this,arguments),$=this.__zoom,H=S==null?T(E):typeof S=="function"?S.apply(this,arguments):S;return n(on.translate(H[0],H[1]).scale($.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof y=="function"?-y.apply(this,arguments):-y),E,s)},S,b)};function M(g,p){return p=Math.max(a[0],Math.min(a[1],p)),p===g.k?g:new pe(p,g.x,g.y)}function R(g,p,y){var S=p[0]-y[0]*g.k,b=p[1]-y[1]*g.k;return S===g.x&&b===g.y?g:new pe(g.k,S,b)}function T(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function q(g,p,y,S){g.on("start.zoom",function(){Y(this,arguments).event(S).start()}).on("interrupt.zoom end.zoom",function(){Y(this,arguments).event(S).end()}).tween("zoom",function(){var b=this,E=arguments,$=Y(b,E).event(S),H=t.apply(b,E),W=y==null?T(H):typeof y=="function"?y.apply(b,E):y,G=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),K=b.__zoom,_=typeof p=="function"?p.apply(b,E):p,se=u(K.invert(W).concat(G/K.k),_.invert(W).concat(G/_.k));return function(re){if(re===1)re=_;else{var de=se(re),Et=G/de[2];re=new pe(Et,W[0]-de[0]*Et,W[1]-de[1]*Et)}$.zoom(null,re)}})}function Y(g,p,y){return!y&&g.__zooming||new P(g,p)}function P(g,p){this.that=g,this.args=p,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,p),this.taps=0}P.prototype={event:function(g){return g&&(this.sourceEvent=g),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(g,p){return this.mouse&&g!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&g!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&g!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(g){var p=Se(this.that).datum();c.call(g,this.that,new dl(g,{sourceEvent:this.sourceEvent,target:V,transform:this.that.__zoom,dispatch:c}),p)}};function B(g,...p){if(!e.apply(this,arguments))return;var y=Y(this,p).event(g),S=this.__zoom,b=Math.max(a[0],Math.min(a[1],S.k*Math.pow(2,i.apply(this,arguments)))),E=xe(g);if(y.wheel)(y.mouse[0][0]!==E[0]||y.mouse[0][1]!==E[1])&&(y.mouse[1]=S.invert(y.mouse[0]=E)),clearTimeout(y.wheel);else{if(S.k===b)return;y.mouse=[E,S.invert(E)],ht(this),y.start()}je(g),y.wheel=setTimeout($,w),y.zoom("mouse",n(R(M(S,b),y.mouse[0],y.mouse[1]),y.extent,s));function $(){y.wheel=null,y.end()}}function j(g,...p){if(f||!e.apply(this,arguments))return;var y=g.currentTarget,S=Y(this,p,!0).event(g),b=Se(g.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",G,!0),E=xe(g,y),$=g.clientX,H=g.clientY;Cs(g.view),Tt(g),S.mouse=[E,this.__zoom.invert(E)],ht(this),S.start();function W(K){if(je(K),!S.moved){var _=K.clientX-$,se=K.clientY-H;S.moved=_*_+se*se>x}S.event(K).zoom("mouse",n(R(S.that.__zoom,S.mouse[0]=xe(K,y),S.mouse[1]),S.extent,s))}function G(K){b.on("mousemove.zoom mouseup.zoom",null),Vs(K.view,S.moved),je(K),S.event(K).end()}}function L(g,...p){if(e.apply(this,arguments)){var y=this.__zoom,S=xe(g.changedTouches?g.changedTouches[0]:g,this),b=y.invert(S),E=y.k*(g.shiftKey?.5:2),$=n(R(M(y,E),S,b),t.apply(this,p),s);je(g),r>0?Se(this).transition().duration(r).call(q,$,S,g):Se(this).call(V.transform,$,S,g)}}function Q(g,...p){if(e.apply(this,arguments)){var y=g.touches,S=y.length,b=Y(this,p,g.changedTouches.length===S).event(g),E,$,H,W;for(Tt(g),$=0;$<S;++$)H=y[$],W=xe(H,this),W=[W,this.__zoom.invert(W),H.identifier],b.touch0?!b.touch1&&b.touch0[2]!==W[2]&&(b.touch1=W,b.taps=0):(b.touch0=W,E=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),E&&(b.taps<2&&(d=W[0],l=setTimeout(function(){l=null},m)),ht(this),b.start())}}function ee(g,...p){if(this.__zooming){var y=Y(this,p).event(g),S=g.changedTouches,b=S.length,E,$,H,W;for(je(g),E=0;E<b;++E)$=S[E],H=xe($,this),y.touch0&&y.touch0[2]===$.identifier?y.touch0[0]=H:y.touch1&&y.touch1[2]===$.identifier&&(y.touch1[0]=H);if($=y.that.__zoom,y.touch1){var G=y.touch0[0],K=y.touch0[1],_=y.touch1[0],se=y.touch1[1],re=(re=_[0]-G[0])*re+(re=_[1]-G[1])*re,de=(de=se[0]-K[0])*de+(de=se[1]-K[1])*de;$=M($,Math.sqrt(re/de)),H=[(G[0]+_[0])/2,(G[1]+_[1])/2],W=[(K[0]+se[0])/2,(K[1]+se[1])/2]}else if(y.touch0)H=y.touch0[0],W=y.touch0[1];else return;y.zoom("touch",n(R($,H,W),y.extent,s))}}function ae(g,...p){if(this.__zooming){var y=Y(this,p).event(g),S=g.changedTouches,b=S.length,E,$;for(Tt(g),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),E=0;E<b;++E)$=S[E],y.touch0&&y.touch0[2]===$.identifier?delete y.touch0:y.touch1&&y.touch1[2]===$.identifier&&delete y.touch1;if(y.touch1&&!y.touch0&&(y.touch0=y.touch1,delete y.touch1),y.touch0)y.touch0[1]=this.__zoom.invert(y.touch0[0]);else if(y.end(),y.taps===2&&($=xe($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<N)){var H=Se(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return V.wheelDelta=function(g){return arguments.length?(i=typeof g=="function"?g:st(+g),V):i},V.filter=function(g){return arguments.length?(e=typeof g=="function"?g:st(!!g),V):e},V.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:st(!!g),V):o},V.extent=function(g){return arguments.length?(t=typeof g=="function"?g:st([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),V):t},V.scaleExtent=function(g){return arguments.length?(a[0]=+g[0],a[1]=+g[1],V):[a[0],a[1]]},V.translateExtent=function(g){return arguments.length?(s[0][0]=+g[0][0],s[1][0]=+g[1][0],s[0][1]=+g[0][1],s[1][1]=+g[1][1],V):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},V.constrain=function(g){return arguments.length?(n=g,V):n},V.duration=function(g){return arguments.length?(r=+g,V):r},V.interpolate=function(g){return arguments.length?(u=g,V):u},V.on=function(){var g=c.on.apply(c,arguments);return g===c?V:g},V.clickDistance=function(g){return arguments.length?(x=(g=+g)*g,V):Math.sqrt(x)},V.tapDistance=function(g){return arguments.length?(N=+g,V):N},V}const Ii=Symbol("MiniMapSlots"),pl=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],wl={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},bl=X({...wl,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=Qi(Ii),o=Hn(),a=qe(()=>o.style??{});function s(d){t("click",d)}function r(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?(v(),O(D,{key:0},[h(i)[`node-${n.type}`]?(v(),C(_i(h(i)[`node-${n.type}`]),$e(Oe({key:0},{...n,...d.$attrs})),null,16)):(v(),O("rect",Oe({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||a.value.background||a.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:s,onDblclick:r,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,pl))],64)):z("",!0)}}),kl=["width","height","viewBox","aria-labelledby"],xl=["id"],Il=["d","fill","stroke","stroke-width"],Sl={name:"MiniMap",compatConfig:{MODE:3}},$l=X({...Sl,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:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Ji(),i=Hn(),o=200,a=150,{id:s,edges:r,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:m,getNodesInitialized:w}=Yt(),x=ce();eo(Ii,n);const N=qe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),V=qe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??a}),M=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",R=A(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=A(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),q=A(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),Y=A(()=>Pi(w.value.filter(b=>!b.hidden))),P=A(()=>({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})),B=A(()=>w.value&&w.value.length?Bi(Y.value,P.value):P.value),j=A(()=>{const b=B.value.width/N.value,E=B.value.height/V.value;return Math.max(b,E)}),L=A(()=>{const b=j.value*N.value,E=j.value*V.value,$=e.offsetScale*j.value;return{offset:$,x:B.value.x-(b-B.value.width)/2-$,y:B.value.y-(E-B.value.height)/2-$,width:b+$*2,height:E+$*2}}),Q=A(()=>!L.value.x||!L.value.y?"":`
|
|
2
|
-
M${L.value.x-L.value.offset},${L.value.y-L.value.offset}
|
|
3
|
-
h${L.value.width+L.value.offset*2}
|
|
4
|
-
v${L.value.height+L.value.offset*2}
|
|
5
|
-
h${-L.value.width-L.value.offset*2}z
|
|
6
|
-
M${P.value.x+e.maskBorderRadius},${P.value.y}
|
|
7
|
-
h${P.value.width-2*e.maskBorderRadius}
|
|
8
|
-
a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 ${e.maskBorderRadius},${e.maskBorderRadius}
|
|
9
|
-
v${P.value.height-2*e.maskBorderRadius}
|
|
10
|
-
a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 -${e.maskBorderRadius},${e.maskBorderRadius}
|
|
11
|
-
h${-(P.value.width-2*e.maskBorderRadius)}
|
|
12
|
-
a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 -${e.maskBorderRadius},-${e.maskBorderRadius}
|
|
13
|
-
v${-(P.value.height-2*e.maskBorderRadius)}
|
|
14
|
-
a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 ${e.maskBorderRadius},-${e.maskBorderRadius}z`);Zi(b=>{if(x.value){const E=Se(x.value),$=G=>{if(G.sourceEvent.type!=="wheel"||!f.value||!m.value)return;const K=G.sourceEvent.ctrlKey&&zi()?10:1,_=-G.sourceEvent.deltaY*(G.sourceEvent.deltaMode===1?.05:G.sourceEvent.deltaMode?1:.002)*e.zoomStep,se=u.value.zoom*2**(_*K);m.value.scaleTo(f.value,se)},H=G=>{if(G.sourceEvent.type!=="mousemove"||!f.value||!m.value)return;const K=j.value*Math.max(1,u.value.zoom)*(e.inversePan?-1:1),_={x:u.value.x-G.sourceEvent.movementX*K,y:u.value.y-G.sourceEvent.movementY*K},se=[[0,0],[l.value.width,l.value.height]],re=on.translate(_.x,_.y).scale(u.value.zoom),de=m.value.constrain()(re,se,c.value);m.value.transform(f.value,de)},W=yl().wheelDelta(G=>Ti(G)*(e.zoomStep/10)).on("zoom",e.pannable?H:()=>{}).on("zoom.wheel",e.zoomable?$:()=>{});E.call(W),b(()=>{E.on("zoom",null)})}},{flush:"post"});function ee(b){const[E,$]=xe(b);t("click",{event:b,position:{x:E,y:$}})}function ae(b,E){const $={event:b,node:E,connectedEdges:He([E],r.value)};d.miniMapNodeClick($),t("nodeClick",$)}function g(b,E){const $={event:b,node:E,connectedEdges:He([E],r.value)};d.miniMapNodeDoubleClick($),t("nodeDblclick",$)}function p(b,E){const $={event:b,node:E,connectedEdges:He([E],r.value)};d.miniMapNodeMouseEnter($),t("nodeMouseenter",$)}function y(b,E){const $={event:b,node:E,connectedEdges:He([E],r.value)};d.miniMapNodeMouseMove($),t("nodeMousemove",$)}function S(b,E){const $={event:b,node:E,connectedEdges:He([E],r.value)};d.miniMapNodeMouseLeave($),t("nodeMouseleave",$)}return(b,E)=>(v(),C(h(ut),{position:b.position,class:Ce(["vue-flow__minimap",{pannable:b.pannable,zoomable:b.zoomable}])},{default:k(()=>[(v(),O("svg",{ref_key:"el",ref:x,width:N.value,height:V.value,viewBox:[L.value.x,L.value.y,L.value.width,L.value.height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${h(s)}`,onClick:ee},[b.ariaLabel?(v(),O("title",{key:0,id:`vue-flow__minimap-${h(s)}`},J(b.ariaLabel),9,xl)):z("",!0),(v(!0),O(D,null,te(h(w),$=>(v(),C(bl,{id:$.id,key:$.id,f:"",position:$.computedPosition,dimensions:$.dimensions,selected:$.selected,dragging:$.dragging,style:ke($.style),class:Ce(q.value($)),color:R.value($),"border-radius":b.nodeBorderRadius,"stroke-color":T.value($),"stroke-width":b.nodeStrokeWidth,"shape-rendering":h(M),type:$.type,hidden:$.hidden,onClick:H=>ae(H,$),onDblclick:H=>g(H,$),onMouseenter:H=>p(H,$),onMousemove:H=>y(H,$),onMouseleave:H=>S(H,$)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","hidden","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),F("path",{class:"vue-flow__minimap-mask",d:Q.value,fill:b.maskColor,stroke:b.maskStrokeColor,"stroke-width":b.maskStrokeWidth,"fill-rule":"evenodd"},null,8,Il)],8,kl))]),_:1},8,["position","class"]))}}),Cl={class:"vue-flow-container"},Vl={key:0},Al={key:0},Ml={key:1},El=X({__name:"GenericCanvas",props:{canvasId:{},inputResolverOutputs:{},components:{},entities:{},interactive:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},minimap:{type:Boolean,default:!0}},emits:["dragover","init"],setup(e,{emit:t}){const n=t,i=Wt.ensureCreated(...e.canvasId);return Xe(()=>e.inputResolverOutputs,o=>{i.edgeEndpointOffsets.setInputResolverOutputs(o)},{immediate:!0}),n("init",i),(o,a)=>{const s=Hi;return v(),C(s,null,{default:k(()=>[F("div",Cl,[I(h(Fi),{"min-zoom":.1,"max-zoom":1,"snap-to-grid":!0,onDragover:a[1]||(a[1]=r=>n("dragover",r))},{"node-instance":k(r=>[Z(o.$slots,"node-instance",$e(Ae(r)),void 0,!0)]),"node-inputs":k(r=>[Z(o.$slots,"node-inputs",$e(Ae(r)),void 0,!0)]),"node-outputs":k(r=>[Z(o.$slots,"node-outputs",$e(Ae(r)),void 0,!0)]),"node-hub":k(r=>[Z(o.$slots,"node-hub",$e(Ae(r)),void 0,!0)]),"edge-custom":k(r=>[I(h(Mo),Oe(r,{"input-resolver-outputs":e.inputResolverOutputs,components:e.components,entities:e.entities}),null,16,["input-resolver-outputs","components","entities"])]),default:k(()=>[I(h(Uo),{"pattern-color":"#aaa",gap:32}),e.minimap?(v(),C(h($l),{key:0,position:"top-right"})):z("",!0),I(h(ut),{position:"top-left"},{default:k(()=>[e.interactive?(v(),O("div",Vl,[a[6]||(a[6]=U(" Hold Control to add nodes to selection and Alt to remove them ",-1)),a[7]||(a[7]=F("br",null,null,-1)),e.editable?(v(),O("div",Al,"Press Ctrl+V to paste blueprint from clipboard")):z("",!0),h(i).selection.selectedNodeIds.size>0?(v(),O("div",Ml,[U(" Selected "+J(h(i).selection.selectedNodeIds.size)+" nodes ",1),a[2]||(a[2]=F("br",null,null,-1)),a[3]||(a[3]=U(" Press Escape to clear selection ",-1)),a[4]||(a[4]=F("br",null,null,-1)),a[5]||(a[5]=U(" Press Ctrl+C to copy selected nodes to clipboard ",-1))])):z("",!0)])):z("",!0)]),_:1}),I(h(ut),{position:"bottom-right"},{default:k(()=>[Z(o.$slots,"panel-bottom-right",{},void 0,!0)]),_:3}),I(h(ut),{position:"bottom-left"},{default:k(()=>[Z(o.$slots,"panel-bottom-left",{},void 0,!0)]),_:3}),I(h(Bo),{"selection-mode":h(i).selection.selectionMode,"selection-area":h(i).selection.selectionArea},null,8,["selection-mode","selection-area"]),I(to,{modelValue:h(i).blueprintCopied,"onUpdate:modelValue":a[0]||(a[0]=r=>h(i).blueprintCopied=r),location:"top center",color:"info"},{default:k(()=>[...a[8]||(a[8]=[U(" Blueprint copied to clipboard ",-1)])]),_:1},8,["modelValue"])]),_:3})])]),_:3})}}}),Fu=oe(El,[["__scopeId","data-v-e548db2f"]]),Nl=["innerHTML"],Ze=X({__name:"ArgumentDescription",props:{description:{}},setup(e){return(t,n)=>(v(),O("div",{class:"markdown-body pl-4 text-disabled",innerHTML:("renderMarkdown"in t?t.renderMarkdown:h(ji))(e.description)},null,8,Nl))}}),Ol={class:"editor"},Rl=X({__name:"CodeArgumentInput",props:{modelValue:{},argument:{},instance:{},readonly:{type:Boolean}},emits:["update:model-value"],setup(e,{emit:t}){const n=ce("");typeof e.modelValue=="string"?n.value=e.modelValue:n.value=Rn.safeParse(e.modelValue)?.data?.value??"";const i=t,o=a=>{e.argument.kind==="code"?i("update:model-value",a):i("update:model-value",{[Di.Yaml]:!0,value:a}),n.value=a};return(a,s)=>(v(),C(Fn,{title:e.argument.title,color:"#2d2d2d","bg-color":"#1e1e1e"},{title:k(()=>[F("div",null,J(e.argument.title),1)]),text:k(()=>[e.argument.description?(v(),C(Ze,{key:0,description:e.argument.description,class:"mb-4"},null,8,["description"])):z("",!0),F("div",Ol,[e.argument.kind==="code"?(v(),C(h(un),{key:0,value:h(n),"onUpdate:value":o,theme:"dark-plus",class:"editor",language:e.argument.language??"text",options:{tabSize:2,readOnly:e.readonly}},null,8,["value","language","options"])):(v(),C(h(un),{key:1,value:h(n),"onUpdate:value":o,theme:"dark-plus",language:"yaml",path:`${e.instance.type}.${e.argument.name}`,options:{tabSize:2,readOnly:e.readonly}},null,8,["value","path","options"]))])]),_:1},8,["title"]))}}),Si=oe(Rl,[["__scopeId","data-v-ff5d2e1f"]]),It=X({__name:"PlainArgumentInput",props:Ve({argument:{},instance:{},isSecret:{type:Boolean},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Qe(e,"modelValue");t.value===void 0&&e.argument.default!==void 0&&(t.value=e.argument.default);const n=ce(!1),i=A(()=>e.isSecret?n.value?"text":"password":"text"),o=A(()=>e.argument.default!=null?String(e.argument.default):"");return(a,s)=>(v(),O("div",null,[e.argument.kind==="input"&&e.argument.type==="string"?(v(),C(jn,{key:0,modelValue:t.value,"onUpdate:modelValue":s[1]||(s[1]=r=>t.value=r),label:e.argument.title,placeholder:h(o),type:h(i),variant:"outlined",density:"compact","hide-details":"",readonly:e.readonly},{"append-inner":k(()=>[e.isSecret?(v(),C(ne,{key:0,onClick:s[0]||(s[0]=r=>n.value=!h(n))},{default:k(()=>[U(J(h(n)?"mdi-eye-off":"mdi-eye"),1)]),_:1})):z("",!0)]),_:1},8,["modelValue","label","placeholder","type","readonly"])):e.argument.kind==="input"&&(e.argument.type==="number"||e.argument.type==="integer")?(v(),C(no,{key:1,modelValue:t.value,"onUpdate:modelValue":s[3]||(s[3]=r=>t.value=r),label:e.argument.title,placeholder:h(o),variant:"outlined",density:"compact","hide-details":"",readonly:e.readonly},{"append-inner":k(()=>[e.isSecret?(v(),C(ne,{key:0,onClick:s[2]||(s[2]=r=>n.value=!h(n))},{default:k(()=>[U(J(h(n)?"mdi-eye-off":"mdi-eye"),1)]),_:1})):z("",!0)]),_:1},8,["modelValue","label","placeholder","readonly"])):e.argument.kind==="combobox"?(v(),C(io,{key:2,modelValue:t.value,"onUpdate:modelValue":s[4]||(s[4]=r=>t.value=r),label:e.argument.title,placeholder:h(o),variant:"outlined",density:"compact",multiple:"",chips:"","hide-details":"",disabled:e.readonly},null,8,["modelValue","label","placeholder","disabled"])):e.argument.kind==="select"?(v(),C(Dn,{key:3,modelValue:t.value,"onUpdate:modelValue":s[5]||(s[5]=r=>t.value=r),label:e.argument.title,placeholder:h(o),items:e.argument.enum,variant:"outlined",density:"compact",multiple:e.argument.multiple,"hide-details":"",disabled:e.readonly},null,8,["modelValue","label","placeholder","items","multiple","disabled"])):(v(),C(oo,{key:4,modelValue:t.value,"onUpdate:modelValue":s[6]||(s[6]=r=>t.value=r),label:e.argument.title,density:"compact","hide-details":"",disabled:e.readonly},null,8,["modelValue","label","disabled"])),e.argument.description?(v(),C(Ze,{key:5,class:"mt-2",description:e.argument.description},null,8,["description"])):z("",!0)]))}}),Tl={class:"d-flex flex-column ga-4"},$i=X({__name:"GroupArgumentInput",props:Ve({argument:{},instance:{},isSecret:{type:Boolean},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Qe(e,"modelValue");t.value===void 0&&(t.value=e.argument.default??{});const n=(o,a)=>{t.value={...t.value,[o]:a}},i=A(()=>e.argument.discriminator?t.value[e.argument.discriminator.name]??"":"");for(const o of e.argument.fields[i.value]??[])t.value[o.name]===void 0&&o.default!==void 0&&(t.value[o.name]=o.default);return Xe(i,o=>{if(!e.argument.discriminator)return;const a=e.argument.fields[o]??[],s={[e.argument.discriminator.name]:o};for(const r of a)s[r.name]=r.default;t.value=s}),(o,a)=>(v(),C(Fn,{color:"#2d2d2d","bg-color":"#2d2d2d"},{title:k(()=>[F("div",null,J(e.argument.title),1)]),text:k(()=>[e.argument.description?(v(),C(Ze,{key:0,description:e.argument.description,class:"mb-4"},null,8,["description"])):z("",!0),F("div",Tl,[e.argument.discriminator?(v(),O(D,{key:1},[F("div",null,[I(Dn,{"model-value":t.value[e.argument.discriminator.name],items:Object.keys(e.argument.fields),label:e.argument.discriminator.title,variant:"outlined",density:"compact","hide-details":"",disabled:e.readonly,"onUpdate:modelValue":a[0]||(a[0]=s=>n(e.argument.discriminator.name,s))},null,8,["model-value","items","label","disabled"]),e.argument.discriminator.description?(v(),C(Ze,{key:0,class:"mt-2",description:e.argument.discriminator.description},null,8,["description"])):z("",!0)]),(v(!0),O(D,null,te(e.argument.fields[h(i)]??[],s=>(v(),C(It,{"model-value":t.value[s.name],key:s.name,argument:s,instance:e.instance,"is-secret":e.isSecret,readonly:e.readonly,"onUpdate:modelValue":r=>n(s.name,r)},null,8,["model-value","argument","instance","is-secret","readonly","onUpdate:modelValue"]))),128))],64)):(v(!0),O(D,{key:0},te(e.argument.fields[""],s=>(v(),C(It,{"model-value":t.value[s.name],key:s.name,argument:s,instance:e.instance,"is-secret":e.isSecret,readonly:e.readonly,"onUpdate:modelValue":r=>n(s.name,r)},null,8,["model-value","argument","instance","is-secret","readonly","onUpdate:modelValue"]))),128))])]),_:1}))}});function Ci(e,t){const n={...e};for(const i in t){const o=t[i];o.schema.default&&n[i]===void 0&&(n[i]=De(o.schema.default))}return n}function Vi(e,t){if(typeof e!="object"||e===null||t.type!=="object"||!t.properties)return e;const n={};for(const i in e){const o=t.properties[i],a=e[i];Ai(a,o)||(n[i]=Vi(a,o))}return n}function Ai(e,t){const n=Rn.safeParse(e);if(n.success)return n.data.value.trim()==="";if(t.default!==void 0){if(e==null)return!0;const i=JSON.stringify(t.default),o=JSON.stringify(Vi(e,t));if(i===o)return!0}return t.type==="boolean"?!1:Array.isArray(e)?e.length===0:typeof e=="object"?e===null||Object.keys(e).length===0:typeof e=="string"?e.trim()==="":typeof e=="number"?isNaN(e)||e===0:typeof e>"u"}function Mi(e,t){const n={};for(const i in e)t[i]&&(Ai(e[i],t[i].schema)||(n[i]=e[i]));return n}function mt(e,t,n,i,o){if(i.type==="boolean")return{name:e,title:t,description:n,kind:"checkbox",default:o??i.default??!1};if(i.type==="array"){if(typeof i.items!="object"||Array.isArray(i.items))return null;if(i.items?.type==="string"||i.items?.type==="number"||i.items?.type==="integer")return i.items.enum?{name:e,title:t,description:n,kind:"select",type:i.items.type,enum:i.items.enum,multiple:!0,default:o??i.default}:{name:e,title:t,description:n,kind:"combobox",type:i.items.type,default:o??i.default}}return i.type!=="string"&&i.type!=="number"&&i.type!=="integer"?null:i.enum?{name:e,title:t,description:n,kind:"select",type:i.type,enum:i.enum,multiple:!1,default:o??i.default}:{name:e,title:t,description:n,kind:"input",type:i.type,default:o??i.default}}function zl(e){return e.type!=="object"?!1:!!(e.additionalProperties&&Object.keys(e.additionalProperties).length>0||e.propertyNames&&Object.keys(e.propertyNames).length>0||e.patternProperties&&Object.keys(e.patternProperties).length>0)}function Bl(e){const t=new Map;for(const n of e)if(!(n.type!=="object"||!n.properties))for(const[i,o]of Object.entries(n.properties)){if(typeof o!="object"||o.const===void 0)continue;const a=t.get(i)??0;t.set(i,a+1)}for(const[n,i]of t.entries()){if(!i||i<e.length)continue;const o=e[0].properties?.[n];if(o&&typeof o=="object"&&o.const!==void 0)return mt(n,o.title??Bt(n),o.description,o)}return null}function Ei(e,t){const n=[],i=[];for(const[o,a]of Object.entries(t)){if(a.schema.anyOf){const r=Bl(a.schema.anyOf);if(r){const u={};for(const c of a.schema.anyOf){if(typeof c!="object"||!c.properties)continue;const d=c.properties[r.name].const?.toString();if(d===void 0)continue;const f=[];for(const[m,w]of Object.entries(c.properties)){if(typeof w!="object"||m===r.name)continue;const x=mt(m,w.title??Bt(m),w.description,w,c.default?.[m]);x&&f.push(x)}u[d]=f}Object.keys(u).length>0&&i.push({name:o,title:a.meta.title,description:a.meta.description??a.schema.description,kind:"group",discriminator:r,fields:u,default:De(a.schema.default)});continue}}if(a.schema.type==="object"){if(a.schema.complex||zl(a.schema))sn(e,o,a.schema),i.push({name:o,title:a.meta.title,description:a.meta.description??a.schema.description,kind:"structured",default:De(a.schema.default)});else{const r=[];for(const[u,c]of Object.entries(a.schema.properties??{})){if(typeof c!="object")continue;const l=mt(u,c.title??Bt(u),c.description,c,a.schema.default?.[u]);l&&r.push(l)}r.length>0&&i.push({name:o,title:a.meta.title,description:a.meta.description??a.schema.description,kind:"group",discriminator:void 0,fields:{"":r},default:De(a.schema.default)})}continue}if(a.schema.type==="string"&&(a.schema.language||a.schema.multiline)){i.push({name:o,title:a.meta.title,description:a.meta.description??a.schema.description,kind:"code",language:Li().optional().safeParse(a.schema.language).data,default:a.schema.default});continue}const s=mt(o,a.meta.title,a.meta.description??a.schema.description,a.schema);if(s){n.push(s);continue}sn(e,o,a.schema),i.push({name:o,title:a.meta.title,description:a.meta.description??a.schema.description,kind:"structured",default:De(a.schema.default)})}return{plainArguments:n,expandableArguments:i}}const Pl="The name of the instance. It must be unique within the same type across the project.",Hl=X({__name:"InstanceArgumentEditor",props:Ve({instance:{},component:{},state:{},allInstances:{},readonly:{type:Boolean,default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:Ve(["save"],["update:modelValue"]),setup(e,{emit:t}){const n=Qe(e,"modelValue"),i=ce(e.instance.name),o=Ln(Ci(e.instance.args??{},e.component.args)),a=async()=>{n.value=!1,await vt(),Object.assign(o,e.instance.args)},s=t,r=async()=>{if(e.readonly){n.value=!1;return}const f=Mi(o,e.component.args);s("save",e.instance.id,i.value,f),await vt(),n.value=!1},u=[f=>!!f||"Name is required",f=>f===e.instance.name||!e.allInstances.has(Ui(e.instance.type,f))||"Instance with this name and type already exists",f=>{const m=qi.safeParse(f);return m.success||m.error.issues[0].message}],{plainArguments:c,expandableArguments:l}=Ei(e.component.type,e.component.args),d=ce(!0);return(f,m)=>(v(),C(Un,{modelValue:n.value,"onUpdate:modelValue":m[2]||(m[2]=w=>n.value=w),class:"dialog",fullscreen:""},{default:k(()=>[I(Gt,{variant:"flat",color:e.component.meta.color??"#2d2d2d",title:e.component.meta.title,subtitle:e.component.meta.description},{prepend:k(()=>[I(h(Ct),{meta:e.component.meta},null,8,["meta"])]),default:k(()=>[I(we),I(St,{class:"d-flex flex-column pt-4 ga-4 dialog-scroll"},{default:k(()=>[I(ao,{modelValue:h(d),"onUpdate:modelValue":m[1]||(m[1]=w=>Te(d)?d.value=w:null)},{default:k(()=>[I(jn,{modelValue:h(i),"onUpdate:modelValue":m[0]||(m[0]=w=>Te(i)?i.value=w:null),label:"Name",variant:"outlined",density:"compact",readonly:e.readonly,rules:u},null,8,["modelValue","readonly"]),I(Ze,{class:"mt-2",description:Pl})]),_:1},8,["modelValue"]),(v(!0),O(D,null,te(h(c),w=>(v(),C(It,{key:w.name,modelValue:h(o)[w.name],"onUpdate:modelValue":x=>h(o)[w.name]=x,argument:w,instance:e.instance,readonly:e.readonly},null,8,["modelValue","onUpdate:modelValue","argument","instance","readonly"]))),128)),h(l).length>0?(v(),C(qn,{key:0,elevation:0},{default:k(()=>[(v(!0),O(D,null,te(h(l),w=>(v(),O(D,{key:w.name},[w.kind==="group"?(v(),C($i,{key:0,modelValue:h(o)[w.name],"onUpdate:modelValue":x=>h(o)[w.name]=x,argument:w,instance:e.instance,readonly:e.readonly},null,8,["modelValue","onUpdate:modelValue","argument","instance","readonly"])):(v(),C(Si,{key:1,modelValue:h(o)[w.name],"onUpdate:modelValue":x=>h(o)[w.name]=x,argument:w,instance:e.instance,readonly:e.readonly},null,8,["modelValue","onUpdate:modelValue","argument","instance","readonly"]))],64))),128))]),_:1})):z("",!0)]),_:1}),I(we),I($t,{class:"d-flex py-0"},{default:k(()=>[I(Ye),I(ue,{onClick:a},{default:k(()=>[...m[3]||(m[3]=[U("Cancel",-1)])]),_:1}),e.readonly?z("",!0):(v(),C(ue,{key:0,onClick:r,color:"primary",disabled:!h(d)},{default:k(()=>[...m[4]||(m[4]=[U("Save",-1)])]),_:1},8,["disabled"]))]),_:1})]),_:1},8,["color","title","subtitle"])]),_:1},8,["modelValue"]))}}),Fl=oe(Hl,[["__scopeId","data-v-0bc270f2"]]),jl=X({__name:"InstanceSecretEditor",props:Ve({instance:{},state:{},component:{},initialSecrets:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:Ve(["save"],["update:modelValue"]),setup(e,{emit:t}){const n=Qe(e,"modelValue"),i=Ln(Ci(e.initialSecrets,e.component.secrets)),o=t,a=async()=>{n.value=!1,await vt(),Object.assign(i,e.initialSecrets)},s=async()=>{const c=Mi(i,e.component.secrets);e.state&&o("save",e.state.id,c),await vt(),n.value=!1},{plainArguments:r,expandableArguments:u}=Ei(e.component.type,e.component.secrets);return(c,l)=>(v(),C(Un,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=d=>n.value=d),class:"dialog"},{default:k(()=>[I(Gt,{variant:"flat",color:e.component.meta.color??"#2d2d2d",title:e.component.meta.title,subtitle:e.component.meta.description},{prepend:k(()=>[I(h(Ct),{meta:e.component.meta},null,8,["meta"])]),default:k(()=>[I(we),I(St,{class:"d-flex flex-column pt-4 ga-4",style:{"max-height":"60vh",overflow:"scroll"}},{default:k(()=>[(v(!0),O(D,null,te(h(r),d=>(v(),C(It,{key:d.name,modelValue:h(i)[d.name],"onUpdate:modelValue":f=>h(i)[d.name]=f,argument:d,instance:e.instance,"is-secret":""},null,8,["modelValue","onUpdate:modelValue","argument","instance"]))),128)),h(u).length>0?(v(),C(qn,{key:0,elevation:0},{default:k(()=>[(v(!0),O(D,null,te(h(u),d=>(v(),O(D,{key:d.name},[d.kind==="group"?(v(),C($i,{key:0,argument:d,instance:e.instance,modelValue:h(i)[d.name],"onUpdate:modelValue":f=>h(i)[d.name]=f,"is-secret":""},null,8,["argument","instance","modelValue","onUpdate:modelValue"])):(v(),C(Si,{key:1,modelValue:h(i)[d.name],"onUpdate:modelValue":f=>h(i)[d.name]=f,argument:d,instance:e.instance},null,8,["modelValue","onUpdate:modelValue","argument","instance"]))],64))),128))]),_:1})):z("",!0)]),_:1}),I(we),I($t,{class:"d-flex py-0"},{default:k(()=>[I(Ye),I(ue,{onClick:a},{default:k(()=>[...l[1]||(l[1]=[U("Cancel",-1)])]),_:1}),I(ue,{onClick:s,color:"primary"},{default:k(()=>[...l[2]||(l[2]=[U("Save",-1)])]),_:1})]),_:1})]),_:1},8,["color","title","subtitle"])]),_:1},8,["modelValue"]))}}),Dl=oe(jl,[["__scopeId","data-v-9b4053a7"]]);function Ll(e,t){return Array.isArray(e)?e.length===0?"[]":"[...]":typeof e=="object"?"{...}":typeof e=="string"&&t.language?"...":String(e)}const Ul={class:"d-flex text-disabled text-start text-no-wrap"},ql={key:0,class:"d-flex ml-auto text-error"},Xl={key:1,class:"d-flex ml-auto text-truncate pl-4"},Yl=X({__name:"InstanceNodeArgumentList",props:{instance:{},component:{}},setup(e){const t=A(()=>{const n=[];for(const[i,o]of Object.entries(e.component.args))!o.required&&(e.instance.args?.[i]==null||e.instance.args?.[i]===o.schema.default)||n.push({name:o.meta.title,value:Ll(e.instance.args?.[i],o.schema),requiredAndNotSet:o.required&&e.instance.args?.[i]==null});return n});return(n,i)=>h(t).length>0?(v(),O(D,{key:0},[I(we),I(St,{class:"d-flex flex-column gap-2 px-2 py-2"},{default:k(()=>[(v(!0),O(D,null,te(h(t),({name:o,value:a,requiredAndNotSet:s})=>(v(),O("div",{key:o,class:"d-flex flex-row"},[F("div",Ul,J(o),1),s?(v(),O("div",ql,"not set")):(v(),O("div",Xl,J(a),1))]))),128))]),_:1})],64)):z("",!0)}}),Wl=X({__name:"InstanceStatusFieldItem",props:{item:{}},setup(e){return(t,n)=>(v(),C(so,{title:e.item},{append:k(()=>[I(h(Gn),{content:e.item},null,8,["content"])]),_:1},8,["title"]))}}),Gl={class:"d-flex flex-row"},Kl={class:"d-flex text-disabled text-start text-no-wrap text-secondary"},Jl=["title"],Zl=X({__name:"InstanceStatusField",props:{statusField:{}},setup(e){const t=A(()=>Array.isArray(e.statusField.value)?e.statusField.value.join(", "):String(e.statusField.value)),n=A(()=>Array.isArray(e.statusField.value)?e.statusField.value.length===0?"[]":e.statusField.value.length===1?e.statusField.value[0]:`${e.statusField.value.length} items`:String(e.statusField.value)),i=A(()=>Array.isArray(e.statusField.value)?e.statusField.value.length>1:!1);return(o,a)=>(v(),O("div",Gl,[F("div",Kl,[e.statusField.meta.icon?(v(),C(h(Tn),{key:0,icon:e.statusField.meta.icon,color:e.statusField.meta.iconColor,width:16,class:"mr-1"},null,8,["icon","color"])):z("",!0),U(" "+J(e.statusField.meta.title),1)]),I(Xn,{"open-on-hover":"","close-on-content-click":!1,location:"end",disabled:!h(i)},{activator:k(({props:s})=>[F("div",Oe(s,{class:"d-flex ml-auto text-truncate pl-4",title:h(i)?"":h(t)}),[F("span",{class:Ce(["text-truncate",{underline:h(i)}])},J(h(n)),3)],16,Jl)]),default:k(()=>[I(ro,{density:"compact",variant:"text"},{default:k(()=>[(v(!0),O(D,null,te(e.statusField.value,(s,r)=>(v(),C(Wl,{key:r,item:String(s)},null,8,["item"]))),128))]),_:1})]),_:1},8,["disabled"]),I(h(Gn),{content:h(t)},null,8,["content"])]))}}),Ql=oe(Zl,[["__scopeId","data-v-74fbe626"]]),_l=X({__name:"InstanceStatusFieldList",props:{instance:{},state:{}},setup(e){const t=A(()=>e.state.statusFields?.filter(n=>n.value===void 0?!1:n.complementaryTo?!e.instance.args?.[n.complementaryTo]||JSON.stringify(e.instance.args[n.complementaryTo])!==JSON.stringify(n.value):!0)??[]);return(n,i)=>h(t).length>0?(v(),O(D,{key:0},[I(we),I(St,{class:"d-flex flex-column gap-2 px-2 py-2"},{default:k(()=>[(v(!0),O(D,null,te(h(t),o=>(v(),C(Ql,{key:o.name,"status-field":o},null,8,["status-field"]))),128))]),_:1})],64)):z("",!0)}}),eu=X({__name:"InstanceNodeActions",props:{component:{},state:{},terminalIds:{},locked:{type:Boolean},editable:{type:Boolean},canOpenArgsEditor:{type:Boolean},canEditSecrets:{type:Boolean},hideShowComposite:{type:Boolean},loadingSecrets:{type:Boolean},loadingTerminal:{type:Boolean},loadingPage:{type:Boolean},ghost:{type:Boolean,default:!1}},emits:["open:args","open:secrets","open:terminal","open:page","open:composite","operation:launch","operation:cancel"],setup(e,{emit:t}){const n=A(()=>zn(e.component)&&Object.keys(e.component.secrets).length>0),i=A(()=>Yi(e.state?.lastOperationState?.status)),o=A(()=>e.state?.evaluationState&&e.state.evaluationState.status==="evaluating"),a=A(()=>e.state&&(o.value||e.state.lastOperationState?.status==="pending"||e.state.lastOperationState?.totalResourceCount===0||e.state.lastOperationState?.currentResourceCount===0||e.state.lastOperationState?.currentResourceCount===e.state.lastOperationState?.totalResourceCount)),s=A(()=>{if(!e.state?.lastOperationState)return 0;const{currentResourceCount:d,totalResourceCount:f}=e.state.lastOperationState;return d&&f?d/f*100:0}),r=A(()=>(e.terminalIds??e.state?.terminalIds??[]).length>0),u=A(()=>e.state?.pageIds&&e.state.pageIds.length>0),c=A(()=>e.state?.lastOperationState?.status==="pending"?"":e.state?.lastOperationState?.status==="destroying"?"error":"primary"),l=t;return(d,f)=>(v(),C($t,{class:"py-0 h-auto"},{default:k(()=>[Z(d.$slots,"status",{},()=>[I(Me,{color:""},{default:k(()=>[I(h(bo),{size:20,icon:"mdi-circle-outline"})]),_:1})],!0),I(Ye),!e.ghost&&!h(Xi)(e.state)&&!h(i)?(v(),C(ue,{key:0,size:"small",variant:"tonal",class:"toolbar-button",title:"Create",disabled:e.locked,onClick:f[0]||(f[0]=m=>l("operation:launch","update"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[8]||(f[8]=[U("mdi-rocket-launch",-1)])]),_:1})]),_:1},8,["disabled"])):!e.ghost&&!h(i)?(v(),C(ue,{key:1,size:"small",variant:"tonal",class:"toolbar-button",title:"Update",disabled:e.locked,onClick:f[1]||(f[1]=m=>l("operation:launch","update"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[9]||(f[9]=[U("mdi-play",-1)])]),_:1})]),_:1},8,["disabled"])):z("",!0),h(i)?(v(),C(ue,{key:2,size:"small",variant:"tonal",color:"error",class:"toolbar-button",title:"Cancel Operation",onClick:f[2]||(f[2]=m=>l("operation:cancel"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[10]||(f[10]=[U("mdi-cancel",-1)])]),_:1})]),_:1})):z("",!0),e.canOpenArgsEditor&&!e.ghost&&!h(i)?(v(),C(ue,{key:3,size:"small",variant:"tonal",class:"toolbar-button",title:"Edit Arguments",locked:e.locked,onClick:f[3]||(f[3]=m=>l("open:args"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[11]||(f[11]=[U("mdi-pencil",-1)])]),_:1})]),_:1},8,["locked"])):z("",!0),e.canEditSecrets&&!e.ghost&&!h(i)&&h(n)?(v(),C(ue,{key:4,size:"small",variant:"tonal",class:"toolbar-button",loading:e.loadingSecrets,locked:e.locked,title:"Edit Secrets",onClick:f[4]||(f[4]=m=>l("open:secrets"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[12]||(f[12]=[U("mdi-key",-1)])]),_:1})]),_:1},8,["loading","locked"])):z("",!0),!e.ghost&&h(r)?(v(),C(ue,{key:5,size:"small",variant:"tonal",class:"toolbar-button",loading:e.loadingTerminal,title:"Open Terminal",onClick:f[5]||(f[5]=m=>l("open:terminal"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[13]||(f[13]=[U("mdi-console",-1)])]),_:1})]),_:1},8,["loading"])):z("",!0),!e.ghost&&h(u)?(v(),C(ue,{key:6,size:"small",variant:"tonal",class:"toolbar-button",title:"Open Page",loading:e.loadingPage,onClick:f[6]||(f[6]=m=>l("open:page"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[14]||(f[14]=[U("mdi-file-document",-1)])]),_:1})]),_:1},8,["loading"])):z("",!0),!e.ghost&&e.component.kind==="composite"&&!e.hideShowComposite?(v(),C(ue,{key:7,size:"small",variant:"tonal",class:"toolbar-button",title:"Show Structure",onClick:f[7]||(f[7]=m=>l("open:composite"))},{default:k(()=>[I(ne,null,{default:k(()=>[...f[15]||(f[15]=[U("mdi-cube-outline",-1)])]),_:1})]),_:1})):z("",!0),h(o)||h(i)?(v(),C(lo,{key:8,size:"small",color:h(c),indeterminate:h(a),"model-value":h(s),absolute:"",location:"bottom"},null,8,["color","indeterminate","model-value"])):z("",!0)]),_:3}))}}),tu=oe(eu,[["__scopeId","data-v-19dfb823"]]),nu={key:0,class:"text-h6"},iu={key:1},ou=X({__name:"InstanceNodeLockBadge",props:{instanceLock:{}},setup(e){return(t,n)=>(v(),C(Yn,{disabled:!e.instanceLock.meta.title&&!e.instanceLock.meta.description},{activator:k(({props:i})=>[I(Me,$e(Ae(i)),{default:k(()=>[I(ne,null,{default:k(()=>[...n[0]||(n[0]=[U("mdi-lock",-1)])]),_:1}),e.instanceLock.meta.icon?(v(),C(h(Tn),{key:0,class:"ml-1",icon:e.instanceLock.meta.icon,width:18,color:e.instanceLock.meta.iconColor},null,8,["icon","color"])):z("",!0)]),_:1},16)]),default:k(()=>[e.instanceLock.meta.title?(v(),O("div",nu,J(e.instanceLock.meta.title),1)):z("",!0),e.instanceLock.meta.description?(v(),O("div",iu,J(e.instanceLock.meta.description),1)):z("",!0)]),_:1},8,["disabled"]))}}),au={key:0,class:"d-flex flex-column align-center justify-center",style:{width:"100%",height:"100%"}},su={key:1,class:"d-flex flex-column align-center justify-center",style:{width:"100%",height:"100%"}},ru={class:"pa-3 text-center",style:{maxWidth:"720px"}},lu={key:2,class:"d-flex flex-column align-center justify-center",style:{width:"100%",height:"100%"}},uu={class:"d-flex flex-column",style:{width:"240px",height:"100%",overflow:"auto"}},cu={class:"d-flex flex-column",style:{gap:"2px",minWidth:0,width:"100%",alignItems:"flex-start"}},du={class:"d-flex",style:{gap:"8px",minWidth:0,width:"100%",alignItems:"center"}},fu={key:0,class:"d-flex"},hu={class:"d-flex flex-column",style:{gap:"2px",minWidth:0,width:"100%",alignItems:"flex-start"}},mu={class:"text-truncate",style:{maxWidth:"220px"}},gu={key:0,class:"text-caption text-medium-emphasis text-truncate",style:{maxWidth:"220px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},vu={class:"d-flex flex-column",style:{flex:1,minWidth:0}},yu={class:"d-flex flex-column",style:{height:"480px"}},pu={class:"flex-grow-1",style:{minHeight:0}},Ni=X({__name:"ReferencedEntitiesPopup",props:{canLoad:{type:Boolean},cacheKey:{},entities:{},load:{type:Function}},setup(e){const t=ce(!1),n=ce(!1),i=ce(!1),o=ce(null),a=ce([]),s=Kt("content"),r=ce(null),u=M=>{if(M&&typeof M=="object"&&"message"in M){const R=M.message;if(typeof R=="string"&&R.length>0)return R}if(typeof M=="string"&&M.length>0)return M;try{return JSON.stringify(M)}catch{return"Unknown error"}},c=()=>{n.value=!1,i.value=!1,o.value=null,a.value=[],r.value=null};Xe(()=>e.cacheKey,()=>{c()});async function l(){if(!(!e.canLoad||n.value||i.value)){o.value=null,n.value=!0;try{a.value=await e.load(),i.value=!0,!r.value&&a.value.length>0&&(r.value=a.value[0].snapshotId)}catch(M){o.value=u(M)}finally{n.value=!1}}}Xe(t,M=>{M?l():c()});const d=M=>{e.canLoad&&(M.preventDefault(),M.stopPropagation(),t.value=!0)},f=M=>{if(!t.value)return;const R=M.composedPath();if(s.value&&R.includes(s.value))return;if(!(M.target instanceof Node)){t.value=!1;return}t.value=!1};uo(()=>{window.addEventListener("contextmenu",f,{capture:!0})}),rn(()=>{window.removeEventListener("contextmenu",f,{capture:!0})});const m=Wi(M=>{M.kind==="openEntitySnapshot"&&(t.value=!1)});rn(()=>{m()});const w=M=>e.entities[M]?.meta,x=M=>ko({entityType:M.entityType,modelMeta:w(M.entityType),overrideMeta:xo(M.content)}),N=M=>{const R=w(M.entityType),T=R?.color,q=x(M).metaForIcon?.iconColor??R?.iconColor;return T??q},V=A(()=>{const M=r.value;if(!M)return"primary";const R=a.value.find(T=>T.snapshotId===M);return R?N(R)??"primary":"primary"});return(M,R)=>(v(),C(Xn,{modelValue:h(t),"onUpdate:modelValue":R[2]||(R[2]=T=>Te(t)?t.value=T:null),"open-on-click":!1,"close-on-content-click":!1,location:"end",disabled:!e.canLoad},{activator:k(({props:T})=>[Z(M.$slots,"activator",{props:{...T,onContextmenu:d},opened:h(t)})]),default:k(()=>[I(co,{ref:"content",color:"black",class:"hs-output-popup d-flex",style:{width:"800px",height:"480px"}},{default:k(()=>[e.canLoad?h(o)?(v(),O("div",su,[F("div",ru,[R[4]||(R[4]=F("div",{class:"text-medium-emphasis"},"Failed to load referenced entities",-1)),I(fo,{type:"error",density:"compact",class:"mt-2"},{default:k(()=>[U(J(h(o)),1)]),_:1})])])):h(i)&&h(a).length===0?(v(),O("div",lu,[...R[5]||(R[5]=[F("div",{class:"pa-3 text-center"},[F("div",{class:"text-medium-emphasis"},"No referenced entities")],-1)])])):(v(),O(D,{key:3},[F("div",uu,[I(ho,{modelValue:h(r),"onUpdate:modelValue":R[0]||(R[0]=T=>Te(r)?r.value=T:null),color:h(V),direction:"vertical"},{default:k(()=>[(v(!0),O(D,null,te(h(a),T=>(v(),C(mo,{key:T.snapshotId,value:T.snapshotId,class:"justify-start"},{default:k(()=>[F("div",cu,[F("div",du,[x(T).metaForIcon?(v(),O("div",fu,[I(h(Ct),{meta:x(T).metaForIcon,size:24},null,8,["meta"])])):z("",!0),F("div",hu,[F("span",mu,J(x(T).title),1),x(T).subtitle?(v(),O("div",gu,J(x(T).subtitle),1)):z("",!0)])])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","color"])]),I(we,{vertical:""}),F("div",vu,[I(go,{modelValue:h(r),"onUpdate:modelValue":R[1]||(R[1]=T=>Te(r)?r.value=T:null),style:{flex:1,minWidth:0}},{default:k(()=>[(v(!0),O(D,null,te(h(a),T=>(v(),C(vo,{key:T.snapshotId,value:T.snapshotId},{default:k(()=>[F("div",yu,[F("div",pu,[Z(M.$slots,"content",{entity:T})])])]),_:2},1032,["value"]))),128))]),_:3},8,["modelValue"])])],64)):(v(),O("div",au,[...R[3]||(R[3]=[F("div",{class:"pa-3 text-center"},[F("div",{class:"text-medium-emphasis"},"Unavailable"),F("div",{class:"text-medium-emphasis"},"Missing project/state context")],-1)])]))]),_:3},512)]),_:3},8,["modelValue","disabled"]))}}),wu=X({__name:"InstanceNodeOutputChipPopup",props:{projectId:{},stateId:{},output:{},outputSources:{},entities:{}},setup(e){const{$client:t}=Wn(),n=e.projectId?Bn(e.projectId):null,i=A(()=>{if(!e.projectId||!n)return[];if(e.outputSources&&e.outputSources.length>0){const r=[];for(const l of e.outputSources){const d=n.instanceStates.get(l.instanceId)?.id;d&&r.push({stateId:d,output:l.output})}const u=new Set,c=[];for(const l of r){const d=`${l.stateId}:${l.output}`;u.has(d)||(u.add(d),c.push(l))}return c}return e.stateId?[{stateId:e.stateId,output:e.output}]:[]}),o=A(()=>i.value.length>0),a=A(()=>o.value?i.value.map(r=>`${r.stateId}:${r.output}`).sort().join("|"):""),s=async()=>{if(!o.value)return[];const r=await Promise.all(i.value.map(async l=>await t.state.getOutputReferencedEntities.query({projectId:e.projectId,stateId:l.stateId,output:l.output}))),u=[],c=new Set;for(const l of r)for(const d of l)c.has(d.snapshotId)||(c.add(d.snapshotId),u.push(d));return u};return(r,u)=>(v(),C(Ni,{"can-load":h(o),"cache-key":h(a),entities:e.entities,load:s},{activator:k(c=>[Z(r.$slots,"activator",$e(Ae(c)))]),content:k(({entity:c})=>[I(Kn,{entity:c,"project-id":e.projectId},null,8,["entity","project-id"])]),_:3},8,["can-load","cache-key","entities"]))}}),bu=X({__name:"InstanceNodeInputChipPopup",props:{projectId:{},resolvedInputs:{},entities:{}},setup(e){const{$client:t}=Wn(),n=Bn(e.projectId),i=A(()=>new Set(e.resolvedInputs.map(u=>u.type).filter(Boolean))),o=A(()=>{const u=[];for(const d of e.resolvedInputs){const f=d.input.instanceId,m=d.input.output,w=n.instanceStates.get(f)?.id;w&&u.push({stateId:w,output:m})}const c=new Set,l=[];for(const d of u){const f=`${d.stateId}:${d.output}`;c.has(f)||(c.add(f),l.push(d))}return l}),a=A(()=>o.value.length>0),s=A(()=>{if(!a.value)return"";const u=o.value.map(l=>`${l.stateId}:${l.output}`).sort().join("|"),c=Array.from(i.value).sort().join(",");return`${u}#${c}`}),r=async()=>{if(!a.value)return[];const u=await Promise.all(o.value.map(async d=>await t.state.getOutputReferencedEntities.query({projectId:e.projectId,stateId:d.stateId,output:d.output}))),c=[],l=new Set;for(const d of u)for(const f of d)l.has(f.snapshotId)||(l.add(f.snapshotId),c.push(f));return i.value.size===0?[]:c.filter(d=>i.value.has(d.entityType))};return(u,c)=>(v(),C(Ni,{"can-load":h(a),"cache-key":h(s),entities:e.entities,load:r},{activator:k(l=>[Z(u.$slots,"activator",$e(Ae(l)))]),content:k(({entity:l})=>[I(Kn,{entity:l,"project-id":e.projectId},null,8,["entity","project-id"])]),_:3},8,["can-load","cache-key","entities"]))}}),ku=X({__name:"InstanceNodeIOSideHandle",props:{name:{},side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(v(),O(D,null,[I(h(En),{id:e.name,type:e.side==="left"?"target":"source",position:e.side==="left"?h(gt).Left:h(gt).Right,class:Ce(["handle",[e.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":e.isValidConnection},null,8,["id","type","position","class","is-valid-connection"]),F("div",{class:Ce(["handle-dot",[e.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:e.handleColor})},null,6)],64))}}),rt=oe(ku,[["__scopeId","data-v-ae6b4385"]]);function xu(e){const t=e.replace("#",""),n=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,2),16),o=parseInt(t.substring(4,2),16);return(n*299+i*587+o*114)/1e3>=128?"#000":"#fff"}const Iu={ref:"column",class:"d-flex flex-column gr-2 column"},Su=X({__name:"InstanceNodeIOSide",props:{instance:{},component:{},entities:{},type:{},side:{},projectId:{},stateId:{},isValidConnection:{type:Function},resolvedInputs:{},resolvedInjectionInput:{},usedOutputs:{},forceShowAllHandles:{type:Boolean},preventShowAllHandles:{type:Boolean}},setup(e){const t=m=>{const w=Array.from(new Set((e.resolvedInputs?.[m]??[]).map(x=>x.type)));if(w.length===1)return w[0]},n=(m,w)=>{const x=e.component[m][w];return m==="inputs"?t(w)??x.type:x.fromInput?t(x.fromInput)??x.type:x.type},i=(m,w)=>e.entities[n(m,w)]?.meta.color??"#607D8B",o=(m,w)=>xu(i(m,w)),a=m=>{const w=e.instance.inputs&&!!e.instance.inputs[m]&&e.instance.inputs[m].length>0,x=e.instance.hubInputs&&!!e.instance.hubInputs[m]&&e.instance.hubInputs[m].length>0;return w||x},s=m=>e.component.inputs[m].required?!e.resolvedInputs?.[m]?.length:!1,r=Kt("column"),{isOutside:u}=Gi(r),c=A(()=>e.forceShowAllHandles||!u.value&&!e.preventShowAllHandles),l=m=>e.type==="outputs"?!e.usedOutputs||e.usedOutputs.has(m)||c.value:e.side==="right"||a(m)||s(m)||c.value,d=A(()=>e.resolvedInjectionInput?e.resolvedInjectionInput.length===1?"1 input":`${e.resolvedInjectionInput.length} inputs`:"no inputs"),f=A(()=>e.instance.injectionInputs&&e.instance.injectionInputs.length>0);return(m,w)=>(v(),O("div",Iu,[e.type==="inputs"&&e.side==="left"&&Object.keys(e.component.inputs).length>0&&(h(f)||h(c))?(v(),C(Me,{key:0,style:{backgroundColor:"#3F51B5",color:"white"},"text-color":"white",class:"rounded handle-chip"},{default:k(()=>[I(ne,{class:"mr-1",style:{"margin-left":"-2px"}},{default:k(()=>[...w[0]||(w[0]=[U("mdi-router",-1)])]),_:1}),U(" "+J(h(d))+" ",1),I(rt,{name:"",side:e.side,"is-valid-connection":e.isValidConnection,"handle-color":"#3F51B5"},null,8,["side","is-valid-connection"])]),_:1})):z("",!0),(v(!0),O(D,null,te(e.component[e.type],(x,N)=>(v(),O(D,{key:N},[e.type==="outputs"?(v(),C(h(wu),{key:0,"project-id":e.projectId,"state-id":e.stateId,output:N,"output-sources":e.instance.resolvedOutputs?.[N],entities:e.entities},{activator:k(({props:V,opened:M})=>[l(N)||M?(v(),C(Me,Oe({key:0,ref_for:!0},V,{style:{backgroundColor:i(e.type,N),color:o(e.type,N)},"text-color":"white",class:"rounded handle-chip"}),{default:k(()=>[U(J(x.meta.title)+" ",1),I(rt,{name:N,side:e.side,"is-valid-connection":e.isValidConnection,"handle-color":i(e.type,N)},null,8,["name","side","is-valid-connection","handle-color"])]),_:2},1040,["style"])):z("",!0)]),_:2},1032,["project-id","state-id","output","output-sources","entities"])):e.projectId&&e.type==="inputs"?(v(),C(h(bu),{key:1,"project-id":e.projectId,"resolved-inputs":e.resolvedInputs?.[N]??[],entities:e.entities},{activator:k(({props:V,opened:M})=>[l(N)||M?(v(),C(Me,Oe({key:0,ref_for:!0},V,{style:{backgroundColor:i(e.type,N),color:o(e.type,N)},"text-color":"white",class:"rounded handle-chip"}),{default:k(()=>[U(J(x.meta.title)+" ",1),I(rt,{name:N,side:e.side,"is-valid-connection":e.isValidConnection,"handle-color":i(e.type,N)},null,8,["name","side","is-valid-connection","handle-color"])]),_:2},1040,["style"])):z("",!0)]),_:2},1032,["project-id","resolved-inputs","entities"])):l(N)?(v(),C(Me,{key:2,style:ke({backgroundColor:i(e.type,N),color:o(e.type,N)}),"text-color":"white",class:"rounded handle-chip"},{default:k(()=>[U(J(x.meta.title)+" ",1),I(rt,{name:N,side:e.side,"is-valid-connection":e.isValidConnection,"handle-color":i(e.type,N)},null,8,["name","side","is-valid-connection","handle-color"])]),_:2},1032,["style"])):z("",!0)],64))),128))],512))}}),lt=oe(Su,[["__scopeId","data-v-8ded1da2"]]),$u=X({__name:"InstanceNodeIO",props:{instance:{},component:{},entities:{},projectId:{},stateId:{},type:{default:"both"},mirror:{type:Boolean},isValidConnection:{type:Function},usedOutputs:{},resolvedInputs:{},resolvedInjectionInput:{},forceShowAllHandles:{type:Boolean},preventShowAllHandles:{type:Boolean}},setup(e){return(t,n)=>(v(),C($t,{class:"align-start align-stretch component-node-io"},{default:k(()=>[e.mirror?(v(),O(D,{key:1},[e.type==="both"||e.type==="outputs"?(v(),C(lt,{key:0,instance:e.instance,component:e.component,entities:e.entities,"project-id":e.projectId,"state-id":e.stateId,"is-valid-connection":e.isValidConnection,type:"outputs","used-outputs":e.usedOutputs,"resolved-inputs":e.resolvedInputs,side:"left","force-show-all-handles":e.forceShowAllHandles,"prevent-show-all-handles":e.preventShowAllHandles},null,8,["instance","component","entities","project-id","state-id","is-valid-connection","used-outputs","resolved-inputs","force-show-all-handles","prevent-show-all-handles"])):z("",!0),I(Ye),e.type==="both"||e.type==="inputs"?(v(),C(lt,{key:1,instance:e.instance,component:e.component,entities:e.entities,"project-id":e.projectId,"state-id":e.stateId,"is-valid-connection":e.isValidConnection,type:"inputs",side:"right","resolved-inputs":e.resolvedInputs,"force-show-all-handles":e.forceShowAllHandles,"prevent-show-all-handles":e.preventShowAllHandles},null,8,["instance","component","entities","project-id","state-id","is-valid-connection","resolved-inputs","force-show-all-handles","prevent-show-all-handles"])):z("",!0)],64)):(v(),O(D,{key:0},[e.type==="both"||e.type==="inputs"?(v(),C(lt,{key:0,instance:e.instance,component:e.component,entities:e.entities,"project-id":e.projectId,"state-id":e.stateId,"is-valid-connection":e.isValidConnection,type:"inputs","resolved-inputs":e.resolvedInputs,"resolved-injection-input":e.resolvedInjectionInput,"force-show-all-handles":e.forceShowAllHandles,"prevent-show-all-handles":e.preventShowAllHandles,side:"left"},null,8,["instance","component","entities","project-id","state-id","is-valid-connection","resolved-inputs","resolved-injection-input","force-show-all-handles","prevent-show-all-handles"])):z("",!0),I(Ye),e.type==="both"||e.type==="outputs"?(v(),C(lt,{key:1,instance:e.instance,component:e.component,entities:e.entities,"project-id":e.projectId,"state-id":e.stateId,"is-valid-connection":e.isValidConnection,type:"outputs","used-outputs":e.usedOutputs,"resolved-inputs":e.resolvedInputs,side:"right","force-show-all-handles":e.forceShowAllHandles,"prevent-show-all-handles":e.preventShowAllHandles},null,8,["instance","component","entities","project-id","state-id","is-valid-connection","used-outputs","resolved-inputs","force-show-all-handles","prevent-show-all-handles"])):z("",!0)],64))]),_:1}))}}),Cu=oe($u,[["__scopeId","data-v-15612b92"]]),Vu={class:"instance-node__badges"},Au=X({__name:"InstanceNode",props:Ve({instance:{},component:{},entities:{},inputResolverOutputs:{},inputResolverDependentMap:{},allInstances:{default:()=>new Map},state:{},terminalIds:{},projectId:{},instanceLock:{},loadingSecrets:{type:Boolean},loadingTerminal:{type:Boolean},loadingPage:{type:Boolean},initialSecrets:{},editable:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},ioType:{default:"both"},ioMirror:{type:Boolean},hideShowComposite:{type:Boolean},isValidConnection:{type:Function}},{editingSecrets:{type:Boolean,default:!1},editingSecretsModifiers:{}}),emits:Ve(["open:secrets","open:terminal","open:page","open:composite","operation:launch","operation:cancel","save:args","save:secrets","contextmenu"],["update:editingSecrets"]),setup(e,{emit:t}){const n=t,i=Qe(e,"editingSecrets"),o=ce(!1),a=A(()=>!!e.instance.parentId),s=A(()=>e.editable||a.value),r=A(()=>!e.editable&&a.value),u=A(()=>e.editable||a.value),c=A(()=>Object.keys(e.component.inputs).length>0),l=A(()=>Object.keys(e.component.outputs).length>0),d=A(()=>c.value||l.value),f=A(()=>zt(e.inputResolverOutputs,e.instance.id)),m=A(()=>Mn(e.inputResolverOutputs,e.instance.id).map(P=>P.input)),w=A(()=>{const P=Object.values(e.instance.outputs??{}).flat(),B=new Set,j=e.inputResolverDependentMap.get(`instance:${e.instance.id}`)??[],L=Q=>{(Q.instanceId===e.instance.id||P.some(ee=>ee.instanceId===Q.instanceId))&&B.add(Q.output)};for(const Q of j){const ee=e.inputResolverOutputs.get(Q);if(ee)if(ee.kind==="instance")for(const ae of Object.values(ee.instance.inputs??{}))for(const g of ae)L(g);else for(const ae of Object.values(ee.hub.inputs??{}))L(ae)}if(e.instance.parentId){const Q=e.allInstances.get(e.instance.parentId),ee=Object.values(Q?.outputs??{}).flat();for(const ae of ee)ae.instanceId===e.instance.id&&B.add(ae.output)}return B});Xe(w,P=>{P.size!==0&&x.updateNodeInternals([V.node.id])});const{vueFlowStore:x,selection:N}=Wt(),V=Nn(),M=A(()=>On(V.node,x)),R=A(()=>x.connectionStartHandle.value?.nodeId===V.node.id),T=Kt("componentCard"),q=A(()=>x.viewport.value.zoom<.5),Y=A(()=>T.value?Math.min(T.value.$el.clientWidth,T.value.$el.clientHeight)*.7:0);return(P,B)=>(v(),O(D,null,[I(h(wo),{class:Ce({"instance-card--ghost":e.ghost}),component:e.component,subtitle:e.instance.name,"blueprint-status":M.value,selected:h(N).isNodeSelected(h(V).node),style:{overflow:"visible"},onContextmenu:B[11]||(B[11]=j=>n("contextmenu",j)),ref:"componentCard"},{append:k(()=>[F("div",Vu,[e.ghost?(v(),C(Yn,{key:0,location:"top"},{activator:k(({props:j})=>[I(Me,Oe(j,{class:"instance-node__ghost-chip",color:"primary"}),{default:k(()=>[I(ne,{size:"16"},{default:k(()=>[...B[13]||(B[13]=[U("mdi-ghost",-1)])]),_:1})]),_:1},16)]),default:k(()=>[B[14]||(B[14]=F("span",null," This instance is a ghost. It is no longer a part of the project, but Highstate still tracks it. ",-1))]),_:1})):z("",!0),e.instanceLock?(v(),C(ou,{key:1,"instance-lock":e.instanceLock},null,8,["instance-lock"])):z("",!0)])]),default:k(()=>[Z(P.$slots,"default",{},void 0,!0),h(o)?(v(),C(h(Fl),{key:0,modelValue:h(o),"onUpdate:modelValue":B[0]||(B[0]=j=>Te(o)?o.value=j:null),instance:e.instance,component:e.component,state:e.state,"all-instances":e.allInstances,readonly:r.value,onSave:B[1]||(B[1]=(j,L,Q)=>n("save:args",j,L,Q))},null,8,["modelValue","instance","component","state","all-instances","readonly"])):z("",!0),h(zn)(e.component)&&i.value?(v(),C(h(Dl),{key:1,modelValue:i.value,"onUpdate:modelValue":B[2]||(B[2]=j=>i.value=j),instance:e.instance,state:e.state,component:e.component,"initial-secrets":e.initialSecrets??{},onSave:B[3]||(B[3]=(j,L)=>n("save:secrets",j,L))},null,8,["modelValue","instance","state","component","initial-secrets"])):z("",!0),I(Yl,{instance:e.instance,component:e.component},null,8,["instance","component"]),d.value?(v(),O(D,{key:2},[I(we),I(Cu,{component:e.component,instance:e.instance,entities:e.entities,"project-id":e.projectId,"state-id":e.state?.id,"is-valid-connection":e.isValidConnection,type:e.ioType,mirror:e.ioMirror,"used-outputs":w.value,"resolved-inputs":f.value,"resolved-injection-input":m.value,"force-show-all-handles":R.value,"prevent-show-all-handles":h(o)||i.value||!e.editable||q.value},null,8,["component","instance","entities","project-id","state-id","is-valid-connection","type","mirror","used-outputs","resolved-inputs","resolved-injection-input","force-show-all-handles","prevent-show-all-handles"])],64)):z("",!0),e.state?(v(),C(_l,{key:3,instance:e.instance,state:e.state},null,8,["instance","state"])):z("",!0),I(we),I(tu,{"loading-secrets":e.loadingSecrets,"loading-terminal":e.loadingTerminal,"loading-page":e.loadingPage,instance:e.instance,component:e.component,state:e.state,"terminal-ids":e.terminalIds,locked:!!e.instanceLock,editable:e.editable,"can-open-args-editor":s.value,"can-edit-secrets":u.value,ghost:e.ghost,"hide-show-composite":e.hideShowComposite,"onOpen:args":B[4]||(B[4]=j=>o.value=!0),"onOpen:secrets":B[5]||(B[5]=j=>e.state?n("open:secrets"):i.value=!0),"onOpen:terminal":B[6]||(B[6]=j=>n("open:terminal")),"onOpen:page":B[7]||(B[7]=j=>n("open:page")),"onOpen:composite":B[8]||(B[8]=j=>n("open:composite")),"onOperation:launch":B[9]||(B[9]=j=>n("operation:launch",j)),"onOperation:cancel":B[10]||(B[10]=j=>n("operation:cancel"))},{status:k(()=>[Z(P.$slots,"status",{},void 0,!0)]),_:3},8,["loading-secrets","loading-terminal","loading-page","instance","component","state","terminal-ids","locked","editable","can-open-args-editor","can-edit-secrets","ghost","hide-show-composite"])]),_:3},8,["class","component","subtitle","blueprint-status","selected"]),I(yo,{modelValue:q.value,"onUpdate:modelValue":B[12]||(B[12]=j=>q.value=j),scrim:"#1e1e1e",opacity:1,absolute:"",class:"align-center justify-center",style:ke(`border: 3px solid ${e.component.meta.iconColor??"#3f51b5"}; border-radius: 8px`),contained:""},{default:k(()=>[I(h(Ct),{meta:e.component.meta,size:Y.value},null,8,["meta","size"])]),_:1},8,["modelValue","style"])],64))}}),ju=oe(Au,[["__scopeId","data-v-16e0c5af"]]);export{Fu as G,Hu as H,ju as I,No as _,Cu as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as P,X as q,Y as A,Z as D,t as H,$ as V,m as z,z as T,B,a0 as w}from"#entry";import{u as K,B as U}from"./sB5TSp0H.js";const L=P({name:"project-panel",getStoreId:p=>`projects/${p}/panel`,create:({storeId:p,id:[c],logger:b})=>q(p,()=>{const{instancesStore:n}=A(c),I=U();let v=0;const{vueFlowStore:s,nodeFactory:i,onHubMoved:h,onInstanceMoved:N,onHubNodeDeleted:F,onInstanceNodeDeleted:y,onNodesMoved:E,edgeEndpointOffsets:j}=D.ensureCreated("project",c),{$client:m}=K(),x=V(async e=>{await m.workspace.setProjectViewport.mutate({projectId:c,viewport:e})},1e3);s.onViewportChange(x);const M=async()=>{z.info({projectId:c},"initializing project panel store");const e=await m.workspace.getProjectViewport.query({projectId:c});e&&(s.defaultViewport.value=e)},R=async()=>{i.createNodesForModels(n.getProjectInstances(),[...n.hubs.values()]),T(s).then(()=>B(s,E,j))},C=e=>{v+=1,I.value={instanceId:e,requestId:v}},S=e=>{I.value?.requestId===e&&(I.value=void 0)};N(e=>{n.patchInstance(e,["position"])}),h(e=>{n.patchHub(e,["position"])}),F(e=>{n.deleteHub(e.data.hub,!e.data.blueprint)}),y(e=>{n.deleteInstance(e.data.instance,!e.data.blueprint)});const g=e=>{const{inputInstance:t,outputInstance:o,inputHub:a,outputHub:u,outputKey:r,inputKey:d}=w(s,e);if(t&&o)return n.addInstanceInput(t,d,{instanceId:o.id,output:r});if(u&&t&&d)return n.addInstanceHubInput(t,d,{hubId:u.id});if(u&&t)return n.addInstanceInjectionInput(t,{hubId:u.id});if(o&&a)return n.addHubInput(a,{instanceId:o.id,output:r});if(u&&a)return n.addHubInjectionInput(a,{hubId:u.id});throw b.error({msg:"unexpected connection while adding",connection:e,inputInstance:t,outputInstance:o,inputHub:a,outputHub:u,outputKey:r,inputKey:d}),new Error("Invalid connection")},f=e=>{const{inputInstance:t,outputInstance:o,inputHub:a,outputHub:u,outputKey:r,inputKey:d}=w(s,e);if(t&&o)return n.removeInstanceInput(t,d,{instanceId:o.id,output:r});if(u&&t&&d)return n.removeInstanceHubInput(t,d,{hubId:u.id});if(u&&t)return n.removeInstanceInjectionInput(t,{hubId:u.id});if(o&&a)return n.removeHubInput(a,{instanceId:o.id,output:r});if(u&&a)return n.removeHubInjectionInput(a,{hubId:u.id});throw b.error({msg:"unexpected connection while removing",edge:e,inputInstance:t,outputInstance:o,inputHub:a,outputHub:u,outputKey:r,inputKey:d}),new Error("Invalid connection")};s.onConnect(g);let l=!1;return s.onEdgeUpdate(async({edge:e,connection:t})=>{l=!0,await f(e),await g(t)}),s.onEdgeUpdateEnd(async({edge:e})=>{try{if(l)return;await f(e)}finally{l=!1}}),n.onInstanceInputAdded(({instance:e,inputName:t,input:o})=>{i.createEdgeForInstanceInput(e,t,o)}),n.onInstanceHubInputAdded(({instance:e,inputName:t,input:o})=>{i.createEdgeForInstanceHubInput(e,t,o)}),n.onInstanceInjectionInputAdded(({instance:e,input:t})=>{i.createEdgeForInstanceInjectionInput(e,t)}),n.onHubInputAdded(({hub:e,input:t})=>{i.createEdgeForHubInput(e,t)}),n.onHubInjectionInputAdded(({hub:e,input:t})=>{i.createEdgeForHubInjectionInput(e,t)}),n.onInstanceInputRemoved(({instance:e,inputName:t,input:o})=>{i.removeEdgeForInstanceInput(e,t,o)}),n.onInstanceHubInputRemoved(({instance:e,inputName:t,input:o})=>{i.removeEdgeForInstanceHubInput(e,t,o)}),n.onInstanceInjectionInputRemoved(({instance:e,input:t})=>{i.removeEdgeForInstanceInjectionInput(e,t)}),n.onHubInputRemoved(({hub:e,input:t})=>{i.removeEdgeForHubInput(e,t)}),n.onHubInjectionInputRemoved(({hub:e,input:t})=>{i.removeEdgeForHubInjectionInput(e,t)}),n.onInstanceNameChanged(({oldId:e,newId:t})=>{const o=i.instanceIdToNodeIdMap.get(e);i.instanceIdToNodeIdMap.set(t,o),i.instanceIdToNodeIdMap.delete(e),s.updateNodeData(o,{})}),n.onInstanceCreated(async({instance:e,blueprint:t})=>{const o=i.createNodeFromInstance(e,{blueprint:t});if(await H(s.areNodesInitialized).toBe(!0),!t){if(n.isGhostInstance(e.id))return;s.updateNode(o.id,a=>{const u={x:a.position.x-a.dimensions.width/2,y:a.position.y-a.dimensions.height/2};return e.position=u,{position:u}})}}),n.onInstanceDeleted(e=>{const t=i.instanceIdToNodeIdMap.get(e);t&&(s.removeNodes(t),i.instanceIdToNodeIdMap.delete(e))}),n.onHubDeleted(e=>{s.removeNodes(e)}),n.onHubCreated(async({hub:e,blueprint:t})=>{i.createNodeFromHub(e,{blueprint:t}),await H(s.areNodesInitialized).toBe(!0),t||s.updateNode(e.id,o=>{const a={x:o.position.x-o.dimensions.width/2,y:o.position.y-o.dimensions.height/2};return e.position=a,{position:a}})}),{initialize:M,placeNodes:R,instanceFocusRequest:I,requestInstanceFocus:C,clearInstanceFocusRequest:S}})});export{L as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as x,s as z,m as T,t as j,x as k,an as B,l as $}from"#entry";import{_ as R,a as E,b as V}from"./BKIVPvZX.js";import{a as H,g as M,i as O}from"./oZs8U75K.js";import{_ as q,G}from"./Bv_vOb-Y.js";import{E as w,V as v,Y as y,ai as L,_ as m,a2 as Y,W as l,aO as g,H as Z,w as A,D as n,av as C,aw as S}from"./sB5TSp0H.js";import{u as D}from"./CYL3VlR9.js";import{P as W}from"./DnpKvmH_.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./DHJ62FKo.js";import"./CBVcjGJL.js";import"./BXphdu9w.js";import"./-OnKOwAh.js";import"./C4XpvUuq.js";import"./D_wY_uke.js";import"./D-7HtdRe.js";import"./DXyfavJr.js";import"./C973_vs5.js";import"./Lks7C8cK.js";import"./BxAss8Tj.js";import"./BupMEc6X.js";const X=w({__name:"ExtraElementPanel",setup(c){const r=o=>{H(o.dataTransfer)};return(o,s)=>(v(),y(L,null,{default:m(()=>[Y("div",{draggable:"true",style:{cursor:"grab"},onDragstart:r},[l(q)],32)]),_:1}))}}),J=w({__name:"ProjectCanvas",async setup(c){let r,o;const s=x(),f=D(),{projectStore:u,instancesStore:h,libraryStore:_}=z(),d=T.child({feature:"project-canvas-focus"});u.initializing?([r,o]=g(()=>j(()=>u.initialized).toBe(!0)),await r,o(),u.addLibraryRoot()):([r,o]=g(()=>u.initialize1()),await r,o(),[r,o]=g(()=>u.initialize2()),await r,o()),[r,o]=g(()=>f.initialize()),await r,o();const P=async e=>{d.debug({instanceId:e},"focus requested"),await j(s.vueFlowStore.areNodesInitialized).toBe(!0),await F(()=>{const I=s.nodeFactory.instanceIdToNodeIdMap.get(e);return I?!!s.vueFlowStore.findNode(I):!1},20,50);const a=s.nodeFactory.instanceIdToNodeIdMap.get(e);if(!a)return d.debug({instanceId:e},"focus failed: node id not found in instance map"),!1;const t=s.vueFlowStore.findNode(a);if(!t)return d.debug({instanceId:e,nodeId:a},"focus failed: vue-flow node not found"),!1;const i=t.position.x+t.dimensions.width/2,p=t.position.y+t.dimensions.height/2,b=s.vueFlowStore.viewport.value.zoom;return await s.vueFlowStore.setCenter(i,p,{zoom:b,duration:300}),d.debug({instanceId:e,nodeId:a,nodeCenterX:i,nodeCenterY:p},"focus success"),!0},F=async(e,a,t)=>{for(let i=0;i<a;i++){if(e())return;await new Promise(p=>setTimeout(p,t))}};Z(()=>{f.placeNodes()}),A(()=>f.instanceFocusRequest,async e=>{if(!e)return;if(d.debug({request:e},"focus request changed"),!await P(e.instanceId)){d.debug({request:e},"focus request kept for retry because focus did not succeed");return}f.clearInstanceFocusRequest(e.requestId)},{immediate:!0});const N=e=>{if(e.preventDefault(),!e.dataTransfer||s.blueprint)return;let a;const t=M(e.dataTransfer);if(t){const i=h.getNextInstanceName(t),p=B(t,i),b=_.library.components[t];a={boundary:{width:360,height:260},instances:[{id:p,name:i,type:t,kind:b.kind,position:{x:0,y:0}}],hubs:[]}}else if(O(e.dataTransfer))a={boundary:{width:74,height:74},instances:[],hubs:[{id:k.createId(),position:{x:0,y:0}}]};else return;s.blueprint=a};return(e,a)=>(v(),y(n(G),{canvasId:["project",n(u).projectId],components:n(_).library.components,entities:n(_).library.entities,"input-resolver-outputs":n(h).inputResolverOutputs,editable:"",onDragover:N},{"node-instance":m(t=>[l(n(V),C(S(t)),null,16)]),"node-hub":m(t=>[l(n(E),C(S(t)),null,16)]),"panel-bottom-left":m(()=>[l(n(R))]),"panel-bottom-right":m(()=>[l(n(X))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),we=w({__name:"index",props:{params:{}},setup(c){return $(c.params.projectId),x.ensureCreated("project",c.params.projectId),D.ensureCreated(c.params.projectId),(r,o)=>(v(),y(n(W),{"project-id":c.params.projectId,"can-unlock":""},{default:m(()=>[l(n(J))]),_:1},8,["project-id"]))}});export{we as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Q as C,R as T,W as O,s as $,_ as j}from"#entry";import{E as V,u as B,M as E,V as m,Y as g,D as n,r as y,w as R,a$ as W,a as w,_ as d,W as p,b0 as L,b1 as N,a1 as _,b2 as z,a2 as h,a6 as I,a7 as b,a0 as v,b3 as H,J as P,ag as U,ao as D,j as S}from"./sB5TSp0H.js";import{_ as k}from"./CBVcjGJL.js";import{G as x}from"./BXphdu9w.js";const K={error:"alert-circle-outline",healthy:"heart",degraded:"heart-flash",down:"heart-broken",warning:"alert-octagon-outline",progressing:"progress-clock"},M={error:"error",degraded:"warning",down:"error",healthy:"success",warning:"warning",progressing:"warning"},q={cancelled:"close-circle-outline",destroyed:"trash-can-outline",refreshed:"check-circle-outline",updated:"check-circle-outline",skipped:"skip-next-circle-outline",failed:"alert-circle-outline",cancelling:"stop-circle-outline",pending:"clock-outline",destroying:"trash-can-outline",processing_triggers:"flash",previewing:"eye-outline",previewed:"eye-outline",refreshing:"refresh",updating:"sync"},G={updated:"success",cancelled:"warning",destroyed:"success",refreshed:"success",skipped:"",failed:"error",cancelling:"warning",pending:"",destroying:"error",processing_triggers:"primary",previewing:"secondary",previewed:"success",refreshing:"info",updating:"primary"},A={undeployed:"circle-outline",attempted:"clock-outline",deployed:"check-circle-outline",failed:"alert-circle-outline"},J={undeployed:"",attempted:"warning",deployed:"success",failed:"error"},Q={error:"alert-circle-outline",evaluated:"check-circle-outline",evaluating:"cogs"},Y={error:"error",evaluated:"success",evaluating:"primary"};function F(e,r){return e.inputHash&&e.inputHash!==r?{name:"instance-state",title:"State",status:"changed",message:"The configuration of this instance or one of its dependencies has changed since the last operation.",icon:"not-equal-variant",color:"warning",important:!1,order:5}:{name:"instance-state",status:e.status,title:"State",message:`Instance is ${e.status}`,icon:A[e.status],color:J[e.status],order:5,important:!1}}function X(){return{name:"instnace-state",status:"undeployed",title:"State",message:"Instance is not deployed",icon:"circle-outline",color:"",important:!1,order:5}}function Z(e,r){const t=e.lastOperationState;return{name:"operation",logs:!0,title:"Operation",status:t.status,icon:q[t.status],color:G[t.status],important:T(r?.status)||t.status==="failed"&&e.status!=="undeployed",order:10,progress:C(t.status)&&t.status!=="pending"&&t.currentResourceCount&&t.totalResourceCount?Math.round(t.currentResourceCount/t.totalResourceCount*100):void 0}}function ee(e){return{name:"evaluation",status:e.status,title:"Evaluation",message:e.message??"",icon:Q[e.status],color:Y[e.status],important:e.status==="error",order:15}}function te(e){return e.status==="ok"?{name:"validation",status:"ok",title:"Validation",message:"Instance is valid",icon:"check-circle-outline",color:"success",important:!1,order:20}:{name:"validation",title:"Validation",status:"error",message:e.errorText,icon:"alert-circle-outline",color:"error",important:!0,order:20}}function ae(e){return{name:e.name,status:e.value,title:e.meta.title,message:e.message??"",icon:K[e.value]??"information-outline",customIcon:e.meta.icon,color:e.meta.iconColor??M[e.value]??"primary",important:e.value===O.Error,order:e.order??50}}function oe(e,r,t,i){const o=[];if(e&&e.status!=="undeployed"?o.push(F(e,t)):o.push(X()),e?.lastOperationState&&o.push(Z(e,r)),e?.evaluationState&&o.push(ee(e.evaluationState)),i&&o.push(te(i)),e?.customStatuses)for(const u of e.customStatuses)o.push(ae(u));return o.sort((u,c)=>u.order-c.order)}const ne=V({__name:"InstanceStatusLogsTab",props:{operationState:{}},setup(e){const{projectStore:r}=$(),{$client:t}=B();let i=null;const o=c=>{const l=c.split(`
|
|
2
|
-
`);for(const s of l)i.writeln(s)};if(C(e.operationState.status)){const{unsubscribe:c}=t.logs.watchInstanceLogs.subscribe({stateId:e.operationState.stateId,operationId:e.operationState.operationId},{onData:l=>{i&&o(l.content)}});E(c)}const u=async c=>{i=c;const l=await t.logs.getInstanceLogs.query({projectId:r.projectId,stateId:e.operationState.stateId,operationId:e.operationState.operationId});for(const s of l)o(s.content)};return(c,l)=>(m(),g(n(x),{class:"mt-2 mb-2",columns:80,rows:24,onLoad:u}))}}),se={key:0,class:"d-flex align-center justify-center",style:{width:"100%",height:"100%"}},re={class:"d-flex flex-column"},ie=V({__name:"InstanceStatusBadge",props:{state:{},operation:{},expectedInputHash:{},validationOutput:{}},setup(e){const r=S(()=>oe(e.state,e.operation,e.expectedInputHash,e.validationOutput)),t=S(()=>r.value.find(s=>s.important)??r.value[0]),i=y(t.value.name),o=y(!1);R([t,e.state],()=>{o.value||(i.value=t.value.name)},{immediate:!0});const u=s=>s.startsWith("#")?{}:{[`text-${s}`]:!0},c=s=>s.startsWith("#")?{color:s}:{},l=S(()=>t.value.progress!==void 0&&t.value.progress<100);return(s,f)=>(m(),g(W,{modelValue:n(o),"onUpdate:modelValue":f[1]||(f[1]=a=>w(o)?o.value=a:null),"open-on-hover":"","close-on-content-click":!1,location:"end"},{activator:d(({props:a})=>[p(D,U(a,{color:n(t).color,style:[{width:"44px"},{padding:n(l)?"0":void 0}],class:"status-chip"}),{default:d(()=>[n(l)?(m(),P("div",se,v(n(t).progress)+"% ",1)):(m(),g(n(k),{key:1,size:20,icon:`mdi-${n(t).icon}`,"custom-icon":n(t).customIcon},null,8,["icon","custom-icon"]))]),_:1},16,["color","style"])]),default:d(()=>[p(H,{color:"black"},{default:d(()=>[p(L,{modelValue:n(i),"onUpdate:modelValue":f[0]||(f[0]=a=>w(i)?i.value=a:null),items:n(r)},{tab:d(({item:a})=>[p(z,{value:a.name},{default:d(()=>[p(n(k),{size:22,icon:`mdi-${a.icon}`,"custom-icon":a.customIcon,color:a.color,class:"mr-2"},null,8,["icon","custom-icon","color"]),h("div",re,[h("div",{class:b(["font-weight-bold text-start",u(a.color)]),style:I(c(a.color))},v(a.title),7),h("div",{class:b(["text-caption font-weight-bold text-start",u(a.color)]),style:I(c(a.color))},v(a.status),7)])]),_:2},1032,["value"])]),item:d(({item:a})=>[p(N,{value:a.name},{default:d(()=>[a.logs?e.state?.lastOperationState?.operationId?(m(),g(ne,{key:e.state.lastOperationState.operationId,"instance-id":e.state.id,operationState:e.state.lastOperationState},null,8,["instance-id","operationState"])):_("",!0):(m(),g(n(x),{key:0,class:"mt-2 mb-2",columns:80,rows:24,content:a.message},null,8,["content"]))]),_:2},1032,["value"])]),_:1},8,["modelValue","items"])]),_:1})]),_:1},8,["modelValue"]))}}),pe=j(ie,[["__scopeId","data-v-eb35995d"]]);export{pe as I};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b6 as I,b7 as N,b8 as P,t as z,_ as B,g as D}from"#entry";import{P as L}from"./DnpKvmH_.js";import{_ as O,t as T}from"./DXyfavJr.js";import{s as A}from"./oZs8U75K.js";import{E as b,V as s,J as p,W as x,_ as u,D as a,Y as d,au as E,a2 as g,a0 as _,ao as F,ag as U,$ as W,a1 as y,j as w,aO as h,ak as J,aa as C,ab as k,al as R,a3 as Y}from"./sB5TSp0H.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./BupMEc6X.js";import"./D_wY_uke.js";const S={asc:(e,t)=>e>t,desc:(e,t)=>e<t};function q(e,t){let[n,...r]=t;if(!G(n))return e(n,j(...r));let i=j(n,...r);return o=>e(o,i)}function j(e,t,...n){let r=typeof e=="function"?e:e[0],i=typeof e=="function"?"asc":e[1],{[i]:o}=S,l=t===void 0?void 0:j(t,...n);return(c,m)=>{let f=r(c),v=r(m);return o(f,v)?1:o(v,f)?-1:l?.(c,m)??0}}function G(e){if($(e))return!0;if(typeof e!="object"||!Array.isArray(e))return!1;let[t,n,...r]=e;return $(t)&&typeof n=="string"&&n in S&&r.length===0}const $=e=>typeof e=="function"&&e.length===1;function H(...e){return I(K,e)}const K=(e,t)=>{let n=Object.create(null);for(let r=0;r<e.length;r++){let i=e[r],o=t(i,r,e);if(o!==void 0){let l=n[o];l===void 0?n[o]=[i]:l.push(i)}}return Object.setPrototypeOf(n,Object.prototype),n};function M(...e){return I(Q,e,X)}const Q=(e,t)=>e.map(t),X=e=>(t,n,r)=>({done:!1,hasNext:!0,next:e(t,n,r)});function V(...e){return q(Z,e)}const Z=(e,t)=>[...e].sort(t),ee="Components with version v0 are unstable and may be broken or disappear without warning.",te=b({__name:"ComponentTemplate",props:{component:{}},setup(e){const t=r=>{A(r.dataTransfer,e.component.type)},n=w(()=>{try{const[,r]=N(e.component.type);return r===0}catch{return!1}});return(r,i)=>(s(),p("div",{draggable:"true",style:{cursor:"grab"},onDragstart:t},[x(a(O),{component:e.component,text:e.component.meta.description?.split(`
|
|
2
|
-
`)[0]},{append:u(()=>[a(n)?(s(),d(E,{key:0,location:"top"},{activator:u(({props:o})=>[x(F,U(o,{color:"warning",label:"",size:"small",variant:"flat"}),{default:u(()=>[...i[0]||(i[0]=[W("unstable",-1)])]),_:1},16)]),default:u(()=>[g("span",null,_(ee))]),_:1})):y("",!0)]),_:1},8,["component","text"])],32))}}),re={class:"d-flex flex-column mt-4 pl-4 pr-4 gr-4 sidebar-container"},ne={class:"d-flex flex-column align-center gr-4 component-list-container"},oe={class:"text-uppercase text-disabled"},ae={key:0,class:"text-center text-uppercase text-disabled"},se={key:1,class:"mb-2 text-center text-uppercase text-disabled"},ie=b({__name:"ComponentList",props:{projectId:{}},async setup(e){let t,n;const r=([t,n]=h(()=>P.async(e.projectId)),t=await t,n(),t);[t,n]=h(()=>z(()=>r.initialized).toBe(!0)),await t,n();const i=w(()=>r.initialized?T(r.library.filteredComponents,H(o=>o.meta.category??"Uncategorized"),o=>Object.entries(o),V(([o])=>o==="Uncategorized"?"z":o),M(([o,l])=>[o,V(l,c=>c.meta.title??c.type)])):[]);return(o,l)=>(s(),p("div",re,[a(r)?(s(),d(J,{key:0,modelValue:a(r).library.search,"onUpdate:modelValue":l[0]||(l[0]=c=>a(r).library.search=c),class:"search",variant:"outlined",density:"compact",placeholder:"Search components","hide-details":""},null,8,["modelValue"])):y("",!0),g("div",ne,[(s(!0),p(C,null,k(a(i),([c,m])=>(s(),p("div",{key:c,class:"d-flex flex-column gr-4"},[g("div",oe,_(c)+" ("+_(m.length)+")",1),(s(!0),p(C,null,k(m,f=>(s(),d(te,{key:f.type,component:f},null,8,["component"]))),128))]))),128)),(a(r).library.filteredComponents.length??0)===0?(s(),p("div",ae," No components found ")):y("",!0)]),(a(r).library.filteredComponents.length??0)>0?(s(),p("div",se," Found "+_(a(r).library.filteredComponents.length)+" component(s) ",1)):y("",!0)]))}}),ce=B(ie,[["__scopeId","data-v-45cff09f"]]),le=b({__name:"ComponentListWrapper",props:{projectId:{}},async setup(e){let t,n;const r=([t,n]=h(()=>P.async(e.projectId)),t=await t,n(),t);return(i,o)=>(s(),d(a(L),{"project-id":e.projectId},{default:u(()=>[a(r).loading||a(r).initialized&&a(r).library.isReloading?(s(),d(R,{key:0,indeterminate:!0,color:"primary",height:"4",absolute:"",location:"bottom"})):y("",!0),(s(),d(ce,{key:e.projectId,"project-id":e.projectId},null,8,["project-id"]))]),_:1},8,["project-id"]))}}),pe={key:1,class:"mt-4 text-center text-uppercase text-disabled"},he=b({__name:"components",props:{params:{}},setup(e){const t=D();return(n,r)=>a(t).focusedProjectId?(s(),d(Y,{key:a(t).focusedProjectId},{default:u(()=>[x(a(le),{"project-id":a(t).focusedProjectId},null,8,["project-id"])]),_:1})):(s(),p("div",pe,"No active project"))}});export{he as default};
|