@lunora/studio 1.0.0-alpha.113 → 1.0.0-alpha.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
- package/dist/packem_chunks/ApiTab.js +1 -1
- package/dist/packem_chunks/AuditPanel.js +1 -1
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
- package/dist/packem_chunks/ExportImportPanel.js +1 -1
- package/dist/packem_chunks/FileBrowser.js +1 -1
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
- package/dist/packem_chunks/HealthPanel.js +1 -1
- package/dist/packem_chunks/InsightsPanel.js +1 -1
- package/dist/packem_chunks/LogsPanel.js +1 -1
- package/dist/packem_chunks/MailPanel.js +1 -1
- package/dist/packem_chunks/MetricsPanel.js +1 -1
- package/dist/packem_chunks/NotificationsPanel.js +1 -1
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +1 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
- package/dist/packem_chunks/SettingsPanel.js +1 -1
- package/dist/packem_chunks/SqlEditorPanel.js +1 -1
- package/dist/packem_chunks/TableEditor.js +1 -1
- package/dist/packem_chunks/agents-panel.js +1 -1
- package/dist/packem_chunks/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-audit-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +1 -1
- package/dist/packem_chunks/auth-sessions-panel.js +1 -1
- package/dist/packem_chunks/containers-panel.js +1 -1
- package/dist/packem_chunks/dashboards-panel.js +1 -1
- package/dist/packem_chunks/evals-panel.js +1 -1
- package/dist/packem_chunks/fanout-panel.js +1 -1
- package/dist/packem_chunks/flags-panel.js +1 -1
- package/dist/packem_chunks/issues-panel.js +1 -1
- package/dist/packem_chunks/kv-browser.js +1 -1
- package/dist/packem_chunks/log-drains-panel.js +1 -1
- package/dist/packem_chunks/migrations-route.js +1 -1
- package/dist/packem_chunks/organizations-panel.js +1 -1
- package/dist/packem_chunks/payments-panel.js +1 -1
- package/dist/packem_chunks/permissions-panel.js +1 -1
- package/dist/packem_chunks/queues-panel.js +1 -1
- package/dist/packem_chunks/rls-panel.js +1 -1
- package/dist/packem_chunks/schedule-panel.js +1 -1
- package/dist/packem_chunks/storage-rules-panel.js +1 -1
- package/dist/packem_chunks/subscriptions-panel.js +1 -1
- package/dist/packem_chunks/sync-client-panel.js +1 -1
- package/dist/packem_chunks/traces-panel.js +1 -1
- package/dist/packem_chunks/users-panel.js +1 -1
- package/dist/packem_chunks/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +1 -1
- package/dist/packem_shared/{ApiDocsPanel-BL5lMig5.js → ApiDocsPanel-C_dZt4ve.js} +1 -1
- package/dist/packem_shared/{ApiReferencePanel-CkCFMCBb.js → ApiReferencePanel-6W_QfOlv.js} +1 -1
- package/dist/packem_shared/{CommandPalette-B5yLEABs.js → CommandPalette-BAiOc1hT.js} +1 -1
- package/dist/packem_shared/{DataBrowser-BnDIFN-S.js → DataBrowser-CrkvQAMf.js} +1 -1
- package/dist/packem_shared/{GlobalDataBrowser-DusjXzRF.js → GlobalDataBrowser-BHFgEqMl.js} +1 -1
- package/dist/packem_shared/{HomePanel-BcaHVBJh.js → HomePanel-B8U_LJkK.js} +1 -1
- package/dist/packem_shared/{MigrationsPanel-CCOENX4X.js → MigrationsPanel-CW4MNUa4.js} +1 -1
- package/dist/packem_shared/{OpenRpcReferencePanel-21OWMH45.js → OpenRpcReferencePanel-Cx-qwpZW.js} +1 -1
- package/dist/packem_shared/{ScheduledJobs-CiO3eXgI.js → ScheduledJobs-DRmOKtDa.js} +1 -1
- package/dist/packem_shared/Studio-k_HuJZYW.js +1 -0
- package/dist/packem_shared/{StudioApp-DCdbsciH.js → StudioApp-CWpwayvp.js} +1 -1
- package/dist/packem_shared/{advisor-view-C1KFTXSH.js → advisor-view-CqCG22DB.js} +1 -1
- package/dist/packem_shared/{data-grid-BFTQnkXq.js → data-grid-pjv4t5Yi.js} +1 -1
- package/dist/packem_shared/{error-alert-TYdKetJd.js → error-alert-CKqB2CiN.js} +1 -1
- package/dist/packem_shared/{grid-features-C_yXlMc_.js → grid-features-3wfN2PeE.js} +4 -4
- package/dist/packem_shared/{home-panel-BiJHXeDC.js → home-panel-DywiFhDs.js} +1 -1
- package/dist/packem_shared/{internal-CwaF9YNk.js → internal-7bgd8inO.js} +1 -1
- package/dist/packem_shared/{log-line-UnE93Ovi.js → log-line-D0XBZaDn.js} +1 -1
- package/dist/packem_shared/{recording-client-CKn4-vUx.js → recording-client-BPY8sYUl.js} +1 -1
- package/dist/packem_shared/{reference-view-CUIDzLf0.js → reference-view-DhxnzBtf.js} +1 -1
- package/dist/packem_shared/{result-chart-Ca3YLzt8.js → result-chart-Q-gVLi4_.js} +1 -1
- package/dist/packem_shared/{schema-diagram-DHD13TjS.js → schema-diagram-CPcjPZj3.js} +1 -1
- package/dist/packem_shared/{studio-B3eEcBK0.js → studio-BFvT56qK.js} +1 -1
- package/dist/packem_shared/{table-list-sidebar-Bluzd1_2.js → table-list-sidebar-BCxqrZ0s.js} +1 -1
- package/dist/packem_shared/{use-admin-query-P0RJrjsD.js → use-admin-query-DV9xmFl8.js} +1 -1
- package/dist/packem_shared/{use-async-submit-DdLd0MdK.js → use-async-submit-C9xXjXWX.js} +1 -1
- package/dist/packem_shared/{use-auth-config-z3KRWAqD.js → use-auth-config-DIAyVsa3.js} +1 -1
- package/dist/packem_shared/{use-open-trace-4tIa0SXZ.js → use-open-trace-IfIlKEWd.js} +1 -1
- package/dist/packem_shared/{use-sql-assistant-CP90nLLh.js → use-sql-assistant-DFO2i-n-.js} +1 -1
- package/dist/standalone/chunk-22WJHOC4.js +11 -0
- package/dist/standalone/{chunk-ZN6KUP3O.js → chunk-2CHFHPR3.js} +1 -1
- package/dist/standalone/{chunk-OG57FC7W.js → chunk-2EJQ7SPV.js} +1 -1
- package/dist/standalone/{chunk-FSWPREH3.js → chunk-2Q7HAFRK.js} +1 -1
- package/dist/standalone/{chunk-44WNSIGQ.js → chunk-2UIT2HC2.js} +1 -1
- package/dist/standalone/{chunk-YUWMB6EV.js → chunk-2UWKGSEA.js} +1 -1
- package/dist/standalone/{chunk-ZQLIKKIY.js → chunk-3IXTF53Q.js} +1 -1
- package/dist/standalone/{chunk-J6MNOKO5.js → chunk-44FJEOAY.js} +1 -1
- package/dist/standalone/{chunk-26VREVWU.js → chunk-5XMZP64Z.js} +1 -1
- package/dist/standalone/{chunk-45YWYMD5.js → chunk-6MRGARL5.js} +1 -1
- package/dist/standalone/{chunk-3F5I435D.js → chunk-6UOC4ZJL.js} +1 -1
- package/dist/standalone/{chunk-FBAZHG35.js → chunk-6ZSAMAYN.js} +1 -1
- package/dist/standalone/{chunk-BORG7WUC.js → chunk-7IQT5M4O.js} +1 -1
- package/dist/standalone/{chunk-KQIHXYE6.js → chunk-7TFEJVX4.js} +1 -1
- package/dist/standalone/{chunk-3QB5JI32.js → chunk-7W6TQTW7.js} +1 -1
- package/dist/standalone/{chunk-4MAJFNON.js → chunk-A7WKYEQ4.js} +1 -1
- package/dist/standalone/chunk-AG265V66.js +1 -0
- package/dist/standalone/{chunk-6SAAMM4S.js → chunk-BE76GAFE.js} +1 -1
- package/dist/standalone/{chunk-6ZPTNC34.js → chunk-BKM6PMSO.js} +1 -1
- package/dist/standalone/{chunk-D7DUQS2Y.js → chunk-CE7WVPLK.js} +1 -1
- package/dist/standalone/{chunk-MSFUDXBA.js → chunk-D4HJ2VM2.js} +1 -1
- package/dist/standalone/{chunk-FLCK2WWQ.js → chunk-DC5AAWSA.js} +1 -1
- package/dist/standalone/{chunk-6NJAHOGO.js → chunk-DEGERMXH.js} +1 -1
- package/dist/standalone/{chunk-JURAVSE7.js → chunk-E6P2ERQV.js} +1 -1
- package/dist/standalone/{chunk-TLPWZ5NI.js → chunk-EQSVW6LZ.js} +1 -1
- package/dist/standalone/{chunk-T2LDA6WP.js → chunk-FCEPVFIJ.js} +1 -1
- package/dist/standalone/chunk-FEEZPSMA.js +1 -0
- package/dist/standalone/{chunk-25OIGX2A.js → chunk-FEW2WNS7.js} +1 -1
- package/dist/standalone/{chunk-KFZ37KQP.js → chunk-FRSTZO5P.js} +1 -1
- package/dist/standalone/{chunk-X6Q5DWLZ.js → chunk-GKHUQDVI.js} +1 -1
- package/dist/standalone/{chunk-SL5R7WBN.js → chunk-H2WBIULE.js} +1 -1
- package/dist/standalone/{chunk-WIG3HCUJ.js → chunk-H3M57MCN.js} +1 -1
- package/dist/standalone/{chunk-UIF57LBO.js → chunk-H4SLAZAN.js} +1 -1
- package/dist/standalone/{chunk-6FWN26RH.js → chunk-HLEXBOCL.js} +1 -1
- package/dist/standalone/{chunk-QZ55OWAB.js → chunk-HLHO5AHK.js} +1 -1
- package/dist/standalone/{chunk-MOUI44OT.js → chunk-INLHZKCS.js} +1 -1
- package/dist/standalone/{chunk-L7CJ5PGH.js → chunk-JACBQWRB.js} +1 -1
- package/dist/standalone/{chunk-YS7HEZC2.js → chunk-KEMHRM53.js} +1 -1
- package/dist/standalone/{chunk-GIRZD3UB.js → chunk-KOH52XKG.js} +1 -1
- package/dist/standalone/{chunk-C5E5PLJT.js → chunk-LDVDE3LE.js} +1 -1
- package/dist/standalone/{chunk-3RYEUXY2.js → chunk-LFEDP3Y6.js} +1 -1
- package/dist/standalone/{chunk-V6QPVFDL.js → chunk-MG7VPUFA.js} +1 -1
- package/dist/standalone/{chunk-OE4KGVJW.js → chunk-MLYZZD5C.js} +1 -1
- package/dist/standalone/{chunk-WHRG6S5P.js → chunk-NSR345ID.js} +1 -1
- package/dist/standalone/{chunk-IWNVQHF7.js → chunk-OAXOITHK.js} +1 -1
- package/dist/standalone/chunk-OQS4HFKC.js +1 -0
- package/dist/standalone/{chunk-XGIG4EDG.js → chunk-OTZRXUHF.js} +1 -1
- package/dist/standalone/{chunk-PJDKRUWT.js → chunk-PNLUMMXO.js} +1 -1
- package/dist/standalone/{chunk-AOE75NAT.js → chunk-Q2G22JHG.js} +1 -1
- package/dist/standalone/{chunk-BELLXCN7.js → chunk-RUIWLLAI.js} +1 -1
- package/dist/standalone/{chunk-S77D4SHR.js → chunk-RVQRXKRJ.js} +1 -1
- package/dist/standalone/{chunk-JVAYDDMK.js → chunk-SCXAZ74Y.js} +1 -1
- package/dist/standalone/{chunk-2DC6F7NH.js → chunk-SLOB2B2T.js} +1 -1
- package/dist/standalone/{chunk-LT4XQDD2.js → chunk-SM764GPA.js} +1 -1
- package/dist/standalone/{chunk-5T7KRUPX.js → chunk-U2KBAKZ6.js} +1 -1
- package/dist/standalone/chunk-U7J3LXJ4.js +6 -0
- package/dist/standalone/{chunk-KEKIGANB.js → chunk-UCA5MYCL.js} +1 -1
- package/dist/standalone/{chunk-GPP4VSUO.js → chunk-UJXKS27L.js} +1 -1
- package/dist/standalone/{chunk-C7E4I7JZ.js → chunk-UKIDHICQ.js} +1 -1
- package/dist/standalone/{chunk-5NRQIDQA.js → chunk-V2KCESII.js} +1 -1
- package/dist/standalone/{chunk-OOBJFXYB.js → chunk-W5CYX66B.js} +1 -1
- package/dist/standalone/{chunk-2BDM6HNL.js → chunk-WSNFV7ZW.js} +1 -1
- package/dist/standalone/{chunk-OLQWBGKT.js → chunk-YYFHDYYT.js} +1 -1
- package/dist/standalone/{chunk-PHHMPYEP.js → chunk-ZHDCWHRT.js} +1 -1
- package/dist/standalone/{chunk-CEPMQS24.js → chunk-ZIHYXKQJ.js} +1 -1
- package/dist/standalone/{chunk-DL3UOEWN.js → chunk-ZIYO55T2.js} +1 -1
- package/dist/standalone/{chunk-6JGXSMKV.js → chunk-ZNNKKJRT.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/package.json +5 -5
- package/dist/packem_shared/Studio-CHmLCjBR.js +0 -1
- package/dist/standalone/chunk-GZMBMNL3.js +0 -6
- package/dist/standalone/chunk-RBUVNO22.js +0 -1
- package/dist/standalone/chunk-SMKRXJUC.js +0 -1
- package/dist/standalone/chunk-T6HLABZW.js +0 -1
- package/dist/standalone/chunk-TBXK3FKP.js +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as je,b as Ni}from"./chunk-7SROZWKL.js";import{a as Mi,b as Ii,c as Pi,f as xn}from"./chunk-AECDJKXB.js";import{e as bi,k as Si}from"./chunk-DKSLOJDQ.js";import{a as ho,b as po,c as vi,d as Ei,e as yn,g as Ci,h as _i,i as ht}from"./chunk-JV7KTJPY.js";import{P as wi}from"./chunk-AOAJGSYZ.js";import{b as Fl}from"./chunk-INQICZYC.js";import{a as Bl}from"./chunk-TFMQSCGC.js";import{a as fo}from"./chunk-BWEXJENB.js";import{b as Ht}from"./chunk-SPDZUX4P.js";import{d as Lt,o as mn}from"./chunk-6ZPTNC34.js";import{c as yi}from"./chunk-VYW2PAWC.js";import{a as o,d as Le,e as uo,f as Vl,g as xi,i as Je}from"./chunk-R5ZTCHCE.js";var ft=Le(Vl(),1);var A=Le(xi()),k=Le(uo());function ae(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=ae(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}o(ae,"cc");var Wl={value:o(()=>{},"value")};function Ai(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new wn(n)}o(Ai,"dispatch");function wn(e){this._=e}o(wn,"Dispatch");function Xl(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}o(Xl,"parseTypenames");wn.prototype=Ai.prototype={constructor:wn,on:o(function(e,t){var n=this._,r=Xl(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Yl(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ki(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ki(n[i],e.name,null);return this},"on"),copy:o(function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new wn(e)},"copy"),call:o(function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},"call"),apply:o(function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)},"apply")};function Yl(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}o(Yl,"get");function ki(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Wl,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}o(ki,"set");var et=Ai;var bn="http://www.w3.org/1999/xhtml",go={svg:"http://www.w3.org/2000/svg",xhtml:bn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Me(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),go.hasOwnProperty(t)?{space:go[t],local:e}:e}o(Me,"default");function Zl(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bn&&t.documentElement.namespaceURI===bn?t.createElement(e):t.createElementNS(n,e)}}o(Zl,"creatorInherit");function Ul(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}o(Ul,"creatorFixed");function Bt(e){var t=Me(e);return(t.local?Ul:Zl)(t)}o(Bt,"default");function ql(){}o(ql,"none");function He(e){return e==null?ql:function(){return this.querySelector(e)}}o(He,"default");function mo(e){typeof e!="function"&&(e=He(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,c=r[i]=new Array(a),l,u,d=0;d<a;++d)(l=s[d])&&(u=e.call(l,l.__data__,d,s))&&("__data__"in l&&(u.__data__=l.__data__),c[d]=u);return new ce(r,this._parents)}o(mo,"default");function yo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}o(yo,"array");function Kl(){return[]}o(Kl,"empty");function pt(e){return e==null?Kl:function(){return this.querySelectorAll(e)}}o(pt,"default");function Gl(e){return function(){return yo(e.apply(this,arguments))}}o(Gl,"arrayAll");function xo(e){typeof e=="function"?e=Gl(e):e=pt(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],c=a.length,l,u=0;u<c;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new ce(r,i)}o(xo,"default");function gt(e){return function(){return this.matches(e)}}o(gt,"default");function Sn(e){return function(t){return t.matches(e)}}o(Sn,"childMatcher");var Ql=Array.prototype.find;function Jl(e){return function(){return Ql.call(this.children,e)}}o(Jl,"childFind");function jl(){return this.firstElementChild}o(jl,"childFirst");function wo(e){return this.select(e==null?jl:Jl(typeof e=="function"?e:Sn(e)))}o(wo,"default");var eu=Array.prototype.filter;function tu(){return Array.from(this.children)}o(tu,"children");function nu(e){return function(){return eu.call(this.children,e)}}o(nu,"childrenFilter");function bo(e){return this.selectAll(e==null?tu:nu(typeof e=="function"?e:Sn(e)))}o(bo,"default");function So(e){typeof e!="function"&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,c=r[i]=[],l,u=0;u<a;++u)(l=s[u])&&e.call(l,l.__data__,u,s)&&c.push(l);return new ce(r,this._parents)}o(So,"default");function Vt(e){return new Array(e.length)}o(Vt,"default");function vo(){return new ce(this._enter||this._groups.map(Vt),this._parents)}o(vo,"default");function Ft(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}o(Ft,"EnterNode");Ft.prototype={constructor:Ft,appendChild:o(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:o(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:o(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:o(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")};function Eo(e){return function(){return e}}o(Eo,"default");function ou(e,t,n,r,i,s){for(var a=0,c,l=t.length,u=s.length;a<u;++a)(c=t[a])?(c.__data__=s[a],r[a]=c):n[a]=new Ft(e,s[a]);for(;a<l;++a)(c=t[a])&&(i[a]=c)}o(ou,"bindIndex");function ru(e,t,n,r,i,s,a){var c,l,u=new Map,d=t.length,f=s.length,h=new Array(d),g;for(c=0;c<d;++c)(l=t[c])&&(h[c]=g=a.call(l,l.__data__,c,t)+"",u.has(g)?i[c]=l:u.set(g,l));for(c=0;c<f;++c)g=a.call(e,s[c],c,s)+"",(l=u.get(g))?(r[c]=l,l.__data__=s[c],u.delete(g)):n[c]=new Ft(e,s[c]);for(c=0;c<d;++c)(l=t[c])&&u.get(h[c])===l&&(i[c]=l)}o(ru,"bindKey");function iu(e){return e.__data__}o(iu,"datum");function Co(e,t){if(!arguments.length)return Array.from(this,iu);var n=t?ru:ou,r=this._parents,i=this._groups;typeof e!="function"&&(e=Eo(e));for(var s=i.length,a=new Array(s),c=new Array(s),l=new Array(s),u=0;u<s;++u){var d=r[u],f=i[u],h=f.length,g=su(e.call(d,d&&d.__data__,u,r)),p=g.length,S=c[u]=new Array(p),b=a[u]=new Array(p),y=l[u]=new Array(h);n(d,f,S,b,y,g,t);for(var v=0,m=0,w,N;v<p;++v)if(w=S[v]){for(v>=m&&(m=v+1);!(N=b[m])&&++m<p;);w._next=N||null}}return a=new ce(a,r),a._enter=c,a._exit=l,a}o(Co,"default");function su(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}o(su,"arraylike");function _o(){return new ce(this._exit||this._groups.map(Vt),this._parents)}o(_o,"default");function No(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}o(No,"default");function Mo(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),c=new Array(i),l=0;l<a;++l)for(var u=n[l],d=r[l],f=u.length,h=c[l]=new Array(f),g,p=0;p<f;++p)(g=u[p]||d[p])&&(h[p]=g);for(;l<i;++l)c[l]=n[l];return new ce(c,this._parents)}o(Mo,"default");function Io(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}o(Io,"default");function Po(e){e||(e=au);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}o(t,"compareNode");for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],c=a.length,l=i[s]=new Array(c),u,d=0;d<c;++d)(u=a[d])&&(l[d]=u);l.sort(t)}return new ce(i,this._parents).order()}o(Po,"default");function au(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}o(au,"ascending");function ko(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}o(ko,"default");function Ao(){return Array.from(this)}o(Ao,"default");function To(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}o(To,"default");function Do(){let e=0;for(let t of this)++e;return e}o(Do,"default");function Ro(){return!this.node()}o(Ro,"default");function zo(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,c;s<a;++s)(c=i[s])&&e.call(c,c.__data__,s,i);return this}o(zo,"default");function cu(e){return function(){this.removeAttribute(e)}}o(cu,"attrRemove");function lu(e){return function(){this.removeAttributeNS(e.space,e.local)}}o(lu,"attrRemoveNS");function uu(e,t){return function(){this.setAttribute(e,t)}}o(uu,"attrConstant");function du(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}o(du,"attrConstantNS");function fu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}o(fu,"attrFunction");function hu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}o(hu,"attrFunctionNS");function Oo(e,t){var n=Me(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?lu:cu:typeof t=="function"?n.local?hu:fu:n.local?du:uu)(n,t))}o(Oo,"default");function Wt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}o(Wt,"default");function pu(e){return function(){this.style.removeProperty(e)}}o(pu,"styleRemove");function gu(e,t,n){return function(){this.style.setProperty(e,t,n)}}o(gu,"styleConstant");function mu(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}o(mu,"styleFunction");function $o(e,t,n){return arguments.length>1?this.each((t==null?pu:typeof t=="function"?mu:gu)(e,t,n??"")):Be(this.node(),e)}o($o,"default");function Be(e,t){return e.style.getPropertyValue(t)||Wt(e).getComputedStyle(e,null).getPropertyValue(t)}o(Be,"styleValue");function yu(e){return function(){delete this[e]}}o(yu,"propertyRemove");function xu(e,t){return function(){this[e]=t}}o(xu,"propertyConstant");function wu(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}o(wu,"propertyFunction");function Lo(e,t){return arguments.length>1?this.each((t==null?yu:typeof t=="function"?wu:xu)(e,t)):this.node()[e]}o(Lo,"default");function Ti(e){return e.trim().split(/^|\s+/)}o(Ti,"classArray");function Ho(e){return e.classList||new Di(e)}o(Ho,"classList");function Di(e){this._node=e,this._names=Ti(e.getAttribute("class")||"")}o(Di,"ClassList");Di.prototype={add:o(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:o(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:o(function(e){return this._names.indexOf(e)>=0},"contains")};function Ri(e,t){for(var n=Ho(e),r=-1,i=t.length;++r<i;)n.add(t[r])}o(Ri,"classedAdd");function zi(e,t){for(var n=Ho(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}o(zi,"classedRemove");function bu(e){return function(){Ri(this,e)}}o(bu,"classedTrue");function Su(e){return function(){zi(this,e)}}o(Su,"classedFalse");function vu(e,t){return function(){(t.apply(this,arguments)?Ri:zi)(this,e)}}o(vu,"classedFunction");function Bo(e,t){var n=Ti(e+"");if(arguments.length<2){for(var r=Ho(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?vu:t?bu:Su)(n,t))}o(Bo,"default");function Eu(){this.textContent=""}o(Eu,"textRemove");function Cu(e){return function(){this.textContent=e}}o(Cu,"textConstant");function _u(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}o(_u,"textFunction");function Vo(e){return arguments.length?this.each(e==null?Eu:(typeof e=="function"?_u:Cu)(e)):this.node().textContent}o(Vo,"default");function Nu(){this.innerHTML=""}o(Nu,"htmlRemove");function Mu(e){return function(){this.innerHTML=e}}o(Mu,"htmlConstant");function Iu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}o(Iu,"htmlFunction");function Fo(e){return arguments.length?this.each(e==null?Nu:(typeof e=="function"?Iu:Mu)(e)):this.node().innerHTML}o(Fo,"default");function Pu(){this.nextSibling&&this.parentNode.appendChild(this)}o(Pu,"raise");function Wo(){return this.each(Pu)}o(Wo,"default");function ku(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}o(ku,"lower");function Xo(){return this.each(ku)}o(Xo,"default");function Yo(e){var t=typeof e=="function"?e:Bt(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}o(Yo,"default");function Au(){return null}o(Au,"constantNull");function Zo(e,t){var n=typeof e=="function"?e:Bt(e),r=t==null?Au:typeof t=="function"?t:He(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}o(Zo,"default");function Tu(){var e=this.parentNode;e&&e.removeChild(this)}o(Tu,"remove");function Uo(){return this.each(Tu)}o(Uo,"default");function Du(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}o(Du,"selection_cloneShallow");function Ru(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}o(Ru,"selection_cloneDeep");function qo(e){return this.select(e?Ru:Du)}o(qo,"default");function Ko(e){return arguments.length?this.property("__data__",e):this.node().__data__}o(Ko,"default");function zu(e){return function(t){e.call(this,t,this.__data__)}}o(zu,"contextListener");function Ou(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}o(Ou,"parseTypenames");function $u(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}o($u,"onRemove");function Lu(e,t,n){return function(){var r=this.__on,i,s=zu(t);if(r){for(var a=0,c=r.length;a<c;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}o(Lu,"onAdd");function Go(e,t,n){var r=Ou(e+""),i,s=r.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var l=0,u=c.length,d;l<u;++l)for(i=0,d=c[l];i<s;++i)if((a=r[i]).type===d.type&&a.name===d.name)return d.value}return}for(c=t?Lu:$u,i=0;i<s;++i)this.each(c(r[i],t,n));return this}o(Go,"default");function Oi(e,t,n){var r=Wt(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}o(Oi,"dispatchEvent");function Hu(e,t){return function(){return Oi(this,e,t)}}o(Hu,"dispatchConstant");function Bu(e,t){return function(){return Oi(this,e,t.apply(this,arguments))}}o(Bu,"dispatchFunction");function Qo(e,t){return this.each((typeof t=="function"?Bu:Hu)(e,t))}o(Qo,"default");function*Jo(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}o(Jo,"default");var jo=[null];function ce(e,t){this._groups=e,this._parents=t}o(ce,"Selection");function $i(){return new ce([[document.documentElement]],jo)}o($i,"selection");function Vu(){return this}o(Vu,"selection_selection");ce.prototype=$i.prototype={constructor:ce,select:mo,selectAll:xo,selectChild:wo,selectChildren:bo,filter:So,data:Co,enter:vo,exit:_o,join:No,merge:Mo,selection:Vu,order:Io,sort:Po,call:ko,nodes:Ao,node:To,size:Do,empty:Ro,each:zo,attr:Oo,style:$o,property:Lo,classed:Bo,text:Vo,html:Fo,raise:Wo,lower:Xo,append:Yo,insert:Zo,remove:Uo,clone:qo,datum:Ko,on:Go,dispatch:Qo,[Symbol.iterator]:Jo};var De=$i;function le(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],jo)}o(le,"default");function er(e){let t;for(;t=e.sourceEvent;)e=t;return e}o(er,"default");function fe(e,t){if(e=er(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}o(fe,"default");var Li={passive:!1},tt={capture:!0,passive:!1};function vn(e){e.stopImmediatePropagation()}o(vn,"nopropagation");function Re(e){e.preventDefault(),e.stopImmediatePropagation()}o(Re,"default");function mt(e){var t=e.document.documentElement,n=le(e).on("dragstart.drag",Re,tt);"onselectstart"in t?n.on("selectstart.drag",Re,tt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}o(mt,"default");function Xt(e,t){var n=e.document.documentElement,r=le(e).on("dragstart.drag",null);t&&(r.on("click.drag",Re,tt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}o(Xt,"yesdrag");var Yt=o(e=>()=>e,"default");function Zt(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:a,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}o(Zt,"DragEvent");Zt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Fu(e){return!e.ctrlKey&&!e.button}o(Fu,"defaultFilter");function Wu(){return this.parentNode}o(Wu,"defaultContainer");function Xu(e,t){return t??{x:e.x,y:e.y}}o(Xu,"defaultSubject");function Yu(){return navigator.maxTouchPoints||"ontouchstart"in this}o(Yu,"defaultTouchable");function Ut(){var e=Fu,t=Wu,n=Xu,r=Yu,i={},s=et("start","drag","end"),a=0,c,l,u,d,f=0;function h(w){w.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",y,Li).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}o(h,"drag");function g(w,N){if(!(d||!e.call(this,w,N))){var _=m(this,t.call(this,w,N),w,N,"mouse");_&&(le(w.view).on("mousemove.drag",p,tt).on("mouseup.drag",S,tt),mt(w.view),vn(w),u=!1,c=w.clientX,l=w.clientY,_("start",w))}}o(g,"mousedowned");function p(w){if(Re(w),!u){var N=w.clientX-c,_=w.clientY-l;u=N*N+_*_>f}i.mouse("drag",w)}o(p,"mousemoved");function S(w){le(w.view).on("mousemove.drag mouseup.drag",null),Xt(w.view,u),Re(w),i.mouse("end",w)}o(S,"mouseupped");function b(w,N){if(e.call(this,w,N)){var _=w.changedTouches,P=t.call(this,w,N),I=_.length,T,F;for(T=0;T<I;++T)(F=m(this,P,w,N,_[T].identifier,_[T]))&&(vn(w),F("start",w,_[T]))}}o(b,"touchstarted");function y(w){var N=w.changedTouches,_=N.length,P,I;for(P=0;P<_;++P)(I=i[N[P].identifier])&&(Re(w),I("drag",w,N[P]))}o(y,"touchmoved");function v(w){var N=w.changedTouches,_=N.length,P,I;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),P=0;P<_;++P)(I=i[N[P].identifier])&&(vn(w),I("end",w,N[P]))}o(v,"touchended");function m(w,N,_,P,I,T){var F=s.copy(),z=fe(T||_,N),H,O,x;if((x=n.call(w,new Zt("beforestart",{sourceEvent:_,target:h,identifier:I,active:a,x:z[0],y:z[1],dx:0,dy:0,dispatch:F}),P))!=null)return H=x.x-z[0]||0,O=x.y-z[1]||0,o(function E(C,M,R){var D=z,V;switch(C){case"start":i[I]=E,V=a++;break;case"end":delete i[I],--a;case"drag":z=fe(R||M,N),V=a;break}F.call(C,w,new Zt(C,{sourceEvent:M,subject:x,target:h,identifier:I,active:V,x:z[0]+H,y:z[1]+O,dx:z[0]-D[0],dy:z[1]-D[1],dispatch:F}),P)},"gesture")}return o(m,"beforestart"),h.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Yt(!!w),h):e},h.container=function(w){return arguments.length?(t=typeof w=="function"?w:Yt(w),h):t},h.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Yt(w),h):n},h.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:Yt(!!w),h):r},h.on=function(){var w=s.on.apply(s,arguments);return w===s?h:w},h.clickDistance=function(w){return arguments.length?(f=(w=+w)*w,h):Math.sqrt(f)},h}o(Ut,"default");var yt=0,Kt=0,qt=0,Bi=1e3,En,Gt,Cn=0,nt=0,_n=0,Qt=typeof performance=="object"&&performance.now?performance:Date,Vi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jt(){return nt||(Vi(Zu),nt=Qt.now()+_n)}o(jt,"now");function Zu(){nt=0}o(Zu,"clearNow");function Jt(){this._call=this._time=this._next=null}o(Jt,"Timer");Jt.prototype=Nn.prototype={constructor:Jt,restart:o(function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?jt():+n)+(t==null?0:+t),!this._next&&Gt!==this&&(Gt?Gt._next=this:En=this,Gt=this),this._call=e,this._time=n,tr()},"restart"),stop:o(function(){this._call&&(this._call=null,this._time=1/0,tr())},"stop")};function Nn(e,t,n){var r=new Jt;return r.restart(e,t,n),r}o(Nn,"timer");function Fi(){jt(),++yt;for(var e=En,t;e;)(t=nt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--yt}o(Fi,"timerFlush");function Hi(){nt=(Cn=Qt.now())+_n,yt=Kt=0;try{Fi()}finally{yt=0,qu(),nt=0}}o(Hi,"wake");function Uu(){var e=Qt.now(),t=e-Cn;t>Bi&&(_n-=t,Cn=e)}o(Uu,"poke");function qu(){for(var e,t=En,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:En=n);Gt=e,tr(r)}o(qu,"nap");function tr(e){if(!yt){Kt&&(Kt=clearTimeout(Kt));var t=e-nt;t>24?(e<1/0&&(Kt=setTimeout(Hi,e-Qt.now()-_n)),qt&&(qt=clearInterval(qt))):(qt||(Cn=Qt.now(),qt=setInterval(Uu,Bi)),yt=1,Vi(Hi))}}o(tr,"sleep");function en(e,t,n){var r=new Jt;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}o(en,"default");var Ku=et("start","end","cancel","interrupt"),Gu=[],Yi=0,Wi=1,In=2,Mn=3,Xi=4,Pn=5,tn=6;function ze(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Qu(e,n,{name:t,index:r,group:i,on:Ku,tween:Gu,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Yi})}o(ze,"default");function nn(e,t){var n=ue(e,t);if(n.state>Yi)throw new Error("too late; already scheduled");return n}o(nn,"init");function de(e,t){var n=ue(e,t);if(n.state>Mn)throw new Error("too late; already running");return n}o(de,"set");function ue(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}o(ue,"get");function Qu(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Nn(s,0,n.time);function s(u){n.state=Wi,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}o(s,"schedule");function a(u){var d,f,h,g;if(n.state!==Wi)return l();for(d in r)if(g=r[d],g.name===n.name){if(g.state===Mn)return en(a);g.state===Xi?(g.state=tn,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=tn,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(en(function(){n.state===Mn&&(n.state=Xi,n.timer.restart(c,n.delay,n.time),c(u))}),n.state=In,n.on.call("start",e,e.__data__,n.index,n.group),n.state===In){for(n.state=Mn,i=new Array(h=n.tween.length),d=0,f=-1;d<h;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}o(a,"start");function c(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Pn,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);n.state===Pn&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}o(c,"tick");function l(){n.state=tn,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}o(l,"stop")}o(Qu,"create");function Ve(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>In&&r.state<Pn,r.state=tn,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}o(Ve,"default");function nr(e){return this.each(function(){Ve(this,e)})}o(nr,"default");function Ju(e,t){var n,r;return function(){var i=de(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,c=r.length;a<c;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}o(Ju,"tweenRemove");function ju(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=de(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var c={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=c;break}l===u&&i.push(c)}s.tween=i}}o(ju,"tweenFunction");function or(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ue(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Ju:ju)(n,e,t))}o(or,"default");function xt(e,t,n){var r=e._id;return e.each(function(){var i=de(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return ue(i,r).value[t]}}o(xt,"tweenValue");function on(e,t){var n;return(typeof t=="number"?vi:t instanceof ho?po:(n=ho(t))?(t=n,po):Ei)(e,t)}o(on,"default");function ed(e){return function(){this.removeAttribute(e)}}o(ed,"attrRemove");function td(e){return function(){this.removeAttributeNS(e.space,e.local)}}o(td,"attrRemoveNS");function nd(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}o(nd,"attrConstant");function od(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}o(od,"attrConstantNS");function rd(e,t,n){var r,i,s;return function(){var a,c=n(this),l;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=c+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,c)))}}o(rd,"attrFunction");function id(e,t,n){var r,i,s;return function(){var a,c=n(this),l;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=c+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,c)))}}o(id,"attrFunctionNS");function rr(e,t){var n=Me(e),r=n==="transform"?_i:on;return this.attrTween(e,typeof t=="function"?(n.local?id:rd)(n,r,xt(this,"attr."+e,t)):t==null?(n.local?td:ed)(n):(n.local?od:nd)(n,r,t))}o(rr,"default");function sd(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}o(sd,"attrInterpolate");function ad(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}o(ad,"attrInterpolateNS");function cd(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&ad(e,s)),n}return o(i,"tween"),i._value=t,i}o(cd,"attrTweenNS");function ld(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&sd(e,s)),n}return o(i,"tween"),i._value=t,i}o(ld,"attrTween");function ir(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Me(e);return this.tween(n,(r.local?cd:ld)(r,t))}o(ir,"default");function ud(e,t){return function(){nn(this,e).delay=+t.apply(this,arguments)}}o(ud,"delayFunction");function dd(e,t){return t=+t,function(){nn(this,e).delay=t}}o(dd,"delayConstant");function sr(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ud:dd)(t,e)):ue(this.node(),t).delay}o(sr,"default");function fd(e,t){return function(){de(this,e).duration=+t.apply(this,arguments)}}o(fd,"durationFunction");function hd(e,t){return t=+t,function(){de(this,e).duration=t}}o(hd,"durationConstant");function ar(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fd:hd)(t,e)):ue(this.node(),t).duration}o(ar,"default");function pd(e,t){if(typeof t!="function")throw new Error;return function(){de(this,e).ease=t}}o(pd,"easeConstant");function cr(e){var t=this._id;return arguments.length?this.each(pd(t,e)):ue(this.node(),t).ease}o(cr,"default");function gd(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;de(this,e).ease=n}}o(gd,"easeVarying");function lr(e){if(typeof e!="function")throw new Error;return this.each(gd(this._id,e))}o(lr,"default");function ur(e){typeof e!="function"&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,c=r[i]=[],l,u=0;u<a;++u)(l=s[u])&&e.call(l,l.__data__,u,s)&&c.push(l);return new ge(r,this._parents,this._name,this._id)}o(ur,"default");function dr(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),c=0;c<s;++c)for(var l=t[c],u=n[c],d=l.length,f=a[c]=new Array(d),h,g=0;g<d;++g)(h=l[g]||u[g])&&(f[g]=h);for(;c<r;++c)a[c]=t[c];return new ge(a,this._parents,this._name,this._id)}o(dr,"default");function md(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}o(md,"start");function yd(e,t,n){var r,i,s=md(t)?nn:de;return function(){var a=s(this,e),c=a.on;c!==r&&(i=(r=c).copy()).on(t,n),a.on=i}}o(yd,"onFunction");function fr(e,t){var n=this._id;return arguments.length<2?ue(this.node(),n).on.on(e):this.each(yd(n,e,t))}o(fr,"default");function xd(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}o(xd,"removeFunction");function hr(){return this.on("end.remove",xd(this._id))}o(hr,"default");function pr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=He(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var c=r[a],l=c.length,u=s[a]=new Array(l),d,f,h=0;h<l;++h)(d=c[h])&&(f=e.call(d,d.__data__,h,c))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f,ze(u[h],t,n,h,u,ue(d,n)));return new ge(s,this._parents,t,n)}o(pr,"default");function gr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=pt(e));for(var r=this._groups,i=r.length,s=[],a=[],c=0;c<i;++c)for(var l=r[c],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var h=e.call(d,d.__data__,f,l),g,p=ue(d,n),S=0,b=h.length;S<b;++S)(g=h[S])&&ze(g,t,n,S,h,p);s.push(h),a.push(d)}return new ge(s,a,t,n)}o(gr,"default");var wd=De.prototype.constructor;function mr(){return new wd(this._groups,this._parents)}o(mr,"default");function bd(e,t){var n,r,i;return function(){var s=Be(this,e),a=(this.style.removeProperty(e),Be(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}o(bd,"styleNull");function Zi(e){return function(){this.style.removeProperty(e)}}o(Zi,"styleRemove");function Sd(e,t,n){var r,i=n+"",s;return function(){var a=Be(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}o(Sd,"styleConstant");function vd(e,t,n){var r,i,s;return function(){var a=Be(this,e),c=n(this),l=c+"";return c==null&&(l=c=(this.style.removeProperty(e),Be(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,c))}}o(vd,"styleFunction");function Ed(e,t){var n,r,i,s="style."+t,a="end."+s,c;return function(){var l=de(this,e),u=l.on,d=l.value[s]==null?c||(c=Zi(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(a,i=d),l.on=r}}o(Ed,"styleMaybeRemove");function yr(e,t,n){var r=(e+="")=="transform"?Ci:on;return t==null?this.styleTween(e,bd(e,r)).on("end.style."+e,Zi(e)):typeof t=="function"?this.styleTween(e,vd(e,r,xt(this,"style."+e,t))).each(Ed(this._id,e)):this.styleTween(e,Sd(e,r,t),n).on("end.style."+e,null)}o(yr,"default");function Cd(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}o(Cd,"styleInterpolate");function _d(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Cd(e,a,n)),r}return o(s,"tween"),s._value=t,s}o(_d,"styleTween");function xr(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,_d(e,t,n??""))}o(xr,"default");function Nd(e){return function(){this.textContent=e}}o(Nd,"textConstant");function Md(e){return function(){var t=e(this);this.textContent=t??""}}o(Md,"textFunction");function wr(e){return this.tween("text",typeof e=="function"?Md(xt(this,"text",e)):Nd(e==null?"":e+""))}o(wr,"default");function Id(e){return function(t){this.textContent=e.call(this,t)}}o(Id,"textInterpolate");function Pd(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Id(i)),t}return o(r,"tween"),r._value=e,r}o(Pd,"textTween");function br(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Pd(e))}o(br,"default");function Sr(){for(var e=this._name,t=this._id,n=kn(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],c=a.length,l,u=0;u<c;++u)if(l=a[u]){var d=ue(l,t);ze(l,e,n,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ge(r,this._parents,e,n)}o(Sr,"default");function vr(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var c={value:a},l={value:o(function(){--i===0&&s()},"value")};n.each(function(){var u=de(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(l)),u.on=t}),i===0&&s()})}o(vr,"default");var kd=0;function ge(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}o(ge,"Transition");function Ui(e){return De().transition(e)}o(Ui,"transition");function kn(){return++kd}o(kn,"newId");var Oe=De.prototype;ge.prototype=Ui.prototype={constructor:ge,select:pr,selectAll:gr,selectChild:Oe.selectChild,selectChildren:Oe.selectChildren,filter:ur,merge:dr,selection:mr,transition:Sr,call:Oe.call,nodes:Oe.nodes,node:Oe.node,size:Oe.size,empty:Oe.empty,each:Oe.each,on:fr,attr:rr,attrTween:ir,style:yr,styleTween:xr,text:wr,textTween:br,remove:hr,tween:or,delay:sr,duration:ar,ease:cr,easeVarying:lr,end:vr,[Symbol.iterator]:Oe[Symbol.iterator]};function An(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}o(An,"cubicInOut");var Ad={time:null,delay:0,duration:250,ease:An};function Td(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}o(Td,"inherit");function Er(e){var t,n;e instanceof ge?(t=e._id,e=e._name):(t=kn(),(n=Ad).time=jt(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],c=a.length,l,u=0;u<c;++u)(l=a[u])&&ze(l,e,t,u,a,n||Td(l,t));return new ge(r,this._parents,e,t)}o(Er,"default");De.prototype.interrupt=nr;De.prototype.transition=Er;var rn=o(e=>()=>e,"default");function Cr(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}o(Cr,"ZoomEvent");function ve(e,t,n){this.k=e,this.x=t,this.y=n}o(ve,"Transform");ve.prototype={constructor:ve,scale:o(function(e){return e===1?this:new ve(this.k*e,this.x,this.y)},"scale"),translate:o(function(e,t){return e===0&t===0?this:new ve(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:o(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:o(function(e){return e*this.k+this.x},"applyX"),applyY:o(function(e){return e*this.k+this.y},"applyY"),invert:o(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:o(function(e){return(e-this.x)/this.k},"invertX"),invertY:o(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:o(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:o(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:o(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};var ot=new ve(1,0,0);sn.prototype=ve.prototype;function sn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ot;return e.__zoom}o(sn,"transform");function Tn(e){e.stopImmediatePropagation()}o(Tn,"nopropagation");function rt(e){e.preventDefault(),e.stopImmediatePropagation()}o(rt,"default");function Dd(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}o(Dd,"defaultFilter");function Rd(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}o(Rd,"defaultExtent");function qi(){return this.__zoom||ot}o(qi,"defaultTransform");function zd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}o(zd,"defaultWheelDelta");function Od(){return navigator.maxTouchPoints||"ontouchstart"in this}o(Od,"defaultTouchable");function $d(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}o($d,"defaultConstrain");function an(){var e=Dd,t=Rd,n=$d,r=zd,i=Od,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],c=250,l=ht,u=et("start","zoom","end"),d,f,h,g=500,p=150,S=0,b=10;function y(x){x.property("__zoom",qi).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",F).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}o(y,"zoom"),y.transform=function(x,E,C,M){var R=x.selection?x.selection():x;R.property("__zoom",qi),x!==R?N(x,E,C,M):R.interrupt().each(function(){_(this,arguments).event(M).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},y.scaleBy=function(x,E,C,M){y.scaleTo(x,function(){var R=this.__zoom.k,D=typeof E=="function"?E.apply(this,arguments):E;return R*D},C,M)},y.scaleTo=function(x,E,C,M){y.transform(x,function(){var R=t.apply(this,arguments),D=this.__zoom,V=C==null?w(R):typeof C=="function"?C.apply(this,arguments):C,B=D.invert(V),L=typeof E=="function"?E.apply(this,arguments):E;return n(m(v(D,L),V,B),R,a)},C,M)},y.translateBy=function(x,E,C,M){y.transform(x,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof C=="function"?C.apply(this,arguments):C),t.apply(this,arguments),a)},null,M)},y.translateTo=function(x,E,C,M,R){y.transform(x,function(){var D=t.apply(this,arguments),V=this.__zoom,B=M==null?w(D):typeof M=="function"?M.apply(this,arguments):M;return n(ot.translate(B[0],B[1]).scale(V.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof C=="function"?-C.apply(this,arguments):-C),D,a)},M,R)};function v(x,E){return E=Math.max(s[0],Math.min(s[1],E)),E===x.k?x:new ve(E,x.x,x.y)}o(v,"scale");function m(x,E,C){var M=E[0]-C[0]*x.k,R=E[1]-C[1]*x.k;return M===x.x&&R===x.y?x:new ve(x.k,M,R)}o(m,"translate");function w(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}o(w,"centroid");function N(x,E,C,M){x.on("start.zoom",function(){_(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(M).end()}).tween("zoom",function(){var R=this,D=arguments,V=_(R,D).event(M),B=t.apply(R,D),L=C==null?w(B):typeof C=="function"?C.apply(R,D):C,U=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),X=R.__zoom,K=typeof E=="function"?E.apply(R,D):E,ee=l(X.invert(L).concat(U/X.k),K.invert(L).concat(U/K.k));return function(G){if(G===1)G=K;else{var $=ee(G),W=U/$[2];G=new ve(W,L[0]-$[0]*W,L[1]-$[1]*W)}V.zoom(null,G)}})}o(N,"schedule");function _(x,E,C){return!C&&x.__zooming||new P(x,E)}o(_,"gesture");function P(x,E){this.that=x,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(x,E),this.taps=0}o(P,"Gesture"),P.prototype={event:o(function(x){return x&&(this.sourceEvent=x),this},"event"),start:o(function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},"start"),zoom:o(function(x,E){return this.mouse&&x!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},"zoom"),end:o(function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},"end"),emit:o(function(x){var E=le(this.that).datum();u.call(x,this.that,new Cr(x,{sourceEvent:this.sourceEvent,target:y,type:x,transform:this.that.__zoom,dispatch:u}),E)},"emit")};function I(x,...E){if(!e.apply(this,arguments))return;var C=_(this,E).event(x),M=this.__zoom,R=Math.max(s[0],Math.min(s[1],M.k*Math.pow(2,r.apply(this,arguments)))),D=fe(x);if(C.wheel)(C.mouse[0][0]!==D[0]||C.mouse[0][1]!==D[1])&&(C.mouse[1]=M.invert(C.mouse[0]=D)),clearTimeout(C.wheel);else{if(M.k===R)return;C.mouse=[D,M.invert(D)],Ve(this),C.start()}rt(x),C.wheel=setTimeout(V,p),C.zoom("mouse",n(m(v(M,R),C.mouse[0],C.mouse[1]),C.extent,a));function V(){C.wheel=null,C.end()}o(V,"wheelidled")}o(I,"wheeled");function T(x,...E){if(h||!e.apply(this,arguments))return;var C=x.currentTarget,M=_(this,E,!0).event(x),R=le(x.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",U,!0),D=fe(x,C),V=x.clientX,B=x.clientY;mt(x.view),Tn(x),M.mouse=[D,this.__zoom.invert(D)],Ve(this),M.start();function L(X){if(rt(X),!M.moved){var K=X.clientX-V,ee=X.clientY-B;M.moved=K*K+ee*ee>S}M.event(X).zoom("mouse",n(m(M.that.__zoom,M.mouse[0]=fe(X,C),M.mouse[1]),M.extent,a))}o(L,"mousemoved");function U(X){R.on("mousemove.zoom mouseup.zoom",null),Xt(X.view,M.moved),rt(X),M.event(X).end()}o(U,"mouseupped")}o(T,"mousedowned");function F(x,...E){if(e.apply(this,arguments)){var C=this.__zoom,M=fe(x.changedTouches?x.changedTouches[0]:x,this),R=C.invert(M),D=C.k*(x.shiftKey?.5:2),V=n(m(v(C,D),M,R),t.apply(this,E),a);rt(x),c>0?le(this).transition().duration(c).call(N,V,M,x):le(this).call(y.transform,V,M,x)}}o(F,"dblclicked");function z(x,...E){if(e.apply(this,arguments)){var C=x.touches,M=C.length,R=_(this,E,x.changedTouches.length===M).event(x),D,V,B,L;for(Tn(x),V=0;V<M;++V)B=C[V],L=fe(B,this),L=[L,this.__zoom.invert(L),B.identifier],R.touch0?!R.touch1&&R.touch0[2]!==L[2]&&(R.touch1=L,R.taps=0):(R.touch0=L,D=!0,R.taps=1+!!d);d&&(d=clearTimeout(d)),D&&(R.taps<2&&(f=L[0],d=setTimeout(function(){d=null},g)),Ve(this),R.start())}}o(z,"touchstarted");function H(x,...E){if(this.__zooming){var C=_(this,E).event(x),M=x.changedTouches,R=M.length,D,V,B,L;for(rt(x),D=0;D<R;++D)V=M[D],B=fe(V,this),C.touch0&&C.touch0[2]===V.identifier?C.touch0[0]=B:C.touch1&&C.touch1[2]===V.identifier&&(C.touch1[0]=B);if(V=C.that.__zoom,C.touch1){var U=C.touch0[0],X=C.touch0[1],K=C.touch1[0],ee=C.touch1[1],G=(G=K[0]-U[0])*G+(G=K[1]-U[1])*G,$=($=ee[0]-X[0])*$+($=ee[1]-X[1])*$;V=v(V,Math.sqrt(G/$)),B=[(U[0]+K[0])/2,(U[1]+K[1])/2],L=[(X[0]+ee[0])/2,(X[1]+ee[1])/2]}else if(C.touch0)B=C.touch0[0],L=C.touch0[1];else return;C.zoom("touch",n(m(V,B,L),C.extent,a))}}o(H,"touchmoved");function O(x,...E){if(this.__zooming){var C=_(this,E).event(x),M=x.changedTouches,R=M.length,D,V;for(Tn(x),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),D=0;D<R;++D)V=M[D],C.touch0&&C.touch0[2]===V.identifier?delete C.touch0:C.touch1&&C.touch1[2]===V.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(V=fe(V,this),Math.hypot(f[0]-V[0],f[1]-V[1])<b)){var B=le(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return o(O,"touchended"),y.wheelDelta=function(x){return arguments.length?(r=typeof x=="function"?x:rn(+x),y):r},y.filter=function(x){return arguments.length?(e=typeof x=="function"?x:rn(!!x),y):e},y.touchable=function(x){return arguments.length?(i=typeof x=="function"?x:rn(!!x),y):i},y.extent=function(x){return arguments.length?(t=typeof x=="function"?x:rn([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),y):t},y.scaleExtent=function(x){return arguments.length?(s[0]=+x[0],s[1]=+x[1],y):[s[0],s[1]]},y.translateExtent=function(x){return arguments.length?(a[0][0]=+x[0][0],a[1][0]=+x[1][0],a[0][1]=+x[0][1],a[1][1]=+x[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(x){return arguments.length?(n=x,y):n},y.duration=function(x){return arguments.length?(c=+x,y):c},y.interpolate=function(x){return arguments.length?(l=x,y):l},y.on=function(){var x=u.on.apply(u,arguments);return x===u?y:x},y.clickDistance=function(x){return arguments.length?(S=(x=+x)*x,y):Math.sqrt(S)},y.tapDistance=function(x){return arguments.length?(b=+x,y):b},y}o(an,"default");var ye={error001:o((e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,"error001"),error002:o(()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.","error002"),error003:o(e=>`Node type "${e}" not found. Using fallback type "default".`,"error003"),error004:o(()=>"The parent container needs a width and a height to render the graph.","error004"),error005:o(()=>"Only child nodes can use a parent extent.","error005"),error006:o(()=>"Can't create edge. An edge needs a source and a target.","error006"),error007:o(e=>`The old edge with id=${e} does not exist.`,"error007"),error009:o(e=>`Marker type "${e}" doesn't exist.`,"error009"),error008:o((e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,"error008"),error010:o(()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.","error010"),error011:o(e=>`Edge type "${e}" not found. Using fallback type "default".`,"error011"),error012:o(e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,"error012"),error013:o((e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,"error013"),error014:o(()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.","error014"),error015:o(()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.","error015"),error016:o(e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`,"error016")},Et=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Pr=["Enter"," ","Escape"],kr={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":o(({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"node.a11yDescription.ariaLiveMessage"),"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},Xe;(function(e){e.Strict="strict",e.Loose="loose"})(Xe||(Xe={}));var $e;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($e||($e={}));var it;(function(e){e.Partial="partial",e.Full="full"})(it||(it={}));var Ar={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Ie;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ie||(Ie={}));var St;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(St||(St={}));var Y;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Y||(Y={}));var Ki={[Y.Left]:Y.Right,[Y.Right]:Y.Left,[Y.Top]:Y.Bottom,[Y.Bottom]:Y.Top};function Tr(e){return e===null?null:e?"valid":"invalid"}o(Tr,"getConnectionStatus");var Dr=o(e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,"isEdgeBase"),cs=o(e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),"isNodeBase"),Rr=o(e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),"isInternalNodeBase");var ln=o((e,t=[0,0])=>{let{width:n,height:r}=Ee(e),i=e.origin??t,s=n*i[0],a=r*i[1];return{x:e.position.x-s,y:e.position.y-a}},"getNodePositionWithOrigin"),un=o((e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((r,i)=>{let s=typeof i=="string",a=!t.nodeLookup&&!s?i:void 0;t.nodeLookup&&(a=s?t.nodeLookup.get(i):Rr(i)?i:t.nodeLookup.get(i.id));let c=a?zn(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ln(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Hn(n)},"getNodesBounds"),Ct=o((e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Ln(n,zn(i)),r=!0)}),r?Hn(n):{x:0,y:0,width:0,height:0}},"getInternalNodesBounds"),On=o((e,t,[n,r,i]=[0,0,1],s=!1,a=!1)=>{let c=(t.x-n)/i,l=(t.y-r)/i,u=t.width/i,d=t.height/i,f=[];for(let h of e.values()){let{measured:g,selectable:p=!0,hidden:S=!1}=h;if(a&&!p||S)continue;let b=g.width??h.width??h.initialWidth??0,y=g.height??h.height??h.initialHeight??0,{x:v,y:m}=h.internals.positionAbsolute,w=hs(c,l,u,d,v,m,b,y),N=b*y,_=s&&w>0;(!h.internals.handleBounds||_||w>=N||h.dragging)&&f.push(h)}return f},"getNodesInside"),ls=o((e,t)=>{let n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))},"getConnectedEdges");function Ld(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{let s;if(t?.includeHiddenNodes){let{width:a,height:c}=Ee(i);s=a>0&&c>0}else s=!!(i.measured.width&&i.measured.height&&!i.hidden);s&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}o(Ld,"getFitViewNodes");async function us({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:s},a){if(e.size===0)return!0;let c=Ld(e,a),l=Ct(c),u=lt(l,t,n,a?.minZoom??i,a?.maxZoom??s,a?.padding??.1);return await r.setViewport(u,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),!0}o(us,"fitViewport");function zr({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:s}){let a=n.get(e),c=a.parentId?n.get(a.parentId):void 0,{x:l,y:u}=c?c.internals.positionAbsolute:{x:0,y:0},d=a.origin??r,f=a.extent||i;if(a.extent==="parent"&&!a.expandParent)if(!c)s?.("005",ye.error005());else{let g=c.measured.width,p=c.measured.height;g&&p&&(f=[[l,u],[l+g,u+p]])}else c&&ct(a.extent)&&(f=[[a.extent[0][0]+l,a.extent[0][1]+u],[a.extent[1][0]+l,a.extent[1][1]+u]]);let h=ct(f)?st(t,f,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&s?.("015",ye.error015()),{position:{x:h.x-l+(a.measured.width??0)*d[0],y:h.y-u+(a.measured.height??0)*d[1]},positionAbsolute:h}}o(zr,"calculateNodePosition");async function ds({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let s=new Set(e.map(h=>h.id)),a=[];for(let h of n){if(h.deletable===!1)continue;let g=s.has(h.id),p=!g&&h.parentId&&a.find(S=>S.id===h.parentId);(g||p)&&a.push(h)}let c=new Set(t.map(h=>h.id)),l=r.filter(h=>h.deletable!==!1),d=ls(a,l);for(let h of l)c.has(h.id)&&!d.find(p=>p.id===h.id)&&d.push(h);if(!i)return{edges:d,nodes:a};let f=await i({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}o(ds,"getElementsToRemove");var vt=o((e,t=0,n=1)=>Math.min(Math.max(e,t),n),"clamp"),st=o((e={x:0,y:0},t,n)=>({x:vt(e.x,t[0][0],t[1][0]-(n?.width??0)),y:vt(e.y,t[0][1],t[1][1]-(n?.height??0))}),"clampPosition");function fs(e,t,n){let{width:r,height:i}=Ee(n),{x:s,y:a}=n.internals.positionAbsolute;return st(e,[[s,a],[s+r,a+i]],t)}o(fs,"clampPositionToParent");var Gi=o((e,t,n)=>e<t?vt(Math.abs(e-t),1,t)/t:e>n?-vt(Math.abs(e-n),1,t)/t:0,"calcAutoPanVelocity"),$n=o((e,t,n=15,r=40)=>{let i=Gi(e.x,r,t.width-r)*n,s=Gi(e.y,r,t.height-r)*n;return[i,s]},"calcAutoPan"),Ln=o((e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),"getBoundsOfBoxes"),Ir=o(({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),"rectToBox"),Hn=o(({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),"boxToRect"),_t=o((e,t=[0,0])=>{let{x:n,y:r}=Rr(e)?e.internals.positionAbsolute:ln(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},"nodeToRect"),zn=o((e,t=[0,0])=>{let{x:n,y:r}=Rr(e)?e.internals.positionAbsolute:ln(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},"nodeToBox"),Or=o((e,t)=>Hn(Ln(Ir(e),Ir(t))),"getBoundsOfRects"),hs=o((e,t,n,r,i,s,a,c)=>{let l=Math.max(0,Math.min(e+n,i+a)-Math.max(e,i)),u=Math.max(0,Math.min(t+r,s+c)-Math.max(t,s));return Math.ceil(l*u)},"getRectsOverlappingArea"),dn=o((e,t)=>hs(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),"getOverlappingArea"),$r=o(e=>we(e.width)&&we(e.height)&&we(e.x)&&we(e.y),"isRectObject"),we=o(e=>!isNaN(e)&&isFinite(e),"isNumeric"),Lr=o((e,t)=>(n,r)=>{},"createDevWarn"),Nt=o((e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),"snapPosition"),Mt=o(({x:e,y:t},[n,r,i],s=!1,a=[1,1])=>{let c={x:(e-n)/i,y:(t-r)/i};return s?Nt(c,a):c},"pointToRendererPoint"),at=o(({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),"rendererPointToPoint");function wt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}o(wt,"parsePadding");function Hd(e,t,n){if(typeof e=="string"||typeof e=="number"){let r=wt(e,n),i=wt(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){let r=wt(e.top??e.y??0,n),i=wt(e.bottom??e.y??0,n),s=wt(e.left??e.x??0,t),a=wt(e.right??e.x??0,t);return{top:r,right:a,bottom:i,left:s,x:s+a,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}o(Hd,"parsePaddings");function Bd(e,t,n,r,i,s){let{x:a,y:c}=at(e,[t,n,r]),{x:l,y:u}=at({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-l,f=s-u;return{left:Math.floor(a),top:Math.floor(c),right:Math.floor(d),bottom:Math.floor(f)}}o(Bd,"calculateAppliedPaddings");var lt=o((e,t,n,r,i,s)=>{let a=Hd(s,t,n),c=(t-a.x)/e.width,l=(n-a.y)/e.height,u=Math.min(c,l),d=vt(u,r,i),f=e.x+e.width/2,h=e.y+e.height/2,g=t/2-f*d,p=n/2-h*d,S=Bd(e,g,p,d,t,n),b={left:Math.min(S.left-a.left,0),top:Math.min(S.top-a.top,0),right:Math.min(S.right-a.right,0),bottom:Math.min(S.bottom-a.bottom,0)};return{x:g-b.left+b.right,y:p-b.top+b.bottom,zoom:d}},"getViewportForBounds"),It=o(()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,"isMacOs");function ct(e){return e!=null&&e!=="parent"}o(ct,"isCoordinateExtent");function Ee(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}o(Ee,"getNodeDimensions");function Bn(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}o(Bn,"nodeHasDimensions");function Hr(e,t={width:0,height:0},n,r,i){let s={...e},a=r.get(n);if(a){let c=a.origin||i;s.x+=a.internals.positionAbsolute.x-(t.width??0)*c[0],s.y+=a.internals.positionAbsolute.y-(t.height??0)*c[1]}return s}o(Hr,"evaluateAbsolutePosition");function Br(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}o(Br,"areSetsEqual");function ps(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}o(ps,"withResolvers");function gs(e){return{...kr,...e||{}}}o(gs,"mergeAriaLabelConfig");function cn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:s,y:a}=be(e),c=Mt({x:s-(i?.left??0),y:a-(i?.top??0)},r),{x:l,y:u}=n?Nt(c,t):c;return{xSnapped:l,ySnapped:u,...c}}o(cn,"getPointerPosition");var Vn=o(e=>({width:e.offsetWidth,height:e.offsetHeight}),"getDimensions"),Vr=o(e=>e?.getRootNode?.()||window?.document,"getHostForElement"),Vd=["INPUT","SELECT","TEXTAREA"];function Fr(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Vd.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}o(Fr,"isInputDOMNode");var Wr=o(e=>"clientX"in e,"isMouseEvent"),be=o((e,t)=>{let n=Wr(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},"getEventPosition"),Qi=o((e,t,n,r,i)=>{let s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{let c=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:i,position:a.getAttribute("data-handlepos"),x:(c.left-n.left)/r,y:(c.top-n.top)/r,...Vn(a)}})},"getHandleBounds");function Fn({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:c}){let l=e*.125+i*.375+a*.375+n*.125,u=t*.125+s*.375+c*.375+r*.125,d=Math.abs(l-e),f=Math.abs(u-t);return[l,u,d,f]}o(Fn,"getBezierEdgeCenter");function Dn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}o(Dn,"calculateControlOffset");function Ji({pos:e,x1:t,y1:n,x2:r,y2:i,c:s}){switch(e){case Y.Left:return[t-Dn(t-r,s),n];case Y.Right:return[t+Dn(r-t,s),n];case Y.Top:return[t,n-Dn(n-i,s)];case Y.Bottom:return[t,n+Dn(i-n,s)]}}o(Ji,"getControlWithCurvature");function Wn({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:s=Y.Top,curvature:a=.25}){let[c,l]=Ji({pos:n,x1:e,y1:t,x2:r,y2:i,c:a}),[u,d]=Ji({pos:s,x1:r,y1:i,x2:e,y2:t,c:a}),[f,h,g,p]=Fn({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:c,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${c},${l} ${u},${d} ${r},${i}`,f,h,g,p]}o(Wn,"getBezierPath");function Xr({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,s=n<e?n+i:n-i,a=Math.abs(r-t)/2,c=r<t?r+a:r-a;return[s,c,i,a]}o(Xr,"getEdgeCenter");function ms({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return r;let a=i&&n?r+1e3:r,c=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return a+c}o(ms,"getElevatedEdgeZIndex");function ys({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let s=Ln(zn(e),zn(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);let a={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return dn(a,Hn(s))>0}o(ys,"isEdgeVisible");var Fd=o(({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,"getEdgeId"),Wd=o((e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),"connectionExists"),xs=o((e,t,n={})=>{if(!e.source||!e.target)return n.onError?.("006",ye.error006()),t;let r=n.getEdgeId||Fd,i;return Dr(e)?i={...e}:i={...e,id:r(e)},Wd(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))},"addEdge");function Xn({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,s,a,c]=Xr({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,s,a,c]}o(Xn,"getStraightPath");var ji={[Y.Left]:{x:-1,y:0},[Y.Right]:{x:1,y:0},[Y.Top]:{x:0,y:-1},[Y.Bottom]:{x:0,y:1}},Xd=o(({source:e,sourcePosition:t=Y.Bottom,target:n})=>t===Y.Left||t===Y.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},"getDirection"),es=o((e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),"distance");function Yd({source:e,sourcePosition:t=Y.Bottom,target:n,targetPosition:r=Y.Top,center:i,offset:s,stepPosition:a}){let c=ji[t],l=ji[r],u={x:e.x+c.x*s,y:e.y+c.y*s},d={x:n.x+l.x*s,y:n.y+l.y*s},f=Xd({source:u,sourcePosition:t,target:d}),h=f.x!==0?"x":"y",g=f[h],p=[],S,b,y={x:0,y:0},v={x:0,y:0},[,,m,w]=Xr({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[h]*l[h]===-1){h==="x"?(S=i.x??u.x+(d.x-u.x)*a,b=i.y??(u.y+d.y)/2):(S=i.x??(u.x+d.x)/2,b=i.y??u.y+(d.y-u.y)*a);let I=[{x:S,y:u.y},{x:S,y:d.y}],T=[{x:u.x,y:b},{x:d.x,y:b}];c[h]===g?p=h==="x"?I:T:p=h==="x"?T:I}else{let I=[{x:u.x,y:d.y}],T=[{x:d.x,y:u.y}];if(h==="x"?p=c.x===g?T:I:p=c.y===g?I:T,t===r){let x=Math.abs(e[h]-n[h]);if(x<=s){let E=Math.min(s-1,s-x);c[h]===g?y[h]=(u[h]>e[h]?-1:1)*E:v[h]=(d[h]>n[h]?-1:1)*E}}if(t!==r){let x=h==="x"?"y":"x",E=c[h]===l[x],C=u[x]>d[x],M=u[x]<d[x];(c[h]===1&&(!E&&C||E&&M)||c[h]!==1&&(!E&&M||E&&C))&&(p=h==="x"?I:T)}let F={x:u.x+y.x,y:u.y+y.y},z={x:d.x+v.x,y:d.y+v.y},H=Math.max(Math.abs(F.x-p[0].x),Math.abs(z.x-p[0].x)),O=Math.max(Math.abs(F.y-p[0].y),Math.abs(z.y-p[0].y));H>=O?(S=(F.x+z.x)/2,b=p[0].y):(S=p[0].x,b=(F.y+z.y)/2)}let N={x:u.x+y.x,y:u.y+y.y},_={x:d.x+v.x,y:d.y+v.y};return[[e,...N.x!==p[0].x||N.y!==p[0].y?[N]:[],...p,..._.x!==p[p.length-1].x||_.y!==p[p.length-1].y?[_]:[],n],S,b,m,w]}o(Yd,"getPoints");function Zd(e,t,n,r){let i=Math.min(es(e,t)/2,es(t,n)/2,r),{x:s,y:a}=t;if(e.x===s&&s===n.x||e.y===a&&a===n.y)return`L${s} ${a}`;if(e.y===a){let u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*d}`}let c=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${s},${a+i*l}Q ${s},${a} ${s+i*c},${a}`}o(Zd,"getBend");function fn({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:s=Y.Top,borderRadius:a=5,centerX:c,centerY:l,offset:u=20,stepPosition:d=.5}){let[f,h,g,p,S]=Yd({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:s,center:{x:c,y:l},offset:u,stepPosition:d}),b=`M${f[0].x} ${f[0].y}`;for(let y=1;y<f.length-1;y++)b+=Zd(f[y-1],f[y],f[y+1],a);return b+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[b,h,g,p,S]}o(fn,"getSmoothStepPath");function ts(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}o(ts,"isNodeInitialized");function ws(e){let{sourceNode:t,targetNode:n}=e;if(!ts(t)||!ts(n))return null;let r=t.internals.handleBounds||ns(t.handles),i=n.internals.handleBounds||ns(n.handles),s=os(r?.source??[],e.sourceHandle),a=os(e.connectionMode===Xe.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!s||!a)return e.onError?.("008",ye.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let c=s?.position||Y.Bottom,l=a?.position||Y.Top,u=Ye(t,s,c),d=Ye(n,a,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:c,targetPosition:l}}o(ws,"getEdgePosition");function ns(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}o(ns,"toHandleBounds");function Ye(e,t,n=Y.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,s=(t?.y??0)+e.internals.positionAbsolute.y,{width:a,height:c}=t??Ee(e);if(r)return{x:i+a/2,y:s+c/2};switch(t?.position??n){case Y.Top:return{x:i+a/2,y:s};case Y.Right:return{x:i+a,y:s+c/2};case Y.Bottom:return{x:i+a/2,y:s+c};case Y.Left:return{x:i,y:s+c/2}}}o(Ye,"getHandlePosition");function os(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}o(os,"getHandle$1");function Yn(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}o(Yn,"getMarkerId");function bs(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let s=new Set;return e.reduce((a,c)=>([c.markerStart||r,c.markerEnd||i].forEach(l=>{if(l&&typeof l=="object"){let u=Yn(l,t);s.has(u)||(a.push({id:u,color:l.color||n,...l}),s.add(u))}}),a),[]).sort((a,c)=>a.id.localeCompare(c.id))}o(bs,"createMarkerIds");var Ss=1e3,Ud=10,Yr={nodeOrigin:[0,0],nodeExtent:Et,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},qd={...Yr,checkEquality:!0};function Zr(e,t){let n={...e};for(let r in t)t[r]!==void 0&&(n[r]=t[r]);return n}o(Zr,"mergeObjects");function vs(e,t,n){let r=Zr(Yr,n);for(let i of e.values())if(i.parentId)qr(i,e,t,r);else{let s=ln(i,r.nodeOrigin),a=ct(i.extent)?i.extent:r.nodeExtent,c=st(s,a,Ee(i));i.internals.positionAbsolute=c}}o(vs,"updateAbsolutePositions");function Kd(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let i of e.handles){let s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(s):i.type==="target"&&r.push(s)}return{source:n,target:r}}o(Kd,"parseHandles");function Ur(e){return e==="manual"}o(Ur,"isManualZIndexMode");function Zn(e,t,n,r={}){let i=Zr(qd,r),s={i:0},a=new Map(t),c=i?.elevateNodesOnSelect&&!Ur(i.zIndexMode)?Ss:0,l=e.length>0,u=!1;t.clear(),n.clear();for(let d of e){let f=a.get(d.id);if(i.checkEquality&&d===f?.internals.userNode)t.set(d.id,f);else{let h=ln(d,i.nodeOrigin),g=ct(d.extent)?d.extent:i.nodeExtent,p=st(h,g,Ee(d));f={...i.defaults,...d,measured:{width:d.measured?.width,height:d.measured?.height},internals:{positionAbsolute:p,handleBounds:Kd(d,f),z:Es(d,c,i.zIndexMode),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(l=!1),d.parentId&&qr(f,t,n,r,s),u||=d.selected??!1}return{nodesInitialized:l,hasSelectedNodes:u}}o(Zn,"adoptUserNodes");function Gd(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}o(Gd,"updateParentLookup");function qr(e,t,n,r,i){let{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:c,zIndexMode:l}=Zr(Yr,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Gd(e,n),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&l==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*Ud),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);let f=s&&!Ur(l)?Ss:0,{x:h,y:g,z:p}=Qd(e,d,a,c,f,l),{positionAbsolute:S}=e.internals,b=h!==S.x||g!==S.y;(b||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:h,y:g}:S,z:p}})}o(qr,"updateChildNode");function Es(e,t,n){let r=we(e.zIndex)?e.zIndex:0;return Ur(n)?r:r+(e.selected?t:0)}o(Es,"calculateZ");function Qd(e,t,n,r,i,s){let{x:a,y:c}=t.internals.positionAbsolute,l=Ee(e),u=ln(e,n),d=ct(e.extent)?st(u,e.extent,l):u,f=st({x:a+d.x,y:c+d.y},r,l);e.extent==="parent"&&(f=fs(f,l,t));let h=Es(e,i,s),g=t.internals.z??0;return{x:f.x,y:f.y,z:g>=h?g+1:h}}o(Qd,"calculateChildXYZ");function Un(e,t,n,r=[0,0]){let i=[],s=new Map;for(let a of e){let c=t.get(a.parentId);if(!c)continue;let l=s.get(a.parentId)?.expandedRect??_t(c),u=Or(l,a.rect);s.set(a.parentId,{expandedRect:u,parent:c})}return s.size>0&&s.forEach(({expandedRect:a,parent:c},l)=>{let u=c.internals.positionAbsolute,d=Ee(c),f=c.origin??r,h=a.x<u.x?Math.round(Math.abs(u.x-a.x)):0,g=a.y<u.y?Math.round(Math.abs(u.y-a.y)):0,p=Math.max(d.width,Math.round(a.width)),S=Math.max(d.height,Math.round(a.height)),b=(p-d.width)*f[0],y=(S-d.height)*f[1];(h>0||g>0||b||y)&&(i.push({id:l,type:"position",position:{x:c.position.x-h+b,y:c.position.y-g+y}}),n.get(l)?.forEach(v=>{e.some(m=>m.id===v.id)||i.push({id:v.id,type:"position",position:{x:v.position.x+h,y:v.position.y+g}})})),(d.width<a.width||d.height<a.height||h||g)&&i.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:p+(h?f[0]*h-b:0),height:S+(g?f[1]*g-y:0)}})}),i}o(Un,"handleExpandParent");function Cs(e,t,n,r,i,s,a){let c=r?.querySelector(".xyflow__viewport"),l=!1;if(!c)return{changes:[],updatedInternals:l};let u=[],d=window.getComputedStyle(c),{m22:f}=new window.DOMMatrixReadOnly(d.transform),h=[];for(let g of e.values()){let p=t.get(g.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}let S=Vn(g.nodeElement),b=p.measured.width!==S.width||p.measured.height!==S.height;if(!!(S.width&&S.height&&(b||!p.internals.handleBounds||g.force))){let v=g.nodeElement.getBoundingClientRect(),m=ct(p.extent)?p.extent:s,{positionAbsolute:w}=p.internals;if(p.parentId&&p.extent==="parent"){let _=t.get(p.parentId);_&&(w=fs(w,S,_))}else m&&(w=st(w,m,S));let N={...p,measured:S,internals:{...p.internals,positionAbsolute:w,handleBounds:{source:Qi("source",g.nodeElement,v,f,p.id),target:Qi("target",g.nodeElement,v,f,p.id)}}};t.set(p.id,N),p.parentId&&qr(N,t,n,{nodeOrigin:i,zIndexMode:a}),l=!0,b&&(u.push({id:p.id,type:"dimensions",dimensions:S}),p.expandParent&&p.parentId&&h.push({id:p.id,parentId:p.parentId,rect:_t(N,i)}))}}if(h.length>0){let g=Un(h,t,n,i);u.push(...g)}return{changes:u,updatedInternals:l}}o(Cs,"updateNodeInternals");async function _s({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:s}){if(!t||!e.x&&!e.y)return!1;let a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,s]],r);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}o(_s,"panBy");function rs(e,t,n,r,i,s){let a=i,c=r.get(a)||new Map;r.set(a,c.set(n,t)),a=`${i}-${e}`;let l=r.get(a)||new Map;if(r.set(a,l.set(n,t)),s){a=`${i}-${e}-${s}`;let u=r.get(a)||new Map;r.set(a,u.set(n,t))}}o(rs,"addConnectionToLookup");function Kr(e,t,n){e.clear(),t.clear();for(let r of n){let{source:i,target:s,sourceHandle:a=null,targetHandle:c=null}=r,l={edgeId:r.id,source:i,target:s,sourceHandle:a,targetHandle:c},u=`${i}-${a}--${s}-${c}`,d=`${s}-${c}--${i}-${a}`;rs("source",l,d,e,i,a),rs("target",l,u,e,s,c),t.set(r.id,r)}}o(Kr,"updateConnectionLookup");function Ns(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Ns(n,t):!1}o(Ns,"isParentSelected");function is(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}o(is,"hasSelector");function Jd(e,t,n,r){let i=new Map;for(let[s,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!Ns(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){let c=e.get(s);c&&i.set(s,{id:s,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return i}o(Jd,"getDragItems");function _r({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[a,c]of t){let l=n.get(a)?.internals.userNode;l&&i.push({...l,position:c.position,dragging:r})}if(!e)return[i[0],i];let s=n.get(e)?.internals.userNode;return[s?{...s,position:t.get(e)?.position||s.position,dragging:r}:i[0],i]}o(_r,"getEventHandlerParams");function jd({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let s={x:n-i.distance.x,y:r-i.distance.y},a=Nt(s,t);return{x:a.x-s.x,y:a.y-s.y}}o(jd,"calculateSnapOffset");function Ms({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let s={x:null,y:null},a=0,c=new Map,l=!1,u={x:0,y:0},d=null,f=!1,h=null,g=!1,p=!1,S=null;function b({noDragClassName:v,handleSelector:m,domNode:w,isSelectable:N,nodeId:_,nodeClickDistance:P=0}){h=le(w);function I({x:H,y:O}){let{nodeLookup:x,nodeExtent:E,snapGrid:C,snapToGrid:M,nodeOrigin:R,onNodeDrag:D,onSelectionDrag:V,onError:B,updateNodePositions:L}=t();s={x:H,y:O};let U=!1,X=c.size>1,K=X&&E?Ir(Ct(c)):null,ee=X&&M?jd({dragItems:c,snapGrid:C,x:H,y:O}):null;for(let[G,$]of c){if(!x.has(G))continue;let W={x:H-$.distance.x,y:O-$.distance.y};M&&(W=ee?{x:Math.round(W.x+ee.x),y:Math.round(W.y+ee.y)}:Nt(W,C));let j=null;if(X&&E&&!$.extent&&K){let{positionAbsolute:Q}=$.internals,ne=Q.x-K.x+E[0][0],oe=Q.x+$.measured.width-K.x2+E[1][0],se=Q.y-K.y+E[0][1],pe=Q.y+$.measured.height-K.y2+E[1][1];j=[[ne,se],[oe,pe]]}let{position:J,positionAbsolute:q}=zr({nodeId:G,nextPosition:W,nodeLookup:x,nodeExtent:j||E,nodeOrigin:R,onError:B});U=U||$.position.x!==J.x||$.position.y!==J.y,$.position=J,$.internals.positionAbsolute=q}if(p=p||U,!!U&&(L(c,!0),S&&(r||D||!_&&V))){let[G,$]=_r({nodeId:_,dragItems:c,nodeLookup:x});r?.(S,c,G,$),D?.(S,G,$),_||V?.(S,$)}}o(I,"updateNodes");async function T(){if(!d)return;let{transform:H,panBy:O,autoPanSpeed:x,autoPanOnNodeDrag:E}=t();if(!E){l=!1,cancelAnimationFrame(a);return}let[C,M]=$n(u,d,x);(C!==0||M!==0)&&(s.x=(s.x??0)-C/H[2],s.y=(s.y??0)-M/H[2],await O({x:C,y:M})&&I(s)),a=requestAnimationFrame(T)}o(T,"autoPan");function F(H){let{nodeLookup:O,multiSelectionActive:x,nodesDraggable:E,transform:C,snapGrid:M,snapToGrid:R,selectNodesOnDrag:D,onNodeDragStart:V,onSelectionDragStart:B,unselectNodesAndEdges:L}=t();f=!0,(!D||!N)&&!x&&_&&(O.get(_)?.selected||L()),N&&D&&_&&e?.(_);let U=cn(H.sourceEvent,{transform:C,snapGrid:M,snapToGrid:R,containerBounds:d});if(s=U,c=Jd(O,E,U,_),c.size>0&&(n||V||!_&&B)){let[X,K]=_r({nodeId:_,dragItems:c,nodeLookup:O});n?.(H.sourceEvent,c,X,K),V?.(H.sourceEvent,X,K),_||B?.(H.sourceEvent,K)}}o(F,"startDrag");let z=Ut().clickDistance(P).on("start",H=>{let{domNode:O,nodeDragThreshold:x,transform:E,snapGrid:C,snapToGrid:M}=t();d=O?.getBoundingClientRect()||null,g=!1,p=!1,S=H.sourceEvent,x===0&&F(H),s=cn(H.sourceEvent,{transform:E,snapGrid:C,snapToGrid:M,containerBounds:d}),u=be(H.sourceEvent,d)}).on("drag",H=>{let{autoPanOnNodeDrag:O,transform:x,snapGrid:E,snapToGrid:C,nodeDragThreshold:M,nodeLookup:R}=t(),D=cn(H.sourceEvent,{transform:x,snapGrid:E,snapToGrid:C,containerBounds:d});if(S=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||_&&!R.has(_))&&(g=!0),!g){if(!l&&O&&f&&(l=!0,T()),!f){let V=be(H.sourceEvent,d),B=V.x-u.x,L=V.y-u.y;Math.sqrt(B*B+L*L)>M&&F(H)}(s.x!==D.xSnapped||s.y!==D.ySnapped)&&c&&f&&(u=be(H.sourceEvent,d),I(D))}}).on("end",H=>{if(!f||g){g&&c.size>0&&t().updateNodePositions(c,!1);return}if(l=!1,f=!1,cancelAnimationFrame(a),c.size>0){let{nodeLookup:O,updateNodePositions:x,onNodeDragStop:E,onSelectionDragStop:C}=t();if(p&&(x(c,!1),p=!1),i||E||!_&&C){let[M,R]=_r({nodeId:_,dragItems:c,nodeLookup:O,dragging:!1});i?.(H.sourceEvent,c,M,R),E?.(H.sourceEvent,M,R),_||C?.(H.sourceEvent,R)}}}).filter(H=>{let O=H.target;return!H.button&&(!v||!is(O,`.${v}`,w))&&(!m||is(O,m,w))});h.call(z)}o(b,"update");function y(){h?.on(".drag",null)}return o(y,"destroy"),{update:b,destroy:y}}o(Ms,"XYDrag");function ef(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let s of t.values())dn(i,_t(s))>0&&r.push(s);return r}o(ef,"getNodesWithinDistance");var tf=250;function nf(e,t,n,r){let i=[],s=1/0,a=ef(e,n,t+tf);for(let c of a){let l=[...c.internals.handleBounds?.source??[],...c.internals.handleBounds?.target??[]];for(let u of l){if(r.nodeId===u.nodeId&&r.type===u.type&&r.id===u.id)continue;let{x:d,y:f}=Ye(c,u,u.position,!0),h=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(f-e.y,2));h>t||(h<s?(i=[{...u,x:d,y:f}],s=h):h===s&&i.push({...u,x:d,y:f}))}}if(!i.length)return null;if(i.length>1){let c=r.type==="source"?"target":"source";return i.find(l=>l.type===c)??i[0]}return i[0]}o(nf,"getClosestHandle");function Is(e,t,n,r,i,s=!1){let a=r.get(e);if(!a)return null;let c=i==="strict"?a.internals.handleBounds?.[t]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],l=(n?c?.find(u=>u.id===n):c?.[0])??null;return l&&s?{...l,...Ye(a,l,l.position,!0)}:l}o(Is,"getHandle");function Ps(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}o(Ps,"getHandleType");function of(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}o(of,"isConnectionValid");var ks=o(()=>!0,"alwaysValid");function rf(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:c,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:f,panBy:h,cancelConnection:g,onConnectStart:p,onConnect:S,onConnectEnd:b,isValidConnection:y=ks,onReconnectEnd:v,updateConnection:m,getTransform:w,getFromHandle:N,autoPanSpeed:_,dragThreshold:P=1,handleDomNode:I}){let T=Vr(e.target),F=0,z,{x:H,y:O}=be(e),x=Ps(s,I),E=c?.getBoundingClientRect(),C=!1;if(!E||!x)return;let M=Is(i,x,r,l,t);if(!M)return;let R=be(e,E),D=!1,V=null,B=!1,L=null;function U(){if(!d||!E)return;let[J,q]=$n(R,E,_);h({x:J,y:q}),F=requestAnimationFrame(U)}o(U,"autoPan");let X={...M,nodeId:i,type:x,position:M.position},K=l.get(i),G={inProgress:!0,isValid:null,from:Ye(K,X,Y.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:K,to:R,toHandle:null,toPosition:Ki[X.position],toNode:null,pointer:R};function $(){C=!0,m(G),p?.(e,{nodeId:i,handleId:r,handleType:x})}o($,"startConnection"),P===0&&$();function W(J){if(!C){let{x:pe,y:Pe}=be(J),_e=pe-H,Ne=Pe-O;if(!(_e*_e+Ne*Ne>P*P))return;$()}if(!N()||!X){j(J);return}let q=w();R=be(J,E),z=nf(Mt(R,q,!1,[1,1]),n,l,X),D||(U(),D=!0);let Q=As(J,{handle:z,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:a?"target":"source",isValidConnection:y,doc:T,lib:u,flowId:f,nodeLookup:l});L=Q.handleDomNode,V=Q.connection,B=of(!!z,Q.isValid);let ne=l.get(i),oe=ne?Ye(ne,X,Y.Left,!0):G.from,se={...G,from:oe,isValid:B,to:Q.toHandle&&B?at({x:Q.toHandle.x,y:Q.toHandle.y},q):R,toHandle:Q.toHandle,toPosition:B&&Q.toHandle?Q.toHandle.position:Ki[X.position],toNode:Q.toHandle?l.get(Q.toHandle.nodeId):null,pointer:R};m(se),G=se}o(W,"onPointerMove");function j(J){if(!("touches"in J&&J.touches.length>0)){if(C){(z||L)&&V&&B&&S?.(V);let{inProgress:q,...Q}=G,ne={...Q,toPosition:G.toHandle?G.toPosition:null};b?.(J,ne),s&&v?.(J,ne)}g(),cancelAnimationFrame(F),D=!1,B=!1,V=null,L=null,T.removeEventListener("mousemove",W),T.removeEventListener("mouseup",j),T.removeEventListener("touchmove",W),T.removeEventListener("touchend",j)}}o(j,"onPointerUp"),T.addEventListener("mousemove",W),T.addEventListener("mouseup",j),T.addEventListener("touchmove",W),T.addEventListener("touchend",j)}o(rf,"onPointerDown");function As(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:s,doc:a,lib:c,flowId:l,isValidConnection:u=ks,nodeLookup:d}){let f=s==="target",h=t?a.querySelector(`.${c}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:p}=be(e),S=a.elementFromPoint(g,p),b=S?.classList.contains(`${c}-flow__handle`)?S:h,y={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){let v=Ps(void 0,b),m=b.getAttribute("data-nodeid"),w=b.getAttribute("data-handleid"),N=b.classList.contains("connectable"),_=b.classList.contains("connectableend");if(!m||!v)return y;let P={source:f?m:r,sourceHandle:f?w:i,target:f?r:m,targetHandle:f?i:w};y.connection=P;let T=N&&_&&(n===Xe.Strict?f&&v==="source"||!f&&v==="target":m!==r||w!==i);y.isValid=T&&u(P),y.toHandle=Is(m,v,w,d,n,!0)}return y}o(As,"isValidHandle");var qn={onPointerDown:rf,isValid:As};function Ts({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=le(e);function s({translateExtent:c,width:l,height:u,zoomStep:d=1,pannable:f=!0,zoomable:h=!0,inversePan:g=!1}){let p=o(m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let w=n(),N=m.sourceEvent.ctrlKey&&It()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*d,P=w[2]*Math.pow(2,_*N);t.scaleTo(P)},"zoomHandler"),S=[0,0],b=o(m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(S=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},"panStartHandler"),y=o(m=>{let w=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let N=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[N[0]-S[0],N[1]-S[1]];S=N;let P=r()*Math.max(w[2],Math.log(w[2]))*(g?-1:1),I={x:w[0]-_[0]*P,y:w[1]-_[1]*P},T=[[0,0],[l,u]];t.setViewportConstrained({x:I.x,y:I.y,zoom:w[2]},T,c)},"panHandler"),v=an().on("start",b).on("zoom",f?y:null).on("zoom.wheel",h?p:null);i.call(v,{})}o(s,"update");function a(){i.on("zoom",null)}return o(a,"destroy"),{update:s,destroy:a,pointer:fe}}o(Ts,"XYMinimap");var Kn=o(e=>({x:e.x,y:e.y,zoom:e.k}),"transformToViewport"),Nr=o(({x:e,y:t,zoom:n})=>ot.translate(e,t).scale(n),"viewportToTransform"),bt=o((e,t)=>e.target.closest(`.${t}`),"isWrappedWithClass"),Ds=o((e,t)=>t===2&&Array.isArray(e)&&e.includes(2),"isRightClickPan"),sf=o(e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,"defaultEase"),Mr=o((e,t=0,n=sf,r=()=>{})=>{let i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},"getD3Transition"),Rs=o(e=>{let t=e.ctrlKey&&It()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},"wheelDelta");function af({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(bt(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let f=n.property("__zoom").k||1;if(d.ctrlKey&&a){let b=fe(d),y=Rs(d),v=f*Math.pow(2,y);r.scaleTo(n,v,b,d);return}let h=d.deltaMode===1?20:1,g=i===$e.Vertical?0:d.deltaX*h,p=i===$e.Horizontal?0:d.deltaY*h;!It()&&d.shiftKey&&i!==$e.Vertical&&(g=d.deltaY*h,p=0),r.translateBy(n,-(g/f)*s,-(p/f)*s,{internal:!0});let S=Kn(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?l?.(d,S):(e.isPanScrolling=!0,c?.(d,S)),e.panScrollTimeout=setTimeout(()=>{u?.(d,S),e.isPanScrolling=!1},150)}}o(af,"createPanOnScrollHandler");function cf({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let s=r.type==="wheel",a=!t&&s&&!r.ctrlKey,c=bt(r,e);if(r.ctrlKey&&s&&c&&r.preventDefault(),a||c)return null;r.preventDefault(),n.call(this,r,i)}}o(cf,"createZoomOnScrollHandler");function lf({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=Kn(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,i)}}o(lf,"createPanZoomStartHandler");function uf({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return s=>{e.usedRightMouseButton=!!(n&&Ds(t,e.mouseButton??0)),s.sourceEvent?.sync||r([s.transform.x,s.transform.y,s.transform.k]),i&&!s.sourceEvent?.internal&&i?.(s.sourceEvent,Kn(s.transform))}}o(uf,"createPanZoomHandler");function df({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:s}){return a=>{if(!a.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,s&&Ds(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let c=Kn(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(a.sourceEvent,c)},n?150:0)}}}o(df,"createPanZoomEndHandler");function ff({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let h=e||t,g=n&&f.ctrlKey,p=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(bt(f,`${u}-flow__node`)||bt(f,`${u}-flow__edge`)))return!0;if(!r&&!h&&!i&&!s&&!n||a||d&&!p||bt(f,c)&&p||bt(f,l)&&(!p||i&&p&&!e)||!n&&f.ctrlKey&&p)return!1;if(!n&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!h&&!i&&!g&&p||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;let S=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||p)&&S}}o(ff,"createFilter");function zs({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:l}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=[[0,0],[d.width,d.height]];(typeof ResizeObserver<"u"?new ResizeObserver(O=>{let x=O[0];x&&(f=[[0,0],[x.contentRect.width,x.contentRect.height]])}):null)?.observe(e);let g=an().extent(()=>f).scaleExtent([t,n]).translateExtent(r),p=le(e).call(g);w({x:i.x,y:i.y,zoom:vt(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);let S=p.on("wheel.zoom"),b=p.on("dblclick.zoom");g.wheelDelta(Rs);async function y(O,x){return p?new Promise(E=>{g?.interpolate(x?.interpolate==="linear"?yn:ht).transform(Mr(p,x?.duration,x?.ease,()=>E(!0)),O)}):!1}o(y,"setTransform");function v({noWheelClassName:O,noPanClassName:x,onPaneContextMenu:E,userSelectionActive:C,panOnScroll:M,panOnDrag:R,panOnScrollMode:D,panOnScrollSpeed:V,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:U,zoomOnDoubleClick:X,zoomActivationKeyPressed:K,lib:ee,onTransformChange:G,connectionInProgress:$,paneClickDistance:W,selectionOnDrag:j}){C&&!u.isZoomingOrPanning&&m();let J=M&&!K&&!C;g.clickDistance(j?1/0:!we(W)||W<0?0:W);let q=J?af({zoomPanValues:u,noWheelClassName:O,d3Selection:p,d3Zoom:g,panOnScrollMode:D,panOnScrollSpeed:V,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:c}):cf({noWheelClassName:O,preventScrolling:B,d3ZoomHandler:S});p.on("wheel.zoom",q,{passive:!1});let Q=lf({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:a});g.on("start",Q);let ne=uf({zoomPanValues:u,panOnDrag:R,onPaneContextMenu:!!E,onPanZoom:s,onTransformChange:G});g.on("zoom",ne);let oe=df({zoomPanValues:u,panOnDrag:R,panOnScroll:M,onPaneContextMenu:E,onPanZoomEnd:c,onDraggingChange:l});g.on("end",oe);let se=ff({zoomActivationKeyPressed:K,panOnDrag:R,zoomOnScroll:U,panOnScroll:M,zoomOnDoubleClick:X,zoomOnPinch:L,userSelectionActive:C,noPanClassName:x,noWheelClassName:O,lib:ee,connectionInProgress:$});g.filter(se),X?p.on("dblclick.zoom",b):p.on("dblclick.zoom",null)}o(v,"update");function m(){g.on("zoom",null)}o(m,"destroy");async function w(O,x,E){let C=Nr(O),M=g?.constrain()(C,x,E);return M&&await y(M),M}o(w,"setViewportConstrained");async function N(O,x){let E=Nr(O);return await y(E,x),E}o(N,"setViewport");function _(O){if(p){let x=Nr(O),E=p.property("__zoom");(E.k!==O.zoom||E.x!==O.x||E.y!==O.y)&&g?.transform(p,x,null,{sync:!0})}}o(_,"syncViewport");function P(){let O=p?sn(p.node()):{x:0,y:0,k:1};return{x:O.x,y:O.y,zoom:O.k}}o(P,"getViewport");async function I(O,x){return p?new Promise(E=>{g?.interpolate(x?.interpolate==="linear"?yn:ht).scaleTo(Mr(p,x?.duration,x?.ease,()=>E(!0)),O)}):!1}o(I,"scaleTo");async function T(O,x){return p?new Promise(E=>{g?.interpolate(x?.interpolate==="linear"?yn:ht).scaleBy(Mr(p,x?.duration,x?.ease,()=>E(!0)),O)}):!1}o(T,"scaleBy");function F(O){g?.scaleExtent(O)}o(F,"setScaleExtent");function z(O){g?.translateExtent(O)}o(z,"setTranslateExtent");function H(O){let x=!we(O)||O<0?0:O;g?.clickDistance(x)}return o(H,"setClickDistance"),{update:v,destroy:m,setViewport:N,setViewportConstrained:w,getViewport:P,scaleTo:I,scaleBy:T,setScaleExtent:F,setTranslateExtent:z,syncViewport:_,setClickDistance:H}}o(zs,"XYPanZoom");var Ze;(function(e){e.Line="line",e.Handle="handle"})(Ze||(Ze={}));function hf({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:s}){let a=e-t,c=n-r,l=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&i&&(l[0]=l[0]*-1),c&&s&&(l[1]=l[1]*-1),l}o(hf,"getResizeDirection");function ss(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}o(ss,"getControlDirection");function Fe(e,t){return Math.max(0,t-e)}o(Fe,"getLowerExtentClamp");function We(e,t){return Math.max(0,e-t)}o(We,"getUpperExtentClamp");function Rn(e,t,n){return Math.max(0,t-e,e-n)}o(Rn,"getSizeClamp");function as(e,t){return e?!t:t}o(as,"xor");function pf(e,t,n,r,i,s,a,c){let{affectsX:l,affectsY:u}=t,{isHorizontal:d,isVertical:f}=t,h=d&&f,{xSnapped:g,ySnapped:p}=n,{minWidth:S,maxWidth:b,minHeight:y,maxHeight:v}=r,{x:m,y:w,width:N,height:_,aspectRatio:P}=e,I=Math.floor(d?g-e.pointerX:0),T=Math.floor(f?p-e.pointerY:0),F=N+(l?-I:I),z=_+(u?-T:T),H=-s[0]*N,O=-s[1]*_,x=Rn(F,S,b),E=Rn(z,y,v);if(a){let R=0,D=0;l&&I<0?R=Fe(m+I+H,a[0][0]):!l&&I>0&&(R=We(m+F+H,a[1][0])),u&&T<0?D=Fe(w+T+O,a[0][1]):!u&&T>0&&(D=We(w+z+O,a[1][1])),x=Math.max(x,R),E=Math.max(E,D)}if(c){let R=0,D=0;l&&I>0?R=We(m+I,c[0][0]):!l&&I<0&&(R=Fe(m+F,c[1][0])),u&&T>0?D=We(w+T,c[0][1]):!u&&T<0&&(D=Fe(w+z,c[1][1])),x=Math.max(x,R),E=Math.max(E,D)}if(i){if(d){let R=Rn(F/P,y,v)*P;if(x=Math.max(x,R),a){let D=0;!l&&!u||l&&!u&&h?D=We(w+O+F/P,a[1][1])*P:D=Fe(w+O+(l?I:-I)/P,a[0][1])*P,x=Math.max(x,D)}if(c){let D=0;!l&&!u||l&&!u&&h?D=Fe(w+F/P,c[1][1])*P:D=We(w+(l?I:-I)/P,c[0][1])*P,x=Math.max(x,D)}}if(f){let R=Rn(z*P,S,b)/P;if(E=Math.max(E,R),a){let D=0;!l&&!u||u&&!l&&h?D=We(m+z*P+H,a[1][0])/P:D=Fe(m+(u?T:-T)*P+H,a[0][0])/P,E=Math.max(E,D)}if(c){let D=0;!l&&!u||u&&!l&&h?D=Fe(m+z*P,c[1][0])/P:D=We(m+(u?T:-T)*P,c[0][0])/P,E=Math.max(E,D)}}}T=T+(T<0?E:-E),I=I+(I<0?x:-x),i&&(h?F>z*P?T=(as(l,u)?-I:I)/P:I=(as(l,u)?-T:T)*P:d?(T=I/P,u=l):(I=T*P,l=u));let C=l?m+I:m,M=u?w+T:w;return{width:N+(l?-I:I),height:_+(u?-T:T),x:s[0]*I*(l?-1:1)+C,y:s[1]*T*(u?-1:1)+M}}o(pf,"getDimensionsAfterResize");var Os={width:0,height:0,x:0,y:0},gf={...Os,pointerX:0,pointerY:0,aspectRatio:1};function mf(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,c=n[0]*s,l=n[1]*a;return[[r-c,i-l],[r+s-c,i+a-l]]}o(mf,"nodeToChildExtent");function $s({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let s=le(e),a={controlDirection:ss("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:h,onResizeStart:g,onResize:p,onResizeEnd:S,shouldResize:b}){let y={...Os},v={...gf};a={boundaries:d,resizeDirection:h,keepAspectRatio:f,controlDirection:ss(u)};let m,w=null,N=[],_,P,I,T=!1,F=Ut().on("start",z=>{let{nodeLookup:H,transform:O,snapGrid:x,snapToGrid:E,nodeOrigin:C,paneDomNode:M}=n();if(m=H.get(t),!m)return;w=M?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:D}=cn(z.sourceEvent,{transform:O,snapGrid:x,snapToGrid:E,containerBounds:w});y={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},v={...y,pointerX:R,pointerY:D,aspectRatio:y.width/y.height},_=void 0,P=ct(m.extent)?m.extent:void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=H.get(m.parentId)),_&&m.extent==="parent"&&(P=[[0,0],[_.measured.width,_.measured.height]]),N=[],I=void 0;for(let[V,B]of H)if(B.parentId===t&&(N.push({id:V,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){let L=mf(B,m,B.origin??C);I?I=[[Math.min(L[0][0],I[0][0]),Math.min(L[0][1],I[0][1])],[Math.max(L[1][0],I[1][0]),Math.max(L[1][1],I[1][1])]]:I=L}g?.(z,{...y})}).on("drag",z=>{let{transform:H,snapGrid:O,snapToGrid:x,nodeOrigin:E}=n(),C=cn(z.sourceEvent,{transform:H,snapGrid:O,snapToGrid:x,containerBounds:w}),M=[];if(!m)return;let{x:R,y:D,width:V,height:B}=y,L={},U=m.origin??E,{width:X,height:K,x:ee,y:G}=pf(v,a.controlDirection,C,a.boundaries,a.keepAspectRatio,U,P,I),$=X!==V,W=K!==B,j=ee!==R&&$,J=G!==D&&W;if(!j&&!J&&!$&&!W)return;if((j||J||U[0]===1||U[1]===1)&&(L.x=j?ee:y.x,L.y=J?G:y.y,y.x=L.x,y.y=L.y,N.length>0)){let oe=ee-R,se=G-D;for(let pe of N)pe.position={x:pe.position.x-oe+U[0]*(X-V),y:pe.position.y-se+U[1]*(K-B)},M.push(pe)}if(($||W)&&(L.width=$&&(!a.resizeDirection||a.resizeDirection==="horizontal")?X:y.width,L.height=W&&(!a.resizeDirection||a.resizeDirection==="vertical")?K:y.height,y.width=L.width,y.height=L.height),_&&m.expandParent){let oe=U[0]*(L.width??0);L.x&&L.x<oe&&(y.x=oe,v.x=v.x-(L.x-oe));let se=U[1]*(L.height??0);L.y&&L.y<se&&(y.y=se,v.y=v.y-(L.y-se))}let q=hf({width:y.width,prevWidth:V,height:y.height,prevHeight:B,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),Q={...y,direction:q};b?.(z,Q)!==!1&&(T=!0,p?.(z,Q),r(L,M))}).on("end",z=>{T&&(S?.(z,{...y}),i?.({...y}),T=!1)});s.call(F)}o(c,"update");function l(){s.on(".drag",null)}return o(l,"destroy"),{update:c,destroy:l}}o($s,"XYResizer");var Vs=Le(uo(),1),Fs=Le(Fl(),1);var Ls=o(e=>{let t,n=new Set,r=o((d,f)=>{let h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){let g=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(p=>p(t,g))}},"setState"),i=o(()=>t,"getState"),l={setState:r,getState:i,getInitialState:o(()=>u,"getInitialState"),subscribe:o(d=>(n.add(d),()=>n.delete(d)),"subscribe"),destroy:o(()=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()},"destroy")},u=t=e(r,i,l);return l},"createStoreImpl"),Hs=o(e=>e?Ls(e):Ls,"createStore");var{useDebugValue:yf}=Vs.default,{useSyncExternalStoreWithSelector:xf}=Fs.default,wf=o(e=>e,"identity");function Gr(e,t=wf,n){let r=xf(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return yf(r),r}o(Gr,"useStoreWithEqualityFn");var Bs=o((e,t)=>{let n=Hs(e),r=o((i,s=t)=>Gr(n,i,s),"useBoundStoreWithEqualityFn");return Object.assign(r,n),r},"createWithEqualityFnImpl"),Ws=o((e,t)=>e?Bs(e,t):Bs,"createWithEqualityFn");function re(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}o(re,"shallow$1");var bf=Le(Bl());var jn=(0,k.createContext)(null),Sf=jn.Provider,ma=ye.error001("react");function te(e,t){let n=(0,k.useContext)(jn);if(n===null)throw new Error(ma);return Gr(n,e,t)}o(te,"useStore");function ie(){let e=(0,k.useContext)(jn);if(e===null)throw new Error(ma);return(0,k.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}o(ie,"useStoreApi");var Xs={display:"none"},vf={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ya="react-flow__node-desc",xa="react-flow__edge-desc",Ef="react-flow__aria-live",Cf=o(e=>e.ariaLiveMessage,"ariaLiveSelector"),_f=o(e=>e.ariaLabelConfig,"ariaLabelConfigSelector");function Nf({rfId:e}){let t=te(Cf);return(0,A.jsx)("div",{id:`${Ef}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:vf,children:t})}o(Nf,"AriaLiveMessage");function Mf({rfId:e,disableKeyboardA11y:t}){let n=te(_f);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{id:`${ya}-${e}`,style:Xs,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,A.jsx)("div",{id:`${xa}-${e}`,style:Xs,children:n["edge.a11yDescription.default"]}),!t&&(0,A.jsx)(Nf,{rfId:e})]})}o(Mf,"A11yDescriptions");var qe=(0,k.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...i},s)=>{let a=`${e}`.split("-");return(0,A.jsx)("div",{className:ae(["react-flow__panel",n,...a]),style:r,ref:s,...i,children:t})});qe.displayName="Panel";var Ys="https://reactflow.dev?utm_source=attribution";function If({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,A.jsx)(qe,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Ys}`,children:(0,A.jsx)("a",{href:Ys,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}o(If,"Attribution");var Pf=o(e=>{let t=[],n=[];for(let[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(let[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},"selector$l"),Gn=o(e=>e.id,"selectId");function kf(e,t){return re(e.selectedNodes.map(Gn),t.selectedNodes.map(Gn))&&re(e.selectedEdges.map(Gn),t.selectedEdges.map(Gn))}o(kf,"areEqual$1");function Af({onSelectionChange:e}){let t=ie(),{selectedNodes:n,selectedEdges:r}=te(Pf,kf);return(0,k.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[n,r,e]),null}o(Af,"SelectionListenerInner");var Tf=o(e=>!!e.onSelectionChangeHandlers,"changeSelector");function Df({onSelectionChange:e}){let t=te(Tf);return e||t?(0,A.jsx)(Af,{onSelectionChange:e}):null}o(Df,"SelectionListener");var wa=[0,0],Rf={x:0,y:0,zoom:1},zf=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Zs=[...zf,"rfId"],Of=o(e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),"selector$k"),Us={translateExtent:Et,nodeOrigin:wa,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function $f(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:c,setDefaultNodesAndEdges:l}=te(Of,re),u=ie();(0,k.useEffect)(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=Us,c()}),[]);let d=(0,k.useRef)(Us);return(0,k.useEffect)(()=>{for(let f of Zs){let h=e[f],g=d.current[f];h!==g&&(typeof e[f]>"u"||(f==="nodes"?t(h):f==="edges"?n(h):f==="minZoom"?r(h):f==="maxZoom"?i(h):f==="translateExtent"?s(h):f==="nodeExtent"?a(h):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:gs(h)}):f==="fitView"?u.setState({fitViewQueued:h}):f==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[f]:h})))}d.current=e},Zs.map(f=>e[f])),null}o($f,"StoreUpdater");function qs(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}o(qs,"getMediaQuery");function Lf(e){let[t,n]=(0,k.useState)(e==="system"?null:e);return(0,k.useEffect)(()=>{if(e!=="system"){n(e);return}let r=qs(),i=o(()=>n(r?.matches?"dark":"light"),"updateColorModeClass");return i(),r?.addEventListener("change",i),()=>{r?.removeEventListener("change",i)}},[e]),t!==null?t:qs()?.matches?"dark":"light"}o(Lf,"useColorModeClass");var Ks=typeof document<"u"?document:null;function hn(e=null,t={target:Ks,actInsideInputWithModifier:!0}){let[n,r]=(0,k.useState)(!1),i=(0,k.useRef)(!1),s=(0,k.useRef)(new Set([])),[a,c]=(0,k.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
|
|
1
|
+
import{a as je,b as Ni}from"./chunk-7SROZWKL.js";import{a as Mi,b as Ii,c as Pi,f as xn}from"./chunk-AECDJKXB.js";import{e as bi,k as Si}from"./chunk-DKSLOJDQ.js";import{a as ho,b as po,c as vi,d as Ei,e as yn,g as Ci,h as _i,i as ht}from"./chunk-JV7KTJPY.js";import{P as wi}from"./chunk-AOAJGSYZ.js";import{b as Fl}from"./chunk-INQICZYC.js";import{a as Bl}from"./chunk-TFMQSCGC.js";import{a as fo}from"./chunk-BWEXJENB.js";import{b as Ht}from"./chunk-SPDZUX4P.js";import{d as Lt,o as mn}from"./chunk-BKM6PMSO.js";import{c as yi}from"./chunk-VYW2PAWC.js";import{a as o,d as Le,e as uo,f as Vl,g as xi,i as Je}from"./chunk-R5ZTCHCE.js";var ft=Le(Vl(),1);var A=Le(xi()),k=Le(uo());function ae(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=ae(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}o(ae,"cc");var Wl={value:o(()=>{},"value")};function Ai(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new wn(n)}o(Ai,"dispatch");function wn(e){this._=e}o(wn,"Dispatch");function Xl(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}o(Xl,"parseTypenames");wn.prototype=Ai.prototype={constructor:wn,on:o(function(e,t){var n=this._,r=Xl(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Yl(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ki(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ki(n[i],e.name,null);return this},"on"),copy:o(function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new wn(e)},"copy"),call:o(function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},"call"),apply:o(function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)},"apply")};function Yl(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}o(Yl,"get");function ki(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Wl,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}o(ki,"set");var et=Ai;var bn="http://www.w3.org/1999/xhtml",go={svg:"http://www.w3.org/2000/svg",xhtml:bn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Me(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),go.hasOwnProperty(t)?{space:go[t],local:e}:e}o(Me,"default");function Zl(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bn&&t.documentElement.namespaceURI===bn?t.createElement(e):t.createElementNS(n,e)}}o(Zl,"creatorInherit");function Ul(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}o(Ul,"creatorFixed");function Bt(e){var t=Me(e);return(t.local?Ul:Zl)(t)}o(Bt,"default");function ql(){}o(ql,"none");function He(e){return e==null?ql:function(){return this.querySelector(e)}}o(He,"default");function mo(e){typeof e!="function"&&(e=He(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,c=r[i]=new Array(a),l,u,d=0;d<a;++d)(l=s[d])&&(u=e.call(l,l.__data__,d,s))&&("__data__"in l&&(u.__data__=l.__data__),c[d]=u);return new ce(r,this._parents)}o(mo,"default");function yo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}o(yo,"array");function Kl(){return[]}o(Kl,"empty");function pt(e){return e==null?Kl:function(){return this.querySelectorAll(e)}}o(pt,"default");function Gl(e){return function(){return yo(e.apply(this,arguments))}}o(Gl,"arrayAll");function xo(e){typeof e=="function"?e=Gl(e):e=pt(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],c=a.length,l,u=0;u<c;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new ce(r,i)}o(xo,"default");function gt(e){return function(){return this.matches(e)}}o(gt,"default");function Sn(e){return function(t){return t.matches(e)}}o(Sn,"childMatcher");var Ql=Array.prototype.find;function Jl(e){return function(){return Ql.call(this.children,e)}}o(Jl,"childFind");function jl(){return this.firstElementChild}o(jl,"childFirst");function wo(e){return this.select(e==null?jl:Jl(typeof e=="function"?e:Sn(e)))}o(wo,"default");var eu=Array.prototype.filter;function tu(){return Array.from(this.children)}o(tu,"children");function nu(e){return function(){return eu.call(this.children,e)}}o(nu,"childrenFilter");function bo(e){return this.selectAll(e==null?tu:nu(typeof e=="function"?e:Sn(e)))}o(bo,"default");function So(e){typeof e!="function"&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,c=r[i]=[],l,u=0;u<a;++u)(l=s[u])&&e.call(l,l.__data__,u,s)&&c.push(l);return new ce(r,this._parents)}o(So,"default");function Vt(e){return new Array(e.length)}o(Vt,"default");function vo(){return new ce(this._enter||this._groups.map(Vt),this._parents)}o(vo,"default");function Ft(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}o(Ft,"EnterNode");Ft.prototype={constructor:Ft,appendChild:o(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:o(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:o(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:o(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")};function Eo(e){return function(){return e}}o(Eo,"default");function ou(e,t,n,r,i,s){for(var a=0,c,l=t.length,u=s.length;a<u;++a)(c=t[a])?(c.__data__=s[a],r[a]=c):n[a]=new Ft(e,s[a]);for(;a<l;++a)(c=t[a])&&(i[a]=c)}o(ou,"bindIndex");function ru(e,t,n,r,i,s,a){var c,l,u=new Map,d=t.length,f=s.length,h=new Array(d),g;for(c=0;c<d;++c)(l=t[c])&&(h[c]=g=a.call(l,l.__data__,c,t)+"",u.has(g)?i[c]=l:u.set(g,l));for(c=0;c<f;++c)g=a.call(e,s[c],c,s)+"",(l=u.get(g))?(r[c]=l,l.__data__=s[c],u.delete(g)):n[c]=new Ft(e,s[c]);for(c=0;c<d;++c)(l=t[c])&&u.get(h[c])===l&&(i[c]=l)}o(ru,"bindKey");function iu(e){return e.__data__}o(iu,"datum");function Co(e,t){if(!arguments.length)return Array.from(this,iu);var n=t?ru:ou,r=this._parents,i=this._groups;typeof e!="function"&&(e=Eo(e));for(var s=i.length,a=new Array(s),c=new Array(s),l=new Array(s),u=0;u<s;++u){var d=r[u],f=i[u],h=f.length,g=su(e.call(d,d&&d.__data__,u,r)),p=g.length,S=c[u]=new Array(p),b=a[u]=new Array(p),y=l[u]=new Array(h);n(d,f,S,b,y,g,t);for(var v=0,m=0,w,N;v<p;++v)if(w=S[v]){for(v>=m&&(m=v+1);!(N=b[m])&&++m<p;);w._next=N||null}}return a=new ce(a,r),a._enter=c,a._exit=l,a}o(Co,"default");function su(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}o(su,"arraylike");function _o(){return new ce(this._exit||this._groups.map(Vt),this._parents)}o(_o,"default");function No(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}o(No,"default");function Mo(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),c=new Array(i),l=0;l<a;++l)for(var u=n[l],d=r[l],f=u.length,h=c[l]=new Array(f),g,p=0;p<f;++p)(g=u[p]||d[p])&&(h[p]=g);for(;l<i;++l)c[l]=n[l];return new ce(c,this._parents)}o(Mo,"default");function Io(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}o(Io,"default");function Po(e){e||(e=au);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}o(t,"compareNode");for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],c=a.length,l=i[s]=new Array(c),u,d=0;d<c;++d)(u=a[d])&&(l[d]=u);l.sort(t)}return new ce(i,this._parents).order()}o(Po,"default");function au(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}o(au,"ascending");function ko(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}o(ko,"default");function Ao(){return Array.from(this)}o(Ao,"default");function To(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}o(To,"default");function Do(){let e=0;for(let t of this)++e;return e}o(Do,"default");function Ro(){return!this.node()}o(Ro,"default");function zo(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,c;s<a;++s)(c=i[s])&&e.call(c,c.__data__,s,i);return this}o(zo,"default");function cu(e){return function(){this.removeAttribute(e)}}o(cu,"attrRemove");function lu(e){return function(){this.removeAttributeNS(e.space,e.local)}}o(lu,"attrRemoveNS");function uu(e,t){return function(){this.setAttribute(e,t)}}o(uu,"attrConstant");function du(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}o(du,"attrConstantNS");function fu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}o(fu,"attrFunction");function hu(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}o(hu,"attrFunctionNS");function Oo(e,t){var n=Me(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?lu:cu:typeof t=="function"?n.local?hu:fu:n.local?du:uu)(n,t))}o(Oo,"default");function Wt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}o(Wt,"default");function pu(e){return function(){this.style.removeProperty(e)}}o(pu,"styleRemove");function gu(e,t,n){return function(){this.style.setProperty(e,t,n)}}o(gu,"styleConstant");function mu(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}o(mu,"styleFunction");function $o(e,t,n){return arguments.length>1?this.each((t==null?pu:typeof t=="function"?mu:gu)(e,t,n??"")):Be(this.node(),e)}o($o,"default");function Be(e,t){return e.style.getPropertyValue(t)||Wt(e).getComputedStyle(e,null).getPropertyValue(t)}o(Be,"styleValue");function yu(e){return function(){delete this[e]}}o(yu,"propertyRemove");function xu(e,t){return function(){this[e]=t}}o(xu,"propertyConstant");function wu(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}o(wu,"propertyFunction");function Lo(e,t){return arguments.length>1?this.each((t==null?yu:typeof t=="function"?wu:xu)(e,t)):this.node()[e]}o(Lo,"default");function Ti(e){return e.trim().split(/^|\s+/)}o(Ti,"classArray");function Ho(e){return e.classList||new Di(e)}o(Ho,"classList");function Di(e){this._node=e,this._names=Ti(e.getAttribute("class")||"")}o(Di,"ClassList");Di.prototype={add:o(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:o(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:o(function(e){return this._names.indexOf(e)>=0},"contains")};function Ri(e,t){for(var n=Ho(e),r=-1,i=t.length;++r<i;)n.add(t[r])}o(Ri,"classedAdd");function zi(e,t){for(var n=Ho(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}o(zi,"classedRemove");function bu(e){return function(){Ri(this,e)}}o(bu,"classedTrue");function Su(e){return function(){zi(this,e)}}o(Su,"classedFalse");function vu(e,t){return function(){(t.apply(this,arguments)?Ri:zi)(this,e)}}o(vu,"classedFunction");function Bo(e,t){var n=Ti(e+"");if(arguments.length<2){for(var r=Ho(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?vu:t?bu:Su)(n,t))}o(Bo,"default");function Eu(){this.textContent=""}o(Eu,"textRemove");function Cu(e){return function(){this.textContent=e}}o(Cu,"textConstant");function _u(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}o(_u,"textFunction");function Vo(e){return arguments.length?this.each(e==null?Eu:(typeof e=="function"?_u:Cu)(e)):this.node().textContent}o(Vo,"default");function Nu(){this.innerHTML=""}o(Nu,"htmlRemove");function Mu(e){return function(){this.innerHTML=e}}o(Mu,"htmlConstant");function Iu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}o(Iu,"htmlFunction");function Fo(e){return arguments.length?this.each(e==null?Nu:(typeof e=="function"?Iu:Mu)(e)):this.node().innerHTML}o(Fo,"default");function Pu(){this.nextSibling&&this.parentNode.appendChild(this)}o(Pu,"raise");function Wo(){return this.each(Pu)}o(Wo,"default");function ku(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}o(ku,"lower");function Xo(){return this.each(ku)}o(Xo,"default");function Yo(e){var t=typeof e=="function"?e:Bt(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}o(Yo,"default");function Au(){return null}o(Au,"constantNull");function Zo(e,t){var n=typeof e=="function"?e:Bt(e),r=t==null?Au:typeof t=="function"?t:He(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}o(Zo,"default");function Tu(){var e=this.parentNode;e&&e.removeChild(this)}o(Tu,"remove");function Uo(){return this.each(Tu)}o(Uo,"default");function Du(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}o(Du,"selection_cloneShallow");function Ru(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}o(Ru,"selection_cloneDeep");function qo(e){return this.select(e?Ru:Du)}o(qo,"default");function Ko(e){return arguments.length?this.property("__data__",e):this.node().__data__}o(Ko,"default");function zu(e){return function(t){e.call(this,t,this.__data__)}}o(zu,"contextListener");function Ou(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}o(Ou,"parseTypenames");function $u(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}o($u,"onRemove");function Lu(e,t,n){return function(){var r=this.__on,i,s=zu(t);if(r){for(var a=0,c=r.length;a<c;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}o(Lu,"onAdd");function Go(e,t,n){var r=Ou(e+""),i,s=r.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var l=0,u=c.length,d;l<u;++l)for(i=0,d=c[l];i<s;++i)if((a=r[i]).type===d.type&&a.name===d.name)return d.value}return}for(c=t?Lu:$u,i=0;i<s;++i)this.each(c(r[i],t,n));return this}o(Go,"default");function Oi(e,t,n){var r=Wt(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}o(Oi,"dispatchEvent");function Hu(e,t){return function(){return Oi(this,e,t)}}o(Hu,"dispatchConstant");function Bu(e,t){return function(){return Oi(this,e,t.apply(this,arguments))}}o(Bu,"dispatchFunction");function Qo(e,t){return this.each((typeof t=="function"?Bu:Hu)(e,t))}o(Qo,"default");function*Jo(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}o(Jo,"default");var jo=[null];function ce(e,t){this._groups=e,this._parents=t}o(ce,"Selection");function $i(){return new ce([[document.documentElement]],jo)}o($i,"selection");function Vu(){return this}o(Vu,"selection_selection");ce.prototype=$i.prototype={constructor:ce,select:mo,selectAll:xo,selectChild:wo,selectChildren:bo,filter:So,data:Co,enter:vo,exit:_o,join:No,merge:Mo,selection:Vu,order:Io,sort:Po,call:ko,nodes:Ao,node:To,size:Do,empty:Ro,each:zo,attr:Oo,style:$o,property:Lo,classed:Bo,text:Vo,html:Fo,raise:Wo,lower:Xo,append:Yo,insert:Zo,remove:Uo,clone:qo,datum:Ko,on:Go,dispatch:Qo,[Symbol.iterator]:Jo};var De=$i;function le(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],jo)}o(le,"default");function er(e){let t;for(;t=e.sourceEvent;)e=t;return e}o(er,"default");function fe(e,t){if(e=er(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}o(fe,"default");var Li={passive:!1},tt={capture:!0,passive:!1};function vn(e){e.stopImmediatePropagation()}o(vn,"nopropagation");function Re(e){e.preventDefault(),e.stopImmediatePropagation()}o(Re,"default");function mt(e){var t=e.document.documentElement,n=le(e).on("dragstart.drag",Re,tt);"onselectstart"in t?n.on("selectstart.drag",Re,tt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}o(mt,"default");function Xt(e,t){var n=e.document.documentElement,r=le(e).on("dragstart.drag",null);t&&(r.on("click.drag",Re,tt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}o(Xt,"yesdrag");var Yt=o(e=>()=>e,"default");function Zt(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:a,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}o(Zt,"DragEvent");Zt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Fu(e){return!e.ctrlKey&&!e.button}o(Fu,"defaultFilter");function Wu(){return this.parentNode}o(Wu,"defaultContainer");function Xu(e,t){return t??{x:e.x,y:e.y}}o(Xu,"defaultSubject");function Yu(){return navigator.maxTouchPoints||"ontouchstart"in this}o(Yu,"defaultTouchable");function Ut(){var e=Fu,t=Wu,n=Xu,r=Yu,i={},s=et("start","drag","end"),a=0,c,l,u,d,f=0;function h(w){w.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",y,Li).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}o(h,"drag");function g(w,N){if(!(d||!e.call(this,w,N))){var _=m(this,t.call(this,w,N),w,N,"mouse");_&&(le(w.view).on("mousemove.drag",p,tt).on("mouseup.drag",S,tt),mt(w.view),vn(w),u=!1,c=w.clientX,l=w.clientY,_("start",w))}}o(g,"mousedowned");function p(w){if(Re(w),!u){var N=w.clientX-c,_=w.clientY-l;u=N*N+_*_>f}i.mouse("drag",w)}o(p,"mousemoved");function S(w){le(w.view).on("mousemove.drag mouseup.drag",null),Xt(w.view,u),Re(w),i.mouse("end",w)}o(S,"mouseupped");function b(w,N){if(e.call(this,w,N)){var _=w.changedTouches,P=t.call(this,w,N),I=_.length,T,F;for(T=0;T<I;++T)(F=m(this,P,w,N,_[T].identifier,_[T]))&&(vn(w),F("start",w,_[T]))}}o(b,"touchstarted");function y(w){var N=w.changedTouches,_=N.length,P,I;for(P=0;P<_;++P)(I=i[N[P].identifier])&&(Re(w),I("drag",w,N[P]))}o(y,"touchmoved");function v(w){var N=w.changedTouches,_=N.length,P,I;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),P=0;P<_;++P)(I=i[N[P].identifier])&&(vn(w),I("end",w,N[P]))}o(v,"touchended");function m(w,N,_,P,I,T){var F=s.copy(),z=fe(T||_,N),H,O,x;if((x=n.call(w,new Zt("beforestart",{sourceEvent:_,target:h,identifier:I,active:a,x:z[0],y:z[1],dx:0,dy:0,dispatch:F}),P))!=null)return H=x.x-z[0]||0,O=x.y-z[1]||0,o(function E(C,M,R){var D=z,V;switch(C){case"start":i[I]=E,V=a++;break;case"end":delete i[I],--a;case"drag":z=fe(R||M,N),V=a;break}F.call(C,w,new Zt(C,{sourceEvent:M,subject:x,target:h,identifier:I,active:V,x:z[0]+H,y:z[1]+O,dx:z[0]-D[0],dy:z[1]-D[1],dispatch:F}),P)},"gesture")}return o(m,"beforestart"),h.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Yt(!!w),h):e},h.container=function(w){return arguments.length?(t=typeof w=="function"?w:Yt(w),h):t},h.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Yt(w),h):n},h.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:Yt(!!w),h):r},h.on=function(){var w=s.on.apply(s,arguments);return w===s?h:w},h.clickDistance=function(w){return arguments.length?(f=(w=+w)*w,h):Math.sqrt(f)},h}o(Ut,"default");var yt=0,Kt=0,qt=0,Bi=1e3,En,Gt,Cn=0,nt=0,_n=0,Qt=typeof performance=="object"&&performance.now?performance:Date,Vi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function jt(){return nt||(Vi(Zu),nt=Qt.now()+_n)}o(jt,"now");function Zu(){nt=0}o(Zu,"clearNow");function Jt(){this._call=this._time=this._next=null}o(Jt,"Timer");Jt.prototype=Nn.prototype={constructor:Jt,restart:o(function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?jt():+n)+(t==null?0:+t),!this._next&&Gt!==this&&(Gt?Gt._next=this:En=this,Gt=this),this._call=e,this._time=n,tr()},"restart"),stop:o(function(){this._call&&(this._call=null,this._time=1/0,tr())},"stop")};function Nn(e,t,n){var r=new Jt;return r.restart(e,t,n),r}o(Nn,"timer");function Fi(){jt(),++yt;for(var e=En,t;e;)(t=nt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--yt}o(Fi,"timerFlush");function Hi(){nt=(Cn=Qt.now())+_n,yt=Kt=0;try{Fi()}finally{yt=0,qu(),nt=0}}o(Hi,"wake");function Uu(){var e=Qt.now(),t=e-Cn;t>Bi&&(_n-=t,Cn=e)}o(Uu,"poke");function qu(){for(var e,t=En,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:En=n);Gt=e,tr(r)}o(qu,"nap");function tr(e){if(!yt){Kt&&(Kt=clearTimeout(Kt));var t=e-nt;t>24?(e<1/0&&(Kt=setTimeout(Hi,e-Qt.now()-_n)),qt&&(qt=clearInterval(qt))):(qt||(Cn=Qt.now(),qt=setInterval(Uu,Bi)),yt=1,Vi(Hi))}}o(tr,"sleep");function en(e,t,n){var r=new Jt;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}o(en,"default");var Ku=et("start","end","cancel","interrupt"),Gu=[],Yi=0,Wi=1,In=2,Mn=3,Xi=4,Pn=5,tn=6;function ze(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Qu(e,n,{name:t,index:r,group:i,on:Ku,tween:Gu,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Yi})}o(ze,"default");function nn(e,t){var n=ue(e,t);if(n.state>Yi)throw new Error("too late; already scheduled");return n}o(nn,"init");function de(e,t){var n=ue(e,t);if(n.state>Mn)throw new Error("too late; already running");return n}o(de,"set");function ue(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}o(ue,"get");function Qu(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Nn(s,0,n.time);function s(u){n.state=Wi,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}o(s,"schedule");function a(u){var d,f,h,g;if(n.state!==Wi)return l();for(d in r)if(g=r[d],g.name===n.name){if(g.state===Mn)return en(a);g.state===Xi?(g.state=tn,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=tn,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(en(function(){n.state===Mn&&(n.state=Xi,n.timer.restart(c,n.delay,n.time),c(u))}),n.state=In,n.on.call("start",e,e.__data__,n.index,n.group),n.state===In){for(n.state=Mn,i=new Array(h=n.tween.length),d=0,f=-1;d<h;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}o(a,"start");function c(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Pn,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);n.state===Pn&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}o(c,"tick");function l(){n.state=tn,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}o(l,"stop")}o(Qu,"create");function Ve(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>In&&r.state<Pn,r.state=tn,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}o(Ve,"default");function nr(e){return this.each(function(){Ve(this,e)})}o(nr,"default");function Ju(e,t){var n,r;return function(){var i=de(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,c=r.length;a<c;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}o(Ju,"tweenRemove");function ju(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=de(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var c={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=c;break}l===u&&i.push(c)}s.tween=i}}o(ju,"tweenFunction");function or(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ue(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Ju:ju)(n,e,t))}o(or,"default");function xt(e,t,n){var r=e._id;return e.each(function(){var i=de(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return ue(i,r).value[t]}}o(xt,"tweenValue");function on(e,t){var n;return(typeof t=="number"?vi:t instanceof ho?po:(n=ho(t))?(t=n,po):Ei)(e,t)}o(on,"default");function ed(e){return function(){this.removeAttribute(e)}}o(ed,"attrRemove");function td(e){return function(){this.removeAttributeNS(e.space,e.local)}}o(td,"attrRemoveNS");function nd(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}o(nd,"attrConstant");function od(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}o(od,"attrConstantNS");function rd(e,t,n){var r,i,s;return function(){var a,c=n(this),l;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=c+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,c)))}}o(rd,"attrFunction");function id(e,t,n){var r,i,s;return function(){var a,c=n(this),l;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=c+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,c)))}}o(id,"attrFunctionNS");function rr(e,t){var n=Me(e),r=n==="transform"?_i:on;return this.attrTween(e,typeof t=="function"?(n.local?id:rd)(n,r,xt(this,"attr."+e,t)):t==null?(n.local?td:ed)(n):(n.local?od:nd)(n,r,t))}o(rr,"default");function sd(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}o(sd,"attrInterpolate");function ad(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}o(ad,"attrInterpolateNS");function cd(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&ad(e,s)),n}return o(i,"tween"),i._value=t,i}o(cd,"attrTweenNS");function ld(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&sd(e,s)),n}return o(i,"tween"),i._value=t,i}o(ld,"attrTween");function ir(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Me(e);return this.tween(n,(r.local?cd:ld)(r,t))}o(ir,"default");function ud(e,t){return function(){nn(this,e).delay=+t.apply(this,arguments)}}o(ud,"delayFunction");function dd(e,t){return t=+t,function(){nn(this,e).delay=t}}o(dd,"delayConstant");function sr(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ud:dd)(t,e)):ue(this.node(),t).delay}o(sr,"default");function fd(e,t){return function(){de(this,e).duration=+t.apply(this,arguments)}}o(fd,"durationFunction");function hd(e,t){return t=+t,function(){de(this,e).duration=t}}o(hd,"durationConstant");function ar(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fd:hd)(t,e)):ue(this.node(),t).duration}o(ar,"default");function pd(e,t){if(typeof t!="function")throw new Error;return function(){de(this,e).ease=t}}o(pd,"easeConstant");function cr(e){var t=this._id;return arguments.length?this.each(pd(t,e)):ue(this.node(),t).ease}o(cr,"default");function gd(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;de(this,e).ease=n}}o(gd,"easeVarying");function lr(e){if(typeof e!="function")throw new Error;return this.each(gd(this._id,e))}o(lr,"default");function ur(e){typeof e!="function"&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,c=r[i]=[],l,u=0;u<a;++u)(l=s[u])&&e.call(l,l.__data__,u,s)&&c.push(l);return new ge(r,this._parents,this._name,this._id)}o(ur,"default");function dr(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),c=0;c<s;++c)for(var l=t[c],u=n[c],d=l.length,f=a[c]=new Array(d),h,g=0;g<d;++g)(h=l[g]||u[g])&&(f[g]=h);for(;c<r;++c)a[c]=t[c];return new ge(a,this._parents,this._name,this._id)}o(dr,"default");function md(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}o(md,"start");function yd(e,t,n){var r,i,s=md(t)?nn:de;return function(){var a=s(this,e),c=a.on;c!==r&&(i=(r=c).copy()).on(t,n),a.on=i}}o(yd,"onFunction");function fr(e,t){var n=this._id;return arguments.length<2?ue(this.node(),n).on.on(e):this.each(yd(n,e,t))}o(fr,"default");function xd(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}o(xd,"removeFunction");function hr(){return this.on("end.remove",xd(this._id))}o(hr,"default");function pr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=He(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var c=r[a],l=c.length,u=s[a]=new Array(l),d,f,h=0;h<l;++h)(d=c[h])&&(f=e.call(d,d.__data__,h,c))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f,ze(u[h],t,n,h,u,ue(d,n)));return new ge(s,this._parents,t,n)}o(pr,"default");function gr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=pt(e));for(var r=this._groups,i=r.length,s=[],a=[],c=0;c<i;++c)for(var l=r[c],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var h=e.call(d,d.__data__,f,l),g,p=ue(d,n),S=0,b=h.length;S<b;++S)(g=h[S])&&ze(g,t,n,S,h,p);s.push(h),a.push(d)}return new ge(s,a,t,n)}o(gr,"default");var wd=De.prototype.constructor;function mr(){return new wd(this._groups,this._parents)}o(mr,"default");function bd(e,t){var n,r,i;return function(){var s=Be(this,e),a=(this.style.removeProperty(e),Be(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}o(bd,"styleNull");function Zi(e){return function(){this.style.removeProperty(e)}}o(Zi,"styleRemove");function Sd(e,t,n){var r,i=n+"",s;return function(){var a=Be(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}o(Sd,"styleConstant");function vd(e,t,n){var r,i,s;return function(){var a=Be(this,e),c=n(this),l=c+"";return c==null&&(l=c=(this.style.removeProperty(e),Be(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,c))}}o(vd,"styleFunction");function Ed(e,t){var n,r,i,s="style."+t,a="end."+s,c;return function(){var l=de(this,e),u=l.on,d=l.value[s]==null?c||(c=Zi(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(a,i=d),l.on=r}}o(Ed,"styleMaybeRemove");function yr(e,t,n){var r=(e+="")=="transform"?Ci:on;return t==null?this.styleTween(e,bd(e,r)).on("end.style."+e,Zi(e)):typeof t=="function"?this.styleTween(e,vd(e,r,xt(this,"style."+e,t))).each(Ed(this._id,e)):this.styleTween(e,Sd(e,r,t),n).on("end.style."+e,null)}o(yr,"default");function Cd(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}o(Cd,"styleInterpolate");function _d(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Cd(e,a,n)),r}return o(s,"tween"),s._value=t,s}o(_d,"styleTween");function xr(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,_d(e,t,n??""))}o(xr,"default");function Nd(e){return function(){this.textContent=e}}o(Nd,"textConstant");function Md(e){return function(){var t=e(this);this.textContent=t??""}}o(Md,"textFunction");function wr(e){return this.tween("text",typeof e=="function"?Md(xt(this,"text",e)):Nd(e==null?"":e+""))}o(wr,"default");function Id(e){return function(t){this.textContent=e.call(this,t)}}o(Id,"textInterpolate");function Pd(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Id(i)),t}return o(r,"tween"),r._value=e,r}o(Pd,"textTween");function br(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Pd(e))}o(br,"default");function Sr(){for(var e=this._name,t=this._id,n=kn(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],c=a.length,l,u=0;u<c;++u)if(l=a[u]){var d=ue(l,t);ze(l,e,n,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ge(r,this._parents,e,n)}o(Sr,"default");function vr(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var c={value:a},l={value:o(function(){--i===0&&s()},"value")};n.each(function(){var u=de(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(l)),u.on=t}),i===0&&s()})}o(vr,"default");var kd=0;function ge(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}o(ge,"Transition");function Ui(e){return De().transition(e)}o(Ui,"transition");function kn(){return++kd}o(kn,"newId");var Oe=De.prototype;ge.prototype=Ui.prototype={constructor:ge,select:pr,selectAll:gr,selectChild:Oe.selectChild,selectChildren:Oe.selectChildren,filter:ur,merge:dr,selection:mr,transition:Sr,call:Oe.call,nodes:Oe.nodes,node:Oe.node,size:Oe.size,empty:Oe.empty,each:Oe.each,on:fr,attr:rr,attrTween:ir,style:yr,styleTween:xr,text:wr,textTween:br,remove:hr,tween:or,delay:sr,duration:ar,ease:cr,easeVarying:lr,end:vr,[Symbol.iterator]:Oe[Symbol.iterator]};function An(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}o(An,"cubicInOut");var Ad={time:null,delay:0,duration:250,ease:An};function Td(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}o(Td,"inherit");function Er(e){var t,n;e instanceof ge?(t=e._id,e=e._name):(t=kn(),(n=Ad).time=jt(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],c=a.length,l,u=0;u<c;++u)(l=a[u])&&ze(l,e,t,u,a,n||Td(l,t));return new ge(r,this._parents,e,t)}o(Er,"default");De.prototype.interrupt=nr;De.prototype.transition=Er;var rn=o(e=>()=>e,"default");function Cr(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}o(Cr,"ZoomEvent");function ve(e,t,n){this.k=e,this.x=t,this.y=n}o(ve,"Transform");ve.prototype={constructor:ve,scale:o(function(e){return e===1?this:new ve(this.k*e,this.x,this.y)},"scale"),translate:o(function(e,t){return e===0&t===0?this:new ve(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:o(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:o(function(e){return e*this.k+this.x},"applyX"),applyY:o(function(e){return e*this.k+this.y},"applyY"),invert:o(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:o(function(e){return(e-this.x)/this.k},"invertX"),invertY:o(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:o(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:o(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:o(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};var ot=new ve(1,0,0);sn.prototype=ve.prototype;function sn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ot;return e.__zoom}o(sn,"transform");function Tn(e){e.stopImmediatePropagation()}o(Tn,"nopropagation");function rt(e){e.preventDefault(),e.stopImmediatePropagation()}o(rt,"default");function Dd(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}o(Dd,"defaultFilter");function Rd(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}o(Rd,"defaultExtent");function qi(){return this.__zoom||ot}o(qi,"defaultTransform");function zd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}o(zd,"defaultWheelDelta");function Od(){return navigator.maxTouchPoints||"ontouchstart"in this}o(Od,"defaultTouchable");function $d(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}o($d,"defaultConstrain");function an(){var e=Dd,t=Rd,n=$d,r=zd,i=Od,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],c=250,l=ht,u=et("start","zoom","end"),d,f,h,g=500,p=150,S=0,b=10;function y(x){x.property("__zoom",qi).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",F).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}o(y,"zoom"),y.transform=function(x,E,C,M){var R=x.selection?x.selection():x;R.property("__zoom",qi),x!==R?N(x,E,C,M):R.interrupt().each(function(){_(this,arguments).event(M).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},y.scaleBy=function(x,E,C,M){y.scaleTo(x,function(){var R=this.__zoom.k,D=typeof E=="function"?E.apply(this,arguments):E;return R*D},C,M)},y.scaleTo=function(x,E,C,M){y.transform(x,function(){var R=t.apply(this,arguments),D=this.__zoom,V=C==null?w(R):typeof C=="function"?C.apply(this,arguments):C,B=D.invert(V),L=typeof E=="function"?E.apply(this,arguments):E;return n(m(v(D,L),V,B),R,a)},C,M)},y.translateBy=function(x,E,C,M){y.transform(x,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof C=="function"?C.apply(this,arguments):C),t.apply(this,arguments),a)},null,M)},y.translateTo=function(x,E,C,M,R){y.transform(x,function(){var D=t.apply(this,arguments),V=this.__zoom,B=M==null?w(D):typeof M=="function"?M.apply(this,arguments):M;return n(ot.translate(B[0],B[1]).scale(V.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof C=="function"?-C.apply(this,arguments):-C),D,a)},M,R)};function v(x,E){return E=Math.max(s[0],Math.min(s[1],E)),E===x.k?x:new ve(E,x.x,x.y)}o(v,"scale");function m(x,E,C){var M=E[0]-C[0]*x.k,R=E[1]-C[1]*x.k;return M===x.x&&R===x.y?x:new ve(x.k,M,R)}o(m,"translate");function w(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}o(w,"centroid");function N(x,E,C,M){x.on("start.zoom",function(){_(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(M).end()}).tween("zoom",function(){var R=this,D=arguments,V=_(R,D).event(M),B=t.apply(R,D),L=C==null?w(B):typeof C=="function"?C.apply(R,D):C,U=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),X=R.__zoom,K=typeof E=="function"?E.apply(R,D):E,ee=l(X.invert(L).concat(U/X.k),K.invert(L).concat(U/K.k));return function(G){if(G===1)G=K;else{var $=ee(G),W=U/$[2];G=new ve(W,L[0]-$[0]*W,L[1]-$[1]*W)}V.zoom(null,G)}})}o(N,"schedule");function _(x,E,C){return!C&&x.__zooming||new P(x,E)}o(_,"gesture");function P(x,E){this.that=x,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(x,E),this.taps=0}o(P,"Gesture"),P.prototype={event:o(function(x){return x&&(this.sourceEvent=x),this},"event"),start:o(function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},"start"),zoom:o(function(x,E){return this.mouse&&x!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},"zoom"),end:o(function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},"end"),emit:o(function(x){var E=le(this.that).datum();u.call(x,this.that,new Cr(x,{sourceEvent:this.sourceEvent,target:y,type:x,transform:this.that.__zoom,dispatch:u}),E)},"emit")};function I(x,...E){if(!e.apply(this,arguments))return;var C=_(this,E).event(x),M=this.__zoom,R=Math.max(s[0],Math.min(s[1],M.k*Math.pow(2,r.apply(this,arguments)))),D=fe(x);if(C.wheel)(C.mouse[0][0]!==D[0]||C.mouse[0][1]!==D[1])&&(C.mouse[1]=M.invert(C.mouse[0]=D)),clearTimeout(C.wheel);else{if(M.k===R)return;C.mouse=[D,M.invert(D)],Ve(this),C.start()}rt(x),C.wheel=setTimeout(V,p),C.zoom("mouse",n(m(v(M,R),C.mouse[0],C.mouse[1]),C.extent,a));function V(){C.wheel=null,C.end()}o(V,"wheelidled")}o(I,"wheeled");function T(x,...E){if(h||!e.apply(this,arguments))return;var C=x.currentTarget,M=_(this,E,!0).event(x),R=le(x.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",U,!0),D=fe(x,C),V=x.clientX,B=x.clientY;mt(x.view),Tn(x),M.mouse=[D,this.__zoom.invert(D)],Ve(this),M.start();function L(X){if(rt(X),!M.moved){var K=X.clientX-V,ee=X.clientY-B;M.moved=K*K+ee*ee>S}M.event(X).zoom("mouse",n(m(M.that.__zoom,M.mouse[0]=fe(X,C),M.mouse[1]),M.extent,a))}o(L,"mousemoved");function U(X){R.on("mousemove.zoom mouseup.zoom",null),Xt(X.view,M.moved),rt(X),M.event(X).end()}o(U,"mouseupped")}o(T,"mousedowned");function F(x,...E){if(e.apply(this,arguments)){var C=this.__zoom,M=fe(x.changedTouches?x.changedTouches[0]:x,this),R=C.invert(M),D=C.k*(x.shiftKey?.5:2),V=n(m(v(C,D),M,R),t.apply(this,E),a);rt(x),c>0?le(this).transition().duration(c).call(N,V,M,x):le(this).call(y.transform,V,M,x)}}o(F,"dblclicked");function z(x,...E){if(e.apply(this,arguments)){var C=x.touches,M=C.length,R=_(this,E,x.changedTouches.length===M).event(x),D,V,B,L;for(Tn(x),V=0;V<M;++V)B=C[V],L=fe(B,this),L=[L,this.__zoom.invert(L),B.identifier],R.touch0?!R.touch1&&R.touch0[2]!==L[2]&&(R.touch1=L,R.taps=0):(R.touch0=L,D=!0,R.taps=1+!!d);d&&(d=clearTimeout(d)),D&&(R.taps<2&&(f=L[0],d=setTimeout(function(){d=null},g)),Ve(this),R.start())}}o(z,"touchstarted");function H(x,...E){if(this.__zooming){var C=_(this,E).event(x),M=x.changedTouches,R=M.length,D,V,B,L;for(rt(x),D=0;D<R;++D)V=M[D],B=fe(V,this),C.touch0&&C.touch0[2]===V.identifier?C.touch0[0]=B:C.touch1&&C.touch1[2]===V.identifier&&(C.touch1[0]=B);if(V=C.that.__zoom,C.touch1){var U=C.touch0[0],X=C.touch0[1],K=C.touch1[0],ee=C.touch1[1],G=(G=K[0]-U[0])*G+(G=K[1]-U[1])*G,$=($=ee[0]-X[0])*$+($=ee[1]-X[1])*$;V=v(V,Math.sqrt(G/$)),B=[(U[0]+K[0])/2,(U[1]+K[1])/2],L=[(X[0]+ee[0])/2,(X[1]+ee[1])/2]}else if(C.touch0)B=C.touch0[0],L=C.touch0[1];else return;C.zoom("touch",n(m(V,B,L),C.extent,a))}}o(H,"touchmoved");function O(x,...E){if(this.__zooming){var C=_(this,E).event(x),M=x.changedTouches,R=M.length,D,V;for(Tn(x),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),D=0;D<R;++D)V=M[D],C.touch0&&C.touch0[2]===V.identifier?delete C.touch0:C.touch1&&C.touch1[2]===V.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(V=fe(V,this),Math.hypot(f[0]-V[0],f[1]-V[1])<b)){var B=le(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return o(O,"touchended"),y.wheelDelta=function(x){return arguments.length?(r=typeof x=="function"?x:rn(+x),y):r},y.filter=function(x){return arguments.length?(e=typeof x=="function"?x:rn(!!x),y):e},y.touchable=function(x){return arguments.length?(i=typeof x=="function"?x:rn(!!x),y):i},y.extent=function(x){return arguments.length?(t=typeof x=="function"?x:rn([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),y):t},y.scaleExtent=function(x){return arguments.length?(s[0]=+x[0],s[1]=+x[1],y):[s[0],s[1]]},y.translateExtent=function(x){return arguments.length?(a[0][0]=+x[0][0],a[1][0]=+x[1][0],a[0][1]=+x[0][1],a[1][1]=+x[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(x){return arguments.length?(n=x,y):n},y.duration=function(x){return arguments.length?(c=+x,y):c},y.interpolate=function(x){return arguments.length?(l=x,y):l},y.on=function(){var x=u.on.apply(u,arguments);return x===u?y:x},y.clickDistance=function(x){return arguments.length?(S=(x=+x)*x,y):Math.sqrt(S)},y.tapDistance=function(x){return arguments.length?(b=+x,y):b},y}o(an,"default");var ye={error001:o((e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,"error001"),error002:o(()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.","error002"),error003:o(e=>`Node type "${e}" not found. Using fallback type "default".`,"error003"),error004:o(()=>"The parent container needs a width and a height to render the graph.","error004"),error005:o(()=>"Only child nodes can use a parent extent.","error005"),error006:o(()=>"Can't create edge. An edge needs a source and a target.","error006"),error007:o(e=>`The old edge with id=${e} does not exist.`,"error007"),error009:o(e=>`Marker type "${e}" doesn't exist.`,"error009"),error008:o((e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,"error008"),error010:o(()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.","error010"),error011:o(e=>`Edge type "${e}" not found. Using fallback type "default".`,"error011"),error012:o(e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,"error012"),error013:o((e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,"error013"),error014:o(()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.","error014"),error015:o(()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.","error015"),error016:o(e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`,"error016")},Et=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Pr=["Enter"," ","Escape"],kr={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":o(({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"node.a11yDescription.ariaLiveMessage"),"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},Xe;(function(e){e.Strict="strict",e.Loose="loose"})(Xe||(Xe={}));var $e;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($e||($e={}));var it;(function(e){e.Partial="partial",e.Full="full"})(it||(it={}));var Ar={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Ie;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ie||(Ie={}));var St;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(St||(St={}));var Y;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Y||(Y={}));var Ki={[Y.Left]:Y.Right,[Y.Right]:Y.Left,[Y.Top]:Y.Bottom,[Y.Bottom]:Y.Top};function Tr(e){return e===null?null:e?"valid":"invalid"}o(Tr,"getConnectionStatus");var Dr=o(e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,"isEdgeBase"),cs=o(e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),"isNodeBase"),Rr=o(e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),"isInternalNodeBase");var ln=o((e,t=[0,0])=>{let{width:n,height:r}=Ee(e),i=e.origin??t,s=n*i[0],a=r*i[1];return{x:e.position.x-s,y:e.position.y-a}},"getNodePositionWithOrigin"),un=o((e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((r,i)=>{let s=typeof i=="string",a=!t.nodeLookup&&!s?i:void 0;t.nodeLookup&&(a=s?t.nodeLookup.get(i):Rr(i)?i:t.nodeLookup.get(i.id));let c=a?zn(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ln(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Hn(n)},"getNodesBounds"),Ct=o((e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Ln(n,zn(i)),r=!0)}),r?Hn(n):{x:0,y:0,width:0,height:0}},"getInternalNodesBounds"),On=o((e,t,[n,r,i]=[0,0,1],s=!1,a=!1)=>{let c=(t.x-n)/i,l=(t.y-r)/i,u=t.width/i,d=t.height/i,f=[];for(let h of e.values()){let{measured:g,selectable:p=!0,hidden:S=!1}=h;if(a&&!p||S)continue;let b=g.width??h.width??h.initialWidth??0,y=g.height??h.height??h.initialHeight??0,{x:v,y:m}=h.internals.positionAbsolute,w=hs(c,l,u,d,v,m,b,y),N=b*y,_=s&&w>0;(!h.internals.handleBounds||_||w>=N||h.dragging)&&f.push(h)}return f},"getNodesInside"),ls=o((e,t)=>{let n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))},"getConnectedEdges");function Ld(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{let s;if(t?.includeHiddenNodes){let{width:a,height:c}=Ee(i);s=a>0&&c>0}else s=!!(i.measured.width&&i.measured.height&&!i.hidden);s&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}o(Ld,"getFitViewNodes");async function us({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:s},a){if(e.size===0)return!0;let c=Ld(e,a),l=Ct(c),u=lt(l,t,n,a?.minZoom??i,a?.maxZoom??s,a?.padding??.1);return await r.setViewport(u,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),!0}o(us,"fitViewport");function zr({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:s}){let a=n.get(e),c=a.parentId?n.get(a.parentId):void 0,{x:l,y:u}=c?c.internals.positionAbsolute:{x:0,y:0},d=a.origin??r,f=a.extent||i;if(a.extent==="parent"&&!a.expandParent)if(!c)s?.("005",ye.error005());else{let g=c.measured.width,p=c.measured.height;g&&p&&(f=[[l,u],[l+g,u+p]])}else c&&ct(a.extent)&&(f=[[a.extent[0][0]+l,a.extent[0][1]+u],[a.extent[1][0]+l,a.extent[1][1]+u]]);let h=ct(f)?st(t,f,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&s?.("015",ye.error015()),{position:{x:h.x-l+(a.measured.width??0)*d[0],y:h.y-u+(a.measured.height??0)*d[1]},positionAbsolute:h}}o(zr,"calculateNodePosition");async function ds({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let s=new Set(e.map(h=>h.id)),a=[];for(let h of n){if(h.deletable===!1)continue;let g=s.has(h.id),p=!g&&h.parentId&&a.find(S=>S.id===h.parentId);(g||p)&&a.push(h)}let c=new Set(t.map(h=>h.id)),l=r.filter(h=>h.deletable!==!1),d=ls(a,l);for(let h of l)c.has(h.id)&&!d.find(p=>p.id===h.id)&&d.push(h);if(!i)return{edges:d,nodes:a};let f=await i({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}o(ds,"getElementsToRemove");var vt=o((e,t=0,n=1)=>Math.min(Math.max(e,t),n),"clamp"),st=o((e={x:0,y:0},t,n)=>({x:vt(e.x,t[0][0],t[1][0]-(n?.width??0)),y:vt(e.y,t[0][1],t[1][1]-(n?.height??0))}),"clampPosition");function fs(e,t,n){let{width:r,height:i}=Ee(n),{x:s,y:a}=n.internals.positionAbsolute;return st(e,[[s,a],[s+r,a+i]],t)}o(fs,"clampPositionToParent");var Gi=o((e,t,n)=>e<t?vt(Math.abs(e-t),1,t)/t:e>n?-vt(Math.abs(e-n),1,t)/t:0,"calcAutoPanVelocity"),$n=o((e,t,n=15,r=40)=>{let i=Gi(e.x,r,t.width-r)*n,s=Gi(e.y,r,t.height-r)*n;return[i,s]},"calcAutoPan"),Ln=o((e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),"getBoundsOfBoxes"),Ir=o(({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),"rectToBox"),Hn=o(({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),"boxToRect"),_t=o((e,t=[0,0])=>{let{x:n,y:r}=Rr(e)?e.internals.positionAbsolute:ln(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},"nodeToRect"),zn=o((e,t=[0,0])=>{let{x:n,y:r}=Rr(e)?e.internals.positionAbsolute:ln(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},"nodeToBox"),Or=o((e,t)=>Hn(Ln(Ir(e),Ir(t))),"getBoundsOfRects"),hs=o((e,t,n,r,i,s,a,c)=>{let l=Math.max(0,Math.min(e+n,i+a)-Math.max(e,i)),u=Math.max(0,Math.min(t+r,s+c)-Math.max(t,s));return Math.ceil(l*u)},"getRectsOverlappingArea"),dn=o((e,t)=>hs(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),"getOverlappingArea"),$r=o(e=>we(e.width)&&we(e.height)&&we(e.x)&&we(e.y),"isRectObject"),we=o(e=>!isNaN(e)&&isFinite(e),"isNumeric"),Lr=o((e,t)=>(n,r)=>{},"createDevWarn"),Nt=o((e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),"snapPosition"),Mt=o(({x:e,y:t},[n,r,i],s=!1,a=[1,1])=>{let c={x:(e-n)/i,y:(t-r)/i};return s?Nt(c,a):c},"pointToRendererPoint"),at=o(({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),"rendererPointToPoint");function wt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}o(wt,"parsePadding");function Hd(e,t,n){if(typeof e=="string"||typeof e=="number"){let r=wt(e,n),i=wt(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){let r=wt(e.top??e.y??0,n),i=wt(e.bottom??e.y??0,n),s=wt(e.left??e.x??0,t),a=wt(e.right??e.x??0,t);return{top:r,right:a,bottom:i,left:s,x:s+a,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}o(Hd,"parsePaddings");function Bd(e,t,n,r,i,s){let{x:a,y:c}=at(e,[t,n,r]),{x:l,y:u}=at({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-l,f=s-u;return{left:Math.floor(a),top:Math.floor(c),right:Math.floor(d),bottom:Math.floor(f)}}o(Bd,"calculateAppliedPaddings");var lt=o((e,t,n,r,i,s)=>{let a=Hd(s,t,n),c=(t-a.x)/e.width,l=(n-a.y)/e.height,u=Math.min(c,l),d=vt(u,r,i),f=e.x+e.width/2,h=e.y+e.height/2,g=t/2-f*d,p=n/2-h*d,S=Bd(e,g,p,d,t,n),b={left:Math.min(S.left-a.left,0),top:Math.min(S.top-a.top,0),right:Math.min(S.right-a.right,0),bottom:Math.min(S.bottom-a.bottom,0)};return{x:g-b.left+b.right,y:p-b.top+b.bottom,zoom:d}},"getViewportForBounds"),It=o(()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,"isMacOs");function ct(e){return e!=null&&e!=="parent"}o(ct,"isCoordinateExtent");function Ee(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}o(Ee,"getNodeDimensions");function Bn(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}o(Bn,"nodeHasDimensions");function Hr(e,t={width:0,height:0},n,r,i){let s={...e},a=r.get(n);if(a){let c=a.origin||i;s.x+=a.internals.positionAbsolute.x-(t.width??0)*c[0],s.y+=a.internals.positionAbsolute.y-(t.height??0)*c[1]}return s}o(Hr,"evaluateAbsolutePosition");function Br(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}o(Br,"areSetsEqual");function ps(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}o(ps,"withResolvers");function gs(e){return{...kr,...e||{}}}o(gs,"mergeAriaLabelConfig");function cn(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:s,y:a}=be(e),c=Mt({x:s-(i?.left??0),y:a-(i?.top??0)},r),{x:l,y:u}=n?Nt(c,t):c;return{xSnapped:l,ySnapped:u,...c}}o(cn,"getPointerPosition");var Vn=o(e=>({width:e.offsetWidth,height:e.offsetHeight}),"getDimensions"),Vr=o(e=>e?.getRootNode?.()||window?.document,"getHostForElement"),Vd=["INPUT","SELECT","TEXTAREA"];function Fr(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Vd.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}o(Fr,"isInputDOMNode");var Wr=o(e=>"clientX"in e,"isMouseEvent"),be=o((e,t)=>{let n=Wr(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},"getEventPosition"),Qi=o((e,t,n,r,i)=>{let s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{let c=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:i,position:a.getAttribute("data-handlepos"),x:(c.left-n.left)/r,y:(c.top-n.top)/r,...Vn(a)}})},"getHandleBounds");function Fn({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:c}){let l=e*.125+i*.375+a*.375+n*.125,u=t*.125+s*.375+c*.375+r*.125,d=Math.abs(l-e),f=Math.abs(u-t);return[l,u,d,f]}o(Fn,"getBezierEdgeCenter");function Dn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}o(Dn,"calculateControlOffset");function Ji({pos:e,x1:t,y1:n,x2:r,y2:i,c:s}){switch(e){case Y.Left:return[t-Dn(t-r,s),n];case Y.Right:return[t+Dn(r-t,s),n];case Y.Top:return[t,n-Dn(n-i,s)];case Y.Bottom:return[t,n+Dn(i-n,s)]}}o(Ji,"getControlWithCurvature");function Wn({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:s=Y.Top,curvature:a=.25}){let[c,l]=Ji({pos:n,x1:e,y1:t,x2:r,y2:i,c:a}),[u,d]=Ji({pos:s,x1:r,y1:i,x2:e,y2:t,c:a}),[f,h,g,p]=Fn({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:c,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${c},${l} ${u},${d} ${r},${i}`,f,h,g,p]}o(Wn,"getBezierPath");function Xr({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,s=n<e?n+i:n-i,a=Math.abs(r-t)/2,c=r<t?r+a:r-a;return[s,c,i,a]}o(Xr,"getEdgeCenter");function ms({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return r;let a=i&&n?r+1e3:r,c=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return a+c}o(ms,"getElevatedEdgeZIndex");function ys({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let s=Ln(zn(e),zn(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);let a={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return dn(a,Hn(s))>0}o(ys,"isEdgeVisible");var Fd=o(({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,"getEdgeId"),Wd=o((e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),"connectionExists"),xs=o((e,t,n={})=>{if(!e.source||!e.target)return n.onError?.("006",ye.error006()),t;let r=n.getEdgeId||Fd,i;return Dr(e)?i={...e}:i={...e,id:r(e)},Wd(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))},"addEdge");function Xn({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,s,a,c]=Xr({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,s,a,c]}o(Xn,"getStraightPath");var ji={[Y.Left]:{x:-1,y:0},[Y.Right]:{x:1,y:0},[Y.Top]:{x:0,y:-1},[Y.Bottom]:{x:0,y:1}},Xd=o(({source:e,sourcePosition:t=Y.Bottom,target:n})=>t===Y.Left||t===Y.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},"getDirection"),es=o((e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),"distance");function Yd({source:e,sourcePosition:t=Y.Bottom,target:n,targetPosition:r=Y.Top,center:i,offset:s,stepPosition:a}){let c=ji[t],l=ji[r],u={x:e.x+c.x*s,y:e.y+c.y*s},d={x:n.x+l.x*s,y:n.y+l.y*s},f=Xd({source:u,sourcePosition:t,target:d}),h=f.x!==0?"x":"y",g=f[h],p=[],S,b,y={x:0,y:0},v={x:0,y:0},[,,m,w]=Xr({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[h]*l[h]===-1){h==="x"?(S=i.x??u.x+(d.x-u.x)*a,b=i.y??(u.y+d.y)/2):(S=i.x??(u.x+d.x)/2,b=i.y??u.y+(d.y-u.y)*a);let I=[{x:S,y:u.y},{x:S,y:d.y}],T=[{x:u.x,y:b},{x:d.x,y:b}];c[h]===g?p=h==="x"?I:T:p=h==="x"?T:I}else{let I=[{x:u.x,y:d.y}],T=[{x:d.x,y:u.y}];if(h==="x"?p=c.x===g?T:I:p=c.y===g?I:T,t===r){let x=Math.abs(e[h]-n[h]);if(x<=s){let E=Math.min(s-1,s-x);c[h]===g?y[h]=(u[h]>e[h]?-1:1)*E:v[h]=(d[h]>n[h]?-1:1)*E}}if(t!==r){let x=h==="x"?"y":"x",E=c[h]===l[x],C=u[x]>d[x],M=u[x]<d[x];(c[h]===1&&(!E&&C||E&&M)||c[h]!==1&&(!E&&M||E&&C))&&(p=h==="x"?I:T)}let F={x:u.x+y.x,y:u.y+y.y},z={x:d.x+v.x,y:d.y+v.y},H=Math.max(Math.abs(F.x-p[0].x),Math.abs(z.x-p[0].x)),O=Math.max(Math.abs(F.y-p[0].y),Math.abs(z.y-p[0].y));H>=O?(S=(F.x+z.x)/2,b=p[0].y):(S=p[0].x,b=(F.y+z.y)/2)}let N={x:u.x+y.x,y:u.y+y.y},_={x:d.x+v.x,y:d.y+v.y};return[[e,...N.x!==p[0].x||N.y!==p[0].y?[N]:[],...p,..._.x!==p[p.length-1].x||_.y!==p[p.length-1].y?[_]:[],n],S,b,m,w]}o(Yd,"getPoints");function Zd(e,t,n,r){let i=Math.min(es(e,t)/2,es(t,n)/2,r),{x:s,y:a}=t;if(e.x===s&&s===n.x||e.y===a&&a===n.y)return`L${s} ${a}`;if(e.y===a){let u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*d}`}let c=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${s},${a+i*l}Q ${s},${a} ${s+i*c},${a}`}o(Zd,"getBend");function fn({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:i,targetPosition:s=Y.Top,borderRadius:a=5,centerX:c,centerY:l,offset:u=20,stepPosition:d=.5}){let[f,h,g,p,S]=Yd({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:s,center:{x:c,y:l},offset:u,stepPosition:d}),b=`M${f[0].x} ${f[0].y}`;for(let y=1;y<f.length-1;y++)b+=Zd(f[y-1],f[y],f[y+1],a);return b+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[b,h,g,p,S]}o(fn,"getSmoothStepPath");function ts(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}o(ts,"isNodeInitialized");function ws(e){let{sourceNode:t,targetNode:n}=e;if(!ts(t)||!ts(n))return null;let r=t.internals.handleBounds||ns(t.handles),i=n.internals.handleBounds||ns(n.handles),s=os(r?.source??[],e.sourceHandle),a=os(e.connectionMode===Xe.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!s||!a)return e.onError?.("008",ye.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let c=s?.position||Y.Bottom,l=a?.position||Y.Top,u=Ye(t,s,c),d=Ye(n,a,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:c,targetPosition:l}}o(ws,"getEdgePosition");function ns(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}o(ns,"toHandleBounds");function Ye(e,t,n=Y.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,s=(t?.y??0)+e.internals.positionAbsolute.y,{width:a,height:c}=t??Ee(e);if(r)return{x:i+a/2,y:s+c/2};switch(t?.position??n){case Y.Top:return{x:i+a/2,y:s};case Y.Right:return{x:i+a,y:s+c/2};case Y.Bottom:return{x:i+a/2,y:s+c};case Y.Left:return{x:i,y:s+c/2}}}o(Ye,"getHandlePosition");function os(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}o(os,"getHandle$1");function Yn(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}o(Yn,"getMarkerId");function bs(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let s=new Set;return e.reduce((a,c)=>([c.markerStart||r,c.markerEnd||i].forEach(l=>{if(l&&typeof l=="object"){let u=Yn(l,t);s.has(u)||(a.push({id:u,color:l.color||n,...l}),s.add(u))}}),a),[]).sort((a,c)=>a.id.localeCompare(c.id))}o(bs,"createMarkerIds");var Ss=1e3,Ud=10,Yr={nodeOrigin:[0,0],nodeExtent:Et,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},qd={...Yr,checkEquality:!0};function Zr(e,t){let n={...e};for(let r in t)t[r]!==void 0&&(n[r]=t[r]);return n}o(Zr,"mergeObjects");function vs(e,t,n){let r=Zr(Yr,n);for(let i of e.values())if(i.parentId)qr(i,e,t,r);else{let s=ln(i,r.nodeOrigin),a=ct(i.extent)?i.extent:r.nodeExtent,c=st(s,a,Ee(i));i.internals.positionAbsolute=c}}o(vs,"updateAbsolutePositions");function Kd(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let i of e.handles){let s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(s):i.type==="target"&&r.push(s)}return{source:n,target:r}}o(Kd,"parseHandles");function Ur(e){return e==="manual"}o(Ur,"isManualZIndexMode");function Zn(e,t,n,r={}){let i=Zr(qd,r),s={i:0},a=new Map(t),c=i?.elevateNodesOnSelect&&!Ur(i.zIndexMode)?Ss:0,l=e.length>0,u=!1;t.clear(),n.clear();for(let d of e){let f=a.get(d.id);if(i.checkEquality&&d===f?.internals.userNode)t.set(d.id,f);else{let h=ln(d,i.nodeOrigin),g=ct(d.extent)?d.extent:i.nodeExtent,p=st(h,g,Ee(d));f={...i.defaults,...d,measured:{width:d.measured?.width,height:d.measured?.height},internals:{positionAbsolute:p,handleBounds:Kd(d,f),z:Es(d,c,i.zIndexMode),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(l=!1),d.parentId&&qr(f,t,n,r,s),u||=d.selected??!1}return{nodesInitialized:l,hasSelectedNodes:u}}o(Zn,"adoptUserNodes");function Gd(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}o(Gd,"updateParentLookup");function qr(e,t,n,r,i){let{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:c,zIndexMode:l}=Zr(Yr,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Gd(e,n),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&l==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*Ud),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);let f=s&&!Ur(l)?Ss:0,{x:h,y:g,z:p}=Qd(e,d,a,c,f,l),{positionAbsolute:S}=e.internals,b=h!==S.x||g!==S.y;(b||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:h,y:g}:S,z:p}})}o(qr,"updateChildNode");function Es(e,t,n){let r=we(e.zIndex)?e.zIndex:0;return Ur(n)?r:r+(e.selected?t:0)}o(Es,"calculateZ");function Qd(e,t,n,r,i,s){let{x:a,y:c}=t.internals.positionAbsolute,l=Ee(e),u=ln(e,n),d=ct(e.extent)?st(u,e.extent,l):u,f=st({x:a+d.x,y:c+d.y},r,l);e.extent==="parent"&&(f=fs(f,l,t));let h=Es(e,i,s),g=t.internals.z??0;return{x:f.x,y:f.y,z:g>=h?g+1:h}}o(Qd,"calculateChildXYZ");function Un(e,t,n,r=[0,0]){let i=[],s=new Map;for(let a of e){let c=t.get(a.parentId);if(!c)continue;let l=s.get(a.parentId)?.expandedRect??_t(c),u=Or(l,a.rect);s.set(a.parentId,{expandedRect:u,parent:c})}return s.size>0&&s.forEach(({expandedRect:a,parent:c},l)=>{let u=c.internals.positionAbsolute,d=Ee(c),f=c.origin??r,h=a.x<u.x?Math.round(Math.abs(u.x-a.x)):0,g=a.y<u.y?Math.round(Math.abs(u.y-a.y)):0,p=Math.max(d.width,Math.round(a.width)),S=Math.max(d.height,Math.round(a.height)),b=(p-d.width)*f[0],y=(S-d.height)*f[1];(h>0||g>0||b||y)&&(i.push({id:l,type:"position",position:{x:c.position.x-h+b,y:c.position.y-g+y}}),n.get(l)?.forEach(v=>{e.some(m=>m.id===v.id)||i.push({id:v.id,type:"position",position:{x:v.position.x+h,y:v.position.y+g}})})),(d.width<a.width||d.height<a.height||h||g)&&i.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:p+(h?f[0]*h-b:0),height:S+(g?f[1]*g-y:0)}})}),i}o(Un,"handleExpandParent");function Cs(e,t,n,r,i,s,a){let c=r?.querySelector(".xyflow__viewport"),l=!1;if(!c)return{changes:[],updatedInternals:l};let u=[],d=window.getComputedStyle(c),{m22:f}=new window.DOMMatrixReadOnly(d.transform),h=[];for(let g of e.values()){let p=t.get(g.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}let S=Vn(g.nodeElement),b=p.measured.width!==S.width||p.measured.height!==S.height;if(!!(S.width&&S.height&&(b||!p.internals.handleBounds||g.force))){let v=g.nodeElement.getBoundingClientRect(),m=ct(p.extent)?p.extent:s,{positionAbsolute:w}=p.internals;if(p.parentId&&p.extent==="parent"){let _=t.get(p.parentId);_&&(w=fs(w,S,_))}else m&&(w=st(w,m,S));let N={...p,measured:S,internals:{...p.internals,positionAbsolute:w,handleBounds:{source:Qi("source",g.nodeElement,v,f,p.id),target:Qi("target",g.nodeElement,v,f,p.id)}}};t.set(p.id,N),p.parentId&&qr(N,t,n,{nodeOrigin:i,zIndexMode:a}),l=!0,b&&(u.push({id:p.id,type:"dimensions",dimensions:S}),p.expandParent&&p.parentId&&h.push({id:p.id,parentId:p.parentId,rect:_t(N,i)}))}}if(h.length>0){let g=Un(h,t,n,i);u.push(...g)}return{changes:u,updatedInternals:l}}o(Cs,"updateNodeInternals");async function _s({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:s}){if(!t||!e.x&&!e.y)return!1;let a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,s]],r);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}o(_s,"panBy");function rs(e,t,n,r,i,s){let a=i,c=r.get(a)||new Map;r.set(a,c.set(n,t)),a=`${i}-${e}`;let l=r.get(a)||new Map;if(r.set(a,l.set(n,t)),s){a=`${i}-${e}-${s}`;let u=r.get(a)||new Map;r.set(a,u.set(n,t))}}o(rs,"addConnectionToLookup");function Kr(e,t,n){e.clear(),t.clear();for(let r of n){let{source:i,target:s,sourceHandle:a=null,targetHandle:c=null}=r,l={edgeId:r.id,source:i,target:s,sourceHandle:a,targetHandle:c},u=`${i}-${a}--${s}-${c}`,d=`${s}-${c}--${i}-${a}`;rs("source",l,d,e,i,a),rs("target",l,u,e,s,c),t.set(r.id,r)}}o(Kr,"updateConnectionLookup");function Ns(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Ns(n,t):!1}o(Ns,"isParentSelected");function is(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}o(is,"hasSelector");function Jd(e,t,n,r){let i=new Map;for(let[s,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!Ns(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){let c=e.get(s);c&&i.set(s,{id:s,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return i}o(Jd,"getDragItems");function _r({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[a,c]of t){let l=n.get(a)?.internals.userNode;l&&i.push({...l,position:c.position,dragging:r})}if(!e)return[i[0],i];let s=n.get(e)?.internals.userNode;return[s?{...s,position:t.get(e)?.position||s.position,dragging:r}:i[0],i]}o(_r,"getEventHandlerParams");function jd({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let s={x:n-i.distance.x,y:r-i.distance.y},a=Nt(s,t);return{x:a.x-s.x,y:a.y-s.y}}o(jd,"calculateSnapOffset");function Ms({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let s={x:null,y:null},a=0,c=new Map,l=!1,u={x:0,y:0},d=null,f=!1,h=null,g=!1,p=!1,S=null;function b({noDragClassName:v,handleSelector:m,domNode:w,isSelectable:N,nodeId:_,nodeClickDistance:P=0}){h=le(w);function I({x:H,y:O}){let{nodeLookup:x,nodeExtent:E,snapGrid:C,snapToGrid:M,nodeOrigin:R,onNodeDrag:D,onSelectionDrag:V,onError:B,updateNodePositions:L}=t();s={x:H,y:O};let U=!1,X=c.size>1,K=X&&E?Ir(Ct(c)):null,ee=X&&M?jd({dragItems:c,snapGrid:C,x:H,y:O}):null;for(let[G,$]of c){if(!x.has(G))continue;let W={x:H-$.distance.x,y:O-$.distance.y};M&&(W=ee?{x:Math.round(W.x+ee.x),y:Math.round(W.y+ee.y)}:Nt(W,C));let j=null;if(X&&E&&!$.extent&&K){let{positionAbsolute:Q}=$.internals,ne=Q.x-K.x+E[0][0],oe=Q.x+$.measured.width-K.x2+E[1][0],se=Q.y-K.y+E[0][1],pe=Q.y+$.measured.height-K.y2+E[1][1];j=[[ne,se],[oe,pe]]}let{position:J,positionAbsolute:q}=zr({nodeId:G,nextPosition:W,nodeLookup:x,nodeExtent:j||E,nodeOrigin:R,onError:B});U=U||$.position.x!==J.x||$.position.y!==J.y,$.position=J,$.internals.positionAbsolute=q}if(p=p||U,!!U&&(L(c,!0),S&&(r||D||!_&&V))){let[G,$]=_r({nodeId:_,dragItems:c,nodeLookup:x});r?.(S,c,G,$),D?.(S,G,$),_||V?.(S,$)}}o(I,"updateNodes");async function T(){if(!d)return;let{transform:H,panBy:O,autoPanSpeed:x,autoPanOnNodeDrag:E}=t();if(!E){l=!1,cancelAnimationFrame(a);return}let[C,M]=$n(u,d,x);(C!==0||M!==0)&&(s.x=(s.x??0)-C/H[2],s.y=(s.y??0)-M/H[2],await O({x:C,y:M})&&I(s)),a=requestAnimationFrame(T)}o(T,"autoPan");function F(H){let{nodeLookup:O,multiSelectionActive:x,nodesDraggable:E,transform:C,snapGrid:M,snapToGrid:R,selectNodesOnDrag:D,onNodeDragStart:V,onSelectionDragStart:B,unselectNodesAndEdges:L}=t();f=!0,(!D||!N)&&!x&&_&&(O.get(_)?.selected||L()),N&&D&&_&&e?.(_);let U=cn(H.sourceEvent,{transform:C,snapGrid:M,snapToGrid:R,containerBounds:d});if(s=U,c=Jd(O,E,U,_),c.size>0&&(n||V||!_&&B)){let[X,K]=_r({nodeId:_,dragItems:c,nodeLookup:O});n?.(H.sourceEvent,c,X,K),V?.(H.sourceEvent,X,K),_||B?.(H.sourceEvent,K)}}o(F,"startDrag");let z=Ut().clickDistance(P).on("start",H=>{let{domNode:O,nodeDragThreshold:x,transform:E,snapGrid:C,snapToGrid:M}=t();d=O?.getBoundingClientRect()||null,g=!1,p=!1,S=H.sourceEvent,x===0&&F(H),s=cn(H.sourceEvent,{transform:E,snapGrid:C,snapToGrid:M,containerBounds:d}),u=be(H.sourceEvent,d)}).on("drag",H=>{let{autoPanOnNodeDrag:O,transform:x,snapGrid:E,snapToGrid:C,nodeDragThreshold:M,nodeLookup:R}=t(),D=cn(H.sourceEvent,{transform:x,snapGrid:E,snapToGrid:C,containerBounds:d});if(S=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||_&&!R.has(_))&&(g=!0),!g){if(!l&&O&&f&&(l=!0,T()),!f){let V=be(H.sourceEvent,d),B=V.x-u.x,L=V.y-u.y;Math.sqrt(B*B+L*L)>M&&F(H)}(s.x!==D.xSnapped||s.y!==D.ySnapped)&&c&&f&&(u=be(H.sourceEvent,d),I(D))}}).on("end",H=>{if(!f||g){g&&c.size>0&&t().updateNodePositions(c,!1);return}if(l=!1,f=!1,cancelAnimationFrame(a),c.size>0){let{nodeLookup:O,updateNodePositions:x,onNodeDragStop:E,onSelectionDragStop:C}=t();if(p&&(x(c,!1),p=!1),i||E||!_&&C){let[M,R]=_r({nodeId:_,dragItems:c,nodeLookup:O,dragging:!1});i?.(H.sourceEvent,c,M,R),E?.(H.sourceEvent,M,R),_||C?.(H.sourceEvent,R)}}}).filter(H=>{let O=H.target;return!H.button&&(!v||!is(O,`.${v}`,w))&&(!m||is(O,m,w))});h.call(z)}o(b,"update");function y(){h?.on(".drag",null)}return o(y,"destroy"),{update:b,destroy:y}}o(Ms,"XYDrag");function ef(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let s of t.values())dn(i,_t(s))>0&&r.push(s);return r}o(ef,"getNodesWithinDistance");var tf=250;function nf(e,t,n,r){let i=[],s=1/0,a=ef(e,n,t+tf);for(let c of a){let l=[...c.internals.handleBounds?.source??[],...c.internals.handleBounds?.target??[]];for(let u of l){if(r.nodeId===u.nodeId&&r.type===u.type&&r.id===u.id)continue;let{x:d,y:f}=Ye(c,u,u.position,!0),h=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(f-e.y,2));h>t||(h<s?(i=[{...u,x:d,y:f}],s=h):h===s&&i.push({...u,x:d,y:f}))}}if(!i.length)return null;if(i.length>1){let c=r.type==="source"?"target":"source";return i.find(l=>l.type===c)??i[0]}return i[0]}o(nf,"getClosestHandle");function Is(e,t,n,r,i,s=!1){let a=r.get(e);if(!a)return null;let c=i==="strict"?a.internals.handleBounds?.[t]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],l=(n?c?.find(u=>u.id===n):c?.[0])??null;return l&&s?{...l,...Ye(a,l,l.position,!0)}:l}o(Is,"getHandle");function Ps(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}o(Ps,"getHandleType");function of(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}o(of,"isConnectionValid");var ks=o(()=>!0,"alwaysValid");function rf(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:c,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:f,panBy:h,cancelConnection:g,onConnectStart:p,onConnect:S,onConnectEnd:b,isValidConnection:y=ks,onReconnectEnd:v,updateConnection:m,getTransform:w,getFromHandle:N,autoPanSpeed:_,dragThreshold:P=1,handleDomNode:I}){let T=Vr(e.target),F=0,z,{x:H,y:O}=be(e),x=Ps(s,I),E=c?.getBoundingClientRect(),C=!1;if(!E||!x)return;let M=Is(i,x,r,l,t);if(!M)return;let R=be(e,E),D=!1,V=null,B=!1,L=null;function U(){if(!d||!E)return;let[J,q]=$n(R,E,_);h({x:J,y:q}),F=requestAnimationFrame(U)}o(U,"autoPan");let X={...M,nodeId:i,type:x,position:M.position},K=l.get(i),G={inProgress:!0,isValid:null,from:Ye(K,X,Y.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:K,to:R,toHandle:null,toPosition:Ki[X.position],toNode:null,pointer:R};function $(){C=!0,m(G),p?.(e,{nodeId:i,handleId:r,handleType:x})}o($,"startConnection"),P===0&&$();function W(J){if(!C){let{x:pe,y:Pe}=be(J),_e=pe-H,Ne=Pe-O;if(!(_e*_e+Ne*Ne>P*P))return;$()}if(!N()||!X){j(J);return}let q=w();R=be(J,E),z=nf(Mt(R,q,!1,[1,1]),n,l,X),D||(U(),D=!0);let Q=As(J,{handle:z,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:a?"target":"source",isValidConnection:y,doc:T,lib:u,flowId:f,nodeLookup:l});L=Q.handleDomNode,V=Q.connection,B=of(!!z,Q.isValid);let ne=l.get(i),oe=ne?Ye(ne,X,Y.Left,!0):G.from,se={...G,from:oe,isValid:B,to:Q.toHandle&&B?at({x:Q.toHandle.x,y:Q.toHandle.y},q):R,toHandle:Q.toHandle,toPosition:B&&Q.toHandle?Q.toHandle.position:Ki[X.position],toNode:Q.toHandle?l.get(Q.toHandle.nodeId):null,pointer:R};m(se),G=se}o(W,"onPointerMove");function j(J){if(!("touches"in J&&J.touches.length>0)){if(C){(z||L)&&V&&B&&S?.(V);let{inProgress:q,...Q}=G,ne={...Q,toPosition:G.toHandle?G.toPosition:null};b?.(J,ne),s&&v?.(J,ne)}g(),cancelAnimationFrame(F),D=!1,B=!1,V=null,L=null,T.removeEventListener("mousemove",W),T.removeEventListener("mouseup",j),T.removeEventListener("touchmove",W),T.removeEventListener("touchend",j)}}o(j,"onPointerUp"),T.addEventListener("mousemove",W),T.addEventListener("mouseup",j),T.addEventListener("touchmove",W),T.addEventListener("touchend",j)}o(rf,"onPointerDown");function As(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:s,doc:a,lib:c,flowId:l,isValidConnection:u=ks,nodeLookup:d}){let f=s==="target",h=t?a.querySelector(`.${c}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:p}=be(e),S=a.elementFromPoint(g,p),b=S?.classList.contains(`${c}-flow__handle`)?S:h,y={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){let v=Ps(void 0,b),m=b.getAttribute("data-nodeid"),w=b.getAttribute("data-handleid"),N=b.classList.contains("connectable"),_=b.classList.contains("connectableend");if(!m||!v)return y;let P={source:f?m:r,sourceHandle:f?w:i,target:f?r:m,targetHandle:f?i:w};y.connection=P;let T=N&&_&&(n===Xe.Strict?f&&v==="source"||!f&&v==="target":m!==r||w!==i);y.isValid=T&&u(P),y.toHandle=Is(m,v,w,d,n,!0)}return y}o(As,"isValidHandle");var qn={onPointerDown:rf,isValid:As};function Ts({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=le(e);function s({translateExtent:c,width:l,height:u,zoomStep:d=1,pannable:f=!0,zoomable:h=!0,inversePan:g=!1}){let p=o(m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let w=n(),N=m.sourceEvent.ctrlKey&&It()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*d,P=w[2]*Math.pow(2,_*N);t.scaleTo(P)},"zoomHandler"),S=[0,0],b=o(m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(S=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},"panStartHandler"),y=o(m=>{let w=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let N=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[N[0]-S[0],N[1]-S[1]];S=N;let P=r()*Math.max(w[2],Math.log(w[2]))*(g?-1:1),I={x:w[0]-_[0]*P,y:w[1]-_[1]*P},T=[[0,0],[l,u]];t.setViewportConstrained({x:I.x,y:I.y,zoom:w[2]},T,c)},"panHandler"),v=an().on("start",b).on("zoom",f?y:null).on("zoom.wheel",h?p:null);i.call(v,{})}o(s,"update");function a(){i.on("zoom",null)}return o(a,"destroy"),{update:s,destroy:a,pointer:fe}}o(Ts,"XYMinimap");var Kn=o(e=>({x:e.x,y:e.y,zoom:e.k}),"transformToViewport"),Nr=o(({x:e,y:t,zoom:n})=>ot.translate(e,t).scale(n),"viewportToTransform"),bt=o((e,t)=>e.target.closest(`.${t}`),"isWrappedWithClass"),Ds=o((e,t)=>t===2&&Array.isArray(e)&&e.includes(2),"isRightClickPan"),sf=o(e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,"defaultEase"),Mr=o((e,t=0,n=sf,r=()=>{})=>{let i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},"getD3Transition"),Rs=o(e=>{let t=e.ctrlKey&&It()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},"wheelDelta");function af({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(bt(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let f=n.property("__zoom").k||1;if(d.ctrlKey&&a){let b=fe(d),y=Rs(d),v=f*Math.pow(2,y);r.scaleTo(n,v,b,d);return}let h=d.deltaMode===1?20:1,g=i===$e.Vertical?0:d.deltaX*h,p=i===$e.Horizontal?0:d.deltaY*h;!It()&&d.shiftKey&&i!==$e.Vertical&&(g=d.deltaY*h,p=0),r.translateBy(n,-(g/f)*s,-(p/f)*s,{internal:!0});let S=Kn(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?l?.(d,S):(e.isPanScrolling=!0,c?.(d,S)),e.panScrollTimeout=setTimeout(()=>{u?.(d,S),e.isPanScrolling=!1},150)}}o(af,"createPanOnScrollHandler");function cf({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let s=r.type==="wheel",a=!t&&s&&!r.ctrlKey,c=bt(r,e);if(r.ctrlKey&&s&&c&&r.preventDefault(),a||c)return null;r.preventDefault(),n.call(this,r,i)}}o(cf,"createZoomOnScrollHandler");function lf({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=Kn(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,i)}}o(lf,"createPanZoomStartHandler");function uf({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return s=>{e.usedRightMouseButton=!!(n&&Ds(t,e.mouseButton??0)),s.sourceEvent?.sync||r([s.transform.x,s.transform.y,s.transform.k]),i&&!s.sourceEvent?.internal&&i?.(s.sourceEvent,Kn(s.transform))}}o(uf,"createPanZoomHandler");function df({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:s}){return a=>{if(!a.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,s&&Ds(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let c=Kn(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(a.sourceEvent,c)},n?150:0)}}}o(df,"createPanZoomEndHandler");function ff({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let h=e||t,g=n&&f.ctrlKey,p=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(bt(f,`${u}-flow__node`)||bt(f,`${u}-flow__edge`)))return!0;if(!r&&!h&&!i&&!s&&!n||a||d&&!p||bt(f,c)&&p||bt(f,l)&&(!p||i&&p&&!e)||!n&&f.ctrlKey&&p)return!1;if(!n&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!h&&!i&&!g&&p||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;let S=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||p)&&S}}o(ff,"createFilter");function zs({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:l}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=[[0,0],[d.width,d.height]];(typeof ResizeObserver<"u"?new ResizeObserver(O=>{let x=O[0];x&&(f=[[0,0],[x.contentRect.width,x.contentRect.height]])}):null)?.observe(e);let g=an().extent(()=>f).scaleExtent([t,n]).translateExtent(r),p=le(e).call(g);w({x:i.x,y:i.y,zoom:vt(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);let S=p.on("wheel.zoom"),b=p.on("dblclick.zoom");g.wheelDelta(Rs);async function y(O,x){return p?new Promise(E=>{g?.interpolate(x?.interpolate==="linear"?yn:ht).transform(Mr(p,x?.duration,x?.ease,()=>E(!0)),O)}):!1}o(y,"setTransform");function v({noWheelClassName:O,noPanClassName:x,onPaneContextMenu:E,userSelectionActive:C,panOnScroll:M,panOnDrag:R,panOnScrollMode:D,panOnScrollSpeed:V,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:U,zoomOnDoubleClick:X,zoomActivationKeyPressed:K,lib:ee,onTransformChange:G,connectionInProgress:$,paneClickDistance:W,selectionOnDrag:j}){C&&!u.isZoomingOrPanning&&m();let J=M&&!K&&!C;g.clickDistance(j?1/0:!we(W)||W<0?0:W);let q=J?af({zoomPanValues:u,noWheelClassName:O,d3Selection:p,d3Zoom:g,panOnScrollMode:D,panOnScrollSpeed:V,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:c}):cf({noWheelClassName:O,preventScrolling:B,d3ZoomHandler:S});p.on("wheel.zoom",q,{passive:!1});let Q=lf({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:a});g.on("start",Q);let ne=uf({zoomPanValues:u,panOnDrag:R,onPaneContextMenu:!!E,onPanZoom:s,onTransformChange:G});g.on("zoom",ne);let oe=df({zoomPanValues:u,panOnDrag:R,panOnScroll:M,onPaneContextMenu:E,onPanZoomEnd:c,onDraggingChange:l});g.on("end",oe);let se=ff({zoomActivationKeyPressed:K,panOnDrag:R,zoomOnScroll:U,panOnScroll:M,zoomOnDoubleClick:X,zoomOnPinch:L,userSelectionActive:C,noPanClassName:x,noWheelClassName:O,lib:ee,connectionInProgress:$});g.filter(se),X?p.on("dblclick.zoom",b):p.on("dblclick.zoom",null)}o(v,"update");function m(){g.on("zoom",null)}o(m,"destroy");async function w(O,x,E){let C=Nr(O),M=g?.constrain()(C,x,E);return M&&await y(M),M}o(w,"setViewportConstrained");async function N(O,x){let E=Nr(O);return await y(E,x),E}o(N,"setViewport");function _(O){if(p){let x=Nr(O),E=p.property("__zoom");(E.k!==O.zoom||E.x!==O.x||E.y!==O.y)&&g?.transform(p,x,null,{sync:!0})}}o(_,"syncViewport");function P(){let O=p?sn(p.node()):{x:0,y:0,k:1};return{x:O.x,y:O.y,zoom:O.k}}o(P,"getViewport");async function I(O,x){return p?new Promise(E=>{g?.interpolate(x?.interpolate==="linear"?yn:ht).scaleTo(Mr(p,x?.duration,x?.ease,()=>E(!0)),O)}):!1}o(I,"scaleTo");async function T(O,x){return p?new Promise(E=>{g?.interpolate(x?.interpolate==="linear"?yn:ht).scaleBy(Mr(p,x?.duration,x?.ease,()=>E(!0)),O)}):!1}o(T,"scaleBy");function F(O){g?.scaleExtent(O)}o(F,"setScaleExtent");function z(O){g?.translateExtent(O)}o(z,"setTranslateExtent");function H(O){let x=!we(O)||O<0?0:O;g?.clickDistance(x)}return o(H,"setClickDistance"),{update:v,destroy:m,setViewport:N,setViewportConstrained:w,getViewport:P,scaleTo:I,scaleBy:T,setScaleExtent:F,setTranslateExtent:z,syncViewport:_,setClickDistance:H}}o(zs,"XYPanZoom");var Ze;(function(e){e.Line="line",e.Handle="handle"})(Ze||(Ze={}));function hf({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:s}){let a=e-t,c=n-r,l=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&i&&(l[0]=l[0]*-1),c&&s&&(l[1]=l[1]*-1),l}o(hf,"getResizeDirection");function ss(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}o(ss,"getControlDirection");function Fe(e,t){return Math.max(0,t-e)}o(Fe,"getLowerExtentClamp");function We(e,t){return Math.max(0,e-t)}o(We,"getUpperExtentClamp");function Rn(e,t,n){return Math.max(0,t-e,e-n)}o(Rn,"getSizeClamp");function as(e,t){return e?!t:t}o(as,"xor");function pf(e,t,n,r,i,s,a,c){let{affectsX:l,affectsY:u}=t,{isHorizontal:d,isVertical:f}=t,h=d&&f,{xSnapped:g,ySnapped:p}=n,{minWidth:S,maxWidth:b,minHeight:y,maxHeight:v}=r,{x:m,y:w,width:N,height:_,aspectRatio:P}=e,I=Math.floor(d?g-e.pointerX:0),T=Math.floor(f?p-e.pointerY:0),F=N+(l?-I:I),z=_+(u?-T:T),H=-s[0]*N,O=-s[1]*_,x=Rn(F,S,b),E=Rn(z,y,v);if(a){let R=0,D=0;l&&I<0?R=Fe(m+I+H,a[0][0]):!l&&I>0&&(R=We(m+F+H,a[1][0])),u&&T<0?D=Fe(w+T+O,a[0][1]):!u&&T>0&&(D=We(w+z+O,a[1][1])),x=Math.max(x,R),E=Math.max(E,D)}if(c){let R=0,D=0;l&&I>0?R=We(m+I,c[0][0]):!l&&I<0&&(R=Fe(m+F,c[1][0])),u&&T>0?D=We(w+T,c[0][1]):!u&&T<0&&(D=Fe(w+z,c[1][1])),x=Math.max(x,R),E=Math.max(E,D)}if(i){if(d){let R=Rn(F/P,y,v)*P;if(x=Math.max(x,R),a){let D=0;!l&&!u||l&&!u&&h?D=We(w+O+F/P,a[1][1])*P:D=Fe(w+O+(l?I:-I)/P,a[0][1])*P,x=Math.max(x,D)}if(c){let D=0;!l&&!u||l&&!u&&h?D=Fe(w+F/P,c[1][1])*P:D=We(w+(l?I:-I)/P,c[0][1])*P,x=Math.max(x,D)}}if(f){let R=Rn(z*P,S,b)/P;if(E=Math.max(E,R),a){let D=0;!l&&!u||u&&!l&&h?D=We(m+z*P+H,a[1][0])/P:D=Fe(m+(u?T:-T)*P+H,a[0][0])/P,E=Math.max(E,D)}if(c){let D=0;!l&&!u||u&&!l&&h?D=Fe(m+z*P,c[1][0])/P:D=We(m+(u?T:-T)*P,c[0][0])/P,E=Math.max(E,D)}}}T=T+(T<0?E:-E),I=I+(I<0?x:-x),i&&(h?F>z*P?T=(as(l,u)?-I:I)/P:I=(as(l,u)?-T:T)*P:d?(T=I/P,u=l):(I=T*P,l=u));let C=l?m+I:m,M=u?w+T:w;return{width:N+(l?-I:I),height:_+(u?-T:T),x:s[0]*I*(l?-1:1)+C,y:s[1]*T*(u?-1:1)+M}}o(pf,"getDimensionsAfterResize");var Os={width:0,height:0,x:0,y:0},gf={...Os,pointerX:0,pointerY:0,aspectRatio:1};function mf(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,c=n[0]*s,l=n[1]*a;return[[r-c,i-l],[r+s-c,i+a-l]]}o(mf,"nodeToChildExtent");function $s({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let s=le(e),a={controlDirection:ss("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:h,onResizeStart:g,onResize:p,onResizeEnd:S,shouldResize:b}){let y={...Os},v={...gf};a={boundaries:d,resizeDirection:h,keepAspectRatio:f,controlDirection:ss(u)};let m,w=null,N=[],_,P,I,T=!1,F=Ut().on("start",z=>{let{nodeLookup:H,transform:O,snapGrid:x,snapToGrid:E,nodeOrigin:C,paneDomNode:M}=n();if(m=H.get(t),!m)return;w=M?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:D}=cn(z.sourceEvent,{transform:O,snapGrid:x,snapToGrid:E,containerBounds:w});y={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},v={...y,pointerX:R,pointerY:D,aspectRatio:y.width/y.height},_=void 0,P=ct(m.extent)?m.extent:void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=H.get(m.parentId)),_&&m.extent==="parent"&&(P=[[0,0],[_.measured.width,_.measured.height]]),N=[],I=void 0;for(let[V,B]of H)if(B.parentId===t&&(N.push({id:V,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){let L=mf(B,m,B.origin??C);I?I=[[Math.min(L[0][0],I[0][0]),Math.min(L[0][1],I[0][1])],[Math.max(L[1][0],I[1][0]),Math.max(L[1][1],I[1][1])]]:I=L}g?.(z,{...y})}).on("drag",z=>{let{transform:H,snapGrid:O,snapToGrid:x,nodeOrigin:E}=n(),C=cn(z.sourceEvent,{transform:H,snapGrid:O,snapToGrid:x,containerBounds:w}),M=[];if(!m)return;let{x:R,y:D,width:V,height:B}=y,L={},U=m.origin??E,{width:X,height:K,x:ee,y:G}=pf(v,a.controlDirection,C,a.boundaries,a.keepAspectRatio,U,P,I),$=X!==V,W=K!==B,j=ee!==R&&$,J=G!==D&&W;if(!j&&!J&&!$&&!W)return;if((j||J||U[0]===1||U[1]===1)&&(L.x=j?ee:y.x,L.y=J?G:y.y,y.x=L.x,y.y=L.y,N.length>0)){let oe=ee-R,se=G-D;for(let pe of N)pe.position={x:pe.position.x-oe+U[0]*(X-V),y:pe.position.y-se+U[1]*(K-B)},M.push(pe)}if(($||W)&&(L.width=$&&(!a.resizeDirection||a.resizeDirection==="horizontal")?X:y.width,L.height=W&&(!a.resizeDirection||a.resizeDirection==="vertical")?K:y.height,y.width=L.width,y.height=L.height),_&&m.expandParent){let oe=U[0]*(L.width??0);L.x&&L.x<oe&&(y.x=oe,v.x=v.x-(L.x-oe));let se=U[1]*(L.height??0);L.y&&L.y<se&&(y.y=se,v.y=v.y-(L.y-se))}let q=hf({width:y.width,prevWidth:V,height:y.height,prevHeight:B,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),Q={...y,direction:q};b?.(z,Q)!==!1&&(T=!0,p?.(z,Q),r(L,M))}).on("end",z=>{T&&(S?.(z,{...y}),i?.({...y}),T=!1)});s.call(F)}o(c,"update");function l(){s.on(".drag",null)}return o(l,"destroy"),{update:c,destroy:l}}o($s,"XYResizer");var Vs=Le(uo(),1),Fs=Le(Fl(),1);var Ls=o(e=>{let t,n=new Set,r=o((d,f)=>{let h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){let g=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(p=>p(t,g))}},"setState"),i=o(()=>t,"getState"),l={setState:r,getState:i,getInitialState:o(()=>u,"getInitialState"),subscribe:o(d=>(n.add(d),()=>n.delete(d)),"subscribe"),destroy:o(()=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()},"destroy")},u=t=e(r,i,l);return l},"createStoreImpl"),Hs=o(e=>e?Ls(e):Ls,"createStore");var{useDebugValue:yf}=Vs.default,{useSyncExternalStoreWithSelector:xf}=Fs.default,wf=o(e=>e,"identity");function Gr(e,t=wf,n){let r=xf(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return yf(r),r}o(Gr,"useStoreWithEqualityFn");var Bs=o((e,t)=>{let n=Hs(e),r=o((i,s=t)=>Gr(n,i,s),"useBoundStoreWithEqualityFn");return Object.assign(r,n),r},"createWithEqualityFnImpl"),Ws=o((e,t)=>e?Bs(e,t):Bs,"createWithEqualityFn");function re(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}o(re,"shallow$1");var bf=Le(Bl());var jn=(0,k.createContext)(null),Sf=jn.Provider,ma=ye.error001("react");function te(e,t){let n=(0,k.useContext)(jn);if(n===null)throw new Error(ma);return Gr(n,e,t)}o(te,"useStore");function ie(){let e=(0,k.useContext)(jn);if(e===null)throw new Error(ma);return(0,k.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}o(ie,"useStoreApi");var Xs={display:"none"},vf={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ya="react-flow__node-desc",xa="react-flow__edge-desc",Ef="react-flow__aria-live",Cf=o(e=>e.ariaLiveMessage,"ariaLiveSelector"),_f=o(e=>e.ariaLabelConfig,"ariaLabelConfigSelector");function Nf({rfId:e}){let t=te(Cf);return(0,A.jsx)("div",{id:`${Ef}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:vf,children:t})}o(Nf,"AriaLiveMessage");function Mf({rfId:e,disableKeyboardA11y:t}){let n=te(_f);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{id:`${ya}-${e}`,style:Xs,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,A.jsx)("div",{id:`${xa}-${e}`,style:Xs,children:n["edge.a11yDescription.default"]}),!t&&(0,A.jsx)(Nf,{rfId:e})]})}o(Mf,"A11yDescriptions");var qe=(0,k.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...i},s)=>{let a=`${e}`.split("-");return(0,A.jsx)("div",{className:ae(["react-flow__panel",n,...a]),style:r,ref:s,...i,children:t})});qe.displayName="Panel";var Ys="https://reactflow.dev?utm_source=attribution";function If({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,A.jsx)(qe,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Ys}`,children:(0,A.jsx)("a",{href:Ys,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}o(If,"Attribution");var Pf=o(e=>{let t=[],n=[];for(let[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(let[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},"selector$l"),Gn=o(e=>e.id,"selectId");function kf(e,t){return re(e.selectedNodes.map(Gn),t.selectedNodes.map(Gn))&&re(e.selectedEdges.map(Gn),t.selectedEdges.map(Gn))}o(kf,"areEqual$1");function Af({onSelectionChange:e}){let t=ie(),{selectedNodes:n,selectedEdges:r}=te(Pf,kf);return(0,k.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[n,r,e]),null}o(Af,"SelectionListenerInner");var Tf=o(e=>!!e.onSelectionChangeHandlers,"changeSelector");function Df({onSelectionChange:e}){let t=te(Tf);return e||t?(0,A.jsx)(Af,{onSelectionChange:e}):null}o(Df,"SelectionListener");var wa=[0,0],Rf={x:0,y:0,zoom:1},zf=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Zs=[...zf,"rfId"],Of=o(e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),"selector$k"),Us={translateExtent:Et,nodeOrigin:wa,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function $f(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:c,setDefaultNodesAndEdges:l}=te(Of,re),u=ie();(0,k.useEffect)(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=Us,c()}),[]);let d=(0,k.useRef)(Us);return(0,k.useEffect)(()=>{for(let f of Zs){let h=e[f],g=d.current[f];h!==g&&(typeof e[f]>"u"||(f==="nodes"?t(h):f==="edges"?n(h):f==="minZoom"?r(h):f==="maxZoom"?i(h):f==="translateExtent"?s(h):f==="nodeExtent"?a(h):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:gs(h)}):f==="fitView"?u.setState({fitViewQueued:h}):f==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[f]:h})))}d.current=e},Zs.map(f=>e[f])),null}o($f,"StoreUpdater");function qs(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}o(qs,"getMediaQuery");function Lf(e){let[t,n]=(0,k.useState)(e==="system"?null:e);return(0,k.useEffect)(()=>{if(e!=="system"){n(e);return}let r=qs(),i=o(()=>n(r?.matches?"dark":"light"),"updateColorModeClass");return i(),r?.addEventListener("change",i),()=>{r?.removeEventListener("change",i)}},[e]),t!==null?t:qs()?.matches?"dark":"light"}o(Lf,"useColorModeClass");var Ks=typeof document<"u"?document:null;function hn(e=null,t={target:Ks,actInsideInputWithModifier:!0}){let[n,r]=(0,k.useState)(!1),i=(0,k.useRef)(!1),s=(0,k.useRef)(new Set([])),[a,c]=(0,k.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
|
|
2
2
|
`).replace(`
|
|
3
3
|
|
|
4
4
|
`,`
|