jingrow/apps/jingrow/frontend/dist/assets/AIAgentFlowBuilder-0d0fbb19.js

16 lines
75 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as ae,aB as _t,l as C,D as tt,w as O,aC as j,e as R,F as le,h as Y,a9 as St,j as $,y as U,f as S,aD as Zn,aE as un,r as V,aF as Jn,c as et,aG as Qn,g as q,C as jn,a1 as cn,Y as Vt,aH as ti,aI as ei,aJ as Ve,A as hn,u as ni,o as Oe,a7 as ii,J as we,K as oi,M as qe,t as D,p as st,n as mt,I as ri,T as Le}from"./index-b37e64ca.js";import{P as si,u as ue,_ as fn,g as ai,a as li,w as ui,i as ci,b as Dt,c as hi}from"./vue-flow-core-e20a6f7d.js";import{g as dn,u as fi,p as di,a as gi}from"./nodeMetadata-868a0a07.js";import pi from"./NodePalette-0bf3e03c.js";import mi from"./ExecutionResults-a7b36047.js";import{_ as vi}from"./_plugin-vue_export-helper-c27b6911.js";import"./NodePropertyModal-c7168bd0.js";import"./SchemaFormRenderer-0384437a.js";import"./nodes-db5c425b.js";const yi={name:"ControlButton",compatConfig:{MODE:3}},wi=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},_i={type:"button",class:"vue-flow__controls-button"};function ki(t,e,n,i,o,s){return C(),R("button",_i,[j(t.$slots,"default")])}const It=wi(yi,[["render",ki]]),xi={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},bi=S("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),$i=[bi];function Ci(t,e){return C(),R("svg",xi,$i)}const Ei={render:Ci},Ni={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Si=S("path",{d:"M0 0h32v4.2H0z"},null,-1),Mi=[Si];function zi(t,e){return C(),R("svg",Ni,Mi)}const Ti={render:zi},Ri={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Ai=S("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),Di=[Ai];function Fi(t,e){return C(),R("svg",Ri,Di)}const Bi={render:Fi},Ii={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Hi=S("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),Pi=[Hi];function Vi(t,e){return C(),R("svg",Ii,Pi)}const Oi={render:Vi},qi={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Li=S("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),Xi=[Li];function Yi(t,e){return C(),R("svg",qi,Xi)}const Ui={render:Yi},Gi={name:"Controls",compatConfig:{MODE:3}},Wi=ae({...Gi,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>si.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const{nodesDraggable:n,nodesConnectable:i,elementsSelectable:o,setInteractive:s,zoomIn:r,zoomOut:a,fitView:l,viewport:u,minZoom:h,maxZoom:f}=ue(),g=_t(()=>n.value||i.value||o.value),v=_t(()=>u.value.zoom<=h.value),M=_t(()=>u.value.zoom>=f.value);function z(){r(),e("zoomIn")}function T(){a(),e("zoomOut")}function b(){l(t.fitViewParams),e("fitView")}function P(){s(!g.value),e("interactionChange",!g.value)}return(E,L)=>(C(),tt($(fn),{class:"vue-flow__controls",position:E.position},{default:O(()=>[j(E.$slots,"top"),E.showZoom?(C(),R(le,{key:0},[j(E.$slots,"control-zoom-in",{},()=>[Y(It,{class:"vue-flow__controls-zoomin",disabled:M.value,onClick:z},{default:O(()=>[j(E.$slots,"icon-zoom-in",{},()=>[(C(),tt(St($(Ei))))])]),_:3},8,["disabled"])]),j(E.$slots,"control-zoom-out",{},()=>[Y(It,{class:"vue-flow__controls-zoomout",disabled:v.value,onClick:T},{default:O(()=>[j(E.$slots,"icon-zoom-out",{},()=>[(C(),tt(St($(Ti))))])]),_:3},8,["disabled"])])],64)):U("",!0),E.showFitView?j(E.$slots,"control-fit-view",{key:1},()=>[Y(It,{class:"vue-flow__controls-fitview",onClick:b},{default:O(()=>[j(E.$slots,"icon-fit-view",{},()=>[(C(),tt(St($(Bi))))])]),_:3})]):U("",!0),E.showInteractive?j(E.$slots,"control-interactive",{key:2},()=>[E.showInteractive?(C(),tt(It,{key:0,class:"vue-flow__controls-interactive",onClick:P},{default:O(()=>[g.value?j(E.$slots,"icon-unlock",{key:0},()=>[(C(),tt(St($(Ui))))]):U("",!0),g.value?U("",!0):j(E.$slots,"icon-lock",{key:1},()=>[(C(),tt(St($(Oi))))])]),_:3})):U("",!0)]):U("",!0),j(E.$slots,"default")]),_:3},8,["position"]))}});var Ki={value:()=>{}};function Re(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Jt(n)}function Jt(t){this._=t}function Zi(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Jt.prototype=Re.prototype={constructor:Jt,on:function(t,e){var n=this._,i=Zi(t+"",n),o,s=-1,r=i.length;if(arguments.length<2){for(;++s<r;)if((o=(t=i[s]).type)&&(o=Ji(n[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<r;)if(o=(t=i[s]).type)n[o]=Xe(n[o],t.name,e);else if(e==null)for(o in n)n[o]=Xe(n[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Jt(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,s;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,o=s.length;i<o;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,s=i.length;o<s;++o)i[o].value.apply(e,n)}};function Ji(t,e){for(var n=0,i=t.length,o;n<i;++n)if((o=t[n]).name===e)return o.value}function Xe(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=Ki,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var be="http://www.w3.org/1999/xhtml";const Ye={svg:"http://www.w3.org/2000/svg",xhtml:be,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ce(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ye.hasOwnProperty(e)?{space:Ye[e],local:t}:t}function Qi(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===be&&e.documentElement.namespaceURI===be?e.createElement(t):e.createElementNS(n,t)}}function ji(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function gn(t){var e=ce(t);return(e.local?ji:Qi)(e)}function to(){}function Ae(t){return t==null?to:function(){return this.querySelector(t)}}function eo(t){typeof t!="function"&&(t=Ae(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s=e[o],r=s.length,a=i[o]=new Array(r),l,u,h=0;h<r;++h)(l=s[h])&&(u=t.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),a[h]=u);return new rt(i,this._parents)}function no(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function io(){return[]}function pn(t){return t==null?io:function(){return this.querySelectorAll(t)}}function oo(t){return function(){return no(t.apply(this,arguments))}}function ro(t){typeof t=="function"?t=oo(t):t=pn(t);for(var e=this._groups,n=e.length,i=[],o=[],s=0;s<n;++s)for(var r=e[s],a=r.length,l,u=0;u<a;++u)(l=r[u])&&(i.push(t.call(l,l.__data__,u,r)),o.push(l));return new rt(i,o)}function mn(t){return function(){return this.matches(t)}}function vn(t){return function(e){return e.matches(t)}}var so=Array.prototype.find;function ao(t){return function(){return so.call(this.children,t)}}function lo(){return this.firstElementChild}function uo(t){return this.select(t==null?lo:ao(typeof t=="function"?t:vn(t)))}var co=Array.prototype.filter;function ho(){return Array.from(this.children)}function fo(t){return function(){return co.call(this.children,t)}}function go(t){return this.selectAll(t==null?ho:fo(typeof t=="function"?t:vn(t)))}function po(t){typeof t!="function"&&(t=mn(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s=e[o],r=s.length,a=i[o]=[],l,u=0;u<r;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&a.push(l);return new rt(i,this._parents)}function yn(t){return new Array(t.length)}function mo(){return new rt(this._enter||this._groups.map(yn),this._parents)}function ee(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ee.prototype={constructor:ee,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function vo(t){return function(){return t}}function yo(t,e,n,i,o,s){for(var r=0,a,l=e.length,u=s.length;r<u;++r)(a=e[r])?(a.__data__=s[r],i[r]=a):n[r]=new ee(t,s[r]);for(;r<l;++r)(a=e[r])&&(o[r]=a)}function wo(t,e,n,i,o,s,r){var a,l,u=new Map,h=e.length,f=s.length,g=new Array(h),v;for(a=0;a<h;++a)(l=e[a])&&(g[a]=v=r.call(l,l.__data__,a,e)+"",u.has(v)?o[a]=l:u.set(v,l));for(a=0;a<f;++a)v=r.call(t,s[a],a,s)+"",(l=u.get(v))?(i[a]=l,l.__data__=s[a],u.delete(v)):n[a]=new ee(t,s[a]);for(a=0;a<h;++a)(l=e[a])&&u.get(g[a])===l&&(o[a]=l)}function _o(t){return t.__data__}function ko(t,e){if(!arguments.length)return Array.from(this,_o);var n=e?wo:yo,i=this._parents,o=this._groups;typeof t!="function"&&(t=vo(t));for(var s=o.length,r=new Array(s),a=new Array(s),l=new Array(s),u=0;u<s;++u){var h=i[u],f=o[u],g=f.length,v=xo(t.call(h,h&&h.__data__,u,i)),M=v.length,z=a[u]=new Array(M),T=r[u]=new Array(M),b=l[u]=new Array(g);n(h,f,z,T,b,v,e);for(var P=0,E=0,L,Z;P<M;++P)if(L=z[P]){for(P>=E&&(E=P+1);!(Z=T[E])&&++E<M;);L._next=Z||null}}return r=new rt(r,i),r._enter=a,r._exit=l,r}function xo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bo(){return new rt(this._exit||this._groups.map(yn),this._parents)}function $o(t,e,n){var i=this.enter(),o=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?s.remove():n(s),i&&o?i.merge(o).order():o}function Co(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,o=n.length,s=i.length,r=Math.min(o,s),a=new Array(o),l=0;l<r;++l)for(var u=n[l],h=i[l],f=u.length,g=a[l]=new Array(f),v,M=0;M<f;++M)(v=u[M]||h[M])&&(g[M]=v);for(;l<o;++l)a[l]=n[l];return new rt(a,this._parents)}function Eo(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],o=i.length-1,s=i[o],r;--o>=0;)(r=i[o])&&(s&&r.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(r,s),s=r);return this}function No(t){t||(t=So);function e(f,g){return f&&g?t(f.__data__,g.__data__):!f-!g}for(var n=this._groups,i=n.length,o=new Array(i),s=0;s<i;++s){for(var r=n[s],a=r.length,l=o[s]=new Array(a),u,h=0;h<a;++h)(u=r[h])&&(l[h]=u);l.sort(e)}return new rt(o,this._parents).order()}function So(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Mo(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function zo(){return Array.from(this)}function To(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,s=i.length;o<s;++o){var r=i[o];if(r)return r}return null}function Ro(){let t=0;for(const e of this)++t;return t}function Ao(){return!this.node()}function Do(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o=e[n],s=0,r=o.length,a;s<r;++s)(a=o[s])&&t.call(a,a.__data__,s,o);return this}function Fo(t){return function(){this.removeAttribute(t)}}function Bo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Io(t,e){return function(){this.setAttribute(t,e)}}function Ho(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Po(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Vo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Oo(t,e){var n=ce(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Bo:Fo:typeof e=="function"?n.local?Vo:Po:n.local?Ho:Io)(n,e))}function wn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function qo(t){return function(){this.style.removeProperty(t)}}function Lo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Xo(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Yo(t,e,n){return arguments.length>1?this.each((e==null?qo:typeof e=="function"?Xo:Lo)(t,e,n??"")):zt(this.node(),t)}function zt(t,e){return t.style.getPropertyValue(e)||wn(t).getComputedStyle(t,null).getPropertyValue(e)}function Uo(t){return function(){delete this[t]}}function Go(t,e){return function(){this[t]=e}}function Wo(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Ko(t,e){return arguments.length>1?this.each((e==null?Uo:typeof e=="function"?Wo:Go)(t,e)):this.node()[t]}function _n(t){return t.trim().split(/^|\s+/)}function De(t){return t.classList||new kn(t)}function kn(t){this._node=t,this._names=_n(t.getAttribute("class")||"")}kn.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function xn(t,e){for(var n=De(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function bn(t,e){for(var n=De(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function Zo(t){return function(){xn(this,t)}}function Jo(t){return function(){bn(this,t)}}function Qo(t,e){return function(){(e.apply(this,arguments)?xn:bn)(this,t)}}function jo(t,e){var n=_n(t+"");if(arguments.length<2){for(var i=De(this.node()),o=-1,s=n.length;++o<s;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof e=="function"?Qo:e?Zo:Jo)(n,e))}function tr(){this.textContent=""}function er(t){return function(){this.textContent=t}}function nr(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function ir(t){return arguments.length?this.each(t==null?tr:(typeof t=="function"?nr:er)(t)):this.node().textContent}function or(){this.innerHTML=""}function rr(t){return function(){this.innerHTML=t}}function sr(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function ar(t){return arguments.length?this.each(t==null?or:(typeof t=="function"?sr:rr)(t)):this.node().innerHTML}function lr(){this.nextSibling&&this.parentNode.appendChild(this)}function ur(){return this.each(lr)}function cr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hr(){return this.each(cr)}function fr(t){var e=typeof t=="function"?t:gn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function dr(){return null}function gr(t,e){var n=typeof t=="function"?t:gn(t),i=e==null?dr:typeof e=="function"?e:Ae(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function pr(){var t=this.parentNode;t&&t.removeChild(this)}function mr(){return this.each(pr)}function vr(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yr(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wr(t){return this.select(t?yr:vr)}function _r(t){return arguments.length?this.property("__data__",t):this.node().__data__}function kr(t){return function(e){t.call(this,e,this.__data__)}}function xr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function br(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,s;n<o;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function $r(t,e,n){return function(){var i=this.__on,o,s=kr(e);if(i){for(var r=0,a=i.length;r<a;++r)if((o=i[r]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=n),o.value=e;return}}this.addEventListener(t.type,s,n),o={type:t.type,name:t.name,value:e,listener:s,options:n},i?i.push(o):this.__on=[o]}}function Cr(t,e,n){var i=xr(t+""),o,s=i.length,r;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,h;l<u;++l)for(o=0,h=a[l];o<s;++o)if((r=i[o]).type===h.type&&r.name===h.name)return h.value}return}for(a=e?$r:br,o=0;o<s;++o)this.each(a(i[o],e,n));return this}function $n(t,e,n){var i=wn(t),o=i.CustomEvent;typeof o=="function"?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Er(t,e){return function(){return $n(this,t,e)}}function Nr(t,e){return function(){return $n(this,t,e.apply(this,arguments))}}function Sr(t,e){return this.each((typeof e=="function"?Nr:Er)(t,e))}function*Mr(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,s=i.length,r;o<s;++o)(r=i[o])&&(yield r)}var Cn=[null];function rt(t,e){this._groups=t,this._parents=e}function Yt(){return new rt([[document.documentElement]],Cn)}function zr(){return this}rt.prototype=Yt.prototype={constructor:rt,select:eo,selectAll:ro,selectChild:uo,selectChildren:go,filter:po,data:ko,enter:mo,exit:bo,join:$o,merge:Co,selection:zr,order:Eo,sort:No,call:Mo,nodes:zo,node:To,size:Ro,empty:Ao,each:Do,attr:Oo,style:Yo,property:Ko,classed:jo,text:ir,html:ar,raise:ur,lower:hr,append:fr,insert:gr,remove:mr,clone:wr,datum:_r,on:Cr,dispatch:Sr,[Symbol.iterator]:Mr};function wt(t){return typeof t=="string"?new rt([[document.querySelector(t)]],[document.documentElement]):new rt([[t]],Cn)}function Tr(t){let e;for(;e=t.sourceEvent;)t=e;return t}function vt(t,e){if(t=Tr(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}const $e={capture:!0,passive:!1};function Ce(t){t.preventDefault(),t.stopImmediatePropagation()}function Rr(t){var e=t.document.documentElement,n=wt(t).on("dragstart.drag",Ce,$e);"onselectstart"in e?n.on("selectstart.drag",Ce,$e):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ar(t,e){var n=t.document.documentElement,i=wt(t).on("dragstart.drag",null);e&&(i.on("click.drag",Ce,$e),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Fe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function En(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Ut(){}var Ot=.7,ne=1/Ot,Mt="\\s*([+-]?\\d+)\\s*",qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dr=/^#([0-9a-f]{3,8})$/,Fr=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),Br=new RegExp(`^rgb\\(${ut},${ut},${ut}\\)$`),Ir=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${qt}\\)$`),Hr=new RegExp(`^rgba\\(${ut},${ut},${ut},${qt}\\)$`),Pr=new RegExp(`^hsl\\(${qt},${ut},${ut}\\)$`),Vr=new RegExp(`^hsla\\(${qt},${ut},${ut},${qt}\\)$`),Ue={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fe(Ut,Lt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ge,formatHex:Ge,formatHex8:Or,formatHsl:qr,formatRgb:We,toString:We});function Ge(){return this.rgb().formatHex()}function Or(){return this.rgb().formatHex8()}function qr(){return Nn(this).formatHsl()}function We(){return this.rgb().formatRgb()}function Lt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Dr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ke(e):n===3?new nt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Gt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Gt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Fr.exec(t))?new nt(e[1],e[2],e[3],1):(e=Br.exec(t))?new nt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Ir.exec(t))?Gt(e[1],e[2],e[3],e[4]):(e=Hr.exec(t))?Gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Pr.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=Vr.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Ue.hasOwnProperty(t)?Ke(Ue[t]):t==="transparent"?new nt(NaN,NaN,NaN,0):null}function Ke(t){return new nt(t>>16&255,t>>8&255,t&255,1)}function Gt(t,e,n,i){return i<=0&&(t=e=n=NaN),new nt(t,e,n,i)}function Lr(t){return t instanceof Ut||(t=Lt(t)),t?(t=t.rgb(),new nt(t.r,t.g,t.b,t.opacity)):new nt}function Ee(t,e,n,i){return arguments.length===1?Lr(t):new nt(t,e,n,i??1)}function nt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Fe(nt,Ee,En(Ut,{brighter(t){return t=t==null?ne:Math.pow(ne,t),new nt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ot:Math.pow(Ot,t),new nt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new nt($t(this.r),$t(this.g),$t(this.b),ie(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ze,formatHex:Ze,formatHex8:Xr,formatRgb:Je,toString:Je}));function Ze(){return`#${bt(this.r)}${bt(this.g)}${bt(this.b)}`}function Xr(){return`#${bt(this.r)}${bt(this.g)}${bt(this.b)}${bt((isNaN(this.opacity)?1:this.opacity)*255)}`}function Je(){const t=ie(this.opacity);return`${t===1?"rgb(":"rgba("}${$t(this.r)}, ${$t(this.g)}, ${$t(this.b)}${t===1?")":`, ${t})`}`}function ie(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function $t(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function bt(t){return t=$t(t),(t<16?"0":"")+t.toString(16)}function Qe(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new at(t,e,n,i)}function Nn(t){if(t instanceof at)return new at(t.h,t.s,t.l,t.opacity);if(t instanceof Ut||(t=Lt(t)),!t)return new at;if(t instanceof at)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),s=Math.max(e,n,i),r=NaN,a=s-o,l=(s+o)/2;return a?(e===s?r=(n-i)/a+(n<i)*6:n===s?r=(i-e)/a+2:r=(e-n)/a+4,a/=l<.5?s+o:2-s-o,r*=60):a=l>0&&l<1?0:r,new at(r,a,l,t.opacity)}function Yr(t,e,n,i){return arguments.length===1?Nn(t):new at(t,e,n,i??1)}function at(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Fe(at,Yr,En(Ut,{brighter(t){return t=t==null?ne:Math.pow(ne,t),new at(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ot:Math.pow(Ot,t),new at(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new nt(_e(t>=240?t-240:t+120,o,i),_e(t,o,i),_e(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new at(je(this.h),Wt(this.s),Wt(this.l),ie(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ie(this.opacity);return`${t===1?"hsl(":"hsla("}${je(this.h)}, ${Wt(this.s)*100}%, ${Wt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function je(t){return t=(t||0)%360,t<0?t+360:t}function Wt(t){return Math.max(0,Math.min(1,t||0))}function _e(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Sn=t=>()=>t;function Ur(t,e){return function(n){return t+n*e}}function Gr(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Wr(t){return(t=+t)==1?Mn:function(e,n){return n-e?Gr(e,n,t):Sn(isNaN(e)?n:e)}}function Mn(t,e){var n=e-t;return n?Ur(t,n):Sn(isNaN(t)?e:t)}const tn=function t(e){var n=Wr(e);function i(o,s){var r=n((o=Ee(o)).r,(s=Ee(s)).r),a=n(o.g,s.g),l=n(o.b,s.b),u=Mn(o.opacity,s.opacity);return function(h){return o.r=r(h),o.g=a(h),o.b=l(h),o.opacity=u(h),o+""}}return i.gamma=t,i}(1);function yt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ne=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ke=new RegExp(Ne.source,"g");function Kr(t){return function(){return t}}function Zr(t){return function(e){return t(e)+""}}function Jr(t,e){var n=Ne.lastIndex=ke.lastIndex=0,i,o,s,r=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Ne.exec(t))&&(o=ke.exec(e));)(s=o.index)>n&&(s=e.slice(n,s),a[r]?a[r]+=s:a[++r]=s),(i=i[0])===(o=o[0])?a[r]?a[r]+=o:a[++r]=o:(a[++r]=null,l.push({i:r,x:yt(i,o)})),n=ke.lastIndex;return n<e.length&&(s=e.slice(n),a[r]?a[r]+=s:a[++r]=s),a.length<2?l[0]?Zr(l[0].x):Kr(e):(e=l.length,function(u){for(var h=0,f;h<e;++h)a[(f=l[h]).i]=f.x(u);return a.join("")})}var en=180/Math.PI,Se={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zn(t,e,n,i,o,s){var r,a,l;return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:o,translateY:s,rotate:Math.atan2(e,t)*en,skewX:Math.atan(l)*en,scaleX:r,scaleY:a}}var Kt;function Qr(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Se:zn(e.a,e.b,e.c,e.d,e.e,e.f)}function jr(t){return t==null||(Kt||(Kt=document.createElementNS("http://www.w3.org/2000/svg","g")),Kt.setAttribute("transform",t),!(t=Kt.transform.baseVal.consolidate()))?Se:(t=t.matrix,zn(t.a,t.b,t.c,t.d,t.e,t.f))}function Tn(t,e,n,i){function o(u){return u.length?u.pop()+" ":""}function s(u,h,f,g,v,M){if(u!==f||h!==g){var z=v.push("translate(",null,e,null,n);M.push({i:z-4,x:yt(u,f)},{i:z-2,x:yt(h,g)})}else(f||g)&&v.push("translate("+f+e+g+n)}function r(u,h,f,g){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),g.push({i:f.push(o(f)+"rotate(",null,i)-2,x:yt(u,h)})):h&&f.push(o(f)+"rotate("+h+i)}function a(u,h,f,g){u!==h?g.push({i:f.push(o(f)+"skewX(",null,i)-2,x:yt(u,h)}):h&&f.push(o(f)+"skewX("+h+i)}function l(u,h,f,g,v,M){if(u!==f||h!==g){var z=v.push(o(v)+"scale(",null,",",null,")");M.push({i:z-4,x:yt(u,f)},{i:z-2,x:yt(h,g)})}else(f!==1||g!==1)&&v.push(o(v)+"scale("+f+","+g+")")}return function(u,h){var f=[],g=[];return u=t(u),h=t(h),s(u.translateX,u.translateY,h.translateX,h.translateY,f,g),r(u.rotate,h.rotate,f,g),a(u.skewX,h.skewX,f,g),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,g),u=h=null,function(v){for(var M=-1,z=g.length,T;++M<z;)f[(T=g[M]).i]=T.x(v);return f.join("")}}}var ts=Tn(Qr,"px, ","px)","deg)"),es=Tn(jr,", ",")",")"),ns=1e-12;function nn(t){return((t=Math.exp(t))+1/t)/2}function is(t){return((t=Math.exp(t))-1/t)/2}function os(t){return((t=Math.exp(2*t))-1)/(t+1)}const rs=function t(e,n,i){function o(s,r){var a=s[0],l=s[1],u=s[2],h=r[0],f=r[1],g=r[2],v=h-a,M=f-l,z=v*v+M*M,T,b;if(z<ns)b=Math.log(g/u)/e,T=function(A){return[a+A*v,l+A*M,u*Math.exp(e*A*b)]};else{var P=Math.sqrt(z),E=(g*g-u*u+i*z)/(2*u*n*P),L=(g*g-u*u-i*z)/(2*g*n*P),Z=Math.log(Math.sqrt(E*E+1)-E),J=Math.log(Math.sqrt(L*L+1)-L);b=(J-Z)/e,T=function(A){var G=A*b,W=nn(Z),F=u/(n*P)*(W*os(e*G+Z)-is(Z));return[a+F*v,l+F*M,u*W/nn(e*G+Z)]}}return T.duration=b*1e3*e/Math.SQRT2,T}return o.rho=function(s){var r=Math.max(.001,+s),a=r*r,l=a*a;return t(r,a,l)},o}(Math.SQRT2,2,4);var Tt=0,Ht=0,Ft=0,Rn=1e3,oe,Pt,re=0,Ct=0,he=0,Xt=typeof performance=="object"&&performance.now?performance:Date,An=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Be(){return Ct||(An(ss),Ct=Xt.now()+he)}function ss(){Ct=0}function se(){this._call=this._time=this._next=null}se.prototype=Dn.prototype={constructor:se,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Be():+n)+(e==null?0:+e),!this._next&&Pt!==this&&(Pt?Pt._next=this:oe=this,Pt=this),this._call=t,this._time=n,Me()},stop:function(){this._call&&(this._call=null,this._time=1/0,Me())}};function Dn(t,e,n){var i=new se;return i.restart(t,e,n),i}function as(){Be(),++Tt;for(var t=oe,e;t;)(e=Ct-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Tt}function on(){Ct=(re=Xt.now())+he,Tt=Ht=0;try{as()}finally{Tt=0,us(),Ct=0}}function ls(){var t=Xt.now(),e=t-re;e>Rn&&(he-=e,re=t)}function us(){for(var t,e=oe,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:oe=n);Pt=t,Me(i)}function Me(t){if(!Tt){Ht&&(Ht=clearTimeout(Ht));var e=t-Ct;e>24?(t<1/0&&(Ht=setTimeout(on,t-Xt.now()-he)),Ft&&(Ft=clearInterval(Ft))):(Ft||(re=Xt.now(),Ft=setInterval(ls,Rn)),Tt=1,An(on))}}function rn(t,e,n){var i=new se;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,n),i}var cs=Re("start","end","cancel","interrupt"),hs=[],Fn=0,sn=1,ze=2,Qt=3,an=4,Te=5,jt=6;function fe(t,e,n,i,o,s){var r=t.__transition;if(!r)t.__transition={};else if(n in r)return;fs(t,n,{name:e,index:i,group:o,on:cs,tween:hs,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Fn})}function Ie(t,e){var n=lt(t,e);if(n.state>Fn)throw new Error("too late; already scheduled");return n}function ct(t,e){var n=lt(t,e);if(n.state>Qt)throw new Error("too late; already running");return n}function lt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function fs(t,e,n){var i=t.__transition,o;i[e]=n,n.timer=Dn(s,0,n.time);function s(u){n.state=sn,n.timer.restart(r,n.delay,n.time),n.delay<=u&&r(u-n.delay)}function r(u){var h,f,g,v;if(n.state!==sn)return l();for(h in i)if(v=i[h],v.name===n.name){if(v.state===Qt)return rn(r);v.state===an?(v.state=jt,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete i[h]):+h<e&&(v.state=jt,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete i[h])}if(rn(function(){n.state===Qt&&(n.state=an,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=ze,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ze){for(n.state=Qt,o=new Array(g=n.tween.length),h=0,f=-1;h<g;++h)(v=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(o[++f]=v);o.length=f+1}}function a(u){for(var h=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Te,1),f=-1,g=o.length;++f<g;)o[f].call(t,h);n.state===Te&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=jt,n.timer.stop(),delete i[e];for(var u in i)return;delete t.__transition}}function te(t,e){var n=t.__transition,i,o,s=!0,r;if(n){e=e==null?null:e+"";for(r in n){if((i=n[r]).name!==e){s=!1;continue}o=i.state>ze&&i.state<Te,i.state=jt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[r]}s&&delete t.__transition}}function ds(t){return this.each(function(){te(this,t)})}function gs(t,e){var n,i;return function(){var o=ct(this,t),s=o.tween;if(s!==n){i=n=s;for(var r=0,a=i.length;r<a;++r)if(i[r].name===e){i=i.slice(),i.splice(r,1);break}}o.tween=i}}function ps(t,e,n){var i,o;if(typeof n!="function")throw new Error;return function(){var s=ct(this,t),r=s.tween;if(r!==i){o=(i=r).slice();for(var a={name:e,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===e){o[l]=a;break}l===u&&o.push(a)}s.tween=o}}function ms(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=lt(this.node(),n).tween,o=0,s=i.length,r;o<s;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((e==null?gs:ps)(n,t,e))}function He(t,e,n){var i=t._id;return t.each(function(){var o=ct(this,i);(o.value||(o.value={}))[e]=n.apply(this,arguments)}),function(o){return lt(o,i).value[e]}}function Bn(t,e){var n;return(typeof e=="number"?yt:e instanceof Lt?tn:(n=Lt(e))?(e=n,tn):Jr)(t,e)}function vs(t){return function(){this.removeAttribute(t)}}function ys(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ws(t,e,n){var i,o=n+"",s;return function(){var r=this.getAttribute(t);return r===o?null:r===i?s:s=e(i=r,n)}}function _s(t,e,n){var i,o=n+"",s;return function(){var r=this.getAttributeNS(t.space,t.local);return r===o?null:r===i?s:s=e(i=r,n)}}function ks(t,e,n){var i,o,s;return function(){var r,a=n(this),l;return a==null?void this.removeAttribute(t):(r=this.getAttribute(t),l=a+"",r===l?null:r===i&&l===o?s:(o=l,s=e(i=r,a)))}}function xs(t,e,n){var i,o,s;return function(){var r,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(r=this.getAttributeNS(t.space,t.local),l=a+"",r===l?null:r===i&&l===o?s:(o=l,s=e(i=r,a)))}}function bs(t,e){var n=ce(t),i=n==="transform"?es:Bn;return this.attrTween(t,typeof e=="function"?(n.local?xs:ks)(n,i,He(this,"attr."+t,e)):e==null?(n.local?ys:vs)(n):(n.local?_s:ws)(n,i,e))}function $s(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Cs(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Es(t,e){var n,i;function o(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Cs(t,s)),n}return o._value=e,o}function Ns(t,e){var n,i;function o(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&$s(t,s)),n}return o._value=e,o}function Ss(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=ce(t);return this.tween(n,(i.local?Es:Ns)(i,e))}function Ms(t,e){return function(){Ie(this,t).delay=+e.apply(this,arguments)}}function zs(t,e){return e=+e,function(){Ie(this,t).delay=e}}function Ts(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ms:zs)(e,t)):lt(this.node(),e).delay}function Rs(t,e){return function(){ct(this,t).duration=+e.apply(this,arguments)}}function As(t,e){return e=+e,function(){ct(this,t).duration=e}}function Ds(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Rs:As)(e,t)):lt(this.node(),e).duration}function Fs(t,e){if(typeof e!="function")throw new Error;return function(){ct(this,t).ease=e}}function Bs(t){var e=this._id;return arguments.length?this.each(Fs(e,t)):lt(this.node(),e).ease}function Is(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ct(this,t).ease=n}}function Hs(t){if(typeof t!="function")throw new Error;return this.each(Is(this._id,t))}function Ps(t){typeof t!="function"&&(t=mn(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var s=e[o],r=s.length,a=i[o]=[],l,u=0;u<r;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&a.push(l);return new pt(i,this._parents,this._name,this._id)}function Vs(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,o=n.length,s=Math.min(i,o),r=new Array(i),a=0;a<s;++a)for(var l=e[a],u=n[a],h=l.length,f=r[a]=new Array(h),g,v=0;v<h;++v)(g=l[v]||u[v])&&(f[v]=g);for(;a<i;++a)r[a]=e[a];return new pt(r,this._parents,this._name,this._id)}function Os(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function qs(t,e,n){var i,o,s=Os(e)?Ie:ct;return function(){var r=s(this,t),a=r.on;a!==i&&(o=(i=a).copy()).on(e,n),r.on=o}}function Ls(t,e){var n=this._id;return arguments.length<2?lt(this.node(),n).on.on(t):this.each(qs(n,t,e))}function Xs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ys(){return this.on("end.remove",Xs(this._id))}function Us(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ae(t));for(var i=this._groups,o=i.length,s=new Array(o),r=0;r<o;++r)for(var a=i[r],l=a.length,u=s[r]=new Array(l),h,f,g=0;g<l;++g)(h=a[g])&&(f=t.call(h,h.__data__,g,a))&&("__data__"in h&&(f.__data__=h.__data__),u[g]=f,fe(u[g],e,n,g,u,lt(h,n)));return new pt(s,this._parents,e,n)}function Gs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=pn(t));for(var i=this._groups,o=i.length,s=[],r=[],a=0;a<o;++a)for(var l=i[a],u=l.length,h,f=0;f<u;++f)if(h=l[f]){for(var g=t.call(h,h.__data__,f,l),v,M=lt(h,n),z=0,T=g.length;z<T;++z)(v=g[z])&&fe(v,e,n,z,g,M);s.push(g),r.push(h)}return new pt(s,r,e,n)}var Ws=Yt.prototype.constructor;function Ks(){return new Ws(this._groups,this._parents)}function Zs(t,e){var n,i,o;return function(){var s=zt(this,t),r=(this.style.removeProperty(t),zt(this,t));return s===r?null:s===n&&r===i?o:o=e(n=s,i=r)}}function In(t){return function(){this.style.removeProperty(t)}}function Js(t,e,n){var i,o=n+"",s;return function(){var r=zt(this,t);return r===o?null:r===i?s:s=e(i=r,n)}}function Qs(t,e,n){var i,o,s;return function(){var r=zt(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),zt(this,t))),r===l?null:r===i&&l===o?s:(o=l,s=e(i=r,a))}}function js(t,e){var n,i,o,s="style."+e,r="end."+s,a;return function(){var l=ct(this,t),u=l.on,h=l.value[s]==null?a||(a=In(e)):void 0;(u!==n||o!==h)&&(i=(n=u).copy()).on(r,o=h),l.on=i}}function ta(t,e,n){var i=(t+="")=="transform"?ts:Bn;return e==null?this.styleTween(t,Zs(t,i)).on("end.style."+t,In(t)):typeof e=="function"?this.styleTween(t,Qs(t,i,He(this,"style."+t,e))).each(js(this._id,t)):this.styleTween(t,Js(t,i,e),n).on("end.style."+t,null)}function ea(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function na(t,e,n){var i,o;function s(){var r=e.apply(this,arguments);return r!==o&&(i=(o=r)&&ea(t,r,n)),i}return s._value=e,s}function ia(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,na(t,e,n??""))}function oa(t){return function(){this.textContent=t}}function ra(t){return function(){var e=t(this);this.textContent=e??""}}function sa(t){return this.tween("text",typeof t=="function"?ra(He(this,"text",t)):oa(t==null?"":t+""))}function aa(t){return function(e){this.textContent=t.call(this,e)}}function la(t){var e,n;function i(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&aa(o)),e}return i._value=t,i}function ua(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,la(t))}function ca(){for(var t=this._name,e=this._id,n=Hn(),i=this._groups,o=i.length,s=0;s<o;++s)for(var r=i[s],a=r.length,l,u=0;u<a;++u)if(l=r[u]){var h=lt(l,e);fe(l,t,n,u,r,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new pt(i,this._parents,t,n)}function ha(){var t,e,n=this,i=n._id,o=n.size();return new Promise(function(s,r){var a={value:r},l={value:function(){--o===0&&s()}};n.each(function(){var u=ct(this,i),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),u.on=e}),o===0&&s()})}var fa=0;function pt(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Hn(){return++fa}var ft=Yt.prototype;pt.prototype={constructor:pt,select:Us,selectAll:Gs,selectChild:ft.selectChild,selectChildren:ft.selectChildren,filter:Ps,merge:Vs,selection:Ks,transition:ca,call:ft.call,nodes:ft.nodes,node:ft.node,size:ft.size,empty:ft.empty,each:ft.each,on:Ls,attr:bs,attrTween:Ss,style:ta,styleTween:ia,text:sa,textTween:ua,remove:Ys,tween:ms,delay:Ts,duration:Ds,ease:Bs,easeVarying:Hs,end:ha,[Symbol.iterator]:ft[Symbol.iterator]};function da(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ga={time:null,delay:0,duration:250,ease:da};function pa(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function ma(t){var e,n;t instanceof pt?(e=t._id,t=t._name):(e=Hn(),(n=ga).time=Be(),t=t==null?null:t+"");for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var r=i[s],a=r.length,l,u=0;u<a;++u)(l=r[u])&&fe(l,t,e,u,r,n||pa(l,e));return new pt(i,this._parents,t,e)}Yt.prototype.interrupt=ds;Yt.prototype.transition=ma;const Zt=t=>()=>t;function va(t,{sourceEvent:e,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function dt(t,e,n){this.k=t,this.x=e,this.y=n}dt.prototype={constructor:dt,scale:function(t){return t===1?this:new dt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new dt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Pe=new dt(1,0,0);dt.prototype;function xe(t){t.stopImmediatePropagation()}function Bt(t){t.preventDefault(),t.stopImmediatePropagation()}function ya(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function wa(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function ln(){return this.__zoom||Pe}function _a(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ka(){return navigator.maxTouchPoints||"ontouchstart"in this}function xa(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function ba(){var t=ya,e=wa,n=xa,i=_a,o=ka,s=[0,1/0],r=[[-1/0,-1/0],[1/0,1/0]],a=250,l=rs,u=Re("start","zoom","end"),h,f,g,v=500,M=150,z=0,T=10;function b(c){c.property("__zoom",ln).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",W).on("dblclick.zoom",F).filter(o).on("touchstart.zoom",Rt).on("touchmove.zoom",Et).on("touchend.zoom touchcancel.zoom",kt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(c,k,d,x){var p=c.selection?c.selection():c;p.property("__zoom",ln),c!==p?Z(c,k,d,x):p.interrupt().each(function(){J(this,arguments).event(x).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},b.scaleBy=function(c,k,d,x){b.scaleTo(c,function(){var p=this.__zoom.k,_=typeof k=="function"?k.apply(this,arguments):k;return p*_},d,x)},b.scaleTo=function(c,k,d,x){b.transform(c,function(){var p=e.apply(this,arguments),_=this.__zoom,m=d==null?L(p):typeof d=="function"?d.apply(this,arguments):d,N=_.invert(m),B=typeof k=="function"?k.apply(this,arguments):k;return n(E(P(_,B),m,N),p,r)},d,x)},b.translateBy=function(c,k,d,x){b.transform(c,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof d=="function"?d.apply(this,arguments):d),e.apply(this,arguments),r)},null,x)},b.translateTo=function(c,k,d,x,p){b.transform(c,function(){var _=e.apply(this,arguments),m=this.__zoom,N=x==null?L(_):typeof x=="function"?x.apply(this,arguments):x;return n(Pe.translate(N[0],N[1]).scale(m.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof d=="function"?-d.apply(this,arguments):-d),_,r)},x,p)};function P(c,k){return k=Math.max(s[0],Math.min(s[1],k)),k===c.k?c:new dt(k,c.x,c.y)}function E(c,k,d){var x=k[0]-d[0]*c.k,p=k[1]-d[1]*c.k;return x===c.x&&p===c.y?c:new dt(c.k,x,p)}function L(c){return[(+c[0][0]+ +c[1][0])/2,(+c[0][1]+ +c[1][1])/2]}function Z(c,k,d,x){c.on("start.zoom",function(){J(this,arguments).event(x).start()}).on("interrupt.zoom end.zoom",function(){J(this,arguments).event(x).end()}).tween("zoom",function(){var p=this,_=arguments,m=J(p,_).event(x),N=e.apply(p,_),B=d==null?L(N):typeof d=="function"?d.apply(p,_):d,I=Math.max(N[1][0]-N[0][0],N[1][1]-N[0][1]),H=p.__zoom,X=typeof k=="function"?k.apply(p,_):k,K=l(H.invert(B).concat(I/H.k),X.invert(B).concat(I/X.k));return function(Q){if(Q===1)Q=X;else{var it=K(Q),At=I/it[2];Q=new dt(At,B[0]-it[0]*At,B[1]-it[1]*At)}m.zoom(null,Q)}})}function J(c,k,d){return!d&&c.__zooming||new A(c,k)}function A(c,k){this.that=c,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(c,k),this.taps=0}A.prototype={event:function(c){return c&&(this.sourceEvent=c),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(c,k){return this.mouse&&c!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&c!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&c!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(c){var k=wt(this.that).datum();u.call(c,this.that,new va(c,{sourceEvent:this.sourceEvent,target:b,type:c,transform:this.that.__zoom,dispatch:u}),k)}};function G(c,...k){if(!t.apply(this,arguments))return;var d=J(this,k).event(c),x=this.__zoom,p=Math.max(s[0],Math.min(s[1],x.k*Math.pow(2,i.apply(this,arguments)))),_=vt(c);if(d.wheel)(d.mouse[0][0]!==_[0]||d.mouse[0][1]!==_[1])&&(d.mouse[1]=x.invert(d.mouse[0]=_)),clearTimeout(d.wheel);else{if(x.k===p)return;d.mouse=[_,x.invert(_)],te(this),d.start()}Bt(c),d.wheel=setTimeout(m,M),d.zoom("mouse",n(E(P(x,p),d.mouse[0],d.mouse[1]),d.extent,r));function m(){d.wheel=null,d.end()}}function W(c,...k){if(g||!t.apply(this,arguments))return;var d=c.currentTarget,x=J(this,k,!0).event(c),p=wt(c.view).on("mousemove.zoom",B,!0).on("mouseup.zoom",I,!0),_=vt(c,d),m=c.clientX,N=c.clientY;Rr(c.view),xe(c),x.mouse=[_,this.__zoom.invert(_)],te(this),x.start();function B(H){if(Bt(H),!x.moved){var X=H.clientX-m,K=H.clientY-N;x.moved=X*X+K*K>z}x.event(H).zoom("mouse",n(E(x.that.__zoom,x.mouse[0]=vt(H,d),x.mouse[1]),x.extent,r))}function I(H){p.on("mousemove.zoom mouseup.zoom",null),Ar(H.view,x.moved),Bt(H),x.event(H).end()}}function F(c,...k){if(t.apply(this,arguments)){var d=this.__zoom,x=vt(c.changedTouches?c.changedTouches[0]:c,this),p=d.invert(x),_=d.k*(c.shiftKey?.5:2),m=n(E(P(d,_),x,p),e.apply(this,k),r);Bt(c),a>0?wt(this).transition().duration(a).call(Z,m,x,c):wt(this).call(b.transform,m,x,c)}}function Rt(c,...k){if(t.apply(this,arguments)){var d=c.touches,x=d.length,p=J(this,k,c.changedTouches.length===x).event(c),_,m,N,B;for(xe(c),m=0;m<x;++m)N=d[m],B=vt(N,this),B=[B,this.__zoom.invert(B),N.identifier],p.touch0?!p.touch1&&p.touch0[2]!==B[2]&&(p.touch1=B,p.taps=0):(p.touch0=B,_=!0,p.taps=1+!!h);h&&(h=clearTimeout(h)),_&&(p.taps<2&&(f=B[0],h=setTimeout(function(){h=null},v)),te(this),p.start())}}function Et(c,...k){if(this.__zooming){var d=J(this,k).event(c),x=c.changedTouches,p=x.length,_,m,N,B;for(Bt(c),_=0;_<p;++_)m=x[_],N=vt(m,this),d.touch0&&d.touch0[2]===m.identifier?d.touch0[0]=N:d.touch1&&d.touch1[2]===m.identifier&&(d.touch1[0]=N);if(m=d.that.__zoom,d.touch1){var I=d.touch0[0],H=d.touch0[1],X=d.touch1[0],K=d.touch1[1],Q=(Q=X[0]-I[0])*Q+(Q=X[1]-I[1])*Q,it=(it=K[0]-H[0])*it+(it=K[1]-H[1])*it;m=P(m,Math.sqrt(Q/it)),N=[(I[0]+X[0])/2,(I[1]+X[1])/2],B=[(H[0]+K[0])/2,(H[1]+K[1])/2]}else if(d.touch0)N=d.touch0[0],B=d.touch0[1];else return;d.zoom("touch",n(E(m,N,B),d.extent,r))}}function kt(c,...k){if(this.__zooming){var d=J(this,k).event(c),x=c.changedTouches,p=x.length,_,m;for(xe(c),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),_=0;_<p;++_)m=x[_],d.touch0&&d.touch0[2]===m.identifier?delete d.touch0:d.touch1&&d.touch1[2]===m.identifier&&delete d.touch1;if(d.touch1&&!d.touch0&&(d.touch0=d.touch1,delete d.touch1),d.touch0)d.touch0[1]=this.__zoom.invert(d.touch0[0]);else if(d.end(),d.taps===2&&(m=vt(m,this),Math.hypot(f[0]-m[0],f[1]-m[1])<T)){var N=wt(this).on("dblclick.zoom");N&&N.apply(this,arguments)}}}return b.wheelDelta=function(c){return arguments.length?(i=typeof c=="function"?c:Zt(+c),b):i},b.filter=function(c){return arguments.length?(t=typeof c=="function"?c:Zt(!!c),b):t},b.touchable=function(c){return arguments.length?(o=typeof c=="function"?c:Zt(!!c),b):o},b.extent=function(c){return arguments.length?(e=typeof c=="function"?c:Zt([[+c[0][0],+c[0][1]],[+c[1][0],+c[1][1]]]),b):e},b.scaleExtent=function(c){return arguments.length?(s[0]=+c[0],s[1]=+c[1],b):[s[0],s[1]]},b.translateExtent=function(c){return arguments.length?(r[0][0]=+c[0][0],r[1][0]=+c[1][0],r[0][1]=+c[0][1],r[1][1]=+c[1][1],b):[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},b.constrain=function(c){return arguments.length?(n=c,b):n},b.duration=function(c){return arguments.length?(a=+c,b):a},b.interpolate=function(c){return arguments.length?(l=c,b):l},b.on=function(){var c=u.on.apply(u,arguments);return c===u?b:c},b.clickDistance=function(c){return arguments.length?(z=(c=+c)*c,b):Math.sqrt(z)},b.tapDistance=function(c){return arguments.length?(T=+c,b):T},b}const Pn=Symbol("MiniMapSlots"),$a=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Ca={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},Ea=ae({...Ca,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(t,{emit:e}){const n=t,i=ti(Pn),o=un(),s=_t(()=>o.style??{});function r(f){e("click",f)}function a(f){e("dblclick",f)}function l(f){e("mouseenter",f)}function u(f){e("mousemove",f)}function h(f){e("mouseleave",f)}return(f,g)=>!f.hidden&&f.dimensions.width!==0&&f.dimensions.height!==0?(C(),R(le,{key:0},[$(i)[`node-${n.type}`]?(C(),tt(St($(i)[`node-${n.type}`]),ei(Ve({key:0},{...n,...f.$attrs})),null,16)):(C(),R("rect",Ve({key:1,id:f.id},f.$attrs,{class:["vue-flow__minimap-node",{selected:f.selected,dragging:f.dragging}],x:f.position.x,y:f.position.y,rx:f.borderRadius,ry:f.borderRadius,width:f.dimensions.width,height:f.dimensions.height,fill:f.color||s.value.background||s.value.backgroundColor,stroke:f.strokeColor,"stroke-width":f.strokeWidth,"shape-rendering":f.shapeRendering,onClick:r,onDblclick:a,onMouseenter:l,onMousemove:u,onMouseleave:h}),null,16,$a))],64)):U("",!0)}}),Na=["width","height","viewBox","aria-labelledby"],Sa=["id"],Ma=["d","fill","stroke","stroke-width"],za={name:"MiniMap",compatConfig:{MODE:3}},Ta=ae({...za,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=Zn(),i=un(),o=200,s=150,{id:r,edges:a,viewport:l,translateExtent:u,dimensions:h,emits:f,d3Selection:g,d3Zoom:v,getNodesInitialized:M}=ue(),z=V();Jn(Pn,n);const T=_t(()=>{var p;return t.width??((p=i.style)==null?void 0:p.width)??o}),b=_t(()=>{var p;return t.height??((p=i.style)==null?void 0:p.height)??s}),P=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",E=et(()=>typeof t.nodeColor=="string"?()=>t.nodeColor:t.nodeColor),L=et(()=>typeof t.nodeStrokeColor=="string"?()=>t.nodeStrokeColor:t.nodeStrokeColor),Z=et(()=>typeof t.nodeClassName=="string"?()=>t.nodeClassName:typeof t.nodeClassName=="function"?t.nodeClassName:()=>""),J=et(()=>ai(M.value.filter(p=>!p.hidden))),A=et(()=>({x:-l.value.x/l.value.zoom,y:-l.value.y/l.value.zoom,width:h.value.width/l.value.zoom,height:h.value.height/l.value.zoom})),G=et(()=>M.value&&M.value.length?li(J.value,A.value):A.value),W=et(()=>{const p=G.value.width/T.value,_=G.value.height/b.value;return Math.max(p,_)}),F=et(()=>{const p=W.value*T.value,_=W.value*b.value,m=t.offsetScale*W.value;return{offset:m,x:G.value.x-(p-G.value.width)/2-m,y:G.value.y-(_-G.value.height)/2-m,width:p+m*2,height:_+m*2}}),Rt=et(()=>!F.value.x||!F.value.y?"":`
M${F.value.x-F.value.offset},${F.value.y-F.value.offset}
h${F.value.width+F.value.offset*2}
v${F.value.height+F.value.offset*2}
h${-F.value.width-F.value.offset*2}z
M${A.value.x+t.maskBorderRadius},${A.value.y}
h${A.value.width-2*t.maskBorderRadius}
a${t.maskBorderRadius},${t.maskBorderRadius} 0 0 1 ${t.maskBorderRadius},${t.maskBorderRadius}
v${A.value.height-2*t.maskBorderRadius}
a${t.maskBorderRadius},${t.maskBorderRadius} 0 0 1 -${t.maskBorderRadius},${t.maskBorderRadius}
h${-(A.value.width-2*t.maskBorderRadius)}
a${t.maskBorderRadius},${t.maskBorderRadius} 0 0 1 -${t.maskBorderRadius},-${t.maskBorderRadius}
v${-(A.value.height-2*t.maskBorderRadius)}
a${t.maskBorderRadius},${t.maskBorderRadius} 0 0 1 ${t.maskBorderRadius},-${t.maskBorderRadius}z`);Qn(p=>{if(z.value){const _=wt(z.value),m=I=>{if(I.sourceEvent.type!=="wheel"||!g.value||!v.value)return;const H=I.sourceEvent.ctrlKey&&ci()?10:1,X=-I.sourceEvent.deltaY*(I.sourceEvent.deltaMode===1?.05:I.sourceEvent.deltaMode?1:.002)*t.zoomStep,K=l.value.zoom*2**(X*H);v.value.scaleTo(g.value,K)},N=I=>{if(I.sourceEvent.type!=="mousemove"||!g.value||!v.value)return;const H=W.value*Math.max(1,l.value.zoom)*(t.inversePan?-1:1),X={x:l.value.x-I.sourceEvent.movementX*H,y:l.value.y-I.sourceEvent.movementY*H},K=[[0,0],[h.value.width,h.value.height]],Q=Pe.translate(X.x,X.y).scale(l.value.zoom),it=v.value.constrain()(Q,K,u.value);v.value.transform(g.value,it)},B=ba().wheelDelta(I=>ui(I)*(t.zoomStep/10)).on("zoom",t.pannable?N:()=>{}).on("zoom.wheel",t.zoomable?m:()=>{});_.call(B),p(()=>{_.on("zoom",null)})}},{flush:"post"});function Et(p){const[_,m]=vt(p);e("click",{event:p,position:{x:_,y:m}})}function kt(p,_){const m={event:p,node:_,connectedEdges:Dt([_],a.value)};f.miniMapNodeClick(m),e("nodeClick",m)}function c(p,_){const m={event:p,node:_,connectedEdges:Dt([_],a.value)};f.miniMapNodeDoubleClick(m),e("nodeDblclick",m)}function k(p,_){const m={event:p,node:_,connectedEdges:Dt([_],a.value)};f.miniMapNodeMouseEnter(m),e("nodeMouseenter",m)}function d(p,_){const m={event:p,node:_,connectedEdges:Dt([_],a.value)};f.miniMapNodeMouseMove(m),e("nodeMousemove",m)}function x(p,_){const m={event:p,node:_,connectedEdges:Dt([_],a.value)};f.miniMapNodeMouseLeave(m),e("nodeMouseleave",m)}return(p,_)=>(C(),tt($(fn),{position:p.position,class:Vt(["vue-flow__minimap",{pannable:p.pannable,zoomable:p.zoomable}])},{default:O(()=>[(C(),R("svg",{ref_key:"el",ref:z,width:T.value,height:b.value,viewBox:[F.value.x,F.value.y,F.value.width,F.value.height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${$(r)}`,onClick:Et},[p.ariaLabel?(C(),R("title",{key:0,id:`vue-flow__minimap-${$(r)}`},q(p.ariaLabel),9,Sa)):U("",!0),(C(!0),R(le,null,jn($(M),m=>(C(),tt(Ea,{id:m.id,key:m.id,f:"",position:m.computedPosition,dimensions:m.dimensions,selected:m.selected,dragging:m.dragging,style:cn(m.style),class:Vt(Z.value(m)),color:E.value(m),"border-radius":p.nodeBorderRadius,"stroke-color":L.value(m),"stroke-width":p.nodeStrokeWidth,"shape-rendering":$(P),type:m.type,hidden:m.hidden,onClick:N=>kt(N,m),onDblclick:N=>c(N,m),onMouseenter:N=>k(N,m),onMousemove:N=>d(N,m),onMouseleave:N=>x(N,m)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","hidden","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),S("path",{class:"vue-flow__minimap-mask",d:Rt.value,fill:p.maskColor,stroke:p.maskStrokeColor,"stroke-width":p.maskStrokeWidth,"fill-rule":"evenodd"},null,8,Ma)],8,Na))]),_:1},8,["position","class"]))}});var gt=(t=>(t.Lines="lines",t.Dots="dots",t))(gt||{});const Vn=function({dimensions:t,size:e,color:n}){return hn("path",{stroke:n,"stroke-width":e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})},On=function({radius:t,color:e}){return hn("circle",{cx:t,cy:t,r:t,fill:e})};gt.Lines+"",gt.Dots+"";const Ra={[gt.Dots]:"#81818a",[gt.Lines]:"#eee"},Aa=["id","x","y","width","height","patternTransform"],Da={key:2,height:"100",width:"100"},Fa=["fill"],Ba=["x","y","fill"],Ia={name:"Background",compatConfig:{MODE:3}},Ha=ae({...Ia,props:{id:{},variant:{default:()=>gt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(t){const{id:e,viewport:n}=ue(),i=et(()=>{const r=n.value.zoom,[a,l]=Array.isArray(t.gap)?t.gap:[t.gap,t.gap],u=[a*r||1,l*r||1],h=t.size*r,[f,g]=Array.isArray(t.offset)?t.offset:[t.offset,t.offset],v=[f*r||1+u[0]/2,g*r||1+u[1]/2];return{scaledGap:u,offset:v,size:h}}),o=_t(()=>`pattern-${e}${t.id?`-${t.id}`:""}`),s=_t(()=>t.color||t.patternColor||Ra[t.variant||gt.Dots]);return(r,a)=>(C(),R("svg",{class:"vue-flow__background vue-flow__container",style:cn({height:`${r.height>100?100:r.height}%`,width:`${r.width>100?100:r.width}%`})},[j(r.$slots,"pattern-container",{id:o.value},()=>[S("pattern",{id:o.value,x:$(n).x%i.value.scaledGap[0],y:$(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[j(r.$slots,"pattern",{},()=>[r.variant===$(gt).Lines?(C(),tt($(Vn),{key:0,size:r.lineWidth,color:s.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):r.variant===$(gt).Dots?(C(),tt($(On),{key:1,color:s.value,radius:i.value.size/2},null,8,["color","radius"])):U("",!0),r.bgColor?(C(),R("svg",Da,[S("rect",{width:"100%",height:"100%",fill:r.bgColor},null,8,Fa)])):U("",!0)])],8,Aa)]),S("rect",{x:r.x,y:r.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Ba),j(r.$slots,"default",{id:o.value})],4))}});class Pa{constructor(){this.executionContext={},this.executionHistory=[],this.isExecuting=!1,this.executionPaths=new Map,this.conditionNodes=new Map}async executeFlow(e,n,i={}){if(this.isExecuting)throw new Error("流程正在执行中,请等待完成");this.isExecuting=!0,this.executionContext={...i},this.executionHistory=[];try{const o=JSON.parse(JSON.stringify(e)),s=JSON.parse(JSON.stringify(n));return this.buildExecutionGraph(o,s),{success:!0,result:await this.executeGraph(),history:this.executionHistory,context:this.executionContext}}catch(o){return{success:!1,error:o.message,history:this.executionHistory,context:this.executionContext}}finally{this.isExecuting=!1}}buildExecutionGraph(e,n){this.nodes=new Map(e.map(i=>[i.id,i])),this.edges=n,this.conditionNodes.clear(),this.executionPaths.clear();for(const i of n){const o=this.nodes.get(i.source);if(this.nodes.get(i.target),(o==null?void 0:o.type)==="condition_check"){this.conditionNodes.has(i.source)||this.conditionNodes.set(i.source,{truePath:new Set,falsePath:new Set,mainPath:new Set});const s=this.conditionNodes.get(i.source);i.sourceHandle==="true_output"?s.truePath.add(i.target):i.sourceHandle==="false_output"?s.falsePath.add(i.target):i.sourceHandle==="output"&&s.mainPath.add(i.target)}}this.executionOrder=this.topologicalSort()}topologicalSort(){const e=new Map,n=new Map;for(const s of this.nodes.keys())e.set(s,[]),n.set(s,0);for(const s of this.edges){const r=s.source,a=s.target;e.has(a)&&(e.get(a).push(r),n.set(a,n.get(a)+1))}const i=[],o=[];for(const[s,r]of n)r===0&&i.push(s);for(;i.length>0;){const s=i.shift();o.push(s);for(const[r,a]of e)if(a.includes(s)){const l=n.get(r)-1;n.set(r,l),l===0&&i.push(r)}}if(o.length!==this.nodes.size)throw new Error("流程中存在循环依赖");return o}async executeGraph(){const e={node_results:{},flow_id:this.executionContext.agent_name},n={},i=new Set;for(const o of this.executionOrder){const s=this.nodes.get(o);if(!this.shouldExecuteNode(s,e,i))continue;const r=await this.executeNode(s,e);n[o]=r,e.node_results[o]=r,i.add(o),this.recordExecutionHistory(s,r)}return n}shouldExecuteNode(e,n,i){if(i.has(e.id))return!1;for(const[o,s]of this.conditionNodes)if(s.truePath.has(e.id)||s.falsePath.has(e.id)||s.mainPath.has(e.id)){const r=n.node_results[o];if(s.mainPath.has(e.id))return!0;if((r==null?void 0:r.condition_met)!==void 0&&!(s.truePath.has(e.id)?r.condition_met:!r.condition_met))return!1}return!0}async executeNode(e,n){e.status="executing",this.updateNodeStatus(e.id,"executing");try{const i=this.buildNodeInputs(e,n),o=this.buildNodeConfig(e);n.current_node_id=e.id,n.flow_data={nodes:Array.from(this.nodes.values()),edges:this.edges};const r=await(await fetch(`/jingrow/nodes/${e.type}/execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:n,inputs:i,config:o})})).json();if(!r.success)throw new Error(r.error||"节点执行失败");return e.status="success",e.result=r,this.updateNodeStatus(e.id,"success"),r}catch(i){throw e.status="failed",e.error=i.message,this.updateNodeStatus(e.id,"failed",i.message),i}}buildNodeInputs(e,n){var o,s;const i={};if((o=e.data)!=null&&o.inputs)for(const[r,a]of Object.entries(e.data.inputs))i[r]=(s=n.node_results[a.from])==null?void 0:s[a.field];return i}buildNodeConfig(e){const{inputs:n,config:i={},...o}=e.data||{};return{...i,...o}}recordExecutionHistory(e,n){var o;let i=(o=e.data)==null?void 0:o.label;if(!i){const s=dn(e.type);i=s?s.label:e.type}this.executionHistory.push({nodeId:e.id,nodeType:e.type,nodeLabel:i,status:"success",result:n,timestamp:new Date().toISOString()})}buildNodeContext(e,n,i){const o={...this.executionContext};return(n.dependencies[e]||[]).forEach(r=>{const a=i[r];if(a&&a.success){const l=n.nodes[r];o[l.type]=a.data}}),o}updateNodeStatus(e,n,i=null){const o=new CustomEvent("nodeStatusUpdate",{detail:{nodeId:e,status:n,error:i}});window.dispatchEvent(o)}getExecutionHistory(){return this.executionHistory}getExecutionContext(){return this.executionContext}reset(){this.executionContext={},this.executionHistory=[],this.isExecuting=!1}}const Va=new Pa;const Oa={class:"toolbar"},qa={class:"toolbar-left"},La={class:"node-count"},Xa={class:"toolbar-right"},Ya={class:"main-content"},Ua={key:0,class:"execution-results-container"},Ga={class:"flow-container"},Wa={key:0,class:"status-indicator-fixed"},Ka={key:0,class:"unsaved-indicator"},Za={key:1,class:"saved-indicator"},Ja={key:0,class:"fa fa-exclamation-circle",style:{"margin-right":"6px"}},Qa={key:1,class:"fa fa-exclamation-triangle",style:{"margin-right":"6px"}},ja={key:2,class:"fa fa-check-circle",style:{"margin-right":"6px"}},tl={key:2,class:"loading-container"},el={key:0,class:"template-data-modal"},nl={class:"template-data-content"},il={class:"template-data-header"},ol={style:{display:"flex","align-items":"center",gap:"8px"}},rl=["title"],sl={style:{"max-height":"60vh",overflow:"auto",background:"#f3f4f6",color:"#222","font-size":"12px"}},al={key:0,class:"copy-tip"},ll={key:1,class:"sidebar"},ul={class:"sidebar-content"},cl={__name:"AIAgentFlowBuilder",props:{initialValue:{type:Object,default:()=>({})},agentId:{type:String,default:""}},setup(t,{expose:e}){const n=t,i=fi(),o=ni(),s=V(null),r=V(null),a=V(null),l=V(!0);V(null);const u=V(!1),h=()=>{u.value=!0},f=()=>{u.value=!1},g=V(!1),v=V(null),M=async()=>{if(g.value){g.value=!1,await we();try{v.value?W==null||W(v.value):i.nodes.length>0&&G({padding:.7})}catch{}}else{try{const y=F==null?void 0:F();y&&y.viewport&&(v.value={...y.viewport})}catch{}g.value=!0}},z=async()=>{g.value=!1,await we();try{v.value?W==null||W(v.value):i.nodes.length>0&&G({padding:.7})}catch{}},T=V(!1),b=V(null),P=V([]),E=V(!1),L=V(null),Z=et(()=>E.value&&L.value?L.value:"body"),J=()=>{const y=L.value;y&&(E.value?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():y.requestFullscreen?y.requestFullscreen():y.webkitRequestFullscreen?y.webkitRequestFullscreen():y.mozRequestFullScreen?y.mozRequestFullScreen():y.msRequestFullscreen&&y.msRequestFullscreen())},A=()=>{E.value=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},{fitView:G,setViewport:W,toObject:F}=ue(),Rt=()=>{i.nodes.length>0&&G({padding:.7})},Et=V({}),kt=V(!1);Oe(async()=>{try{await di();const y=gi();Et.value=ii(y),kt.value=!0,await we(),Un(),i.saveToHistory()}catch(y){console.error("节点元数据加载失败:",y),kt.value=!0}});const c=y=>{const w=dn(y);return w?w.color:"#6b7280"},k=et(()=>i.nodes),d=et(()=>i.edges),x=et(()=>r.value||a.value),p=y=>{r.value=y.node,a.value=null};function _(y){}const m=y=>{a.value=y.edge,r.value=null},N=()=>{r.value=null,a.value=null},B=y=>{if(!y.source||!y.target)return;const w=y.sourceHandle||"output",ht=y.targetHandle||"input";if(w==="output"&&ht==="output"){ve(D("Output cannot connect to output"),"error");return}if(i.hasConnection(y.source,y.target,w,ht)){ve(D("Connection already exists, please do not repeat"),"error");return}if(y.source===y.target){ve(D("A node cannot connect to itself"),"error");return}const Nt={id:`edge-${Date.now()}`,source:y.source,target:y.target,sourceHandle:w,targetHandle:ht,type:"smoothstep",animated:!0,style:{stroke:"#6366f1",strokeWidth:2.5,filter:"drop-shadow(0 2px 8px #6366f133)"},markerEnd:{type:"arrowclosed",color:"#6366f1"}};i.addEdge(Nt),i.markDirty()},I=y=>{},H=y=>{},X=y=>{i.updateNodePosition(y.node.id,y.node.position),i.markDirty()},K=()=>{r.value&&(i.removeNode(r.value.id),r.value=null),a.value&&(i.removeEdge(a.value.id),a.value=null),i.markDirty()},Q=y=>{y.preventDefault(),y.dataTransfer.dropEffect="move"},it=y=>{y.preventDefault();const w=y.dataTransfer.getData("application/vueflow");if(!w)return;const ht=document.querySelector(".vue-flow-container");let Nt={x:100,y:100};if(ht&&s.value&&typeof s.value.project=="function"){const xt=ht.getBoundingClientRect(),ye=y.clientX-xt.left,Kn=y.clientY-xt.top;Nt=s.value.project({x:ye,y:Kn}),Nt.x+=Math.random()*20-10,Nt.y+=Math.random()*20-10}const Wn={id:`${w}-${Date.now()}`,type:w,position:Nt,data:{...At()}};i.addNode(Wn),i.markDirty();try{let xt=JSON.parse(localStorage.getItem("ai-agent-node-recent")||"[]");xt=[w,...xt.filter(ye=>ye!==w)].slice(0,12),localStorage.setItem("ai-agent-node-recent",JSON.stringify(xt)),window.dispatchEvent(new Event("recent-node-updated"))}catch{}},At=y=>({inputs:{},config:{}});Oe(()=>{window.nodePropertyTeleportTarget={get value(){return Z.value}};const y=w=>{(w.target.tagName==="INPUT"||w.target.tagName==="TEXTAREA"||w.target.isContentEditable||w.target.closest(".form-control")||w.target.closest("input")||w.target.closest("textarea"))&&(w.key==="Delete"||w.key==="Backspace")||(w.ctrlKey&&w.key==="z"&&!w.shiftKey?(w.preventDefault(),i.undo()):w.ctrlKey&&w.key==="y"||w.ctrlKey&&w.shiftKey&&w.key==="Z"?(w.preventDefault(),i.redo()):(w.key==="Delete"||w.key==="Backspace")&&K())};document.addEventListener("keydown",y),document.addEventListener("fullscreenchange",A),document.addEventListener("webkitfullscreenchange",A),document.addEventListener("mozfullscreenchange",A),document.addEventListener("MSFullscreenChange",A),oi(()=>{document.removeEventListener("keydown",y),document.removeEventListener("fullscreenchange",A),document.removeEventListener("webkitfullscreenchange",A),document.removeEventListener("mozfullscreenchange",A),document.removeEventListener("MSFullscreenChange",A)}),i.loadFromStorage(),window.vueFlowInstance=s.value}),qe(()=>[i.nodes,i.edges],()=>{i.saveToStorage()},{deep:!0});const qn=async()=>{if(T.value){o.warning(D("Flow is executing, please wait"));return}try{T.value=!0,b.value=null,P.value=[];const y=n.agentId.trim(),w=await Va.executeFlow(i.nodes,i.edges,{agent_name:y});b.value=w,P.value=w.history||[],w.success}catch(y){o.error(D("Execution error")+`: ${y.message}`)}finally{T.value=!1,b.value&&(g.value=!0)}},Ln=()=>{i.saveToHistory(),i.resetFlow(),r.value=null,a.value=null},Xn=()=>{l.value=!l.value},Yn=()=>i.getFlowData(),Un=()=>{if(n.initialValue!==void 0){i.loadFlowData(n.initialValue);return}i.loadFromStorage()};e({getFlowData:Yn});const de=V(!1),ge=V("");let pe=null;qe(()=>i.hasUnsavedChanges,(y,w)=>{w!==void 0&&(de.value=!0,ge.value=y?D("Unsaved"):D("Saved"),pe&&clearTimeout(pe),pe=setTimeout(()=>{de.value=!1},3e3))});const me=V(!1),Gn=async()=>{try{const y=JSON.stringify({nodes:k.value,edges:d.value},null,2);await navigator.clipboard.writeText(y),me.value=!0,setTimeout(()=>{me.value=!1},2e3)}catch{o.error(D("Copy failed, please copy manually"))}},ot=V({show:!1,text:"",timeout:null,type:""}),ve=(y,w="")=>{ot.value.text=y,ot.value.type=w,ot.value.show=!0,ot.value.timeout&&clearTimeout(ot.value.timeout),ot.value.timeout=setTimeout(()=>{ot.value.show=!1,ot.value.type=""},2e3)};return(y,w)=>(C(),R("div",{class:Vt(["ai-agent-flow-builder",{fullscreen:E.value}]),ref_key:"flowBuilderRoot",ref:L},[S("div",Oa,[S("div",qa,[S("span",La,q($(D)("Nodes"))+": "+q(k.value.length)+" "+q($(D)("Edges"))+": "+q(d.value.length),1)]),S("div",Xa,[Y($(ri),{size:6,align:"center",class:"ni-toolbar",wrap:""},{default:O(()=>[$(i).canUndo?(C(),tt($(mt),{key:0,quaternary:"",size:"small",type:"default",class:"ni-btn",title:$(D)("Undo"),onClick:$(i).undo},{default:O(()=>[w[0]||(w[0]=S("i",{class:"fa fa-undo"},null,-1)),st(" "+q($(D)("Undo")),1)]),_:1},8,["title","onClick"])):U("",!0),Y($(mt),{quaternary:"",size:"small",type:"error",class:"ni-btn",onClick:Ln},{default:O(()=>[w[1]||(w[1]=S("i",{class:"fa fa-refresh"},null,-1)),st(" "+q($(D)("Reset")),1)]),_:1}),Y($(mt),{quaternary:"",size:"small",type:"info",class:"ni-btn",onClick:h},{default:O(()=>[w[2]||(w[2]=S("i",{class:"fa fa-code"},null,-1)),st(" "+q($(D)("View Data")),1)]),_:1}),Y($(mt),{quaternary:"",size:"small",type:"info",class:"ni-btn",onClick:M},{default:O(()=>[w[3]||(w[3]=S("i",{class:"fa fa-list-alt"},null,-1)),st(" "+q(g.value?$(D)("Back to Flow"):$(D)("Execution Results")),1)]),_:1}),Y($(mt),{quaternary:"",size:"small",type:"success",class:"ni-btn",disabled:T.value,onClick:qn},{default:O(()=>[w[4]||(w[4]=S("i",{class:"fa fa-play"},null,-1)),st(" "+q(T.value?$(D)("Executing..."):$(D)("Execute")),1)]),_:1},8,["disabled"]),Y($(mt),{quaternary:"",size:"small",type:"default",class:"ni-btn ni-btn-neutral",onClick:$(G)},{default:O(()=>[w[5]||(w[5]=S("i",{class:"fa fa-expand"},null,-1)),st(" "+q($(D)("Fit View")),1)]),_:1},8,["onClick"]),Y($(mt),{quaternary:"",size:"small",type:"success",class:"ni-btn",onClick:Xn},{default:O(()=>[w[6]||(w[6]=S("i",{class:"fa fa-plus"},null,-1)),st(" "+q($(D)("Add Node")),1)]),_:1}),Y($(mt),{quaternary:"",size:"small",type:"default",class:"ni-btn ni-btn-neutral",onClick:J},{default:O(()=>[S("i",{class:Vt(E.value?"fa fa-compress":"fa fa-arrows-alt")},null,2),st(" "+q(E.value?$(D)("Exit Fullscreen"):$(D)("Fullscreen")),1)]),_:1})]),_:1})])]),S("div",Ya,[g.value?(C(),R("div",Ua,[Y(mi,{executionResult:b.value,executionHistory:P.value,onClose:z},null,8,["executionResult","executionHistory"])])):(C(),R(le,{key:1},[S("div",Ga,[de.value?(C(),R("div",Wa,[$(i).hasUnsavedChanges?(C(),R("div",Ka,[w[7]||(w[7]=S("i",{class:"fa fa-circle text-warning"},null,-1)),st(" "+q(ge.value),1)])):(C(),R("div",Za,[w[8]||(w[8]=S("i",{class:"fa fa-check-circle text-success"},null,-1)),st(" "+q(ge.value),1)]))])):U("",!0),Y(Le,{name:"fade"},{default:O(()=>[ot.value.show?(C(),R("div",{key:0,class:Vt(["bubble-tip-global",ot.value.type])},[ot.value.type==="error"?(C(),R("i",Ja)):ot.value.type==="warn"?(C(),R("i",Qa)):(C(),R("i",ja)),st(" "+q(ot.value.text),1)],2)):U("",!0)]),_:1}),kt.value?(C(),tt($(hi),{key:1,ref_key:"vueFlowInstance",ref:s,nodes:k.value,edges:d.value,"node-types":Et.value,class:"vue-flow-container",onNodeClick:p,onEdgeClick:m,onPaneClick:N,onConnect:B,onConnectStart:I,onConnectEnd:H,onNodeDragStop:X,onDrop:it,onDragover:Q,onEditNode:_,"min-zoom":.2,"max-zoom":4,"nodes-connectable":"","nodes-draggable":"","edges-updatable":"","delete-key-code":"Delete","default-edge-options":{type:"smoothstep",animated:!0,style:{stroke:"#6366f1",strokeWidth:2.5,filter:"drop-shadow(0 2px 8px #6366f133)"},markerEnd:{type:"arrowclosed",color:"#6366f1"}},"connection-line-type":"smoothstep","connection-line-style":{stroke:"#94a3b8",strokeWidth:2,strokeDasharray:"5,5"},onPaneReady:Rt},{default:O(()=>[Y($(Ha),{pattern:"dots",gap:20}),Y($(Wi),null,{default:O(()=>[x.value?(C(),tt($(It),{key:0,onClick:K,title:$(D)("Delete Selected")},{default:O(()=>[...w[9]||(w[9]=[S("i",{class:"fa fa-trash"},null,-1)])]),_:1},8,["title"])):U("",!0)]),_:1}),Y($(Ta),{"node-stroke-width":3,"node-color":ht=>c(ht.type)},null,8,["node-color"])]),_:1},8,["nodes","edges","node-types"])):(C(),R("div",tl,[...w[10]||(w[10]=[S("div",{class:"loading-spinner"},[S("i",{class:"fa fa-spinner fa-spin"}),S("p",null,"正在加载节点类型...")],-1)])]))]),u.value?(C(),R("div",el,[S("div",nl,[S("div",il,[S("span",null,q($(D)("Flow Data")),1),S("div",ol,[S("button",{class:"copy-btn",onClick:Gn,title:$(D)("Copy")},[...w[11]||(w[11]=[S("i",{class:"fa fa-copy"},null,-1)])],8,rl),S("button",{class:"close-btn",onClick:f},"×")])]),S("pre",sl,""+q(JSON.stringify({nodes:k.value,edges:d.value},null,2))+`
`,1),Y(Le,{name:"fade"},{default:O(()=>[me.value?(C(),R("div",al,q($(D)("Copied")),1)):U("",!0)]),_:1})]),S("div",{class:"template-data-mask",onClick:f})])):U("",!0),l.value?(C(),R("div",ll,[S("div",ul,[Y(pi,{class:"node-palette"})])])):U("",!0)],64))])],2))}},_l=vi(cl,[["__scopeId","data-v-d7ab6be8"]]);export{_l as default};