From c674bb54c9cdc338d5e66de9beca5adc0dfda10b Mon Sep 17 00:00:00 2001 From: skyaphid Date: Thu, 19 Sep 2024 16:11:11 -0500 Subject: [PATCH] Updates --- assets/{index-C9FPaIpK.js => index-BQLazOZ5.js} | 2 +- assets/{index-BfzcwPlN.css => index-DcCLRh-9.css} | 2 +- index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename assets/{index-C9FPaIpK.js => index-BQLazOZ5.js} (92%) rename assets/{index-BfzcwPlN.css => index-DcCLRh-9.css} (98%) diff --git a/assets/index-C9FPaIpK.js b/assets/index-BQLazOZ5.js similarity index 92% rename from assets/index-C9FPaIpK.js rename to assets/index-BQLazOZ5.js index cf6212b..6004619 100644 --- a/assets/index-C9FPaIpK.js +++ b/assets/index-BQLazOZ5.js @@ -38,7 +38,7 @@ Edge: ${e} Source: ${t} Target: ${r}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found -Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class It extends Error{constructor(t,...r){var n;super((n=Of[t])==null?void 0:n.call(Of,...r)),this.name="VueFlowError",this.code=t,this.args=r}}function Yu(e){return"clientX"in e}function Ar(e,t){var r,n;const i=Yu(e),o=i?e.clientX:(r=e.touches)==null?void 0:r[0].clientX,l=i?e.clientY:(n=e.touches)==null?void 0:n[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:l-((t==null?void 0:t.top)??0)}}const Jl=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function G_(e){var t,r;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((r=e.dimensions)==null?void 0:r.height)??e.height??0}}function Bp(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function da(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Nf(e,t,r,n){const i=[];for(const o of t[r]||[])if(`${e.id}-${o.id}-${r}`!==n){const{x:l,y:s}=Ql(e,o);i.push({id:o.id||null,type:r,nodeId:e.id,x:l,y:s})}return i}function Y_(e,t,r,n,i,o){const{x:l,y:s}=Ar(e),d=t.elementsFromPoint(l,s).find(b=>b.classList.contains("vue-flow__handle"));if(d){const b=d.getAttribute("data-nodeid");if(b){const m=Zu(void 0,d),_=d.getAttribute("data-handleid"),y=o({nodeId:b,id:_,type:m});if(y){const v=i.find(g=>g.nodeId===b&&g.type===m&&g.id===_);return{handle:{id:_,type:m,nodeId:b,x:(v==null?void 0:v.x)||r.x,y:(v==null?void 0:v.y)||r.y},validHandleResult:y}}}}let u=[],c=Number.POSITIVE_INFINITY;for(const b of i){const m=Math.sqrt((b.x-r.x)**2+(b.y-r.y)**2);if(m<=n){const _=o(b);m<=c&&(mb.isValid),h=u.some(({handle:b})=>b.type==="target");return u.find(({handle:b,validHandleResult:m})=>h?b.type==="target":f?m.isValid:!0)||u[0]}function Af(e,t,r,n,i,o,l,s,a,d,u){const c=o==="target",f=s.querySelector(`.vue-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:h,y:b}=Ar(e),m=s.elementFromPoint(h,b),_=m!=null&&m.classList.contains("vue-flow__handle")?m:f,y=Bp();if(_){y.handleDomNode=_;const v=Zu(void 0,_),g=_.getAttribute("data-nodeid"),p=_.getAttribute("data-handleid"),E=_.classList.contains("connectable"),S=_.classList.contains("connectableend"),A={source:c?g:n,sourceHandle:c?p:i,target:c?n:g,targetHandle:c?i:p};y.connection=A,E&&S&&(r===ui.Strict?c&&v==="source"||!c&&v==="target":g!==n||p!==i)&&(y.isValid=l(A,{edges:a,nodes:d,sourceNode:u(A.source),targetNode:u(A.target)}),y.endHandle={nodeId:g,handleId:p,type:v,position:y.isValid?_.getAttribute("data-handlepos"):null})}return y}function Z_({nodes:e,nodeId:t,handleId:r,handleType:n}){const i=[];for(let o=0;o{const s=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(s.left-r.left)/n,y:(s.top-r.top)/n,...Ss(l)}})}function ru(e,t,r,n,i,o=!1,l){i.value=!1,e.selected?(o||e.selected&&t)&&(n([e]),Xt(()=>{l.blur()})):r([e])}function Et(e){return typeof pe(e)<"u"}function J_(e,t,r,n){if(!e||!e.source||!e.target)return r(new It(xt.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let i;return Lr(e)?i=e:i={...e,id:kp(e)},i=Ap(i,void 0,n),B_(i,t)?!1:i}function ew(e,t,r,n,i,o){if(!t.source||!t.target)return o(new It(xt.EDGE_INVALID,e.id)),!1;const l=n(e.id);if(!l)return o(new It(xt.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...a}=e,d={...a,id:i?kp(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return r.splice(r.indexOf(l),1,d),d}function kf(e,t,r){const n={},i=[];for(let o=0;os.id===o.parentNode);o.parentNode&&!l&&r(new It(xt.NODE_MISSING_PARENT,o.id,o.parentNode)),(o.parentNode||n[o.id])&&(n[o.id]&&(o.isParent=!0),l&&(l.isParent=!0))}return i}function Cf(e,t){e.clear();for(const r of t){const{id:n,source:i,target:o,sourceHandle:l=null,targetHandle:s=null}=r,a=`${i}-source-${l}`,d=`${o}-target-${s}`,u=e.get(a)||new Map,c=e.get(d)||new Map,f=Or({edgeId:n,source:i,target:o,sourceHandle:l,targetHandle:s});e.set(a,u.set(`${o}-${s}`,f)),e.set(d,c.set(`${i}-${l}`,f))}}function Mf(e,t,r,n,i,o,l,s){const a=[];for(const d of e){const u=Lr(d)?d:J_(d,s,i,o);if(!u)continue;const c=r(u.source),f=r(u.target);if(!c||!f){i(new It(xt.EDGE_SOURCE_TARGET_MISSING,u.id,u.source,u.target));continue}if(!c){i(new It(xt.EDGE_SOURCE_MISSING,u.id,u.source));continue}if(!f){i(new It(xt.EDGE_TARGET_MISSING,u.id,u.target));continue}if(t&&!t(u,{edges:s,nodes:l,sourceNode:c,targetNode:f})){i(new It(xt.EDGE_INVALID,u.id));continue}const h=n(u.id);a.push({...Ap(u,h,o),sourceNode:c,targetNode:f})}return a}const Pf=Symbol("vueFlow"),Xu=Symbol("nodeId"),Fp=Symbol("nodeRef"),tw=Symbol("edgeId"),nw=Symbol("edgeRef"),Ns=Symbol("slots");function Hp(e){const{vueFlowRef:t,snapToGrid:r,snapGrid:n,noDragClassName:i,nodes:o,nodeExtent:l,nodeDragThreshold:s,viewport:a,autoPanOnNodeDrag:d,autoPanSpeed:u,nodesDraggable:c,panBy:f,findNode:h,multiSelectionActive:b,nodesSelectionActive:m,selectNodesOnDrag:_,removeSelectedElements:y,addSelectedNodes:v,updateNodePositions:g,emits:p}=lt(),{onStart:E,onDrag:S,onStop:A,onClick:k,el:I,disabled:x,id:w,selectable:N,dragHandle:P}=e,C=Pe(!1);let L=[],D,V=null,Q={x:void 0,y:void 0},W={x:0,y:0},$=null,R=!1,F=0,j=!1;const Z=jp(),G=({x:ae,y:ce})=>{Q={x:ae,y:ce};let T=!1;if(L=L.map(M=>{const B={x:ae-M.distance.x,y:ce-M.distance.y};r.value&&(B.x=n.value[0]*Math.round(B.x/n.value[0]),B.y=n.value[1]*Math.round(B.y/n.value[1]));const{computedPosition:K}=Gu(M,B,p.error,l.value,M.parentNode?h(M.parentNode):void 0);return T=T||M.position.x!==K.x||M.position.y!==K.y,M.position=K,M}),!!T&&(g(L,!0,!0),C.value=!0,$)){const[M,B]=fa({id:w,dragItems:L,findNode:h});S({event:$,node:M,nodes:B})}},H=()=>{if(!V)return;const[ae,ce]=Dp(W,V,u.value);if(ae!==0||ce!==0){const T={x:(Q.x??0)-ae/a.value.zoom,y:(Q.y??0)-ce/a.value.zoom};f({x:ae,y:ce})&&G(T)}F=requestAnimationFrame(H)},J=(ae,ce)=>{R=!0;const T=h(w);!_.value&&!b.value&&T&&(T.selected||y()),T&&et(N)&&_.value&&ru(T,b.value,v,y,m,!1,ce);const M=Z(ae);if(Q=M,L=j_(o.value,c.value,M,h,w),L.length){const[B,K]=fa({id:w,dragItems:L,findNode:h});E({event:ae.sourceEvent,node:B,nodes:K})}},oe=(ae,ce)=>{var T;ae.sourceEvent.type==="touchmove"&&ae.sourceEvent.touches.length>1||(s.value===0&&J(ae,ce),Q=Z(ae),V=((T=t.value)==null?void 0:T.getBoundingClientRect())||null,W=Ar(ae.sourceEvent,V))},ie=(ae,ce)=>{const T=Z(ae);if(!j&&R&&d.value&&(j=!0,H()),!R){const M=T.xSnapped-(Q.x??0),B=T.ySnapped-(Q.y??0);Math.sqrt(M*M+B*B)>s.value&&J(ae,ce)}(Q.x!==T.xSnapped||Q.y!==T.ySnapped)&&L.length&&R&&($=ae.sourceEvent,W=Ar(ae.sourceEvent,V),G(T))},se=ae=>{if(!R){const ce=Z(ae),T=ce.xSnapped-(Q.x??0),M=ce.ySnapped-(Q.y??0),B=Math.sqrt(T*T+M*M);B!==0&&B<=s.value&&(k==null||k(ae.sourceEvent));return}if(C.value=!1,j=!1,R=!1,cancelAnimationFrame(F),L.length){g(L,!1,!1);const[ce,T]=fa({id:w,dragItems:L,findNode:h});A({event:ae.sourceEvent,node:ce,nodes:T})}};return $e([()=>et(x),I],([ae,ce],T,M)=>{if(ce){const B=xn(ce);ae||(D=q1().on("start",K=>oe(K,ce)).on("drag",K=>ie(K,ce)).on("end",K=>se(K)).filter(K=>{const z=K.target,U=et(P);return!K.button&&(!i.value||!xf(z,`.${i.value}`,ce)&&(!U||xf(z,U,ce)))}),B.call(D)),M(()=>{B.on(".drag",null),D&&(D.on("start",null),D.on("drag",null),D.on("end",null))})}}),C}function rw(){return{doubleClick:we(),click:we(),mouseEnter:we(),mouseMove:we(),mouseLeave:we(),contextMenu:we(),updateStart:we(),update:we(),updateEnd:we()}}function iw(e,t){const r=rw();return r.doubleClick.on(n=>{var i,o;t.edgeDoubleClick(n),(o=(i=e.events)==null?void 0:i.doubleClick)==null||o.call(i,n)}),r.click.on(n=>{var i,o;t.edgeClick(n),(o=(i=e.events)==null?void 0:i.click)==null||o.call(i,n)}),r.mouseEnter.on(n=>{var i,o;t.edgeMouseEnter(n),(o=(i=e.events)==null?void 0:i.mouseEnter)==null||o.call(i,n)}),r.mouseMove.on(n=>{var i,o;t.edgeMouseMove(n),(o=(i=e.events)==null?void 0:i.mouseMove)==null||o.call(i,n)}),r.mouseLeave.on(n=>{var i,o;t.edgeMouseLeave(n),(o=(i=e.events)==null?void 0:i.mouseLeave)==null||o.call(i,n)}),r.contextMenu.on(n=>{var i,o;t.edgeContextMenu(n),(o=(i=e.events)==null?void 0:i.contextMenu)==null||o.call(i,n)}),r.updateStart.on(n=>{var i,o;t.edgeUpdateStart(n),(o=(i=e.events)==null?void 0:i.updateStart)==null||o.call(i,n)}),r.update.on(n=>{var i,o;t.edgeUpdate(n),(o=(i=e.events)==null?void 0:i.update)==null||o.call(i,n)}),r.updateEnd.on(n=>{var i,o;t.edgeUpdateEnd(n),(o=(i=e.events)==null?void 0:i.updateEnd)==null||o.call(i,n)}),Object.entries(r).reduce((n,[i,o])=>(n.emit[i]=o.trigger,n.on[i]=o.on,n),{emit:{},on:{}})}function jp(){const{viewport:e,snapGrid:t,snapToGrid:r}=lt();return({sourceEvent:n})=>{const i=n.touches?n.touches[0].clientX:n.clientX,o=n.touches?n.touches[0].clientY:n.clientY,l={x:(i-e.value.x)/e.value.zoom,y:(o-e.value.y)/e.value.zoom};return{xSnapped:r.value?t.value[0]*Math.round(l.x/t.value[0]):l.x,ySnapped:r.value?t.value[1]*Math.round(l.y/t.value[1]):l.y,...l}}}function gl(){return!0}function zp({handleId:e,nodeId:t,type:r,isValidConnection:n,edgeUpdaterType:i,onEdgeUpdate:o,onEdgeUpdateEnd:l}){const{vueFlowRef:s,connectionMode:a,connectionRadius:d,connectOnClick:u,connectionClickStartHandle:c,nodesConnectable:f,autoPanOnConnect:h,autoPanSpeed:b,findNode:m,panBy:_,startConnection:y,updateConnection:v,endConnection:g,emits:p,viewport:E,edges:S,nodes:A,isValidConnection:k}=lt();let I=null,x=!1,w=null,N=null;function P(L){var D;const V=et(r)==="target",Q=Yu(L),W=gf(L.target);if(Q&&L.button===0||!Q){let $=function(K){ce=Ar(K,se);const{handle:z,validHandleResult:U}=Y_(K,W,Xl(ce,E.value,!1,[1,1]),d.value,M,Y=>Af(K,Y,a.value,et(t),et(e),V?"target":"source",j,W,S.value,A.value,m));if(Z=z,T||(B(),T=!0),I=U.connection,x=U.isValid,w=U.handleDomNode,!(x&&Z&&(N!=null&&N.endHandle)&&U.endHandle&&N.endHandle.type===U.endHandle.type&&N.endHandle.nodeId===U.endHandle.nodeId&&N.endHandle.handleId===U.endHandle.handleId)){if(v(Z&&x?Cp({x:Z.x,y:Z.y},E.value):ce,U.endHandle,X_(!!Z,x)),N=U,!Z&&!x&&!w)return da(ae);I&&I.source!==I.target&&w&&(da(ae),ae=w,w.classList.add("connecting","vue-flow__handle-connecting"),w.classList.toggle("valid",x),w.classList.toggle("vue-flow__handle-valid",x))}},R=function(K){(Z||w)&&I&&x&&(o?o(K,I):p.connect(I)),p.connectEnd(K),i&&(l==null||l(K)),da(ae),cancelAnimationFrame(G),g(K),T=!1,x=!1,I=null,w=null,W.removeEventListener("mousemove",$),W.removeEventListener("mouseup",R),W.removeEventListener("touchmove",$),W.removeEventListener("touchend",R)};const F=m(et(t));let j=et(n)||k.value||gl;!j&&F&&(j=(V?F.isValidSourcePos:F.isValidTargetPos)||gl);let Z,G=0;const{x:H,y:J}=Ar(L),oe=W==null?void 0:W.elementFromPoint(H,J),ie=Zu(et(i),oe),se=(D=s.value)==null?void 0:D.getBoundingClientRect();if(!se||!ie)return;let ae,ce=Ar(L,se),T=!1;const M=Z_({nodes:A.value,nodeId:et(t),handleId:et(e),handleType:ie}),B=()=>{if(!h.value)return;const[K,z]=Dp(ce,se,b.value);_({x:K,y:z}),G=requestAnimationFrame(B)};y({nodeId:et(t),handleId:et(e),type:ie,position:(oe==null?void 0:oe.getAttribute("data-handlepos"))||Ne.Top},{x:H-se.left,y:J-se.top}),p.connectStart({event:L,nodeId:et(t),handleId:et(e),handleType:ie}),W.addEventListener("mousemove",$),W.addEventListener("mouseup",R),W.addEventListener("touchmove",$),W.addEventListener("touchend",R)}}function C(L){if(!u.value)return;const D=et(r)==="target";if(!c.value)p.clickConnectStart({event:L,nodeId:et(t),handleId:et(e)}),y({nodeId:et(t),type:et(r),handleId:et(e)},void 0,!0);else{let V=et(n)||k.value||gl;const Q=m(et(t));if(!V&&Q&&(V=(D?Q.isValidSourcePos:Q.isValidTargetPos)||gl),Q&&(typeof Q.connectable>"u"?f.value:Q.connectable)===!1)return;const W=gf(L.target),{connection:$,isValid:R}=Af(L,{nodeId:et(t),id:et(e),type:et(r)},a.value,c.value.nodeId,c.value.handleId||null,c.value.type,V,W,S.value,A.value,m),F=$.source===$.target;R&&!F&&p.connect($),p.clickConnectEnd(L),g(L,!0)}}return{handlePointerDown:P,handleClick:C}}function ow(){return vn(Xu,"")}function Vp(e){const t=e??ow()??"",r=vn(Fp,Pe(null)),{findNode:n,edges:i,emits:o}=lt(),l=n(t);return l||o.error(new It(xt.NODE_NOT_FOUND,t)),{id:t,nodeEl:r,node:l,parentNode:Re(()=>n(l.parentNode)),connectedEdges:Re(()=>Rp([l],i.value))}}function lw(){return{doubleClick:we(),click:we(),mouseEnter:we(),mouseMove:we(),mouseLeave:we(),contextMenu:we(),dragStart:we(),drag:we(),dragStop:we()}}function sw(e,t){const r=lw();return r.doubleClick.on(n=>{var i,o;t.nodeDoubleClick(n),(o=(i=e.events)==null?void 0:i.doubleClick)==null||o.call(i,n)}),r.click.on(n=>{var i,o;t.nodeClick(n),(o=(i=e.events)==null?void 0:i.click)==null||o.call(i,n)}),r.mouseEnter.on(n=>{var i,o;t.nodeMouseEnter(n),(o=(i=e.events)==null?void 0:i.mouseEnter)==null||o.call(i,n)}),r.mouseMove.on(n=>{var i,o;t.nodeMouseMove(n),(o=(i=e.events)==null?void 0:i.mouseMove)==null||o.call(i,n)}),r.mouseLeave.on(n=>{var i,o;t.nodeMouseLeave(n),(o=(i=e.events)==null?void 0:i.mouseLeave)==null||o.call(i,n)}),r.contextMenu.on(n=>{var i,o;t.nodeContextMenu(n),(o=(i=e.events)==null?void 0:i.contextMenu)==null||o.call(i,n)}),r.dragStart.on(n=>{var i,o;t.nodeDragStart(n),(o=(i=e.events)==null?void 0:i.dragStart)==null||o.call(i,n)}),r.drag.on(n=>{var i,o;t.nodeDrag(n),(o=(i=e.events)==null?void 0:i.drag)==null||o.call(i,n)}),r.dragStop.on(n=>{var i,o;t.nodeDragStop(n),(o=(i=e.events)==null?void 0:i.dragStop)==null||o.call(i,n)}),Object.entries(r).reduce((n,[i,o])=>(n.emit[i]=o.trigger,n.on[i]=o.on,n),{emit:{},on:{}})}function Up(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:r,findNode:n,snapGrid:i,snapToGrid:o,nodesDraggable:l,emits:s}=lt();return(a,d=!1)=>{const u=o.value?i.value[0]:5,c=o.value?i.value[1]:5,f=d?4:1,h=a.x*u*f,b=a.y*c*f,m=[];for(const _ of e.value)if(_.draggable||l&&typeof _.draggable>"u"){const y={x:_.computedPosition.x+h,y:_.computedPosition.y+b},{computedPosition:v}=Gu(_,y,s.error,t.value,_.parentNode?n(_.parentNode):void 0);m.push({id:_.id,position:v,from:_.position,distance:{x:a.x,y:a.y},dimensions:_.dimensions})}r(m,!0,!1)}}const ha=.1;function hr(){return Os("Viewport not initialized yet."),Promise.resolve(!1)}const aw={zoomIn:hr,zoomOut:hr,zoomTo:hr,fitView:hr,setCenter:hr,fitBounds:hr,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:hr,setTransform:hr,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function uw(e){function t(n,i){return new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleBy(pa(e.d3Selection,i,()=>{o(!0)}),n):o(!1)})}function r(n,i,o,l){return new Promise(s=>{const{x:a,y:d}=Np({x:-n,y:-i},e.translateExtent),u=$i.translate(-a,-d).scale(o);e.d3Selection&&e.d3Zoom?e.d3Zoom.transform(pa(e.d3Selection,l,()=>{s(!0)}),u):s(!1)})}return Re(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i==null?void 0:i.duration),zoomOut:i=>t(1/1.2,i==null?void 0:i.duration),zoomTo:(i,o)=>new Promise(l=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleTo(pa(e.d3Selection,o==null?void 0:o.duration,()=>{l(!0)}),i):l(!1)}),setViewport:(i,o)=>r(i.x,i.y,i.zoom,o==null?void 0:o.duration),setTransform:(i,o)=>r(i.x,i.y,i.zoom,o==null?void 0:o.duration),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:ha,includeHiddenNodes:!1,duration:0})=>{var o,l;const s=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&((i==null?void 0:i.includeHiddenNodes)||!f.hidden)&&(!((o=i.nodes)!=null&&o.length)||(l=i.nodes)!=null&&l.length&&i.nodes.includes(f.id))&&s.push(f);if(!s.length)return Promise.resolve(!1);const a=Pp(s),{x:d,y:u,zoom:c}=mf(a,e.dimensions.width,e.dimensions.height,i.minZoom??e.minZoom,i.maxZoom??e.maxZoom,i.padding??ha,i.offset);return r(d,u,c,i==null?void 0:i.duration)},setCenter:(i,o,l)=>{const s=typeof(l==null?void 0:l.zoom)<"u"?l.zoom:e.maxZoom,a=e.dimensions.width/2-i*s,d=e.dimensions.height/2-o*s;return r(a,d,s,l==null?void 0:l.duration)},fitBounds:(i,o={padding:ha})=>{const{x:l,y:s,zoom:a}=mf(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding);return r(l,s,a,o==null?void 0:o.duration)},project:i=>Xl(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:o,y:l}=e.vueFlowRef.getBoundingClientRect(),s={x:i.x-o,y:i.y-l};return Xl(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:o,y:l}=e.vueFlowRef.getBoundingClientRect(),s={x:i.x+o,y:i.y+l};return Cp(s,e.viewport)}return{x:0,y:0}}}:aw)}function pa(e,t=0,r){return e.transition().duration(t).on("end",r)}function cw(e,t,r){const n=vu(!0);return n.run(()=>{const i=()=>{n.run(()=>{let m,_,y=!!(r.nodes.value.length||r.edges.value.length);m=yi([e.modelValue,()=>{var v,g;return(g=(v=e.modelValue)==null?void 0:v.value)==null?void 0:g.length}],([v])=>{v&&Array.isArray(v)&&(_==null||_.pause(),r.setElements(v),!_&&!y&&v.length?y=!0:_==null||_.resume())}),_=yi([r.nodes,r.edges,()=>r.edges.value.length,()=>r.nodes.value.length],([v,g])=>{var p;(p=e.modelValue)!=null&&p.value&&Array.isArray(e.modelValue.value)&&(m==null||m.pause(),e.modelValue.value=[...v,...g],Xt(()=>{m==null||m.resume()}))},{immediate:y}),so(()=>{m==null||m.stop(),_==null||_.stop()})})},o=()=>{n.run(()=>{let m,_,y=!!r.nodes.value.length;m=yi([e.nodes,()=>{var v,g;return(g=(v=e.nodes)==null?void 0:v.value)==null?void 0:g.length}],([v])=>{v&&Array.isArray(v)&&(_==null||_.pause(),r.setNodes(v),!_&&!y&&v.length?y=!0:_==null||_.resume())}),_=yi([r.nodes,()=>r.nodes.value.length],([v])=>{var g;(g=e.nodes)!=null&&g.value&&Array.isArray(e.nodes.value)&&(m==null||m.pause(),e.nodes.value=[...v],Xt(()=>{m==null||m.resume()}))},{immediate:y}),so(()=>{m==null||m.stop(),_==null||_.stop()})})},l=()=>{n.run(()=>{let m,_,y=!!r.edges.value.length;m=yi([e.edges,()=>{var v,g;return(g=(v=e.edges)==null?void 0:v.value)==null?void 0:g.length}],([v])=>{v&&Array.isArray(v)&&(_==null||_.pause(),r.setEdges(v),!_&&!y&&v.length?y=!0:_==null||_.resume())}),_=yi([r.edges,()=>r.edges.value.length],([v])=>{var g;(g=e.edges)!=null&&g.value&&Array.isArray(e.edges.value)&&(m==null||m.pause(),e.edges.value=[...v],Xt(()=>{m==null||m.resume()}))},{immediate:y}),so(()=>{m==null||m.stop(),_==null||_.stop()})})},s=()=>{n.run(()=>{$e(()=>t.maxZoom,()=>{t.maxZoom&&Et(t.maxZoom)&&r.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{n.run(()=>{$e(()=>t.minZoom,()=>{t.minZoom&&Et(t.minZoom)&&r.setMinZoom(t.minZoom)},{immediate:!0})})},d=()=>{n.run(()=>{$e(()=>t.translateExtent,()=>{t.translateExtent&&Et(t.translateExtent)&&r.setTranslateExtent(t.translateExtent)},{immediate:!0})})},u=()=>{n.run(()=>{$e(()=>t.nodeExtent,()=>{t.nodeExtent&&Et(t.nodeExtent)&&r.setNodeExtent(t.nodeExtent)},{immediate:!0})})},c=()=>{n.run(()=>{$e(()=>t.applyDefault,()=>{Et(t.applyDefault)&&(r.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{n.run(()=>{const m=async _=>{let y=_;typeof t.autoConnect=="function"&&(y=await t.autoConnect(_)),y!==!1&&r.addEdges([y])};$e(()=>t.autoConnect,()=>{Et(t.autoConnect)&&(r.autoConnect.value=t.autoConnect)},{immediate:!0}),$e(r.autoConnect,(_,y,v)=>{_?r.onConnect(m):r.hooks.value.connect.off(m),v(()=>{r.hooks.value.connect.off(m)})},{immediate:!0})})},h=()=>{const m=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const _ of Object.keys(t)){const y=_;if(!m.includes(y)){const v=nt(()=>t[y]),g=r[y];St(g)&&n.run(()=>{$e(v,p=>{Et(p)&&(g.value=p)},{immediate:!0})})}}};(()=>{i(),o(),l(),a(),s(),d(),u(),c(),f(),h()})()}),()=>n.stop()}function fw(){return{edgesChange:we(),nodesChange:we(),nodeDoubleClick:we(),nodeClick:we(),nodeMouseEnter:we(),nodeMouseMove:we(),nodeMouseLeave:we(),nodeContextMenu:we(),nodeDragStart:we(),nodeDrag:we(),nodeDragStop:we(),nodesInitialized:we(),miniMapNodeClick:we(),miniMapNodeDoubleClick:we(),miniMapNodeMouseEnter:we(),miniMapNodeMouseMove:we(),miniMapNodeMouseLeave:we(),connect:we(),connectStart:we(),connectEnd:we(),clickConnectStart:we(),clickConnectEnd:we(),paneReady:we(),init:we(),move:we(),moveStart:we(),moveEnd:we(),selectionDragStart:we(),selectionDrag:we(),selectionDragStop:we(),selectionContextMenu:we(),selectionStart:we(),selectionEnd:we(),viewportChangeStart:we(),viewportChange:we(),viewportChangeEnd:we(),paneScroll:we(),paneClick:we(),paneContextMenu:we(),paneMouseEnter:we(),paneMouseMove:we(),paneMouseLeave:we(),edgeContextMenu:we(),edgeMouseEnter:we(),edgeMouseMove:we(),edgeMouseLeave:we(),edgeDoubleClick:we(),edgeClick:we(),edgeUpdateStart:we(),edgeUpdate:we(),edgeUpdateEnd:we(),updateNodeInternals:we(),error:we(e=>Os(e.message))}}function dw(e,t){vs(()=>{for(const[r,n]of Object.entries(t.value)){const i=o=>{e(r,o)};n.fns.add(i),bs(()=>{n.off(i)})}})}function Wp(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Ku.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:ho.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Wr.Bezier,style:{}},connectionMode:ui.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Jl()?"Meta":"Control",zoomActivationKeyCode:Jl()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:fw(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const hw=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function pw(e,t,r){const n=uw(e),i=T=>{const M=T??[];e.hooks.updateNodeInternals.trigger(M)},o=T=>$_(T,e.nodes,e.edges),l=T=>D_(T,e.nodes,e.edges),s=T=>Rp(T,e.edges),a=T=>{if(T)return t.value.get(T)},d=T=>{if(T)return r.value.get(T)},u=(T,M,B)=>{var K,z;const U=[];for(const Y of T){const te={id:Y.id,type:"position",dragging:B,from:Y.from};if(M&&(te.position=Y.position,Y.parentNode)){const re=a(Y.parentNode);te.position={x:te.position.x-(((K=re==null?void 0:re.computedPosition)==null?void 0:K.x)??0),y:te.position.y-(((z=re==null?void 0:re.computedPosition)==null?void 0:z.y)??0)}}U.push(te)}U!=null&&U.length&&e.hooks.nodesChange.trigger(U)},c=T=>{if(!e.vueFlowRef)return;const M=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!M)return;const B=window.getComputedStyle(M),{m22:K}=new window.DOMMatrixReadOnly(B.transform),z=[];for(let U=0;U{e.fitViewOnInitDone=!0}),z.length&&e.hooks.nodesChange.trigger(z)},f=(T,M)=>{const B=new Set,K=new Set;for(const Y of T)ri(Y)?B.add(Y.id):Lr(Y)&&K.add(Y.id);const z=_r(t.value,B,!0),U=_r(r.value,K);if(e.multiSelectionActive){for(const Y of B)z.push(vr(Y,M));for(const Y of K)U.push(vr(Y,M))}z.length&&e.hooks.nodesChange.trigger(z),U.length&&e.hooks.edgesChange.trigger(U)},h=T=>{if(e.multiSelectionActive){const M=T.map(B=>vr(B.id,!0));e.hooks.nodesChange.trigger(M);return}e.hooks.nodesChange.trigger(_r(t.value,new Set(T.map(M=>M.id)),!0)),e.hooks.edgesChange.trigger(_r(r.value))},b=T=>{if(e.multiSelectionActive){const M=T.map(B=>vr(B.id,!0));e.hooks.edgesChange.trigger(M);return}e.hooks.edgesChange.trigger(_r(r.value,new Set(T.map(M=>M.id)))),e.hooks.nodesChange.trigger(_r(t.value,new Set,!0))},m=T=>{f(T,!0)},_=T=>{const B=(T||e.nodes).map(K=>(K.selected=!1,vr(K.id,!1)));e.hooks.nodesChange.trigger(B)},y=T=>{const B=(T||e.edges).map(K=>(K.selected=!1,vr(K.id,!1)));e.hooks.edgesChange.trigger(B)},v=T=>{if(!T||!T.length)return f([],!1);const M=T.reduce((B,K)=>{const z=vr(K.id,!1);return ri(K)?B.nodes.push(z):B.edges.push(z),B},{nodes:[],edges:[]});M.nodes.length&&e.hooks.nodesChange.trigger(M.nodes),M.edges.length&&e.hooks.edgesChange.trigger(M.edges)},g=T=>{var M;(M=e.d3Zoom)==null||M.scaleExtent([T,e.maxZoom]),e.minZoom=T},p=T=>{var M;(M=e.d3Zoom)==null||M.scaleExtent([e.minZoom,T]),e.maxZoom=T},E=T=>{var M;(M=e.d3Zoom)==null||M.translateExtent(T),e.translateExtent=T},S=T=>{e.nodeExtent=T,i()},A=T=>{var M;(M=e.d3Zoom)==null||M.clickDistance(T)},k=T=>{e.nodesDraggable=T,e.nodesConnectable=T,e.elementsSelectable=T},I=T=>{const M=T instanceof Function?T(e.nodes):T;!e.initialized&&!M.length||(e.nodes=kf(M,a,e.hooks.error.trigger))},x=T=>{const M=T instanceof Function?T(e.edges):T;if(!e.initialized&&!M.length)return;const B=Mf(M,e.isValidConnection,a,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Cf(e.connectionLookup,B),e.edges=B},w=T=>{const M=T instanceof Function?T([...e.nodes,...e.edges]):T;!e.initialized&&!M.length||(I(M.filter(ri)),x(M.filter(Lr)))},N=T=>{let M=T instanceof Function?T(e.nodes):T;M=Array.isArray(M)?M:[M];const B=kf(M,a,e.hooks.error.trigger),K=[];for(const z of B)K.push(_f(z));K.length&&e.hooks.nodesChange.trigger(K)},P=T=>{let M=T instanceof Function?T(e.edges):T;M=Array.isArray(M)?M:[M];const B=Mf(M,e.isValidConnection,a,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),K=[];for(const z of B)K.push(_f(z));K.length&&e.hooks.edgesChange.trigger(K)},C=(T,M=!0,B=!1)=>{const K=T instanceof Function?T(e.nodes):T,z=Array.isArray(K)?K:[K],U=[],Y=[];function te(ee){const ue=s(ee);for(const X of ue)(!Et(X.deletable)||X.deletable)&&Y.push(Ef(X.id,X.source,X.target,X.sourceHandle,X.targetHandle))}function re(ee){const ue=[];for(const X of e.nodes)X.parentNode===ee&&ue.push(X);if(ue.length){for(const X of ue)U.push(wf(X.id));M&&te(ue);for(const X of ue)re(X.id)}}for(const ee of z){const ue=typeof ee=="string"?a(ee):ee;ue&&(Et(ue.deletable)&&!ue.deletable||(U.push(wf(ue.id)),M&&te([ue]),B&&re(ue.id)))}Y.length&&e.hooks.edgesChange.trigger(Y),U.length&&e.hooks.nodesChange.trigger(U)},L=T=>{const M=T instanceof Function?T(e.edges):T,B=Array.isArray(M)?M:[M],K=[];for(const z of B){const U=typeof z=="string"?d(z):z;U&&(Et(U.deletable)&&!U.deletable||K.push(Ef(typeof z=="string"?z:z.id,U.source,U.target,U.sourceHandle,U.targetHandle)))}e.hooks.edgesChange.trigger(K)},D=(T,M,B=!0)=>ew(T,M,e.edges,d,B,e.hooks.error.trigger),V=(T,M,B={replace:!1})=>{const K=d(T);if(!K)return;const z=typeof M=="function"?M(K):M;K.data=B.replace?z:{...K.data,...z}},Q=T=>bf(T,e.nodes),W=T=>{const M=bf(T,e.edges);return Cf(e.connectionLookup,M),M},$=(T,M,B={replace:!1})=>{const K=a(T);if(!K)return;const z=typeof M=="function"?M(K):M;B.replace?e.nodes.splice(e.nodes.indexOf(K),1,z):Object.assign(K,z)},R=(T,M,B={replace:!1})=>{const K=a(T);if(!K)return;const z=typeof M=="function"?M(K):M;K.data=B.replace?z:{...K.data,...z}},F=(T,M,B=!1)=>{B?e.connectionClickStartHandle=T:e.connectionStartHandle=T,e.connectionEndHandle=null,e.connectionStatus=null,M&&(e.connectionPosition=M)},j=(T,M=null,B=null)=>{e.connectionStartHandle&&(e.connectionPosition=T,e.connectionEndHandle=M,e.connectionStatus=B)},Z=(T,M)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,M?e.connectionClickStartHandle=null:e.connectionStartHandle=null},G=T=>{const M=R_(T),B=M?null:io(T)?T:a(T.id);return!M&&!B?[null,null,M]:[M?T:tu(B),B,M]},H=(T,M=!0,B=e.nodes)=>{const[K,z,U]=G(T);if(!K)return[];const Y=[];for(const te of B||e.nodes){if(!U&&(te.id===z.id||!te.computedPosition))continue;const re=tu(te),ee=nu(re,K);(M&&ee>0||ee>=Number(K.width)*Number(K.height))&&Y.push(te)}return Y},J=(T,M,B=!0)=>{const[K]=G(T);if(!K)return!1;const z=nu(K,M);return B&&z>0||z>=Number(K.width)*Number(K.height)},oe=T=>{const{viewport:M,dimensions:B,d3Zoom:K,d3Selection:z,translateExtent:U}=e;if(!K||!z||!T.x&&!T.y)return!1;const Y=$i.translate(M.x+T.x,M.y+T.y).scale(M.zoom),te=[[0,0],[B.width,B.height]],re=K.constrain()(Y,te,U),ee=e.viewport.x!==re.x||e.viewport.y!==re.y||e.viewport.zoom!==re.k;return K.transform(z,re),ee},ie=T=>{const M=T instanceof Function?T(e):T,B=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Et(M.defaultEdgeOptions)&&(e.defaultEdgeOptions=M.defaultEdgeOptions);const K=M.modelValue||M.nodes||M.edges?[]:void 0;K&&(M.modelValue&&K.push(...M.modelValue),M.nodes&&K.push(...M.nodes),M.edges&&K.push(...M.edges),w(K));const z=()=>{Et(M.maxZoom)&&p(M.maxZoom),Et(M.minZoom)&&g(M.minZoom),Et(M.translateExtent)&&E(M.translateExtent)};for(const U of Object.keys(M)){const Y=U,te=M[Y];![...hw,...B].includes(Y)&&Et(te)&&(e[Y]=te)}Va(()=>e.d3Zoom).not.toBeNull().then(z),e.initialized||(e.initialized=!0)};return{updateNodePositions:u,updateNodeDimensions:c,setElements:w,setNodes:I,setEdges:x,addNodes:N,addEdges:P,removeNodes:C,removeEdges:L,findNode:a,findEdge:d,updateEdge:D,updateEdgeData:V,updateNode:$,updateNodeData:R,applyEdgeChanges:W,applyNodeChanges:Q,addSelectedElements:m,addSelectedNodes:h,addSelectedEdges:b,setMinZoom:g,setMaxZoom:p,setTranslateExtent:E,setNodeExtent:S,setPaneClickDistance:A,removeSelectedElements:v,removeSelectedNodes:_,removeSelectedEdges:y,startConnection:F,updateConnection:j,endConnection:Z,setInteractive:k,setState:ie,getIntersectingNodes:H,getIncomers:o,getOutgoers:l,getConnectedEdges:s,isNodeIntersecting:J,panBy:oe,fitView:T=>n.value.fitView(T),zoomIn:T=>n.value.zoomIn(T),zoomOut:T=>n.value.zoomOut(T),zoomTo:(T,M)=>n.value.zoomTo(T,M),setViewport:(T,M)=>n.value.setViewport(T,M),setTransform:(T,M)=>n.value.setTransform(T,M),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(T,M,B)=>n.value.setCenter(T,M,B),fitBounds:(T,M)=>n.value.fitBounds(T,M),project:T=>n.value.project(T),screenToFlowCoordinate:T=>n.value.screenToFlowCoordinate(T),flowToScreenCoordinate:T=>n.value.flowToScreenCoordinate(T),toObject:()=>{const T=[],M=[];for(const B of e.nodes){const{computedPosition:K,handleBounds:z,selected:U,dimensions:Y,isParent:te,resizing:re,dragging:ee,events:ue,...X}=B;T.push(X)}for(const B of e.edges){const{selected:K,sourceNode:z,targetNode:U,events:Y,...te}=B;M.push(te)}return JSON.parse(JSON.stringify({nodes:T,edges:M,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:T=>new Promise(M=>{const{nodes:B,edges:K,position:z,zoom:U,viewport:Y}=T;if(B&&I(B),K&&x(K),Y!=null&&Y.x&&(Y!=null&&Y.y)||z){const te=(Y==null?void 0:Y.x)||z[0],re=(Y==null?void 0:Y.y)||z[1],ee=(Y==null?void 0:Y.zoom)||U||e.viewport.zoom;return Va(()=>n.value.viewportInitialized).toBe(!0).then(()=>{n.value.setViewport({x:te,y:re,zoom:ee}).then(()=>{M(!0)})})}else M(!0)}),updateNodeInternals:i,viewportHelper:n,$reset:()=>{const T=Wp();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const M=$i.translate(T.defaultViewport.x??0,T.defaultViewport.y??0).scale(or(T.defaultViewport.zoom??1,T.minZoom,T.maxZoom)),B=e.viewportRef.getBoundingClientRect(),K=[[0,0],[B.width,B.height]],z=e.d3Zoom.constrain()(M,K,T.translateExtent);e.d3Zoom.transform(e.d3Selection,z)}ie(T)},$destroy:()=>{}}}const vw=["data-id","data-handleid","data-nodeid","data-handlepos"],gw={name:"Handle",compatConfig:{MODE:3}},Hn=it({...gw,props:{id:{default:null},type:{},position:{default:()=>Ne.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const r=Cu(e,["position","connectable","connectableStart","connectableEnd","id"]),n=nt(()=>r.type??"source"),i=nt(()=>r.isValidConnection??null),{connectionStartHandle:o,connectionClickStartHandle:l,connectionEndHandle:s,vueFlowRef:a,nodesConnectable:d,noDragClassName:u,noPanClassName:c}=lt(),{id:f,node:h,nodeEl:b,connectedEdges:m}=Vp(),_=Pe(),y=nt(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),v=nt(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),g=nt(()=>{var x,w,N,P,C,L;return((x=o.value)==null?void 0:x.nodeId)===f&&((w=o.value)==null?void 0:w.handleId)===e.id&&((N=o.value)==null?void 0:N.type)===n.value||((P=s.value)==null?void 0:P.nodeId)===f&&((C=s.value)==null?void 0:C.handleId)===e.id&&((L=s.value)==null?void 0:L.type)===n.value}),p=nt(()=>{var x,w,N;return((x=l.value)==null?void 0:x.nodeId)===f&&((w=l.value)==null?void 0:w.handleId)===e.id&&((N=l.value)==null?void 0:N.type)===n.value}),{handlePointerDown:E,handleClick:S}=zp({nodeId:f,handleId:e.id,isValidConnection:i,type:n}),A=Re(()=>typeof e.connectable=="string"&&e.connectable==="single"?!m.value.some(x=>{const w=x[`${n.value}Handle`];return x[n.value]!==f?!1:w?w===e.id:!0}):typeof e.connectable=="number"?m.value.filter(x=>{const w=x[`${n.value}Handle`];return x[n.value]!==f?!1:w?w===e.id:!0}).length{var x;if(!h.dimensions.width||!h.dimensions.height)return;const w=(x=h.handleBounds[n.value])==null?void 0:x.find(Q=>Q.id===e.id);if(!a.value||w)return;const N=a.value.querySelector(".vue-flow__transformationpane");if(!b.value||!_.value||!N||!e.id)return;const P=b.value.getBoundingClientRect(),C=_.value.getBoundingClientRect(),L=window.getComputedStyle(N),{m22:D}=new window.DOMMatrixReadOnly(L.transform),V={id:e.id,position:e.position,x:(C.left-P.left)/D,y:(C.top-P.top)/D,...Ss(_.value)};h.handleBounds[n.value]=[...h.handleBounds[n.value]??[],V]}),Fi(()=>{const x=h.handleBounds[n.value];x&&(h.handleBounds[n.value]=x.filter(w=>w.id!==e.id))});function k(x){const w=Yu(x);A.value&&y.value&&(w&&x.button===0||!w)&&E(x)}function I(x){!f||!l.value&&!y.value||A.value&&S(x)}return t({handleClick:S,handlePointerDown:E,onClick:I,onPointerDown:k}),(x,w)=>(me(),Se("div",{ref_key:"handle",ref:_,"data-id":`${pe(f)}-${e.id}-${n.value}`,"data-handleid":e.id,"data-nodeid":pe(f),"data-handlepos":x.position,class:Qt(["vue-flow__handle",[`vue-flow__handle-${x.position}`,`vue-flow__handle-${e.id}`,pe(u),pe(c),n.value,{connectable:A.value,connecting:p.value,connectablestart:y.value,connectableend:v.value,connectionindicator:A.value&&(y.value&&!g.value||v.value&&g.value)}]]),onMousedown:k,onTouchstartPassive:k,onClick:I},[dt(x.$slots,"default",{id:x.id})],42,vw))}}),As=function({sourcePosition:e=Ne.Bottom,targetPosition:t=Ne.Top,label:r,connectable:n=!0,isValidTargetPos:i,isValidSourcePos:o,data:l}){const s=l.label||r;return[He(Hn,{type:"target",position:t,connectable:n,isValidConnection:i}),typeof s!="string"&&s?He(s):He("div",{innerHTML:s}),He(Hn,{type:"source",position:e,connectable:n,isValidConnection:o})]};As.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];As.inheritAttrs=!1;As.compatConfig={MODE:3};const mw=As,Ts=function({targetPosition:e=Ne.Top,label:t,connectable:r=!0,isValidTargetPos:n,data:i}){const o=i.label||t;return[He(Hn,{type:"target",position:e,connectable:r,isValidConnection:n}),typeof o!="string"&&o?He(o):He("div",{innerHTML:o})]};Ts.props=["targetPosition","label","isValidTargetPos","connectable","data"];Ts.inheritAttrs=!1;Ts.compatConfig={MODE:3};const yw=Ts,ks=function({sourcePosition:e=Ne.Bottom,label:t,connectable:r=!0,isValidSourcePos:n,data:i}){const o=i.label||t;return[typeof o!="string"&&o?He(o):He("div",{innerHTML:o}),He(Hn,{type:"source",position:e,connectable:r,isValidConnection:n})]};ks.props=["sourcePosition","label","isValidSourcePos","connectable","data"];ks.inheritAttrs=!1;ks.compatConfig={MODE:3};const bw=ks,_w=["transform"],ww=["width","height","x","y","rx","ry"],Ew=["y"],xw={name:"EdgeText",compatConfig:{MODE:3}},Sw=it({...xw,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=Pe({x:0,y:0,width:0,height:0}),r=Pe(null),n=Re(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Dt(i),$e([()=>e.x,()=>e.y,r,()=>e.label],i);function i(){if(!r.value)return;const o=r.value.getBBox();(o.width!==t.value.width||o.height!==t.value.height)&&(t.value=o)}return(o,l)=>(me(),Se("g",{transform:n.value,class:"vue-flow__edge-textwrapper"},[o.labelShowBg?(me(),Se("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*o.labelBgPadding[0]}px`,height:`${t.value.height+2*o.labelBgPadding[1]}px`,x:-o.labelBgPadding[0],y:-o.labelBgPadding[1],style:_t(o.labelBgStyle),rx:o.labelBgBorderRadius,ry:o.labelBgBorderRadius},null,12,ww)):tt("",!0),ke("text",Du(o.$attrs,{ref_key:"el",ref:r,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:o.labelStyle}),[dt(o.$slots,"default",{},()=>[typeof o.label!="string"?(me(),kt(wr(o.label),{key:0})):(me(),Se(We,{key:1},[Lo(kr(o.label),1)],64))])],16,Ew)],8,_w))}}),Ow=["id","d","marker-end","marker-start"],Nw=["d","stroke-width"],Aw={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Cs=it({...Aw,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},style:{},labelStyle:{},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const r=Cu(e,["interactionWidth","labelShowBg"]),n=Pe(null),i=Pe(null),o=Pe(null),l=$d();return t({pathEl:n,interactionEl:i,labelEl:o}),(s,a)=>(me(),Se(We,null,[ke("path",{id:s.id,ref_key:"pathEl",ref:n,d:s.path,style:_t(r.style),class:Qt(["vue-flow__edge-path",pe(l).class]),"marker-end":s.markerEnd,"marker-start":s.markerStart},null,14,Ow),s.interactionWidth?(me(),Se("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Nw)):tt("",!0),s.label&&s.labelX&&s.labelY?(me(),kt(Sw,{key:1,ref_key:"labelEl",ref:o,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):tt("",!0)],64))}});function Kp({sourceX:e,sourceY:t,targetX:r,targetY:n}){const i=Math.abs(r-e)/2,o=r=0?.5*e:t*25*Math.sqrt(-e)}function If({pos:e,x1:t,y1:r,x2:n,y2:i,c:o}){let l,s;switch(e){case Ne.Left:l=t-ml(t-n,o),s=r;break;case Ne.Right:l=t+ml(n-t,o),s=r;break;case Ne.Top:l=t,s=r-ml(r-i,o);break;case Ne.Bottom:l=t,s=r+ml(i-r,o);break}return[l,s]}function Yp(e){const{sourceX:t,sourceY:r,sourcePosition:n=Ne.Bottom,targetX:i,targetY:o,targetPosition:l=Ne.Top,curvature:s=.25}=e,[a,d]=If({pos:n,x1:t,y1:r,x2:i,y2:o,c:s}),[u,c]=If({pos:l,x1:i,y1:o,x2:t,y2:r,c:s}),[f,h,b,m]=Gp({sourceX:t,sourceY:r,targetX:i,targetY:o,sourceControlX:a,sourceControlY:d,targetControlX:u,targetControlY:c});return[`M${t},${r} C${a},${d} ${u},${c} ${i},${o}`,f,h,b,m]}function Rf({pos:e,x1:t,y1:r,x2:n,y2:i}){let o,l;switch(e){case Ne.Left:case Ne.Right:o=.5*(t+n),l=r;break;case Ne.Top:case Ne.Bottom:o=t,l=.5*(r+i);break}return[o,l]}function Zp(e){const{sourceX:t,sourceY:r,sourcePosition:n=Ne.Bottom,targetX:i,targetY:o,targetPosition:l=Ne.Top}=e,[s,a]=Rf({pos:n,x1:t,y1:r,x2:i,y2:o}),[d,u]=Rf({pos:l,x1:i,y1:o,x2:t,y2:r}),[c,f,h,b]=Gp({sourceX:t,sourceY:r,targetX:i,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:d,targetControlY:u});return[`M${t},${r} C${s},${a} ${d},${u} ${i},${o}`,c,f,h,b]}const Lf={[Ne.Left]:{x:-1,y:0},[Ne.Right]:{x:1,y:0},[Ne.Top]:{x:0,y:-1},[Ne.Bottom]:{x:0,y:1}};function Tw({source:e,sourcePosition:t=Ne.Bottom,target:r}){return t===Ne.Left||t===Ne.Right?e.xe[c]?-1:1)*C:y[c]=(d[c]>r[c]?-1:1)*C}}if(t!==n){const P=c==="x"?"y":"x",C=l[c]===s[P],L=a[P]>d[P],D=a[P]=N?(b=(I.x+x.x)/2,m=h[0].y):(b=h[0].x,m=(I.y+x.y)/2)}return[[e,{x:a.x+_.x,y:a.y+_.y},...h,{x:d.x+y.x,y:d.y+y.y},r],b,m,p,E]}function Cw(e,t,r,n){const i=Math.min(Df(e,t)/2,Df(t,r)/2,n),{x:o,y:l}=t;if(e.x===o&&o===r.x||e.y===l&&l===r.y)return`L${o} ${l}`;if(e.y===l){const d=e.x{let p;return g>0&&g{const[r,n,i]=Mw(e);return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Iw=Pw,Rw=it({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[r,n,i]=iu({...e,sourcePosition:e.sourcePosition??Ne.Bottom,targetPosition:e.targetPosition??Ne.Top});return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Xp=Rw,Lw=it({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>He(Xp,{...e,...t,borderRadius:0})}}),Dw=Lw,$w=it({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[r,n,i]=Yp({...e,sourcePosition:e.sourcePosition??Ne.Bottom,targetPosition:e.targetPosition??Ne.Top});return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Bw=$w,qw=it({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[r,n,i]=Zp({...e,sourcePosition:e.sourcePosition??Ne.Bottom,targetPosition:e.targetPosition??Ne.Top});return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Fw=qw,Hw={input:bw,default:mw,output:yw},jw={default:Bw,straight:Iw,step:Dw,smoothstep:Xp,simplebezier:Fw};function zw(e,t,r){const n=Re(()=>m=>t.value.get(m)),i=Re(()=>m=>r.value.get(m)),o=Re(()=>{const m={...jw,...e.edgeTypes},_=Object.keys(m);for(const y of e.edges)y.type&&!_.includes(y.type)&&(m[y.type]=y.type);return m}),l=Re(()=>{const m={...Hw,...e.nodeTypes},_=Object.keys(m);for(const y of e.nodes)y.type&&!_.includes(y.type)&&(m[y.type]=y.type);return m}),s=Re(()=>e.onlyRenderVisibleElements?Ip(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=Re(()=>{if(e.onlyRenderVisibleElements){const m=[];for(const _ of e.edges){const y=t.value.get(_.source),v=t.value.get(_.target);W_({sourcePos:y.computedPosition||{x:0,y:0},targetPos:v.computedPosition||{x:0,y:0},sourceWidth:y.dimensions.width,sourceHeight:y.dimensions.height,targetWidth:v.dimensions.width,targetHeight:v.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&m.push(_)}return m}return e.edges}),d=Re(()=>[...s.value,...a.value]),u=Re(()=>{const m=[];for(const _ of e.nodes)_.selected&&m.push(_);return m}),c=Re(()=>{const m=[];for(const _ of e.edges)_.selected&&m.push(_);return m}),f=Re(()=>[...u.value,...c.value]),h=Re(()=>{const m=[];for(const _ of e.nodes)_.dimensions.width&&_.dimensions.height&&_.handleBounds!==void 0&&m.push(_);return m}),b=Re(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:n,getEdge:i,getElements:d,getEdgeTypes:o,getNodeTypes:l,getEdges:a,getNodes:s,getSelectedElements:f,getSelectedNodes:u,getSelectedEdges:c,getNodesInitialized:h,areNodesInitialized:b}}class Kr{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const r=(t=an())==null?void 0:t.appContext.app,n=(r==null?void 0:r.config.globalProperties.$vueFlowStorage)??Kr.instance;return Kr.instance=n??new Kr,r&&(r.config.globalProperties.$vueFlowStorage=Kr.instance),Kr.instance}set(t,r){return this.flows.set(t,r)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,r){const n=Wp(),i=fi(n),o={};for(const[f,h]of Object.entries(i.hooks)){const b=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;o[b]=h.on}const l={};for(const[f,h]of Object.entries(i.hooks))l[f]=h.trigger;const s=Re(()=>{const f=new Map;for(const h of i.nodes)f.set(h.id,h);return f}),a=Re(()=>{const f=new Map;for(const h of i.edges)f.set(h.id,h);return f}),d=zw(i,s,a),u=pw(i,s,a);u.setState({...i,...r});const c={...o,...d,...u,...Gy(i),nodeLookup:s,edgeLookup:a,emits:l,id:t,vueFlowVersion:"1.40.1",$destroy:()=>{this.remove(t)}};return this.set(t,c),c}getId(){return`vue-flow-${this.currentId++}`}}function lt(e){const t=Kr.getInstance(),r=ls(),n=typeof e=="object",i=n?e:{id:e},o=i.id,l=o??(r==null?void 0:r.vueFlowId);let s;if(r){const a=vn(Pf,null);typeof a<"u"&&a!==null&&(!l||a.id===l)&&(s=a)}if(s||l&&(s=t.get(l)),!s||l&&s.id!==l){const a=o??t.getId(),d=t.create(a,i);s=d,(r??vu(!0)).run(()=>{$e(d.applyDefault,(c,f,h)=>{const b=_=>{d.applyNodeChanges(_)},m=_=>{d.applyEdgeChanges(_)};c?(d.onNodesChange(b),d.onEdgesChange(m)):(d.hooks.value.nodesChange.off(b),d.hooks.value.edgesChange.off(m)),h(()=>{d.hooks.value.nodesChange.off(b),d.hooks.value.edgesChange.off(m)})},{immediate:!0}),bs(()=>{if(s){const c=t.get(s.id);c?c.$destroy():Os(`No store instance found for id ${s.id} in storage.`)}})})}else n&&s.setState(i);if(r&&(rr(Pf,s),r.vueFlowId=s.id),n){const a=an();(a==null?void 0:a.type.name)!=="VueFlow"&&s.emits.error(new It(xt.USEVUEFLOW_OPTIONS))}return s}function Vw(e){const{emits:t,dimensions:r}=lt();let n;Dt(()=>{const i=e.value,o=()=>{if(!i)return;const l=Ss(i);(l.width===0||l.height===0)&&t.error(new It(xt.MISSING_VIEWPORT_DIMENSIONS)),r.value={width:l.width||500,height:l.height||500}};o(),window.addEventListener("resize",o),i&&(n=new ResizeObserver(()=>o()),n.observe(i)),Br(()=>{window.removeEventListener("resize",o),n&&i&&n.unobserve(i)})})}const Uw={name:"UserSelection",compatConfig:{MODE:3}},Ww=it({...Uw,props:{userSelectionRect:{}},setup(e){return(t,r)=>(me(),Se("div",{class:"vue-flow__selection vue-flow__container",style:_t({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Kw=["tabIndex"],Gw={name:"NodesSelection",compatConfig:{MODE:3}},Yw=it({...Gw,setup(e){const{emits:t,viewport:r,getSelectedNodes:n,noPanClassName:i,disableKeyboardA11y:o,userSelectionActive:l}=lt(),s=Up(),a=Pe(null),d=Hp({el:a,onStart(b){t.selectionDragStart(b)},onDrag(b){t.selectionDrag(b)},onStop(b){t.selectionDragStop(b)}});Dt(()=>{var b;o.value||(b=a.value)==null||b.focus({preventScroll:!0})});const u=Re(()=>Pp(n.value)),c=Re(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,top:`${u.value.y}px`,left:`${u.value.x}px`}));function f(b){t.selectionContextMenu({event:b,nodes:n.value})}function h(b){o||ki[b.key]&&s({x:ki[b.key].x,y:ki[b.key].y},b.shiftKey)}return(b,m)=>!pe(l)&&u.value.width&&u.value.height?(me(),Se("div",{key:0,class:Qt(["vue-flow__nodesselection vue-flow__container",pe(i)]),style:_t({transform:`translate(${pe(r).x}px,${pe(r).y}px) scale(${pe(r).zoom})`})},[ke("div",{ref_key:"el",ref:a,class:Qt([{dragging:pe(d)},"vue-flow__nodesselection-rect"]),style:_t(c.value),tabIndex:pe(o)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,Kw)],6)):tt("",!0)}});function Zw(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Xw={name:"Pane",compatConfig:{MODE:3}},Qw=it({...Xw,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:r,viewport:n,emits:i,userSelectionActive:o,removeSelectedElements:l,panOnDrag:s,userSelectionRect:a,elementsSelectable:d,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:f,removeNodes:h,removeEdges:b,selectionMode:m,deleteKeyCode:_,multiSelectionKeyCode:y,multiSelectionActive:v,edgeLookup:g,nodeLookup:p}=lt(),E=Pe(null),S=Pe(0),A=Pe(0),k=Pe(),I=Pe(new Map),x=nt(()=>d.value&&(e.isSelecting||o.value));let w=!1,N=!1;const P=po(_,{actInsideInputWithModifier:!1}),C=po(y);$e(P,j=>{j&&(h(f.value),b(c.value),u.value=!1)}),$e(C,j=>{v.value=j});function L(j,Z){return G=>{G.target===Z&&(j==null||j(G))}}function D(){o.value=!1,a.value=null,S.value=0,A.value=0}function V(j){if(w){w=!1;return}i.paneClick(j),l(),u.value=!1}function Q(j){var Z;if(Array.isArray(s.value)&&((Z=s.value)!=null&&Z.includes(2))){j.preventDefault();return}i.paneContextMenu(j)}function W(j){i.paneScroll(j)}function $(j){var Z,G,H,J,oe;if(k.value=(Z=t.value)==null?void 0:Z.getBoundingClientRect(),!d.value||!e.isSelecting||j.button!==0||j.target!==E.value||!k.value)return;(H=(G=j.target)==null?void 0:G.setPointerCapture)==null||H.call(G,j.pointerId);const{x:ie,y:se}=Zw(j,k.value);N=!0,w=!1,I.value=new Map;for(const[ae,ce]of g.value)I.value.set(ce.source,((J=I.value.get(ce.source))==null?void 0:J.add(ae))||new Set([ae])),I.value.set(ce.target,((oe=I.value.get(ce.target))==null?void 0:oe.add(ae))||new Set([ae]));l(),a.value={width:0,height:0,startX:ie,startY:se,x:ie,y:se},o.value=!0,u.value=!1,i.selectionStart(j)}function R(j){if(!k.value||!a.value)return;w=!0;const{x:Z,y:G}=Ar(j,k.value),{startX:H=0,startY:J=0}=a.value,oe={startX:H,startY:J,x:Z0&&(u.value=!0),D(),i.selectionEnd(j),e.selectionKeyPressed&&(w=!1),N=!1)}return(j,Z)=>(me(),Se("div",{ref_key:"container",ref:E,class:Qt(["vue-flow__pane vue-flow__container",{selection:j.isSelecting}]),onClick:Z[0]||(Z[0]=G=>x.value?void 0:L(V,E.value)(G)),onContextmenu:Z[1]||(Z[1]=G=>L(Q,E.value)(G)),onWheelPassive:Z[2]||(Z[2]=G=>L(W,E.value)(G)),onPointerenter:Z[3]||(Z[3]=G=>x.value?void 0:pe(i).paneMouseEnter(G)),onPointerdown:Z[4]||(Z[4]=G=>x.value?$(G):pe(i).paneMouseMove(G)),onPointermove:Z[5]||(Z[5]=G=>x.value?R(G):pe(i).paneMouseMove(G)),onPointerup:Z[6]||(Z[6]=G=>x.value?F(G):void 0),onPointerleave:Z[7]||(Z[7]=G=>pe(i).paneMouseLeave(G))},[dt(j.$slots,"default"),pe(o)&&pe(a)?(me(),kt(Ww,{key:0,"user-selection-rect":pe(a)},null,8,["user-selection-rect"])):tt("",!0),pe(u)&&pe(f).length?(me(),kt(Yw,{key:1})):tt("",!0)],34))}}),Jw={name:"Transform",compatConfig:{MODE:3}},eE=it({...Jw,setup(e){const{viewport:t,fitViewOnInit:r,fitViewOnInitDone:n}=lt(),i=Re(()=>r.value?!n.value:!1),o=Re(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(l,s)=>(me(),Se("div",{class:"vue-flow__transformationpane vue-flow__container",style:_t({transform:o.value,opacity:i.value?0:void 0})},[dt(l.$slots,"default")],4))}}),tE={name:"Viewport",compatConfig:{MODE:3}},nE=it({...tE,setup(e){const{minZoom:t,maxZoom:r,defaultViewport:n,translateExtent:i,zoomActivationKeyCode:o,selectionKeyCode:l,panActivationKeyCode:s,panOnScroll:a,panOnScrollMode:d,panOnScrollSpeed:u,panOnDrag:c,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:b,preventScrolling:m,noWheelClassName:_,noPanClassName:y,emits:v,connectionStartHandle:g,userSelectionActive:p,paneDragging:E,d3Zoom:S,d3Selection:A,d3ZoomHandler:k,viewport:I,viewportRef:x,paneClickDistance:w}=lt();Vw(x);const N=Pe(!1),P=Pe(!1);let C=null,L=!1,D=0,V={x:0,y:0,zoom:0};const Q=po(s),W=po(l),$=po(o),R=nt(()=>Q.value||c.value),F=nt(()=>Q.value||a.value),j=nt(()=>W.value||l.value===!0&&R.value!==!0);Dt(()=>{if(!x.value){Os("Viewport element is missing");return}const ie=x.value,se=ie.getBoundingClientRect(),ae=k_().clickDistance(w.value).scaleExtent([t.value,r.value]).translateExtent(i.value),ce=xn(ie).call(ae),T=ce.on("wheel.zoom"),M=$i.translate(n.value.x??0,n.value.y??0).scale(or(n.value.zoom??1,t.value,r.value)),B=[[0,0],[se.width,se.height]],K=ae.constrain()(M,B,i.value);ae.transform(ce,K),ae.wheelDelta(G),S.value=ae,A.value=ce,k.value=T,I.value={x:K.x,y:K.y,zoom:K.k},ae.on("start",z=>{var U;if(!z.sourceEvent)return null;D=z.sourceEvent.button,N.value=!0;const Y=J(z.transform);((U=z.sourceEvent)==null?void 0:U.type)==="mousedown"&&(E.value=!0),V=Y,v.viewportChangeStart(Y),v.moveStart({event:z,flowTransform:Y})}),ae.on("end",z=>{if(!z.sourceEvent)return null;if(N.value=!1,E.value=!1,Z(R.value,D??0)&&!L&&v.paneContextMenu(z.sourceEvent),L=!1,H(V,z.transform)){const U=J(z.transform);V=U,v.viewportChangeEnd(U),v.moveEnd({event:z,flowTransform:U})}}),ae.filter(z=>{var U,Y,te;const re=$.value||b.value,ee=h.value&&z.ctrlKey,ue=z.button;if((R.value===!0||Array.isArray(R.value)&&R.value.includes(1))&&ue===1&&z.type==="mousedown"&&((U=z.target)!=null&&U.closest(".vue-flow__node")||(Y=z.target)!=null&&Y.closest(".vue-flow__edge")))return!0;if(!R.value&&!re&&!F.value&&!f.value&&!h.value||p.value||!f.value&&z.type==="dblclick"||oe(z,_.value)&&z.type==="wheel"||oe(z,y.value)&&(z.type!=="wheel"||F.value&&z.type==="wheel"&&!$.value)||!h.value&&z.ctrlKey&&z.type==="wheel"||!re&&!F.value&&!ee&&z.type==="wheel")return!1;if(!h&&z.type==="touchstart"&&((te=z.touches)==null?void 0:te.length)>1)return z.preventDefault(),!1;if(!R.value&&(z.type==="mousedown"||z.type==="touchstart")||Array.isArray(R.value)&&!R.value.includes(ue)&&(z.type==="mousedown"||z.type==="touchstart"))return!1;const X=Array.isArray(R.value)&&R.value.includes(ue)||!ue||ue<=1;return(!z.ctrlKey||z.type==="wheel")&&X}),$e([p,R],()=>{p.value&&!N.value?ae.on("zoom",null):p.value||ae.on("zoom",z=>{I.value={x:z.transform.x,y:z.transform.y,zoom:z.transform.k};const U=J(z.transform);L=Z(R.value,D??0),v.viewportChange(U),v.move({event:z,flowTransform:U})})},{immediate:!0}),$e([p,F,d,$,h,m,_],()=>{F.value&&!$.value&&!p.value?ce.on("wheel.zoom",z=>{if(oe(z,_.value))return!1;const U=$.value||b.value,Y=h.value&&z.ctrlKey;if(!(!m.value||F.value||U||Y))return!1;z.preventDefault(),z.stopImmediatePropagation();const re=ce.property("__zoom").k||1,ee=Jl();if(z.ctrlKey&&h.value&&ee){const he=In(z),ve=G(z),be=re*2**ve;ae.scaleTo(ce,be,he,z);return}const ue=z.deltaMode===1?20:1;let X=d.value===ho.Vertical?0:z.deltaX*ue,le=d.value===ho.Horizontal?0:z.deltaY*ue;!ee&&z.shiftKey&&d.value!==ho.Vertical&&!X&&le&&(X=le,le=0),ae.translateBy(ce,-(X/re)*u.value,-(le/re)*u.value);const de=J(ce.property("__zoom"));C&&clearTimeout(C),P.value?(v.move({event:z,flowTransform:de}),v.viewportChange(de),C=setTimeout(()=>{v.moveEnd({event:z,flowTransform:de}),v.viewportChangeEnd(de),P.value=!1},150)):(P.value=!0,v.moveStart({event:z,flowTransform:de}),v.viewportChangeStart(de))},{passive:!1}):typeof T<"u"&&ce.on("wheel.zoom",function(z,U){const Y=!m.value&&z.type==="wheel"&&!z.ctrlKey,te=$.value||b.value,re=h.value&&z.ctrlKey;if(!te&&!a.value&&!re&&z.type==="wheel"||Y||oe(z,_.value))return null;z.preventDefault(),T.call(this,z,U)},{passive:!1})},{immediate:!0})});function Z(ie,se){return se===2&&Array.isArray(ie)&&ie.includes(2)}function G(ie){const se=ie.ctrlKey&&Jl()?10:1;return-ie.deltaY*(ie.deltaMode===1?.05:ie.deltaMode?1:.002)*se}function H(ie,se){return ie.x!==se.x&&!Number.isNaN(se.x)||ie.y!==se.y&&!Number.isNaN(se.y)||ie.zoom!==se.k&&!Number.isNaN(se.k)}function J(ie){return{x:ie.x,y:ie.y,zoom:ie.k}}function oe(ie,se){return ie.target.closest(`.${se}`)}return(ie,se)=>(me(),Se("div",{ref_key:"viewportRef",ref:x,class:"vue-flow__viewport vue-flow__container"},[Ee(Qw,{"is-selecting":j.value,"selection-key-pressed":pe(W),class:Qt({connecting:!!pe(g),dragging:pe(E),draggable:pe(c)===!0||Array.isArray(pe(c))&&pe(c).includes(0)})},{default:yt(()=>[Ee(eE,null,{default:yt(()=>[dt(ie.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),rE=["id"],iE=["id"],oE=["id"],lE={name:"A11yDescriptions",compatConfig:{MODE:3}},sE=it({...lE,setup(e){const{id:t,disableKeyboardA11y:r,ariaLiveMessage:n}=lt();return(i,o)=>(me(),Se(We,null,[ke("div",{id:`${pe(xp)}-${pe(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+kr(pe(r)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,rE),ke("div",{id:`${pe(Sp)}-${pe(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,iE),pe(r)?tt("",!0):(me(),Se("div",{key:0,id:`${pe(I_)}-${pe(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},kr(pe(n)),9,oE))],64))}});function aE(){const e=lt();$e(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function uE(e,t,r){return r===Ne.Left?e-t:r===Ne.Right?e+t:e}function cE(e,t,r){return r===Ne.Top?e-t:r===Ne.Bottom?e+t:e}const Qu=function({radius:e=10,centerX:t=0,centerY:r=0,position:n=Ne.Top,type:i}){return He("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:uE(t,e,n),cy:cE(r,e,n),r:e,stroke:"transparent",fill:"transparent"})};Qu.props=["radius","centerX","centerY","position","type"];Qu.compatConfig={MODE:3};const $f=Qu,fE=it({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:r,connectionMode:n,edgeUpdaterRadius:i,emits:o,nodesSelectionActive:l,noPanClassName:s,getEdgeTypes:a,removeSelectedEdges:d,findEdge:u,findNode:c,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:b,elementsSelectable:m,edgesUpdatable:_,edgesFocusable:y}=lt(),v=Re(()=>u(e.id)),g=iw(v.value,o),p=vn(Ns),E=an(),S=Pe(!1),A=Pe(!1),k=Pe(""),I=Pe(null),x=Pe("source"),w=Pe(null),N=nt(()=>typeof v.value.selectable>"u"?m.value:v.value.selectable),P=nt(()=>typeof v.value.updatable>"u"?_.value:v.value.updatable),C=nt(()=>typeof v.value.focusable>"u"?y.value:v.value.focusable);rr(tw,e.id),rr(nw,w);const L=Re(()=>v.value.class instanceof Function?v.value.class(v.value):v.value.class),D=Re(()=>v.value.style instanceof Function?v.value.style(v.value):v.value.style),V=Re(()=>{const T=v.value.type||"default",M=p==null?void 0:p[`edge-${T}`];if(M)return M;let B=v.value.template??a.value[T];if(typeof B=="string"&&E){const K=Object.keys(E.appContext.components);K&&K.includes(T)&&(B=Io(T,!1))}return B&&typeof B!="string"?B:(o.error(new It(xt.EDGE_TYPE_MISSING,B)),!1)}),{handlePointerDown:Q}=zp({nodeId:k,handleId:I,type:x,isValidConnection:f,edgeUpdaterType:x,onEdgeUpdate:R,onEdgeUpdateEnd:F});return()=>{const T=c(v.value.source),M=c(v.value.target),B="pathOptions"in v.value?v.value.pathOptions:{};if(!T&&!M)return o.error(new It(xt.EDGE_SOURCE_TARGET_MISSING,v.value.id,v.value.source,v.value.target)),null;if(!T)return o.error(new It(xt.EDGE_SOURCE_MISSING,v.value.id,v.value.source)),null;if(!M)return o.error(new It(xt.EDGE_TARGET_MISSING,v.value.id,v.value.target)),null;if(!v.value||v.value.hidden||T.hidden||M.hidden)return null;let K;n.value===ui.Strict?K=T.handleBounds.source:K=[...T.handleBounds.source||[],...T.handleBounds.target||[]];const z=Sf(K,v.value.sourceHandle);let U;n.value===ui.Strict?U=M.handleBounds.target:U=[...M.handleBounds.target||[],...M.handleBounds.source||[]];const Y=Sf(U,v.value.targetHandle),te=(z==null?void 0:z.position)||Ne.Bottom,re=(Y==null?void 0:Y.position)||Ne.Top,{x:ee,y:ue}=Ql(T,z,te),{x:X,y:le}=Ql(M,Y,re);return v.value.sourceX=ee,v.value.sourceY=ue,v.value.targetX=X,v.value.targetY=le,He("g",{ref:w,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${V.value===!1?"default":v.value.type||"default"}`,s.value,L.value,{updating:S.value,selected:v.value.selected,animated:v.value.animated,inactive:!N.value}],onClick:Z,onContextmenu:G,onDblclick:H,onMouseenter:J,onMousemove:oe,onMouseleave:ie,onKeyDown:C.value?ce:void 0,tabIndex:C.value?0:void 0,"aria-label":v.value.ariaLabel===null?void 0:v.value.ariaLabel||`Edge from ${v.value.source} to ${v.value.target}`,"aria-describedby":C.value?`${Sp}-${t}`:void 0,role:C.value?"button":"img"},[A.value?null:He(V.value===!1?a.value.default:V.value,{id:e.id,sourceNode:T,targetNode:M,source:v.value.source,target:v.value.target,type:v.value.type,updatable:P.value,selected:v.value.selected,animated:v.value.animated,label:v.value.label,labelStyle:v.value.labelStyle,labelShowBg:v.value.labelShowBg,labelBgStyle:v.value.labelBgStyle,labelBgPadding:v.value.labelBgPadding,labelBgBorderRadius:v.value.labelBgBorderRadius,data:v.value.data,events:{...v.value.events,...g.on},style:D.value,markerStart:`url('#${No(v.value.markerStart,t)}')`,markerEnd:`url('#${No(v.value.markerEnd,t)}')`,sourcePosition:te,targetPosition:re,sourceX:ee,sourceY:ue,targetX:X,targetY:le,sourceHandleId:v.value.sourceHandle,targetHandleId:v.value.targetHandle,interactionWidth:v.value.interactionWidth,...B}),[P.value==="source"||P.value===!0?[He("g",{onMousedown:se,onMouseenter:W,onMouseout:$},He($f,{position:te,centerX:ee,centerY:ue,radius:i.value,type:"source","data-type":"source"}))]:null,P.value==="target"||P.value===!0?[He("g",{onMousedown:ae,onMouseenter:W,onMouseout:$},He($f,{position:re,centerX:X,centerY:le,radius:i.value,type:"target","data-type":"target"}))]:null]])};function W(){S.value=!0}function $(){S.value=!1}function R(T,M){g.emit.update({event:T,edge:v.value,connection:M})}function F(T){g.emit.updateEnd({event:T,edge:v.value}),A.value=!1}function j(T,M){T.button===0&&(A.value=!0,k.value=M?v.value.target:v.value.source,I.value=(M?v.value.targetHandle:v.value.sourceHandle)??"",x.value=M?"target":"source",g.emit.updateStart({event:T,edge:v.value}),Q(T))}function Z(T){var M;const B={event:T,edge:v.value};N.value&&(l.value=!1,v.value.selected&&h.value?(d([v.value]),(M=w.value)==null||M.blur()):r([v.value])),g.emit.click(B)}function G(T){g.emit.contextMenu({event:T,edge:v.value})}function H(T){g.emit.doubleClick({event:T,edge:v.value})}function J(T){g.emit.mouseEnter({event:T,edge:v.value})}function oe(T){g.emit.mouseMove({event:T,edge:v.value})}function ie(T){g.emit.mouseLeave({event:T,edge:v.value})}function se(T){j(T,!0)}function ae(T){j(T,!1)}function ce(T){var M;!b.value&&Op.includes(T.key)&&N.value&&(T.key==="Escape"?((M=w.value)==null||M.blur(),d([u(e.id)])):r([u(e.id)]))}}}),dE=fE,hE={[Ne.Left]:Ne.Right,[Ne.Right]:Ne.Left,[Ne.Top]:Ne.Bottom,[Ne.Bottom]:Ne.Top},pE=it({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:r,connectionStartHandle:n,connectionEndHandle:i,connectionPosition:o,connectionLineType:l,connectionLineStyle:s,connectionLineOptions:a,connectionStatus:d,viewport:u,findNode:c}=lt(),f=(e=vn(Ns))==null?void 0:e["connection-line"],h=Re(()=>{var v;return c((v=n.value)==null?void 0:v.nodeId)}),b=Re(()=>{var v;return c((v=i.value)==null?void 0:v.nodeId)??null}),m=Re(()=>({x:(o.value.x-u.value.x)/u.value.zoom,y:(o.value.y-u.value.y)/u.value.zoom})),_=Re(()=>a.value.markerStart?`url(#${No(a.value.markerStart,t)})`:""),y=Re(()=>a.value.markerEnd?`url(#${No(a.value.markerEnd,t)})`:"");return()=>{var v,g,p,E;if(!h.value||!n.value)return null;const S=n.value.handleId,A=n.value.type,k=h.value.handleBounds;let I=k==null?void 0:k[A];if(r.value===ui.Loose&&(I=I||(k==null?void 0:k[A==="source"?"target":"source"])),!I)return null;const x=(S?I.find(W=>W.id===S):I[0])??null,w=(x==null?void 0:x.position)||Ne.Top,{x:N,y:P}=Ql(h.value,x,w);let C=null;b.value&&((v=i.value)!=null&&v.handleId)&&(r.value===ui.Strict?C=((g=b.value.handleBounds[A==="source"?"target":"source"])==null?void 0:g.find(W=>{var $;return W.id===(($=i.value)==null?void 0:$.handleId)}))||null:C=((p=[...b.value.handleBounds.source||[],...b.value.handleBounds.target||[]])==null?void 0:p.find(W=>{var $;return W.id===(($=i.value)==null?void 0:$.handleId)}))||null);const L=((E=i.value)==null?void 0:E.position)??(w?hE[w]:null);if(!w||!L)return null;const D=l.value??a.value.type??Wr.Bezier;let V="";const Q={sourceX:N,sourceY:P,sourcePosition:w,targetX:m.value.x,targetY:m.value.y,targetPosition:L};return D===Wr.Bezier?[V]=Yp(Q):D===Wr.Step?[V]=iu({...Q,borderRadius:0}):D===Wr.SmoothStep?[V]=iu(Q):D===Wr.SimpleBezier?[V]=Zp(Q):V=`M${N},${P} ${m.value.x},${m.value.y}`,He("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},He("g",{class:"vue-flow__connection"},f?He(f,{sourceX:N,sourceY:P,sourcePosition:w,targetX:m.value.x,targetY:m.value.y,targetPosition:L,sourceNode:h.value,sourceHandle:x,targetNode:b.value,targetHandle:C,markerEnd:y.value,markerStart:_.value,connectionStatus:d.value}):He("path",{d:V,class:[a.value.class,d,"vue-flow__connection-path"],style:{...s.value,...a.value.style},"marker-end":y.value,"marker-start":_.value})))}}}),vE=pE,gE=["id","markerWidth","markerHeight","markerUnits","orient"],mE={name:"MarkerType",compatConfig:{MODE:3}},yE=it({...mE,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,r)=>(me(),Se("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===pe(Ja).ArrowClosed?(me(),Se("polyline",{key:0,style:_t({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):tt("",!0),t.type===pe(Ja).Arrow?(me(),Se("polyline",{key:1,style:_t({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):tt("",!0)],8,gE))}}),bE={class:"vue-flow__marker vue-flow__container"},_E={name:"MarkerDefinitions",compatConfig:{MODE:3}},wE=it({..._E,setup(e){const{id:t,edges:r,connectionLineOptions:n,defaultMarkerColor:i}=lt(),o=Re(()=>{const l=new Set,s=[],a=d=>{if(d){const u=No(d,t);l.has(u)||(typeof d=="object"?s.push({...d,id:u,color:d.color||i.value}):s.push({id:u,color:i.value,type:d}),l.add(u))}};for(const d of[n.value.markerEnd,n.value.markerStart])a(d);for(const d of r.value)for(const u of[d.markerStart,d.markerEnd])a(u);return s.sort((d,u)=>d.id.localeCompare(u.id))});return(l,s)=>(me(),Se("svg",bE,[ke("defs",null,[(me(!0),Se(We,null,Pr(o.value,a=>(me(),kt(yE,{id:a.id,key:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,"stroke-width":a.strokeWidth,orient:a.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),EE={name:"Edges",compatConfig:{MODE:3}},xE=it({...EE,setup(e){const{findNode:t,getEdges:r,elevateEdgesOnSelect:n}=lt();return(i,o)=>(me(),Se(We,null,[Ee(wE),(me(!0),Se(We,null,Pr(pe(r),l=>(me(),Se("svg",{key:l.id,class:"vue-flow__edges vue-flow__container",style:_t({zIndex:pe(K_)(l,pe(t),pe(n))})},[Ee(pe(dE),{id:l.id},null,8,["id"])],4))),128)),Ee(pe(vE))],64))}}),SE=it({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:r,selectNodesOnDrag:n,nodesSelectionActive:i,multiSelectionActive:o,emits:l,removeSelectedNodes:s,addSelectedNodes:a,updateNodeDimensions:d,onUpdateNodeInternals:u,getNodeTypes:c,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:b,ariaLiveMessage:m,snapToGrid:_,snapGrid:y,nodeDragThreshold:v,nodesDraggable:g,elementsSelectable:p,nodesConnectable:E,nodesFocusable:S}=lt(),A=Pe(null);rr(Fp,A),rr(Xu,e.id);const k=vn(Ns),I=an(),x=Up(),{node:w,parentNode:N}=Vp(e.id),P=nt(()=>typeof w.draggable>"u"?g.value:w.draggable),C=nt(()=>typeof w.selectable>"u"?p.value:w.selectable),L=nt(()=>typeof w.connectable>"u"?E.value:w.connectable),D=nt(()=>typeof w.focusable>"u"?S.value:w.focusable),V=nt(()=>!!w.dimensions.width&&!!w.dimensions.height),Q=Re(()=>{const M=w.type||"default",B=k==null?void 0:k[`node-${M}`];if(B)return B;let K=w.template||c.value[M];if(typeof K=="string"&&I){const z=Object.keys(I.appContext.components);z&&z.includes(M)&&(K=Io(M,!1))}return K&&typeof K!="string"?K:(l.error(new It(xt.NODE_TYPE_MISSING,K)),!1)}),{emit:W,on:$}=sw(w,l),R=Hp({id:e.id,el:A,disabled:()=>!P.value,selectable:C,dragHandle:()=>w.dragHandle,onStart(M){W.dragStart(M)},onDrag(M){W.drag(M)},onStop(M){W.dragStop(M)},onClick(M){ce(M)}}),F=Re(()=>w.class instanceof Function?w.class(w):w.class),j=Re(()=>{const M=(w.style instanceof Function?w.style(w):w.style)||{},B=w.width instanceof Function?w.width(w):w.width,K=w.height instanceof Function?w.height(w):w.height;return B&&(M.width=typeof B=="string"?B:`${B}px`),K&&(M.height=typeof K=="string"?K:`${K}px`),M}),Z=nt(()=>Number(w.zIndex??j.value.zIndex??0));return u(M=>{(M.includes(e.id)||!M.length)&&H()}),Dt(()=>{$e(()=>w.hidden,(M=!1,B,K)=>{!M&&A.value&&(e.resizeObserver.observe(A.value),K(()=>{A.value&&e.resizeObserver.unobserve(A.value)}))},{immediate:!0,flush:"post"})}),$e([()=>w.type,()=>w.sourcePosition,()=>w.targetPosition],()=>{Xt(()=>{d([{id:e.id,nodeElement:A.value,forceUpdate:!0}])})}),$e([()=>w.position.x,()=>w.position.y,()=>{var M;return(M=N.value)==null?void 0:M.computedPosition.x},()=>{var M;return(M=N.value)==null?void 0:M.computedPosition.y},()=>{var M;return(M=N.value)==null?void 0:M.computedPosition.z},Z,()=>w.selected,()=>w.dimensions.height,()=>w.dimensions.width,()=>{var M;return(M=N.value)==null?void 0:M.dimensions.height},()=>{var M;return(M=N.value)==null?void 0:M.dimensions.width}],([M,B,K,z,U,Y])=>{const te={x:M,y:B,z:Y+(h.value&&w.selected?1e3:0)};typeof K<"u"&&typeof z<"u"?w.computedPosition=H_({x:K,y:z,z:U},te):w.computedPosition=te},{flush:"post",immediate:!0}),$e([()=>w.extent,f],([M,B],[K,z])=>{(M!==K||B!==z)&&G()}),w.extent==="parent"||typeof w.extent=="object"&&"range"in w.extent&&w.extent.range==="parent"?Va(()=>V).toBe(!0).then(G):G(),()=>w.hidden?null:He("div",{ref:A,"data-id":w.id,class:["vue-flow__node",`vue-flow__node-${Q.value===!1?"default":w.type||"default"}`,{[r.value]:P.value,dragging:R==null?void 0:R.value,draggable:P.value,selected:w.selected,selectable:C.value,parent:w.isParent},F.value],style:{visibility:V.value?"visible":"hidden",zIndex:w.computedPosition.z??Z.value,transform:`translate(${w.computedPosition.x}px,${w.computedPosition.y}px)`,pointerEvents:C.value||P.value?"all":"none",...j.value},tabIndex:D.value?0:void 0,role:D.value?"button":void 0,"aria-describedby":b.value?void 0:`${xp}-${t}`,"aria-label":w.ariaLabel,onMouseenter:J,onMousemove:oe,onMouseleave:ie,onContextmenu:se,onClick:ce,onDblclick:ae,onKeydown:T},[He(Q.value===!1?c.value.default:Q.value,{id:w.id,type:w.type,data:w.data,events:{...w.events,...$},selected:w.selected,resizing:w.resizing,dragging:R.value,connectable:L.value,position:w.computedPosition,dimensions:w.dimensions,isValidTargetPos:w.isValidTargetPos,isValidSourcePos:w.isValidSourcePos,parent:w.parentNode,parentNodeId:w.parentNode,zIndex:w.computedPosition.z??Z.value,targetPosition:w.targetPosition,sourcePosition:w.sourcePosition,label:w.label,dragHandle:w.dragHandle,onUpdateNodeInternals:H})]);function G(){const M=w.computedPosition;_.value&&(M.x=y.value[0]*Math.round(M.x/y.value[0]),M.y=y.value[1]*Math.round(M.y/y.value[1]));const{computedPosition:B,position:K}=Gu(w,M,l.error,f.value,N.value);(w.computedPosition.x!==B.x||w.computedPosition.y!==B.y)&&(w.computedPosition={...w.computedPosition,...B}),(w.position.x!==K.x||w.position.y!==K.y)&&(w.position=K)}function H(){A.value&&d([{id:e.id,nodeElement:A.value,forceUpdate:!0}])}function J(M){R!=null&&R.value||W.mouseEnter({event:M,node:w})}function oe(M){R!=null&&R.value||W.mouseMove({event:M,node:w})}function ie(M){R!=null&&R.value||W.mouseLeave({event:M,node:w})}function se(M){return W.contextMenu({event:M,node:w})}function ae(M){return W.doubleClick({event:M,node:w})}function ce(M){C.value&&(!n.value||!P.value||v.value>0)&&ru(w,o.value,a,s,i,!1,A.value),W.click({event:M,node:w})}function T(M){if(!(eu(M)||b.value))if(Op.includes(M.key)&&C.value){const B=M.key==="Escape";ru(w,o.value,a,s,i,B,A.value)}else P.value&&w.selected&&ki[M.key]&&(m.value=`Moved selected node ${M.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~w.position.x}, y: ${~~w.position.y}`,x({x:ki[M.key].x,y:ki[M.key].y},M.shiftKey))}}}),OE=SE;function NE(e={includeHiddenNodes:!1}){const{nodes:t}=lt();return Re(()=>{if(t.value.length===0)return!1;for(const r of t.value)if((e.includeHiddenNodes||!r.hidden)&&((r==null?void 0:r.handleBounds)===void 0||r.dimensions.width===0||r.dimensions.height===0))return!1;return!0})}const AE={class:"vue-flow__nodes vue-flow__container"},TE={name:"Nodes",compatConfig:{MODE:3}},kE=it({...TE,setup(e){const{getNodes:t,updateNodeDimensions:r,emits:n}=lt(),i=NE(),o=Pe();return $e(i,l=>{l&&Xt(()=>{n.nodesInitialized(t.value)})},{immediate:!0}),Dt(()=>{o.value=new ResizeObserver(l=>{const s=l.map(a=>({id:a.target.getAttribute("data-id"),nodeElement:a.target,forceUpdate:!0}));Xt(()=>r(s))})}),Br(()=>{var l;return(l=o.value)==null?void 0:l.disconnect()}),(l,s)=>(me(),Se("div",AE,[o.value?(me(!0),Se(We,{key:0},Pr(pe(t),(a,d,u,c)=>{const f=[a.id];if(c&&c.key===a.id&&$u(c,f))return c;const h=(me(),kt(pe(OE),{id:a.id,key:a.id,"resize-observer":o.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):tt("",!0)]))}});function CE(){const{emits:e}=lt();Dt(()=>{if(qp()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new It(xt.MISSING_STYLES))}})}const ME=ke("div",{class:"vue-flow__edge-labels"},null,-1),PE={name:"VueFlow",compatConfig:{MODE:3}},IE=it({...PE,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:r}){const n=e,i=Dd(),o=oa(n,"modelValue",r),l=oa(n,"nodes",r),s=oa(n,"edges",r),a=lt(n),d=cw({modelValue:o,nodes:l,edges:s},n,a);return dw(r,a.hooks),aE(),CE(),rr(Ns,i),Fi(()=>{d()}),t(a),(u,c)=>(me(),Se("div",{ref:pe(a).vueFlowRef,class:"vue-flow"},[Ee(nE,null,{default:yt(()=>[Ee(xE),ME,Ee(kE),dt(u.$slots,"zoom-pane")]),_:3}),dt(u.$slots,"default"),Ee(sE)],512))}}),RE={name:"Panel",compatConfig:{MODE:3}},LE=it({...RE,props:{position:{}},setup(e){const t=e,{userSelectionActive:r}=lt(),n=Re(()=>`${t.position}`.split("-"));return(i,o)=>(me(),Se("div",{class:Qt(["vue-flow__panel",n.value]),style:_t({pointerEvents:pe(r)?"none":"all"})},[dt(i.$slots,"default")],6))}});var Ln=(e=>(e.Lines="lines",e.Dots="dots",e))(Ln||{});const Qp=function({dimensions:e,size:t,color:r}){return He("path",{stroke:r,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Jp=function({radius:e,color:t}){return He("circle",{cx:e,cy:e,r:e,fill:t})};Ln.Lines+"",Ln.Dots+"";const DE={[Ln.Dots]:"#81818a",[Ln.Lines]:"#eee"},$E=["id","x","y","width","height","patternTransform"],BE={key:2,height:"100",width:"100"},qE=["fill"],FE=["x","y","fill"],HE={name:"Background",compatConfig:{MODE:3}},jE=it({...HE,props:{id:{},variant:{default:()=>Ln.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:2}},setup(e){const{id:t,viewport:r}=lt(),n=Re(()=>{const[l,s]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],a=[l*r.value.zoom||1,s*r.value.zoom||1],d=e.size*r.value.zoom,u=e.variant===Ln.Dots?[d/e.offset,d/e.offset]:[a[0]/e.offset,a[1]/e.offset];return{scaledGap:a,offset:u,size:d}}),i=nt(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),o=nt(()=>e.color||e.patternColor||DE[e.variant||Ln.Dots]);return(l,s)=>(me(),Se("svg",{class:"vue-flow__background vue-flow__container",style:_t({height:`${l.height>100?100:l.height}%`,width:`${l.width>100?100:l.width}%`})},[dt(l.$slots,"pattern-container",{id:i.value},()=>[ke("pattern",{id:i.value,x:pe(r).x%n.value.scaledGap[0],y:pe(r).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[dt(l.$slots,"pattern",{},()=>[l.variant===pe(Ln).Lines?(me(),kt(pe(Qp),{key:0,size:l.lineWidth,color:o.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):l.variant===pe(Ln).Dots?(me(),kt(pe(Jp),{key:1,color:o.value,radius:n.value.size/l.offset},null,8,["color","radius"])):tt("",!0),l.bgColor?(me(),Se("svg",BE,[ke("rect",{width:"100%",height:"100%",fill:l.bgColor},null,8,qE)])):tt("",!0)])],8,$E)]),ke("rect",{x:l.x,y:l.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,FE),dt(l.$slots,"default",{id:i.value})],4))}}),zE={name:"ControlButton",compatConfig:{MODE:3}},VE=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},UE={class:"vue-flow__controls-button"};function WE(e,t,r,n,i,o){return me(),Se("button",UE,[dt(e.$slots,"default")])}const xr=VE(zE,[["render",WE]]),KE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},GE=ke("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),YE=[GE];function ZE(e,t){return me(),Se("svg",KE,YE)}const XE={render:ZE},QE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},JE=ke("path",{d:"M0 0h32v4.2H0z"},null,-1),ex=[JE];function tx(e,t){return me(),Se("svg",QE,ex)}const nx={render:tx},rx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},ix=ke("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),ox=[ix];function lx(e,t){return me(),Se("svg",rx,ox)}const sx={render:lx},ax={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},ux=ke("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),cx=[ux];function fx(e,t){return me(),Se("svg",ax,cx)}const dx={render:fx},hx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},px=ke("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),vx=[px];function gx(e,t){return me(),Se("svg",hx,vx)}const mx={render:gx},yx={name:"Controls",compatConfig:{MODE:3}},bx=it({...yx,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ep.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:r,nodesConnectable:n,elementsSelectable:i,setInteractive:o,zoomIn:l,zoomOut:s,fitView:a,viewport:d,minZoom:u,maxZoom:c}=lt(),f=nt(()=>r.value||n.value||i.value),h=nt(()=>d.value.zoom<=u.value),b=nt(()=>d.value.zoom>=c.value);function m(){l(),t("zoomIn")}function _(){s(),t("zoomOut")}function y(){a(e.fitViewParams),t("fitView")}function v(){o(!f.value),t("interactionChange",!f.value)}return(g,p)=>(me(),kt(pe(LE),{class:"vue-flow__controls",position:g.position},{default:yt(()=>[dt(g.$slots,"top"),g.showZoom?(me(),Se(We,{key:0},[dt(g.$slots,"control-zoom-in",{},()=>[Ee(xr,{class:"vue-flow__controls-zoomin",disabled:b.value,onClick:m},{default:yt(()=>[dt(g.$slots,"icon-zoom-in",{},()=>[(me(),kt(wr(pe(XE))))])]),_:3},8,["disabled"])]),dt(g.$slots,"control-zoom-out",{},()=>[Ee(xr,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:_},{default:yt(()=>[dt(g.$slots,"icon-zoom-out",{},()=>[(me(),kt(wr(pe(nx))))])]),_:3},8,["disabled"])])],64)):tt("",!0),g.showFitView?dt(g.$slots,"control-fit-view",{key:1},()=>[Ee(xr,{class:"vue-flow__controls-fitview",onClick:y},{default:yt(()=>[dt(g.$slots,"icon-fit-view",{},()=>[(me(),kt(wr(pe(sx))))])]),_:3})]):tt("",!0),g.showInteractive?dt(g.$slots,"control-interactive",{key:2},()=>[g.showInteractive?(me(),kt(xr,{key:0,class:"vue-flow__controls-interactive",onClick:v},{default:yt(()=>[f.value?dt(g.$slots,"icon-unlock",{key:0},()=>[(me(),kt(wr(pe(mx))))]):tt("",!0),f.value?tt("",!0):dt(g.$slots,"icon-lock",{key:1},()=>[(me(),kt(wr(pe(dx))))])]),_:3})):tt("",!0)]):tt("",!0),dt(g.$slots,"default")]),_:3},8,["position"]))}});var Ft=[];for(var va=0;va<256;++va)Ft.push((va+256).toString(16).slice(1));function _x(e,t=0){return(Ft[e[t+0]]+Ft[e[t+1]]+Ft[e[t+2]]+Ft[e[t+3]]+"-"+Ft[e[t+4]]+Ft[e[t+5]]+"-"+Ft[e[t+6]]+Ft[e[t+7]]+"-"+Ft[e[t+8]]+Ft[e[t+9]]+"-"+Ft[e[t+10]]+Ft[e[t+11]]+Ft[e[t+12]]+Ft[e[t+13]]+Ft[e[t+14]]+Ft[e[t+15]]).toLowerCase()}var yl,wx=new Uint8Array(16);function Ex(){if(!yl&&(yl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yl(wx)}var xx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Bf={randomUUID:xx};function Yr(e,t,r){if(Bf.randomUUID&&!t&&!e)return Bf.randomUUID();e=e||{};var n=e.random||(e.rng||Ex)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,_x(n)}const oo=fi([{id:Yr(),type:"text-area",position:{x:0,y:0},data:{label:"Node 1",body:"",components:[]}},{id:Yr(),type:"text-field",position:{x:600,y:0},data:{label:"Node 2"}},{id:Yr(),type:"text-area",position:{x:1100,y:0},data:{label:"Node 3",body:""}},{id:Yr(),type:"note",position:{x:485,y:175},data:{label:"Welcome to Corkboard!",body:"Getting Started:
  1. Right click the background to bring up the context menu
  2. Double click nodes to delete and modify them
  3. Drag attribute nodes over text area nodes to combine them
  4. Save & load projects using the toolbar in the upper-left
"}}]),Sx=fi([{id:Yr(),source:oo[0].id,target:oo[1].id,label:"double-click to rename",updatable:!0},{id:Yr(),source:oo[1].id,target:oo[2].id,label:"label",updatable:!0}]),ev=Pe(!1),tv=Pe("");let ou;function Ox(){return{isVisible:ev,message:tv,confirmDeletion:e=>{ou&&ou(e)}}}function Ju(e){return ev.value=!0,tv.value=e,new Promise(t=>{ou=t})}function Nx(e){return Ju(He("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},["Are you sure?",He("br"),He("span",`[ELEMENT_ID: ${e}]`)]))}function Ax(){return Ju(He("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},["Reset workspace?",He("br"),"This cannot be undone."]))}function Tx(){return{confirm:Ju,confirmDefault:Nx,confirmReset:Ax}}const kx={key:0,class:"dialog-overlay"},Cx={class:"dialog"},Mx=ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"},[ke("path",{fill:"#e53e3e",d:"M7 21q-.825 0-1.412-.587T5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413T17 21zm2-4h2V8H9zm4 0h2V8h-2z"})],-1),Px={key:0},Ix={__name:"DialogConfirmDelete",setup(e){const{isVisible:t,message:r,confirmDeletion:n}=Ox();function i(){n(!0),t.value=!1}function o(){n(!1),t.value=!1}return(l,s)=>pe(t)?(me(),Se("div",kx,[ke("div",Cx,[Mx,typeof pe(r)=="string"?(me(),Se("p",Px,kr(pe(r)),1)):(me(),kt(wr(pe(r)),{key:1})),ke("div",{class:"actions"},[ke("button",{onClick:i},"Confirm"),ke("button",{onClick:o},"Cancel")])])])):tt("",!0)}};var lu="http://www.w3.org/1999/xhtml";const qf={svg:"http://www.w3.org/2000/svg",xhtml:lu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nv(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),qf.hasOwnProperty(t)?{space:qf[t],local:e}:e}function Rx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===lu&&t.documentElement.namespaceURI===lu?t.createElement(e):t.createElementNS(r,e)}}function Lx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rv(e){var t=nv(e);return(t.local?Lx:Rx)(t)}function Dx(){}function iv(e){return e==null?Dx:function(){return this.querySelector(e)}}function $x(e){typeof e!="function"&&(e=iv(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i=g&&(g=v+1);!(E=_[g])&&++g=0;)(l=n[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function c2(e){e||(e=f2);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;ot?1:e>=t?0:NaN}function d2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function h2(){return Array.from(this)}function p2(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?O2:typeof t=="function"?A2:N2)(e,t,r??"")):k2(this.node(),e)}function k2(e,t){return e.style.getPropertyValue(t)||sv(e).getComputedStyle(e,null).getPropertyValue(t)}function C2(e){return function(){delete this[e]}}function M2(e,t){return function(){this[e]=t}}function P2(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function I2(e,t){return arguments.length>1?this.each((t==null?C2:typeof t=="function"?P2:M2)(e,t)):this.node()[e]}function av(e){return e.trim().split(/^|\s+/)}function ec(e){return e.classList||new uv(e)}function uv(e){this._node=e,this._names=av(e.getAttribute("class")||"")}uv.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 cv(e,t){for(var r=ec(e),n=-1,i=t.length;++n=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function sS(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r{}};function hv(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Pl.prototype=hv.prototype={constructor:Pl,on:function(e,t){var r=this._,n=yS(e+"",r),i,o=-1,l=n.length;if(arguments.length<2){for(;++o0)for(var r=new Array(i),n=0,i,o;n()=>e;function su(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:l,y:s,dx:a,dy:d,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:u}})}su.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function xS(e){return!e.ctrlKey&&!e.button}function SS(){return this.parentNode}function OS(e,t){return t??{x:e.x,y:e.y}}function NS(){return navigator.maxTouchPoints||"ontouchstart"in this}function AS(){var e=xS,t=SS,r=OS,n=NS,i={},o=hv("start","drag","end"),l=0,s,a,d,u,c=0;function f(p){p.on("mousedown.drag",h).filter(n).on("touchstart.drag",_).on("touchmove.drag",y,_S).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(p,E){if(!(u||!e.call(this,p,E))){var S=g(this,t.call(this,p,E),p,E,"mouse");S&&(Ao(p.view).on("mousemove.drag",b,To).on("mouseup.drag",m,To),wS(p.view),ga(p),d=!1,s=p.clientX,a=p.clientY,S("start",p))}}function b(p){if(Ci(p),!d){var E=p.clientX-s,S=p.clientY-a;d=E*E+S*S>c}i.mouse("drag",p)}function m(p){Ao(p.view).on("mousemove.drag mouseup.drag",null),ES(p.view,d),Ci(p),i.mouse("end",p)}function _(p,E){if(e.call(this,p,E)){var S=p.changedTouches,A=t.call(this,p,E),k=S.length,I,x;for(I=0;I(e.Line="line",e.Handle="handle",e))(Bi||{});function TS({width:e,prevWidth:t,height:r,prevHeight:n,invertX:i,invertY:o}){const l=e-t,s=r-n,a=[l>0?1:l<0?-1:0,s>0?1:s<0?-1:0];return l&&i&&(a[0]=a[0]*-1),s&&o&&(a[1]=a[1]*-1),a}const kS={[Bi.Line]:"right",[Bi.Handle]:"bottom-right"},CS={[Bi.Line]:"borderColor",[Bi.Handle]:"backgroundColor"},MS={name:"ResizeControl",compatConfig:{MODE:3}},jf=it({...MS,props:{nodeId:{},color:{},minWidth:{default:10},minHeight:{default:10},maxWidth:{default:Number.MAX_VALUE},maxHeight:{default:Number.MAX_VALUE},position:{},variant:{default:"handle"},shouldResize:{},keepAspectRatio:{type:[Boolean,Number],default:!1}},emits:["resizeStart","resize","resizeEnd"],setup(e,{emit:t}){const r=e,n={width:0,height:0,x:0,y:0},i={...n,pointerX:0,pointerY:0,aspectRatio:1},{findNode:o,emits:l}=lt(),s=jp(),a=Pe();let d=i,u=n;const c=nt(()=>r.position??kS[r.variant]),f=nt(()=>c.value.split("-")),h=nt(()=>r.color?{[CS[r.variant]]:r.color}:{});return lh(b=>{if(!a.value||!r.nodeId)return;const m=Ao(a.value),_=c.value.includes("right")||c.value.includes("left"),y=c.value.includes("bottom")||c.value.includes("top"),v=c.value.includes("left"),g=c.value.includes("top"),p=AS().on("start",E=>{const S=o(r.nodeId),{xSnapped:A,ySnapped:k}=s(E);u={width:(S==null?void 0:S.dimensions.width)??0,height:(S==null?void 0:S.dimensions.height)??0,x:(S==null?void 0:S.position.x)??0,y:(S==null?void 0:S.position.y)??0},d={...u,pointerX:A,pointerY:k,aspectRatio:u.width/u.height},t("resizeStart",{event:E,params:u})}).on("drag",E=>{var S;const{xSnapped:A,ySnapped:k}=s(E),I=o(r.nodeId);if(I){const x=[],{pointerX:w,pointerY:N,width:P,height:C,x:L,y:D,aspectRatio:V}=d,{x:Q,y:W,width:$,height:R}=u,F=Math.floor(_?A-w:0),j=Math.floor(y?k-N:0);let Z=or(P+(v?-F:F),r.minWidth,r.maxWidth),G=or(C+(g?-j:j),r.minHeight,r.maxHeight);if(r.keepAspectRatio){const ae=Z/G;let ce=V;typeof r.keepAspectRatio=="number"&&ae!==r.keepAspectRatio&&(ce=r.keepAspectRatio);const T=_&&y,M=_&&!y,B=y&&!_;Z=ae<=ce&&T||B?G*ce:Z,G=ae>ce&&T||M?Z/ce:G,Z>=r.maxWidth?(Z=r.maxWidth,G=r.maxWidth/ce):Z<=r.minWidth&&(Z=r.minWidth,G=r.minWidth/ce),G>=r.maxHeight?(G=r.maxHeight,Z=r.maxHeight*ce):G<=r.minHeight&&(G=r.minHeight,Z=r.minHeight*ce)}const H=Z!==$,J=G!==R;if(v||g){const ae=v?L-(Z-P):L,ce=g?D-(G-C):D,T=ae!==Q&&H,M=ce!==W&&J;if(T||M){const B={id:I.id,type:"position",from:I.position,position:{x:T?ae:Q,y:M?ce:W}};x.push(B),u.x=B.position.x,u.y=B.position.y}}if(r.nodeId&&(H||J)){const ae={id:r.nodeId,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Z,height:G}};x.push(ae),u.width=Z,u.height=G}if(x.length===0)return;const oe=TS({width:u.width,prevWidth:$,height:u.height,prevHeight:R,invertX:v,invertY:g}),ie={...u,direction:oe};if(((S=r.shouldResize)==null?void 0:S.call(r,E,ie))===!1)return;t("resize",{event:E,params:ie}),l.nodesChange(x)}}).on("end",E=>{if(r.nodeId){const S={id:r.nodeId,type:"dimensions",resizing:!1};t("resizeEnd",{event:E,params:u}),l.nodesChange([S])}});m.call(p),b(()=>{m.on(".drag",null)})}),(b,m)=>(me(),Se("div",{ref_key:"resizeControlRef",ref:a,class:Qt(["vue-flow__resize-control nodrag",[...f.value,b.variant]]),style:_t(h.value)},[dt(b.$slots,"default")],6))}}),PS={name:"NodeResizer",compatConfig:{MODE:3},inheritAttrs:!1},Ms=it({...PS,props:{nodeId:{},color:{},handleClassName:{},handleStyle:{},lineClassName:{},lineStyle:{},isVisible:{type:Boolean,default:!0},minWidth:{},minHeight:{},maxWidth:{},maxHeight:{},shouldResize:{},keepAspectRatio:{type:[Boolean,Number]}},emits:["resizeStart","resize","resizeEnd"],setup(e,{emit:t}){const r=e,{findNode:n,emits:i}=lt(),o=["top-left","top-right","bottom-left","bottom-right"],l=["top","right","bottom","left"],s=vn(Xu,null),a=nt(()=>typeof r.nodeId=="string"?r.nodeId:s),d=Re(()=>n(a.value));return $e([()=>r.minWidth,()=>r.minHeight,()=>r.maxWidth,()=>r.maxHeight,()=>{var u;return!!((u=d.value)!=null&&u.dimensions.width)&&!!d.value.dimensions.height}],([u,c,f,h,b])=>{const m=d.value;if(m&&b){const _={id:m.id,type:"dimensions",updateStyle:!0,dimensions:{width:m.dimensions.width,height:m.dimensions.height}};u&&m.dimensions.widthf&&(_.dimensions.width=f),h&&m.dimensions.height>h&&(_.dimensions.height=h),(_.dimensions.width!==m.dimensions.width||_.dimensions.height!==m.dimensions.height)&&i.nodesChange([_])}},{flush:"post",immediate:!0}),(u,c)=>u.isVisible?(me(),Se(We,{key:0},[(me(),Se(We,null,Pr(l,f=>Ee(jf,{key:f,class:Qt(u.lineClassName),style:_t(u.lineStyle),"node-id":a.value,position:f,variant:pe(Bi).Line,"keep-aspect-ratio":u.keepAspectRatio,color:u.color,"min-width":u.minWidth,"min-height":u.minHeight,"max-width":u.maxWidth,"max-height":u.maxHeight,"should-resize":u.shouldResize,onResizeStart:c[0]||(c[0]=h=>t("resizeStart",h)),onResize:c[1]||(c[1]=h=>t("resize",h)),onResizeEnd:c[2]||(c[2]=h=>t("resizeEnd",h))},null,8,["class","style","node-id","position","variant","keep-aspect-ratio","color","min-width","min-height","max-width","max-height","should-resize"])),64)),(me(),Se(We,null,Pr(o,f=>Ee(jf,{key:f,class:Qt(u.handleClassName),style:_t(u.handleStyle),"node-id":a.value,position:f,color:u.color,"min-width":u.minWidth,"min-height":u.minHeight,"max-width":u.maxWidth,"max-height":u.maxHeight,"should-resize":u.shouldResize,"keep-aspect-ratio":u.keepAspectRatio,onResizeStart:c[3]||(c[3]=h=>t("resizeStart",h)),onResize:c[4]||(c[4]=h=>t("resize",h)),onResizeEnd:c[5]||(c[5]=h=>t("resizeEnd",h))},null,8,["class","style","node-id","position","color","min-width","min-height","max-width","max-height","should-resize","keep-aspect-ratio"])),64))],64)):tt("",!0)}}),IS={class:"node-background"},RS={__name:"ResizableNode",props:["data"],setup(e){return(t,r)=>(me(),Se(We,null,[Ee(pe(Ms),{"min-width":"100","min-height":"40","max-width":"200"}),ke("div",IS,[Lo(kr(e.data.label)+" ",1),Ee(pe(Hn),{type:"target",position:pe(Ne).Left},null,8,["position"]),Ee(pe(Hn),{type:"source",position:pe(Ne).Right},null,8,["position"])])],64))}},LS={class:"node-background"},DS=["id"],$S={__name:"TextFieldNode",props:["id","data"],setup(e){const t=e;return(r,n)=>(me(),Se(We,null,[Ee(pe(Ms),{"min-width":"220","min-height":"50","max-height":"50"}),ke("div",LS,[oi(ke("input",{id:`${e.id}-text-field`,"onUpdate:modelValue":n[0]||(n[0]=i=>t.data.label=i),placeholder:"Write label here...",class:"nodrag text-field-node vue-flow__node-value"},null,8,DS),[[Fn,t.data.label]]),Ee(pe(Hn),{type:"target",position:pe(Ne).Left,connectable:!0},null,8,["position"]),Ee(pe(Hn),{type:"source",position:pe(Ne).Right,connectable:!0},null,8,["position"])])],64))}};function BS(){return{connectComponent:(n,i)=>{if(n.type!="text-area")return;const o=n.data.components;o&&!o.includes(i.id)?o.push(i.id):o||(n.data.components=[i.id])},addAttribute:n=>{const i=n.data.attributes,o="New Attribute";i?i.push(o):i||(n.data.attributes=[o])},deleteComponents:(n,i)=>{for(const o of n.value){if(o.id==i)continue;const l=o.data.components;if(l)for(let s=0;s{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},qS={class:"node-background"},FS={class:"content-wrapper"},HS=["id"],jS={key:0,class:"components-list"},zS=["for"],VS={__name:"TextAreaNode",props:["id","data"],setup(e){lt();const t=e,r=Pe(t.data.components||[]),n=Pe([]),{findNode:i}=lt();return $e(r,o=>{if(n.value=[],o!=null)for(let l=0;lt.data.components,o=>{r.value=o||[]},{deep:!0}),Dt(()=>{if(t.data.components)for(const o of t.data.components){const l=i(o);n.value.push(l)}}),(o,l)=>{const s=Io("QuillEditor");return me(),Se(We,null,[Ee(pe(Ms),{"min-width":"300","min-height":"300"}),ke("div",qS,[ke("div",FS,[oi(ke("input",{id:`${e.id}-text-field`,"onUpdate:modelValue":l[0]||(l[0]=a=>t.data.label=a),placeholder:"Write label here...",class:"nodrag text-field-node vue-flow__node-value"},null,8,HS),[[Fn,t.data.label]]),Ee(s,{id:`${e.id}-text-area`,content:t.data.body,"onUpdate:content":l[1]||(l[1]=a=>t.data.body=a),contentType:"html",placeholder:"Write text here...",theme:"snow",toolbar:["bold","italic","underline","link","code"],class:"nodrag"},null,8,["id","content"]),n.value&&n.value.length>0?(me(),Se("div",jS,[(me(!0),Se(We,null,Pr(n.value,(a,d)=>(me(),Se("div",{key:d,class:"component-item"},[ke("label",{for:`${e.id}-component-${d}`},kr(a.data.label?a.data.label:a.id),9,zS)]))),128))])):tt("",!0),Ee(pe(Hn),{type:"target",position:pe(Ne).Left,connectable:!0},null,8,["position"]),Ee(pe(Hn),{type:"source",position:pe(Ne).Right,connectable:!0},null,8,["position"])])])],64)}}},US=tc(VS,[["__scopeId","data-v-ed2a4b5c"]]),WS={class:"node-background node-border display: flex"},KS={class:"content-wrapper"},GS=["id"],YS={class:"attributes-list"},ZS=["id","onUpdate:modelValue"],_l=200,XS={__name:"ComponentNode",props:["id","data"],setup(e){const t=e,r=Pe(t.data.attributes||[]),n=(l,s="2.0em JetBrains Mono")=>{const d=document.createElement("canvas").getContext("2d");return d.font=s,d.measureText(l).width},i=Pe([]),o=Pe(0);return Dt(()=>{o.value=Math.max(n(t.data.label||"")+20,_l),r.value.forEach((l,s)=>{i.value[s]=Math.max(n(l)+20,_l)})}),$e(r,l=>{l.forEach((s,a)=>{i.value[a]=Math.max(n(s)+20,_l)}),t.data.attributes=l},{deep:!0}),$e(()=>t.data.label,l=>{o.value=Math.max(n(l||"")+20,_l)}),(l,s)=>(me(),Se("div",WS,[ke("div",KS,[oi(ke("input",{id:`${e.id}-text-field`,"onUpdate:modelValue":s[0]||(s[0]=a=>t.data.label=a),style:_t({width:`${o.value}px`}),placeholder:"Write component label here...",class:"nodrag text-field-node vue-flow__node-value"},null,12,GS),[[Fn,t.data.label]]),ke("div",YS,[(me(!0),Se(We,null,Pr(r.value,(a,d)=>(me(),Se("div",{key:d,class:"attribute-item"},[oi(ke("input",{id:`${e.id}-attribute-${d}`,"onUpdate:modelValue":u=>r.value[d]=u,style:_t({width:`${i.value[d]}px`}),placeholder:"Write attribute here...",class:"nodrag text-field-node vue-flow__node-value"},null,12,ZS),[[Fn,r.value[d]]])]))),128))]),ke("button",{onClick:s[1]||(s[1]=a=>r.value.push("")),class:"add-attribute-button"},"Add Attribute")])]))}},QS=tc(XS,[["__scopeId","data-v-7e3b83e7"]]),JS={class:"node-background"},eO={class:"content-wrapper"},tO=["id"],nO={__name:"NoteNode",props:["id","data"],setup(e){const t=e;return(r,n)=>{const i=Io("QuillEditor");return me(),Se(We,null,[Ee(pe(Ms),{"min-width":"250","min-height":"250"}),ke("div",JS,[ke("div",eO,[oi(ke("input",{id:`${e.id}-label-field`,"onUpdate:modelValue":n[0]||(n[0]=o=>t.data.label=o),placeholder:"Write label here...",class:"nodrag text-field-node vue-flow__node-value"},null,8,tO),[[Fn,t.data.label]]),Ee(i,{id:`${e.id}-note-area`,content:t.data.body,"onUpdate:content":n[1]||(n[1]=o=>t.data.body=o),contentType:"html",placeholder:"Write note here...",theme:"snow",class:"nodrag"},null,8,["id","content"])])])],64)}}},rO=tc(nO,[["__scopeId","data-v-05c43acc"]]);var Lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function iO(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var au={exports:{}};const oO=iO(qy);(function(e,t){(function(r,n){n(t,oO)})(Lt,function(r,n){let i=null;function o(){return i!==null}function l(X){i&&a(),i=X}function s(X){X===i&&(i=null)}function a(){i&&(i.closeMenu(),i=null)}const d={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultZoom:1,defaultAdjustPadding:{x:0,y:10}};function u(X,le){let de=X.offsetTop;return X.offsetParent!=null&&X.offsetParent!=le&&(de-=X.offsetParent.scrollTop,de+=u(X.offsetParent,le)),de}function c(X,le){let de=X.offsetLeft;return X.offsetParent!=null&&X.offsetParent!=le&&(de-=X.offsetParent.scrollLeft,de+=c(X.offsetParent,le)),de}function f(X,le,de,he){return{x:c(X,he)+le,y:u(X,he)+de}}const h="mx-menu-default-container",b="mx-menu-container-";let m=0;function _(X){const{getContainer:le,zIndex:de}=X;if(le){const ve=typeof le=="function"?le():le;if(ve){let be=ve.getAttribute("id");return be||(be=b+m++,ve.setAttribute("id",be)),{eleId:be,container:ve,isNew:!1}}}let he=document.getElementById(h);return he||(he=document.createElement("div"),he.setAttribute("id",h),he.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(he)),he.style.zIndex=(de==null?void 0:de.toString())||d.defaultZindex.toString(),{eleId:h,container:he,isNew:!0}}function y(X){return typeof X=="number"?`${X}px`:X}const v=n.defineComponent({props:{vnode:{type:null},data:{type:null,default:null}},setup(X){const{vnode:le,data:de}=n.toRefs(X);return()=>typeof le.value=="function"?le.value(de.value):le.value}}),g=(X,le)=>{const de=X.__vccOpts||X;for(const[he,ve]of le)de[he]=ve;return de},p={},E={class:"mx-checked-mark","aria-hidden":"true",viewBox:"0 0 1024 1024"},S=[n.createElementVNode("path",{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"},null,-1)];function A(X,le){return n.openBlock(),n.createElementBlock("svg",E,S)}const k=g(p,[["render",A]]),I={},x={class:"mx-right-arrow","aria-hidden":"true",viewBox:"0 0 1024 1024"},w=[n.createElementVNode("path",{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"},null,-1)];function N(X,le){return n.openBlock(),n.createElementBlock("svg",x,w)}const P=g(I,[["render",N]]),C={class:"mx-item-row"},L=["xlink:href"],D={key:1,class:"label"},V={class:"mx-item-row"},Q={class:"mx-shortcut"},W=n.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(X,{expose:le,emit:de}){const he=X,ve=de,{clickHandler:be,clickClose:ye,clickableWhenHasChildren:_e,disabled:Ie,hidden:Ve,label:ge,icon:Ke,iconFontClass:Ue,showRightArrow:Be,shortcut:pt,hasChildren:ft}=n.toRefs(he),Ge=n.ref(!1),xe=n.ref(!1),Me=n.ref(),qe=n.inject("globalOptions"),je=n.inject("globalHasSlot"),vt=n.inject("globalRenderSlot"),Le=n.inject("globalCloseMenu"),Ze=n.inject("menuContext"),st={getSubMenuInstance:()=>{},showSubMenu:()=>Ge.value?(Ze.markActiveMenuItem(st,!0),!0):ft.value?(bt(),!0):!1,hideSubMenu:()=>{Ze.closeOtherSubMenu()},isDisabledOrHidden:()=>Ie.value||Ve.value,getElement:()=>Me.value,focus:()=>xe.value=!0,blur:()=>xe.value=!1,click:$t};n.provide("menuItemInstance",st),n.onMounted(()=>{Ze.isMenuItemDataCollectedFlag()?n.nextTick(()=>{let ze=0;const mt=Ze.getElement();if(mt){let Kt=0;for(let ut=0;ut{Ze.removeChildMenuItem(st)});function $t(ze){if(!Ie.value){if(ze){const mt=ze.target;if(mt.classList.contains("mx-context-no-clickable")||qe.value.ignoreClickClassName&&mt.classList.contains(qe.value.ignoreClickClassName))return;if(qe.value.clickCloseClassName&&mt.classList.contains(qe.value.clickCloseClassName)){ze.stopPropagation(),Le(he.rawMenuItem);return}}ft.value?_e.value?(typeof be.value=="function"&&be.value(ze),ve("click",ze)):Ge.value||bt():(typeof be.value=="function"&&be.value(ze),ve("click",ze),ye.value&&Le(he.rawMenuItem))}}function bt(ze){xe.value=!1,Ze.checkCloseOtherSubMenuTimeOut()||Ze.closeOtherSubMenu(),Ie.value||(Ze.markActiveMenuItem(st),ft.value&&(ze||Ze.markThisOpenedByKeyBoard(),Ze.addOpenedSubMenu(yn),Ge.value=!0,n.nextTick(()=>ve("subMenuOpen",st))))}function yn(){xe.value=!1,Ge.value=!1,ve("subMenuClose",st)}function Ot(){return{disabled:Ie.value,label:ge.value,icon:Ke.value,iconFontClass:Ue.value,showRightArrow:Be.value,clickClose:ye.value,clickableWhenHasChildren:_e.value,shortcut:pt.value,theme:qe.value.theme,isOpen:Ge,hasChildren:ft,onClick:$t,onMouseEnter:bt,closeMenu:Le}}return le(st),(ze,mt)=>n.unref(Ve)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"mx-context-menu-item-wrapper",ref_key:"menuItemRef",ref:Me,"data-type":"ContextMenuItem"},[n.unref(je)("itemRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemRender",Ot())},null,8,["vnode"])):X.customRender?(n.openBlock(),n.createBlock(n.unref(v),{key:1,vnode:X.customRender,data:Ot()},null,8,["vnode","data"])):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["mx-context-menu-item",n.unref(Ie)?"disabled":"",xe.value?"keyboard-focus":"",X.customClass?" "+X.customClass:"",Ge.value?"open":""]),onClick:$t,onMouseenter:bt},[n.renderSlot(ze.$slots,"default",{},()=>[n.createElementVNode("div",C,[n.createElementVNode("div",{class:n.normalizeClass(["mx-icon-placeholder",X.preserveIconWidth?"preserve-width":""])},[n.renderSlot(ze.$slots,"icon",{},()=>[n.unref(je)("itemIconRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemIconRender",Ot())},null,8,["vnode"])):typeof X.svgIcon=="string"&&X.svgIcon?(n.openBlock(),n.createElementBlock("svg",n.mergeProps({key:1,class:"icon svg"},X.svgProps),[n.createElementVNode("use",{"xlink:href":X.svgIcon},null,8,L)],16)):typeof n.unref(Ke)!="string"?(n.openBlock(),n.createBlock(n.unref(v),{key:2,vnode:n.unref(Ke),data:n.unref(Ke)},null,8,["vnode","data"])):typeof n.unref(Ke)=="string"&&n.unref(Ke)!==""?(n.openBlock(),n.createElementBlock("i",{key:3,class:n.normalizeClass(n.unref(Ke)+" icon "+n.unref(Ue)+" "+n.unref(qe).iconFontClass)},null,2)):n.createCommentVNode("",!0)]),X.checked?n.renderSlot(ze.$slots,"check",{key:0},()=>[n.unref(je)("itemCheckRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemCheckRender",Ot())},null,8,["vnode"])):n.createCommentVNode("",!0),n.createVNode(k)]):n.createCommentVNode("",!0)],2),n.renderSlot(ze.$slots,"label",{},()=>[n.unref(je)("itemLabelRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemLabelRender",Ot())},null,8,["vnode"])):typeof n.unref(ge)=="string"?(n.openBlock(),n.createElementBlock("span",D,n.toDisplayString(n.unref(ge)),1)):(n.openBlock(),n.createBlock(n.unref(v),{key:2,vnode:n.unref(ge),data:n.unref(ge)},null,8,["vnode","data"]))])]),n.createElementVNode("div",V,[n.unref(pt)?n.renderSlot(ze.$slots,"shortcut",{key:0},()=>[n.unref(je)("itemShortcutRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemShortcutRender",Ot())},null,8,["vnode"])):n.createCommentVNode("",!0),n.createElementVNode("span",Q,n.toDisplayString(n.unref(pt)),1)]):n.createCommentVNode("",!0),n.unref(Be)?n.renderSlot(ze.$slots,"rightArrow",{key:1},()=>[n.unref(je)("itemRightArrowRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemRightArrowRender",Ot())},null,8,["vnode"])):n.createCommentVNode("",!0),n.createVNode(P)]):n.createCommentVNode("",!0)])])],34)),n.unref(qe).menuTransitionProps?(n.openBlock(),n.createBlock(n.Transition,n.normalizeProps(n.mergeProps({key:3},n.unref(qe).menuTransitionProps)),{default:n.withCtx(()=>[Ge.value?n.renderSlot(ze.$slots,"submenu",{key:0}):n.createCommentVNode("",!0)]),_:3},16)):Ge.value?n.renderSlot(ze.$slots,"submenu",{key:4}):n.createCommentVNode("",!0)],512))}}),$=n.defineComponent({name:"ContextMenuSperator",components:{VNodeRender:v},setup(){const X=n.inject("globalHasSlot"),le=n.inject("globalRenderSlot");return{globalHasSlot:X,globalRenderSlot:le}}}),R={key:1,class:"mx-context-menu-item-sperator mx-context-no-clickable"};function F(X,le,de,he,ve,be){const ye=n.resolveComponent("VNodeRender");return X.globalHasSlot("separatorRender")?(n.openBlock(),n.createBlock(ye,{key:0,vnode:()=>X.globalRenderSlot("separatorRender",{})},null,8,["vnode"])):(n.openBlock(),n.createElementBlock("div",R))}const j=g($,[["render",F]]),Z=n.defineComponent({name:"ContextSubMenu",components:{ContextMenuItem:W,ContextMenuSeparator:j,ContextMenuIconRight:P},props:{items:{type:Object,default:null},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"}},setup(X){const le=n.inject("menuContext"),de=n.inject("globalOptions"),he=n.inject("globalHasSlot"),ve=n.inject("globalRenderSlot"),{zIndex:be,getParentWidth:ye,getParentHeight:_e,getZoom:Ie}=le,{adjustPosition:Ve}=n.toRefs(X),ge=n.ref(),Ke=n.ref(),Ue=n.ref(),Be=n.ref(),pt=[],ft=n.inject("globalSetCurrentSubMenu"),Ge=[];let xe=null,Me=0;function qe(){xe&&xe.blur()}function je(Te,Fe){if(Te){for(let Ht=Fe!==void 0?Fe:0;Ht=0;Ht--)if(!Ge[Ht].isDisabledOrHidden()){vt(Ht);break}}function vt(Te){if(xe&&qe(),Te!==void 0&&(xe=Ge[Math.max(0,Math.min(Te,Ge.length-1))]),!!xe&&(xe.focus(),_n.value)){const Fe=xe.getElement();Fe&&(ze.value=Math.min(Math.max(-mt.value,-Fe.offsetTop-Fe.offsetHeight+dn.value),0))}}function Le(){ft(Ze)}const Ze={isTopLevel:()=>le.getParentContext()===null,closeSelfAndActiveParent:()=>{const Te=bt.getParentContext();if(Te){Te.closeOtherSubMenu();const Fe=Te.getSubMenuInstanceContext();if(Fe)return Fe.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var Te;return(Te=bt.getParentContext())==null?void 0:Te.closeOtherSubMenu()},moveCurrentItemFirst:()=>je(!0),moveCurrentItemLast:()=>je(!1),moveCurrentItemDown:()=>je(!0,xe?Ge.indexOf(xe)+1:0),moveCurrentItemUp:()=>je(!1,xe?Ge.indexOf(xe)-1:0),focusCurrentItem:()=>vt(),openCurrentItemSubMenu:()=>xe?xe==null?void 0:xe.showSubMenu():!1,triggerCurrentItemClick:Te=>xe==null?void 0:xe.click(Te)};let st=!1,$t=!1;const bt={zIndex:be+1,container:le.container,adjustPadding:de.value.adjustPadding||d.defaultAdjustPadding,getParentWidth:()=>{var Te;return((Te=Ke.value)==null?void 0:Te.offsetWidth)||0},getParentHeight:()=>{var Te;return((Te=Ke.value)==null?void 0:Te.offsetHeight)||0},getParentX:()=>ct.value.x,getParentY:()=>ct.value.y,getParentAbsX:()=>Ke.value?c(Ke.value,le.container):0,getParentAbsY:()=>Ke.value?u(Ke.value,le.container):0,getPositon:()=>[0,0],getZoom:()=>de.value.zoom||d.defaultZoom,addOpenedSubMenu(Te){pt.push(Te)},closeOtherSubMenu(){pt.forEach(Te=>Te()),pt.splice(0,pt.length),ft(Ze)},checkCloseOtherSubMenuTimeOut(){return Me?(clearTimeout(Me),Me=0,!0):!1},closeOtherSubMenuWithTimeOut(){Me=setTimeout(()=>{Me=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(Te,Fe)=>{Fe===void 0?Ge.push(Te):Ge.splice(Fe,0,Te)},removeChildMenuItem:Te=>{Ge.splice(Ge.indexOf(Te),1),Te.getSubMenuInstance=()=>{}},markActiveMenuItem:(Te,Fe=!1)=>{qe(),xe=Te,Fe&&vt()},markThisOpenedByKeyBoard:()=>{st=!0},isOpenedByKeyBoardFlag:()=>st?(st=!1,!0):!1,isMenuItemDataCollectedFlag:()=>$t,getElement:()=>Ke.value||null,getParentContext:()=>le,getSubMenuInstanceContext:()=>Ze};n.provide("menuContext",bt);const yn={getChildItem:Te=>Ge[Te],getMenuDimensions:()=>ge.value?{width:ge.value.offsetWidth,height:ge.value.offsetHeight}:{width:0,height:0},getSubmenuRoot:()=>ge.value,getMenu:()=>Ke.value,getScrollValue:()=>ze.value,setScrollValue:Te=>ze.value=Te,getScrollHeight:()=>mt.value,getMaxHeight:()=>dn.value,getPosition:()=>ct.value,setPosition:(Te,Fe)=>{ct.value.x=Te,ct.value.y=Fe}},Ot=n.inject("menuItemInstance",void 0);Ot&&(Ot.getSubMenuInstance=()=>yn);const ze=n.ref(0),mt=n.ref(0);function Kt(Te){Te?ze.value=Math.min(Math.max(ze.value-50,-mt.value),0):ze.value=Math.min(ze.value+50,0)}function ut(Te){Te.preventDefault(),Te.stopPropagation(),Kt(Te.deltaY>0)}function bn(Te){de.value.mouseScroll&&(Te.preventDefault(),Te.stopPropagation(),Kt(Te.deltaY>0))}const _n=n.ref(!1),ct=n.ref({x:0,y:0}),dn=n.ref(0);return n.onMounted(()=>{const Te=le.getPositon();ct.value={x:(Te[0]??de.value.xOffset??0)/Ie(),y:(Te[1]??de.value.yOffset??0)/Ie()},ft(Ze),n.nextTick(()=>{var Fe,Ht;const Nt=Ke.value;if(Nt&&Ue.value){const{container:An}=le,qr=(ye==null?void 0:ye())??0,hi=(_e==null?void 0:_e())??0,At=typeof le.adjustPadding=="number"?le.adjustPadding:((Fe=le.adjustPadding)==null?void 0:Fe.x)??0,sr=typeof le.adjustPadding=="number"?le.adjustPadding:((Ht=le.adjustPadding)==null?void 0:Ht.y)??0,zn=hi>0?sr:0,Hi=document.documentElement.scrollHeight/Ie(),ji=document.documentElement.scrollWidth/Ie(),zi=Math.min(ji,An.offsetWidth),Tn=Math.min(Hi,An.offsetHeight);let ar=c(Nt,An),kn=u(Nt,An);X.direction.includes("l")?ct.value.x-=Nt.offsetWidth+At:X.direction.includes("r")?ct.value.x+=qr+At:(ct.value.x+=qr/2,ct.value.x-=(Nt.offsetWidth+At)/2),X.direction.includes("t")?ct.value.y-=(Nt.offsetHeight+sr*2)/Ie():X.direction.includes("b")?ct.value.y-=sr/Ie():(ct.value.y+=hi/2/Ie(),ct.value.y-=(Nt.offsetHeight+sr)/2/Ie()),Ve.value&&n.nextTick(()=>{ar=c(Nt,An),kn=u(Nt,An);const hn=ar+Nt.offsetWidth-zi,ur=kn+Nt.offsetHeight+zn*2-Tn;if(_n.value=ur>0,mt.value=Nt.offsetHeight-Tn+zn*2,hn>0){const Vn=qr+Nt.offsetWidth-At,Un=ar;Vn>Un?ct.value.x-=Un:ct.value.x-=Vn}if(_n.value){const Vn=ur,Un=kn;Vn>Un?ct.value.y-=Un-zn:ct.value.y-=Vn-zn,dn.value=Tn-zn*2}else dn.value=0})}Nt==null||Nt.focus({preventScroll:!0}),le.isOpenedByKeyBoardFlag()&&je(!0),$t=!0})}),n.onBeforeUnmount(()=>{Ot&&(Ot.getSubMenuInstance=()=>{})}),{submenuRoot:ge,menu:Ke,scroll:Ue,options:de,zIndex:be,constOptions:d,scrollValue:ze,upScrollButton:Be,overflow:_n,position:ct,scrollHeight:mt,maxHeight:dn,...yn,globalHasSlot:he,globalRenderSlot:ve,onScroll:Kt,onSubMenuBodyClick:Le,onMouseWhell:bn,onMouseWhellMx:ut,solveNumberOrStringSize:y}}}),G={key:0,class:"mx-context-menu-updown placeholder"},H={key:1,class:"mx-context-menu-updown placeholder"},J={class:"mx-context-menu-scroll",ref:"scroll"};function oe(X,le,de,he,ve,be){const ye=n.resolveComponent("ContextMenuSeparator"),_e=n.resolveComponent("ContextSubMenu",!0),Ie=n.resolveComponent("ContextMenuItem"),Ve=n.resolveComponent("ContextMenuIconRight");return n.openBlock(),n.createElementBlock("div",{ref:"submenuRoot",class:n.normalizeClass(["mx-context-menu",X.options.customClass?X.options.customClass:"",X.options.theme??""]),style:n.normalizeStyle({maxWidth:X.maxWidth?X.solveNumberOrStringSize(X.maxWidth):`${X.constOptions.defaultMaxWidth}px`,minWidth:X.minWidth?X.solveNumberOrStringSize(X.minWidth):`${X.constOptions.defaultMinWidth}px`,maxHeight:X.overflow&&X.maxHeight>0?`${X.maxHeight}px`:void 0,zIndex:X.zIndex,left:`${X.position.x}px`,top:`${X.position.y}px`}),"data-type":"ContextSubMenu",onClick:le[4]||(le[4]=(...ge)=>X.onSubMenuBodyClick&&X.onSubMenuBodyClick(...ge)),onWheel:le[5]||(le[5]=(...ge)=>X.onMouseWhell&&X.onMouseWhell(...ge))},[n.createElementVNode("div",{class:n.normalizeClass(["mx-context-menu-items"]),ref:"menu",style:n.normalizeStyle({top:`${X.scrollValue}px`})},[n.renderSlot(X.$slots,"default",{},()=>[X.overflow&&X.options.updownButtonSpaceholder?(n.openBlock(),n.createElementBlock("div",G)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(X.items,(ge,Ke)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:Ke},[ge.hidden!==!0&&ge.divided==="up"?(n.openBlock(),n.createBlock(ye,{key:0})):n.createCommentVNode("",!0),ge.hidden!==!0&&ge.divided==="self"?(n.openBlock(),n.createBlock(ye,{key:1})):(n.openBlock(),n.createBlock(Ie,{key:2,clickHandler:ge.onClick?Ue=>ge.onClick(Ue):void 0,disabled:ge.disabled,hidden:ge.hidden,icon:ge.icon,iconFontClass:ge.iconFontClass,svgIcon:ge.svgIcon,svgProps:ge.svgProps,label:ge.label,customRender:ge.customRender,customClass:ge.customClass,checked:ge.checked,shortcut:ge.shortcut,clickClose:ge.clickClose,clickableWhenHasChildren:ge.clickableWhenHasChildren,preserveIconWidth:ge.preserveIconWidth!==void 0?ge.preserveIconWidth:X.options.preserveIconWidth,showRightArrow:ge.children&&ge.children.length>0,hasChildren:ge.children&&ge.children.length>0,rawMenuItem:ge,onSubMenuOpen:Ue=>{var Be;return(Be=ge.onSubMenuOpen)==null?void 0:Be.call(ge,Ue)},onSubMenuClose:Ue=>{var Be;return(Be=ge.onSubMenuClose)==null?void 0:Be.call(ge,Ue)}},n.createSlots({_:2},[ge.children&&ge.children.length>0?{name:"submenu",fn:n.withCtx(()=>[n.createVNode(_e,{items:ge.children,maxWidth:ge.maxWidth,minWidth:ge.minWidth,adjustPosition:ge.adjustSubMenuPosition!==void 0?ge.adjustSubMenuPosition:X.options.adjustPosition,direction:ge.direction!==void 0?ge.direction:X.options.direction},null,8,["items","maxWidth","minWidth","adjustPosition","direction"])]),key:"0"}:void 0]),1032,["clickHandler","disabled","hidden","icon","iconFontClass","svgIcon","svgProps","label","customRender","customClass","checked","shortcut","clickClose","clickableWhenHasChildren","preserveIconWidth","showRightArrow","hasChildren","rawMenuItem","onSubMenuOpen","onSubMenuClose"])),ge.hidden!==!0&&(ge.divided==="down"||ge.divided===!0)?(n.openBlock(),n.createBlock(ye,{key:3})):n.createCommentVNode("",!0)],64))),128)),X.overflow&&X.options.updownButtonSpaceholder?(n.openBlock(),n.createElementBlock("div",H)):n.createCommentVNode("",!0)])],4),n.createElementVNode("div",J,[n.withDirectives(n.createElementVNode("div",{ref:"upScrollButton",class:n.normalizeClass("mx-context-menu-updown mx-context-no-clickable up"+(X.overflow&&X.scrollValue<0?"":" disabled")),onClick:le[0]||(le[0]=ge=>X.onScroll(!1)),onWheel:le[1]||(le[1]=(...ge)=>X.onMouseWhellMx&&X.onMouseWhellMx(...ge))},[n.createVNode(Ve)],34),[[n.vShow,X.overflow]]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass("mx-context-menu-updown mx-context-no-clickable down"+(X.overflow&&X.scrollValue>-X.scrollHeight?"":" disabled")),onClick:le[2]||(le[2]=ge=>X.onScroll(!0)),onWheel:le[3]||(le[3]=(...ge)=>X.onMouseWhellMx&&X.onMouseWhellMx(...ge))},[n.createVNode(Ve)],34),[[n.vShow,X.overflow]])],512)],38)}const ie=g(Z,[["render",oe]]),se={class:"mx-menu-ghost-host"},ae=n.defineComponent({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:Object,default:null},container:{type:Object,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(X,{expose:le,emit:de}){const he=X,ve=de,be=n.useSlots(),ye=n.ref(),{options:_e,show:Ie,container:Ve}=n.toRefs(he);n.onMounted(()=>{Ie.value&&Ue()}),n.onBeforeUnmount(()=>{Ge()}),n.watch(Ie,Le=>{Le?Ue():(s(ge),Ge())});const ge={closeMenu:Be,isClosed:pt,getMenuRef:()=>ye.value,getMenuDimensions:()=>{var Le;return((Le=ye.value)==null?void 0:Le.getMenuDimensions())??{width:0,height:0}}};let Ke=!1;function Ue(){ft(),l(ge)}function Be(Le){Ke=!0,ve("close",Le),_e.value.menuTransitionProps||ve("closeAnimFinished"),s(ge)}function pt(){return Ke}function ft(){setTimeout(()=>{document.addEventListener("click",je,!0),document.addEventListener("contextmenu",je,!0),document.addEventListener("scroll",qe,!0),!he.isFullScreenContainer&&Ve.value&&Ve.value.addEventListener("scroll",qe,!0),_e.value.keyboardControl!==!1&&document.addEventListener("keydown",Me)},50)}function Ge(){document.removeEventListener("contextmenu",je,!0),document.removeEventListener("click",je,!0),document.removeEventListener("scroll",qe,!0),!he.isFullScreenContainer&&Ve.value&&Ve.value.removeEventListener("scroll",qe,!0),_e.value.keyboardControl!==!1&&document.removeEventListener("keydown",Me)}const xe=n.ref();n.provide("globalSetCurrentSubMenu",Le=>xe.value=Le);function Me(Le){var Ze,st,$t,bt,yn,Ot,ze,mt,Kt,ut,bn,_n,ct;let dn=!0;switch(Le.key){case"Escape":{((Ze=xe.value)==null?void 0:Ze.isTopLevel())===!1?(st=xe.value)==null||st.closeCurrentSubMenu():Be();break}case"ArrowDown":($t=xe.value)==null||$t.moveCurrentItemDown();break;case"ArrowUp":(bt=xe.value)==null||bt.moveCurrentItemUp();break;case"Home":(yn=xe.value)==null||yn.moveCurrentItemFirst();break;case"End":(Ot=xe.value)==null||Ot.moveCurrentItemLast();break;case"ArrowLeft":{(ze=xe.value)!=null&&ze.closeSelfAndActiveParent()||(Kt=(mt=_e.value).onKeyFocusMoveLeft)==null||Kt.call(mt);break}case"ArrowRight":(ut=xe.value)!=null&&ut.openCurrentItemSubMenu()||(_n=(bn=_e.value).onKeyFocusMoveRight)==null||_n.call(bn);break;case"Enter":(ct=xe.value)==null||ct.triggerCurrentItemClick(Le);break;default:dn=!1;break}dn&&xe.value&&(Le.stopPropagation(),Le.preventDefault())}function qe(){_e.value.closeWhenScroll!==!1&&Be()}function je(Le){vt(Le.target,Le)}function vt(Le,Ze){for(var st,$t;Le;){if(Le.classList&&Le.classList.contains("mx-menu-host"))return;Le=Le.parentNode}_e.value.clickCloseOnOutside!==!1?(Ge(),Be()):($t=(st=_e.value).onClickOnOutside)==null||$t.call(st,Ze)}return n.provide("globalOptions",_e),n.provide("globalCloseMenu",Be),n.provide("globalIsFullScreenContainer",he.isFullScreenContainer),n.provide("globalHasSlot",Le=>be[Le]!==void 0),n.provide("globalRenderSlot",(Le,Ze)=>n.renderSlot(be,Le,{...Ze},()=>[n.h("span","Render slot failed")],!1)),n.provide("menuContext",{zIndex:_e.value.zIndex||d.defaultZindex,container:Ve.value,adjustPadding:{x:0,y:0},getParentAbsY:()=>_e.value.x,getParentAbsX:()=>_e.value.y,getZoom:()=>_e.value.zoom||d.defaultZoom,getParentX:()=>0,getParentY:()=>0,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[_e.value.x,_e.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),le(ge),(Le,Ze)=>(n.openBlock(),n.createElementBlock("div",se,[n.unref(_e).menuTransitionProps?(n.openBlock(),n.createBlock(n.Transition,n.mergeProps({key:0,appear:""},n.unref(_e).menuTransitionProps,{onAfterLeave:Ze[0]||(Ze[0]=st=>ve("closeAnimFinished"))}),{default:n.withCtx(()=>[n.unref(Ie)?(n.openBlock(),n.createBlock(ie,{key:0,ref_key:"submenuInstance",ref:ye,class:"mx-menu-host",items:n.unref(_e).items,adjustPosition:n.unref(_e).adjustPosition,maxWidth:n.unref(_e).maxWidth||n.unref(d).defaultMaxWidth,minWidth:n.unref(_e).minWidth||n.unref(d).defaultMinWidth,direction:n.unref(_e).direction||n.unref(d).defaultDirection},{default:n.withCtx(()=>[n.renderSlot(Le.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):n.createCommentVNode("",!0)]),_:3},16)):n.unref(Ie)?(n.openBlock(),n.createBlock(ie,{key:1,ref_key:"submenuInstance",ref:ye,class:"mx-menu-host",items:n.unref(_e).items,adjustPosition:n.unref(_e).adjustPosition,maxWidth:n.unref(_e).maxWidth||n.unref(d).defaultMaxWidth,minWidth:n.unref(_e).minWidth||n.unref(d).defaultMinWidth,direction:n.unref(_e).direction||n.unref(d).defaultDirection},{default:n.withCtx(()=>[n.renderSlot(Le.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):n.createCommentVNode("",!0)]))}}),ce=n.defineComponent({name:"ContextMenu",emits:["update:show","close"],props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},setup(X,le){const{options:de,show:he}=n.toRefs(X),ve=n.ref(null);return le.expose({closeMenu:()=>le.emit("update:show",!1),isClosed:()=>!he.value,getMenuRef:()=>{var be;return(be=ve.value)==null?void 0:be.getMenuRef()},getMenuDimensions:()=>{var be;return((be=ve.value)==null?void 0:be.getMenuDimensions())??{width:0,height:0}}}),()=>{const{isNew:be,container:ye,eleId:_e}=_(de.value);return[n.h(n.Teleport,{to:`#${_e}`},[n.h(ae,{ref:ve,options:de,show:he,container:ye,isFullScreenContainer:!be,onClose:Ie=>{var Ve,ge;le.emit("update:show",!1),le.emit("close"),(ge=(Ve=de.value).onClose)==null||ge.call(Ve,Ie)}},le.slots)])]}}}),T=n.defineComponent({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(X,le){const de=n.inject("globalOptions"),{adjustSubMenuPosition:he,maxWidth:ve,minWidth:be}=n.toRefs(X),ye=typeof he.value<"u"?he.value:de.value.adjustPosition,_e=n.ref(),Ie=n.ref();return le.expose({getSubMenuRef:()=>_e.value,getMenuItemRef:()=>Ie.value}),()=>n.h(W,{...X,ref:Ie,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof le.slots.default!==void 0},le.slots.default?{submenu:()=>n.h(ie,{ref:_e,maxWidth:ve.value,minWidth:be.value,adjustPosition:ye},{default:le.slots.default})}:void 0)}});function M(X,le,de,he){const ve=n.ref(!0),be=n.h(ae,{options:X,show:ve,container:le,isFullScreenContainer:!de,onCloseAnimFinished:()=>{n.render(null,le)},onClose:ye=>{var _e;(_e=X.onClose)==null||_e.call(X,ye),ve.value=!1}},he);return n.render(be,le),be.component}function B(X,le){const de=_(X);return M(X,de.container,de.isNew,le).exposed}const K={install(X){X.config.globalProperties.$contextmenu=B,X.component("ContextMenu",ce),X.component("ContextMenuItem",W),X.component("ContextMenuGroup",T),X.component("ContextMenuSperator",j),X.component("ContextMenuSeparator",j),X.component("ContextSubMenu",ie)},showContextMenu(X,le){return B(X,le)},isAnyContextMenuOpen(){return o()},closeContextMenu:a,transformMenuPosition:f},z={},U={class:"mx-menu-bar-icon-menu",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},Y=[n.createElementVNode("path",{d:"M133.310936 296.552327l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949 0-19.781623-15.997312-35.950949-35.950949-35.950949L133.310936 224.650428c-19.781623 0-35.950949 16.169326-35.950949 35.950949C97.359987 280.383 113.529313 296.552327 133.310936 296.552327z"},null,-1),n.createElementVNode("path",{d:"M890.51705 476.135058 133.310936 476.135058c-19.781623 0-35.950949 16.169326-35.950949 35.950949 0 19.781623 16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949C926.467999 492.304384 910.298673 476.135058 890.51705 476.135058z"},null,-1),n.createElementVNode("path",{d:"M890.51705 727.447673 133.310936 727.447673c-19.781623 0-35.950949 15.997312-35.950949 35.950949s16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-15.997312 35.950949-35.950949S910.298673 727.447673 890.51705 727.447673z"},null,-1)];function te(X,le){return n.openBlock(),n.createElementBlock("svg",U,Y)}const re=g(z,[["render",te]]),ee=["onClick","onMouseenter"],ue=n.defineComponent({__name:"MenuBar",props:{options:{type:Object,default:null}},setup(X){const le=X,de=n.ref(),he=n.ref(!1),ve=n.ref([]),be=n.ref(null);function ye(){he.value=!0}function _e(){he.value=!1}n.onMounted(()=>{ve.value=le.options.items||[]}),n.watch(()=>le.options,()=>{ve.value=le.options.items||[]});let Ie=null,Ve=-1;function ge(){Ve0?Ve--:Ve=ve.value.length-1,Be(Ve,ve.value[Ve])}function Ue(xe){const Me=le.options.barPopDirection??"bl";let qe=0,je=0;return Me.startsWith("b")?je=u(xe)+xe.offsetHeight:Me.startsWith("t")?je=u(xe):je=u(xe)+xe.offsetHeight/2,Me.endsWith("l")?qe=c(xe):Me.startsWith("r")?qe=c(xe)+xe.offsetWidth:qe=c(xe)+xe.offsetWidth/2,{x:qe,y:je}}function Be(xe,Me){var qe;if(Ve=xe,!Me.children)return;Ie&&(Ie.closeMenu(),Ie=null,he.value=!0),be.value=Me;const je=(qe=de.value)==null?void 0:qe.children[xe];if(je){const{x:vt,y:Le}=Ue(je);Ie=K.showContextMenu({...le.options,items:Me.children,x:vt,y:Le,onKeyFocusMoveLeft(){Ke()},onKeyFocusMoveRight(){ge()},onClose(){be.value==Me&&(he.value=!1,be.value=null)}})}}function pt(){Ve=0;const xe=de.value;if(xe){const{x:Me,y:qe}=Ue(xe);Ie=K.showContextMenu({...le.options,x:Me,y:qe})}}function ft(xe,Me){Me?(he.value=!0,Be(xe,Me),Me.onClick&&(Me.clickableWhenHasChildren===!0&&Me.children&&Me.children.length>0||!Me.children||Me.children.length===0)&&Me.onClick()):pt()}function Ge(xe,Me){he.value&&Be(xe,Me)}return(xe,Me)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["mx-menu-bar",X.options.theme??"",X.options.mini?"mini":""]),onFocus:ye,onBlur:_e},[n.renderSlot(xe.$slots,"prefix"),X.options.mini?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"menuBarContent",ref:de,class:"mx-menu-bar-content"},[n.createElementVNode("div",{class:"mx-menu-bar-item",onClick:Me[0]||(Me[0]=qe=>ft(0,null))},[n.createVNode(re)])],512)):(n.openBlock(),n.createElementBlock("div",{key:1,ref_key:"menuBarContent",ref:de,class:"mx-menu-bar-content"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(ve.value,(qe,je)=>(n.openBlock(),n.createElementBlock("div",{key:je,class:n.normalizeClass(["mx-menu-bar-item",qe==be.value?"active":""]),onClick:vt=>ft(je,qe),onMouseenter:vt=>Ge(je,qe)},n.toDisplayString(qe.label),43,ee))),128))],512)),n.renderSlot(xe.$slots,"suffix")],34))}});r.ContextMenu=ce,r.ContextMenuGroup=T,r.ContextMenuItem=W,r.ContextMenuSeparator=j,r.MenuBar=ue,r.default=K,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})(au,au.exports);var pv=au.exports;const ma=nc(pv),lO={key:0,width:"16",height:"16",viewBox:"0 0 32 32"},sO=ke("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z"},null,-1),aO=[sO],uO={key:1,width:"16",height:"16",viewBox:"0 0 24 24"},cO=ke("path",{d:"M14 20v-2h2.6l-3.2-3.2l1.425-1.425L18 16.55V14h2v6Zm-8.6 0L4 18.6L16.6 6H14V4h6v6h-2V7.4Zm3.775-9.425L4 5.4L5.4 4l5.175 5.175Z"},null,-1),fO=[cO],dO={key:2,width:"16",height:"16",viewBox:"0 0 24 24"},hO=ke("path",{d:"M12 17q-2.075 0-3.537-1.463Q7 14.075 7 12t1.463-3.538Q9.925 7 12 7t3.538 1.462Q17 9.925 17 12q0 2.075-1.462 3.537Q14.075 17 12 17ZM2 13q-.425 0-.712-.288Q1 12.425 1 12t.288-.713Q1.575 11 2 11h2q.425 0 .713.287Q5 11.575 5 12t-.287.712Q4.425 13 4 13Zm18 0q-.425 0-.712-.288Q19 12.425 19 12t.288-.713Q19.575 11 20 11h2q.425 0 .712.287q.288.288.288.713t-.288.712Q22.425 13 22 13Zm-8-8q-.425 0-.712-.288Q11 4.425 11 4V2q0-.425.288-.713Q11.575 1 12 1t.713.287Q13 1.575 13 2v2q0 .425-.287.712Q12.425 5 12 5Zm0 18q-.425 0-.712-.288Q11 22.425 11 22v-2q0-.425.288-.712Q11.575 19 12 19t.713.288Q13 19.575 13 20v2q0 .425-.287.712Q12.425 23 12 23ZM5.65 7.05L4.575 6q-.3-.275-.288-.7q.013-.425.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7q0 .4-.275.7q-.275.3-.687.287q-.413-.012-.713-.287ZM18 19.425l-1.05-1.075q-.275-.3-.275-.712q0-.413.275-.688q.275-.3.688-.287q.412.012.712.287L19.425 18q.3.275.288.7q-.013.425-.288.725q-.3.3-.725.3t-.7-.3ZM16.95 7.05q-.3-.275-.287-.688q.012-.412.287-.712L18 4.575q.275-.3.7-.288q.425.013.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275q-.4 0-.7-.275ZM4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.713-.275q.412 0 .687.275q.3.275.288.688q-.013.412-.288.712L6 19.425q-.275.3-.7.287q-.425-.012-.725-.287Z"},null,-1),pO=[hO],vO={key:3,width:"16",height:"16",viewBox:"0 0 24 24"},gO=ke("path",{d:"M12 21q-3.75 0-6.375-2.625T3 12q0-3.75 2.625-6.375T12 3q.35 0 .688.025q.337.025.662.075q-1.025.725-1.637 1.887Q11.1 6.15 11.1 7.5q0 2.25 1.575 3.825Q14.25 12.9 16.5 12.9q1.375 0 2.525-.613q1.15-.612 1.875-1.637q.05.325.075.662Q21 11.65 21 12q0 3.75-2.625 6.375T12 21Z"},null,-1),mO=[gO],yO={key:4,width:"16",height:"16",viewBox:"0 0 24 24"},bO=ke("path",{d:"M20 19V7H4v12h16m0-16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16m-7 14v-2h5v2h-5m-3.42-4L5.57 9H8.4l3.3 3.3c.39.39.39 1.03 0 1.42L8.42 17H5.59l3.99-4Z"},null,-1),_O=[bO],wO={key:5,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-file-earmark",viewBox:"0 0 16 16"},EO=ke("path",{d:"M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"},null,-1),xO=[EO],SO={key:6,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},OO=ke("path",{fill:"currentColor",d:"M21 7v12q0 .825-.587 1.413T19 21H5q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h12zm-9 11q1.25 0 2.125-.875T15 15t-.875-2.125T12 12t-2.125.875T9 15t.875 2.125T12 18m-6-8h9V6H6z"},null,-1),NO=[OO],AO={key:7,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-folder2-open",viewBox:"0 0 16 16"},TO=ke("path",{d:"M1 3.5A1.5 1.5 0 0 1 2.5 2h2.764c.958 0 1.76.56 2.311 1.184C7.985 3.648 8.48 4 9 4h4.5A1.5 1.5 0 0 1 15 5.5v.64c.57.265.94.876.856 1.546l-.64 5.124A2.5 2.5 0 0 1 12.733 15H3.266a2.5 2.5 0 0 1-2.481-2.19l-.64-5.124A1.5 1.5 0 0 1 1 6.14zM2 6h12v-.5a.5.5 0 0 0-.5-.5H9c-.964 0-1.71-.629-2.174-1.154C6.374 3.334 5.82 3 5.264 3H2.5a.5.5 0 0 0-.5.5zm-.367 1a.5.5 0 0 0-.496.562l.64 5.124A1.5 1.5 0 0 0 3.266 14h9.468a1.5 1.5 0 0 0 1.489-1.314l.64-5.124A.5.5 0 0 0 14.367 7z"},null,-1),kO=[TO],CO={key:8,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},MO=ke("path",{fill:"currentColor",d:"M15 12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.172a3 3 0 0 0 2.12-.879l.83-.828A1 1 0 0 1 6.827 3h2.344a1 1 0 0 1 .707.293l.828.828A3 3 0 0 0 12.828 5H14a1 1 0 0 1 1 1zM2 4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-1.172a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 9.172 2H6.828a2 2 0 0 0-1.414.586l-.828.828A2 2 0 0 1 3.172 4z"},null,-1),PO=ke("path",{fill:"currentColor",d:"M8 11a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5m0 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7M3 6.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0"},null,-1),IO=[MO,PO],RO={key:9,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},LO=ke("path",{fill:"currentColor",d:"m12 17l4-4l-1.4-1.4l-1.6 1.55V9h-2v4.15L9.4 11.6L8 13zm-6 5q-.825 0-1.412-.587T4 20V8l6-6h8q.825 0 1.413.588T20 4v16q0 .825-.587 1.413T18 22zm0-2h12V4h-7.15L6 8.85zm0 0h12z"},null,-1),DO=[LO],wl={__name:"Icon",props:{name:{type:String,required:!0}},setup(e){return(t,r)=>(me(),Se(We,null,[e.name==="reset"?(me(),Se("svg",lO,aO)):tt("",!0),e.name==="update"?(me(),Se("svg",uO,fO)):tt("",!0),e.name==="sun"?(me(),Se("svg",dO,pO)):tt("",!0),e.name==="moon"?(me(),Se("svg",vO,mO)):tt("",!0),e.name==="log"?(me(),Se("svg",yO,_O)):tt("",!0),e.name==="new-file"?(me(),Se("svg",wO,xO)):tt("",!0),e.name==="save"?(me(),Se("svg",SO,NO)):tt("",!0),e.name==="load"?(me(),Se("svg",AO,kO)):tt("",!0),e.name==="camera"?(me(),Se("svg",CO,IO)):e.name==="restore"?(me(),Se("svg",RO,DO)):tt("",!0)],64))}},$O={key:0,class:"label-renaming-field"},BO="Delete",zf=50,qO={__name:"App",setup(e){const{onInit:t,screenToFlowCoordinate:r,onConnect:n,onNodesInitialized:i,onNodeDrag:o,updateNode:l,findNode:s,isNodeIntersecting:a,getIntersectingNodes:d,addNodes:u,onNodeDoubleClick:c,onNodesChange:f,applyNodeChanges:h,onNodeContextMenu:b,removeNodes:m,addEdges:_,onEdgeDoubleClick:y,onEdgesChange:v,applyEdgeChanges:g,onEdgeContextMenu:p,removeEdges:E,onSelectionContextMenu:S,onPaneContextMenu:A,toObject:k,fromObject:I,getNodes:x,getEdges:w,vueFlowRef:N}=lt();let P=!0;const C=Tx(),L=Pe(),D=Pe(!1),V=BS(),Q=Pe(null),W=[],$=[];t(B=>{B.fitView()}),n(_),Dt(()=>{window.addEventListener("keydown",R)}),Br(()=>{window.removeEventListener("keydown",R)});const R=B=>{J(B)};function F(){const B=JSON.stringify(k());W.push(B),W.length>zf&&W.shift(),Z()}rr("pushToUndoStack",F);function j(){const B=JSON.stringify(k());$.push(B),$.length>zf&&$.shift()}function Z(){$.value=[]}function G(){if(console.log(W.length),W.length>0){j();const B=W.pop();return I(JSON.parse(B)),!0}return!1}function H(){if($.length>0){F();const B=$.pop();return I(JSON.parse(B)),!0}return!1}const J=B=>{B.ctrlKey&&B.key==="z"?G()&&B.preventDefault():(B.ctrlKey&&B.key==="y"||B.ctrlKey&&B.shiftKey&&B.key==="z")&&H()&&B.preventDefault()};f(async B=>{const K=[];for(const z of B)z.type==="remove"?await oe(z)&&(F(),V.deleteComponents(x,z.id),K.push(z)):K.push(z);P=!0,h(K)}),v(async B=>{const K=[];for(const z of B)z.type==="select"&&(F(JSON.stringify(k())),ie()),z.type==="remove"?await oe(z)&&(F(JSON.stringify(k())),K.push(z)):K.push(z);P=!0,g(K)});async function oe(B){return P?await C.confirmDefault(B.id):!0}y(({mouseEvent:B,edge:K})=>{Q.value=K,K.sourceX,K.sourceY});const ie=()=>{Q&&(Q.value=null)};c(B=>{let K=B.event,z=B.node;K.preventDefault();let U=[{label:"Delete Node",onClick:()=>{m(z.id)}}];if(z.type=="component"){let te=z.data.attributes;if(te)for(let re=0;re{z.data.attributes.splice(re,1)}})}}let Y=z.data.components;if(Y)for(let te=0;te{z.data.components.splice(te,1)}})}ma.showContextMenu({x:K.x,y:K.y,items:U})}),p(B=>{let K=B.event,z=B.edge;K.preventDefault(),ma.showContextMenu({x:K.x,y:K.y,items:[{label:"Delete Connection",onClick:()=>{E(z.id)}}]})}),A(B=>{B.preventDefault(),ma.showContextMenu({x:B.x,y:B.y,items:[{label:"Create New...",children:[{label:"Text Area Node",onClick:()=>{se(B,"text-area")}},{label:"Text Field Node",onClick:()=>{se(B,"text-field")}},{label:"Component Node",onClick:()=>{se(B,"component")}},{label:"Note",onClick:()=>{se(B,"note")}}]}]})}),S(B=>{B.event.preventDefault()});function se(B,K){const z=r({x:B.x,y:B.y}),U=Yr(),Y={id:U,type:K,position:z,data:{label:""}},{off:te}=i(()=>{l(U,re=>({position:{x:re.position.x-re.dimensions.width/2,y:re.position.y-re.dimensions.height/2}})),te()});u(Y)}o(({node:B})=>{const K=x,U=d(B).map(Y=>Y.id);D.value=a(B,ae.value);for(const Y of K.value){const te=U.includes(Y.id);if(B==Y){console.log("Node "+Y.id);continue}l(Y.id,{class:te?"intersecting":""}),te&&B.type=="component"&&V.connectComponent(Y,B)}});const ae=Re(()=>{if(!L.value)return{x:0,y:0,width:0,height:0};const{left:B,top:K,width:z,height:U}=L.value.$el.getBoundingClientRect();return{...r({x:B,y:K}),width:z,height:U}});async function ce(){await C.confirmReset()&&(P=!1,m(x.value),vueFlowInstance.fitView())}function T(){const B=JSON.stringify(k(),null,2),K=new Blob([B],{type:"application/json"}),z=URL.createObjectURL(K),U=document.createElement("a");U.href=z,U.download="state.json",U.click(),URL.revokeObjectURL(z)}async function M(){try{const[B]=await window.showOpenFilePicker({types:[{description:"JSON Files",accept:{"application/json":[".json"]}}]}),z=await(await B.getFile()).text(),U=JSON.parse(z);I(U)}catch(B){console.error("Failed to open file:",B)}}return(B,K)=>(me(),Se(We,null,[Ee(pe(IE),{nodes:pe(oo),edges:pe(Sx),"apply-default":!1,"delete-key-code":BO,"default-viewport":{zoom:1.5},"min-zoom":.2,"max-zoom":4},{"node-resizable":yt(z=>[Ee(RS,{data:z.data},null,8,["data"])]),"node-text-field":yt(z=>[Ee($S,{id:z.id,data:z.data},null,8,["id","data"])]),"node-text-area":yt(z=>[Ee(US,{id:z.id,data:z.data},null,8,["id","data"])]),"node-component":yt(z=>[Ee(QS,{id:z.id,data:z.data},null,8,["id","data"])]),"node-note":yt(z=>[Ee(rO,{id:z.id,data:z.data},null,8,["id","data"])]),default:yt(()=>[Ee(pe(jE),{"pattern-color":"#aaa",gap:16}),Ee(Ix),Ee(pe(bx),{position:"top-left"},{default:yt(()=>[Ee(pe(xr),{title:"New Project",onClick:ce},{default:yt(()=>[Ee(wl,{name:"new-file"})]),_:1}),Ee(pe(xr),{title:"Save Project",onClick:T},{default:yt(()=>[Ee(wl,{name:"save"})]),_:1}),Ee(pe(xr),{title:"Load Project",onClick:M},{default:yt(()=>[Ee(wl,{name:"load"})]),_:1}),Ee(pe(xr),{title:"Log `toObject` to Console",onClick:K[0]||(K[0]=z=>{console.log(pe(k)())})},{default:yt(()=>[Ee(wl,{name:"log"})]),_:1})]),_:1})]),_:1},8,["nodes","edges"]),Q.value?(me(),Se("div",$O,[oi(ke("input",{id:"label-editor",type:"text","onUpdate:modelValue":K[1]||(K[1]=z=>Q.value.label=z),onFocusout:ie,onKeydown:[Ha(ie,["enter"]),Ha(ie,["escape"])]},null,544),[[Fn,Q.value.label]])])):tt("",!0)],64))}};var vv={exports:{}};/*! +Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class It extends Error{constructor(t,...r){var n;super((n=Of[t])==null?void 0:n.call(Of,...r)),this.name="VueFlowError",this.code=t,this.args=r}}function Yu(e){return"clientX"in e}function Ar(e,t){var r,n;const i=Yu(e),o=i?e.clientX:(r=e.touches)==null?void 0:r[0].clientX,l=i?e.clientY:(n=e.touches)==null?void 0:n[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:l-((t==null?void 0:t.top)??0)}}const Jl=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function G_(e){var t,r;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((r=e.dimensions)==null?void 0:r.height)??e.height??0}}function Bp(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function da(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Nf(e,t,r,n){const i=[];for(const o of t[r]||[])if(`${e.id}-${o.id}-${r}`!==n){const{x:l,y:s}=Ql(e,o);i.push({id:o.id||null,type:r,nodeId:e.id,x:l,y:s})}return i}function Y_(e,t,r,n,i,o){const{x:l,y:s}=Ar(e),d=t.elementsFromPoint(l,s).find(b=>b.classList.contains("vue-flow__handle"));if(d){const b=d.getAttribute("data-nodeid");if(b){const m=Zu(void 0,d),_=d.getAttribute("data-handleid"),y=o({nodeId:b,id:_,type:m});if(y){const v=i.find(g=>g.nodeId===b&&g.type===m&&g.id===_);return{handle:{id:_,type:m,nodeId:b,x:(v==null?void 0:v.x)||r.x,y:(v==null?void 0:v.y)||r.y},validHandleResult:y}}}}let u=[],c=Number.POSITIVE_INFINITY;for(const b of i){const m=Math.sqrt((b.x-r.x)**2+(b.y-r.y)**2);if(m<=n){const _=o(b);m<=c&&(mb.isValid),h=u.some(({handle:b})=>b.type==="target");return u.find(({handle:b,validHandleResult:m})=>h?b.type==="target":f?m.isValid:!0)||u[0]}function Af(e,t,r,n,i,o,l,s,a,d,u){const c=o==="target",f=s.querySelector(`.vue-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),{x:h,y:b}=Ar(e),m=s.elementFromPoint(h,b),_=m!=null&&m.classList.contains("vue-flow__handle")?m:f,y=Bp();if(_){y.handleDomNode=_;const v=Zu(void 0,_),g=_.getAttribute("data-nodeid"),p=_.getAttribute("data-handleid"),E=_.classList.contains("connectable"),S=_.classList.contains("connectableend"),A={source:c?g:n,sourceHandle:c?p:i,target:c?n:g,targetHandle:c?i:p};y.connection=A,E&&S&&(r===ui.Strict?c&&v==="source"||!c&&v==="target":g!==n||p!==i)&&(y.isValid=l(A,{edges:a,nodes:d,sourceNode:u(A.source),targetNode:u(A.target)}),y.endHandle={nodeId:g,handleId:p,type:v,position:y.isValid?_.getAttribute("data-handlepos"):null})}return y}function Z_({nodes:e,nodeId:t,handleId:r,handleType:n}){const i=[];for(let o=0;o{const s=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(s.left-r.left)/n,y:(s.top-r.top)/n,...Ss(l)}})}function ru(e,t,r,n,i,o=!1,l){i.value=!1,e.selected?(o||e.selected&&t)&&(n([e]),Xt(()=>{l.blur()})):r([e])}function Et(e){return typeof pe(e)<"u"}function J_(e,t,r,n){if(!e||!e.source||!e.target)return r(new It(xt.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let i;return Lr(e)?i=e:i={...e,id:kp(e)},i=Ap(i,void 0,n),B_(i,t)?!1:i}function ew(e,t,r,n,i,o){if(!t.source||!t.target)return o(new It(xt.EDGE_INVALID,e.id)),!1;const l=n(e.id);if(!l)return o(new It(xt.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...a}=e,d={...a,id:i?kp(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return r.splice(r.indexOf(l),1,d),d}function kf(e,t,r){const n={},i=[];for(let o=0;os.id===o.parentNode);o.parentNode&&!l&&r(new It(xt.NODE_MISSING_PARENT,o.id,o.parentNode)),(o.parentNode||n[o.id])&&(n[o.id]&&(o.isParent=!0),l&&(l.isParent=!0))}return i}function Cf(e,t){e.clear();for(const r of t){const{id:n,source:i,target:o,sourceHandle:l=null,targetHandle:s=null}=r,a=`${i}-source-${l}`,d=`${o}-target-${s}`,u=e.get(a)||new Map,c=e.get(d)||new Map,f=Or({edgeId:n,source:i,target:o,sourceHandle:l,targetHandle:s});e.set(a,u.set(`${o}-${s}`,f)),e.set(d,c.set(`${i}-${l}`,f))}}function Mf(e,t,r,n,i,o,l,s){const a=[];for(const d of e){const u=Lr(d)?d:J_(d,s,i,o);if(!u)continue;const c=r(u.source),f=r(u.target);if(!c||!f){i(new It(xt.EDGE_SOURCE_TARGET_MISSING,u.id,u.source,u.target));continue}if(!c){i(new It(xt.EDGE_SOURCE_MISSING,u.id,u.source));continue}if(!f){i(new It(xt.EDGE_TARGET_MISSING,u.id,u.target));continue}if(t&&!t(u,{edges:s,nodes:l,sourceNode:c,targetNode:f})){i(new It(xt.EDGE_INVALID,u.id));continue}const h=n(u.id);a.push({...Ap(u,h,o),sourceNode:c,targetNode:f})}return a}const Pf=Symbol("vueFlow"),Xu=Symbol("nodeId"),Fp=Symbol("nodeRef"),tw=Symbol("edgeId"),nw=Symbol("edgeRef"),Ns=Symbol("slots");function Hp(e){const{vueFlowRef:t,snapToGrid:r,snapGrid:n,noDragClassName:i,nodes:o,nodeExtent:l,nodeDragThreshold:s,viewport:a,autoPanOnNodeDrag:d,autoPanSpeed:u,nodesDraggable:c,panBy:f,findNode:h,multiSelectionActive:b,nodesSelectionActive:m,selectNodesOnDrag:_,removeSelectedElements:y,addSelectedNodes:v,updateNodePositions:g,emits:p}=lt(),{onStart:E,onDrag:S,onStop:A,onClick:k,el:I,disabled:x,id:w,selectable:N,dragHandle:P}=e,C=Pe(!1);let L=[],D,V=null,Q={x:void 0,y:void 0},W={x:0,y:0},$=null,R=!1,F=0,j=!1;const Z=jp(),G=({x:ae,y:ce})=>{Q={x:ae,y:ce};let T=!1;if(L=L.map(M=>{const B={x:ae-M.distance.x,y:ce-M.distance.y};r.value&&(B.x=n.value[0]*Math.round(B.x/n.value[0]),B.y=n.value[1]*Math.round(B.y/n.value[1]));const{computedPosition:K}=Gu(M,B,p.error,l.value,M.parentNode?h(M.parentNode):void 0);return T=T||M.position.x!==K.x||M.position.y!==K.y,M.position=K,M}),!!T&&(g(L,!0,!0),C.value=!0,$)){const[M,B]=fa({id:w,dragItems:L,findNode:h});S({event:$,node:M,nodes:B})}},H=()=>{if(!V)return;const[ae,ce]=Dp(W,V,u.value);if(ae!==0||ce!==0){const T={x:(Q.x??0)-ae/a.value.zoom,y:(Q.y??0)-ce/a.value.zoom};f({x:ae,y:ce})&&G(T)}F=requestAnimationFrame(H)},J=(ae,ce)=>{R=!0;const T=h(w);!_.value&&!b.value&&T&&(T.selected||y()),T&&et(N)&&_.value&&ru(T,b.value,v,y,m,!1,ce);const M=Z(ae);if(Q=M,L=j_(o.value,c.value,M,h,w),L.length){const[B,K]=fa({id:w,dragItems:L,findNode:h});E({event:ae.sourceEvent,node:B,nodes:K})}},oe=(ae,ce)=>{var T;ae.sourceEvent.type==="touchmove"&&ae.sourceEvent.touches.length>1||(s.value===0&&J(ae,ce),Q=Z(ae),V=((T=t.value)==null?void 0:T.getBoundingClientRect())||null,W=Ar(ae.sourceEvent,V))},ie=(ae,ce)=>{const T=Z(ae);if(!j&&R&&d.value&&(j=!0,H()),!R){const M=T.xSnapped-(Q.x??0),B=T.ySnapped-(Q.y??0);Math.sqrt(M*M+B*B)>s.value&&J(ae,ce)}(Q.x!==T.xSnapped||Q.y!==T.ySnapped)&&L.length&&R&&($=ae.sourceEvent,W=Ar(ae.sourceEvent,V),G(T))},se=ae=>{if(!R){const ce=Z(ae),T=ce.xSnapped-(Q.x??0),M=ce.ySnapped-(Q.y??0),B=Math.sqrt(T*T+M*M);B!==0&&B<=s.value&&(k==null||k(ae.sourceEvent));return}if(C.value=!1,j=!1,R=!1,cancelAnimationFrame(F),L.length){g(L,!1,!1);const[ce,T]=fa({id:w,dragItems:L,findNode:h});A({event:ae.sourceEvent,node:ce,nodes:T})}};return $e([()=>et(x),I],([ae,ce],T,M)=>{if(ce){const B=xn(ce);ae||(D=q1().on("start",K=>oe(K,ce)).on("drag",K=>ie(K,ce)).on("end",K=>se(K)).filter(K=>{const z=K.target,U=et(P);return!K.button&&(!i.value||!xf(z,`.${i.value}`,ce)&&(!U||xf(z,U,ce)))}),B.call(D)),M(()=>{B.on(".drag",null),D&&(D.on("start",null),D.on("drag",null),D.on("end",null))})}}),C}function rw(){return{doubleClick:we(),click:we(),mouseEnter:we(),mouseMove:we(),mouseLeave:we(),contextMenu:we(),updateStart:we(),update:we(),updateEnd:we()}}function iw(e,t){const r=rw();return r.doubleClick.on(n=>{var i,o;t.edgeDoubleClick(n),(o=(i=e.events)==null?void 0:i.doubleClick)==null||o.call(i,n)}),r.click.on(n=>{var i,o;t.edgeClick(n),(o=(i=e.events)==null?void 0:i.click)==null||o.call(i,n)}),r.mouseEnter.on(n=>{var i,o;t.edgeMouseEnter(n),(o=(i=e.events)==null?void 0:i.mouseEnter)==null||o.call(i,n)}),r.mouseMove.on(n=>{var i,o;t.edgeMouseMove(n),(o=(i=e.events)==null?void 0:i.mouseMove)==null||o.call(i,n)}),r.mouseLeave.on(n=>{var i,o;t.edgeMouseLeave(n),(o=(i=e.events)==null?void 0:i.mouseLeave)==null||o.call(i,n)}),r.contextMenu.on(n=>{var i,o;t.edgeContextMenu(n),(o=(i=e.events)==null?void 0:i.contextMenu)==null||o.call(i,n)}),r.updateStart.on(n=>{var i,o;t.edgeUpdateStart(n),(o=(i=e.events)==null?void 0:i.updateStart)==null||o.call(i,n)}),r.update.on(n=>{var i,o;t.edgeUpdate(n),(o=(i=e.events)==null?void 0:i.update)==null||o.call(i,n)}),r.updateEnd.on(n=>{var i,o;t.edgeUpdateEnd(n),(o=(i=e.events)==null?void 0:i.updateEnd)==null||o.call(i,n)}),Object.entries(r).reduce((n,[i,o])=>(n.emit[i]=o.trigger,n.on[i]=o.on,n),{emit:{},on:{}})}function jp(){const{viewport:e,snapGrid:t,snapToGrid:r}=lt();return({sourceEvent:n})=>{const i=n.touches?n.touches[0].clientX:n.clientX,o=n.touches?n.touches[0].clientY:n.clientY,l={x:(i-e.value.x)/e.value.zoom,y:(o-e.value.y)/e.value.zoom};return{xSnapped:r.value?t.value[0]*Math.round(l.x/t.value[0]):l.x,ySnapped:r.value?t.value[1]*Math.round(l.y/t.value[1]):l.y,...l}}}function gl(){return!0}function zp({handleId:e,nodeId:t,type:r,isValidConnection:n,edgeUpdaterType:i,onEdgeUpdate:o,onEdgeUpdateEnd:l}){const{vueFlowRef:s,connectionMode:a,connectionRadius:d,connectOnClick:u,connectionClickStartHandle:c,nodesConnectable:f,autoPanOnConnect:h,autoPanSpeed:b,findNode:m,panBy:_,startConnection:y,updateConnection:v,endConnection:g,emits:p,viewport:E,edges:S,nodes:A,isValidConnection:k}=lt();let I=null,x=!1,w=null,N=null;function P(L){var D;const V=et(r)==="target",Q=Yu(L),W=gf(L.target);if(Q&&L.button===0||!Q){let $=function(K){ce=Ar(K,se);const{handle:z,validHandleResult:U}=Y_(K,W,Xl(ce,E.value,!1,[1,1]),d.value,M,Y=>Af(K,Y,a.value,et(t),et(e),V?"target":"source",j,W,S.value,A.value,m));if(Z=z,T||(B(),T=!0),I=U.connection,x=U.isValid,w=U.handleDomNode,!(x&&Z&&(N!=null&&N.endHandle)&&U.endHandle&&N.endHandle.type===U.endHandle.type&&N.endHandle.nodeId===U.endHandle.nodeId&&N.endHandle.handleId===U.endHandle.handleId)){if(v(Z&&x?Cp({x:Z.x,y:Z.y},E.value):ce,U.endHandle,X_(!!Z,x)),N=U,!Z&&!x&&!w)return da(ae);I&&I.source!==I.target&&w&&(da(ae),ae=w,w.classList.add("connecting","vue-flow__handle-connecting"),w.classList.toggle("valid",x),w.classList.toggle("vue-flow__handle-valid",x))}},R=function(K){(Z||w)&&I&&x&&(o?o(K,I):p.connect(I)),p.connectEnd(K),i&&(l==null||l(K)),da(ae),cancelAnimationFrame(G),g(K),T=!1,x=!1,I=null,w=null,W.removeEventListener("mousemove",$),W.removeEventListener("mouseup",R),W.removeEventListener("touchmove",$),W.removeEventListener("touchend",R)};const F=m(et(t));let j=et(n)||k.value||gl;!j&&F&&(j=(V?F.isValidSourcePos:F.isValidTargetPos)||gl);let Z,G=0;const{x:H,y:J}=Ar(L),oe=W==null?void 0:W.elementFromPoint(H,J),ie=Zu(et(i),oe),se=(D=s.value)==null?void 0:D.getBoundingClientRect();if(!se||!ie)return;let ae,ce=Ar(L,se),T=!1;const M=Z_({nodes:A.value,nodeId:et(t),handleId:et(e),handleType:ie}),B=()=>{if(!h.value)return;const[K,z]=Dp(ce,se,b.value);_({x:K,y:z}),G=requestAnimationFrame(B)};y({nodeId:et(t),handleId:et(e),type:ie,position:(oe==null?void 0:oe.getAttribute("data-handlepos"))||Ne.Top},{x:H-se.left,y:J-se.top}),p.connectStart({event:L,nodeId:et(t),handleId:et(e),handleType:ie}),W.addEventListener("mousemove",$),W.addEventListener("mouseup",R),W.addEventListener("touchmove",$),W.addEventListener("touchend",R)}}function C(L){if(!u.value)return;const D=et(r)==="target";if(!c.value)p.clickConnectStart({event:L,nodeId:et(t),handleId:et(e)}),y({nodeId:et(t),type:et(r),handleId:et(e)},void 0,!0);else{let V=et(n)||k.value||gl;const Q=m(et(t));if(!V&&Q&&(V=(D?Q.isValidSourcePos:Q.isValidTargetPos)||gl),Q&&(typeof Q.connectable>"u"?f.value:Q.connectable)===!1)return;const W=gf(L.target),{connection:$,isValid:R}=Af(L,{nodeId:et(t),id:et(e),type:et(r)},a.value,c.value.nodeId,c.value.handleId||null,c.value.type,V,W,S.value,A.value,m),F=$.source===$.target;R&&!F&&p.connect($),p.clickConnectEnd(L),g(L,!0)}}return{handlePointerDown:P,handleClick:C}}function ow(){return vn(Xu,"")}function Vp(e){const t=e??ow()??"",r=vn(Fp,Pe(null)),{findNode:n,edges:i,emits:o}=lt(),l=n(t);return l||o.error(new It(xt.NODE_NOT_FOUND,t)),{id:t,nodeEl:r,node:l,parentNode:Re(()=>n(l.parentNode)),connectedEdges:Re(()=>Rp([l],i.value))}}function lw(){return{doubleClick:we(),click:we(),mouseEnter:we(),mouseMove:we(),mouseLeave:we(),contextMenu:we(),dragStart:we(),drag:we(),dragStop:we()}}function sw(e,t){const r=lw();return r.doubleClick.on(n=>{var i,o;t.nodeDoubleClick(n),(o=(i=e.events)==null?void 0:i.doubleClick)==null||o.call(i,n)}),r.click.on(n=>{var i,o;t.nodeClick(n),(o=(i=e.events)==null?void 0:i.click)==null||o.call(i,n)}),r.mouseEnter.on(n=>{var i,o;t.nodeMouseEnter(n),(o=(i=e.events)==null?void 0:i.mouseEnter)==null||o.call(i,n)}),r.mouseMove.on(n=>{var i,o;t.nodeMouseMove(n),(o=(i=e.events)==null?void 0:i.mouseMove)==null||o.call(i,n)}),r.mouseLeave.on(n=>{var i,o;t.nodeMouseLeave(n),(o=(i=e.events)==null?void 0:i.mouseLeave)==null||o.call(i,n)}),r.contextMenu.on(n=>{var i,o;t.nodeContextMenu(n),(o=(i=e.events)==null?void 0:i.contextMenu)==null||o.call(i,n)}),r.dragStart.on(n=>{var i,o;t.nodeDragStart(n),(o=(i=e.events)==null?void 0:i.dragStart)==null||o.call(i,n)}),r.drag.on(n=>{var i,o;t.nodeDrag(n),(o=(i=e.events)==null?void 0:i.drag)==null||o.call(i,n)}),r.dragStop.on(n=>{var i,o;t.nodeDragStop(n),(o=(i=e.events)==null?void 0:i.dragStop)==null||o.call(i,n)}),Object.entries(r).reduce((n,[i,o])=>(n.emit[i]=o.trigger,n.on[i]=o.on,n),{emit:{},on:{}})}function Up(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:r,findNode:n,snapGrid:i,snapToGrid:o,nodesDraggable:l,emits:s}=lt();return(a,d=!1)=>{const u=o.value?i.value[0]:5,c=o.value?i.value[1]:5,f=d?4:1,h=a.x*u*f,b=a.y*c*f,m=[];for(const _ of e.value)if(_.draggable||l&&typeof _.draggable>"u"){const y={x:_.computedPosition.x+h,y:_.computedPosition.y+b},{computedPosition:v}=Gu(_,y,s.error,t.value,_.parentNode?n(_.parentNode):void 0);m.push({id:_.id,position:v,from:_.position,distance:{x:a.x,y:a.y},dimensions:_.dimensions})}r(m,!0,!1)}}const ha=.1;function hr(){return Os("Viewport not initialized yet."),Promise.resolve(!1)}const aw={zoomIn:hr,zoomOut:hr,zoomTo:hr,fitView:hr,setCenter:hr,fitBounds:hr,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:hr,setTransform:hr,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function uw(e){function t(n,i){return new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleBy(pa(e.d3Selection,i,()=>{o(!0)}),n):o(!1)})}function r(n,i,o,l){return new Promise(s=>{const{x:a,y:d}=Np({x:-n,y:-i},e.translateExtent),u=$i.translate(-a,-d).scale(o);e.d3Selection&&e.d3Zoom?e.d3Zoom.transform(pa(e.d3Selection,l,()=>{s(!0)}),u):s(!1)})}return Re(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i==null?void 0:i.duration),zoomOut:i=>t(1/1.2,i==null?void 0:i.duration),zoomTo:(i,o)=>new Promise(l=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.scaleTo(pa(e.d3Selection,o==null?void 0:o.duration,()=>{l(!0)}),i):l(!1)}),setViewport:(i,o)=>r(i.x,i.y,i.zoom,o==null?void 0:o.duration),setTransform:(i,o)=>r(i.x,i.y,i.zoom,o==null?void 0:o.duration),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:ha,includeHiddenNodes:!1,duration:0})=>{var o,l;const s=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&((i==null?void 0:i.includeHiddenNodes)||!f.hidden)&&(!((o=i.nodes)!=null&&o.length)||(l=i.nodes)!=null&&l.length&&i.nodes.includes(f.id))&&s.push(f);if(!s.length)return Promise.resolve(!1);const a=Pp(s),{x:d,y:u,zoom:c}=mf(a,e.dimensions.width,e.dimensions.height,i.minZoom??e.minZoom,i.maxZoom??e.maxZoom,i.padding??ha,i.offset);return r(d,u,c,i==null?void 0:i.duration)},setCenter:(i,o,l)=>{const s=typeof(l==null?void 0:l.zoom)<"u"?l.zoom:e.maxZoom,a=e.dimensions.width/2-i*s,d=e.dimensions.height/2-o*s;return r(a,d,s,l==null?void 0:l.duration)},fitBounds:(i,o={padding:ha})=>{const{x:l,y:s,zoom:a}=mf(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding);return r(l,s,a,o==null?void 0:o.duration)},project:i=>Xl(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:o,y:l}=e.vueFlowRef.getBoundingClientRect(),s={x:i.x-o,y:i.y-l};return Xl(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:o,y:l}=e.vueFlowRef.getBoundingClientRect(),s={x:i.x+o,y:i.y+l};return Cp(s,e.viewport)}return{x:0,y:0}}}:aw)}function pa(e,t=0,r){return e.transition().duration(t).on("end",r)}function cw(e,t,r){const n=vu(!0);return n.run(()=>{const i=()=>{n.run(()=>{let m,_,y=!!(r.nodes.value.length||r.edges.value.length);m=yi([e.modelValue,()=>{var v,g;return(g=(v=e.modelValue)==null?void 0:v.value)==null?void 0:g.length}],([v])=>{v&&Array.isArray(v)&&(_==null||_.pause(),r.setElements(v),!_&&!y&&v.length?y=!0:_==null||_.resume())}),_=yi([r.nodes,r.edges,()=>r.edges.value.length,()=>r.nodes.value.length],([v,g])=>{var p;(p=e.modelValue)!=null&&p.value&&Array.isArray(e.modelValue.value)&&(m==null||m.pause(),e.modelValue.value=[...v,...g],Xt(()=>{m==null||m.resume()}))},{immediate:y}),so(()=>{m==null||m.stop(),_==null||_.stop()})})},o=()=>{n.run(()=>{let m,_,y=!!r.nodes.value.length;m=yi([e.nodes,()=>{var v,g;return(g=(v=e.nodes)==null?void 0:v.value)==null?void 0:g.length}],([v])=>{v&&Array.isArray(v)&&(_==null||_.pause(),r.setNodes(v),!_&&!y&&v.length?y=!0:_==null||_.resume())}),_=yi([r.nodes,()=>r.nodes.value.length],([v])=>{var g;(g=e.nodes)!=null&&g.value&&Array.isArray(e.nodes.value)&&(m==null||m.pause(),e.nodes.value=[...v],Xt(()=>{m==null||m.resume()}))},{immediate:y}),so(()=>{m==null||m.stop(),_==null||_.stop()})})},l=()=>{n.run(()=>{let m,_,y=!!r.edges.value.length;m=yi([e.edges,()=>{var v,g;return(g=(v=e.edges)==null?void 0:v.value)==null?void 0:g.length}],([v])=>{v&&Array.isArray(v)&&(_==null||_.pause(),r.setEdges(v),!_&&!y&&v.length?y=!0:_==null||_.resume())}),_=yi([r.edges,()=>r.edges.value.length],([v])=>{var g;(g=e.edges)!=null&&g.value&&Array.isArray(e.edges.value)&&(m==null||m.pause(),e.edges.value=[...v],Xt(()=>{m==null||m.resume()}))},{immediate:y}),so(()=>{m==null||m.stop(),_==null||_.stop()})})},s=()=>{n.run(()=>{$e(()=>t.maxZoom,()=>{t.maxZoom&&Et(t.maxZoom)&&r.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{n.run(()=>{$e(()=>t.minZoom,()=>{t.minZoom&&Et(t.minZoom)&&r.setMinZoom(t.minZoom)},{immediate:!0})})},d=()=>{n.run(()=>{$e(()=>t.translateExtent,()=>{t.translateExtent&&Et(t.translateExtent)&&r.setTranslateExtent(t.translateExtent)},{immediate:!0})})},u=()=>{n.run(()=>{$e(()=>t.nodeExtent,()=>{t.nodeExtent&&Et(t.nodeExtent)&&r.setNodeExtent(t.nodeExtent)},{immediate:!0})})},c=()=>{n.run(()=>{$e(()=>t.applyDefault,()=>{Et(t.applyDefault)&&(r.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{n.run(()=>{const m=async _=>{let y=_;typeof t.autoConnect=="function"&&(y=await t.autoConnect(_)),y!==!1&&r.addEdges([y])};$e(()=>t.autoConnect,()=>{Et(t.autoConnect)&&(r.autoConnect.value=t.autoConnect)},{immediate:!0}),$e(r.autoConnect,(_,y,v)=>{_?r.onConnect(m):r.hooks.value.connect.off(m),v(()=>{r.hooks.value.connect.off(m)})},{immediate:!0})})},h=()=>{const m=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const _ of Object.keys(t)){const y=_;if(!m.includes(y)){const v=nt(()=>t[y]),g=r[y];St(g)&&n.run(()=>{$e(v,p=>{Et(p)&&(g.value=p)},{immediate:!0})})}}};(()=>{i(),o(),l(),a(),s(),d(),u(),c(),f(),h()})()}),()=>n.stop()}function fw(){return{edgesChange:we(),nodesChange:we(),nodeDoubleClick:we(),nodeClick:we(),nodeMouseEnter:we(),nodeMouseMove:we(),nodeMouseLeave:we(),nodeContextMenu:we(),nodeDragStart:we(),nodeDrag:we(),nodeDragStop:we(),nodesInitialized:we(),miniMapNodeClick:we(),miniMapNodeDoubleClick:we(),miniMapNodeMouseEnter:we(),miniMapNodeMouseMove:we(),miniMapNodeMouseLeave:we(),connect:we(),connectStart:we(),connectEnd:we(),clickConnectStart:we(),clickConnectEnd:we(),paneReady:we(),init:we(),move:we(),moveStart:we(),moveEnd:we(),selectionDragStart:we(),selectionDrag:we(),selectionDragStop:we(),selectionContextMenu:we(),selectionStart:we(),selectionEnd:we(),viewportChangeStart:we(),viewportChange:we(),viewportChangeEnd:we(),paneScroll:we(),paneClick:we(),paneContextMenu:we(),paneMouseEnter:we(),paneMouseMove:we(),paneMouseLeave:we(),edgeContextMenu:we(),edgeMouseEnter:we(),edgeMouseMove:we(),edgeMouseLeave:we(),edgeDoubleClick:we(),edgeClick:we(),edgeUpdateStart:we(),edgeUpdate:we(),edgeUpdateEnd:we(),updateNodeInternals:we(),error:we(e=>Os(e.message))}}function dw(e,t){vs(()=>{for(const[r,n]of Object.entries(t.value)){const i=o=>{e(r,o)};n.fns.add(i),bs(()=>{n.off(i)})}})}function Wp(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Ku.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:ho.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Wr.Bezier,style:{}},connectionMode:ui.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Jl()?"Meta":"Control",zoomActivationKeyCode:Jl()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:fw(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const hw=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function pw(e,t,r){const n=uw(e),i=T=>{const M=T??[];e.hooks.updateNodeInternals.trigger(M)},o=T=>$_(T,e.nodes,e.edges),l=T=>D_(T,e.nodes,e.edges),s=T=>Rp(T,e.edges),a=T=>{if(T)return t.value.get(T)},d=T=>{if(T)return r.value.get(T)},u=(T,M,B)=>{var K,z;const U=[];for(const Y of T){const te={id:Y.id,type:"position",dragging:B,from:Y.from};if(M&&(te.position=Y.position,Y.parentNode)){const re=a(Y.parentNode);te.position={x:te.position.x-(((K=re==null?void 0:re.computedPosition)==null?void 0:K.x)??0),y:te.position.y-(((z=re==null?void 0:re.computedPosition)==null?void 0:z.y)??0)}}U.push(te)}U!=null&&U.length&&e.hooks.nodesChange.trigger(U)},c=T=>{if(!e.vueFlowRef)return;const M=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!M)return;const B=window.getComputedStyle(M),{m22:K}=new window.DOMMatrixReadOnly(B.transform),z=[];for(let U=0;U{e.fitViewOnInitDone=!0}),z.length&&e.hooks.nodesChange.trigger(z)},f=(T,M)=>{const B=new Set,K=new Set;for(const Y of T)ri(Y)?B.add(Y.id):Lr(Y)&&K.add(Y.id);const z=_r(t.value,B,!0),U=_r(r.value,K);if(e.multiSelectionActive){for(const Y of B)z.push(vr(Y,M));for(const Y of K)U.push(vr(Y,M))}z.length&&e.hooks.nodesChange.trigger(z),U.length&&e.hooks.edgesChange.trigger(U)},h=T=>{if(e.multiSelectionActive){const M=T.map(B=>vr(B.id,!0));e.hooks.nodesChange.trigger(M);return}e.hooks.nodesChange.trigger(_r(t.value,new Set(T.map(M=>M.id)),!0)),e.hooks.edgesChange.trigger(_r(r.value))},b=T=>{if(e.multiSelectionActive){const M=T.map(B=>vr(B.id,!0));e.hooks.edgesChange.trigger(M);return}e.hooks.edgesChange.trigger(_r(r.value,new Set(T.map(M=>M.id)))),e.hooks.nodesChange.trigger(_r(t.value,new Set,!0))},m=T=>{f(T,!0)},_=T=>{const B=(T||e.nodes).map(K=>(K.selected=!1,vr(K.id,!1)));e.hooks.nodesChange.trigger(B)},y=T=>{const B=(T||e.edges).map(K=>(K.selected=!1,vr(K.id,!1)));e.hooks.edgesChange.trigger(B)},v=T=>{if(!T||!T.length)return f([],!1);const M=T.reduce((B,K)=>{const z=vr(K.id,!1);return ri(K)?B.nodes.push(z):B.edges.push(z),B},{nodes:[],edges:[]});M.nodes.length&&e.hooks.nodesChange.trigger(M.nodes),M.edges.length&&e.hooks.edgesChange.trigger(M.edges)},g=T=>{var M;(M=e.d3Zoom)==null||M.scaleExtent([T,e.maxZoom]),e.minZoom=T},p=T=>{var M;(M=e.d3Zoom)==null||M.scaleExtent([e.minZoom,T]),e.maxZoom=T},E=T=>{var M;(M=e.d3Zoom)==null||M.translateExtent(T),e.translateExtent=T},S=T=>{e.nodeExtent=T,i()},A=T=>{var M;(M=e.d3Zoom)==null||M.clickDistance(T)},k=T=>{e.nodesDraggable=T,e.nodesConnectable=T,e.elementsSelectable=T},I=T=>{const M=T instanceof Function?T(e.nodes):T;!e.initialized&&!M.length||(e.nodes=kf(M,a,e.hooks.error.trigger))},x=T=>{const M=T instanceof Function?T(e.edges):T;if(!e.initialized&&!M.length)return;const B=Mf(M,e.isValidConnection,a,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Cf(e.connectionLookup,B),e.edges=B},w=T=>{const M=T instanceof Function?T([...e.nodes,...e.edges]):T;!e.initialized&&!M.length||(I(M.filter(ri)),x(M.filter(Lr)))},N=T=>{let M=T instanceof Function?T(e.nodes):T;M=Array.isArray(M)?M:[M];const B=kf(M,a,e.hooks.error.trigger),K=[];for(const z of B)K.push(_f(z));K.length&&e.hooks.nodesChange.trigger(K)},P=T=>{let M=T instanceof Function?T(e.edges):T;M=Array.isArray(M)?M:[M];const B=Mf(M,e.isValidConnection,a,d,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),K=[];for(const z of B)K.push(_f(z));K.length&&e.hooks.edgesChange.trigger(K)},C=(T,M=!0,B=!1)=>{const K=T instanceof Function?T(e.nodes):T,z=Array.isArray(K)?K:[K],U=[],Y=[];function te(ee){const ue=s(ee);for(const X of ue)(!Et(X.deletable)||X.deletable)&&Y.push(Ef(X.id,X.source,X.target,X.sourceHandle,X.targetHandle))}function re(ee){const ue=[];for(const X of e.nodes)X.parentNode===ee&&ue.push(X);if(ue.length){for(const X of ue)U.push(wf(X.id));M&&te(ue);for(const X of ue)re(X.id)}}for(const ee of z){const ue=typeof ee=="string"?a(ee):ee;ue&&(Et(ue.deletable)&&!ue.deletable||(U.push(wf(ue.id)),M&&te([ue]),B&&re(ue.id)))}Y.length&&e.hooks.edgesChange.trigger(Y),U.length&&e.hooks.nodesChange.trigger(U)},L=T=>{const M=T instanceof Function?T(e.edges):T,B=Array.isArray(M)?M:[M],K=[];for(const z of B){const U=typeof z=="string"?d(z):z;U&&(Et(U.deletable)&&!U.deletable||K.push(Ef(typeof z=="string"?z:z.id,U.source,U.target,U.sourceHandle,U.targetHandle)))}e.hooks.edgesChange.trigger(K)},D=(T,M,B=!0)=>ew(T,M,e.edges,d,B,e.hooks.error.trigger),V=(T,M,B={replace:!1})=>{const K=d(T);if(!K)return;const z=typeof M=="function"?M(K):M;K.data=B.replace?z:{...K.data,...z}},Q=T=>bf(T,e.nodes),W=T=>{const M=bf(T,e.edges);return Cf(e.connectionLookup,M),M},$=(T,M,B={replace:!1})=>{const K=a(T);if(!K)return;const z=typeof M=="function"?M(K):M;B.replace?e.nodes.splice(e.nodes.indexOf(K),1,z):Object.assign(K,z)},R=(T,M,B={replace:!1})=>{const K=a(T);if(!K)return;const z=typeof M=="function"?M(K):M;K.data=B.replace?z:{...K.data,...z}},F=(T,M,B=!1)=>{B?e.connectionClickStartHandle=T:e.connectionStartHandle=T,e.connectionEndHandle=null,e.connectionStatus=null,M&&(e.connectionPosition=M)},j=(T,M=null,B=null)=>{e.connectionStartHandle&&(e.connectionPosition=T,e.connectionEndHandle=M,e.connectionStatus=B)},Z=(T,M)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,M?e.connectionClickStartHandle=null:e.connectionStartHandle=null},G=T=>{const M=R_(T),B=M?null:io(T)?T:a(T.id);return!M&&!B?[null,null,M]:[M?T:tu(B),B,M]},H=(T,M=!0,B=e.nodes)=>{const[K,z,U]=G(T);if(!K)return[];const Y=[];for(const te of B||e.nodes){if(!U&&(te.id===z.id||!te.computedPosition))continue;const re=tu(te),ee=nu(re,K);(M&&ee>0||ee>=Number(K.width)*Number(K.height))&&Y.push(te)}return Y},J=(T,M,B=!0)=>{const[K]=G(T);if(!K)return!1;const z=nu(K,M);return B&&z>0||z>=Number(K.width)*Number(K.height)},oe=T=>{const{viewport:M,dimensions:B,d3Zoom:K,d3Selection:z,translateExtent:U}=e;if(!K||!z||!T.x&&!T.y)return!1;const Y=$i.translate(M.x+T.x,M.y+T.y).scale(M.zoom),te=[[0,0],[B.width,B.height]],re=K.constrain()(Y,te,U),ee=e.viewport.x!==re.x||e.viewport.y!==re.y||e.viewport.zoom!==re.k;return K.transform(z,re),ee},ie=T=>{const M=T instanceof Function?T(e):T,B=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Et(M.defaultEdgeOptions)&&(e.defaultEdgeOptions=M.defaultEdgeOptions);const K=M.modelValue||M.nodes||M.edges?[]:void 0;K&&(M.modelValue&&K.push(...M.modelValue),M.nodes&&K.push(...M.nodes),M.edges&&K.push(...M.edges),w(K));const z=()=>{Et(M.maxZoom)&&p(M.maxZoom),Et(M.minZoom)&&g(M.minZoom),Et(M.translateExtent)&&E(M.translateExtent)};for(const U of Object.keys(M)){const Y=U,te=M[Y];![...hw,...B].includes(Y)&&Et(te)&&(e[Y]=te)}Va(()=>e.d3Zoom).not.toBeNull().then(z),e.initialized||(e.initialized=!0)};return{updateNodePositions:u,updateNodeDimensions:c,setElements:w,setNodes:I,setEdges:x,addNodes:N,addEdges:P,removeNodes:C,removeEdges:L,findNode:a,findEdge:d,updateEdge:D,updateEdgeData:V,updateNode:$,updateNodeData:R,applyEdgeChanges:W,applyNodeChanges:Q,addSelectedElements:m,addSelectedNodes:h,addSelectedEdges:b,setMinZoom:g,setMaxZoom:p,setTranslateExtent:E,setNodeExtent:S,setPaneClickDistance:A,removeSelectedElements:v,removeSelectedNodes:_,removeSelectedEdges:y,startConnection:F,updateConnection:j,endConnection:Z,setInteractive:k,setState:ie,getIntersectingNodes:H,getIncomers:o,getOutgoers:l,getConnectedEdges:s,isNodeIntersecting:J,panBy:oe,fitView:T=>n.value.fitView(T),zoomIn:T=>n.value.zoomIn(T),zoomOut:T=>n.value.zoomOut(T),zoomTo:(T,M)=>n.value.zoomTo(T,M),setViewport:(T,M)=>n.value.setViewport(T,M),setTransform:(T,M)=>n.value.setTransform(T,M),getViewport:()=>n.value.getViewport(),getTransform:()=>n.value.getTransform(),setCenter:(T,M,B)=>n.value.setCenter(T,M,B),fitBounds:(T,M)=>n.value.fitBounds(T,M),project:T=>n.value.project(T),screenToFlowCoordinate:T=>n.value.screenToFlowCoordinate(T),flowToScreenCoordinate:T=>n.value.flowToScreenCoordinate(T),toObject:()=>{const T=[],M=[];for(const B of e.nodes){const{computedPosition:K,handleBounds:z,selected:U,dimensions:Y,isParent:te,resizing:re,dragging:ee,events:ue,...X}=B;T.push(X)}for(const B of e.edges){const{selected:K,sourceNode:z,targetNode:U,events:Y,...te}=B;M.push(te)}return JSON.parse(JSON.stringify({nodes:T,edges:M,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:T=>new Promise(M=>{const{nodes:B,edges:K,position:z,zoom:U,viewport:Y}=T;if(B&&I(B),K&&x(K),Y!=null&&Y.x&&(Y!=null&&Y.y)||z){const te=(Y==null?void 0:Y.x)||z[0],re=(Y==null?void 0:Y.y)||z[1],ee=(Y==null?void 0:Y.zoom)||U||e.viewport.zoom;return Va(()=>n.value.viewportInitialized).toBe(!0).then(()=>{n.value.setViewport({x:te,y:re,zoom:ee}).then(()=>{M(!0)})})}else M(!0)}),updateNodeInternals:i,viewportHelper:n,$reset:()=>{const T=Wp();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const M=$i.translate(T.defaultViewport.x??0,T.defaultViewport.y??0).scale(or(T.defaultViewport.zoom??1,T.minZoom,T.maxZoom)),B=e.viewportRef.getBoundingClientRect(),K=[[0,0],[B.width,B.height]],z=e.d3Zoom.constrain()(M,K,T.translateExtent);e.d3Zoom.transform(e.d3Selection,z)}ie(T)},$destroy:()=>{}}}const vw=["data-id","data-handleid","data-nodeid","data-handlepos"],gw={name:"Handle",compatConfig:{MODE:3}},Hn=it({...gw,props:{id:{default:null},type:{},position:{default:()=>Ne.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const r=Cu(e,["position","connectable","connectableStart","connectableEnd","id"]),n=nt(()=>r.type??"source"),i=nt(()=>r.isValidConnection??null),{connectionStartHandle:o,connectionClickStartHandle:l,connectionEndHandle:s,vueFlowRef:a,nodesConnectable:d,noDragClassName:u,noPanClassName:c}=lt(),{id:f,node:h,nodeEl:b,connectedEdges:m}=Vp(),_=Pe(),y=nt(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),v=nt(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),g=nt(()=>{var x,w,N,P,C,L;return((x=o.value)==null?void 0:x.nodeId)===f&&((w=o.value)==null?void 0:w.handleId)===e.id&&((N=o.value)==null?void 0:N.type)===n.value||((P=s.value)==null?void 0:P.nodeId)===f&&((C=s.value)==null?void 0:C.handleId)===e.id&&((L=s.value)==null?void 0:L.type)===n.value}),p=nt(()=>{var x,w,N;return((x=l.value)==null?void 0:x.nodeId)===f&&((w=l.value)==null?void 0:w.handleId)===e.id&&((N=l.value)==null?void 0:N.type)===n.value}),{handlePointerDown:E,handleClick:S}=zp({nodeId:f,handleId:e.id,isValidConnection:i,type:n}),A=Re(()=>typeof e.connectable=="string"&&e.connectable==="single"?!m.value.some(x=>{const w=x[`${n.value}Handle`];return x[n.value]!==f?!1:w?w===e.id:!0}):typeof e.connectable=="number"?m.value.filter(x=>{const w=x[`${n.value}Handle`];return x[n.value]!==f?!1:w?w===e.id:!0}).length{var x;if(!h.dimensions.width||!h.dimensions.height)return;const w=(x=h.handleBounds[n.value])==null?void 0:x.find(Q=>Q.id===e.id);if(!a.value||w)return;const N=a.value.querySelector(".vue-flow__transformationpane");if(!b.value||!_.value||!N||!e.id)return;const P=b.value.getBoundingClientRect(),C=_.value.getBoundingClientRect(),L=window.getComputedStyle(N),{m22:D}=new window.DOMMatrixReadOnly(L.transform),V={id:e.id,position:e.position,x:(C.left-P.left)/D,y:(C.top-P.top)/D,...Ss(_.value)};h.handleBounds[n.value]=[...h.handleBounds[n.value]??[],V]}),Fi(()=>{const x=h.handleBounds[n.value];x&&(h.handleBounds[n.value]=x.filter(w=>w.id!==e.id))});function k(x){const w=Yu(x);A.value&&y.value&&(w&&x.button===0||!w)&&E(x)}function I(x){!f||!l.value&&!y.value||A.value&&S(x)}return t({handleClick:S,handlePointerDown:E,onClick:I,onPointerDown:k}),(x,w)=>(me(),Se("div",{ref_key:"handle",ref:_,"data-id":`${pe(f)}-${e.id}-${n.value}`,"data-handleid":e.id,"data-nodeid":pe(f),"data-handlepos":x.position,class:Qt(["vue-flow__handle",[`vue-flow__handle-${x.position}`,`vue-flow__handle-${e.id}`,pe(u),pe(c),n.value,{connectable:A.value,connecting:p.value,connectablestart:y.value,connectableend:v.value,connectionindicator:A.value&&(y.value&&!g.value||v.value&&g.value)}]]),onMousedown:k,onTouchstartPassive:k,onClick:I},[dt(x.$slots,"default",{id:x.id})],42,vw))}}),As=function({sourcePosition:e=Ne.Bottom,targetPosition:t=Ne.Top,label:r,connectable:n=!0,isValidTargetPos:i,isValidSourcePos:o,data:l}){const s=l.label||r;return[He(Hn,{type:"target",position:t,connectable:n,isValidConnection:i}),typeof s!="string"&&s?He(s):He("div",{innerHTML:s}),He(Hn,{type:"source",position:e,connectable:n,isValidConnection:o})]};As.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];As.inheritAttrs=!1;As.compatConfig={MODE:3};const mw=As,Ts=function({targetPosition:e=Ne.Top,label:t,connectable:r=!0,isValidTargetPos:n,data:i}){const o=i.label||t;return[He(Hn,{type:"target",position:e,connectable:r,isValidConnection:n}),typeof o!="string"&&o?He(o):He("div",{innerHTML:o})]};Ts.props=["targetPosition","label","isValidTargetPos","connectable","data"];Ts.inheritAttrs=!1;Ts.compatConfig={MODE:3};const yw=Ts,ks=function({sourcePosition:e=Ne.Bottom,label:t,connectable:r=!0,isValidSourcePos:n,data:i}){const o=i.label||t;return[typeof o!="string"&&o?He(o):He("div",{innerHTML:o}),He(Hn,{type:"source",position:e,connectable:r,isValidConnection:n})]};ks.props=["sourcePosition","label","isValidSourcePos","connectable","data"];ks.inheritAttrs=!1;ks.compatConfig={MODE:3};const bw=ks,_w=["transform"],ww=["width","height","x","y","rx","ry"],Ew=["y"],xw={name:"EdgeText",compatConfig:{MODE:3}},Sw=it({...xw,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=Pe({x:0,y:0,width:0,height:0}),r=Pe(null),n=Re(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Dt(i),$e([()=>e.x,()=>e.y,r,()=>e.label],i);function i(){if(!r.value)return;const o=r.value.getBBox();(o.width!==t.value.width||o.height!==t.value.height)&&(t.value=o)}return(o,l)=>(me(),Se("g",{transform:n.value,class:"vue-flow__edge-textwrapper"},[o.labelShowBg?(me(),Se("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*o.labelBgPadding[0]}px`,height:`${t.value.height+2*o.labelBgPadding[1]}px`,x:-o.labelBgPadding[0],y:-o.labelBgPadding[1],style:_t(o.labelBgStyle),rx:o.labelBgBorderRadius,ry:o.labelBgBorderRadius},null,12,ww)):tt("",!0),ke("text",Du(o.$attrs,{ref_key:"el",ref:r,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:o.labelStyle}),[dt(o.$slots,"default",{},()=>[typeof o.label!="string"?(me(),kt(wr(o.label),{key:0})):(me(),Se(We,{key:1},[Lo(kr(o.label),1)],64))])],16,Ew)],8,_w))}}),Ow=["id","d","marker-end","marker-start"],Nw=["d","stroke-width"],Aw={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Cs=it({...Aw,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},style:{},labelStyle:{},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const r=Cu(e,["interactionWidth","labelShowBg"]),n=Pe(null),i=Pe(null),o=Pe(null),l=$d();return t({pathEl:n,interactionEl:i,labelEl:o}),(s,a)=>(me(),Se(We,null,[ke("path",{id:s.id,ref_key:"pathEl",ref:n,d:s.path,style:_t(r.style),class:Qt(["vue-flow__edge-path",pe(l).class]),"marker-end":s.markerEnd,"marker-start":s.markerStart},null,14,Ow),s.interactionWidth?(me(),Se("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:s.path,"stroke-width":s.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Nw)):tt("",!0),s.label&&s.labelX&&s.labelY?(me(),kt(Sw,{key:1,ref_key:"labelEl",ref:o,x:s.labelX,y:s.labelY,label:s.label,"label-show-bg":s.labelShowBg,"label-bg-style":s.labelBgStyle,"label-bg-padding":s.labelBgPadding,"label-bg-border-radius":s.labelBgBorderRadius,"label-style":s.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):tt("",!0)],64))}});function Kp({sourceX:e,sourceY:t,targetX:r,targetY:n}){const i=Math.abs(r-e)/2,o=r=0?.5*e:t*25*Math.sqrt(-e)}function If({pos:e,x1:t,y1:r,x2:n,y2:i,c:o}){let l,s;switch(e){case Ne.Left:l=t-ml(t-n,o),s=r;break;case Ne.Right:l=t+ml(n-t,o),s=r;break;case Ne.Top:l=t,s=r-ml(r-i,o);break;case Ne.Bottom:l=t,s=r+ml(i-r,o);break}return[l,s]}function Yp(e){const{sourceX:t,sourceY:r,sourcePosition:n=Ne.Bottom,targetX:i,targetY:o,targetPosition:l=Ne.Top,curvature:s=.25}=e,[a,d]=If({pos:n,x1:t,y1:r,x2:i,y2:o,c:s}),[u,c]=If({pos:l,x1:i,y1:o,x2:t,y2:r,c:s}),[f,h,b,m]=Gp({sourceX:t,sourceY:r,targetX:i,targetY:o,sourceControlX:a,sourceControlY:d,targetControlX:u,targetControlY:c});return[`M${t},${r} C${a},${d} ${u},${c} ${i},${o}`,f,h,b,m]}function Rf({pos:e,x1:t,y1:r,x2:n,y2:i}){let o,l;switch(e){case Ne.Left:case Ne.Right:o=.5*(t+n),l=r;break;case Ne.Top:case Ne.Bottom:o=t,l=.5*(r+i);break}return[o,l]}function Zp(e){const{sourceX:t,sourceY:r,sourcePosition:n=Ne.Bottom,targetX:i,targetY:o,targetPosition:l=Ne.Top}=e,[s,a]=Rf({pos:n,x1:t,y1:r,x2:i,y2:o}),[d,u]=Rf({pos:l,x1:i,y1:o,x2:t,y2:r}),[c,f,h,b]=Gp({sourceX:t,sourceY:r,targetX:i,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:d,targetControlY:u});return[`M${t},${r} C${s},${a} ${d},${u} ${i},${o}`,c,f,h,b]}const Lf={[Ne.Left]:{x:-1,y:0},[Ne.Right]:{x:1,y:0},[Ne.Top]:{x:0,y:-1},[Ne.Bottom]:{x:0,y:1}};function Tw({source:e,sourcePosition:t=Ne.Bottom,target:r}){return t===Ne.Left||t===Ne.Right?e.xe[c]?-1:1)*C:y[c]=(d[c]>r[c]?-1:1)*C}}if(t!==n){const P=c==="x"?"y":"x",C=l[c]===s[P],L=a[P]>d[P],D=a[P]=N?(b=(I.x+x.x)/2,m=h[0].y):(b=h[0].x,m=(I.y+x.y)/2)}return[[e,{x:a.x+_.x,y:a.y+_.y},...h,{x:d.x+y.x,y:d.y+y.y},r],b,m,p,E]}function Cw(e,t,r,n){const i=Math.min(Df(e,t)/2,Df(t,r)/2,n),{x:o,y:l}=t;if(e.x===o&&o===r.x||e.y===l&&l===r.y)return`L${o} ${l}`;if(e.y===l){const d=e.x{let p;return g>0&&g{const[r,n,i]=Mw(e);return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Iw=Pw,Rw=it({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[r,n,i]=iu({...e,sourcePosition:e.sourcePosition??Ne.Bottom,targetPosition:e.targetPosition??Ne.Top});return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Xp=Rw,Lw=it({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>He(Xp,{...e,...t,borderRadius:0})}}),Dw=Lw,$w=it({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[r,n,i]=Yp({...e,sourcePosition:e.sourcePosition??Ne.Bottom,targetPosition:e.targetPosition??Ne.Top});return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Bw=$w,qw=it({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[r,n,i]=Zp({...e,sourcePosition:e.sourcePosition??Ne.Bottom,targetPosition:e.targetPosition??Ne.Top});return He(Cs,{path:r,labelX:n,labelY:i,...t,...e})}}}),Fw=qw,Hw={input:bw,default:mw,output:yw},jw={default:Bw,straight:Iw,step:Dw,smoothstep:Xp,simplebezier:Fw};function zw(e,t,r){const n=Re(()=>m=>t.value.get(m)),i=Re(()=>m=>r.value.get(m)),o=Re(()=>{const m={...jw,...e.edgeTypes},_=Object.keys(m);for(const y of e.edges)y.type&&!_.includes(y.type)&&(m[y.type]=y.type);return m}),l=Re(()=>{const m={...Hw,...e.nodeTypes},_=Object.keys(m);for(const y of e.nodes)y.type&&!_.includes(y.type)&&(m[y.type]=y.type);return m}),s=Re(()=>e.onlyRenderVisibleElements?Ip(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=Re(()=>{if(e.onlyRenderVisibleElements){const m=[];for(const _ of e.edges){const y=t.value.get(_.source),v=t.value.get(_.target);W_({sourcePos:y.computedPosition||{x:0,y:0},targetPos:v.computedPosition||{x:0,y:0},sourceWidth:y.dimensions.width,sourceHeight:y.dimensions.height,targetWidth:v.dimensions.width,targetHeight:v.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&m.push(_)}return m}return e.edges}),d=Re(()=>[...s.value,...a.value]),u=Re(()=>{const m=[];for(const _ of e.nodes)_.selected&&m.push(_);return m}),c=Re(()=>{const m=[];for(const _ of e.edges)_.selected&&m.push(_);return m}),f=Re(()=>[...u.value,...c.value]),h=Re(()=>{const m=[];for(const _ of e.nodes)_.dimensions.width&&_.dimensions.height&&_.handleBounds!==void 0&&m.push(_);return m}),b=Re(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:n,getEdge:i,getElements:d,getEdgeTypes:o,getNodeTypes:l,getEdges:a,getNodes:s,getSelectedElements:f,getSelectedNodes:u,getSelectedEdges:c,getNodesInitialized:h,areNodesInitialized:b}}class Kr{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const r=(t=an())==null?void 0:t.appContext.app,n=(r==null?void 0:r.config.globalProperties.$vueFlowStorage)??Kr.instance;return Kr.instance=n??new Kr,r&&(r.config.globalProperties.$vueFlowStorage=Kr.instance),Kr.instance}set(t,r){return this.flows.set(t,r)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,r){const n=Wp(),i=fi(n),o={};for(const[f,h]of Object.entries(i.hooks)){const b=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;o[b]=h.on}const l={};for(const[f,h]of Object.entries(i.hooks))l[f]=h.trigger;const s=Re(()=>{const f=new Map;for(const h of i.nodes)f.set(h.id,h);return f}),a=Re(()=>{const f=new Map;for(const h of i.edges)f.set(h.id,h);return f}),d=zw(i,s,a),u=pw(i,s,a);u.setState({...i,...r});const c={...o,...d,...u,...Gy(i),nodeLookup:s,edgeLookup:a,emits:l,id:t,vueFlowVersion:"1.40.1",$destroy:()=>{this.remove(t)}};return this.set(t,c),c}getId(){return`vue-flow-${this.currentId++}`}}function lt(e){const t=Kr.getInstance(),r=ls(),n=typeof e=="object",i=n?e:{id:e},o=i.id,l=o??(r==null?void 0:r.vueFlowId);let s;if(r){const a=vn(Pf,null);typeof a<"u"&&a!==null&&(!l||a.id===l)&&(s=a)}if(s||l&&(s=t.get(l)),!s||l&&s.id!==l){const a=o??t.getId(),d=t.create(a,i);s=d,(r??vu(!0)).run(()=>{$e(d.applyDefault,(c,f,h)=>{const b=_=>{d.applyNodeChanges(_)},m=_=>{d.applyEdgeChanges(_)};c?(d.onNodesChange(b),d.onEdgesChange(m)):(d.hooks.value.nodesChange.off(b),d.hooks.value.edgesChange.off(m)),h(()=>{d.hooks.value.nodesChange.off(b),d.hooks.value.edgesChange.off(m)})},{immediate:!0}),bs(()=>{if(s){const c=t.get(s.id);c?c.$destroy():Os(`No store instance found for id ${s.id} in storage.`)}})})}else n&&s.setState(i);if(r&&(rr(Pf,s),r.vueFlowId=s.id),n){const a=an();(a==null?void 0:a.type.name)!=="VueFlow"&&s.emits.error(new It(xt.USEVUEFLOW_OPTIONS))}return s}function Vw(e){const{emits:t,dimensions:r}=lt();let n;Dt(()=>{const i=e.value,o=()=>{if(!i)return;const l=Ss(i);(l.width===0||l.height===0)&&t.error(new It(xt.MISSING_VIEWPORT_DIMENSIONS)),r.value={width:l.width||500,height:l.height||500}};o(),window.addEventListener("resize",o),i&&(n=new ResizeObserver(()=>o()),n.observe(i)),Br(()=>{window.removeEventListener("resize",o),n&&i&&n.unobserve(i)})})}const Uw={name:"UserSelection",compatConfig:{MODE:3}},Ww=it({...Uw,props:{userSelectionRect:{}},setup(e){return(t,r)=>(me(),Se("div",{class:"vue-flow__selection vue-flow__container",style:_t({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Kw=["tabIndex"],Gw={name:"NodesSelection",compatConfig:{MODE:3}},Yw=it({...Gw,setup(e){const{emits:t,viewport:r,getSelectedNodes:n,noPanClassName:i,disableKeyboardA11y:o,userSelectionActive:l}=lt(),s=Up(),a=Pe(null),d=Hp({el:a,onStart(b){t.selectionDragStart(b)},onDrag(b){t.selectionDrag(b)},onStop(b){t.selectionDragStop(b)}});Dt(()=>{var b;o.value||(b=a.value)==null||b.focus({preventScroll:!0})});const u=Re(()=>Pp(n.value)),c=Re(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,top:`${u.value.y}px`,left:`${u.value.x}px`}));function f(b){t.selectionContextMenu({event:b,nodes:n.value})}function h(b){o||ki[b.key]&&s({x:ki[b.key].x,y:ki[b.key].y},b.shiftKey)}return(b,m)=>!pe(l)&&u.value.width&&u.value.height?(me(),Se("div",{key:0,class:Qt(["vue-flow__nodesselection vue-flow__container",pe(i)]),style:_t({transform:`translate(${pe(r).x}px,${pe(r).y}px) scale(${pe(r).zoom})`})},[ke("div",{ref_key:"el",ref:a,class:Qt([{dragging:pe(d)},"vue-flow__nodesselection-rect"]),style:_t(c.value),tabIndex:pe(o)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,Kw)],6)):tt("",!0)}});function Zw(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Xw={name:"Pane",compatConfig:{MODE:3}},Qw=it({...Xw,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:r,viewport:n,emits:i,userSelectionActive:o,removeSelectedElements:l,panOnDrag:s,userSelectionRect:a,elementsSelectable:d,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:f,removeNodes:h,removeEdges:b,selectionMode:m,deleteKeyCode:_,multiSelectionKeyCode:y,multiSelectionActive:v,edgeLookup:g,nodeLookup:p}=lt(),E=Pe(null),S=Pe(0),A=Pe(0),k=Pe(),I=Pe(new Map),x=nt(()=>d.value&&(e.isSelecting||o.value));let w=!1,N=!1;const P=po(_,{actInsideInputWithModifier:!1}),C=po(y);$e(P,j=>{j&&(h(f.value),b(c.value),u.value=!1)}),$e(C,j=>{v.value=j});function L(j,Z){return G=>{G.target===Z&&(j==null||j(G))}}function D(){o.value=!1,a.value=null,S.value=0,A.value=0}function V(j){if(w){w=!1;return}i.paneClick(j),l(),u.value=!1}function Q(j){var Z;if(Array.isArray(s.value)&&((Z=s.value)!=null&&Z.includes(2))){j.preventDefault();return}i.paneContextMenu(j)}function W(j){i.paneScroll(j)}function $(j){var Z,G,H,J,oe;if(k.value=(Z=t.value)==null?void 0:Z.getBoundingClientRect(),!d.value||!e.isSelecting||j.button!==0||j.target!==E.value||!k.value)return;(H=(G=j.target)==null?void 0:G.setPointerCapture)==null||H.call(G,j.pointerId);const{x:ie,y:se}=Zw(j,k.value);N=!0,w=!1,I.value=new Map;for(const[ae,ce]of g.value)I.value.set(ce.source,((J=I.value.get(ce.source))==null?void 0:J.add(ae))||new Set([ae])),I.value.set(ce.target,((oe=I.value.get(ce.target))==null?void 0:oe.add(ae))||new Set([ae]));l(),a.value={width:0,height:0,startX:ie,startY:se,x:ie,y:se},o.value=!0,u.value=!1,i.selectionStart(j)}function R(j){if(!k.value||!a.value)return;w=!0;const{x:Z,y:G}=Ar(j,k.value),{startX:H=0,startY:J=0}=a.value,oe={startX:H,startY:J,x:Z0&&(u.value=!0),D(),i.selectionEnd(j),e.selectionKeyPressed&&(w=!1),N=!1)}return(j,Z)=>(me(),Se("div",{ref_key:"container",ref:E,class:Qt(["vue-flow__pane vue-flow__container",{selection:j.isSelecting}]),onClick:Z[0]||(Z[0]=G=>x.value?void 0:L(V,E.value)(G)),onContextmenu:Z[1]||(Z[1]=G=>L(Q,E.value)(G)),onWheelPassive:Z[2]||(Z[2]=G=>L(W,E.value)(G)),onPointerenter:Z[3]||(Z[3]=G=>x.value?void 0:pe(i).paneMouseEnter(G)),onPointerdown:Z[4]||(Z[4]=G=>x.value?$(G):pe(i).paneMouseMove(G)),onPointermove:Z[5]||(Z[5]=G=>x.value?R(G):pe(i).paneMouseMove(G)),onPointerup:Z[6]||(Z[6]=G=>x.value?F(G):void 0),onPointerleave:Z[7]||(Z[7]=G=>pe(i).paneMouseLeave(G))},[dt(j.$slots,"default"),pe(o)&&pe(a)?(me(),kt(Ww,{key:0,"user-selection-rect":pe(a)},null,8,["user-selection-rect"])):tt("",!0),pe(u)&&pe(f).length?(me(),kt(Yw,{key:1})):tt("",!0)],34))}}),Jw={name:"Transform",compatConfig:{MODE:3}},eE=it({...Jw,setup(e){const{viewport:t,fitViewOnInit:r,fitViewOnInitDone:n}=lt(),i=Re(()=>r.value?!n.value:!1),o=Re(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(l,s)=>(me(),Se("div",{class:"vue-flow__transformationpane vue-flow__container",style:_t({transform:o.value,opacity:i.value?0:void 0})},[dt(l.$slots,"default")],4))}}),tE={name:"Viewport",compatConfig:{MODE:3}},nE=it({...tE,setup(e){const{minZoom:t,maxZoom:r,defaultViewport:n,translateExtent:i,zoomActivationKeyCode:o,selectionKeyCode:l,panActivationKeyCode:s,panOnScroll:a,panOnScrollMode:d,panOnScrollSpeed:u,panOnDrag:c,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:b,preventScrolling:m,noWheelClassName:_,noPanClassName:y,emits:v,connectionStartHandle:g,userSelectionActive:p,paneDragging:E,d3Zoom:S,d3Selection:A,d3ZoomHandler:k,viewport:I,viewportRef:x,paneClickDistance:w}=lt();Vw(x);const N=Pe(!1),P=Pe(!1);let C=null,L=!1,D=0,V={x:0,y:0,zoom:0};const Q=po(s),W=po(l),$=po(o),R=nt(()=>Q.value||c.value),F=nt(()=>Q.value||a.value),j=nt(()=>W.value||l.value===!0&&R.value!==!0);Dt(()=>{if(!x.value){Os("Viewport element is missing");return}const ie=x.value,se=ie.getBoundingClientRect(),ae=k_().clickDistance(w.value).scaleExtent([t.value,r.value]).translateExtent(i.value),ce=xn(ie).call(ae),T=ce.on("wheel.zoom"),M=$i.translate(n.value.x??0,n.value.y??0).scale(or(n.value.zoom??1,t.value,r.value)),B=[[0,0],[se.width,se.height]],K=ae.constrain()(M,B,i.value);ae.transform(ce,K),ae.wheelDelta(G),S.value=ae,A.value=ce,k.value=T,I.value={x:K.x,y:K.y,zoom:K.k},ae.on("start",z=>{var U;if(!z.sourceEvent)return null;D=z.sourceEvent.button,N.value=!0;const Y=J(z.transform);((U=z.sourceEvent)==null?void 0:U.type)==="mousedown"&&(E.value=!0),V=Y,v.viewportChangeStart(Y),v.moveStart({event:z,flowTransform:Y})}),ae.on("end",z=>{if(!z.sourceEvent)return null;if(N.value=!1,E.value=!1,Z(R.value,D??0)&&!L&&v.paneContextMenu(z.sourceEvent),L=!1,H(V,z.transform)){const U=J(z.transform);V=U,v.viewportChangeEnd(U),v.moveEnd({event:z,flowTransform:U})}}),ae.filter(z=>{var U,Y,te;const re=$.value||b.value,ee=h.value&&z.ctrlKey,ue=z.button;if((R.value===!0||Array.isArray(R.value)&&R.value.includes(1))&&ue===1&&z.type==="mousedown"&&((U=z.target)!=null&&U.closest(".vue-flow__node")||(Y=z.target)!=null&&Y.closest(".vue-flow__edge")))return!0;if(!R.value&&!re&&!F.value&&!f.value&&!h.value||p.value||!f.value&&z.type==="dblclick"||oe(z,_.value)&&z.type==="wheel"||oe(z,y.value)&&(z.type!=="wheel"||F.value&&z.type==="wheel"&&!$.value)||!h.value&&z.ctrlKey&&z.type==="wheel"||!re&&!F.value&&!ee&&z.type==="wheel")return!1;if(!h&&z.type==="touchstart"&&((te=z.touches)==null?void 0:te.length)>1)return z.preventDefault(),!1;if(!R.value&&(z.type==="mousedown"||z.type==="touchstart")||Array.isArray(R.value)&&!R.value.includes(ue)&&(z.type==="mousedown"||z.type==="touchstart"))return!1;const X=Array.isArray(R.value)&&R.value.includes(ue)||!ue||ue<=1;return(!z.ctrlKey||z.type==="wheel")&&X}),$e([p,R],()=>{p.value&&!N.value?ae.on("zoom",null):p.value||ae.on("zoom",z=>{I.value={x:z.transform.x,y:z.transform.y,zoom:z.transform.k};const U=J(z.transform);L=Z(R.value,D??0),v.viewportChange(U),v.move({event:z,flowTransform:U})})},{immediate:!0}),$e([p,F,d,$,h,m,_],()=>{F.value&&!$.value&&!p.value?ce.on("wheel.zoom",z=>{if(oe(z,_.value))return!1;const U=$.value||b.value,Y=h.value&&z.ctrlKey;if(!(!m.value||F.value||U||Y))return!1;z.preventDefault(),z.stopImmediatePropagation();const re=ce.property("__zoom").k||1,ee=Jl();if(z.ctrlKey&&h.value&&ee){const he=In(z),ve=G(z),be=re*2**ve;ae.scaleTo(ce,be,he,z);return}const ue=z.deltaMode===1?20:1;let X=d.value===ho.Vertical?0:z.deltaX*ue,le=d.value===ho.Horizontal?0:z.deltaY*ue;!ee&&z.shiftKey&&d.value!==ho.Vertical&&!X&&le&&(X=le,le=0),ae.translateBy(ce,-(X/re)*u.value,-(le/re)*u.value);const de=J(ce.property("__zoom"));C&&clearTimeout(C),P.value?(v.move({event:z,flowTransform:de}),v.viewportChange(de),C=setTimeout(()=>{v.moveEnd({event:z,flowTransform:de}),v.viewportChangeEnd(de),P.value=!1},150)):(P.value=!0,v.moveStart({event:z,flowTransform:de}),v.viewportChangeStart(de))},{passive:!1}):typeof T<"u"&&ce.on("wheel.zoom",function(z,U){const Y=!m.value&&z.type==="wheel"&&!z.ctrlKey,te=$.value||b.value,re=h.value&&z.ctrlKey;if(!te&&!a.value&&!re&&z.type==="wheel"||Y||oe(z,_.value))return null;z.preventDefault(),T.call(this,z,U)},{passive:!1})},{immediate:!0})});function Z(ie,se){return se===2&&Array.isArray(ie)&&ie.includes(2)}function G(ie){const se=ie.ctrlKey&&Jl()?10:1;return-ie.deltaY*(ie.deltaMode===1?.05:ie.deltaMode?1:.002)*se}function H(ie,se){return ie.x!==se.x&&!Number.isNaN(se.x)||ie.y!==se.y&&!Number.isNaN(se.y)||ie.zoom!==se.k&&!Number.isNaN(se.k)}function J(ie){return{x:ie.x,y:ie.y,zoom:ie.k}}function oe(ie,se){return ie.target.closest(`.${se}`)}return(ie,se)=>(me(),Se("div",{ref_key:"viewportRef",ref:x,class:"vue-flow__viewport vue-flow__container"},[Ee(Qw,{"is-selecting":j.value,"selection-key-pressed":pe(W),class:Qt({connecting:!!pe(g),dragging:pe(E),draggable:pe(c)===!0||Array.isArray(pe(c))&&pe(c).includes(0)})},{default:yt(()=>[Ee(eE,null,{default:yt(()=>[dt(ie.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),rE=["id"],iE=["id"],oE=["id"],lE={name:"A11yDescriptions",compatConfig:{MODE:3}},sE=it({...lE,setup(e){const{id:t,disableKeyboardA11y:r,ariaLiveMessage:n}=lt();return(i,o)=>(me(),Se(We,null,[ke("div",{id:`${pe(xp)}-${pe(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+kr(pe(r)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,rE),ke("div",{id:`${pe(Sp)}-${pe(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,iE),pe(r)?tt("",!0):(me(),Se("div",{key:0,id:`${pe(I_)}-${pe(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},kr(pe(n)),9,oE))],64))}});function aE(){const e=lt();$e(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function uE(e,t,r){return r===Ne.Left?e-t:r===Ne.Right?e+t:e}function cE(e,t,r){return r===Ne.Top?e-t:r===Ne.Bottom?e+t:e}const Qu=function({radius:e=10,centerX:t=0,centerY:r=0,position:n=Ne.Top,type:i}){return He("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:uE(t,e,n),cy:cE(r,e,n),r:e,stroke:"transparent",fill:"transparent"})};Qu.props=["radius","centerX","centerY","position","type"];Qu.compatConfig={MODE:3};const $f=Qu,fE=it({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:r,connectionMode:n,edgeUpdaterRadius:i,emits:o,nodesSelectionActive:l,noPanClassName:s,getEdgeTypes:a,removeSelectedEdges:d,findEdge:u,findNode:c,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:b,elementsSelectable:m,edgesUpdatable:_,edgesFocusable:y}=lt(),v=Re(()=>u(e.id)),g=iw(v.value,o),p=vn(Ns),E=an(),S=Pe(!1),A=Pe(!1),k=Pe(""),I=Pe(null),x=Pe("source"),w=Pe(null),N=nt(()=>typeof v.value.selectable>"u"?m.value:v.value.selectable),P=nt(()=>typeof v.value.updatable>"u"?_.value:v.value.updatable),C=nt(()=>typeof v.value.focusable>"u"?y.value:v.value.focusable);rr(tw,e.id),rr(nw,w);const L=Re(()=>v.value.class instanceof Function?v.value.class(v.value):v.value.class),D=Re(()=>v.value.style instanceof Function?v.value.style(v.value):v.value.style),V=Re(()=>{const T=v.value.type||"default",M=p==null?void 0:p[`edge-${T}`];if(M)return M;let B=v.value.template??a.value[T];if(typeof B=="string"&&E){const K=Object.keys(E.appContext.components);K&&K.includes(T)&&(B=Io(T,!1))}return B&&typeof B!="string"?B:(o.error(new It(xt.EDGE_TYPE_MISSING,B)),!1)}),{handlePointerDown:Q}=zp({nodeId:k,handleId:I,type:x,isValidConnection:f,edgeUpdaterType:x,onEdgeUpdate:R,onEdgeUpdateEnd:F});return()=>{const T=c(v.value.source),M=c(v.value.target),B="pathOptions"in v.value?v.value.pathOptions:{};if(!T&&!M)return o.error(new It(xt.EDGE_SOURCE_TARGET_MISSING,v.value.id,v.value.source,v.value.target)),null;if(!T)return o.error(new It(xt.EDGE_SOURCE_MISSING,v.value.id,v.value.source)),null;if(!M)return o.error(new It(xt.EDGE_TARGET_MISSING,v.value.id,v.value.target)),null;if(!v.value||v.value.hidden||T.hidden||M.hidden)return null;let K;n.value===ui.Strict?K=T.handleBounds.source:K=[...T.handleBounds.source||[],...T.handleBounds.target||[]];const z=Sf(K,v.value.sourceHandle);let U;n.value===ui.Strict?U=M.handleBounds.target:U=[...M.handleBounds.target||[],...M.handleBounds.source||[]];const Y=Sf(U,v.value.targetHandle),te=(z==null?void 0:z.position)||Ne.Bottom,re=(Y==null?void 0:Y.position)||Ne.Top,{x:ee,y:ue}=Ql(T,z,te),{x:X,y:le}=Ql(M,Y,re);return v.value.sourceX=ee,v.value.sourceY=ue,v.value.targetX=X,v.value.targetY=le,He("g",{ref:w,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${V.value===!1?"default":v.value.type||"default"}`,s.value,L.value,{updating:S.value,selected:v.value.selected,animated:v.value.animated,inactive:!N.value}],onClick:Z,onContextmenu:G,onDblclick:H,onMouseenter:J,onMousemove:oe,onMouseleave:ie,onKeyDown:C.value?ce:void 0,tabIndex:C.value?0:void 0,"aria-label":v.value.ariaLabel===null?void 0:v.value.ariaLabel||`Edge from ${v.value.source} to ${v.value.target}`,"aria-describedby":C.value?`${Sp}-${t}`:void 0,role:C.value?"button":"img"},[A.value?null:He(V.value===!1?a.value.default:V.value,{id:e.id,sourceNode:T,targetNode:M,source:v.value.source,target:v.value.target,type:v.value.type,updatable:P.value,selected:v.value.selected,animated:v.value.animated,label:v.value.label,labelStyle:v.value.labelStyle,labelShowBg:v.value.labelShowBg,labelBgStyle:v.value.labelBgStyle,labelBgPadding:v.value.labelBgPadding,labelBgBorderRadius:v.value.labelBgBorderRadius,data:v.value.data,events:{...v.value.events,...g.on},style:D.value,markerStart:`url('#${No(v.value.markerStart,t)}')`,markerEnd:`url('#${No(v.value.markerEnd,t)}')`,sourcePosition:te,targetPosition:re,sourceX:ee,sourceY:ue,targetX:X,targetY:le,sourceHandleId:v.value.sourceHandle,targetHandleId:v.value.targetHandle,interactionWidth:v.value.interactionWidth,...B}),[P.value==="source"||P.value===!0?[He("g",{onMousedown:se,onMouseenter:W,onMouseout:$},He($f,{position:te,centerX:ee,centerY:ue,radius:i.value,type:"source","data-type":"source"}))]:null,P.value==="target"||P.value===!0?[He("g",{onMousedown:ae,onMouseenter:W,onMouseout:$},He($f,{position:re,centerX:X,centerY:le,radius:i.value,type:"target","data-type":"target"}))]:null]])};function W(){S.value=!0}function $(){S.value=!1}function R(T,M){g.emit.update({event:T,edge:v.value,connection:M})}function F(T){g.emit.updateEnd({event:T,edge:v.value}),A.value=!1}function j(T,M){T.button===0&&(A.value=!0,k.value=M?v.value.target:v.value.source,I.value=(M?v.value.targetHandle:v.value.sourceHandle)??"",x.value=M?"target":"source",g.emit.updateStart({event:T,edge:v.value}),Q(T))}function Z(T){var M;const B={event:T,edge:v.value};N.value&&(l.value=!1,v.value.selected&&h.value?(d([v.value]),(M=w.value)==null||M.blur()):r([v.value])),g.emit.click(B)}function G(T){g.emit.contextMenu({event:T,edge:v.value})}function H(T){g.emit.doubleClick({event:T,edge:v.value})}function J(T){g.emit.mouseEnter({event:T,edge:v.value})}function oe(T){g.emit.mouseMove({event:T,edge:v.value})}function ie(T){g.emit.mouseLeave({event:T,edge:v.value})}function se(T){j(T,!0)}function ae(T){j(T,!1)}function ce(T){var M;!b.value&&Op.includes(T.key)&&N.value&&(T.key==="Escape"?((M=w.value)==null||M.blur(),d([u(e.id)])):r([u(e.id)]))}}}),dE=fE,hE={[Ne.Left]:Ne.Right,[Ne.Right]:Ne.Left,[Ne.Top]:Ne.Bottom,[Ne.Bottom]:Ne.Top},pE=it({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:r,connectionStartHandle:n,connectionEndHandle:i,connectionPosition:o,connectionLineType:l,connectionLineStyle:s,connectionLineOptions:a,connectionStatus:d,viewport:u,findNode:c}=lt(),f=(e=vn(Ns))==null?void 0:e["connection-line"],h=Re(()=>{var v;return c((v=n.value)==null?void 0:v.nodeId)}),b=Re(()=>{var v;return c((v=i.value)==null?void 0:v.nodeId)??null}),m=Re(()=>({x:(o.value.x-u.value.x)/u.value.zoom,y:(o.value.y-u.value.y)/u.value.zoom})),_=Re(()=>a.value.markerStart?`url(#${No(a.value.markerStart,t)})`:""),y=Re(()=>a.value.markerEnd?`url(#${No(a.value.markerEnd,t)})`:"");return()=>{var v,g,p,E;if(!h.value||!n.value)return null;const S=n.value.handleId,A=n.value.type,k=h.value.handleBounds;let I=k==null?void 0:k[A];if(r.value===ui.Loose&&(I=I||(k==null?void 0:k[A==="source"?"target":"source"])),!I)return null;const x=(S?I.find(W=>W.id===S):I[0])??null,w=(x==null?void 0:x.position)||Ne.Top,{x:N,y:P}=Ql(h.value,x,w);let C=null;b.value&&((v=i.value)!=null&&v.handleId)&&(r.value===ui.Strict?C=((g=b.value.handleBounds[A==="source"?"target":"source"])==null?void 0:g.find(W=>{var $;return W.id===(($=i.value)==null?void 0:$.handleId)}))||null:C=((p=[...b.value.handleBounds.source||[],...b.value.handleBounds.target||[]])==null?void 0:p.find(W=>{var $;return W.id===(($=i.value)==null?void 0:$.handleId)}))||null);const L=((E=i.value)==null?void 0:E.position)??(w?hE[w]:null);if(!w||!L)return null;const D=l.value??a.value.type??Wr.Bezier;let V="";const Q={sourceX:N,sourceY:P,sourcePosition:w,targetX:m.value.x,targetY:m.value.y,targetPosition:L};return D===Wr.Bezier?[V]=Yp(Q):D===Wr.Step?[V]=iu({...Q,borderRadius:0}):D===Wr.SmoothStep?[V]=iu(Q):D===Wr.SimpleBezier?[V]=Zp(Q):V=`M${N},${P} ${m.value.x},${m.value.y}`,He("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},He("g",{class:"vue-flow__connection"},f?He(f,{sourceX:N,sourceY:P,sourcePosition:w,targetX:m.value.x,targetY:m.value.y,targetPosition:L,sourceNode:h.value,sourceHandle:x,targetNode:b.value,targetHandle:C,markerEnd:y.value,markerStart:_.value,connectionStatus:d.value}):He("path",{d:V,class:[a.value.class,d,"vue-flow__connection-path"],style:{...s.value,...a.value.style},"marker-end":y.value,"marker-start":_.value})))}}}),vE=pE,gE=["id","markerWidth","markerHeight","markerUnits","orient"],mE={name:"MarkerType",compatConfig:{MODE:3}},yE=it({...mE,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,r)=>(me(),Se("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===pe(Ja).ArrowClosed?(me(),Se("polyline",{key:0,style:_t({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):tt("",!0),t.type===pe(Ja).Arrow?(me(),Se("polyline",{key:1,style:_t({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):tt("",!0)],8,gE))}}),bE={class:"vue-flow__marker vue-flow__container"},_E={name:"MarkerDefinitions",compatConfig:{MODE:3}},wE=it({..._E,setup(e){const{id:t,edges:r,connectionLineOptions:n,defaultMarkerColor:i}=lt(),o=Re(()=>{const l=new Set,s=[],a=d=>{if(d){const u=No(d,t);l.has(u)||(typeof d=="object"?s.push({...d,id:u,color:d.color||i.value}):s.push({id:u,color:i.value,type:d}),l.add(u))}};for(const d of[n.value.markerEnd,n.value.markerStart])a(d);for(const d of r.value)for(const u of[d.markerStart,d.markerEnd])a(u);return s.sort((d,u)=>d.id.localeCompare(u.id))});return(l,s)=>(me(),Se("svg",bE,[ke("defs",null,[(me(!0),Se(We,null,Pr(o.value,a=>(me(),kt(yE,{id:a.id,key:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,"stroke-width":a.strokeWidth,orient:a.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),EE={name:"Edges",compatConfig:{MODE:3}},xE=it({...EE,setup(e){const{findNode:t,getEdges:r,elevateEdgesOnSelect:n}=lt();return(i,o)=>(me(),Se(We,null,[Ee(wE),(me(!0),Se(We,null,Pr(pe(r),l=>(me(),Se("svg",{key:l.id,class:"vue-flow__edges vue-flow__container",style:_t({zIndex:pe(K_)(l,pe(t),pe(n))})},[Ee(pe(dE),{id:l.id},null,8,["id"])],4))),128)),Ee(pe(vE))],64))}}),SE=it({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:r,selectNodesOnDrag:n,nodesSelectionActive:i,multiSelectionActive:o,emits:l,removeSelectedNodes:s,addSelectedNodes:a,updateNodeDimensions:d,onUpdateNodeInternals:u,getNodeTypes:c,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:b,ariaLiveMessage:m,snapToGrid:_,snapGrid:y,nodeDragThreshold:v,nodesDraggable:g,elementsSelectable:p,nodesConnectable:E,nodesFocusable:S}=lt(),A=Pe(null);rr(Fp,A),rr(Xu,e.id);const k=vn(Ns),I=an(),x=Up(),{node:w,parentNode:N}=Vp(e.id),P=nt(()=>typeof w.draggable>"u"?g.value:w.draggable),C=nt(()=>typeof w.selectable>"u"?p.value:w.selectable),L=nt(()=>typeof w.connectable>"u"?E.value:w.connectable),D=nt(()=>typeof w.focusable>"u"?S.value:w.focusable),V=nt(()=>!!w.dimensions.width&&!!w.dimensions.height),Q=Re(()=>{const M=w.type||"default",B=k==null?void 0:k[`node-${M}`];if(B)return B;let K=w.template||c.value[M];if(typeof K=="string"&&I){const z=Object.keys(I.appContext.components);z&&z.includes(M)&&(K=Io(M,!1))}return K&&typeof K!="string"?K:(l.error(new It(xt.NODE_TYPE_MISSING,K)),!1)}),{emit:W,on:$}=sw(w,l),R=Hp({id:e.id,el:A,disabled:()=>!P.value,selectable:C,dragHandle:()=>w.dragHandle,onStart(M){W.dragStart(M)},onDrag(M){W.drag(M)},onStop(M){W.dragStop(M)},onClick(M){ce(M)}}),F=Re(()=>w.class instanceof Function?w.class(w):w.class),j=Re(()=>{const M=(w.style instanceof Function?w.style(w):w.style)||{},B=w.width instanceof Function?w.width(w):w.width,K=w.height instanceof Function?w.height(w):w.height;return B&&(M.width=typeof B=="string"?B:`${B}px`),K&&(M.height=typeof K=="string"?K:`${K}px`),M}),Z=nt(()=>Number(w.zIndex??j.value.zIndex??0));return u(M=>{(M.includes(e.id)||!M.length)&&H()}),Dt(()=>{$e(()=>w.hidden,(M=!1,B,K)=>{!M&&A.value&&(e.resizeObserver.observe(A.value),K(()=>{A.value&&e.resizeObserver.unobserve(A.value)}))},{immediate:!0,flush:"post"})}),$e([()=>w.type,()=>w.sourcePosition,()=>w.targetPosition],()=>{Xt(()=>{d([{id:e.id,nodeElement:A.value,forceUpdate:!0}])})}),$e([()=>w.position.x,()=>w.position.y,()=>{var M;return(M=N.value)==null?void 0:M.computedPosition.x},()=>{var M;return(M=N.value)==null?void 0:M.computedPosition.y},()=>{var M;return(M=N.value)==null?void 0:M.computedPosition.z},Z,()=>w.selected,()=>w.dimensions.height,()=>w.dimensions.width,()=>{var M;return(M=N.value)==null?void 0:M.dimensions.height},()=>{var M;return(M=N.value)==null?void 0:M.dimensions.width}],([M,B,K,z,U,Y])=>{const te={x:M,y:B,z:Y+(h.value&&w.selected?1e3:0)};typeof K<"u"&&typeof z<"u"?w.computedPosition=H_({x:K,y:z,z:U},te):w.computedPosition=te},{flush:"post",immediate:!0}),$e([()=>w.extent,f],([M,B],[K,z])=>{(M!==K||B!==z)&&G()}),w.extent==="parent"||typeof w.extent=="object"&&"range"in w.extent&&w.extent.range==="parent"?Va(()=>V).toBe(!0).then(G):G(),()=>w.hidden?null:He("div",{ref:A,"data-id":w.id,class:["vue-flow__node",`vue-flow__node-${Q.value===!1?"default":w.type||"default"}`,{[r.value]:P.value,dragging:R==null?void 0:R.value,draggable:P.value,selected:w.selected,selectable:C.value,parent:w.isParent},F.value],style:{visibility:V.value?"visible":"hidden",zIndex:w.computedPosition.z??Z.value,transform:`translate(${w.computedPosition.x}px,${w.computedPosition.y}px)`,pointerEvents:C.value||P.value?"all":"none",...j.value},tabIndex:D.value?0:void 0,role:D.value?"button":void 0,"aria-describedby":b.value?void 0:`${xp}-${t}`,"aria-label":w.ariaLabel,onMouseenter:J,onMousemove:oe,onMouseleave:ie,onContextmenu:se,onClick:ce,onDblclick:ae,onKeydown:T},[He(Q.value===!1?c.value.default:Q.value,{id:w.id,type:w.type,data:w.data,events:{...w.events,...$},selected:w.selected,resizing:w.resizing,dragging:R.value,connectable:L.value,position:w.computedPosition,dimensions:w.dimensions,isValidTargetPos:w.isValidTargetPos,isValidSourcePos:w.isValidSourcePos,parent:w.parentNode,parentNodeId:w.parentNode,zIndex:w.computedPosition.z??Z.value,targetPosition:w.targetPosition,sourcePosition:w.sourcePosition,label:w.label,dragHandle:w.dragHandle,onUpdateNodeInternals:H})]);function G(){const M=w.computedPosition;_.value&&(M.x=y.value[0]*Math.round(M.x/y.value[0]),M.y=y.value[1]*Math.round(M.y/y.value[1]));const{computedPosition:B,position:K}=Gu(w,M,l.error,f.value,N.value);(w.computedPosition.x!==B.x||w.computedPosition.y!==B.y)&&(w.computedPosition={...w.computedPosition,...B}),(w.position.x!==K.x||w.position.y!==K.y)&&(w.position=K)}function H(){A.value&&d([{id:e.id,nodeElement:A.value,forceUpdate:!0}])}function J(M){R!=null&&R.value||W.mouseEnter({event:M,node:w})}function oe(M){R!=null&&R.value||W.mouseMove({event:M,node:w})}function ie(M){R!=null&&R.value||W.mouseLeave({event:M,node:w})}function se(M){return W.contextMenu({event:M,node:w})}function ae(M){return W.doubleClick({event:M,node:w})}function ce(M){C.value&&(!n.value||!P.value||v.value>0)&&ru(w,o.value,a,s,i,!1,A.value),W.click({event:M,node:w})}function T(M){if(!(eu(M)||b.value))if(Op.includes(M.key)&&C.value){const B=M.key==="Escape";ru(w,o.value,a,s,i,B,A.value)}else P.value&&w.selected&&ki[M.key]&&(m.value=`Moved selected node ${M.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~w.position.x}, y: ${~~w.position.y}`,x({x:ki[M.key].x,y:ki[M.key].y},M.shiftKey))}}}),OE=SE;function NE(e={includeHiddenNodes:!1}){const{nodes:t}=lt();return Re(()=>{if(t.value.length===0)return!1;for(const r of t.value)if((e.includeHiddenNodes||!r.hidden)&&((r==null?void 0:r.handleBounds)===void 0||r.dimensions.width===0||r.dimensions.height===0))return!1;return!0})}const AE={class:"vue-flow__nodes vue-flow__container"},TE={name:"Nodes",compatConfig:{MODE:3}},kE=it({...TE,setup(e){const{getNodes:t,updateNodeDimensions:r,emits:n}=lt(),i=NE(),o=Pe();return $e(i,l=>{l&&Xt(()=>{n.nodesInitialized(t.value)})},{immediate:!0}),Dt(()=>{o.value=new ResizeObserver(l=>{const s=l.map(a=>({id:a.target.getAttribute("data-id"),nodeElement:a.target,forceUpdate:!0}));Xt(()=>r(s))})}),Br(()=>{var l;return(l=o.value)==null?void 0:l.disconnect()}),(l,s)=>(me(),Se("div",AE,[o.value?(me(!0),Se(We,{key:0},Pr(pe(t),(a,d,u,c)=>{const f=[a.id];if(c&&c.key===a.id&&$u(c,f))return c;const h=(me(),kt(pe(OE),{id:a.id,key:a.id,"resize-observer":o.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):tt("",!0)]))}});function CE(){const{emits:e}=lt();Dt(()=>{if(qp()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new It(xt.MISSING_STYLES))}})}const ME=ke("div",{class:"vue-flow__edge-labels"},null,-1),PE={name:"VueFlow",compatConfig:{MODE:3}},IE=it({...PE,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:r}){const n=e,i=Dd(),o=oa(n,"modelValue",r),l=oa(n,"nodes",r),s=oa(n,"edges",r),a=lt(n),d=cw({modelValue:o,nodes:l,edges:s},n,a);return dw(r,a.hooks),aE(),CE(),rr(Ns,i),Fi(()=>{d()}),t(a),(u,c)=>(me(),Se("div",{ref:pe(a).vueFlowRef,class:"vue-flow"},[Ee(nE,null,{default:yt(()=>[Ee(xE),ME,Ee(kE),dt(u.$slots,"zoom-pane")]),_:3}),dt(u.$slots,"default"),Ee(sE)],512))}}),RE={name:"Panel",compatConfig:{MODE:3}},LE=it({...RE,props:{position:{}},setup(e){const t=e,{userSelectionActive:r}=lt(),n=Re(()=>`${t.position}`.split("-"));return(i,o)=>(me(),Se("div",{class:Qt(["vue-flow__panel",n.value]),style:_t({pointerEvents:pe(r)?"none":"all"})},[dt(i.$slots,"default")],6))}});var Ln=(e=>(e.Lines="lines",e.Dots="dots",e))(Ln||{});const Qp=function({dimensions:e,size:t,color:r}){return He("path",{stroke:r,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Jp=function({radius:e,color:t}){return He("circle",{cx:e,cy:e,r:e,fill:t})};Ln.Lines+"",Ln.Dots+"";const DE={[Ln.Dots]:"#81818a",[Ln.Lines]:"#eee"},$E=["id","x","y","width","height","patternTransform"],BE={key:2,height:"100",width:"100"},qE=["fill"],FE=["x","y","fill"],HE={name:"Background",compatConfig:{MODE:3}},jE=it({...HE,props:{id:{},variant:{default:()=>Ln.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:2}},setup(e){const{id:t,viewport:r}=lt(),n=Re(()=>{const[l,s]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],a=[l*r.value.zoom||1,s*r.value.zoom||1],d=e.size*r.value.zoom,u=e.variant===Ln.Dots?[d/e.offset,d/e.offset]:[a[0]/e.offset,a[1]/e.offset];return{scaledGap:a,offset:u,size:d}}),i=nt(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),o=nt(()=>e.color||e.patternColor||DE[e.variant||Ln.Dots]);return(l,s)=>(me(),Se("svg",{class:"vue-flow__background vue-flow__container",style:_t({height:`${l.height>100?100:l.height}%`,width:`${l.width>100?100:l.width}%`})},[dt(l.$slots,"pattern-container",{id:i.value},()=>[ke("pattern",{id:i.value,x:pe(r).x%n.value.scaledGap[0],y:pe(r).y%n.value.scaledGap[1],width:n.value.scaledGap[0],height:n.value.scaledGap[1],patternTransform:`translate(-${n.value.offset[0]},-${n.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[dt(l.$slots,"pattern",{},()=>[l.variant===pe(Ln).Lines?(me(),kt(pe(Qp),{key:0,size:l.lineWidth,color:o.value,dimensions:n.value.scaledGap},null,8,["size","color","dimensions"])):l.variant===pe(Ln).Dots?(me(),kt(pe(Jp),{key:1,color:o.value,radius:n.value.size/l.offset},null,8,["color","radius"])):tt("",!0),l.bgColor?(me(),Se("svg",BE,[ke("rect",{width:"100%",height:"100%",fill:l.bgColor},null,8,qE)])):tt("",!0)])],8,$E)]),ke("rect",{x:l.x,y:l.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,FE),dt(l.$slots,"default",{id:i.value})],4))}}),zE={name:"ControlButton",compatConfig:{MODE:3}},VE=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},UE={class:"vue-flow__controls-button"};function WE(e,t,r,n,i,o){return me(),Se("button",UE,[dt(e.$slots,"default")])}const xr=VE(zE,[["render",WE]]),KE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},GE=ke("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),YE=[GE];function ZE(e,t){return me(),Se("svg",KE,YE)}const XE={render:ZE},QE={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},JE=ke("path",{d:"M0 0h32v4.2H0z"},null,-1),ex=[JE];function tx(e,t){return me(),Se("svg",QE,ex)}const nx={render:tx},rx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},ix=ke("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),ox=[ix];function lx(e,t){return me(),Se("svg",rx,ox)}const sx={render:lx},ax={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},ux=ke("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),cx=[ux];function fx(e,t){return me(),Se("svg",ax,cx)}const dx={render:fx},hx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},px=ke("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),vx=[px];function gx(e,t){return me(),Se("svg",hx,vx)}const mx={render:gx},yx={name:"Controls",compatConfig:{MODE:3}},bx=it({...yx,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ep.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:r,nodesConnectable:n,elementsSelectable:i,setInteractive:o,zoomIn:l,zoomOut:s,fitView:a,viewport:d,minZoom:u,maxZoom:c}=lt(),f=nt(()=>r.value||n.value||i.value),h=nt(()=>d.value.zoom<=u.value),b=nt(()=>d.value.zoom>=c.value);function m(){l(),t("zoomIn")}function _(){s(),t("zoomOut")}function y(){a(e.fitViewParams),t("fitView")}function v(){o(!f.value),t("interactionChange",!f.value)}return(g,p)=>(me(),kt(pe(LE),{class:"vue-flow__controls",position:g.position},{default:yt(()=>[dt(g.$slots,"top"),g.showZoom?(me(),Se(We,{key:0},[dt(g.$slots,"control-zoom-in",{},()=>[Ee(xr,{class:"vue-flow__controls-zoomin",disabled:b.value,onClick:m},{default:yt(()=>[dt(g.$slots,"icon-zoom-in",{},()=>[(me(),kt(wr(pe(XE))))])]),_:3},8,["disabled"])]),dt(g.$slots,"control-zoom-out",{},()=>[Ee(xr,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:_},{default:yt(()=>[dt(g.$slots,"icon-zoom-out",{},()=>[(me(),kt(wr(pe(nx))))])]),_:3},8,["disabled"])])],64)):tt("",!0),g.showFitView?dt(g.$slots,"control-fit-view",{key:1},()=>[Ee(xr,{class:"vue-flow__controls-fitview",onClick:y},{default:yt(()=>[dt(g.$slots,"icon-fit-view",{},()=>[(me(),kt(wr(pe(sx))))])]),_:3})]):tt("",!0),g.showInteractive?dt(g.$slots,"control-interactive",{key:2},()=>[g.showInteractive?(me(),kt(xr,{key:0,class:"vue-flow__controls-interactive",onClick:v},{default:yt(()=>[f.value?dt(g.$slots,"icon-unlock",{key:0},()=>[(me(),kt(wr(pe(mx))))]):tt("",!0),f.value?tt("",!0):dt(g.$slots,"icon-lock",{key:1},()=>[(me(),kt(wr(pe(dx))))])]),_:3})):tt("",!0)]):tt("",!0),dt(g.$slots,"default")]),_:3},8,["position"]))}});var Ft=[];for(var va=0;va<256;++va)Ft.push((va+256).toString(16).slice(1));function _x(e,t=0){return(Ft[e[t+0]]+Ft[e[t+1]]+Ft[e[t+2]]+Ft[e[t+3]]+"-"+Ft[e[t+4]]+Ft[e[t+5]]+"-"+Ft[e[t+6]]+Ft[e[t+7]]+"-"+Ft[e[t+8]]+Ft[e[t+9]]+"-"+Ft[e[t+10]]+Ft[e[t+11]]+Ft[e[t+12]]+Ft[e[t+13]]+Ft[e[t+14]]+Ft[e[t+15]]).toLowerCase()}var yl,wx=new Uint8Array(16);function Ex(){if(!yl&&(yl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yl(wx)}var xx=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Bf={randomUUID:xx};function Yr(e,t,r){if(Bf.randomUUID&&!t&&!e)return Bf.randomUUID();e=e||{};var n=e.random||(e.rng||Ex)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,_x(n)}const oo=fi([{id:Yr(),type:"text-area",position:{x:0,y:0},data:{label:"Node 1",body:"",components:[]}},{id:Yr(),type:"text-field",position:{x:600,y:0},data:{label:"Node 2"}},{id:Yr(),type:"text-area",position:{x:1100,y:0},data:{label:"Node 3",body:""}},{id:Yr(),type:"note",position:{x:485,y:175},data:{label:"Welcome to Corkboard!",body:"Getting Started:
  1. Right click the background to bring up the context menu
  2. Double click nodes to delete and modify them
  3. Drag attribute nodes over text area nodes to combine them
  4. Save & load projects using the toolbar in the upper-left
"}}]),Sx=fi([{id:Yr(),source:oo[0].id,target:oo[1].id,label:"double-click to rename",updatable:!0},{id:Yr(),source:oo[1].id,target:oo[2].id,label:"label",updatable:!0}]),ev=Pe(!1),tv=Pe("");let ou;function Ox(){return{isVisible:ev,message:tv,confirmDeletion:e=>{ou&&ou(e)}}}function Ju(e){return ev.value=!0,tv.value=e,new Promise(t=>{ou=t})}function Nx(e){return Ju(He("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},["Are you sure?",He("br"),He("span",`[ELEMENT_ID: ${e}]`)]))}function Ax(){return Ju(He("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},["Reset workspace?",He("br"),"This cannot be undone."]))}function Tx(){return{confirm:Ju,confirmDefault:Nx,confirmReset:Ax}}const kx={key:0,class:"dialog-overlay"},Cx={class:"dialog"},Mx=ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"},[ke("path",{fill:"#e53e3e",d:"M7 21q-.825 0-1.412-.587T5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.587 1.413T17 21zm2-4h2V8H9zm4 0h2V8h-2z"})],-1),Px={key:0},Ix={__name:"DialogConfirmDelete",setup(e){const{isVisible:t,message:r,confirmDeletion:n}=Ox();function i(){n(!0),t.value=!1}function o(){n(!1),t.value=!1}return(l,s)=>pe(t)?(me(),Se("div",kx,[ke("div",Cx,[Mx,typeof pe(r)=="string"?(me(),Se("p",Px,kr(pe(r)),1)):(me(),kt(wr(pe(r)),{key:1})),ke("div",{class:"actions"},[ke("button",{onClick:i},"Confirm"),ke("button",{onClick:o},"Cancel")])])])):tt("",!0)}};var lu="http://www.w3.org/1999/xhtml";const qf={svg:"http://www.w3.org/2000/svg",xhtml:lu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nv(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),qf.hasOwnProperty(t)?{space:qf[t],local:e}:e}function Rx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===lu&&t.documentElement.namespaceURI===lu?t.createElement(e):t.createElementNS(r,e)}}function Lx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rv(e){var t=nv(e);return(t.local?Lx:Rx)(t)}function Dx(){}function iv(e){return e==null?Dx:function(){return this.querySelector(e)}}function $x(e){typeof e!="function"&&(e=iv(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i=g&&(g=v+1);!(E=_[g])&&++g=0;)(l=n[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function c2(e){e||(e=f2);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;ot?1:e>=t?0:NaN}function d2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function h2(){return Array.from(this)}function p2(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?O2:typeof t=="function"?A2:N2)(e,t,r??"")):k2(this.node(),e)}function k2(e,t){return e.style.getPropertyValue(t)||sv(e).getComputedStyle(e,null).getPropertyValue(t)}function C2(e){return function(){delete this[e]}}function M2(e,t){return function(){this[e]=t}}function P2(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function I2(e,t){return arguments.length>1?this.each((t==null?C2:typeof t=="function"?P2:M2)(e,t)):this.node()[e]}function av(e){return e.trim().split(/^|\s+/)}function ec(e){return e.classList||new uv(e)}function uv(e){this._node=e,this._names=av(e.getAttribute("class")||"")}uv.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 cv(e,t){for(var r=ec(e),n=-1,i=t.length;++n=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function sS(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r{}};function hv(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Pl.prototype=hv.prototype={constructor:Pl,on:function(e,t){var r=this._,n=yS(e+"",r),i,o=-1,l=n.length;if(arguments.length<2){for(;++o0)for(var r=new Array(i),n=0,i,o;n()=>e;function su(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:l,y:s,dx:a,dy:d,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:u}})}su.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function xS(e){return!e.ctrlKey&&!e.button}function SS(){return this.parentNode}function OS(e,t){return t??{x:e.x,y:e.y}}function NS(){return navigator.maxTouchPoints||"ontouchstart"in this}function AS(){var e=xS,t=SS,r=OS,n=NS,i={},o=hv("start","drag","end"),l=0,s,a,d,u,c=0;function f(p){p.on("mousedown.drag",h).filter(n).on("touchstart.drag",_).on("touchmove.drag",y,_S).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(p,E){if(!(u||!e.call(this,p,E))){var S=g(this,t.call(this,p,E),p,E,"mouse");S&&(Ao(p.view).on("mousemove.drag",b,To).on("mouseup.drag",m,To),wS(p.view),ga(p),d=!1,s=p.clientX,a=p.clientY,S("start",p))}}function b(p){if(Ci(p),!d){var E=p.clientX-s,S=p.clientY-a;d=E*E+S*S>c}i.mouse("drag",p)}function m(p){Ao(p.view).on("mousemove.drag mouseup.drag",null),ES(p.view,d),Ci(p),i.mouse("end",p)}function _(p,E){if(e.call(this,p,E)){var S=p.changedTouches,A=t.call(this,p,E),k=S.length,I,x;for(I=0;I(e.Line="line",e.Handle="handle",e))(Bi||{});function TS({width:e,prevWidth:t,height:r,prevHeight:n,invertX:i,invertY:o}){const l=e-t,s=r-n,a=[l>0?1:l<0?-1:0,s>0?1:s<0?-1:0];return l&&i&&(a[0]=a[0]*-1),s&&o&&(a[1]=a[1]*-1),a}const kS={[Bi.Line]:"right",[Bi.Handle]:"bottom-right"},CS={[Bi.Line]:"borderColor",[Bi.Handle]:"backgroundColor"},MS={name:"ResizeControl",compatConfig:{MODE:3}},jf=it({...MS,props:{nodeId:{},color:{},minWidth:{default:10},minHeight:{default:10},maxWidth:{default:Number.MAX_VALUE},maxHeight:{default:Number.MAX_VALUE},position:{},variant:{default:"handle"},shouldResize:{},keepAspectRatio:{type:[Boolean,Number],default:!1}},emits:["resizeStart","resize","resizeEnd"],setup(e,{emit:t}){const r=e,n={width:0,height:0,x:0,y:0},i={...n,pointerX:0,pointerY:0,aspectRatio:1},{findNode:o,emits:l}=lt(),s=jp(),a=Pe();let d=i,u=n;const c=nt(()=>r.position??kS[r.variant]),f=nt(()=>c.value.split("-")),h=nt(()=>r.color?{[CS[r.variant]]:r.color}:{});return lh(b=>{if(!a.value||!r.nodeId)return;const m=Ao(a.value),_=c.value.includes("right")||c.value.includes("left"),y=c.value.includes("bottom")||c.value.includes("top"),v=c.value.includes("left"),g=c.value.includes("top"),p=AS().on("start",E=>{const S=o(r.nodeId),{xSnapped:A,ySnapped:k}=s(E);u={width:(S==null?void 0:S.dimensions.width)??0,height:(S==null?void 0:S.dimensions.height)??0,x:(S==null?void 0:S.position.x)??0,y:(S==null?void 0:S.position.y)??0},d={...u,pointerX:A,pointerY:k,aspectRatio:u.width/u.height},t("resizeStart",{event:E,params:u})}).on("drag",E=>{var S;const{xSnapped:A,ySnapped:k}=s(E),I=o(r.nodeId);if(I){const x=[],{pointerX:w,pointerY:N,width:P,height:C,x:L,y:D,aspectRatio:V}=d,{x:Q,y:W,width:$,height:R}=u,F=Math.floor(_?A-w:0),j=Math.floor(y?k-N:0);let Z=or(P+(v?-F:F),r.minWidth,r.maxWidth),G=or(C+(g?-j:j),r.minHeight,r.maxHeight);if(r.keepAspectRatio){const ae=Z/G;let ce=V;typeof r.keepAspectRatio=="number"&&ae!==r.keepAspectRatio&&(ce=r.keepAspectRatio);const T=_&&y,M=_&&!y,B=y&&!_;Z=ae<=ce&&T||B?G*ce:Z,G=ae>ce&&T||M?Z/ce:G,Z>=r.maxWidth?(Z=r.maxWidth,G=r.maxWidth/ce):Z<=r.minWidth&&(Z=r.minWidth,G=r.minWidth/ce),G>=r.maxHeight?(G=r.maxHeight,Z=r.maxHeight*ce):G<=r.minHeight&&(G=r.minHeight,Z=r.minHeight*ce)}const H=Z!==$,J=G!==R;if(v||g){const ae=v?L-(Z-P):L,ce=g?D-(G-C):D,T=ae!==Q&&H,M=ce!==W&&J;if(T||M){const B={id:I.id,type:"position",from:I.position,position:{x:T?ae:Q,y:M?ce:W}};x.push(B),u.x=B.position.x,u.y=B.position.y}}if(r.nodeId&&(H||J)){const ae={id:r.nodeId,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Z,height:G}};x.push(ae),u.width=Z,u.height=G}if(x.length===0)return;const oe=TS({width:u.width,prevWidth:$,height:u.height,prevHeight:R,invertX:v,invertY:g}),ie={...u,direction:oe};if(((S=r.shouldResize)==null?void 0:S.call(r,E,ie))===!1)return;t("resize",{event:E,params:ie}),l.nodesChange(x)}}).on("end",E=>{if(r.nodeId){const S={id:r.nodeId,type:"dimensions",resizing:!1};t("resizeEnd",{event:E,params:u}),l.nodesChange([S])}});m.call(p),b(()=>{m.on(".drag",null)})}),(b,m)=>(me(),Se("div",{ref_key:"resizeControlRef",ref:a,class:Qt(["vue-flow__resize-control nodrag",[...f.value,b.variant]]),style:_t(h.value)},[dt(b.$slots,"default")],6))}}),PS={name:"NodeResizer",compatConfig:{MODE:3},inheritAttrs:!1},Ms=it({...PS,props:{nodeId:{},color:{},handleClassName:{},handleStyle:{},lineClassName:{},lineStyle:{},isVisible:{type:Boolean,default:!0},minWidth:{},minHeight:{},maxWidth:{},maxHeight:{},shouldResize:{},keepAspectRatio:{type:[Boolean,Number]}},emits:["resizeStart","resize","resizeEnd"],setup(e,{emit:t}){const r=e,{findNode:n,emits:i}=lt(),o=["top-left","top-right","bottom-left","bottom-right"],l=["top","right","bottom","left"],s=vn(Xu,null),a=nt(()=>typeof r.nodeId=="string"?r.nodeId:s),d=Re(()=>n(a.value));return $e([()=>r.minWidth,()=>r.minHeight,()=>r.maxWidth,()=>r.maxHeight,()=>{var u;return!!((u=d.value)!=null&&u.dimensions.width)&&!!d.value.dimensions.height}],([u,c,f,h,b])=>{const m=d.value;if(m&&b){const _={id:m.id,type:"dimensions",updateStyle:!0,dimensions:{width:m.dimensions.width,height:m.dimensions.height}};u&&m.dimensions.widthf&&(_.dimensions.width=f),h&&m.dimensions.height>h&&(_.dimensions.height=h),(_.dimensions.width!==m.dimensions.width||_.dimensions.height!==m.dimensions.height)&&i.nodesChange([_])}},{flush:"post",immediate:!0}),(u,c)=>u.isVisible?(me(),Se(We,{key:0},[(me(),Se(We,null,Pr(l,f=>Ee(jf,{key:f,class:Qt(u.lineClassName),style:_t(u.lineStyle),"node-id":a.value,position:f,variant:pe(Bi).Line,"keep-aspect-ratio":u.keepAspectRatio,color:u.color,"min-width":u.minWidth,"min-height":u.minHeight,"max-width":u.maxWidth,"max-height":u.maxHeight,"should-resize":u.shouldResize,onResizeStart:c[0]||(c[0]=h=>t("resizeStart",h)),onResize:c[1]||(c[1]=h=>t("resize",h)),onResizeEnd:c[2]||(c[2]=h=>t("resizeEnd",h))},null,8,["class","style","node-id","position","variant","keep-aspect-ratio","color","min-width","min-height","max-width","max-height","should-resize"])),64)),(me(),Se(We,null,Pr(o,f=>Ee(jf,{key:f,class:Qt(u.handleClassName),style:_t(u.handleStyle),"node-id":a.value,position:f,color:u.color,"min-width":u.minWidth,"min-height":u.minHeight,"max-width":u.maxWidth,"max-height":u.maxHeight,"should-resize":u.shouldResize,"keep-aspect-ratio":u.keepAspectRatio,onResizeStart:c[3]||(c[3]=h=>t("resizeStart",h)),onResize:c[4]||(c[4]=h=>t("resize",h)),onResizeEnd:c[5]||(c[5]=h=>t("resizeEnd",h))},null,8,["class","style","node-id","position","color","min-width","min-height","max-width","max-height","should-resize","keep-aspect-ratio"])),64))],64)):tt("",!0)}}),IS={class:"node-background"},RS={__name:"ResizableNode",props:["data"],setup(e){return(t,r)=>(me(),Se(We,null,[Ee(pe(Ms),{"min-width":"100","min-height":"40","max-width":"200"}),ke("div",IS,[Lo(kr(e.data.label)+" ",1),Ee(pe(Hn),{type:"target",position:pe(Ne).Left},null,8,["position"]),Ee(pe(Hn),{type:"source",position:pe(Ne).Right},null,8,["position"])])],64))}},LS={class:"node-background"},DS=["id"],$S={__name:"TextFieldNode",props:["id","data"],setup(e){const t=e;return(r,n)=>(me(),Se(We,null,[Ee(pe(Ms),{"min-width":"220","min-height":"50","max-height":"50"}),ke("div",LS,[oi(ke("input",{id:`${e.id}-text-field`,"onUpdate:modelValue":n[0]||(n[0]=i=>t.data.label=i),placeholder:"Write label here...",class:"nodrag text-field-node vue-flow__node-value"},null,8,DS),[[Fn,t.data.label]]),Ee(pe(Hn),{type:"target",position:pe(Ne).Left,connectable:!0},null,8,["position"]),Ee(pe(Hn),{type:"source",position:pe(Ne).Right,connectable:!0},null,8,["position"])])],64))}};function BS(){return{connectComponent:(n,i)=>{if(n.type!="text-area")return;const o=n.data.components;o&&!o.includes(i.id)?o.push(i.id):o||(n.data.components=[i.id])},addAttribute:n=>{const i=n.data.attributes,o="New Attribute";i?i.push(o):i||(n.data.attributes=[o])},deleteComponents:(n,i)=>{for(const o of n.value){if(o.id==i)continue;const l=o.data.components;if(l)for(let s=0;s{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},qS={class:"node-background"},FS={class:"content-wrapper"},HS=["id"],jS={key:0,class:"components-list"},zS=["for"],VS={__name:"TextAreaNode",props:["id","data"],setup(e){lt();const t=e,r=Pe(t.data.components||[]),n=Pe([]),{findNode:i}=lt();return $e(r,o=>{if(n.value=[],o!=null)for(let l=0;lt.data.components,o=>{r.value=o||[]},{deep:!0}),Dt(()=>{if(t.data.components)for(const o of t.data.components){const l=i(o);n.value.push(l)}}),(o,l)=>{const s=Io("QuillEditor");return me(),Se(We,null,[Ee(pe(Ms),{"min-width":"300","min-height":"300"}),ke("div",qS,[ke("div",FS,[oi(ke("input",{id:`${e.id}-text-field`,"onUpdate:modelValue":l[0]||(l[0]=a=>t.data.label=a),placeholder:"Write label here...",class:"nodrag text-field-node vue-flow__node-value"},null,8,HS),[[Fn,t.data.label]]),Ee(s,{id:`${e.id}-text-area`,content:t.data.body,"onUpdate:content":l[1]||(l[1]=a=>t.data.body=a),contentType:"html",placeholder:"Write text here...",theme:"snow",toolbar:["bold","italic","underline","link","code"],class:"nodrag"},null,8,["id","content"]),n.value&&n.value.length>0?(me(),Se("div",jS,[(me(!0),Se(We,null,Pr(n.value,(a,d)=>(me(),Se("div",{key:d,class:"component-item"},[ke("label",{for:`${e.id}-component-${d}`},kr(a.data.label?a.data.label:a.id),9,zS)]))),128))])):tt("",!0),Ee(pe(Hn),{type:"target",position:pe(Ne).Left,connectable:!0},null,8,["position"]),Ee(pe(Hn),{type:"source",position:pe(Ne).Right,connectable:!0},null,8,["position"])])])],64)}}},US=tc(VS,[["__scopeId","data-v-ed2a4b5c"]]),WS={class:"node-background node-border display: flex"},KS={class:"content-wrapper"},GS=["id"],YS={class:"attributes-list"},ZS=["id","onUpdate:modelValue"],_l=200,XS={__name:"ComponentNode",props:["id","data"],setup(e){const t=e,r=Pe(t.data.attributes||[]),n=(l,s="1.75em JetBrains Mono")=>{const d=document.createElement("canvas").getContext("2d");return d.font=s,d.measureText(l).width},i=Pe([]),o=Pe(0);return Dt(()=>{o.value=Math.max(n(t.data.label||"")+20,_l),r.value.forEach((l,s)=>{i.value[s]=Math.max(n(l)+20,_l)})}),$e(r,l=>{l.forEach((s,a)=>{i.value[a]=Math.max(n(s)+20,_l)}),t.data.attributes=l},{deep:!0}),$e(()=>t.data.label,l=>{o.value=Math.max(n(l||"")+20,_l)}),(l,s)=>(me(),Se("div",WS,[ke("div",KS,[oi(ke("input",{id:`${e.id}-text-field`,"onUpdate:modelValue":s[0]||(s[0]=a=>t.data.label=a),style:_t({width:`${o.value}px`}),placeholder:"Write component label here...",class:"nodrag text-field-node vue-flow__node-value"},null,12,GS),[[Fn,t.data.label]]),ke("div",YS,[(me(!0),Se(We,null,Pr(r.value,(a,d)=>(me(),Se("div",{key:d,class:"attribute-item"},[oi(ke("input",{id:`${e.id}-attribute-${d}`,"onUpdate:modelValue":u=>r.value[d]=u,style:_t({width:`${i.value[d]}px`}),placeholder:"Write attribute here...",class:"nodrag text-field-node vue-flow__node-value"},null,12,ZS),[[Fn,r.value[d]]])]))),128))]),ke("button",{onClick:s[1]||(s[1]=a=>r.value.push("")),class:"add-attribute-button"},"Add Attribute")])]))}},QS=tc(XS,[["__scopeId","data-v-3bf6ebe0"]]),JS={class:"node-background"},eO={class:"content-wrapper"},tO=["id"],nO={__name:"NoteNode",props:["id","data"],setup(e){const t=e;return(r,n)=>{const i=Io("QuillEditor");return me(),Se(We,null,[Ee(pe(Ms),{"min-width":"250","min-height":"250"}),ke("div",JS,[ke("div",eO,[oi(ke("input",{id:`${e.id}-label-field`,"onUpdate:modelValue":n[0]||(n[0]=o=>t.data.label=o),placeholder:"Write label here...",class:"nodrag text-field-node vue-flow__node-value"},null,8,tO),[[Fn,t.data.label]]),Ee(i,{id:`${e.id}-note-area`,content:t.data.body,"onUpdate:content":n[1]||(n[1]=o=>t.data.body=o),contentType:"html",placeholder:"Write note here...",theme:"snow",class:"nodrag"},null,8,["id","content"])])])],64)}}},rO=tc(nO,[["__scopeId","data-v-05c43acc"]]);var Lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function iO(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var au={exports:{}};const oO=iO(qy);(function(e,t){(function(r,n){n(t,oO)})(Lt,function(r,n){let i=null;function o(){return i!==null}function l(X){i&&a(),i=X}function s(X){X===i&&(i=null)}function a(){i&&(i.closeMenu(),i=null)}const d={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultZoom:1,defaultAdjustPadding:{x:0,y:10}};function u(X,le){let de=X.offsetTop;return X.offsetParent!=null&&X.offsetParent!=le&&(de-=X.offsetParent.scrollTop,de+=u(X.offsetParent,le)),de}function c(X,le){let de=X.offsetLeft;return X.offsetParent!=null&&X.offsetParent!=le&&(de-=X.offsetParent.scrollLeft,de+=c(X.offsetParent,le)),de}function f(X,le,de,he){return{x:c(X,he)+le,y:u(X,he)+de}}const h="mx-menu-default-container",b="mx-menu-container-";let m=0;function _(X){const{getContainer:le,zIndex:de}=X;if(le){const ve=typeof le=="function"?le():le;if(ve){let be=ve.getAttribute("id");return be||(be=b+m++,ve.setAttribute("id",be)),{eleId:be,container:ve,isNew:!1}}}let he=document.getElementById(h);return he||(he=document.createElement("div"),he.setAttribute("id",h),he.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(he)),he.style.zIndex=(de==null?void 0:de.toString())||d.defaultZindex.toString(),{eleId:h,container:he,isNew:!0}}function y(X){return typeof X=="number"?`${X}px`:X}const v=n.defineComponent({props:{vnode:{type:null},data:{type:null,default:null}},setup(X){const{vnode:le,data:de}=n.toRefs(X);return()=>typeof le.value=="function"?le.value(de.value):le.value}}),g=(X,le)=>{const de=X.__vccOpts||X;for(const[he,ve]of le)de[he]=ve;return de},p={},E={class:"mx-checked-mark","aria-hidden":"true",viewBox:"0 0 1024 1024"},S=[n.createElementVNode("path",{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"},null,-1)];function A(X,le){return n.openBlock(),n.createElementBlock("svg",E,S)}const k=g(p,[["render",A]]),I={},x={class:"mx-right-arrow","aria-hidden":"true",viewBox:"0 0 1024 1024"},w=[n.createElementVNode("path",{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"},null,-1)];function N(X,le){return n.openBlock(),n.createElementBlock("svg",x,w)}const P=g(I,[["render",N]]),C={class:"mx-item-row"},L=["xlink:href"],D={key:1,class:"label"},V={class:"mx-item-row"},Q={class:"mx-shortcut"},W=n.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(X,{expose:le,emit:de}){const he=X,ve=de,{clickHandler:be,clickClose:ye,clickableWhenHasChildren:_e,disabled:Ie,hidden:Ve,label:ge,icon:Ke,iconFontClass:Ue,showRightArrow:Be,shortcut:pt,hasChildren:ft}=n.toRefs(he),Ge=n.ref(!1),xe=n.ref(!1),Me=n.ref(),qe=n.inject("globalOptions"),je=n.inject("globalHasSlot"),vt=n.inject("globalRenderSlot"),Le=n.inject("globalCloseMenu"),Ze=n.inject("menuContext"),st={getSubMenuInstance:()=>{},showSubMenu:()=>Ge.value?(Ze.markActiveMenuItem(st,!0),!0):ft.value?(bt(),!0):!1,hideSubMenu:()=>{Ze.closeOtherSubMenu()},isDisabledOrHidden:()=>Ie.value||Ve.value,getElement:()=>Me.value,focus:()=>xe.value=!0,blur:()=>xe.value=!1,click:$t};n.provide("menuItemInstance",st),n.onMounted(()=>{Ze.isMenuItemDataCollectedFlag()?n.nextTick(()=>{let ze=0;const mt=Ze.getElement();if(mt){let Kt=0;for(let ut=0;ut{Ze.removeChildMenuItem(st)});function $t(ze){if(!Ie.value){if(ze){const mt=ze.target;if(mt.classList.contains("mx-context-no-clickable")||qe.value.ignoreClickClassName&&mt.classList.contains(qe.value.ignoreClickClassName))return;if(qe.value.clickCloseClassName&&mt.classList.contains(qe.value.clickCloseClassName)){ze.stopPropagation(),Le(he.rawMenuItem);return}}ft.value?_e.value?(typeof be.value=="function"&&be.value(ze),ve("click",ze)):Ge.value||bt():(typeof be.value=="function"&&be.value(ze),ve("click",ze),ye.value&&Le(he.rawMenuItem))}}function bt(ze){xe.value=!1,Ze.checkCloseOtherSubMenuTimeOut()||Ze.closeOtherSubMenu(),Ie.value||(Ze.markActiveMenuItem(st),ft.value&&(ze||Ze.markThisOpenedByKeyBoard(),Ze.addOpenedSubMenu(yn),Ge.value=!0,n.nextTick(()=>ve("subMenuOpen",st))))}function yn(){xe.value=!1,Ge.value=!1,ve("subMenuClose",st)}function Ot(){return{disabled:Ie.value,label:ge.value,icon:Ke.value,iconFontClass:Ue.value,showRightArrow:Be.value,clickClose:ye.value,clickableWhenHasChildren:_e.value,shortcut:pt.value,theme:qe.value.theme,isOpen:Ge,hasChildren:ft,onClick:$t,onMouseEnter:bt,closeMenu:Le}}return le(st),(ze,mt)=>n.unref(Ve)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:"mx-context-menu-item-wrapper",ref_key:"menuItemRef",ref:Me,"data-type":"ContextMenuItem"},[n.unref(je)("itemRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemRender",Ot())},null,8,["vnode"])):X.customRender?(n.openBlock(),n.createBlock(n.unref(v),{key:1,vnode:X.customRender,data:Ot()},null,8,["vnode","data"])):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["mx-context-menu-item",n.unref(Ie)?"disabled":"",xe.value?"keyboard-focus":"",X.customClass?" "+X.customClass:"",Ge.value?"open":""]),onClick:$t,onMouseenter:bt},[n.renderSlot(ze.$slots,"default",{},()=>[n.createElementVNode("div",C,[n.createElementVNode("div",{class:n.normalizeClass(["mx-icon-placeholder",X.preserveIconWidth?"preserve-width":""])},[n.renderSlot(ze.$slots,"icon",{},()=>[n.unref(je)("itemIconRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemIconRender",Ot())},null,8,["vnode"])):typeof X.svgIcon=="string"&&X.svgIcon?(n.openBlock(),n.createElementBlock("svg",n.mergeProps({key:1,class:"icon svg"},X.svgProps),[n.createElementVNode("use",{"xlink:href":X.svgIcon},null,8,L)],16)):typeof n.unref(Ke)!="string"?(n.openBlock(),n.createBlock(n.unref(v),{key:2,vnode:n.unref(Ke),data:n.unref(Ke)},null,8,["vnode","data"])):typeof n.unref(Ke)=="string"&&n.unref(Ke)!==""?(n.openBlock(),n.createElementBlock("i",{key:3,class:n.normalizeClass(n.unref(Ke)+" icon "+n.unref(Ue)+" "+n.unref(qe).iconFontClass)},null,2)):n.createCommentVNode("",!0)]),X.checked?n.renderSlot(ze.$slots,"check",{key:0},()=>[n.unref(je)("itemCheckRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemCheckRender",Ot())},null,8,["vnode"])):n.createCommentVNode("",!0),n.createVNode(k)]):n.createCommentVNode("",!0)],2),n.renderSlot(ze.$slots,"label",{},()=>[n.unref(je)("itemLabelRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemLabelRender",Ot())},null,8,["vnode"])):typeof n.unref(ge)=="string"?(n.openBlock(),n.createElementBlock("span",D,n.toDisplayString(n.unref(ge)),1)):(n.openBlock(),n.createBlock(n.unref(v),{key:2,vnode:n.unref(ge),data:n.unref(ge)},null,8,["vnode","data"]))])]),n.createElementVNode("div",V,[n.unref(pt)?n.renderSlot(ze.$slots,"shortcut",{key:0},()=>[n.unref(je)("itemShortcutRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemShortcutRender",Ot())},null,8,["vnode"])):n.createCommentVNode("",!0),n.createElementVNode("span",Q,n.toDisplayString(n.unref(pt)),1)]):n.createCommentVNode("",!0),n.unref(Be)?n.renderSlot(ze.$slots,"rightArrow",{key:1},()=>[n.unref(je)("itemRightArrowRender")?(n.openBlock(),n.createBlock(n.unref(v),{key:0,vnode:()=>n.unref(vt)("itemRightArrowRender",Ot())},null,8,["vnode"])):n.createCommentVNode("",!0),n.createVNode(P)]):n.createCommentVNode("",!0)])])],34)),n.unref(qe).menuTransitionProps?(n.openBlock(),n.createBlock(n.Transition,n.normalizeProps(n.mergeProps({key:3},n.unref(qe).menuTransitionProps)),{default:n.withCtx(()=>[Ge.value?n.renderSlot(ze.$slots,"submenu",{key:0}):n.createCommentVNode("",!0)]),_:3},16)):Ge.value?n.renderSlot(ze.$slots,"submenu",{key:4}):n.createCommentVNode("",!0)],512))}}),$=n.defineComponent({name:"ContextMenuSperator",components:{VNodeRender:v},setup(){const X=n.inject("globalHasSlot"),le=n.inject("globalRenderSlot");return{globalHasSlot:X,globalRenderSlot:le}}}),R={key:1,class:"mx-context-menu-item-sperator mx-context-no-clickable"};function F(X,le,de,he,ve,be){const ye=n.resolveComponent("VNodeRender");return X.globalHasSlot("separatorRender")?(n.openBlock(),n.createBlock(ye,{key:0,vnode:()=>X.globalRenderSlot("separatorRender",{})},null,8,["vnode"])):(n.openBlock(),n.createElementBlock("div",R))}const j=g($,[["render",F]]),Z=n.defineComponent({name:"ContextSubMenu",components:{ContextMenuItem:W,ContextMenuSeparator:j,ContextMenuIconRight:P},props:{items:{type:Object,default:null},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"}},setup(X){const le=n.inject("menuContext"),de=n.inject("globalOptions"),he=n.inject("globalHasSlot"),ve=n.inject("globalRenderSlot"),{zIndex:be,getParentWidth:ye,getParentHeight:_e,getZoom:Ie}=le,{adjustPosition:Ve}=n.toRefs(X),ge=n.ref(),Ke=n.ref(),Ue=n.ref(),Be=n.ref(),pt=[],ft=n.inject("globalSetCurrentSubMenu"),Ge=[];let xe=null,Me=0;function qe(){xe&&xe.blur()}function je(Te,Fe){if(Te){for(let Ht=Fe!==void 0?Fe:0;Ht=0;Ht--)if(!Ge[Ht].isDisabledOrHidden()){vt(Ht);break}}function vt(Te){if(xe&&qe(),Te!==void 0&&(xe=Ge[Math.max(0,Math.min(Te,Ge.length-1))]),!!xe&&(xe.focus(),_n.value)){const Fe=xe.getElement();Fe&&(ze.value=Math.min(Math.max(-mt.value,-Fe.offsetTop-Fe.offsetHeight+dn.value),0))}}function Le(){ft(Ze)}const Ze={isTopLevel:()=>le.getParentContext()===null,closeSelfAndActiveParent:()=>{const Te=bt.getParentContext();if(Te){Te.closeOtherSubMenu();const Fe=Te.getSubMenuInstanceContext();if(Fe)return Fe.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var Te;return(Te=bt.getParentContext())==null?void 0:Te.closeOtherSubMenu()},moveCurrentItemFirst:()=>je(!0),moveCurrentItemLast:()=>je(!1),moveCurrentItemDown:()=>je(!0,xe?Ge.indexOf(xe)+1:0),moveCurrentItemUp:()=>je(!1,xe?Ge.indexOf(xe)-1:0),focusCurrentItem:()=>vt(),openCurrentItemSubMenu:()=>xe?xe==null?void 0:xe.showSubMenu():!1,triggerCurrentItemClick:Te=>xe==null?void 0:xe.click(Te)};let st=!1,$t=!1;const bt={zIndex:be+1,container:le.container,adjustPadding:de.value.adjustPadding||d.defaultAdjustPadding,getParentWidth:()=>{var Te;return((Te=Ke.value)==null?void 0:Te.offsetWidth)||0},getParentHeight:()=>{var Te;return((Te=Ke.value)==null?void 0:Te.offsetHeight)||0},getParentX:()=>ct.value.x,getParentY:()=>ct.value.y,getParentAbsX:()=>Ke.value?c(Ke.value,le.container):0,getParentAbsY:()=>Ke.value?u(Ke.value,le.container):0,getPositon:()=>[0,0],getZoom:()=>de.value.zoom||d.defaultZoom,addOpenedSubMenu(Te){pt.push(Te)},closeOtherSubMenu(){pt.forEach(Te=>Te()),pt.splice(0,pt.length),ft(Ze)},checkCloseOtherSubMenuTimeOut(){return Me?(clearTimeout(Me),Me=0,!0):!1},closeOtherSubMenuWithTimeOut(){Me=setTimeout(()=>{Me=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(Te,Fe)=>{Fe===void 0?Ge.push(Te):Ge.splice(Fe,0,Te)},removeChildMenuItem:Te=>{Ge.splice(Ge.indexOf(Te),1),Te.getSubMenuInstance=()=>{}},markActiveMenuItem:(Te,Fe=!1)=>{qe(),xe=Te,Fe&&vt()},markThisOpenedByKeyBoard:()=>{st=!0},isOpenedByKeyBoardFlag:()=>st?(st=!1,!0):!1,isMenuItemDataCollectedFlag:()=>$t,getElement:()=>Ke.value||null,getParentContext:()=>le,getSubMenuInstanceContext:()=>Ze};n.provide("menuContext",bt);const yn={getChildItem:Te=>Ge[Te],getMenuDimensions:()=>ge.value?{width:ge.value.offsetWidth,height:ge.value.offsetHeight}:{width:0,height:0},getSubmenuRoot:()=>ge.value,getMenu:()=>Ke.value,getScrollValue:()=>ze.value,setScrollValue:Te=>ze.value=Te,getScrollHeight:()=>mt.value,getMaxHeight:()=>dn.value,getPosition:()=>ct.value,setPosition:(Te,Fe)=>{ct.value.x=Te,ct.value.y=Fe}},Ot=n.inject("menuItemInstance",void 0);Ot&&(Ot.getSubMenuInstance=()=>yn);const ze=n.ref(0),mt=n.ref(0);function Kt(Te){Te?ze.value=Math.min(Math.max(ze.value-50,-mt.value),0):ze.value=Math.min(ze.value+50,0)}function ut(Te){Te.preventDefault(),Te.stopPropagation(),Kt(Te.deltaY>0)}function bn(Te){de.value.mouseScroll&&(Te.preventDefault(),Te.stopPropagation(),Kt(Te.deltaY>0))}const _n=n.ref(!1),ct=n.ref({x:0,y:0}),dn=n.ref(0);return n.onMounted(()=>{const Te=le.getPositon();ct.value={x:(Te[0]??de.value.xOffset??0)/Ie(),y:(Te[1]??de.value.yOffset??0)/Ie()},ft(Ze),n.nextTick(()=>{var Fe,Ht;const Nt=Ke.value;if(Nt&&Ue.value){const{container:An}=le,qr=(ye==null?void 0:ye())??0,hi=(_e==null?void 0:_e())??0,At=typeof le.adjustPadding=="number"?le.adjustPadding:((Fe=le.adjustPadding)==null?void 0:Fe.x)??0,sr=typeof le.adjustPadding=="number"?le.adjustPadding:((Ht=le.adjustPadding)==null?void 0:Ht.y)??0,zn=hi>0?sr:0,Hi=document.documentElement.scrollHeight/Ie(),ji=document.documentElement.scrollWidth/Ie(),zi=Math.min(ji,An.offsetWidth),Tn=Math.min(Hi,An.offsetHeight);let ar=c(Nt,An),kn=u(Nt,An);X.direction.includes("l")?ct.value.x-=Nt.offsetWidth+At:X.direction.includes("r")?ct.value.x+=qr+At:(ct.value.x+=qr/2,ct.value.x-=(Nt.offsetWidth+At)/2),X.direction.includes("t")?ct.value.y-=(Nt.offsetHeight+sr*2)/Ie():X.direction.includes("b")?ct.value.y-=sr/Ie():(ct.value.y+=hi/2/Ie(),ct.value.y-=(Nt.offsetHeight+sr)/2/Ie()),Ve.value&&n.nextTick(()=>{ar=c(Nt,An),kn=u(Nt,An);const hn=ar+Nt.offsetWidth-zi,ur=kn+Nt.offsetHeight+zn*2-Tn;if(_n.value=ur>0,mt.value=Nt.offsetHeight-Tn+zn*2,hn>0){const Vn=qr+Nt.offsetWidth-At,Un=ar;Vn>Un?ct.value.x-=Un:ct.value.x-=Vn}if(_n.value){const Vn=ur,Un=kn;Vn>Un?ct.value.y-=Un-zn:ct.value.y-=Vn-zn,dn.value=Tn-zn*2}else dn.value=0})}Nt==null||Nt.focus({preventScroll:!0}),le.isOpenedByKeyBoardFlag()&&je(!0),$t=!0})}),n.onBeforeUnmount(()=>{Ot&&(Ot.getSubMenuInstance=()=>{})}),{submenuRoot:ge,menu:Ke,scroll:Ue,options:de,zIndex:be,constOptions:d,scrollValue:ze,upScrollButton:Be,overflow:_n,position:ct,scrollHeight:mt,maxHeight:dn,...yn,globalHasSlot:he,globalRenderSlot:ve,onScroll:Kt,onSubMenuBodyClick:Le,onMouseWhell:bn,onMouseWhellMx:ut,solveNumberOrStringSize:y}}}),G={key:0,class:"mx-context-menu-updown placeholder"},H={key:1,class:"mx-context-menu-updown placeholder"},J={class:"mx-context-menu-scroll",ref:"scroll"};function oe(X,le,de,he,ve,be){const ye=n.resolveComponent("ContextMenuSeparator"),_e=n.resolveComponent("ContextSubMenu",!0),Ie=n.resolveComponent("ContextMenuItem"),Ve=n.resolveComponent("ContextMenuIconRight");return n.openBlock(),n.createElementBlock("div",{ref:"submenuRoot",class:n.normalizeClass(["mx-context-menu",X.options.customClass?X.options.customClass:"",X.options.theme??""]),style:n.normalizeStyle({maxWidth:X.maxWidth?X.solveNumberOrStringSize(X.maxWidth):`${X.constOptions.defaultMaxWidth}px`,minWidth:X.minWidth?X.solveNumberOrStringSize(X.minWidth):`${X.constOptions.defaultMinWidth}px`,maxHeight:X.overflow&&X.maxHeight>0?`${X.maxHeight}px`:void 0,zIndex:X.zIndex,left:`${X.position.x}px`,top:`${X.position.y}px`}),"data-type":"ContextSubMenu",onClick:le[4]||(le[4]=(...ge)=>X.onSubMenuBodyClick&&X.onSubMenuBodyClick(...ge)),onWheel:le[5]||(le[5]=(...ge)=>X.onMouseWhell&&X.onMouseWhell(...ge))},[n.createElementVNode("div",{class:n.normalizeClass(["mx-context-menu-items"]),ref:"menu",style:n.normalizeStyle({top:`${X.scrollValue}px`})},[n.renderSlot(X.$slots,"default",{},()=>[X.overflow&&X.options.updownButtonSpaceholder?(n.openBlock(),n.createElementBlock("div",G)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(X.items,(ge,Ke)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:Ke},[ge.hidden!==!0&&ge.divided==="up"?(n.openBlock(),n.createBlock(ye,{key:0})):n.createCommentVNode("",!0),ge.hidden!==!0&&ge.divided==="self"?(n.openBlock(),n.createBlock(ye,{key:1})):(n.openBlock(),n.createBlock(Ie,{key:2,clickHandler:ge.onClick?Ue=>ge.onClick(Ue):void 0,disabled:ge.disabled,hidden:ge.hidden,icon:ge.icon,iconFontClass:ge.iconFontClass,svgIcon:ge.svgIcon,svgProps:ge.svgProps,label:ge.label,customRender:ge.customRender,customClass:ge.customClass,checked:ge.checked,shortcut:ge.shortcut,clickClose:ge.clickClose,clickableWhenHasChildren:ge.clickableWhenHasChildren,preserveIconWidth:ge.preserveIconWidth!==void 0?ge.preserveIconWidth:X.options.preserveIconWidth,showRightArrow:ge.children&&ge.children.length>0,hasChildren:ge.children&&ge.children.length>0,rawMenuItem:ge,onSubMenuOpen:Ue=>{var Be;return(Be=ge.onSubMenuOpen)==null?void 0:Be.call(ge,Ue)},onSubMenuClose:Ue=>{var Be;return(Be=ge.onSubMenuClose)==null?void 0:Be.call(ge,Ue)}},n.createSlots({_:2},[ge.children&&ge.children.length>0?{name:"submenu",fn:n.withCtx(()=>[n.createVNode(_e,{items:ge.children,maxWidth:ge.maxWidth,minWidth:ge.minWidth,adjustPosition:ge.adjustSubMenuPosition!==void 0?ge.adjustSubMenuPosition:X.options.adjustPosition,direction:ge.direction!==void 0?ge.direction:X.options.direction},null,8,["items","maxWidth","minWidth","adjustPosition","direction"])]),key:"0"}:void 0]),1032,["clickHandler","disabled","hidden","icon","iconFontClass","svgIcon","svgProps","label","customRender","customClass","checked","shortcut","clickClose","clickableWhenHasChildren","preserveIconWidth","showRightArrow","hasChildren","rawMenuItem","onSubMenuOpen","onSubMenuClose"])),ge.hidden!==!0&&(ge.divided==="down"||ge.divided===!0)?(n.openBlock(),n.createBlock(ye,{key:3})):n.createCommentVNode("",!0)],64))),128)),X.overflow&&X.options.updownButtonSpaceholder?(n.openBlock(),n.createElementBlock("div",H)):n.createCommentVNode("",!0)])],4),n.createElementVNode("div",J,[n.withDirectives(n.createElementVNode("div",{ref:"upScrollButton",class:n.normalizeClass("mx-context-menu-updown mx-context-no-clickable up"+(X.overflow&&X.scrollValue<0?"":" disabled")),onClick:le[0]||(le[0]=ge=>X.onScroll(!1)),onWheel:le[1]||(le[1]=(...ge)=>X.onMouseWhellMx&&X.onMouseWhellMx(...ge))},[n.createVNode(Ve)],34),[[n.vShow,X.overflow]]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass("mx-context-menu-updown mx-context-no-clickable down"+(X.overflow&&X.scrollValue>-X.scrollHeight?"":" disabled")),onClick:le[2]||(le[2]=ge=>X.onScroll(!0)),onWheel:le[3]||(le[3]=(...ge)=>X.onMouseWhellMx&&X.onMouseWhellMx(...ge))},[n.createVNode(Ve)],34),[[n.vShow,X.overflow]])],512)],38)}const ie=g(Z,[["render",oe]]),se={class:"mx-menu-ghost-host"},ae=n.defineComponent({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:Object,default:null},container:{type:Object,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(X,{expose:le,emit:de}){const he=X,ve=de,be=n.useSlots(),ye=n.ref(),{options:_e,show:Ie,container:Ve}=n.toRefs(he);n.onMounted(()=>{Ie.value&&Ue()}),n.onBeforeUnmount(()=>{Ge()}),n.watch(Ie,Le=>{Le?Ue():(s(ge),Ge())});const ge={closeMenu:Be,isClosed:pt,getMenuRef:()=>ye.value,getMenuDimensions:()=>{var Le;return((Le=ye.value)==null?void 0:Le.getMenuDimensions())??{width:0,height:0}}};let Ke=!1;function Ue(){ft(),l(ge)}function Be(Le){Ke=!0,ve("close",Le),_e.value.menuTransitionProps||ve("closeAnimFinished"),s(ge)}function pt(){return Ke}function ft(){setTimeout(()=>{document.addEventListener("click",je,!0),document.addEventListener("contextmenu",je,!0),document.addEventListener("scroll",qe,!0),!he.isFullScreenContainer&&Ve.value&&Ve.value.addEventListener("scroll",qe,!0),_e.value.keyboardControl!==!1&&document.addEventListener("keydown",Me)},50)}function Ge(){document.removeEventListener("contextmenu",je,!0),document.removeEventListener("click",je,!0),document.removeEventListener("scroll",qe,!0),!he.isFullScreenContainer&&Ve.value&&Ve.value.removeEventListener("scroll",qe,!0),_e.value.keyboardControl!==!1&&document.removeEventListener("keydown",Me)}const xe=n.ref();n.provide("globalSetCurrentSubMenu",Le=>xe.value=Le);function Me(Le){var Ze,st,$t,bt,yn,Ot,ze,mt,Kt,ut,bn,_n,ct;let dn=!0;switch(Le.key){case"Escape":{((Ze=xe.value)==null?void 0:Ze.isTopLevel())===!1?(st=xe.value)==null||st.closeCurrentSubMenu():Be();break}case"ArrowDown":($t=xe.value)==null||$t.moveCurrentItemDown();break;case"ArrowUp":(bt=xe.value)==null||bt.moveCurrentItemUp();break;case"Home":(yn=xe.value)==null||yn.moveCurrentItemFirst();break;case"End":(Ot=xe.value)==null||Ot.moveCurrentItemLast();break;case"ArrowLeft":{(ze=xe.value)!=null&&ze.closeSelfAndActiveParent()||(Kt=(mt=_e.value).onKeyFocusMoveLeft)==null||Kt.call(mt);break}case"ArrowRight":(ut=xe.value)!=null&&ut.openCurrentItemSubMenu()||(_n=(bn=_e.value).onKeyFocusMoveRight)==null||_n.call(bn);break;case"Enter":(ct=xe.value)==null||ct.triggerCurrentItemClick(Le);break;default:dn=!1;break}dn&&xe.value&&(Le.stopPropagation(),Le.preventDefault())}function qe(){_e.value.closeWhenScroll!==!1&&Be()}function je(Le){vt(Le.target,Le)}function vt(Le,Ze){for(var st,$t;Le;){if(Le.classList&&Le.classList.contains("mx-menu-host"))return;Le=Le.parentNode}_e.value.clickCloseOnOutside!==!1?(Ge(),Be()):($t=(st=_e.value).onClickOnOutside)==null||$t.call(st,Ze)}return n.provide("globalOptions",_e),n.provide("globalCloseMenu",Be),n.provide("globalIsFullScreenContainer",he.isFullScreenContainer),n.provide("globalHasSlot",Le=>be[Le]!==void 0),n.provide("globalRenderSlot",(Le,Ze)=>n.renderSlot(be,Le,{...Ze},()=>[n.h("span","Render slot failed")],!1)),n.provide("menuContext",{zIndex:_e.value.zIndex||d.defaultZindex,container:Ve.value,adjustPadding:{x:0,y:0},getParentAbsY:()=>_e.value.x,getParentAbsX:()=>_e.value.y,getZoom:()=>_e.value.zoom||d.defaultZoom,getParentX:()=>0,getParentY:()=>0,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[_e.value.x,_e.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),le(ge),(Le,Ze)=>(n.openBlock(),n.createElementBlock("div",se,[n.unref(_e).menuTransitionProps?(n.openBlock(),n.createBlock(n.Transition,n.mergeProps({key:0,appear:""},n.unref(_e).menuTransitionProps,{onAfterLeave:Ze[0]||(Ze[0]=st=>ve("closeAnimFinished"))}),{default:n.withCtx(()=>[n.unref(Ie)?(n.openBlock(),n.createBlock(ie,{key:0,ref_key:"submenuInstance",ref:ye,class:"mx-menu-host",items:n.unref(_e).items,adjustPosition:n.unref(_e).adjustPosition,maxWidth:n.unref(_e).maxWidth||n.unref(d).defaultMaxWidth,minWidth:n.unref(_e).minWidth||n.unref(d).defaultMinWidth,direction:n.unref(_e).direction||n.unref(d).defaultDirection},{default:n.withCtx(()=>[n.renderSlot(Le.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):n.createCommentVNode("",!0)]),_:3},16)):n.unref(Ie)?(n.openBlock(),n.createBlock(ie,{key:1,ref_key:"submenuInstance",ref:ye,class:"mx-menu-host",items:n.unref(_e).items,adjustPosition:n.unref(_e).adjustPosition,maxWidth:n.unref(_e).maxWidth||n.unref(d).defaultMaxWidth,minWidth:n.unref(_e).minWidth||n.unref(d).defaultMinWidth,direction:n.unref(_e).direction||n.unref(d).defaultDirection},{default:n.withCtx(()=>[n.renderSlot(Le.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):n.createCommentVNode("",!0)]))}}),ce=n.defineComponent({name:"ContextMenu",emits:["update:show","close"],props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},setup(X,le){const{options:de,show:he}=n.toRefs(X),ve=n.ref(null);return le.expose({closeMenu:()=>le.emit("update:show",!1),isClosed:()=>!he.value,getMenuRef:()=>{var be;return(be=ve.value)==null?void 0:be.getMenuRef()},getMenuDimensions:()=>{var be;return((be=ve.value)==null?void 0:be.getMenuDimensions())??{width:0,height:0}}}),()=>{const{isNew:be,container:ye,eleId:_e}=_(de.value);return[n.h(n.Teleport,{to:`#${_e}`},[n.h(ae,{ref:ve,options:de,show:he,container:ye,isFullScreenContainer:!be,onClose:Ie=>{var Ve,ge;le.emit("update:show",!1),le.emit("close"),(ge=(Ve=de.value).onClose)==null||ge.call(Ve,Ie)}},le.slots)])]}}}),T=n.defineComponent({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(X,le){const de=n.inject("globalOptions"),{adjustSubMenuPosition:he,maxWidth:ve,minWidth:be}=n.toRefs(X),ye=typeof he.value<"u"?he.value:de.value.adjustPosition,_e=n.ref(),Ie=n.ref();return le.expose({getSubMenuRef:()=>_e.value,getMenuItemRef:()=>Ie.value}),()=>n.h(W,{...X,ref:Ie,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof le.slots.default!==void 0},le.slots.default?{submenu:()=>n.h(ie,{ref:_e,maxWidth:ve.value,minWidth:be.value,adjustPosition:ye},{default:le.slots.default})}:void 0)}});function M(X,le,de,he){const ve=n.ref(!0),be=n.h(ae,{options:X,show:ve,container:le,isFullScreenContainer:!de,onCloseAnimFinished:()=>{n.render(null,le)},onClose:ye=>{var _e;(_e=X.onClose)==null||_e.call(X,ye),ve.value=!1}},he);return n.render(be,le),be.component}function B(X,le){const de=_(X);return M(X,de.container,de.isNew,le).exposed}const K={install(X){X.config.globalProperties.$contextmenu=B,X.component("ContextMenu",ce),X.component("ContextMenuItem",W),X.component("ContextMenuGroup",T),X.component("ContextMenuSperator",j),X.component("ContextMenuSeparator",j),X.component("ContextSubMenu",ie)},showContextMenu(X,le){return B(X,le)},isAnyContextMenuOpen(){return o()},closeContextMenu:a,transformMenuPosition:f},z={},U={class:"mx-menu-bar-icon-menu",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},Y=[n.createElementVNode("path",{d:"M133.310936 296.552327l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949 0-19.781623-15.997312-35.950949-35.950949-35.950949L133.310936 224.650428c-19.781623 0-35.950949 16.169326-35.950949 35.950949C97.359987 280.383 113.529313 296.552327 133.310936 296.552327z"},null,-1),n.createElementVNode("path",{d:"M890.51705 476.135058 133.310936 476.135058c-19.781623 0-35.950949 16.169326-35.950949 35.950949 0 19.781623 16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949C926.467999 492.304384 910.298673 476.135058 890.51705 476.135058z"},null,-1),n.createElementVNode("path",{d:"M890.51705 727.447673 133.310936 727.447673c-19.781623 0-35.950949 15.997312-35.950949 35.950949s16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-15.997312 35.950949-35.950949S910.298673 727.447673 890.51705 727.447673z"},null,-1)];function te(X,le){return n.openBlock(),n.createElementBlock("svg",U,Y)}const re=g(z,[["render",te]]),ee=["onClick","onMouseenter"],ue=n.defineComponent({__name:"MenuBar",props:{options:{type:Object,default:null}},setup(X){const le=X,de=n.ref(),he=n.ref(!1),ve=n.ref([]),be=n.ref(null);function ye(){he.value=!0}function _e(){he.value=!1}n.onMounted(()=>{ve.value=le.options.items||[]}),n.watch(()=>le.options,()=>{ve.value=le.options.items||[]});let Ie=null,Ve=-1;function ge(){Ve0?Ve--:Ve=ve.value.length-1,Be(Ve,ve.value[Ve])}function Ue(xe){const Me=le.options.barPopDirection??"bl";let qe=0,je=0;return Me.startsWith("b")?je=u(xe)+xe.offsetHeight:Me.startsWith("t")?je=u(xe):je=u(xe)+xe.offsetHeight/2,Me.endsWith("l")?qe=c(xe):Me.startsWith("r")?qe=c(xe)+xe.offsetWidth:qe=c(xe)+xe.offsetWidth/2,{x:qe,y:je}}function Be(xe,Me){var qe;if(Ve=xe,!Me.children)return;Ie&&(Ie.closeMenu(),Ie=null,he.value=!0),be.value=Me;const je=(qe=de.value)==null?void 0:qe.children[xe];if(je){const{x:vt,y:Le}=Ue(je);Ie=K.showContextMenu({...le.options,items:Me.children,x:vt,y:Le,onKeyFocusMoveLeft(){Ke()},onKeyFocusMoveRight(){ge()},onClose(){be.value==Me&&(he.value=!1,be.value=null)}})}}function pt(){Ve=0;const xe=de.value;if(xe){const{x:Me,y:qe}=Ue(xe);Ie=K.showContextMenu({...le.options,x:Me,y:qe})}}function ft(xe,Me){Me?(he.value=!0,Be(xe,Me),Me.onClick&&(Me.clickableWhenHasChildren===!0&&Me.children&&Me.children.length>0||!Me.children||Me.children.length===0)&&Me.onClick()):pt()}function Ge(xe,Me){he.value&&Be(xe,Me)}return(xe,Me)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["mx-menu-bar",X.options.theme??"",X.options.mini?"mini":""]),onFocus:ye,onBlur:_e},[n.renderSlot(xe.$slots,"prefix"),X.options.mini?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"menuBarContent",ref:de,class:"mx-menu-bar-content"},[n.createElementVNode("div",{class:"mx-menu-bar-item",onClick:Me[0]||(Me[0]=qe=>ft(0,null))},[n.createVNode(re)])],512)):(n.openBlock(),n.createElementBlock("div",{key:1,ref_key:"menuBarContent",ref:de,class:"mx-menu-bar-content"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(ve.value,(qe,je)=>(n.openBlock(),n.createElementBlock("div",{key:je,class:n.normalizeClass(["mx-menu-bar-item",qe==be.value?"active":""]),onClick:vt=>ft(je,qe),onMouseenter:vt=>Ge(je,qe)},n.toDisplayString(qe.label),43,ee))),128))],512)),n.renderSlot(xe.$slots,"suffix")],34))}});r.ContextMenu=ce,r.ContextMenuGroup=T,r.ContextMenuItem=W,r.ContextMenuSeparator=j,r.MenuBar=ue,r.default=K,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})(au,au.exports);var pv=au.exports;const ma=nc(pv),lO={key:0,width:"16",height:"16",viewBox:"0 0 32 32"},sO=ke("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z"},null,-1),aO=[sO],uO={key:1,width:"16",height:"16",viewBox:"0 0 24 24"},cO=ke("path",{d:"M14 20v-2h2.6l-3.2-3.2l1.425-1.425L18 16.55V14h2v6Zm-8.6 0L4 18.6L16.6 6H14V4h6v6h-2V7.4Zm3.775-9.425L4 5.4L5.4 4l5.175 5.175Z"},null,-1),fO=[cO],dO={key:2,width:"16",height:"16",viewBox:"0 0 24 24"},hO=ke("path",{d:"M12 17q-2.075 0-3.537-1.463Q7 14.075 7 12t1.463-3.538Q9.925 7 12 7t3.538 1.462Q17 9.925 17 12q0 2.075-1.462 3.537Q14.075 17 12 17ZM2 13q-.425 0-.712-.288Q1 12.425 1 12t.288-.713Q1.575 11 2 11h2q.425 0 .713.287Q5 11.575 5 12t-.287.712Q4.425 13 4 13Zm18 0q-.425 0-.712-.288Q19 12.425 19 12t.288-.713Q19.575 11 20 11h2q.425 0 .712.287q.288.288.288.713t-.288.712Q22.425 13 22 13Zm-8-8q-.425 0-.712-.288Q11 4.425 11 4V2q0-.425.288-.713Q11.575 1 12 1t.713.287Q13 1.575 13 2v2q0 .425-.287.712Q12.425 5 12 5Zm0 18q-.425 0-.712-.288Q11 22.425 11 22v-2q0-.425.288-.712Q11.575 19 12 19t.713.288Q13 19.575 13 20v2q0 .425-.287.712Q12.425 23 12 23ZM5.65 7.05L4.575 6q-.3-.275-.288-.7q.013-.425.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7q0 .4-.275.7q-.275.3-.687.287q-.413-.012-.713-.287ZM18 19.425l-1.05-1.075q-.275-.3-.275-.712q0-.413.275-.688q.275-.3.688-.287q.412.012.712.287L19.425 18q.3.275.288.7q-.013.425-.288.725q-.3.3-.725.3t-.7-.3ZM16.95 7.05q-.3-.275-.287-.688q.012-.412.287-.712L18 4.575q.275-.3.7-.288q.425.013.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275q-.4 0-.7-.275ZM4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.713-.275q.412 0 .687.275q.3.275.288.688q-.013.412-.288.712L6 19.425q-.275.3-.7.287q-.425-.012-.725-.287Z"},null,-1),pO=[hO],vO={key:3,width:"16",height:"16",viewBox:"0 0 24 24"},gO=ke("path",{d:"M12 21q-3.75 0-6.375-2.625T3 12q0-3.75 2.625-6.375T12 3q.35 0 .688.025q.337.025.662.075q-1.025.725-1.637 1.887Q11.1 6.15 11.1 7.5q0 2.25 1.575 3.825Q14.25 12.9 16.5 12.9q1.375 0 2.525-.613q1.15-.612 1.875-1.637q.05.325.075.662Q21 11.65 21 12q0 3.75-2.625 6.375T12 21Z"},null,-1),mO=[gO],yO={key:4,width:"16",height:"16",viewBox:"0 0 24 24"},bO=ke("path",{d:"M20 19V7H4v12h16m0-16a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16m-7 14v-2h5v2h-5m-3.42-4L5.57 9H8.4l3.3 3.3c.39.39.39 1.03 0 1.42L8.42 17H5.59l3.99-4Z"},null,-1),_O=[bO],wO={key:5,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-file-earmark",viewBox:"0 0 16 16"},EO=ke("path",{d:"M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"},null,-1),xO=[EO],SO={key:6,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},OO=ke("path",{fill:"currentColor",d:"M21 7v12q0 .825-.587 1.413T19 21H5q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h12zm-9 11q1.25 0 2.125-.875T15 15t-.875-2.125T12 12t-2.125.875T9 15t.875 2.125T12 18m-6-8h9V6H6z"},null,-1),NO=[OO],AO={key:7,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-folder2-open",viewBox:"0 0 16 16"},TO=ke("path",{d:"M1 3.5A1.5 1.5 0 0 1 2.5 2h2.764c.958 0 1.76.56 2.311 1.184C7.985 3.648 8.48 4 9 4h4.5A1.5 1.5 0 0 1 15 5.5v.64c.57.265.94.876.856 1.546l-.64 5.124A2.5 2.5 0 0 1 12.733 15H3.266a2.5 2.5 0 0 1-2.481-2.19l-.64-5.124A1.5 1.5 0 0 1 1 6.14zM2 6h12v-.5a.5.5 0 0 0-.5-.5H9c-.964 0-1.71-.629-2.174-1.154C6.374 3.334 5.82 3 5.264 3H2.5a.5.5 0 0 0-.5.5zm-.367 1a.5.5 0 0 0-.496.562l.64 5.124A1.5 1.5 0 0 0 3.266 14h9.468a1.5 1.5 0 0 0 1.489-1.314l.64-5.124A.5.5 0 0 0 14.367 7z"},null,-1),kO=[TO],CO={key:8,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},MO=ke("path",{fill:"currentColor",d:"M15 12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.172a3 3 0 0 0 2.12-.879l.83-.828A1 1 0 0 1 6.827 3h2.344a1 1 0 0 1 .707.293l.828.828A3 3 0 0 0 12.828 5H14a1 1 0 0 1 1 1zM2 4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-1.172a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 9.172 2H6.828a2 2 0 0 0-1.414.586l-.828.828A2 2 0 0 1 3.172 4z"},null,-1),PO=ke("path",{fill:"currentColor",d:"M8 11a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5m0 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7M3 6.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0"},null,-1),IO=[MO,PO],RO={key:9,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},LO=ke("path",{fill:"currentColor",d:"m12 17l4-4l-1.4-1.4l-1.6 1.55V9h-2v4.15L9.4 11.6L8 13zm-6 5q-.825 0-1.412-.587T4 20V8l6-6h8q.825 0 1.413.588T20 4v16q0 .825-.587 1.413T18 22zm0-2h12V4h-7.15L6 8.85zm0 0h12z"},null,-1),DO=[LO],wl={__name:"Icon",props:{name:{type:String,required:!0}},setup(e){return(t,r)=>(me(),Se(We,null,[e.name==="reset"?(me(),Se("svg",lO,aO)):tt("",!0),e.name==="update"?(me(),Se("svg",uO,fO)):tt("",!0),e.name==="sun"?(me(),Se("svg",dO,pO)):tt("",!0),e.name==="moon"?(me(),Se("svg",vO,mO)):tt("",!0),e.name==="log"?(me(),Se("svg",yO,_O)):tt("",!0),e.name==="new-file"?(me(),Se("svg",wO,xO)):tt("",!0),e.name==="save"?(me(),Se("svg",SO,NO)):tt("",!0),e.name==="load"?(me(),Se("svg",AO,kO)):tt("",!0),e.name==="camera"?(me(),Se("svg",CO,IO)):e.name==="restore"?(me(),Se("svg",RO,DO)):tt("",!0)],64))}},$O={key:0,class:"label-renaming-field"},BO="Delete",zf=50,qO={__name:"App",setup(e){const{onInit:t,screenToFlowCoordinate:r,onConnect:n,onNodesInitialized:i,onNodeDrag:o,updateNode:l,findNode:s,isNodeIntersecting:a,getIntersectingNodes:d,addNodes:u,onNodeDoubleClick:c,onNodesChange:f,applyNodeChanges:h,onNodeContextMenu:b,removeNodes:m,addEdges:_,onEdgeDoubleClick:y,onEdgesChange:v,applyEdgeChanges:g,onEdgeContextMenu:p,removeEdges:E,onSelectionContextMenu:S,onPaneContextMenu:A,toObject:k,fromObject:I,getNodes:x,getEdges:w,vueFlowRef:N}=lt();let P=!0;const C=Tx(),L=Pe(),D=Pe(!1),V=BS(),Q=Pe(null),W=[],$=[];t(B=>{B.fitView()}),n(_),Dt(()=>{window.addEventListener("keydown",R)}),Br(()=>{window.removeEventListener("keydown",R)});const R=B=>{J(B)};function F(){const B=JSON.stringify(k());W.push(B),W.length>zf&&W.shift(),Z()}rr("pushToUndoStack",F);function j(){const B=JSON.stringify(k());$.push(B),$.length>zf&&$.shift()}function Z(){$.value=[]}function G(){if(console.log(W.length),W.length>0){j();const B=W.pop();return I(JSON.parse(B)),!0}return!1}function H(){if($.length>0){F();const B=$.pop();return I(JSON.parse(B)),!0}return!1}const J=B=>{B.ctrlKey&&B.key==="z"?G()&&B.preventDefault():(B.ctrlKey&&B.key==="y"||B.ctrlKey&&B.shiftKey&&B.key==="z")&&H()&&B.preventDefault()};f(async B=>{const K=[];for(const z of B)z.type==="remove"?await oe(z)&&(F(),V.deleteComponents(x,z.id),K.push(z)):K.push(z);P=!0,h(K)}),v(async B=>{const K=[];for(const z of B)z.type==="select"&&(F(JSON.stringify(k())),ie()),z.type==="remove"?await oe(z)&&(F(JSON.stringify(k())),K.push(z)):K.push(z);P=!0,g(K)});async function oe(B){return P?await C.confirmDefault(B.id):!0}y(({mouseEvent:B,edge:K})=>{Q.value=K,K.sourceX,K.sourceY});const ie=()=>{Q&&(Q.value=null)};c(B=>{let K=B.event,z=B.node;K.preventDefault();let U=[{label:"Delete Node",onClick:()=>{m(z.id)}}];if(z.type=="component"){let te=z.data.attributes;if(te)for(let re=0;re{z.data.attributes.splice(re,1)}})}}let Y=z.data.components;if(Y)for(let te=0;te{z.data.components.splice(te,1)}})}ma.showContextMenu({x:K.x,y:K.y,items:U})}),p(B=>{let K=B.event,z=B.edge;K.preventDefault(),ma.showContextMenu({x:K.x,y:K.y,items:[{label:"Delete Connection",onClick:()=>{E(z.id)}}]})}),A(B=>{B.preventDefault(),ma.showContextMenu({x:B.x,y:B.y,items:[{label:"Create New...",children:[{label:"Text Area Node",onClick:()=>{se(B,"text-area")}},{label:"Text Field Node",onClick:()=>{se(B,"text-field")}},{label:"Component Node",onClick:()=>{se(B,"component")}},{label:"Note",onClick:()=>{se(B,"note")}}]}]})}),S(B=>{B.event.preventDefault()});function se(B,K){const z=r({x:B.x,y:B.y}),U=Yr(),Y={id:U,type:K,position:z,data:{label:""}},{off:te}=i(()=>{l(U,re=>({position:{x:re.position.x-re.dimensions.width/2,y:re.position.y-re.dimensions.height/2}})),te()});u(Y)}o(({node:B})=>{const K=x,U=d(B).map(Y=>Y.id);D.value=a(B,ae.value);for(const Y of K.value){const te=U.includes(Y.id);if(B==Y){console.log("Node "+Y.id);continue}l(Y.id,{class:te?"intersecting":""}),te&&B.type=="component"&&V.connectComponent(Y,B)}});const ae=Re(()=>{if(!L.value)return{x:0,y:0,width:0,height:0};const{left:B,top:K,width:z,height:U}=L.value.$el.getBoundingClientRect();return{...r({x:B,y:K}),width:z,height:U}});async function ce(){await C.confirmReset()&&(P=!1,m(x.value),vueFlowInstance.fitView())}function T(){const B=JSON.stringify(k(),null,2),K=new Blob([B],{type:"application/json"}),z=URL.createObjectURL(K),U=document.createElement("a");U.href=z,U.download="state.json",U.click(),URL.revokeObjectURL(z)}async function M(){try{const[B]=await window.showOpenFilePicker({types:[{description:"JSON Files",accept:{"application/json":[".json"]}}]}),z=await(await B.getFile()).text(),U=JSON.parse(z);I(U)}catch(B){console.error("Failed to open file:",B)}}return(B,K)=>(me(),Se(We,null,[Ee(pe(IE),{nodes:pe(oo),edges:pe(Sx),"apply-default":!1,"delete-key-code":BO,"default-viewport":{zoom:1.5},"min-zoom":.2,"max-zoom":4},{"node-resizable":yt(z=>[Ee(RS,{data:z.data},null,8,["data"])]),"node-text-field":yt(z=>[Ee($S,{id:z.id,data:z.data},null,8,["id","data"])]),"node-text-area":yt(z=>[Ee(US,{id:z.id,data:z.data},null,8,["id","data"])]),"node-component":yt(z=>[Ee(QS,{id:z.id,data:z.data},null,8,["id","data"])]),"node-note":yt(z=>[Ee(rO,{id:z.id,data:z.data},null,8,["id","data"])]),default:yt(()=>[Ee(pe(jE),{"pattern-color":"#aaa",gap:16}),Ee(Ix),Ee(pe(bx),{position:"top-left"},{default:yt(()=>[Ee(pe(xr),{title:"New Project",onClick:ce},{default:yt(()=>[Ee(wl,{name:"new-file"})]),_:1}),Ee(pe(xr),{title:"Save Project",onClick:T},{default:yt(()=>[Ee(wl,{name:"save"})]),_:1}),Ee(pe(xr),{title:"Load Project",onClick:M},{default:yt(()=>[Ee(wl,{name:"load"})]),_:1}),Ee(pe(xr),{title:"Log `toObject` to Console",onClick:K[0]||(K[0]=z=>{console.log(pe(k)())})},{default:yt(()=>[Ee(wl,{name:"log"})]),_:1})]),_:1})]),_:1},8,["nodes","edges"]),Q.value?(me(),Se("div",$O,[oi(ke("input",{id:"label-editor",type:"text","onUpdate:modelValue":K[1]||(K[1]=z=>Q.value.label=z),onFocusout:ie,onKeydown:[Ha(ie,["enter"]),Ha(ie,["escape"])]},null,544),[[Fn,Q.value.label]])])):tt("",!0)],64))}};var vv={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen diff --git a/assets/index-BfzcwPlN.css b/assets/index-DcCLRh-9.css similarity index 98% rename from assets/index-BfzcwPlN.css rename to assets/index-DcCLRh-9.css index 32a1b67..afa3043 100644 --- a/assets/index-BfzcwPlN.css +++ b/assets/index-DcCLRh-9.css @@ -1 +1 @@ -.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__pane.selection{cursor:pointer}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-textbg{fill:#fff}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}.vue-flow__resize-control{position:absolute}.vue-flow__resize-control.left,.vue-flow__resize-control.right{cursor:ew-resize}.vue-flow__resize-control.top,.vue-flow__resize-control.bottom{cursor:ns-resize}.vue-flow__resize-control.top.left,.vue-flow__resize-control.bottom.right{cursor:nwse-resize}.vue-flow__resize-control.bottom.left,.vue-flow__resize-control.top.right{cursor:nesw-resize}.vue-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#ec4899;transform:translate(-50%,-50%)}.vue-flow__resize-control.handle.left{left:0;top:50%}.vue-flow__resize-control.handle.right{left:100%;top:50%}.vue-flow__resize-control.handle.top{left:50%;top:0}.vue-flow__resize-control.handle.bottom{left:50%;top:100%}.vue-flow__resize-control.handle.top.left,.vue-flow__resize-control.handle.bottom.left{left:0}.vue-flow__resize-control.handle.top.right,.vue-flow__resize-control.handle.bottom.right{left:100%}.vue-flow__resize-control.line{border-color:#ec4899;border-width:0;border-radius:10px;border-style:solid}.vue-flow__resize-control.line.left,.vue-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.vue-flow__resize-control.line.left{left:0;border-left-width:1px}.vue-flow__resize-control.line.right{left:100%;border-right-width:1px}.vue-flow__resize-control.line.top,.vue-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.vue-flow__resize-control.line.top{top:0;border-top-width:1px}.vue-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}#app{width:100vw;height:100vh;max-width:100%;margin:0 auto;padding:0rem;font-family:JetBrains Mono,monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}.vue-flow__edge-labels{font-size:1em}.node-background{width:100%;height:100%;padding:10px;background-color:#fff;box-sizing:border-box;border-radius:0}.content-wrapper{display:flex;flex-direction:column;gap:10px;height:100%}input{width:100%;padding:5px;box-sizing:border-box;border:1px solid #ccc;border-radius:5px;transition:border-color .3s ease-in-out}input:focus{outline:none;border-color:#ec4899;box-shadow:0 0 0 1px #ec4899}.quill-editor{max-width:100%;max-height:100%;flex-grow:1;overflow:hidden;box-sizing:border-box}.text-field-node{font-family:JetBrains Mono,monospace;align-items:left}.vue-flow__minimap{transform:scale(75%);transform-origin:bottom right}.vue-flow__handle{height:50%;width:5px;background:#3367d9;border-radius:8px}.vue-flow__node-value{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:10px;box-shadow:0 0 10px #0003}.vue-flow__node-value.selected{box-shadow:0 0 0 2px #ec4899}.vue-flow__node-value input{flex:1;padding:8px;border:none;border-radius:8px;box-shadow:0 0 10px #0000001a}.vue-flow__node-value input:focus{outline:none;box-shadow:0 0 0 2px #ec4899;transition:box-shadow .2s}.vue-flow__node-value.vue-flow__handle{background-color:#3367d9}.label-renaming-field{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:#00000080;z-index:1000}#label-editor{width:50%;font-size:1.25em;height:2em}.dialog-overlay{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:#00000080;z-index:1000}.dialog{background:#fff;padding:20px;text-align:center;color:#000;border-radius:10px;box-shadow:0 0 10px #0003}.dialog .actions{margin-top:20px;display:flex;justify-content:center;gap:8px}.dialog .actions button{background:#fff;padding:8px 16px;border:1px solid var(--vf-node-color, #ec4899);box-shadow:0 0 10px #0003;border-radius:5px;cursor:pointer;font-family:JetBrains Mono,monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#000}.dialog .actions button:first-of-type:hover{background:#25eb77;border-color:#25eb77}.dialog .actions button:last-of-type:hover{background:#e53e3e;border-color:#e53e3e}.intersecting[data-v-ed2a4b5c]{background:#f15a16}.components-list[data-v-ed2a4b5c]{margin-top:10px}.component-item[data-v-ed2a4b5c]{margin-bottom:5px}.component-input[data-v-ed2a4b5c]{width:100%;padding:5px;border:1px solid #ccc;border-radius:3px}.tooltip[data-v-7e3b83e7]{position:relative}.node-border[data-v-7e3b83e7]{border:1px solid #ec4899}.tooltip .tooltiptext[data-v-7e3b83e7]{visibility:hidden;width:100%;background-color:#fff;box-shadow:0 0 0 2px #3367d9;border-radius:10px;color:#000;align-self:center;text-align:center;padding:10px;bottom:125%;opacity:0;transition:opacity .3s}.tooltip:hover .tooltiptext[data-v-7e3b83e7]{visibility:visible;opacity:1}.attributes-list[data-v-7e3b83e7]{margin-top:10px}.attribute-item[data-v-7e3b83e7]{margin-bottom:5px}.attribute-input[data-v-7e3b83e7]{width:100%;padding:5px;border:1px solid #ccc;border-radius:3px}.add-attribute-button[data-v-7e3b83e7]{margin-top:15px;padding:5px 10px;border:none;border-radius:3px;background-color:#3367d9;color:#fff;cursor:pointer;font-size:14px}.add-attribute-button[data-v-7e3b83e7]:hover{background-color:#2a56c6}.node-background[data-v-05c43acc]{width:100%;height:100%;display:flex;flex-direction:column;padding:10px;box-sizing:border-box}.content-wrapper[data-v-05c43acc]{display:flex;flex-direction:column;gap:10px;height:100%}.quill-editor[data-v-05c43acc]{max-width:100%;max-height:100%;flex-grow:1;overflow:hidden;box-sizing:border-box}.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px;margin-left:1px;margin-right:1px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover{background-color:#f3f4f6}.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{background-color:#dbeafe;color:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#2563eb}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#4b5563}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#4b5563;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#4b5563;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#4b5563}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#4b5563;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle;margin-right:1px;margin-left:1px}.ql-snow .ql-picker-label{cursor:pointer;display:flex;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding:5px 8px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#d1d5db;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:3px}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px;margin:2px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #d1d5db;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#d1d5db}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #d1d5db;box-shadow:0 0 5px #d1d5db;color:#4b5563;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #d1d5db;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #d1d5db;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#2563eb}.ql-container.ql-snow{border:1px solid #d1d5db}:root{--mx-menu-backgroud: #fff;--mx-menu-hover-backgroud: #f1f1f1;--mx-menu-active-backgroud: #dfdfdf;--mx-menu-open-backgroud: #f1f1f1;--mx-menu-open-hover-backgroud: #f1f1f1;--mx-menu-divider: #f0f0f0;--mx-menu-text: #2e2e2e;--mx-menu-hover-text: #2e2e2e;--mx-menu-active-text: #2e2e2e;--mx-menu-open-text: #2e2e2e;--mx-menu-open-hover-text: #2e2e2e;--mx-menu-disabled-text: #c9c8c8;--mx-menu-icon-size: 16px;--mx-menu-shadow-color: rgba(0, 0, 0, .1);--mx-menu-backgroud-radius: 10px;--mx-menu-shortcut-backgroud: #ebebeb;--mx-menu-shortcut-backgroud-hover: #ebebeb;--mx-menu-shortcut-backgroud-active: #ebebeb;--mx-menu-shortcut-backgroud-open: #ebebeb;--mx-menu-shortcut-backgroud-disabled: #fdfdfd;--mx-menu-shortcut-text: #424242;--mx-menu-shortcut-text-hover: #424242;--mx-menu-shortcut-text-active: #424242;--mx-menu-shortcut-text-open: #424242;--mx-menu-shortcut-text-disabled: #a5a5a5;--mx-menu-focus-color: #3367d9;--mx-menu-placeholder-width: 24px }.mx-context-menu{pointer-events:all;display:inline-block;overflow:visible;position:absolute;background-color:var(--mx-menu-backgroud);border-radius:var(--mx-menu-backgroud-radius);padding:12px 0;font-family:JetBrains Mono,monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;outline:#3367d9;box-shadow:0 0 0 2px #3367d9;border-radius:10px;transition:opacity .2s ease-in-out}.mx-context-menu-items{position:relative;overflow:visible}.mx-context-menu-scroll{position:absolute;top:0;left:0;right:0;bottom:1px;pointer-events:none}.mx-context-menu-updown{pointer-events:all;position:absolute;left:0;right:0;height:15px;border-radius:10px;background-color:var(--mx-menu-backgroud);-webkit-user-select:none;user-select:none;cursor:pointer}.mx-context-menu-updown.placeholder{position:relative;cursor:default}.mx-context-menu-updown.disabled{color:var(--mx-menu-disabled-text);cursor:default}.mx-context-menu-updown.disabled .mx-right-arrow{fill:var(--mx-menu-disabled-text)}.mx-context-menu-updown:hover:not(.disabled){background-color:var(--mx-menu-hover-backgroud)}.mx-context-menu-updown:active{background-color:var(--mx-menu-active-backgroud)}.mx-context-menu-updown.up{top:0}.mx-context-menu-updown.up .mx-right-arrow{transform:translate(-50%) rotate(270deg)}.mx-context-menu-updown.down{bottom:-1px}.mx-context-menu-updown.down .mx-right-arrow{transform:translate(-50%) rotate(90deg)}.mx-context-menu-updown .mx-right-arrow{display:inline-block;position:absolute;height:12px;left:50%;top:0;padding:0}.mx-context-menu-item{display:flex;flex-direction:row;justify-content:space-between;align-items:center;position:relative;padding:6px 15px;-webkit-user-select:none;user-select:none;overflow:visible;white-space:nowrap;text-overflow:ellipsis;color:var(--mx-menu-text)}.mx-context-menu-item .mx-right-arrow,.mx-context-menu-item .mx-checked-mark{fill:var(--mx-menu-text)}.mx-context-menu-item:hover{background-color:var(--mx-menu-hover-backgroud);color:var(--mx-menu-hover-text)}.mx-context-menu-item:hover .mx-right-arrow,.mx-context-menu-item:hover .mx-checked-mark{fill:var(--mx-menu-hover-text)}.mx-context-menu-item:hover .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-hover);color:var(--mx-menu-shortcut-text-hover)}.mx-context-menu-item:active{background-color:var(--mx-menu-active-backgroud);color:var(--mx-menu-active-text)}.mx-context-menu-item:active .mx-right-arrow,.mx-context-menu-item:active .mx-checked-mark{fill:var(--mx-menu-active-text)}.mx-context-menu-item:active .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-active);color:var(--mx-menu-shortcut-text-active)}.mx-context-menu-item.open{background-color:var(--mx-menu-open-backgroud);color:var(--mx-menu-open-text)}.mx-context-menu-item.open:hover{background-color:var(--mx-menu-open-hover-backgroud);color:var(--mx-menu-open-hover-text)}.mx-context-menu-item.open .mx-right-arrow,.mx-context-menu-item.open .mx-checked-mark{fill:var(--mx-menu-open-text)}.mx-context-menu-item.open .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-open);color:var(--mx-menu-shortcut-text-open)}.mx-context-menu-item.keyboard-focus{background-color:var(--mx-menu-active-backgroud);outline:2px solid var(--mx-menu-focus-color)}.mx-context-menu-item.disabled{color:var(--mx-menu-disabled-text);cursor:not-allowed}.mx-context-menu-item.disabled:hover,.mx-context-menu-item.disabled:active{background-color:transparent}.mx-context-menu-item.disabled .mx-right-arrow,.mx-context-menu-item.disabled .mx-checked-mark{fill:var(--mx-menu-disabled-text)}.mx-context-menu-item.disabled .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-disabled);color:var(--mx-menu-shortcut-text-second)}.mx-context-menu-item .mx-item-row{display:flex;flex-direction:row;align-items:center;max-width:100%}.mx-context-menu-item .mx-icon-placeholder{position:relative;display:flex;flex-direction:row;align-items:center;height:auto;overflow:hidden}.mx-context-menu-item .mx-icon-placeholder.preserve-width{width:var(--mx-menu-placeholder-width)}.mx-context-menu-item .icon{display:inline-block;font-size:var(--mx-menu-icon-size)}.mx-context-menu-item .icon.svg{width:var(--mx-menu-icon-size);height:var(--mx-menu-icon-size)}.mx-context-menu-item .label{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-inline-end:16px}.mx-context-menu-item-wrapper{position:relative}.mx-context-menu-item-sperator{display:block;padding:5px 0;background-color:var(--mx-menu-backgroud)}.mx-context-menu-item-sperator:after{display:block;content:"";background-color:var(--mx-menu-divider);height:1px}.mx-right-arrow{width:14px;height:14px}.mx-checked-mark{width:var(--mx-menu-icon-size);height:var(--mx-menu-icon-size)}.mx-shortcut{position:relative;justify-self:flex-end;font-size:11.5px;padding:2px 4px;background-color:var(--mx-menu-shortcut-backgroud);color:var(--mx-menu-shortcut-text)}.mx-menu-bar.dark,.mx-context-menu.dark{--mx-menu-backgroud: #303031;--mx-menu-hover-backgroud: #636363;--mx-menu-active-backgroud: #555555;--mx-menu-open-backgroud: #636363;--mx-menu-open-hover-backgroud: #636363;--mx-menu-divider: #464646;--mx-menu-text: #ffffff;--mx-menu-hover-text: #ffffff;--mx-menu-active-text: #ffffff;--mx-menu-open-text: #ffffff;--mx-menu-open-hover-text: #ffffff;--mx-menu-disabled-text: #9c9c9c;--mx-menu-shadow-color: rgba(51, 51, 51, .2);--mx-menu-shortcut-backgroud: #505050;--mx-menu-shortcut-backgroud-hover: #505050;--mx-menu-shortcut-backgroud-active: #505050;--mx-menu-shortcut-backgroud-open: #505050;--mx-menu-shortcut-backgroud-disabled: #444444;--mx-menu-shortcut-text: #f1f1f1;--mx-menu-shortcut-text-hover: #ffffff;--mx-menu-shortcut-text-active: #ffffff;--mx-menu-shortcut-text-open: #ffffff;--mx-menu-shortcut-text-disabled: #9d9d9d }.mx-menu-bar.flat,.mx-context-menu.flat{border-radius:0;padding:7px 0;box-shadow:0 1px 2px 1px var(--mx-menu-shadow-color)}.mx-menu-bar.flat .mx-context-menu-item,.mx-context-menu.flat .mx-context-menu-item{padding:3px 12px}.mx-menu-bar.win10,.mx-context-menu.win10{border-radius:0;padding:8px 0;border:1px solid var(--mx-menu-border-color);box-shadow:2px 2px 1px 0 var(--mx-menu-shadow-color)}.mx-menu-bar.win10,.mx-context-menu.win10{--mx-menu-backgroud: #eeeeee;--mx-menu-hover-backgroud: #d8d8d8;--mx-menu-active-backgroud: #dfdfdf;--mx-menu-open-backgroud: #f1f1f1;--mx-menu-open-hover-backgroud: #d8d8d8;--mx-menu-divider: #aaaaaa;--mx-menu-border-color: #b1b1b1;--mx-menu-shortcut-backgroud: transparent;--mx-menu-shortcut-backgroud-hover: transparent;--mx-menu-shortcut-backgroud-active: transparent;--mx-menu-shortcut-backgroud-open: transparent;--mx-menu-shortcut-backgroud-disabled: transparent;--mx-menu-shortcut-text: #272727;--mx-menu-shortcut-text-hover: #272727;--mx-menu-shortcut-text-active: #272727;--mx-menu-shortcut-text-open: #272727;--mx-menu-shortcut-text-disabled: #6b6b6b }.mx-menu-bar.win10 .mx-context-menu-item,.mx-context-menu.win10 .mx-context-menu-item{padding:2px 4px;margin:0 4px}.mx-menu-bar.win10 .mx-context-menu-item-sperator,.mx-context-menu.win10 .mx-context-menu-item-sperator{margin:0 4px}.mx-menu-bar.win10.dark,.mx-context-menu.win10.dark{--mx-menu-backgroud: #303031;--mx-menu-hover-backgroud: #636363;--mx-menu-active-backgroud: #555555;--mx-menu-open-backgroud: #636363;--mx-menu-open-hover-backgroud: #636363;--mx-menu-divider: #808080;--mx-menu-border-color: #656565;--mx-menu-shortcut-backgroud: #505050;--mx-menu-shortcut-backgroud-hover: #505050;--mx-menu-shortcut-backgroud-active: #505050;--mx-menu-shortcut-backgroud-open: #505050;--mx-menu-shortcut-backgroud-disabled: #444444;--mx-menu-shortcut-text: #f1f1f1;--mx-menu-shortcut-text-hover: #ffffff;--mx-menu-shortcut-text-active: #ffffff;--mx-menu-shortcut-text-open: #ffffff;--mx-menu-shortcut-text-disabled: #9d9d9d;padding:8px 0}.mx-menu-bar.win10.dark .mx-context-menu-item,.mx-context-menu.win10.dark .mx-context-menu-item{padding:6px 12px;margin:0}.mx-menu-bar.win10.dark .mx-context-menu-item-sperator,.mx-context-menu.win10.dark .mx-context-menu-item-sperator{margin:0 7px}.mx-menu-bar.mac,.mx-context-menu.mac{padding:8px 0;box-shadow:0 5px 7px 1px var(--mx-menu-shadow-color);border:1px solid var(--mx-menu-border-color)}.mx-menu-bar.mac,.mx-context-menu.mac{--mx-menu-backgroud: #ececec;--mx-menu-hover-backgroud: #0165e1;--mx-menu-active-backgroud: #0165e1;--mx-menu-open-backgroud: #858585;--mx-menu-open-hover-backgroud: #0165e1;--mx-menu-divider: #d2d2d2;--mx-menu-text: #232323;--mx-menu-hover-text: #fff;--mx-menu-active-text: #fff;--mx-menu-open-text: #fff;--mx-menu-open-hover-text: #fff;--mx-menu-disabled-text: #bbbbbb;--mx-menu-shadow-color: rgba(0, 0, 0, .1);--mx-menu-backgroud-radius: 10px;--mx-menu-shortcut-backgroud: transparent;--mx-menu-shortcut-backgroud-hover: transparent;--mx-menu-shortcut-backgroud-active: transparent;--mx-menu-shortcut-backgroud-open: transparent;--mx-menu-shortcut-backgroud-disabled: transparent;--mx-menu-shortcut-text: #424242;--mx-menu-shortcut-text-hover: #fff;--mx-menu-shortcut-text-active: #fff;--mx-menu-shortcut-text-open: #fff;--mx-menu-shortcut-text-disabled: #a5a5a5;--mx-menu-focus-color: transparent;--mx-menu-border-color: #bbbbbb }.mx-menu-bar.mac.dark,.mx-context-menu.mac.dark{--mx-menu-backgroud: #333333;--mx-menu-hover-backgroud: #0153d2;--mx-menu-active-backgroud: #0153d2;--mx-menu-open-hover-backgroud: #0153d2;--mx-menu-open-backgroud: #414346;--mx-menu-divider: #575757;--mx-menu-text: #dcdcdc;--mx-menu-hover-text: #fff;--mx-menu-active-text: #fff;--mx-menu-open-text: #fff;--mx-menu-open-hover-text: #fff;--mx-menu-disabled-text: #6a6a6a;--mx-menu-shadow-color: rgba(0, 0, 0, .1);--mx-menu-backgroud-radius: 10px;--mx-menu-shortcut-backgroud: transparent;--mx-menu-shortcut-backgroud-hover: transparent;--mx-menu-shortcut-backgroud-active: transparent;--mx-menu-shortcut-backgroud-open: transparent;--mx-menu-shortcut-backgroud-disabled: transparent;--mx-menu-shortcut-text: #dadada;--mx-menu-shortcut-text-hover: #fff;--mx-menu-shortcut-text-active: #fff;--mx-menu-shortcut-text-open: #fff;--mx-menu-shortcut-text-disabled: #6a6a6a;--mx-menu-focus-color: transparent;--mx-menu-border-color: #222 }.mx-menu-bar.mac .mx-context-menu-item,.mx-context-menu.mac .mx-context-menu-item{border-radius:5px;margin:0 6px;padding:3px 6px}.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus{background-color:var(--mx-menu-active-backgroud);color:var(--mx-menu-active-text);outline:none}.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus .mx-right-arrow,.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus .mx-checked-mark,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus .mx-right-arrow,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus .mx-checked-mark{fill:var(--mx-menu-active-text)}.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus .mx-shortcut,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-active);color:var(--mx-menu-shortcut-text-active)}.mx-menu-bar.mac .mx-context-menu-item-sperator,.mx-context-menu.mac .mx-context-menu-item-sperator{margin:0 12px}.mx-menu-ghost-host{position:absolute;left:0;bottom:0;right:0;top:0;overflow:hidden;pointer-events:none}.mx-menu-ghost-host.fullscreen{position:fixed}.mx-menu-bar{flex:1;display:flex;flex-direction:row;align-items:center;background-color:var(--mx-menu-backgroud);padding:5px 0}.mx-menu-bar.mini{flex-grow:0}.mx-menu-bar .mx-menu-bar-content{display:flex;flex-direction:row;align-items:center}.mx-menu-bar .mx-menu-bar-item{padding:2px 8px;border-radius:5px;-webkit-user-select:none;user-select:none;background-color:var(--mx-menu-backgroud);color:var(--mx-menu-text)}.mx-menu-bar .mx-menu-bar-item:hover{background-color:var(--mx-menu-hover-backgroud);color:var(--mx-menu-hover-text)}.mx-menu-bar .mx-menu-bar-item:hover .mx-menu-bar-icon-menu{fill:var(--mx-menu-hover-text)}.mx-menu-bar .mx-menu-bar-item:active,.mx-menu-bar .mx-menu-bar-item.active{background-color:var(--mx-menu-active-backgroud);color:var(--mx-menu-active-text)}.mx-menu-bar .mx-menu-bar-item:active .mx-menu-bar-icon-menu,.mx-menu-bar .mx-menu-bar-item.active .mx-menu-bar-icon-menu{fill:var(--mx-menu-active-text)}.mx-menu-bar .mx-menu-bar-icon-menu{fill:var(--mx-menu-text);width:var(--mx-menu-icon-size);height:var(--mx-menu-icon-size)}.mx-menu-bar.flat .mx-menu-bar-item{border-radius:0} +.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__pane.selection{cursor:pointer}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-textbg{fill:#fff}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}.vue-flow__resize-control{position:absolute}.vue-flow__resize-control.left,.vue-flow__resize-control.right{cursor:ew-resize}.vue-flow__resize-control.top,.vue-flow__resize-control.bottom{cursor:ns-resize}.vue-flow__resize-control.top.left,.vue-flow__resize-control.bottom.right{cursor:nwse-resize}.vue-flow__resize-control.bottom.left,.vue-flow__resize-control.top.right{cursor:nesw-resize}.vue-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#ec4899;transform:translate(-50%,-50%)}.vue-flow__resize-control.handle.left{left:0;top:50%}.vue-flow__resize-control.handle.right{left:100%;top:50%}.vue-flow__resize-control.handle.top{left:50%;top:0}.vue-flow__resize-control.handle.bottom{left:50%;top:100%}.vue-flow__resize-control.handle.top.left,.vue-flow__resize-control.handle.bottom.left{left:0}.vue-flow__resize-control.handle.top.right,.vue-flow__resize-control.handle.bottom.right{left:100%}.vue-flow__resize-control.line{border-color:#ec4899;border-width:0;border-radius:10px;border-style:solid}.vue-flow__resize-control.line.left,.vue-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.vue-flow__resize-control.line.left{left:0;border-left-width:1px}.vue-flow__resize-control.line.right{left:100%;border-right-width:1px}.vue-flow__resize-control.line.top,.vue-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.vue-flow__resize-control.line.top{top:0;border-top-width:1px}.vue-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}#app{width:100vw;height:100vh;max-width:100%;margin:0 auto;padding:0rem;font-family:JetBrains Mono,monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}.vue-flow__edge-labels{font-size:1em}.node-background{width:100%;height:100%;padding:10px;background-color:#fff;box-sizing:border-box;border-radius:0}.content-wrapper{display:flex;flex-direction:column;gap:10px;height:100%}input{width:100%;padding:5px;box-sizing:border-box;border:1px solid #ccc;border-radius:5px;transition:border-color .3s ease-in-out}input:focus{outline:none;border-color:#ec4899;box-shadow:0 0 0 1px #ec4899}.quill-editor{max-width:100%;max-height:100%;flex-grow:1;overflow:hidden;box-sizing:border-box}.text-field-node{font-family:JetBrains Mono,monospace;align-items:left}.vue-flow__minimap{transform:scale(75%);transform-origin:bottom right}.vue-flow__handle{height:50%;width:5px;background:#3367d9;border-radius:8px}.vue-flow__node-value{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:10px;box-shadow:0 0 10px #0003}.vue-flow__node-value.selected{box-shadow:0 0 0 2px #ec4899}.vue-flow__node-value input{flex:1;padding:8px;border:none;border-radius:8px;box-shadow:0 0 10px #0000001a}.vue-flow__node-value input:focus{outline:none;box-shadow:0 0 0 2px #ec4899;transition:box-shadow .2s}.vue-flow__node-value.vue-flow__handle{background-color:#3367d9}.label-renaming-field{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:#00000080;z-index:1000}#label-editor{width:50%;font-size:1.25em;height:2em}.dialog-overlay{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:#00000080;z-index:1000}.dialog{background:#fff;padding:20px;text-align:center;color:#000;border-radius:10px;box-shadow:0 0 10px #0003}.dialog .actions{margin-top:20px;display:flex;justify-content:center;gap:8px}.dialog .actions button{background:#fff;padding:8px 16px;border:1px solid var(--vf-node-color, #ec4899);box-shadow:0 0 10px #0003;border-radius:5px;cursor:pointer;font-family:JetBrains Mono,monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#000}.dialog .actions button:first-of-type:hover{background:#25eb77;border-color:#25eb77}.dialog .actions button:last-of-type:hover{background:#e53e3e;border-color:#e53e3e}.intersecting[data-v-ed2a4b5c]{background:#f15a16}.components-list[data-v-ed2a4b5c]{margin-top:10px}.component-item[data-v-ed2a4b5c]{margin-bottom:5px}.component-input[data-v-ed2a4b5c]{width:100%;padding:5px;border:1px solid #ccc;border-radius:3px}.tooltip[data-v-3bf6ebe0]{position:relative}.node-border[data-v-3bf6ebe0]{border:1px solid #ec4899}.tooltip .tooltiptext[data-v-3bf6ebe0]{visibility:hidden;width:100%;background-color:#fff;box-shadow:0 0 0 2px #3367d9;border-radius:10px;color:#000;align-self:center;text-align:center;padding:10px;bottom:125%;opacity:0;transition:opacity .3s}.tooltip:hover .tooltiptext[data-v-3bf6ebe0]{visibility:visible;opacity:1}.attributes-list[data-v-3bf6ebe0]{margin-top:10px}.attribute-item[data-v-3bf6ebe0]{margin-bottom:5px}.attribute-input[data-v-3bf6ebe0]{width:100%;padding:5px;border:1px solid #ccc;border-radius:3px}.add-attribute-button[data-v-3bf6ebe0]{margin-top:15px;padding:5px 10px;border:none;border-radius:3px;background-color:#3367d9;color:#fff;cursor:pointer;font-size:14px}.add-attribute-button[data-v-3bf6ebe0]:hover{background-color:#2a56c6}.node-background[data-v-05c43acc]{width:100%;height:100%;display:flex;flex-direction:column;padding:10px;box-sizing:border-box}.content-wrapper[data-v-05c43acc]{display:flex;flex-direction:column;gap:10px;height:100%}.quill-editor[data-v-05c43acc]{max-width:100%;max-height:100%;flex-grow:1;overflow:hidden;box-sizing:border-box}.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px;margin-left:1px;margin-right:1px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover{background-color:#f3f4f6}.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{background-color:#dbeafe;color:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#2563eb}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#4b5563}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#4b5563;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#4b5563;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#4b5563}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#4b5563;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle;margin-right:1px;margin-left:1px}.ql-snow .ql-picker-label{cursor:pointer;display:flex;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding:5px 8px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#d1d5db;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:3px}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px;margin:2px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #d1d5db;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#d1d5db}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #d1d5db;box-shadow:0 0 5px #d1d5db;color:#4b5563;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #d1d5db;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #d1d5db;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#2563eb}.ql-container.ql-snow{border:1px solid #d1d5db}:root{--mx-menu-backgroud: #fff;--mx-menu-hover-backgroud: #f1f1f1;--mx-menu-active-backgroud: #dfdfdf;--mx-menu-open-backgroud: #f1f1f1;--mx-menu-open-hover-backgroud: #f1f1f1;--mx-menu-divider: #f0f0f0;--mx-menu-text: #2e2e2e;--mx-menu-hover-text: #2e2e2e;--mx-menu-active-text: #2e2e2e;--mx-menu-open-text: #2e2e2e;--mx-menu-open-hover-text: #2e2e2e;--mx-menu-disabled-text: #c9c8c8;--mx-menu-icon-size: 16px;--mx-menu-shadow-color: rgba(0, 0, 0, .1);--mx-menu-backgroud-radius: 10px;--mx-menu-shortcut-backgroud: #ebebeb;--mx-menu-shortcut-backgroud-hover: #ebebeb;--mx-menu-shortcut-backgroud-active: #ebebeb;--mx-menu-shortcut-backgroud-open: #ebebeb;--mx-menu-shortcut-backgroud-disabled: #fdfdfd;--mx-menu-shortcut-text: #424242;--mx-menu-shortcut-text-hover: #424242;--mx-menu-shortcut-text-active: #424242;--mx-menu-shortcut-text-open: #424242;--mx-menu-shortcut-text-disabled: #a5a5a5;--mx-menu-focus-color: #3367d9;--mx-menu-placeholder-width: 24px }.mx-context-menu{pointer-events:all;display:inline-block;overflow:visible;position:absolute;background-color:var(--mx-menu-backgroud);border-radius:var(--mx-menu-backgroud-radius);padding:12px 0;font-family:JetBrains Mono,monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;outline:#3367d9;box-shadow:0 0 0 2px #3367d9;border-radius:10px;transition:opacity .2s ease-in-out}.mx-context-menu-items{position:relative;overflow:visible}.mx-context-menu-scroll{position:absolute;top:0;left:0;right:0;bottom:1px;pointer-events:none}.mx-context-menu-updown{pointer-events:all;position:absolute;left:0;right:0;height:15px;border-radius:10px;background-color:var(--mx-menu-backgroud);-webkit-user-select:none;user-select:none;cursor:pointer}.mx-context-menu-updown.placeholder{position:relative;cursor:default}.mx-context-menu-updown.disabled{color:var(--mx-menu-disabled-text);cursor:default}.mx-context-menu-updown.disabled .mx-right-arrow{fill:var(--mx-menu-disabled-text)}.mx-context-menu-updown:hover:not(.disabled){background-color:var(--mx-menu-hover-backgroud)}.mx-context-menu-updown:active{background-color:var(--mx-menu-active-backgroud)}.mx-context-menu-updown.up{top:0}.mx-context-menu-updown.up .mx-right-arrow{transform:translate(-50%) rotate(270deg)}.mx-context-menu-updown.down{bottom:-1px}.mx-context-menu-updown.down .mx-right-arrow{transform:translate(-50%) rotate(90deg)}.mx-context-menu-updown .mx-right-arrow{display:inline-block;position:absolute;height:12px;left:50%;top:0;padding:0}.mx-context-menu-item{display:flex;flex-direction:row;justify-content:space-between;align-items:center;position:relative;padding:6px 15px;-webkit-user-select:none;user-select:none;overflow:visible;white-space:nowrap;text-overflow:ellipsis;color:var(--mx-menu-text)}.mx-context-menu-item .mx-right-arrow,.mx-context-menu-item .mx-checked-mark{fill:var(--mx-menu-text)}.mx-context-menu-item:hover{background-color:var(--mx-menu-hover-backgroud);color:var(--mx-menu-hover-text)}.mx-context-menu-item:hover .mx-right-arrow,.mx-context-menu-item:hover .mx-checked-mark{fill:var(--mx-menu-hover-text)}.mx-context-menu-item:hover .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-hover);color:var(--mx-menu-shortcut-text-hover)}.mx-context-menu-item:active{background-color:var(--mx-menu-active-backgroud);color:var(--mx-menu-active-text)}.mx-context-menu-item:active .mx-right-arrow,.mx-context-menu-item:active .mx-checked-mark{fill:var(--mx-menu-active-text)}.mx-context-menu-item:active .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-active);color:var(--mx-menu-shortcut-text-active)}.mx-context-menu-item.open{background-color:var(--mx-menu-open-backgroud);color:var(--mx-menu-open-text)}.mx-context-menu-item.open:hover{background-color:var(--mx-menu-open-hover-backgroud);color:var(--mx-menu-open-hover-text)}.mx-context-menu-item.open .mx-right-arrow,.mx-context-menu-item.open .mx-checked-mark{fill:var(--mx-menu-open-text)}.mx-context-menu-item.open .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-open);color:var(--mx-menu-shortcut-text-open)}.mx-context-menu-item.keyboard-focus{background-color:var(--mx-menu-active-backgroud);outline:2px solid var(--mx-menu-focus-color)}.mx-context-menu-item.disabled{color:var(--mx-menu-disabled-text);cursor:not-allowed}.mx-context-menu-item.disabled:hover,.mx-context-menu-item.disabled:active{background-color:transparent}.mx-context-menu-item.disabled .mx-right-arrow,.mx-context-menu-item.disabled .mx-checked-mark{fill:var(--mx-menu-disabled-text)}.mx-context-menu-item.disabled .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-disabled);color:var(--mx-menu-shortcut-text-second)}.mx-context-menu-item .mx-item-row{display:flex;flex-direction:row;align-items:center;max-width:100%}.mx-context-menu-item .mx-icon-placeholder{position:relative;display:flex;flex-direction:row;align-items:center;height:auto;overflow:hidden}.mx-context-menu-item .mx-icon-placeholder.preserve-width{width:var(--mx-menu-placeholder-width)}.mx-context-menu-item .icon{display:inline-block;font-size:var(--mx-menu-icon-size)}.mx-context-menu-item .icon.svg{width:var(--mx-menu-icon-size);height:var(--mx-menu-icon-size)}.mx-context-menu-item .label{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-inline-end:16px}.mx-context-menu-item-wrapper{position:relative}.mx-context-menu-item-sperator{display:block;padding:5px 0;background-color:var(--mx-menu-backgroud)}.mx-context-menu-item-sperator:after{display:block;content:"";background-color:var(--mx-menu-divider);height:1px}.mx-right-arrow{width:14px;height:14px}.mx-checked-mark{width:var(--mx-menu-icon-size);height:var(--mx-menu-icon-size)}.mx-shortcut{position:relative;justify-self:flex-end;font-size:11.5px;padding:2px 4px;background-color:var(--mx-menu-shortcut-backgroud);color:var(--mx-menu-shortcut-text)}.mx-menu-bar.dark,.mx-context-menu.dark{--mx-menu-backgroud: #303031;--mx-menu-hover-backgroud: #636363;--mx-menu-active-backgroud: #555555;--mx-menu-open-backgroud: #636363;--mx-menu-open-hover-backgroud: #636363;--mx-menu-divider: #464646;--mx-menu-text: #ffffff;--mx-menu-hover-text: #ffffff;--mx-menu-active-text: #ffffff;--mx-menu-open-text: #ffffff;--mx-menu-open-hover-text: #ffffff;--mx-menu-disabled-text: #9c9c9c;--mx-menu-shadow-color: rgba(51, 51, 51, .2);--mx-menu-shortcut-backgroud: #505050;--mx-menu-shortcut-backgroud-hover: #505050;--mx-menu-shortcut-backgroud-active: #505050;--mx-menu-shortcut-backgroud-open: #505050;--mx-menu-shortcut-backgroud-disabled: #444444;--mx-menu-shortcut-text: #f1f1f1;--mx-menu-shortcut-text-hover: #ffffff;--mx-menu-shortcut-text-active: #ffffff;--mx-menu-shortcut-text-open: #ffffff;--mx-menu-shortcut-text-disabled: #9d9d9d }.mx-menu-bar.flat,.mx-context-menu.flat{border-radius:0;padding:7px 0;box-shadow:0 1px 2px 1px var(--mx-menu-shadow-color)}.mx-menu-bar.flat .mx-context-menu-item,.mx-context-menu.flat .mx-context-menu-item{padding:3px 12px}.mx-menu-bar.win10,.mx-context-menu.win10{border-radius:0;padding:8px 0;border:1px solid var(--mx-menu-border-color);box-shadow:2px 2px 1px 0 var(--mx-menu-shadow-color)}.mx-menu-bar.win10,.mx-context-menu.win10{--mx-menu-backgroud: #eeeeee;--mx-menu-hover-backgroud: #d8d8d8;--mx-menu-active-backgroud: #dfdfdf;--mx-menu-open-backgroud: #f1f1f1;--mx-menu-open-hover-backgroud: #d8d8d8;--mx-menu-divider: #aaaaaa;--mx-menu-border-color: #b1b1b1;--mx-menu-shortcut-backgroud: transparent;--mx-menu-shortcut-backgroud-hover: transparent;--mx-menu-shortcut-backgroud-active: transparent;--mx-menu-shortcut-backgroud-open: transparent;--mx-menu-shortcut-backgroud-disabled: transparent;--mx-menu-shortcut-text: #272727;--mx-menu-shortcut-text-hover: #272727;--mx-menu-shortcut-text-active: #272727;--mx-menu-shortcut-text-open: #272727;--mx-menu-shortcut-text-disabled: #6b6b6b }.mx-menu-bar.win10 .mx-context-menu-item,.mx-context-menu.win10 .mx-context-menu-item{padding:2px 4px;margin:0 4px}.mx-menu-bar.win10 .mx-context-menu-item-sperator,.mx-context-menu.win10 .mx-context-menu-item-sperator{margin:0 4px}.mx-menu-bar.win10.dark,.mx-context-menu.win10.dark{--mx-menu-backgroud: #303031;--mx-menu-hover-backgroud: #636363;--mx-menu-active-backgroud: #555555;--mx-menu-open-backgroud: #636363;--mx-menu-open-hover-backgroud: #636363;--mx-menu-divider: #808080;--mx-menu-border-color: #656565;--mx-menu-shortcut-backgroud: #505050;--mx-menu-shortcut-backgroud-hover: #505050;--mx-menu-shortcut-backgroud-active: #505050;--mx-menu-shortcut-backgroud-open: #505050;--mx-menu-shortcut-backgroud-disabled: #444444;--mx-menu-shortcut-text: #f1f1f1;--mx-menu-shortcut-text-hover: #ffffff;--mx-menu-shortcut-text-active: #ffffff;--mx-menu-shortcut-text-open: #ffffff;--mx-menu-shortcut-text-disabled: #9d9d9d;padding:8px 0}.mx-menu-bar.win10.dark .mx-context-menu-item,.mx-context-menu.win10.dark .mx-context-menu-item{padding:6px 12px;margin:0}.mx-menu-bar.win10.dark .mx-context-menu-item-sperator,.mx-context-menu.win10.dark .mx-context-menu-item-sperator{margin:0 7px}.mx-menu-bar.mac,.mx-context-menu.mac{padding:8px 0;box-shadow:0 5px 7px 1px var(--mx-menu-shadow-color);border:1px solid var(--mx-menu-border-color)}.mx-menu-bar.mac,.mx-context-menu.mac{--mx-menu-backgroud: #ececec;--mx-menu-hover-backgroud: #0165e1;--mx-menu-active-backgroud: #0165e1;--mx-menu-open-backgroud: #858585;--mx-menu-open-hover-backgroud: #0165e1;--mx-menu-divider: #d2d2d2;--mx-menu-text: #232323;--mx-menu-hover-text: #fff;--mx-menu-active-text: #fff;--mx-menu-open-text: #fff;--mx-menu-open-hover-text: #fff;--mx-menu-disabled-text: #bbbbbb;--mx-menu-shadow-color: rgba(0, 0, 0, .1);--mx-menu-backgroud-radius: 10px;--mx-menu-shortcut-backgroud: transparent;--mx-menu-shortcut-backgroud-hover: transparent;--mx-menu-shortcut-backgroud-active: transparent;--mx-menu-shortcut-backgroud-open: transparent;--mx-menu-shortcut-backgroud-disabled: transparent;--mx-menu-shortcut-text: #424242;--mx-menu-shortcut-text-hover: #fff;--mx-menu-shortcut-text-active: #fff;--mx-menu-shortcut-text-open: #fff;--mx-menu-shortcut-text-disabled: #a5a5a5;--mx-menu-focus-color: transparent;--mx-menu-border-color: #bbbbbb }.mx-menu-bar.mac.dark,.mx-context-menu.mac.dark{--mx-menu-backgroud: #333333;--mx-menu-hover-backgroud: #0153d2;--mx-menu-active-backgroud: #0153d2;--mx-menu-open-hover-backgroud: #0153d2;--mx-menu-open-backgroud: #414346;--mx-menu-divider: #575757;--mx-menu-text: #dcdcdc;--mx-menu-hover-text: #fff;--mx-menu-active-text: #fff;--mx-menu-open-text: #fff;--mx-menu-open-hover-text: #fff;--mx-menu-disabled-text: #6a6a6a;--mx-menu-shadow-color: rgba(0, 0, 0, .1);--mx-menu-backgroud-radius: 10px;--mx-menu-shortcut-backgroud: transparent;--mx-menu-shortcut-backgroud-hover: transparent;--mx-menu-shortcut-backgroud-active: transparent;--mx-menu-shortcut-backgroud-open: transparent;--mx-menu-shortcut-backgroud-disabled: transparent;--mx-menu-shortcut-text: #dadada;--mx-menu-shortcut-text-hover: #fff;--mx-menu-shortcut-text-active: #fff;--mx-menu-shortcut-text-open: #fff;--mx-menu-shortcut-text-disabled: #6a6a6a;--mx-menu-focus-color: transparent;--mx-menu-border-color: #222 }.mx-menu-bar.mac .mx-context-menu-item,.mx-context-menu.mac .mx-context-menu-item{border-radius:5px;margin:0 6px;padding:3px 6px}.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus{background-color:var(--mx-menu-active-backgroud);color:var(--mx-menu-active-text);outline:none}.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus .mx-right-arrow,.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus .mx-checked-mark,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus .mx-right-arrow,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus .mx-checked-mark{fill:var(--mx-menu-active-text)}.mx-menu-bar.mac .mx-context-menu-item.keyboard-focus .mx-shortcut,.mx-context-menu.mac .mx-context-menu-item.keyboard-focus .mx-shortcut{background-color:var(--mx-menu-shortcut-backgroud-active);color:var(--mx-menu-shortcut-text-active)}.mx-menu-bar.mac .mx-context-menu-item-sperator,.mx-context-menu.mac .mx-context-menu-item-sperator{margin:0 12px}.mx-menu-ghost-host{position:absolute;left:0;bottom:0;right:0;top:0;overflow:hidden;pointer-events:none}.mx-menu-ghost-host.fullscreen{position:fixed}.mx-menu-bar{flex:1;display:flex;flex-direction:row;align-items:center;background-color:var(--mx-menu-backgroud);padding:5px 0}.mx-menu-bar.mini{flex-grow:0}.mx-menu-bar .mx-menu-bar-content{display:flex;flex-direction:row;align-items:center}.mx-menu-bar .mx-menu-bar-item{padding:2px 8px;border-radius:5px;-webkit-user-select:none;user-select:none;background-color:var(--mx-menu-backgroud);color:var(--mx-menu-text)}.mx-menu-bar .mx-menu-bar-item:hover{background-color:var(--mx-menu-hover-backgroud);color:var(--mx-menu-hover-text)}.mx-menu-bar .mx-menu-bar-item:hover .mx-menu-bar-icon-menu{fill:var(--mx-menu-hover-text)}.mx-menu-bar .mx-menu-bar-item:active,.mx-menu-bar .mx-menu-bar-item.active{background-color:var(--mx-menu-active-backgroud);color:var(--mx-menu-active-text)}.mx-menu-bar .mx-menu-bar-item:active .mx-menu-bar-icon-menu,.mx-menu-bar .mx-menu-bar-item.active .mx-menu-bar-icon-menu{fill:var(--mx-menu-active-text)}.mx-menu-bar .mx-menu-bar-icon-menu{fill:var(--mx-menu-text);width:var(--mx-menu-icon-size);height:var(--mx-menu-icon-size)}.mx-menu-bar.flat .mx-menu-bar-item{border-radius:0} diff --git a/index.html b/index.html index 51fc41b..4e41b3a 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ Corkboard - - + +