@skill-map/cli 0.46.0 → 0.47.1
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/README.md +3 -3
- package/dist/cli.js +397 -162
- package/dist/index.js +26 -8
- package/dist/kernel/index.d.ts +31 -6
- package/dist/kernel/index.js +26 -8
- package/dist/migrations/001_initial.sql +16 -0
- package/dist/ui/{chunk-N3RUQDAR.js → chunk-3AKR33GE.js} +1 -1
- package/dist/ui/{chunk-RXQYLVSJ.js → chunk-3HLMBEDX.js} +1 -1
- package/dist/ui/{chunk-SF4FUT4U.js → chunk-7K36273M.js} +1 -1
- package/dist/ui/{chunk-S32E6ZCZ.js → chunk-CO2ZOUSD.js} +1 -1
- package/dist/ui/{chunk-F4RIBZ4P.js → chunk-CRWK2NFZ.js} +1 -1
- package/dist/ui/chunk-QCMLB44L.js +123 -0
- package/dist/ui/{chunk-EYBKZOMF.js → chunk-UIUGLD7F.js} +1 -1
- package/dist/ui/{chunk-ERUALZOV.js → chunk-UV3QRBRR.js} +1 -1
- package/dist/ui/{chunk-P4E74ZOS.js → chunk-WPUUCIS3.js} +11 -11
- package/dist/ui/{chunk-6AP364TB.js → chunk-XWU3YFSM.js} +1 -1
- package/dist/ui/{chunk-3YSNJXGB.js → chunk-YOF6HQCQ.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-M4W7H6RY.js +4 -0
- package/migrations/001_initial.sql +16 -0
- package/package.json +2 -2
- package/dist/ui/chunk-L3JYFPSZ.js +0 -123
- package/dist/ui/main-NF5GO3JR.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as aa,d as sa,e as ha}from"./chunk-RXQYLVSJ.js";import{a as Pg,b as fa,c as Mg,d as kg,e as Dg,f as Og,g as Ng,h as Rg,i as Ag,j as Fg,k as Lg,n as gn,o as Bg,q as Ug,r as Wg,s as $g,t as Kg,u as Yg}from"./chunk-N3RUQDAR.js";import"./chunk-VW2A6WZ3.js";import{a as pa,b as $n,c as qg,d as ma,e as _a,f as ga,g as Gg,h as Hg,i as Vg,j as jg}from"./chunk-EYBKZOMF.js";import{c as vg,d as yg,f as mn,g as _n}from"./chunk-ERUALZOV.js";import{a as bg,b as da,c as la,d as wg,e as Sg,f as Tg,g as ua,h as Ig,i as Dp,j as yo,l as Eg,m as un,n as Ei,p as zg}from"./chunk-K365TVPA.js";import{D as cn,E as dn,H as ra,I as De,J as Oe,K as ca,L as Cg,M as ln,N as kp,Q as xg,R as Lt,V as fn,W as pn,X as hn,c as Ti,g as pg,h as hg,i as mg,j as Ii,k as sn,m as ta,p as na,q as ia,u as gg,w as Ft,x as oa}from"./chunk-P4E74ZOS.js";import{B as Mp,Ca as _g,H as lg,J as ug,V as fg,b as sg,k as cg,p as ea,u as dg}from"./chunk-4SG4352Z.js";import{f as rg,i as Jr,j as ag}from"./chunk-ZZJ7XWDX.js";import"./chunk-EPBUSS3I.js";import{j as ig,k as og,l as Qr,m as Si,q as an}from"./chunk-VNA3TMIO.js";import{$ as Gr,$a as Ee,$b as qe,Ab as bi,Ac as Zr,Bb as jn,Bc as Pp,Cb as Un,Cc as Wn,Db as wi,Eb as $r,Fb as Kr,Ga as go,Gb as se,Ha as vo,Hb as Tp,Ib as H,Ic as me,Ja as Vr,Jc as $e,Ka as d,Kb as _,L as y,Lb as Kt,M as vi,Mb as ke,Nb as Yr,O as ue,P as yi,Pa as jr,Pb as _t,Q as l,Qa as eg,Qb as gt,Rb as Ip,Sa as tg,Sb as Tt,Ta as wp,Tb as ct,U as J_,Ua as Ur,Ub as Yt,V as Ot,Vb as dt,W as z,Wb as de,X as B,Xb as Xr,Y as Je,Yb as Re,Z as qr,Za as K,Zb as v,_ as Ye,_a as xi,_b as C,aa as it,ab as Wr,ac as Ep,bb as he,bc as ng,ca as st,cb as be,da as Vn,fc as lt,g as b,gc as Xe,ha as q,hc as oe,ic as ge,ja as ne,jc as Nt,ka as Ci,kc as vt,la as J,lb as G,n as Z_,na as Ne,ob as T,pb as I,qb as Sp,ra as Hr,rb as Ce,rc as Rt,sb as Y,tb as X,tc as At,u as Q_,ub as M,uc as S,vb as p,wb as h,xb as R,xc as Ve,yb as W,yc as O,zb as $,zc as Ae}from"./chunk-HAWX5WNM.js";import{a as ce,b as Hn,c as gi,e as g,g as tk}from"./chunk-WCABR6TI.js";var Mv=g((Nee,Pv)=>{"use strict";function uF(){this.__data__=[],this.size=0}Pv.exports=uF});var ci=g((Ree,kv)=>{"use strict";function fF(t,i){return t===i||t!==t&&i!==i}kv.exports=fF});var dr=g((Aee,Dv)=>{"use strict";var pF=ci();function hF(t,i){for(var e=t.length;e--;)if(pF(t[e][0],i))return e;return-1}Dv.exports=hF});var Nv=g((Fee,Ov)=>{"use strict";var mF=dr(),_F=Array.prototype,gF=_F.splice;function vF(t){var i=this.__data__,e=mF(i,t);if(e<0)return!1;var n=i.length-1;return e==n?i.pop():gF.call(i,e,1),--this.size,!0}Ov.exports=vF});var Av=g((Lee,Rv)=>{"use strict";var yF=dr();function CF(t){var i=this.__data__,e=yF(i,t);return e<0?void 0:i[e][1]}Rv.exports=CF});var Lv=g((zee,Fv)=>{"use strict";var xF=dr();function bF(t){return xF(this.__data__,t)>-1}Fv.exports=bF});var Bv=g((Bee,zv)=>{"use strict";var wF=dr();function SF(t,i){var e=this.__data__,n=wF(e,t);return n<0?(++this.size,e.push([t,i])):e[n][1]=i,this}zv.exports=SF});var lr=g((qee,qv)=>{"use strict";var TF=Mv(),IF=Nv(),EF=Av(),PF=Lv(),MF=Bv();function Xi(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Xi.prototype.clear=TF;Xi.prototype.delete=IF;Xi.prototype.get=EF;Xi.prototype.has=PF;Xi.prototype.set=MF;qv.exports=Xi});var Hv=g((Gee,Gv)=>{"use strict";var kF=lr();function DF(){this.__data__=new kF,this.size=0}Gv.exports=DF});var jv=g((Hee,Vv)=>{"use strict";function OF(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}Vv.exports=OF});var Wv=g((Vee,Uv)=>{"use strict";function NF(t){return this.__data__.get(t)}Uv.exports=NF});var Kv=g((jee,$v)=>{"use strict";function RF(t){return this.__data__.has(t)}$v.exports=RF});var dm=g((Uee,Yv)=>{"use strict";var AF=typeof global=="object"&&global&&global.Object===Object&&global;Yv.exports=AF});var xt=g((Wee,Xv)=>{"use strict";var FF=dm(),LF=typeof self=="object"&&self&&self.Object===Object&&self,zF=FF||LF||Function("return this")();Xv.exports=zF});var di=g(($ee,Zv)=>{"use strict";var BF=xt(),qF=BF.Symbol;Zv.exports=qF});var ty=g((Kee,ey)=>{"use strict";var Qv=di(),Jv=Object.prototype,GF=Jv.hasOwnProperty,HF=Jv.toString,ur=Qv?Qv.toStringTag:void 0;function VF(t){var i=GF.call(t,ur),e=t[ur];try{t[ur]=void 0;var n=!0}catch{}var o=HF.call(t);return n&&(i?t[ur]=e:delete t[ur]),o}ey.exports=VF});var iy=g((Yee,ny)=>{"use strict";var jF=Object.prototype,UF=jF.toString;function WF(t){return UF.call(t)}ny.exports=WF});var Dn=g((Xee,ay)=>{"use strict";var oy=di(),$F=ty(),KF=iy(),YF="[object Null]",XF="[object Undefined]",ry=oy?oy.toStringTag:void 0;function ZF(t){return t==null?t===void 0?XF:YF:ry&&ry in Object(t)?$F(t):KF(t)}ay.exports=ZF});var ft=g((Zee,sy)=>{"use strict";function QF(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}sy.exports=QF});var Zi=g((Qee,cy)=>{"use strict";var JF=Dn(),eL=ft(),tL="[object AsyncFunction]",nL="[object Function]",iL="[object GeneratorFunction]",oL="[object Proxy]";function rL(t){if(!eL(t))return!1;var i=JF(t);return i==nL||i==iL||i==tL||i==oL}cy.exports=rL});var ly=g((Jee,dy)=>{"use strict";var aL=xt(),sL=aL["__core-js_shared__"];dy.exports=sL});var py=g((ete,fy)=>{"use strict";var lm=ly(),uy=(function(){var t=/[^.]+$/.exec(lm&&lm.keys&&lm.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function cL(t){return!!uy&&uy in t}fy.exports=cL});var um=g((tte,hy)=>{"use strict";var dL=Function.prototype,lL=dL.toString;function uL(t){if(t!=null){try{return lL.call(t)}catch{}try{return t+""}catch{}}return""}hy.exports=uL});var _y=g((nte,my)=>{"use strict";var fL=Zi(),pL=py(),hL=ft(),mL=um(),_L=/[\\^$.*+?()[\]{}|]/g,gL=/^\[object .+?Constructor\]$/,vL=Function.prototype,yL=Object.prototype,CL=vL.toString,xL=yL.hasOwnProperty,bL=RegExp("^"+CL.call(xL).replace(_L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wL(t){if(!hL(t)||pL(t))return!1;var i=fL(t)?bL:gL;return i.test(mL(t))}my.exports=wL});var vy=g((ite,gy)=>{"use strict";function SL(t,i){return t?.[i]}gy.exports=SL});var On=g((ote,yy)=>{"use strict";var TL=_y(),IL=vy();function EL(t,i){var e=IL(t,i);return TL(e)?e:void 0}yy.exports=EL});var Mf=g((rte,Cy)=>{"use strict";var PL=On(),ML=xt(),kL=PL(ML,"Map");Cy.exports=kL});var fr=g((ate,xy)=>{"use strict";var DL=On(),OL=DL(Object,"create");xy.exports=OL});var Sy=g((ste,wy)=>{"use strict";var by=fr();function NL(){this.__data__=by?by(null):{},this.size=0}wy.exports=NL});var Iy=g((cte,Ty)=>{"use strict";function RL(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}Ty.exports=RL});var Py=g((dte,Ey)=>{"use strict";var AL=fr(),FL="__lodash_hash_undefined__",LL=Object.prototype,zL=LL.hasOwnProperty;function BL(t){var i=this.__data__;if(AL){var e=i[t];return e===FL?void 0:e}return zL.call(i,t)?i[t]:void 0}Ey.exports=BL});var ky=g((lte,My)=>{"use strict";var qL=fr(),GL=Object.prototype,HL=GL.hasOwnProperty;function VL(t){var i=this.__data__;return qL?i[t]!==void 0:HL.call(i,t)}My.exports=VL});var Oy=g((ute,Dy)=>{"use strict";var jL=fr(),UL="__lodash_hash_undefined__";function WL(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=jL&&i===void 0?UL:i,this}Dy.exports=WL});var Ry=g((fte,Ny)=>{"use strict";var $L=Sy(),KL=Iy(),YL=Py(),XL=ky(),ZL=Oy();function Qi(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Qi.prototype.clear=$L;Qi.prototype.delete=KL;Qi.prototype.get=YL;Qi.prototype.has=XL;Qi.prototype.set=ZL;Ny.exports=Qi});var Ly=g((pte,Fy)=>{"use strict";var Ay=Ry(),QL=lr(),JL=Mf();function e3(){this.size=0,this.__data__={hash:new Ay,map:new(JL||QL),string:new Ay}}Fy.exports=e3});var By=g((hte,zy)=>{"use strict";function t3(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}zy.exports=t3});var pr=g((mte,qy)=>{"use strict";var n3=By();function i3(t,i){var e=t.__data__;return n3(i)?e[typeof i=="string"?"string":"hash"]:e.map}qy.exports=i3});var Hy=g((_te,Gy)=>{"use strict";var o3=pr();function r3(t){var i=o3(this,t).delete(t);return this.size-=i?1:0,i}Gy.exports=r3});var jy=g((gte,Vy)=>{"use strict";var a3=pr();function s3(t){return a3(this,t).get(t)}Vy.exports=s3});var Wy=g((vte,Uy)=>{"use strict";var c3=pr();function d3(t){return c3(this,t).has(t)}Uy.exports=d3});var Ky=g((yte,$y)=>{"use strict";var l3=pr();function u3(t,i){var e=l3(this,t),n=e.size;return e.set(t,i),this.size+=e.size==n?0:1,this}$y.exports=u3});var kf=g((Cte,Yy)=>{"use strict";var f3=Ly(),p3=Hy(),h3=jy(),m3=Wy(),_3=Ky();function Ji(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Ji.prototype.clear=f3;Ji.prototype.delete=p3;Ji.prototype.get=h3;Ji.prototype.has=m3;Ji.prototype.set=_3;Yy.exports=Ji});var Zy=g((xte,Xy)=>{"use strict";var g3=lr(),v3=Mf(),y3=kf(),C3=200;function x3(t,i){var e=this.__data__;if(e instanceof g3){var n=e.__data__;if(!v3||n.length<C3-1)return n.push([t,i]),this.size=++e.size,this;e=this.__data__=new y3(n)}return e.set(t,i),this.size=e.size,this}Xy.exports=x3});var hr=g((bte,Qy)=>{"use strict";var b3=lr(),w3=Hv(),S3=jv(),T3=Wv(),I3=Kv(),E3=Zy();function eo(t){var i=this.__data__=new b3(t);this.size=i.size}eo.prototype.clear=w3;eo.prototype.delete=S3;eo.prototype.get=T3;eo.prototype.has=I3;eo.prototype.set=E3;Qy.exports=eo});var Df=g((wte,Jy)=>{"use strict";function P3(t,i){for(var e=-1,n=t==null?0:t.length;++e<n&&i(t[e],e,t)!==!1;);return t}Jy.exports=P3});var fm=g((Ste,eC)=>{"use strict";var M3=On(),k3=(function(){try{var t=M3(Object,"defineProperty");return t({},"",{}),t}catch{}})();eC.exports=k3});var mr=g((Tte,nC)=>{"use strict";var tC=fm();function D3(t,i,e){i=="__proto__"&&tC?tC(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}nC.exports=D3});var _r=g((Ite,iC)=>{"use strict";var O3=mr(),N3=ci(),R3=Object.prototype,A3=R3.hasOwnProperty;function F3(t,i,e){var n=t[i];(!(A3.call(t,i)&&N3(n,e))||e===void 0&&!(i in t))&&O3(t,i,e)}iC.exports=F3});var to=g((Ete,oC)=>{"use strict";var L3=_r(),z3=mr();function B3(t,i,e,n){var o=!e;e||(e={});for(var r=-1,a=i.length;++r<a;){var s=i[r],c=n?n(e[s],t[s],s,e,t):void 0;c===void 0&&(c=t[s]),o?z3(e,s,c):L3(e,s,c)}return e}oC.exports=B3});var aC=g((Pte,rC)=>{"use strict";function q3(t,i){for(var e=-1,n=Array(t);++e<t;)n[e]=i(e);return n}rC.exports=q3});var Mt=g((Mte,sC)=>{"use strict";function G3(t){return t!=null&&typeof t=="object"}sC.exports=G3});var dC=g((kte,cC)=>{"use strict";var H3=Dn(),V3=Mt(),j3="[object Arguments]";function U3(t){return V3(t)&&H3(t)==j3}cC.exports=U3});var no=g((Dte,fC)=>{"use strict";var lC=dC(),W3=Mt(),uC=Object.prototype,$3=uC.hasOwnProperty,K3=uC.propertyIsEnumerable,Y3=lC((function(){return arguments})())?lC:function(t){return W3(t)&&$3.call(t,"callee")&&!K3.call(t,"callee")};fC.exports=Y3});var Ge=g((Ote,pC)=>{"use strict";var X3=Array.isArray;pC.exports=X3});var mC=g((Nte,hC)=>{"use strict";function Z3(){return!1}hC.exports=Z3});var li=g((gr,io)=>{"use strict";var Q3=xt(),J3=mC(),vC=typeof gr=="object"&&gr&&!gr.nodeType&&gr,_C=vC&&typeof io=="object"&&io&&!io.nodeType&&io,ez=_C&&_C.exports===vC,gC=ez?Q3.Buffer:void 0,tz=gC?gC.isBuffer:void 0,nz=tz||J3;io.exports=nz});var vr=g((Rte,yC)=>{"use strict";var iz=9007199254740991,oz=/^(?:0|[1-9]\d*)$/;function rz(t,i){var e=typeof t;return i=i??iz,!!i&&(e=="number"||e!="symbol"&&oz.test(t))&&t>-1&&t%1==0&&t<i}yC.exports=rz});var Of=g((Ate,CC)=>{"use strict";var az=9007199254740991;function sz(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=az}CC.exports=sz});var bC=g((Fte,xC)=>{"use strict";var cz=Dn(),dz=Of(),lz=Mt(),uz="[object Arguments]",fz="[object Array]",pz="[object Boolean]",hz="[object Date]",mz="[object Error]",_z="[object Function]",gz="[object Map]",vz="[object Number]",yz="[object Object]",Cz="[object RegExp]",xz="[object Set]",bz="[object String]",wz="[object WeakMap]",Sz="[object ArrayBuffer]",Tz="[object DataView]",Iz="[object Float32Array]",Ez="[object Float64Array]",Pz="[object Int8Array]",Mz="[object Int16Array]",kz="[object Int32Array]",Dz="[object Uint8Array]",Oz="[object Uint8ClampedArray]",Nz="[object Uint16Array]",Rz="[object Uint32Array]",Pe={};Pe[Iz]=Pe[Ez]=Pe[Pz]=Pe[Mz]=Pe[kz]=Pe[Dz]=Pe[Oz]=Pe[Nz]=Pe[Rz]=!0;Pe[uz]=Pe[fz]=Pe[Sz]=Pe[pz]=Pe[Tz]=Pe[hz]=Pe[mz]=Pe[_z]=Pe[gz]=Pe[vz]=Pe[yz]=Pe[Cz]=Pe[xz]=Pe[bz]=Pe[wz]=!1;function Az(t){return lz(t)&&dz(t.length)&&!!Pe[cz(t)]}xC.exports=Az});var yr=g((Lte,wC)=>{"use strict";function Fz(t){return function(i){return t(i)}}wC.exports=Fz});var Nf=g((Cr,oo)=>{"use strict";var Lz=dm(),SC=typeof Cr=="object"&&Cr&&!Cr.nodeType&&Cr,xr=SC&&typeof oo=="object"&&oo&&!oo.nodeType&&oo,zz=xr&&xr.exports===SC,pm=zz&&Lz.process,Bz=(function(){try{var t=xr&&xr.require&&xr.require("util").types;return t||pm&&pm.binding&&pm.binding("util")}catch{}})();oo.exports=Bz});var ro=g((zte,EC)=>{"use strict";var qz=bC(),Gz=yr(),TC=Nf(),IC=TC&&TC.isTypedArray,Hz=IC?Gz(IC):qz;EC.exports=Hz});var hm=g((Bte,PC)=>{"use strict";var Vz=aC(),jz=no(),Uz=Ge(),Wz=li(),$z=vr(),Kz=ro(),Yz=Object.prototype,Xz=Yz.hasOwnProperty;function Zz(t,i){var e=Uz(t),n=!e&&jz(t),o=!e&&!n&&Wz(t),r=!e&&!n&&!o&&Kz(t),a=e||n||o||r,s=a?Vz(t.length,String):[],c=s.length;for(var u in t)(i||Xz.call(t,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$z(u,c)))&&s.push(u);return s}PC.exports=Zz});var br=g((qte,MC)=>{"use strict";var Qz=Object.prototype;function Jz(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||Qz;return t===e}MC.exports=Jz});var mm=g((Gte,kC)=>{"use strict";function eB(t,i){return function(e){return t(i(e))}}kC.exports=eB});var OC=g((Hte,DC)=>{"use strict";var tB=mm(),nB=tB(Object.keys,Object);DC.exports=nB});var Rf=g((Vte,NC)=>{"use strict";var iB=br(),oB=OC(),rB=Object.prototype,aB=rB.hasOwnProperty;function sB(t){if(!iB(t))return oB(t);var i=[];for(var e in Object(t))aB.call(t,e)&&e!="constructor"&&i.push(e);return i}NC.exports=sB});var Ht=g((jte,RC)=>{"use strict";var cB=Zi(),dB=Of();function lB(t){return t!=null&&dB(t.length)&&!cB(t)}RC.exports=lB});var Qt=g((Ute,AC)=>{"use strict";var uB=hm(),fB=Rf(),pB=Ht();function hB(t){return pB(t)?uB(t):fB(t)}AC.exports=hB});var LC=g((Wte,FC)=>{"use strict";var mB=to(),_B=Qt();function gB(t,i){return t&&mB(i,_B(i),t)}FC.exports=gB});var BC=g(($te,zC)=>{"use strict";function vB(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}zC.exports=vB});var GC=g((Kte,qC)=>{"use strict";var yB=ft(),CB=br(),xB=BC(),bB=Object.prototype,wB=bB.hasOwnProperty;function SB(t){if(!yB(t))return xB(t);var i=CB(t),e=[];for(var n in t)n=="constructor"&&(i||!wB.call(t,n))||e.push(n);return e}qC.exports=SB});var Nn=g((Yte,HC)=>{"use strict";var TB=hm(),IB=GC(),EB=Ht();function PB(t){return EB(t)?TB(t,!0):IB(t)}HC.exports=PB});var jC=g((Xte,VC)=>{"use strict";var MB=to(),kB=Nn();function DB(t,i){return t&&MB(i,kB(i),t)}VC.exports=DB});var _m=g((wr,ao)=>{"use strict";var OB=xt(),KC=typeof wr=="object"&&wr&&!wr.nodeType&&wr,UC=KC&&typeof ao=="object"&&ao&&!ao.nodeType&&ao,NB=UC&&UC.exports===KC,WC=NB?OB.Buffer:void 0,$C=WC?WC.allocUnsafe:void 0;function RB(t,i){if(i)return t.slice();var e=t.length,n=$C?$C(e):new t.constructor(e);return t.copy(n),n}ao.exports=RB});var gm=g((Zte,YC)=>{"use strict";function AB(t,i){var e=-1,n=t.length;for(i||(i=Array(n));++e<n;)i[e]=t[e];return i}YC.exports=AB});var vm=g((Qte,XC)=>{"use strict";function FB(t,i){for(var e=-1,n=t==null?0:t.length,o=0,r=[];++e<n;){var a=t[e];i(a,e,t)&&(r[o++]=a)}return r}XC.exports=FB});var ym=g((Jte,ZC)=>{"use strict";function LB(){return[]}ZC.exports=LB});var Af=g((ene,JC)=>{"use strict";var zB=vm(),BB=ym(),qB=Object.prototype,GB=qB.propertyIsEnumerable,QC=Object.getOwnPropertySymbols,HB=QC?function(t){return t==null?[]:(t=Object(t),zB(QC(t),function(i){return GB.call(t,i)}))}:BB;JC.exports=HB});var tx=g((tne,ex)=>{"use strict";var VB=to(),jB=Af();function UB(t,i){return VB(t,jB(t),i)}ex.exports=UB});var Ff=g((nne,nx)=>{"use strict";function WB(t,i){for(var e=-1,n=i.length,o=t.length;++e<n;)t[o+e]=i[e];return t}nx.exports=WB});var Sr=g((ine,ix)=>{"use strict";var $B=mm(),KB=$B(Object.getPrototypeOf,Object);ix.exports=KB});var Cm=g((one,ox)=>{"use strict";var YB=Ff(),XB=Sr(),ZB=Af(),QB=ym(),JB=Object.getOwnPropertySymbols,eq=JB?function(t){for(var i=[];t;)YB(i,ZB(t)),t=XB(t);return i}:QB;ox.exports=eq});var ax=g((rne,rx)=>{"use strict";var tq=to(),nq=Cm();function iq(t,i){return tq(t,nq(t),i)}rx.exports=iq});var xm=g((ane,sx)=>{"use strict";var oq=Ff(),rq=Ge();function aq(t,i,e){var n=i(t);return rq(t)?n:oq(n,e(t))}sx.exports=aq});var bm=g((sne,cx)=>{"use strict";var sq=xm(),cq=Af(),dq=Qt();function lq(t){return sq(t,dq,cq)}cx.exports=lq});var lx=g((cne,dx)=>{"use strict";var uq=xm(),fq=Cm(),pq=Nn();function hq(t){return uq(t,pq,fq)}dx.exports=hq});var fx=g((dne,ux)=>{"use strict";var mq=On(),_q=xt(),gq=mq(_q,"DataView");ux.exports=gq});var hx=g((lne,px)=>{"use strict";var vq=On(),yq=xt(),Cq=vq(yq,"Promise");px.exports=Cq});var wm=g((une,mx)=>{"use strict";var xq=On(),bq=xt(),wq=xq(bq,"Set");mx.exports=wq});var gx=g((fne,_x)=>{"use strict";var Sq=On(),Tq=xt(),Iq=Sq(Tq,"WeakMap");_x.exports=Iq});var fi=g((pne,Sx)=>{"use strict";var Sm=fx(),Tm=Mf(),Im=hx(),Em=wm(),Pm=gx(),wx=Dn(),so=um(),vx="[object Map]",Eq="[object Object]",yx="[object Promise]",Cx="[object Set]",xx="[object WeakMap]",bx="[object DataView]",Pq=so(Sm),Mq=so(Tm),kq=so(Im),Dq=so(Em),Oq=so(Pm),ui=wx;(Sm&&ui(new Sm(new ArrayBuffer(1)))!=bx||Tm&&ui(new Tm)!=vx||Im&&ui(Im.resolve())!=yx||Em&&ui(new Em)!=Cx||Pm&&ui(new Pm)!=xx)&&(ui=function(t){var i=wx(t),e=i==Eq?t.constructor:void 0,n=e?so(e):"";if(n)switch(n){case Pq:return bx;case Mq:return vx;case kq:return yx;case Dq:return Cx;case Oq:return xx}return i});Sx.exports=ui});var Ix=g((hne,Tx)=>{"use strict";var Nq=Object.prototype,Rq=Nq.hasOwnProperty;function Aq(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Rq.call(t,"index")&&(e.index=t.index,e.input=t.input),e}Tx.exports=Aq});var Mm=g((mne,Ex)=>{"use strict";var Fq=xt(),Lq=Fq.Uint8Array;Ex.exports=Lq});var Lf=g((_ne,Mx)=>{"use strict";var Px=Mm();function zq(t){var i=new t.constructor(t.byteLength);return new Px(i).set(new Px(t)),i}Mx.exports=zq});var Dx=g((gne,kx)=>{"use strict";var Bq=Lf();function qq(t,i){var e=i?Bq(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}kx.exports=qq});var Nx=g((vne,Ox)=>{"use strict";var Gq=/\w*$/;function Hq(t){var i=new t.constructor(t.source,Gq.exec(t));return i.lastIndex=t.lastIndex,i}Ox.exports=Hq});var zx=g((yne,Lx)=>{"use strict";var Rx=di(),Ax=Rx?Rx.prototype:void 0,Fx=Ax?Ax.valueOf:void 0;function Vq(t){return Fx?Object(Fx.call(t)):{}}Lx.exports=Vq});var km=g((Cne,Bx)=>{"use strict";var jq=Lf();function Uq(t,i){var e=i?jq(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Bx.exports=Uq});var Gx=g((xne,qx)=>{"use strict";var Wq=Lf(),$q=Dx(),Kq=Nx(),Yq=zx(),Xq=km(),Zq="[object Boolean]",Qq="[object Date]",Jq="[object Map]",eG="[object Number]",tG="[object RegExp]",nG="[object Set]",iG="[object String]",oG="[object Symbol]",rG="[object ArrayBuffer]",aG="[object DataView]",sG="[object Float32Array]",cG="[object Float64Array]",dG="[object Int8Array]",lG="[object Int16Array]",uG="[object Int32Array]",fG="[object Uint8Array]",pG="[object Uint8ClampedArray]",hG="[object Uint16Array]",mG="[object Uint32Array]";function _G(t,i,e){var n=t.constructor;switch(i){case rG:return Wq(t);case Zq:case Qq:return new n(+t);case aG:return $q(t,e);case sG:case cG:case dG:case lG:case uG:case fG:case pG:case hG:case mG:return Xq(t,e);case Jq:return new n;case eG:case iG:return new n(t);case tG:return Kq(t);case nG:return new n;case oG:return Yq(t)}}qx.exports=_G});var Dm=g((bne,Vx)=>{"use strict";var gG=ft(),Hx=Object.create,vG=(function(){function t(){}return function(i){if(!gG(i))return{};if(Hx)return Hx(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}})();Vx.exports=vG});var Om=g((wne,jx)=>{"use strict";var yG=Dm(),CG=Sr(),xG=br();function bG(t){return typeof t.constructor=="function"&&!xG(t)?yG(CG(t)):{}}jx.exports=bG});var Wx=g((Sne,Ux)=>{"use strict";var wG=fi(),SG=Mt(),TG="[object Map]";function IG(t){return SG(t)&&wG(t)==TG}Ux.exports=IG});var Xx=g((Tne,Yx)=>{"use strict";var EG=Wx(),PG=yr(),$x=Nf(),Kx=$x&&$x.isMap,MG=Kx?PG(Kx):EG;Yx.exports=MG});var Qx=g((Ine,Zx)=>{"use strict";var kG=fi(),DG=Mt(),OG="[object Set]";function NG(t){return DG(t)&&kG(t)==OG}Zx.exports=NG});var nb=g((Ene,tb)=>{"use strict";var RG=Qx(),AG=yr(),Jx=Nf(),eb=Jx&&Jx.isSet,FG=eb?AG(eb):RG;tb.exports=FG});var Nm=g((Pne,ab)=>{"use strict";var LG=hr(),zG=Df(),BG=_r(),qG=LC(),GG=jC(),HG=_m(),VG=gm(),jG=tx(),UG=ax(),WG=bm(),$G=lx(),KG=fi(),YG=Ix(),XG=Gx(),ZG=Om(),QG=Ge(),JG=li(),eH=Xx(),tH=ft(),nH=nb(),iH=Qt(),oH=Nn(),rH=1,aH=2,sH=4,ib="[object Arguments]",cH="[object Array]",dH="[object Boolean]",lH="[object Date]",uH="[object Error]",ob="[object Function]",fH="[object GeneratorFunction]",pH="[object Map]",hH="[object Number]",rb="[object Object]",mH="[object RegExp]",_H="[object Set]",gH="[object String]",vH="[object Symbol]",yH="[object WeakMap]",CH="[object ArrayBuffer]",xH="[object DataView]",bH="[object Float32Array]",wH="[object Float64Array]",SH="[object Int8Array]",TH="[object Int16Array]",IH="[object Int32Array]",EH="[object Uint8Array]",PH="[object Uint8ClampedArray]",MH="[object Uint16Array]",kH="[object Uint32Array]",Ie={};Ie[ib]=Ie[cH]=Ie[CH]=Ie[xH]=Ie[dH]=Ie[lH]=Ie[bH]=Ie[wH]=Ie[SH]=Ie[TH]=Ie[IH]=Ie[pH]=Ie[hH]=Ie[rb]=Ie[mH]=Ie[_H]=Ie[gH]=Ie[vH]=Ie[EH]=Ie[PH]=Ie[MH]=Ie[kH]=!0;Ie[uH]=Ie[ob]=Ie[yH]=!1;function zf(t,i,e,n,o,r){var a,s=i&rH,c=i&aH,u=i&sH;if(e&&(a=o?e(t,n,o,r):e(t)),a!==void 0)return a;if(!tH(t))return t;var f=QG(t);if(f){if(a=YG(t),!s)return VG(t,a)}else{var m=KG(t),x=m==ob||m==fH;if(JG(t))return HG(t,s);if(m==rb||m==ib||x&&!o){if(a=c||x?{}:ZG(t),!s)return c?UG(t,GG(a,t)):jG(t,qG(a,t))}else{if(!Ie[m])return o?t:{};a=XG(t,m,s)}}r||(r=new LG);var P=r.get(t);if(P)return P;r.set(t,a),nH(t)?t.forEach(function(j){a.add(zf(j,i,e,j,t,r))}):eH(t)&&t.forEach(function(j,L){a.set(L,zf(j,i,e,L,t,r))});var E=u?c?$G:WG:c?oH:iH,N=f?void 0:E(t);return zG(N||t,function(j,L){N&&(L=j,j=t[L]),BG(a,L,zf(j,i,e,L,t,r))}),a}ab.exports=zf});var cb=g((Mne,sb)=>{"use strict";var DH=Nm(),OH=4;function NH(t){return DH(t,OH)}sb.exports=NH});var Bf=g((kne,db)=>{"use strict";function RH(t){return function(){return t}}db.exports=RH});var ub=g((Dne,lb)=>{"use strict";function AH(t){return function(i,e,n){for(var o=-1,r=Object(i),a=n(i),s=a.length;s--;){var c=a[t?s:++o];if(e(r[c],c,r)===!1)break}return i}}lb.exports=AH});var qf=g((One,fb)=>{"use strict";var FH=ub(),LH=FH();fb.exports=LH});var Gf=g((Nne,pb)=>{"use strict";var zH=qf(),BH=Qt();function qH(t,i){return t&&zH(t,i,BH)}pb.exports=qH});var mb=g((Rne,hb)=>{"use strict";var GH=Ht();function HH(t,i){return function(e,n){if(e==null)return e;if(!GH(e))return t(e,n);for(var o=e.length,r=i?o:-1,a=Object(e);(i?r--:++r<o)&&n(a[r],r,a)!==!1;);return e}}hb.exports=HH});var Tr=g((Ane,_b)=>{"use strict";var VH=Gf(),jH=mb(),UH=jH(VH);_b.exports=UH});var Rn=g((Fne,gb)=>{"use strict";function WH(t){return t}gb.exports=WH});var Rm=g((Lne,vb)=>{"use strict";var $H=Rn();function KH(t){return typeof t=="function"?t:$H}vb.exports=KH});var Am=g((zne,yb)=>{"use strict";var YH=Df(),XH=Tr(),ZH=Rm(),QH=Ge();function JH(t,i){var e=QH(t)?YH:XH;return e(t,ZH(i))}yb.exports=JH});var Fm=g((Bne,Cb)=>{"use strict";Cb.exports=Am()});var bb=g((qne,xb)=>{"use strict";var eV=Tr();function tV(t,i){var e=[];return eV(t,function(n,o,r){i(n,o,r)&&e.push(n)}),e}xb.exports=tV});var Sb=g((Gne,wb)=>{"use strict";var nV="__lodash_hash_undefined__";function iV(t){return this.__data__.set(t,nV),this}wb.exports=iV});var Ib=g((Hne,Tb)=>{"use strict";function oV(t){return this.__data__.has(t)}Tb.exports=oV});var Lm=g((Vne,Eb)=>{"use strict";var rV=kf(),aV=Sb(),sV=Ib();function Hf(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new rV;++i<e;)this.add(t[i])}Hf.prototype.add=Hf.prototype.push=aV;Hf.prototype.has=sV;Eb.exports=Hf});var Mb=g((jne,Pb)=>{"use strict";function cV(t,i){for(var e=-1,n=t==null?0:t.length;++e<n;)if(i(t[e],e,t))return!0;return!1}Pb.exports=cV});var zm=g((Une,kb)=>{"use strict";function dV(t,i){return t.has(i)}kb.exports=dV});var Bm=g((Wne,Db)=>{"use strict";var lV=Lm(),uV=Mb(),fV=zm(),pV=1,hV=2;function mV(t,i,e,n,o,r){var a=e&pV,s=t.length,c=i.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),f=r.get(i);if(u&&f)return u==i&&f==t;var m=-1,x=!0,P=e&hV?new lV:void 0;for(r.set(t,i),r.set(i,t);++m<s;){var E=t[m],N=i[m];if(n)var j=a?n(N,E,m,i,t,r):n(E,N,m,t,i,r);if(j!==void 0){if(j)continue;x=!1;break}if(P){if(!uV(i,function(L,U){if(!fV(P,U)&&(E===L||o(E,L,e,n,r)))return P.push(U)})){x=!1;break}}else if(!(E===N||o(E,N,e,n,r))){x=!1;break}}return r.delete(t),r.delete(i),x}Db.exports=mV});var Nb=g(($ne,Ob)=>{"use strict";function _V(t){var i=-1,e=Array(t.size);return t.forEach(function(n,o){e[++i]=[o,n]}),e}Ob.exports=_V});var Vf=g((Kne,Rb)=>{"use strict";function gV(t){var i=-1,e=Array(t.size);return t.forEach(function(n){e[++i]=n}),e}Rb.exports=gV});var Bb=g((Yne,zb)=>{"use strict";var Ab=di(),Fb=Mm(),vV=ci(),yV=Bm(),CV=Nb(),xV=Vf(),bV=1,wV=2,SV="[object Boolean]",TV="[object Date]",IV="[object Error]",EV="[object Map]",PV="[object Number]",MV="[object RegExp]",kV="[object Set]",DV="[object String]",OV="[object Symbol]",NV="[object ArrayBuffer]",RV="[object DataView]",Lb=Ab?Ab.prototype:void 0,qm=Lb?Lb.valueOf:void 0;function AV(t,i,e,n,o,r,a){switch(e){case RV:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case NV:return!(t.byteLength!=i.byteLength||!r(new Fb(t),new Fb(i)));case SV:case TV:case PV:return vV(+t,+i);case IV:return t.name==i.name&&t.message==i.message;case MV:case DV:return t==i+"";case EV:var s=CV;case kV:var c=n&bV;if(s||(s=xV),t.size!=i.size&&!c)return!1;var u=a.get(t);if(u)return u==i;n|=wV,a.set(t,i);var f=yV(s(t),s(i),n,o,r,a);return a.delete(t),f;case OV:if(qm)return qm.call(t)==qm.call(i)}return!1}zb.exports=AV});var Hb=g((Xne,Gb)=>{"use strict";var qb=bm(),FV=1,LV=Object.prototype,zV=LV.hasOwnProperty;function BV(t,i,e,n,o,r){var a=e&FV,s=qb(t),c=s.length,u=qb(i),f=u.length;if(c!=f&&!a)return!1;for(var m=c;m--;){var x=s[m];if(!(a?x in i:zV.call(i,x)))return!1}var P=r.get(t),E=r.get(i);if(P&&E)return P==i&&E==t;var N=!0;r.set(t,i),r.set(i,t);for(var j=a;++m<c;){x=s[m];var L=t[x],U=i[x];if(n)var ie=a?n(U,L,x,i,t,r):n(L,U,x,t,i,r);if(!(ie===void 0?L===U||o(L,U,e,n,r):ie)){N=!1;break}j||(j=x=="constructor")}if(N&&!j){var xe=t.constructor,le=i.constructor;xe!=le&&"constructor"in t&&"constructor"in i&&!(typeof xe=="function"&&xe instanceof xe&&typeof le=="function"&&le instanceof le)&&(N=!1)}return r.delete(t),r.delete(i),N}Gb.exports=BV});var Xb=g((Zne,Yb)=>{"use strict";var Gm=hr(),qV=Bm(),GV=Bb(),HV=Hb(),Vb=fi(),jb=Ge(),Ub=li(),VV=ro(),jV=1,Wb="[object Arguments]",$b="[object Array]",jf="[object Object]",UV=Object.prototype,Kb=UV.hasOwnProperty;function WV(t,i,e,n,o,r){var a=jb(t),s=jb(i),c=a?$b:Vb(t),u=s?$b:Vb(i);c=c==Wb?jf:c,u=u==Wb?jf:u;var f=c==jf,m=u==jf,x=c==u;if(x&&Ub(t)){if(!Ub(i))return!1;a=!0,f=!1}if(x&&!f)return r||(r=new Gm),a||VV(t)?qV(t,i,e,n,o,r):GV(t,i,c,e,n,o,r);if(!(e&jV)){var P=f&&Kb.call(t,"__wrapped__"),E=m&&Kb.call(i,"__wrapped__");if(P||E){var N=P?t.value():t,j=E?i.value():i;return r||(r=new Gm),o(N,j,e,n,r)}}return x?(r||(r=new Gm),HV(t,i,e,n,o,r)):!1}Yb.exports=WV});var Hm=g((Qne,Jb)=>{"use strict";var $V=Xb(),Zb=Mt();function Qb(t,i,e,n,o){return t===i?!0:t==null||i==null||!Zb(t)&&!Zb(i)?t!==t&&i!==i:$V(t,i,e,n,Qb,o)}Jb.exports=Qb});var tw=g((Jne,ew)=>{"use strict";var KV=hr(),YV=Hm(),XV=1,ZV=2;function QV(t,i,e,n){var o=e.length,r=o,a=!n;if(t==null)return!r;for(t=Object(t);o--;){var s=e[o];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<r;){s=e[o];var c=s[0],u=t[c],f=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var m=new KV;if(n)var x=n(u,f,c,t,i,m);if(!(x===void 0?YV(f,u,XV|ZV,n,m):x))return!1}}return!0}ew.exports=QV});var Vm=g((eie,nw)=>{"use strict";var JV=ft();function e4(t){return t===t&&!JV(t)}nw.exports=e4});var ow=g((tie,iw)=>{"use strict";var t4=Vm(),n4=Qt();function i4(t){for(var i=n4(t),e=i.length;e--;){var n=i[e],o=t[n];i[e]=[n,o,t4(o)]}return i}iw.exports=i4});var jm=g((nie,rw)=>{"use strict";function o4(t,i){return function(e){return e==null?!1:e[t]===i&&(i!==void 0||t in Object(e))}}rw.exports=o4});var sw=g((iie,aw)=>{"use strict";var r4=tw(),a4=ow(),s4=jm();function c4(t){var i=a4(t);return i.length==1&&i[0][2]?s4(i[0][0],i[0][1]):function(e){return e===t||r4(e,t,i)}}aw.exports=c4});var pi=g((oie,cw)=>{"use strict";var d4=Dn(),l4=Mt(),u4="[object Symbol]";function f4(t){return typeof t=="symbol"||l4(t)&&d4(t)==u4}cw.exports=f4});var Uf=g((rie,dw)=>{"use strict";var p4=Ge(),h4=pi(),m4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_4=/^\w*$/;function g4(t,i){if(p4(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||h4(t)?!0:_4.test(t)||!m4.test(t)||i!=null&&t in Object(i)}dw.exports=g4});var fw=g((aie,uw)=>{"use strict";var lw=kf(),v4="Expected a function";function Um(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError(v4);var e=function(){var n=arguments,o=i?i.apply(this,n):n[0],r=e.cache;if(r.has(o))return r.get(o);var a=t.apply(this,n);return e.cache=r.set(o,a)||r,a};return e.cache=new(Um.Cache||lw),e}Um.Cache=lw;uw.exports=Um});var hw=g((sie,pw)=>{"use strict";var y4=fw(),C4=500;function x4(t){var i=y4(t,function(n){return e.size===C4&&e.clear(),n}),e=i.cache;return i}pw.exports=x4});var _w=g((cie,mw)=>{"use strict";var b4=hw(),w4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S4=/\\(\\)?/g,T4=b4(function(t){var i=[];return t.charCodeAt(0)===46&&i.push(""),t.replace(w4,function(e,n,o,r){i.push(o?r.replace(S4,"$1"):n||e)}),i});mw.exports=T4});var Ir=g((die,gw)=>{"use strict";function I4(t,i){for(var e=-1,n=t==null?0:t.length,o=Array(n);++e<n;)o[e]=i(t[e],e,t);return o}gw.exports=I4});var ww=g((lie,bw)=>{"use strict";var vw=di(),E4=Ir(),P4=Ge(),M4=pi(),k4=1/0,yw=vw?vw.prototype:void 0,Cw=yw?yw.toString:void 0;function xw(t){if(typeof t=="string")return t;if(P4(t))return E4(t,xw)+"";if(M4(t))return Cw?Cw.call(t):"";var i=t+"";return i=="0"&&1/t==-k4?"-0":i}bw.exports=xw});var Wm=g((uie,Sw)=>{"use strict";var D4=ww();function O4(t){return t==null?"":D4(t)}Sw.exports=O4});var Er=g((fie,Tw)=>{"use strict";var N4=Ge(),R4=Uf(),A4=_w(),F4=Wm();function L4(t,i){return N4(t)?t:R4(t,i)?[t]:A4(F4(t))}Tw.exports=L4});var co=g((pie,Iw)=>{"use strict";var z4=pi(),B4=1/0;function q4(t){if(typeof t=="string"||z4(t))return t;var i=t+"";return i=="0"&&1/t==-B4?"-0":i}Iw.exports=q4});var Pr=g((hie,Ew)=>{"use strict";var G4=Er(),H4=co();function V4(t,i){i=G4(i,t);for(var e=0,n=i.length;t!=null&&e<n;)t=t[H4(i[e++])];return e&&e==n?t:void 0}Ew.exports=V4});var Mw=g((mie,Pw)=>{"use strict";var j4=Pr();function U4(t,i,e){var n=t==null?void 0:j4(t,i);return n===void 0?e:n}Pw.exports=U4});var Dw=g((_ie,kw)=>{"use strict";function W4(t,i){return t!=null&&i in Object(t)}kw.exports=W4});var $m=g((gie,Ow)=>{"use strict";var $4=Er(),K4=no(),Y4=Ge(),X4=vr(),Z4=Of(),Q4=co();function J4(t,i,e){i=$4(i,t);for(var n=-1,o=i.length,r=!1;++n<o;){var a=Q4(i[n]);if(!(r=t!=null&&e(t,a)))break;t=t[a]}return r||++n!=o?r:(o=t==null?0:t.length,!!o&&Z4(o)&&X4(a,o)&&(Y4(t)||K4(t)))}Ow.exports=J4});var Km=g((vie,Nw)=>{"use strict";var ej=Dw(),tj=$m();function nj(t,i){return t!=null&&tj(t,i,ej)}Nw.exports=nj});var Aw=g((yie,Rw)=>{"use strict";var ij=Hm(),oj=Mw(),rj=Km(),aj=Uf(),sj=Vm(),cj=jm(),dj=co(),lj=1,uj=2;function fj(t,i){return aj(t)&&sj(i)?cj(dj(t),i):function(e){var n=oj(e,t);return n===void 0&&n===i?rj(e,t):ij(i,n,lj|uj)}}Rw.exports=fj});var Ym=g((Cie,Fw)=>{"use strict";function pj(t){return function(i){return i?.[t]}}Fw.exports=pj});var zw=g((xie,Lw)=>{"use strict";var hj=Pr();function mj(t){return function(i){return hj(i,t)}}Lw.exports=mj});var qw=g((bie,Bw)=>{"use strict";var _j=Ym(),gj=zw(),vj=Uf(),yj=co();function Cj(t){return vj(t)?_j(yj(t)):gj(t)}Bw.exports=Cj});var Vt=g((wie,Gw)=>{"use strict";var xj=sw(),bj=Aw(),wj=Rn(),Sj=Ge(),Tj=qw();function Ij(t){return typeof t=="function"?t:t==null?wj:typeof t=="object"?Sj(t)?bj(t[0],t[1]):xj(t):Tj(t)}Gw.exports=Ij});var Xm=g((Sie,Hw)=>{"use strict";var Ej=vm(),Pj=bb(),Mj=Vt(),kj=Ge();function Dj(t,i){var e=kj(t)?Ej:Pj;return e(t,Mj(i,3))}Hw.exports=Dj});var jw=g((Tie,Vw)=>{"use strict";var Oj=Object.prototype,Nj=Oj.hasOwnProperty;function Rj(t,i){return t!=null&&Nj.call(t,i)}Vw.exports=Rj});var Zm=g((Iie,Uw)=>{"use strict";var Aj=jw(),Fj=$m();function Lj(t,i){return t!=null&&Fj(t,i,Aj)}Uw.exports=Lj});var $w=g((Eie,Ww)=>{"use strict";var zj=Rf(),Bj=fi(),qj=no(),Gj=Ge(),Hj=Ht(),Vj=li(),jj=br(),Uj=ro(),Wj="[object Map]",$j="[object Set]",Kj=Object.prototype,Yj=Kj.hasOwnProperty;function Xj(t){if(t==null)return!0;if(Hj(t)&&(Gj(t)||typeof t=="string"||typeof t.splice=="function"||Vj(t)||Uj(t)||qj(t)))return!t.length;var i=Bj(t);if(i==Wj||i==$j)return!t.size;if(jj(t))return!zj(t).length;for(var e in t)if(Yj.call(t,e))return!1;return!0}Ww.exports=Xj});var Qm=g((Pie,Kw)=>{"use strict";function Zj(t){return t===void 0}Kw.exports=Zj});var Jm=g((Mie,Yw)=>{"use strict";var Qj=Tr(),Jj=Ht();function e5(t,i){var e=-1,n=Jj(t)?Array(t.length):[];return Qj(t,function(o,r,a){n[++e]=i(o,r,a)}),n}Yw.exports=e5});var e_=g((kie,Xw)=>{"use strict";var t5=Ir(),n5=Vt(),i5=Jm(),o5=Ge();function r5(t,i){var e=o5(t)?t5:i5;return e(t,n5(i,3))}Xw.exports=r5});var Qw=g((Die,Zw)=>{"use strict";function a5(t,i,e,n){var o=-1,r=t==null?0:t.length;for(n&&r&&(e=t[++o]);++o<r;)e=i(e,t[o],o,t);return e}Zw.exports=a5});var eS=g((Oie,Jw)=>{"use strict";function s5(t,i,e,n,o){return o(t,function(r,a,s){e=n?(n=!1,r):i(e,r,a,s)}),e}Jw.exports=s5});var t_=g((Nie,tS)=>{"use strict";var c5=Qw(),d5=Tr(),l5=Vt(),u5=eS(),f5=Ge();function p5(t,i,e){var n=f5(t)?c5:u5,o=arguments.length<3;return n(t,l5(i,4),e,o,d5)}tS.exports=p5});var iS=g((Rie,nS)=>{"use strict";var h5=Dn(),m5=Ge(),_5=Mt(),g5="[object String]";function v5(t){return typeof t=="string"||!m5(t)&&_5(t)&&h5(t)==g5}nS.exports=v5});var rS=g((Aie,oS)=>{"use strict";var y5=Ym(),C5=y5("length");oS.exports=C5});var sS=g((Fie,aS)=>{"use strict";var x5="\\ud800-\\udfff",b5="\\u0300-\\u036f",w5="\\ufe20-\\ufe2f",S5="\\u20d0-\\u20ff",T5=b5+w5+S5,I5="\\ufe0e\\ufe0f",E5="\\u200d",P5=RegExp("["+E5+x5+T5+I5+"]");function M5(t){return P5.test(t)}aS.exports=M5});var _S=g((Lie,mS)=>{"use strict";var dS="\\ud800-\\udfff",k5="\\u0300-\\u036f",D5="\\ufe20-\\ufe2f",O5="\\u20d0-\\u20ff",N5=k5+D5+O5,R5="\\ufe0e\\ufe0f",A5="["+dS+"]",n_="["+N5+"]",i_="\\ud83c[\\udffb-\\udfff]",F5="(?:"+n_+"|"+i_+")",lS="[^"+dS+"]",uS="(?:\\ud83c[\\udde6-\\uddff]){2}",fS="[\\ud800-\\udbff][\\udc00-\\udfff]",L5="\\u200d",pS=F5+"?",hS="["+R5+"]?",z5="(?:"+L5+"(?:"+[lS,uS,fS].join("|")+")"+hS+pS+")*",B5=hS+pS+z5,q5="(?:"+[lS+n_+"?",n_,uS,fS,A5].join("|")+")",cS=RegExp(i_+"(?="+i_+")|"+q5+B5,"g");function G5(t){for(var i=cS.lastIndex=0;cS.test(t);)++i;return i}mS.exports=G5});var vS=g((zie,gS)=>{"use strict";var H5=rS(),V5=sS(),j5=_S();function U5(t){return V5(t)?j5(t):H5(t)}gS.exports=U5});var CS=g((Bie,yS)=>{"use strict";var W5=Rf(),$5=fi(),K5=Ht(),Y5=iS(),X5=vS(),Z5="[object Map]",Q5="[object Set]";function J5(t){if(t==null)return 0;if(K5(t))return Y5(t)?X5(t):t.length;var i=$5(t);return i==Z5||i==Q5?t.size:W5(t).length}yS.exports=J5});var bS=g((qie,xS)=>{"use strict";var eU=Df(),tU=Dm(),nU=Gf(),iU=Vt(),oU=Sr(),rU=Ge(),aU=li(),sU=Zi(),cU=ft(),dU=ro();function lU(t,i,e){var n=rU(t),o=n||aU(t)||dU(t);if(i=iU(i,4),e==null){var r=t&&t.constructor;o?e=n?new r:[]:cU(t)?e=sU(r)?tU(oU(t)):{}:e={}}return(o?eU:nU)(t,function(a,s,c){return i(e,a,s,c)}),e}xS.exports=lU});var IS=g((Gie,TS)=>{"use strict";var wS=di(),uU=no(),fU=Ge(),SS=wS?wS.isConcatSpreadable:void 0;function pU(t){return fU(t)||uU(t)||!!(SS&&t&&t[SS])}TS.exports=pU});var Wf=g((Hie,PS)=>{"use strict";var hU=Ff(),mU=IS();function ES(t,i,e,n,o){var r=-1,a=t.length;for(e||(e=mU),o||(o=[]);++r<a;){var s=t[r];i>0&&e(s)?i>1?ES(s,i-1,e,n,o):hU(o,s):n||(o[o.length]=s)}return o}PS.exports=ES});var kS=g((Vie,MS)=>{"use strict";function _U(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}MS.exports=_U});var o_=g((jie,OS)=>{"use strict";var gU=kS(),DS=Math.max;function vU(t,i,e){return i=DS(i===void 0?t.length-1:i,0),function(){for(var n=arguments,o=-1,r=DS(n.length-i,0),a=Array(r);++o<r;)a[o]=n[i+o];o=-1;for(var s=Array(i+1);++o<i;)s[o]=n[o];return s[i]=e(a),gU(t,this,s)}}OS.exports=vU});var AS=g((Uie,RS)=>{"use strict";var yU=Bf(),NS=fm(),CU=Rn(),xU=NS?function(t,i){return NS(t,"toString",{configurable:!0,enumerable:!1,value:yU(i),writable:!0})}:CU;RS.exports=xU});var LS=g((Wie,FS)=>{"use strict";var bU=800,wU=16,SU=Date.now;function TU(t){var i=0,e=0;return function(){var n=SU(),o=wU-(n-e);if(e=n,o>0){if(++i>=bU)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}FS.exports=TU});var r_=g(($ie,zS)=>{"use strict";var IU=AS(),EU=LS(),PU=EU(IU);zS.exports=PU});var Mr=g((Kie,BS)=>{"use strict";var MU=Rn(),kU=o_(),DU=r_();function OU(t,i){return DU(kU(t,i,MU),t+"")}BS.exports=OU});var a_=g((Yie,qS)=>{"use strict";function NU(t,i,e,n){for(var o=t.length,r=e+(n?1:-1);n?r--:++r<o;)if(i(t[r],r,t))return r;return-1}qS.exports=NU});var HS=g((Xie,GS)=>{"use strict";function RU(t){return t!==t}GS.exports=RU});var jS=g((Zie,VS)=>{"use strict";function AU(t,i,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===i)return n;return-1}VS.exports=AU});var WS=g((Qie,US)=>{"use strict";var FU=a_(),LU=HS(),zU=jS();function BU(t,i,e){return i===i?zU(t,i,e):FU(t,LU,e)}US.exports=BU});var KS=g((Jie,$S)=>{"use strict";var qU=WS();function GU(t,i){var e=t==null?0:t.length;return!!e&&qU(t,i,0)>-1}$S.exports=GU});var XS=g((eoe,YS)=>{"use strict";function HU(t,i,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(i,t[n]))return!0;return!1}YS.exports=HU});var QS=g((toe,ZS)=>{"use strict";function VU(){}ZS.exports=VU});var e1=g((noe,JS)=>{"use strict";var s_=wm(),jU=QS(),UU=Vf(),WU=1/0,$U=s_&&1/UU(new s_([,-0]))[1]==WU?function(t){return new s_(t)}:jU;JS.exports=$U});var n1=g((ioe,t1)=>{"use strict";var KU=Lm(),YU=KS(),XU=XS(),ZU=zm(),QU=e1(),JU=Vf(),eW=200;function tW(t,i,e){var n=-1,o=YU,r=t.length,a=!0,s=[],c=s;if(e)a=!1,o=XU;else if(r>=eW){var u=i?null:QU(t);if(u)return JU(u);a=!1,o=ZU,c=new KU}else c=i?[]:s;e:for(;++n<r;){var f=t[n],m=i?i(f):f;if(f=e||f!==0?f:0,a&&m===m){for(var x=c.length;x--;)if(c[x]===m)continue e;i&&c.push(m),s.push(f)}else o(c,m,e)||(c!==s&&c.push(m),s.push(f))}return s}t1.exports=tW});var c_=g((ooe,i1)=>{"use strict";var nW=Ht(),iW=Mt();function oW(t){return iW(t)&&nW(t)}i1.exports=oW});var r1=g((roe,o1)=>{"use strict";var rW=Wf(),aW=Mr(),sW=n1(),cW=c_(),dW=aW(function(t){return sW(rW(t,1,cW,!0))});o1.exports=dW});var s1=g((aoe,a1)=>{"use strict";var lW=Ir();function uW(t,i){return lW(i,function(e){return t[e]})}a1.exports=uW});var d_=g((soe,c1)=>{"use strict";var fW=s1(),pW=Qt();function hW(t){return t==null?[]:fW(t,pW(t))}c1.exports=hW});var pt=g((coe,d1)=>{"use strict";var $f;if(typeof gi=="function")try{$f={clone:cb(),constant:Bf(),each:Fm(),filter:Xm(),has:Zm(),isArray:Ge(),isEmpty:$w(),isFunction:Zi(),isUndefined:Qm(),keys:Qt(),map:e_(),reduce:t_(),size:CS(),transform:bS(),union:r1(),values:d_()}}catch{}$f||($f=window._);d1.exports=$f});var Kf=g((loe,p1)=>{"use strict";var ee=pt();p1.exports=ae;var mW="\0",hi="\0",l1="";function ae(t){this._isDirected=ee.has(t,"directed")?t.directed:!0,this._isMultigraph=ee.has(t,"multigraph")?t.multigraph:!1,this._isCompound=ee.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ee.constant(void 0),this._defaultEdgeLabelFn=ee.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[hi]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}ae.prototype._nodeCount=0;ae.prototype._edgeCount=0;ae.prototype.isDirected=function(){return this._isDirected};ae.prototype.isMultigraph=function(){return this._isMultigraph};ae.prototype.isCompound=function(){return this._isCompound};ae.prototype.setGraph=function(t){return this._label=t,this};ae.prototype.graph=function(){return this._label};ae.prototype.setDefaultNodeLabel=function(t){return ee.isFunction(t)||(t=ee.constant(t)),this._defaultNodeLabelFn=t,this};ae.prototype.nodeCount=function(){return this._nodeCount};ae.prototype.nodes=function(){return ee.keys(this._nodes)};ae.prototype.sources=function(){var t=this;return ee.filter(this.nodes(),function(i){return ee.isEmpty(t._in[i])})};ae.prototype.sinks=function(){var t=this;return ee.filter(this.nodes(),function(i){return ee.isEmpty(t._out[i])})};ae.prototype.setNodes=function(t,i){var e=arguments,n=this;return ee.each(t,function(o){e.length>1?n.setNode(o,i):n.setNode(o)}),this};ae.prototype.setNode=function(t,i){return ee.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=i),this):(this._nodes[t]=arguments.length>1?i:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=hi,this._children[t]={},this._children[hi][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};ae.prototype.node=function(t){return this._nodes[t]};ae.prototype.hasNode=function(t){return ee.has(this._nodes,t)};ae.prototype.removeNode=function(t){var i=this;if(ee.has(this._nodes,t)){var e=function(n){i.removeEdge(i._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ee.each(this.children(t),function(n){i.setParent(n)}),delete this._children[t]),ee.each(ee.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],ee.each(ee.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};ae.prototype.setParent=function(t,i){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ee.isUndefined(i))i=hi;else{i+="";for(var e=i;!ee.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+i+" as parent of "+t+" would create a cycle");this.setNode(i)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=i,this._children[i][t]=!0,this};ae.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};ae.prototype.parent=function(t){if(this._isCompound){var i=this._parent[t];if(i!==hi)return i}};ae.prototype.children=function(t){if(ee.isUndefined(t)&&(t=hi),this._isCompound){var i=this._children[t];if(i)return ee.keys(i)}else{if(t===hi)return this.nodes();if(this.hasNode(t))return[]}};ae.prototype.predecessors=function(t){var i=this._preds[t];if(i)return ee.keys(i)};ae.prototype.successors=function(t){var i=this._sucs[t];if(i)return ee.keys(i)};ae.prototype.neighbors=function(t){var i=this.predecessors(t);if(i)return ee.union(i,this.successors(t))};ae.prototype.isLeaf=function(t){var i;return this.isDirected()?i=this.successors(t):i=this.neighbors(t),i.length===0};ae.prototype.filterNodes=function(t){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});i.setGraph(this.graph());var e=this;ee.each(this._nodes,function(r,a){t(a)&&i.setNode(a,r)}),ee.each(this._edgeObjs,function(r){i.hasNode(r.v)&&i.hasNode(r.w)&&i.setEdge(r,e.edge(r))});var n={};function o(r){var a=e.parent(r);return a===void 0||i.hasNode(a)?(n[r]=a,a):a in n?n[a]:o(a)}return this._isCompound&&ee.each(i.nodes(),function(r){i.setParent(r,o(r))}),i};ae.prototype.setDefaultEdgeLabel=function(t){return ee.isFunction(t)||(t=ee.constant(t)),this._defaultEdgeLabelFn=t,this};ae.prototype.edgeCount=function(){return this._edgeCount};ae.prototype.edges=function(){return ee.values(this._edgeObjs)};ae.prototype.setPath=function(t,i){var e=this,n=arguments;return ee.reduce(t,function(o,r){return n.length>1?e.setEdge(o,r,i):e.setEdge(o,r),r}),this};ae.prototype.setEdge=function(){var t,i,e,n,o=!1,r=arguments[0];typeof r=="object"&&r!==null&&"v"in r?(t=r.v,i=r.w,e=r.name,arguments.length===2&&(n=arguments[1],o=!0)):(t=r,i=arguments[1],e=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),t=""+t,i=""+i,ee.isUndefined(e)||(e=""+e);var a=kr(this._isDirected,t,i,e);if(ee.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!ee.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(i),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(t,i,e);var s=_W(this._isDirected,t,i,e);return t=s.v,i=s.w,Object.freeze(s),this._edgeObjs[a]=s,u1(this._preds[i],t),u1(this._sucs[t],i),this._in[i][a]=s,this._out[t][a]=s,this._edgeCount++,this};ae.prototype.edge=function(t,i,e){var n=arguments.length===1?l_(this._isDirected,arguments[0]):kr(this._isDirected,t,i,e);return this._edgeLabels[n]};ae.prototype.hasEdge=function(t,i,e){var n=arguments.length===1?l_(this._isDirected,arguments[0]):kr(this._isDirected,t,i,e);return ee.has(this._edgeLabels,n)};ae.prototype.removeEdge=function(t,i,e){var n=arguments.length===1?l_(this._isDirected,arguments[0]):kr(this._isDirected,t,i,e),o=this._edgeObjs[n];return o&&(t=o.v,i=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],f1(this._preds[i],t),f1(this._sucs[t],i),delete this._in[i][n],delete this._out[t][n],this._edgeCount--),this};ae.prototype.inEdges=function(t,i){var e=this._in[t];if(e){var n=ee.values(e);return i?ee.filter(n,function(o){return o.v===i}):n}};ae.prototype.outEdges=function(t,i){var e=this._out[t];if(e){var n=ee.values(e);return i?ee.filter(n,function(o){return o.w===i}):n}};ae.prototype.nodeEdges=function(t,i){var e=this.inEdges(t,i);if(e)return e.concat(this.outEdges(t,i))};function u1(t,i){t[i]?t[i]++:t[i]=1}function f1(t,i){--t[i]||delete t[i]}function kr(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}return o+l1+r+l1+(ee.isUndefined(n)?mW:n)}function _W(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}var s={v:o,w:r};return n&&(s.name=n),s}function l_(t,i){return kr(t,i.v,i.w,i.name)}});var m1=g((uoe,h1)=>{"use strict";h1.exports="2.1.8"});var g1=g((foe,_1)=>{"use strict";_1.exports={Graph:Kf(),version:m1()}});var y1=g((poe,v1)=>{"use strict";var jt=pt(),gW=Kf();v1.exports={write:vW,read:xW};function vW(t){var i={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:yW(t),edges:CW(t)};return jt.isUndefined(t.graph())||(i.value=jt.clone(t.graph())),i}function yW(t){return jt.map(t.nodes(),function(i){var e=t.node(i),n=t.parent(i),o={v:i};return jt.isUndefined(e)||(o.value=e),jt.isUndefined(n)||(o.parent=n),o})}function CW(t){return jt.map(t.edges(),function(i){var e=t.edge(i),n={v:i.v,w:i.w};return jt.isUndefined(i.name)||(n.name=i.name),jt.isUndefined(e)||(n.value=e),n})}function xW(t){var i=new gW(t.options).setGraph(t.value);return jt.each(t.nodes,function(e){i.setNode(e.v,e.value),e.parent&&i.setParent(e.v,e.parent)}),jt.each(t.edges,function(e){i.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),i}});var x1=g((hoe,C1)=>{"use strict";var Yf=pt();C1.exports=bW;function bW(t){var i={},e=[],n;function o(r){Yf.has(i,r)||(i[r]=!0,n.push(r),Yf.each(t.successors(r),o),Yf.each(t.predecessors(r),o))}return Yf.each(t.nodes(),function(r){n=[],o(r),n.length&&e.push(n)}),e}});var u_=g((moe,w1)=>{"use strict";var b1=pt();w1.exports=bt;function bt(){this._arr=[],this._keyIndices={}}bt.prototype.size=function(){return this._arr.length};bt.prototype.keys=function(){return this._arr.map(function(t){return t.key})};bt.prototype.has=function(t){return b1.has(this._keyIndices,t)};bt.prototype.priority=function(t){var i=this._keyIndices[t];if(i!==void 0)return this._arr[i].priority};bt.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};bt.prototype.add=function(t,i){var e=this._keyIndices;if(t=String(t),!b1.has(e,t)){var n=this._arr,o=n.length;return e[t]=o,n.push({key:t,priority:i}),this._decrease(o),!0}return!1};bt.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key};bt.prototype.decrease=function(t,i){var e=this._keyIndices[t];if(i>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+i);this._arr[e].priority=i,this._decrease(e)};bt.prototype._heapify=function(t){var i=this._arr,e=2*t,n=e+1,o=t;e<i.length&&(o=i[e].priority<i[o].priority?e:o,n<i.length&&(o=i[n].priority<i[o].priority?n:o),o!==t&&(this._swap(t,o),this._heapify(o)))};bt.prototype._decrease=function(t){for(var i=this._arr,e=i[t].priority,n;t!==0&&(n=t>>1,!(i[n].priority<e));)this._swap(t,n),t=n};bt.prototype._swap=function(t,i){var e=this._arr,n=this._keyIndices,o=e[t],r=e[i];e[t]=r,e[i]=o,n[r.key]=t,n[o.key]=i}});var f_=g((_oe,S1)=>{"use strict";var wW=pt(),SW=u_();S1.exports=IW;var TW=wW.constant(1);function IW(t,i,e,n){return EW(t,String(i),e||TW,n||function(o){return t.outEdges(o)})}function EW(t,i,e,n){var o={},r=new SW,a,s,c=function(u){var f=u.v!==a?u.v:u.w,m=o[f],x=e(u),P=s.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+x);P<m.distance&&(m.distance=P,m.predecessor=a,r.decrease(f,P))};for(t.nodes().forEach(function(u){var f=u===i?0:Number.POSITIVE_INFINITY;o[u]={distance:f},r.add(u,f)});r.size()>0&&(a=r.removeMin(),s=o[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return o}});var I1=g((goe,T1)=>{"use strict";var PW=f_(),MW=pt();T1.exports=kW;function kW(t,i,e){return MW.transform(t.nodes(),function(n,o){n[o]=PW(t,o,i,e)},{})}});var p_=g((voe,P1)=>{"use strict";var E1=pt();P1.exports=DW;function DW(t){var i=0,e=[],n={},o=[];function r(a){var s=n[a]={onStack:!0,lowlink:i,index:i++};if(e.push(a),t.successors(a).forEach(function(f){E1.has(n,f)?n[f].onStack&&(s.lowlink=Math.min(s.lowlink,n[f].index)):(r(f),s.lowlink=Math.min(s.lowlink,n[f].lowlink))}),s.lowlink===s.index){var c=[],u;do u=e.pop(),n[u].onStack=!1,c.push(u);while(a!==u);o.push(c)}}return t.nodes().forEach(function(a){E1.has(n,a)||r(a)}),o}});var k1=g((yoe,M1)=>{"use strict";var OW=pt(),NW=p_();M1.exports=RW;function RW(t){return OW.filter(NW(t),function(i){return i.length>1||i.length===1&&t.hasEdge(i[0],i[0])})}});var O1=g((Coe,D1)=>{"use strict";var AW=pt();D1.exports=LW;var FW=AW.constant(1);function LW(t,i,e){return zW(t,i||FW,e||function(n){return t.outEdges(n)})}function zW(t,i,e){var n={},o=t.nodes();return o.forEach(function(r){n[r]={},n[r][r]={distance:0},o.forEach(function(a){r!==a&&(n[r][a]={distance:Number.POSITIVE_INFINITY})}),e(r).forEach(function(a){var s=a.v===r?a.w:a.v,c=i(a);n[r][s]={distance:c,predecessor:r}})}),o.forEach(function(r){var a=n[r];o.forEach(function(s){var c=n[s];o.forEach(function(u){var f=c[r],m=a[u],x=c[u],P=f.distance+m.distance;P<x.distance&&(x.distance=P,x.predecessor=m.predecessor)})})}),n}});var h_=g((xoe,R1)=>{"use strict";var Dr=pt();R1.exports=N1;N1.CycleException=Xf;function N1(t){var i={},e={},n=[];function o(r){if(Dr.has(e,r))throw new Xf;Dr.has(i,r)||(e[r]=!0,i[r]=!0,Dr.each(t.predecessors(r),o),delete e[r],n.push(r))}if(Dr.each(t.sinks(),o),Dr.size(i)!==t.nodeCount())throw new Xf;return n}function Xf(){}Xf.prototype=new Error});var L1=g((boe,F1)=>{"use strict";var A1=h_();F1.exports=BW;function BW(t){try{A1(t)}catch(i){if(i instanceof A1.CycleException)return!1;throw i}return!0}});var m_=g((woe,B1)=>{"use strict";var Zf=pt();B1.exports=qW;function qW(t,i,e){Zf.isArray(i)||(i=[i]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],r={};return Zf.each(i,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);z1(t,a,e==="post",r,n,o)}),o}function z1(t,i,e,n,o,r){Zf.has(n,i)||(n[i]=!0,e||r.push(i),Zf.each(o(i),function(a){z1(t,a,e,n,o,r)}),e&&r.push(i))}});var G1=g((Soe,q1)=>{"use strict";var GW=m_();q1.exports=HW;function HW(t,i){return GW(t,i,"post")}});var V1=g((Toe,H1)=>{"use strict";var VW=m_();H1.exports=jW;function jW(t,i){return VW(t,i,"pre")}});var W1=g((Ioe,U1)=>{"use strict";var j1=pt(),UW=Kf(),WW=u_();U1.exports=$W;function $W(t,i){var e=new UW,n={},o=new WW,r;function a(c){var u=c.v===r?c.w:c.v,f=o.priority(u);if(f!==void 0){var m=i(c);m<f&&(n[u]=r,o.decrease(u,m))}}if(t.nodeCount()===0)return e;j1.each(t.nodes(),function(c){o.add(c,Number.POSITIVE_INFINITY),e.setNode(c)}),o.decrease(t.nodes()[0],0);for(var s=!1;o.size()>0;){if(r=o.removeMin(),j1.has(n,r))e.setEdge(r,n[r]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(r).forEach(a)}return e}});var K1=g((Eoe,$1)=>{"use strict";$1.exports={components:x1(),dijkstra:f_(),dijkstraAll:I1(),findCycles:k1(),floydWarshall:O1(),isAcyclic:L1(),postorder:G1(),preorder:V1(),prim:W1(),tarjan:p_(),topsort:h_()}});var Z1=g((Poe,X1)=>{"use strict";var Y1=g1();X1.exports={Graph:Y1.Graph,json:y1(),alg:K1(),version:Y1.version}});var wt=g((Moe,Q1)=>{"use strict";var Qf;if(typeof gi=="function")try{Qf=Z1()}catch{}Qf||(Qf=window.graphlib);Q1.exports=Qf});var eT=g((Doe,J1)=>{"use strict";var KW=Nm(),YW=1,XW=4;function ZW(t){return KW(t,YW|XW)}J1.exports=ZW});var Or=g((Ooe,tT)=>{"use strict";var QW=ci(),JW=Ht(),e$=vr(),t$=ft();function n$(t,i,e){if(!t$(e))return!1;var n=typeof i;return(n=="number"?JW(e)&&e$(i,e.length):n=="string"&&i in e)?QW(e[i],t):!1}tT.exports=n$});var oT=g((Noe,iT)=>{"use strict";var i$=Mr(),o$=ci(),r$=Or(),a$=Nn(),nT=Object.prototype,s$=nT.hasOwnProperty,c$=i$(function(t,i){t=Object(t);var e=-1,n=i.length,o=n>2?i[2]:void 0;for(o&&r$(i[0],i[1],o)&&(n=1);++e<n;)for(var r=i[e],a=a$(r),s=-1,c=a.length;++s<c;){var u=a[s],f=t[u];(f===void 0||o$(f,nT[u])&&!s$.call(t,u))&&(t[u]=r[u])}return t});iT.exports=c$});var aT=g((Roe,rT)=>{"use strict";var d$=Vt(),l$=Ht(),u$=Qt();function f$(t){return function(i,e,n){var o=Object(i);if(!l$(i)){var r=d$(e,3);i=u$(i),e=function(s){return r(o[s],s,o)}}var a=t(i,e,n);return a>-1?o[r?i[a]:a]:void 0}}rT.exports=f$});var cT=g((Aoe,sT)=>{"use strict";var p$=/\s/;function h$(t){for(var i=t.length;i--&&p$.test(t.charAt(i)););return i}sT.exports=h$});var lT=g((Foe,dT)=>{"use strict";var m$=cT(),_$=/^\s+/;function g$(t){return t&&t.slice(0,m$(t)+1).replace(_$,"")}dT.exports=g$});var hT=g((Loe,pT)=>{"use strict";var v$=lT(),uT=ft(),y$=pi(),fT=NaN,C$=/^[-+]0x[0-9a-f]+$/i,x$=/^0b[01]+$/i,b$=/^0o[0-7]+$/i,w$=parseInt;function S$(t){if(typeof t=="number")return t;if(y$(t))return fT;if(uT(t)){var i=typeof t.valueOf=="function"?t.valueOf():t;t=uT(i)?i+"":i}if(typeof t!="string")return t===0?t:+t;t=v$(t);var e=x$.test(t);return e||b$.test(t)?w$(t.slice(2),e?2:8):C$.test(t)?fT:+t}pT.exports=S$});var __=g((zoe,_T)=>{"use strict";var T$=hT(),mT=1/0,I$=17976931348623157e292;function E$(t){if(!t)return t===0?t:0;if(t=T$(t),t===mT||t===-mT){var i=t<0?-1:1;return i*I$}return t===t?t:0}_T.exports=E$});var vT=g((Boe,gT)=>{"use strict";var P$=__();function M$(t){var i=P$(t),e=i%1;return i===i?e?i-e:i:0}gT.exports=M$});var CT=g((qoe,yT)=>{"use strict";var k$=a_(),D$=Vt(),O$=vT(),N$=Math.max;function R$(t,i,e){var n=t==null?0:t.length;if(!n)return-1;var o=e==null?0:O$(e);return o<0&&(o=N$(n+o,0)),k$(t,D$(i,3),o)}yT.exports=R$});var bT=g((Goe,xT)=>{"use strict";var A$=aT(),F$=CT(),L$=A$(F$);xT.exports=L$});var g_=g((Hoe,wT)=>{"use strict";var z$=Wf();function B$(t){var i=t==null?0:t.length;return i?z$(t,1):[]}wT.exports=B$});var TT=g((Voe,ST)=>{"use strict";var q$=qf(),G$=Rm(),H$=Nn();function V$(t,i){return t==null?t:q$(t,G$(i),H$)}ST.exports=V$});var ET=g((joe,IT)=>{"use strict";function j$(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}IT.exports=j$});var MT=g((Uoe,PT)=>{"use strict";var U$=mr(),W$=Gf(),$$=Vt();function K$(t,i){var e={};return i=$$(i,3),W$(t,function(n,o,r){U$(e,o,i(n,o,r))}),e}PT.exports=K$});var Jf=g((Woe,kT)=>{"use strict";var Y$=pi();function X$(t,i,e){for(var n=-1,o=t.length;++n<o;){var r=t[n],a=i(r);if(a!=null&&(s===void 0?a===a&&!Y$(a):e(a,s)))var s=a,c=r}return c}kT.exports=X$});var OT=g(($oe,DT)=>{"use strict";function Z$(t,i){return t>i}DT.exports=Z$});var RT=g((Koe,NT)=>{"use strict";var Q$=Jf(),J$=OT(),e8=Rn();function t8(t){return t&&t.length?Q$(t,e8,J$):void 0}NT.exports=t8});var v_=g((Yoe,AT)=>{"use strict";var n8=mr(),i8=ci();function o8(t,i,e){(e!==void 0&&!i8(t[i],e)||e===void 0&&!(i in t))&&n8(t,i,e)}AT.exports=o8});var zT=g((Xoe,LT)=>{"use strict";var r8=Dn(),a8=Sr(),s8=Mt(),c8="[object Object]",d8=Function.prototype,l8=Object.prototype,FT=d8.toString,u8=l8.hasOwnProperty,f8=FT.call(Object);function p8(t){if(!s8(t)||r8(t)!=c8)return!1;var i=a8(t);if(i===null)return!0;var e=u8.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&FT.call(e)==f8}LT.exports=p8});var y_=g((Zoe,BT)=>{"use strict";function h8(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}BT.exports=h8});var GT=g((Qoe,qT)=>{"use strict";var m8=to(),_8=Nn();function g8(t){return m8(t,_8(t))}qT.exports=g8});var $T=g((Joe,WT)=>{"use strict";var HT=v_(),v8=_m(),y8=km(),C8=gm(),x8=Om(),VT=no(),jT=Ge(),b8=c_(),w8=li(),S8=Zi(),T8=ft(),I8=zT(),E8=ro(),UT=y_(),P8=GT();function M8(t,i,e,n,o,r,a){var s=UT(t,e),c=UT(i,e),u=a.get(c);if(u){HT(t,e,u);return}var f=r?r(s,c,e+"",t,i,a):void 0,m=f===void 0;if(m){var x=jT(c),P=!x&&w8(c),E=!x&&!P&&E8(c);f=c,x||P||E?jT(s)?f=s:b8(s)?f=C8(s):P?(m=!1,f=v8(c,!0)):E?(m=!1,f=y8(c,!0)):f=[]:I8(c)||VT(c)?(f=s,VT(s)?f=P8(s):(!T8(s)||S8(s))&&(f=x8(c))):m=!1}m&&(a.set(c,f),o(f,c,n,r,a),a.delete(c)),HT(t,e,f)}WT.exports=M8});var XT=g((ere,YT)=>{"use strict";var k8=hr(),D8=v_(),O8=qf(),N8=$T(),R8=ft(),A8=Nn(),F8=y_();function KT(t,i,e,n,o){t!==i&&O8(i,function(r,a){if(o||(o=new k8),R8(r))N8(t,i,a,e,KT,n,o);else{var s=n?n(F8(t,a),r,a+"",t,i,o):void 0;s===void 0&&(s=r),D8(t,a,s)}},A8)}YT.exports=KT});var QT=g((tre,ZT)=>{"use strict";var L8=Mr(),z8=Or();function B8(t){return L8(function(i,e){var n=-1,o=e.length,r=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(r=t.length>3&&typeof r=="function"?(o--,r):void 0,a&&z8(e[0],e[1],a)&&(r=o<3?void 0:r,o=1),i=Object(i);++n<o;){var s=e[n];s&&t(i,s,n,r)}return i})}ZT.exports=B8});var eI=g((nre,JT)=>{"use strict";var q8=XT(),G8=QT(),H8=G8(function(t,i,e){q8(t,i,e)});JT.exports=H8});var C_=g((ire,tI)=>{"use strict";function V8(t,i){return t<i}tI.exports=V8});var iI=g((ore,nI)=>{"use strict";var j8=Jf(),U8=C_(),W8=Rn();function $8(t){return t&&t.length?j8(t,W8,U8):void 0}nI.exports=$8});var rI=g((rre,oI)=>{"use strict";var K8=Jf(),Y8=Vt(),X8=C_();function Z8(t,i){return t&&t.length?K8(t,Y8(i,2),X8):void 0}oI.exports=Z8});var sI=g((are,aI)=>{"use strict";var Q8=xt(),J8=function(){return Q8.Date.now()};aI.exports=J8});var lI=g((sre,dI)=>{"use strict";var e6=_r(),t6=Er(),n6=vr(),cI=ft(),i6=co();function o6(t,i,e,n){if(!cI(t))return t;i=t6(i,t);for(var o=-1,r=i.length,a=r-1,s=t;s!=null&&++o<r;){var c=i6(i[o]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=a){var f=s[c];u=n?n(f,c,s):void 0,u===void 0&&(u=cI(f)?f:n6(i[o+1])?[]:{})}e6(s,c,u),s=s[c]}return t}dI.exports=o6});var fI=g((cre,uI)=>{"use strict";var r6=Pr(),a6=lI(),s6=Er();function c6(t,i,e){for(var n=-1,o=i.length,r={};++n<o;){var a=i[n],s=r6(t,a);e(s,a)&&a6(r,s6(a,t),s)}return r}uI.exports=c6});var hI=g((dre,pI)=>{"use strict";var d6=fI(),l6=Km();function u6(t,i){return d6(t,i,function(e,n){return l6(t,n)})}pI.exports=u6});var _I=g((lre,mI)=>{"use strict";var f6=g_(),p6=o_(),h6=r_();function m6(t){return h6(p6(t,void 0,f6),t+"")}mI.exports=m6});var vI=g((ure,gI)=>{"use strict";var _6=hI(),g6=_I(),v6=g6(function(t,i){return t==null?{}:_6(t,i)});gI.exports=v6});var CI=g((fre,yI)=>{"use strict";var y6=Math.ceil,C6=Math.max;function x6(t,i,e,n){for(var o=-1,r=C6(y6((i-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++o]=t,t+=e;return a}yI.exports=x6});var bI=g((pre,xI)=>{"use strict";var b6=CI(),w6=Or(),x_=__();function S6(t){return function(i,e,n){return n&&typeof n!="number"&&w6(i,e,n)&&(e=n=void 0),i=x_(i),e===void 0?(e=i,i=0):e=x_(e),n=n===void 0?i<e?1:-1:x_(n),b6(i,e,n,t)}}xI.exports=S6});var SI=g((hre,wI)=>{"use strict";var T6=bI(),I6=T6();wI.exports=I6});var II=g((mre,TI)=>{"use strict";function E6(t,i){var e=t.length;for(t.sort(i);e--;)t[e]=t[e].value;return t}TI.exports=E6});var MI=g((_re,PI)=>{"use strict";var EI=pi();function P6(t,i){if(t!==i){var e=t!==void 0,n=t===null,o=t===t,r=EI(t),a=i!==void 0,s=i===null,c=i===i,u=EI(i);if(!s&&!u&&!r&&t>i||r&&a&&c&&!s&&!u||n&&a&&c||!e&&c||!o)return 1;if(!n&&!r&&!u&&t<i||u&&e&&o&&!n&&!r||s&&e&&o||!a&&o||!c)return-1}return 0}PI.exports=P6});var DI=g((gre,kI)=>{"use strict";var M6=MI();function k6(t,i,e){for(var n=-1,o=t.criteria,r=i.criteria,a=o.length,s=e.length;++n<a;){var c=M6(o[n],r[n]);if(c){if(n>=s)return c;var u=e[n];return c*(u=="desc"?-1:1)}}return t.index-i.index}kI.exports=k6});var NI=g((vre,OI)=>{"use strict";var b_=Ir(),D6=Pr(),O6=Vt(),N6=Jm(),R6=II(),A6=yr(),F6=DI(),L6=Rn(),z6=Ge();function B6(t,i,e){i.length?i=b_(i,function(r){return z6(r)?function(a){return D6(a,r.length===1?r[0]:r)}:r}):i=[L6];var n=-1;i=b_(i,A6(O6));var o=N6(t,function(r,a,s){var c=b_(i,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return R6(o,function(r,a){return F6(r,a,e)})}OI.exports=B6});var FI=g((yre,AI)=>{"use strict";var q6=Wf(),G6=NI(),H6=Mr(),RI=Or(),V6=H6(function(t,i){if(t==null)return[];var e=i.length;return e>1&&RI(t,i[0],i[1])?i=[]:e>2&&RI(i[0],i[1],i[2])&&(i=[i[0]]),G6(t,q6(i,1),[])});AI.exports=V6});var zI=g((Cre,LI)=>{"use strict";var j6=Wm(),U6=0;function W6(t){var i=++U6;return j6(t)+i}LI.exports=W6});var qI=g((xre,BI)=>{"use strict";function $6(t,i,e){for(var n=-1,o=t.length,r=i.length,a={};++n<o;){var s=n<r?i[n]:void 0;e(a,t[n],s)}return a}BI.exports=$6});var HI=g((bre,GI)=>{"use strict";var K6=_r(),Y6=qI();function X6(t,i){return Y6(t||[],i||[],K6)}GI.exports=X6});var Me=g((wre,VI)=>{"use strict";var ep;if(typeof gi=="function")try{ep={cloneDeep:eT(),constant:Bf(),defaults:oT(),each:Fm(),filter:Xm(),find:bT(),flatten:g_(),forEach:Am(),forIn:TT(),has:Zm(),isUndefined:Qm(),last:ET(),map:e_(),mapValues:MT(),max:RT(),merge:eI(),min:iI(),minBy:rI(),now:sI(),pick:vI(),range:SI(),reduce:t_(),sortBy:FI(),uniqueId:zI(),values:d_(),zipObject:HI()}}catch{}ep||(ep=window._);VI.exports=ep});var WI=g((Tre,UI)=>{"use strict";UI.exports=tp;function tp(){var t={};t._next=t._prev=t,this._sentinel=t}tp.prototype.dequeue=function(){var t=this._sentinel,i=t._prev;if(i!==t)return jI(i),i};tp.prototype.enqueue=function(t){var i=this._sentinel;t._prev&&t._next&&jI(t),t._next=i._next,i._next._prev=t,i._next=t,t._prev=i};tp.prototype.toString=function(){for(var t=[],i=this._sentinel,e=i._prev;e!==i;)t.push(JSON.stringify(e,Z6)),e=e._prev;return"["+t.join(", ")+"]"};function jI(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Z6(t,i){if(t!=="_next"&&t!=="_prev")return i}});var KI=g((Ire,$I)=>{"use strict";var Jt=Me(),Q6=wt().Graph,J6=WI();$I.exports=t7;var e7=Jt.constant(1);function t7(t,i){if(t.nodeCount()<=1)return[];var e=i7(t,i||e7),n=n7(e.graph,e.buckets,e.zeroIdx);return Jt.flatten(Jt.map(n,function(o){return t.outEdges(o.v,o.w)}),!0)}function n7(t,i,e){for(var n=[],o=i[i.length-1],r=i[0],a;t.nodeCount();){for(;a=r.dequeue();)w_(t,i,e,a);for(;a=o.dequeue();)w_(t,i,e,a);if(t.nodeCount()){for(var s=i.length-2;s>0;--s)if(a=i[s].dequeue(),a){n=n.concat(w_(t,i,e,a,!0));break}}}return n}function w_(t,i,e,n,o){var r=o?[]:void 0;return Jt.forEach(t.inEdges(n.v),function(a){var s=t.edge(a),c=t.node(a.v);o&&r.push({v:a.v,w:a.w}),c.out-=s,S_(i,e,c)}),Jt.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,S_(i,e,u)}),t.removeNode(n.v),r}function i7(t,i){var e=new Q6,n=0,o=0;Jt.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Jt.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=i(s),f=c+u;e.setEdge(s.v,s.w,f),o=Math.max(o,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Jt.range(o+n+3).map(function(){return new J6}),a=n+1;return Jt.forEach(e.nodes(),function(s){S_(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function S_(t,i,e){e.out?e.in?t[e.out-e.in+i].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}});var XI=g((Ere,YI)=>{"use strict";var mi=Me(),o7=KI();YI.exports={run:r7,undo:s7};function r7(t){var i=t.graph().acyclicer==="greedy"?o7(t,e(t)):a7(t);mi.forEach(i,function(n){var o=t.edge(n);t.removeEdge(n),o.forwardName=n.name,o.reversed=!0,t.setEdge(n.w,n.v,o,mi.uniqueId("rev"))});function e(n){return function(o){return n.edge(o).weight}}}function a7(t){var i=[],e={},n={};function o(r){mi.has(n,r)||(n[r]=!0,e[r]=!0,mi.forEach(t.outEdges(r),function(a){mi.has(e,a.w)?i.push(a):o(a.w)}),delete e[r])}return mi.forEach(t.nodes(),o),i}function s7(t){mi.forEach(t.edges(),function(i){var e=t.edge(i);if(e.reversed){t.removeEdge(i);var n=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(i.w,i.v,e,n)}})}});var nt=g((Pre,eE)=>{"use strict";var pe=Me(),ZI=wt().Graph;eE.exports={addDummyNode:QI,simplify:c7,asNonCompoundGraph:d7,successorWeights:l7,predecessorWeights:u7,intersectRect:f7,buildLayerMatrix:p7,normalizeRanks:h7,removeEmptyRanks:m7,addBorderNode:_7,maxRank:JI,partition:g7,time:v7,notime:y7};function QI(t,i,e,n){var o;do o=pe.uniqueId(n);while(t.hasNode(o));return e.dummy=i,t.setNode(o,e),o}function c7(t){var i=new ZI().setGraph(t.graph());return pe.forEach(t.nodes(),function(e){i.setNode(e,t.node(e))}),pe.forEach(t.edges(),function(e){var n=i.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);i.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),i}function d7(t){var i=new ZI({multigraph:t.isMultigraph()}).setGraph(t.graph());return pe.forEach(t.nodes(),function(e){t.children(e).length||i.setNode(e,t.node(e))}),pe.forEach(t.edges(),function(e){i.setEdge(e,t.edge(e))}),i}function l7(t){var i=pe.map(t.nodes(),function(e){var n={};return pe.forEach(t.outEdges(e),function(o){n[o.w]=(n[o.w]||0)+t.edge(o).weight}),n});return pe.zipObject(t.nodes(),i)}function u7(t){var i=pe.map(t.nodes(),function(e){var n={};return pe.forEach(t.inEdges(e),function(o){n[o.v]=(n[o.v]||0)+t.edge(o).weight}),n});return pe.zipObject(t.nodes(),i)}function f7(t,i){var e=t.x,n=t.y,o=i.x-e,r=i.y-n,a=t.width/2,s=t.height/2;if(!o&&!r)throw new Error("Not possible to find intersection inside of the rectangle");var c,u;return Math.abs(r)*a>Math.abs(o)*s?(r<0&&(s=-s),c=s*o/r,u=s):(o<0&&(a=-a),c=a,u=a*r/o),{x:e+c,y:n+u}}function p7(t){var i=pe.map(pe.range(JI(t)+1),function(){return[]});return pe.forEach(t.nodes(),function(e){var n=t.node(e),o=n.rank;pe.isUndefined(o)||(i[o][n.order]=e)}),i}function h7(t){var i=pe.min(pe.map(t.nodes(),function(e){return t.node(e).rank}));pe.forEach(t.nodes(),function(e){var n=t.node(e);pe.has(n,"rank")&&(n.rank-=i)})}function m7(t){var i=pe.min(pe.map(t.nodes(),function(r){return t.node(r).rank})),e=[];pe.forEach(t.nodes(),function(r){var a=t.node(r).rank-i;e[a]||(e[a]=[]),e[a].push(r)});var n=0,o=t.graph().nodeRankFactor;pe.forEach(e,function(r,a){pe.isUndefined(r)&&a%o!==0?--n:n&&pe.forEach(r,function(s){t.node(s).rank+=n})})}function _7(t,i,e,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=e,o.order=n),QI(t,"border",o,i)}function JI(t){return pe.max(pe.map(t.nodes(),function(i){var e=t.node(i).rank;if(!pe.isUndefined(e))return e}))}function g7(t,i){var e={lhs:[],rhs:[]};return pe.forEach(t,function(n){i(n)?e.lhs.push(n):e.rhs.push(n)}),e}function v7(t,i){var e=pe.now();try{return i()}finally{console.log(t+" time: "+(pe.now()-e)+"ms")}}function y7(t,i){return i()}});var iE=g((Mre,nE)=>{"use strict";var tE=Me(),C7=nt();nE.exports={run:x7,undo:w7};function x7(t){t.graph().dummyChains=[],tE.forEach(t.edges(),function(i){b7(t,i)})}function b7(t,i){var e=i.v,n=t.node(e).rank,o=i.w,r=t.node(o).rank,a=i.name,s=t.edge(i),c=s.labelRank;if(r!==n+1){t.removeEdge(i);var u,f,m;for(m=0,++n;n<r;++m,++n)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:i,rank:n},u=C7.addDummyNode(t,"edge",f,"_d"),n===c&&(f.width=s.width,f.height=s.height,f.dummy="edge-label",f.labelpos=s.labelpos),t.setEdge(e,u,{weight:s.weight},a),m===0&&t.graph().dummyChains.push(u),e=u;t.setEdge(e,o,{weight:s.weight},a)}}function w7(t){tE.forEach(t.graph().dummyChains,function(i){var e=t.node(i),n=e.edgeLabel,o;for(t.setEdge(e.edgeObj,n);e.dummy;)o=t.successors(i)[0],t.removeNode(i),n.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(n.x=e.x,n.y=e.y,n.width=e.width,n.height=e.height),i=o,e=t.node(i)})}});var Nr=g((kre,oE)=>{"use strict";var np=Me();oE.exports={longestPath:S7,slack:T7};function S7(t){var i={};function e(n){var o=t.node(n);if(np.has(i,n))return o.rank;i[n]=!0;var r=np.min(np.map(t.outEdges(n),function(a){return e(a.w)-t.edge(a).minlen}));return(r===Number.POSITIVE_INFINITY||r===void 0||r===null)&&(r=0),o.rank=r}np.forEach(t.sources(),e)}function T7(t,i){return t.node(i.w).rank-t.node(i.v).rank-t.edge(i).minlen}});var T_=g((Dre,rE)=>{"use strict";var ip=Me(),I7=wt().Graph,op=Nr().slack;rE.exports=E7;function E7(t){var i=new I7({directed:!1}),e=t.nodes()[0],n=t.nodeCount();i.setNode(e,{});for(var o,r;P7(i,t)<n;)o=M7(i,t),r=i.hasNode(o.v)?op(t,o):-op(t,o),k7(i,t,r);return i}function P7(t,i){function e(n){ip.forEach(i.nodeEdges(n),function(o){var r=o.v,a=n===r?o.w:r;!t.hasNode(a)&&!op(i,o)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return ip.forEach(t.nodes(),e),t.nodeCount()}function M7(t,i){return ip.minBy(i.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return op(i,e)})}function k7(t,i,e){ip.forEach(t.nodes(),function(n){i.node(n).rank+=e})}});var pE=g((Ore,fE)=>{"use strict";var en=Me(),D7=T_(),O7=Nr().slack,N7=Nr().longestPath,R7=wt().alg.preorder,A7=wt().alg.postorder,F7=nt().simplify;fE.exports=_i;_i.initLowLimValues=E_;_i.initCutValues=I_;_i.calcCutValue=sE;_i.leaveEdge=dE;_i.enterEdge=lE;_i.exchangeEdges=uE;function _i(t){t=F7(t),N7(t);var i=D7(t);E_(i),I_(i,t);for(var e,n;e=dE(i);)n=lE(i,t,e),uE(i,t,e,n)}function I_(t,i){var e=A7(t,t.nodes());e=e.slice(0,e.length-1),en.forEach(e,function(n){L7(t,i,n)})}function L7(t,i,e){var n=t.node(e),o=n.parent;t.edge(e,o).cutvalue=sE(t,i,e)}function sE(t,i,e){var n=t.node(e),o=n.parent,r=!0,a=i.edge(e,o),s=0;return a||(r=!1,a=i.edge(o,e)),s=a.weight,en.forEach(i.nodeEdges(e),function(c){var u=c.v===e,f=u?c.w:c.v;if(f!==o){var m=u===r,x=i.edge(c).weight;if(s+=m?x:-x,B7(t,e,f)){var P=t.edge(e,f).cutvalue;s+=m?-P:P}}}),s}function E_(t,i){arguments.length<2&&(i=t.nodes()[0]),cE(t,{},1,i)}function cE(t,i,e,n,o){var r=e,a=t.node(n);return i[n]=!0,en.forEach(t.neighbors(n),function(s){en.has(i,s)||(e=cE(t,i,e,s,n))}),a.low=r,a.lim=e++,o?a.parent=o:delete a.parent,e}function dE(t){return en.find(t.edges(),function(i){return t.edge(i).cutvalue<0})}function lE(t,i,e){var n=e.v,o=e.w;i.hasEdge(n,o)||(n=e.w,o=e.v);var r=t.node(n),a=t.node(o),s=r,c=!1;r.lim>a.lim&&(s=a,c=!0);var u=en.filter(i.edges(),function(f){return c===aE(t,t.node(f.v),s)&&c!==aE(t,t.node(f.w),s)});return en.minBy(u,function(f){return O7(i,f)})}function uE(t,i,e,n){var o=e.v,r=e.w;t.removeEdge(o,r),t.setEdge(n.v,n.w,{}),E_(t),I_(t,i),z7(t,i)}function z7(t,i){var e=en.find(t.nodes(),function(o){return!i.node(o).parent}),n=R7(t,e);n=n.slice(1),en.forEach(n,function(o){var r=t.node(o).parent,a=i.edge(o,r),s=!1;a||(a=i.edge(r,o),s=!0),i.node(o).rank=i.node(r).rank+(s?a.minlen:-a.minlen)})}function B7(t,i,e){return t.hasEdge(i,e)}function aE(t,i,e){return e.low<=i.lim&&i.lim<=e.lim}});var gE=g((Nre,_E)=>{"use strict";var q7=Nr(),mE=q7.longestPath,G7=T_(),H7=pE();_E.exports=V7;function V7(t){switch(t.graph().ranker){case"network-simplex":hE(t);break;case"tight-tree":U7(t);break;case"longest-path":j7(t);break;default:hE(t)}}var j7=mE;function U7(t){mE(t),G7(t)}function hE(t){H7(t)}});var yE=g((Rre,vE)=>{"use strict";var P_=Me();vE.exports=W7;function W7(t){var i=K7(t);P_.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),o=n.edgeObj,r=$7(t,i,o.v,o.w),a=r.path,s=r.lca,c=0,u=a[c],f=!0;e!==o.w;){if(n=t.node(e),f){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(f=!1)}if(!f){for(;c<a.length-1&&t.node(u=a[c+1]).minRank<=n.rank;)c++;u=a[c]}t.setParent(e,u),e=t.successors(e)[0]}})}function $7(t,i,e,n){var o=[],r=[],a=Math.min(i[e].low,i[n].low),s=Math.max(i[e].lim,i[n].lim),c,u;c=e;do c=t.parent(c),o.push(c);while(c&&(i[c].low>a||s>i[c].lim));for(u=c,c=n;(c=t.parent(c))!==u;)r.push(c);return{path:o.concat(r.reverse()),lca:u}}function K7(t){var i={},e=0;function n(o){var r=e;P_.forEach(t.children(o),n),i[o]={low:r,lim:e++}}return P_.forEach(t.children(),n),i}});var bE=g((Are,xE)=>{"use strict";var tn=Me(),M_=nt();xE.exports={run:Y7,cleanup:Q7};function Y7(t){var i=M_.addDummyNode(t,"root",{},"_root"),e=X7(t),n=tn.max(tn.values(e))-1,o=2*n+1;t.graph().nestingRoot=i,tn.forEach(t.edges(),function(a){t.edge(a).minlen*=o});var r=Z7(t)+1;tn.forEach(t.children(),function(a){CE(t,i,o,r,n,e,a)}),t.graph().nodeRankFactor=o}function CE(t,i,e,n,o,r,a){var s=t.children(a);if(!s.length){a!==i&&t.setEdge(i,a,{weight:0,minlen:e});return}var c=M_.addBorderNode(t,"_bt"),u=M_.addBorderNode(t,"_bb"),f=t.node(a);t.setParent(c,a),f.borderTop=c,t.setParent(u,a),f.borderBottom=u,tn.forEach(s,function(m){CE(t,i,e,n,o,r,m);var x=t.node(m),P=x.borderTop?x.borderTop:m,E=x.borderBottom?x.borderBottom:m,N=x.borderTop?n:2*n,j=P!==E?1:o-r[a]+1;t.setEdge(c,P,{weight:N,minlen:j,nestingEdge:!0}),t.setEdge(E,u,{weight:N,minlen:j,nestingEdge:!0})}),t.parent(a)||t.setEdge(i,c,{weight:0,minlen:o+r[a]})}function X7(t){var i={};function e(n,o){var r=t.children(n);r&&r.length&&tn.forEach(r,function(a){e(a,o+1)}),i[n]=o}return tn.forEach(t.children(),function(n){e(n,1)}),i}function Z7(t){return tn.reduce(t.edges(),function(i,e){return i+t.edge(e).weight},0)}function Q7(t){var i=t.graph();t.removeNode(i.nestingRoot),delete i.nestingRoot,tn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var TE=g((Fre,SE)=>{"use strict";var k_=Me(),J7=nt();SE.exports=eK;function eK(t){function i(e){var n=t.children(e),o=t.node(e);if(n.length&&k_.forEach(n,i),k_.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var r=o.minRank,a=o.maxRank+1;r<a;++r)wE(t,"borderLeft","_bl",e,o,r),wE(t,"borderRight","_br",e,o,r)}}k_.forEach(t.children(),i)}function wE(t,i,e,n,o,r){var a={width:0,height:0,rank:r,borderType:i},s=o[i][r-1],c=J7.addDummyNode(t,"border",a,e);o[i][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var ME=g((Lre,PE)=>{"use strict";var Ut=Me();PE.exports={adjust:tK,undo:nK};function tK(t){var i=t.graph().rankdir.toLowerCase();(i==="lr"||i==="rl")&&EE(t)}function nK(t){var i=t.graph().rankdir.toLowerCase();(i==="bt"||i==="rl")&&iK(t),(i==="lr"||i==="rl")&&(oK(t),EE(t))}function EE(t){Ut.forEach(t.nodes(),function(i){IE(t.node(i))}),Ut.forEach(t.edges(),function(i){IE(t.edge(i))})}function IE(t){var i=t.width;t.width=t.height,t.height=i}function iK(t){Ut.forEach(t.nodes(),function(i){D_(t.node(i))}),Ut.forEach(t.edges(),function(i){var e=t.edge(i);Ut.forEach(e.points,D_),Ut.has(e,"y")&&D_(e)})}function D_(t){t.y=-t.y}function oK(t){Ut.forEach(t.nodes(),function(i){O_(t.node(i))}),Ut.forEach(t.edges(),function(i){var e=t.edge(i);Ut.forEach(e.points,O_),Ut.has(e,"x")&&O_(e)})}function O_(t){var i=t.x;t.x=t.y,t.y=i}});var DE=g((zre,kE)=>{"use strict";var nn=Me();kE.exports=rK;function rK(t){var i={},e=nn.filter(t.nodes(),function(s){return!t.children(s).length}),n=nn.max(nn.map(e,function(s){return t.node(s).rank})),o=nn.map(nn.range(n+1),function(){return[]});function r(s){if(!nn.has(i,s)){i[s]=!0;var c=t.node(s);o[c.rank].push(s),nn.forEach(t.successors(s),r)}}var a=nn.sortBy(e,function(s){return t.node(s).rank});return nn.forEach(a,r),o}});var NE=g((Bre,OE)=>{"use strict";var An=Me();OE.exports=aK;function aK(t,i){for(var e=0,n=1;n<i.length;++n)e+=sK(t,i[n-1],i[n]);return e}function sK(t,i,e){for(var n=An.zipObject(e,An.map(e,function(u,f){return f})),o=An.flatten(An.map(i,function(u){return An.sortBy(An.map(t.outEdges(u),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")}),!0),r=1;r<e.length;)r<<=1;var a=2*r-1;r-=1;var s=An.map(new Array(a),function(){return 0}),c=0;return An.forEach(o.forEach(function(u){var f=u.pos+r;s[f]+=u.weight;for(var m=0;f>0;)f%2&&(m+=s[f+1]),f=f-1>>1,s[f]+=u.weight;c+=u.weight*m})),c}});var FE=g((qre,AE)=>{"use strict";var RE=Me();AE.exports=cK;function cK(t,i){return RE.map(i,function(e){var n=t.inEdges(e);if(n.length){var o=RE.reduce(n,function(r,a){var s=t.edge(a),c=t.node(a.v);return{sum:r.sum+s.weight*c.order,weight:r.weight+s.weight}},{sum:0,weight:0});return{v:e,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:e}})}});var zE=g((Gre,LE)=>{"use strict";var ht=Me();LE.exports=dK;function dK(t,i){var e={};ht.forEach(t,function(o,r){var a=e[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:r};ht.isUndefined(o.barycenter)||(a.barycenter=o.barycenter,a.weight=o.weight)}),ht.forEach(i.edges(),function(o){var r=e[o.v],a=e[o.w];!ht.isUndefined(r)&&!ht.isUndefined(a)&&(a.indegree++,r.out.push(e[o.w]))});var n=ht.filter(e,function(o){return!o.indegree});return lK(n)}function lK(t){var i=[];function e(r){return function(a){a.merged||(ht.isUndefined(a.barycenter)||ht.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&uK(r,a)}}function n(r){return function(a){a.in.push(r),--a.indegree===0&&t.push(a)}}for(;t.length;){var o=t.pop();i.push(o),ht.forEach(o.in.reverse(),e(o)),ht.forEach(o.out,n(o))}return ht.map(ht.filter(i,function(r){return!r.merged}),function(r){return ht.pick(r,["vs","i","barycenter","weight"])})}function uK(t,i){var e=0,n=0;t.weight&&(e+=t.barycenter*t.weight,n+=t.weight),i.weight&&(e+=i.barycenter*i.weight,n+=i.weight),t.vs=i.vs.concat(t.vs),t.barycenter=e/n,t.weight=n,t.i=Math.min(i.i,t.i),i.merged=!0}});var GE=g((Hre,qE)=>{"use strict";var Rr=Me(),fK=nt();qE.exports=pK;function pK(t,i){var e=fK.partition(t,function(f){return Rr.has(f,"barycenter")}),n=e.lhs,o=Rr.sortBy(e.rhs,function(f){return-f.i}),r=[],a=0,s=0,c=0;n.sort(hK(!!i)),c=BE(r,o,c),Rr.forEach(n,function(f){c+=f.vs.length,r.push(f.vs),a+=f.barycenter*f.weight,s+=f.weight,c=BE(r,o,c)});var u={vs:Rr.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function BE(t,i,e){for(var n;i.length&&(n=Rr.last(i)).i<=e;)i.pop(),t.push(n.vs),e++;return e}function hK(t){return function(i,e){return i.barycenter<e.barycenter?-1:i.barycenter>e.barycenter?1:t?e.i-i.i:i.i-e.i}}});var jE=g((Vre,VE)=>{"use strict";var Fn=Me(),mK=FE(),_K=zE(),gK=GE();VE.exports=HE;function HE(t,i,e,n){var o=t.children(i),r=t.node(i),a=r?r.borderLeft:void 0,s=r?r.borderRight:void 0,c={};a&&(o=Fn.filter(o,function(E){return E!==a&&E!==s}));var u=mK(t,o);Fn.forEach(u,function(E){if(t.children(E.v).length){var N=HE(t,E.v,e,n);c[E.v]=N,Fn.has(N,"barycenter")&&yK(E,N)}});var f=_K(u,e);vK(f,c);var m=gK(f,n);if(a&&(m.vs=Fn.flatten([a,m.vs,s],!0),t.predecessors(a).length)){var x=t.node(t.predecessors(a)[0]),P=t.node(t.predecessors(s)[0]);Fn.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+x.order+P.order)/(m.weight+2),m.weight+=2}return m}function vK(t,i){Fn.forEach(t,function(e){e.vs=Fn.flatten(e.vs.map(function(n){return i[n]?i[n].vs:n}),!0)})}function yK(t,i){Fn.isUndefined(t.barycenter)?(t.barycenter=i.barycenter,t.weight=i.weight):(t.barycenter=(t.barycenter*t.weight+i.barycenter*i.weight)/(t.weight+i.weight),t.weight+=i.weight)}});var WE=g((jre,UE)=>{"use strict";var Ar=Me(),CK=wt().Graph;UE.exports=xK;function xK(t,i,e){var n=bK(t),o=new CK({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Ar.forEach(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===i||a.minRank<=i&&i<=a.maxRank)&&(o.setNode(r),o.setParent(r,s||n),Ar.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,f=o.edge(u,r),m=Ar.isUndefined(f)?0:f.weight;o.setEdge(u,r,{weight:t.edge(c).weight+m})}),Ar.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[i],borderRight:a.borderRight[i]}))}),o}function bK(t){for(var i;t.hasNode(i=Ar.uniqueId("_root")););return i}});var KE=g((Ure,$E)=>{"use strict";var wK=Me();$E.exports=SK;function SK(t,i,e){var n={},o;wK.forEach(e,function(r){for(var a=t.parent(r),s,c;a;){if(s=t.parent(a),s?(c=n[s],n[s]=a):(c=o,o=a),c&&c!==a){i.setEdge(c,a);return}a=s}})}});var JE=g((Wre,QE)=>{"use strict";var Ln=Me(),TK=DE(),IK=NE(),EK=jE(),PK=WE(),MK=KE(),kK=wt().Graph,YE=nt();QE.exports=DK;function DK(t){var i=YE.maxRank(t),e=XE(t,Ln.range(1,i+1),"inEdges"),n=XE(t,Ln.range(i-1,-1,-1),"outEdges"),o=TK(t);ZE(t,o);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){OK(s%2?e:n,s%4>=2),o=YE.buildLayerMatrix(t);var u=IK(t,o);u<r&&(c=0,a=Ln.cloneDeep(o),r=u)}ZE(t,a)}function XE(t,i,e){return Ln.map(i,function(n){return PK(t,n,e)})}function OK(t,i){var e=new kK;Ln.forEach(t,function(n){var o=n.graph().root,r=EK(n,o,e,i);Ln.forEach(r.vs,function(a,s){n.node(a).order=s}),MK(n,e,r.vs)})}function ZE(t,i){Ln.forEach(i,function(e){Ln.forEach(e,function(n,o){t.node(n).order=o})})}});var dP=g(($re,cP)=>{"use strict";var te=Me(),NK=wt().Graph,RK=nt();cP.exports={positionX:LK,findType1Conflicts:eP,findType2Conflicts:tP,addConflict:N_,hasConflict:nP,verticalAlignment:iP,horizontalCompaction:oP,alignCoordinates:aP,findSmallestWidthAlignment:rP,balance:sP};function eP(t,i){var e={};function n(o,r){var a=0,s=0,c=o.length,u=te.last(r);return te.forEach(r,function(f,m){var x=AK(t,f),P=x?t.node(x).order:c;(x||f===u)&&(te.forEach(r.slice(s,m+1),function(E){te.forEach(t.predecessors(E),function(N){var j=t.node(N),L=j.order;(L<a||P<L)&&!(j.dummy&&t.node(E).dummy)&&N_(e,N,E)})}),s=m+1,a=P)}),r}return te.reduce(i,n),e}function tP(t,i){var e={};function n(r,a,s,c,u){var f;te.forEach(te.range(a,s),function(m){f=r[m],t.node(f).dummy&&te.forEach(t.predecessors(f),function(x){var P=t.node(x);P.dummy&&(P.order<c||P.order>u)&&N_(e,x,f)})})}function o(r,a){var s=-1,c,u=0;return te.forEach(a,function(f,m){if(t.node(f).dummy==="border"){var x=t.predecessors(f);x.length&&(c=t.node(x[0]).order,n(a,u,m,s,c),u=m,s=c)}n(a,u,a.length,c,r.length)}),a}return te.reduce(i,o),e}function AK(t,i){if(t.node(i).dummy)return te.find(t.predecessors(i),function(e){return t.node(e).dummy})}function N_(t,i,e){if(i>e){var n=i;i=e,e=n}var o=t[i];o||(t[i]=o={}),o[e]=!0}function nP(t,i,e){if(i>e){var n=i;i=e,e=n}return te.has(t[i],e)}function iP(t,i,e,n){var o={},r={},a={};return te.forEach(i,function(s){te.forEach(s,function(c,u){o[c]=c,r[c]=c,a[c]=u})}),te.forEach(i,function(s){var c=-1;te.forEach(s,function(u){var f=n(u);if(f.length){f=te.sortBy(f,function(N){return a[N]});for(var m=(f.length-1)/2,x=Math.floor(m),P=Math.ceil(m);x<=P;++x){var E=f[x];r[u]===u&&c<a[E]&&!nP(e,u,E)&&(r[E]=u,r[u]=o[u]=o[E],c=a[E])}}})}),{root:o,align:r}}function oP(t,i,e,n,o){var r={},a=FK(t,i,e,o),s=o?"borderLeft":"borderRight";function c(m,x){for(var P=a.nodes(),E=P.pop(),N={};E;)N[E]?m(E):(N[E]=!0,P.push(E),P=P.concat(x(E))),E=P.pop()}function u(m){r[m]=a.inEdges(m).reduce(function(x,P){return Math.max(x,r[P.v]+a.edge(P))},0)}function f(m){var x=a.outEdges(m).reduce(function(E,N){return Math.min(E,r[N.w]-a.edge(N))},Number.POSITIVE_INFINITY),P=t.node(m);x!==Number.POSITIVE_INFINITY&&P.borderType!==s&&(r[m]=Math.max(r[m],x))}return c(u,a.predecessors.bind(a)),c(f,a.successors.bind(a)),te.forEach(n,function(m){r[m]=r[e[m]]}),r}function FK(t,i,e,n){var o=new NK,r=t.graph(),a=zK(r.nodesep,r.edgesep,n);return te.forEach(i,function(s){var c;te.forEach(s,function(u){var f=e[u];if(o.setNode(f),c){var m=e[c],x=o.edge(m,f);o.setEdge(m,f,Math.max(a(t,u,c),x||0))}c=u})}),o}function rP(t,i){return te.minBy(te.values(i),function(e){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return te.forIn(e,function(r,a){var s=BK(t,a)/2;n=Math.max(r+s,n),o=Math.min(r-s,o)}),n-o})}function aP(t,i){var e=te.values(i),n=te.min(e),o=te.max(e);te.forEach(["u","d"],function(r){te.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==i){var f=te.values(c);u=a==="l"?n-te.min(f):o-te.max(f),u&&(t[s]=te.mapValues(c,function(m){return m+u}))}})})}function sP(t,i){return te.mapValues(t.ul,function(e,n){if(i)return t[i.toLowerCase()][n];var o=te.sortBy(te.map(t,n));return(o[1]+o[2])/2})}function LK(t){var i=RK.buildLayerMatrix(t),e=te.merge(eP(t,i),tP(t,i)),n={},o;te.forEach(["u","d"],function(a){o=a==="u"?i:te.values(i).reverse(),te.forEach(["l","r"],function(s){s==="r"&&(o=te.map(o,function(m){return te.values(m).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=iP(t,o,e,c),f=oP(t,o,u.root,u.align,s==="r");s==="r"&&(f=te.mapValues(f,function(m){return-m})),n[a+s]=f})});var r=rP(t,n);return aP(n,r),sP(n,t.graph().align)}function zK(t,i,e){return function(n,o,r){var a=n.node(o),s=n.node(r),c=0,u;if(c+=a.width/2,te.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(c+=e?u:-u),u=0,c+=(a.dummy?i:t)/2,c+=(s.dummy?i:t)/2,c+=s.width/2,te.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(c+=e?u:-u),u=0,c}}function BK(t,i){return t.node(i).width}});var fP=g((Kre,uP)=>{"use strict";var Fr=Me(),lP=nt(),qK=dP().positionX;uP.exports=GK;function GK(t){t=lP.asNonCompoundGraph(t),HK(t),Fr.forEach(qK(t),function(i,e){t.node(e).x=i})}function HK(t){var i=lP.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Fr.forEach(i,function(o){var r=Fr.max(Fr.map(o,function(a){return t.node(a).height}));Fr.forEach(o,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var vP=g((Yre,gP)=>{"use strict";var re=Me(),pP=XI(),hP=iE(),VK=gE(),jK=nt().normalizeRanks,UK=yE(),WK=nt().removeEmptyRanks,mP=bE(),$K=TE(),_P=ME(),KK=JE(),YK=fP(),zn=nt(),XK=wt().Graph;gP.exports=ZK;function ZK(t,i){var e=i&&i.debugTiming?zn.time:zn.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return cY(t)});e(" runLayout",function(){QK(n,e)}),e(" updateInputGraph",function(){JK(t,n)})})}function QK(t,i){i(" makeSpaceForEdgeLabels",function(){dY(t)}),i(" removeSelfEdges",function(){vY(t)}),i(" acyclic",function(){pP.run(t)}),i(" nestingGraph.run",function(){mP.run(t)}),i(" rank",function(){VK(zn.asNonCompoundGraph(t))}),i(" injectEdgeLabelProxies",function(){lY(t)}),i(" removeEmptyRanks",function(){WK(t)}),i(" nestingGraph.cleanup",function(){mP.cleanup(t)}),i(" normalizeRanks",function(){jK(t)}),i(" assignRankMinMax",function(){uY(t)}),i(" removeEdgeLabelProxies",function(){fY(t)}),i(" normalize.run",function(){hP.run(t)}),i(" parentDummyChains",function(){UK(t)}),i(" addBorderSegments",function(){$K(t)}),i(" order",function(){KK(t)}),i(" insertSelfEdges",function(){yY(t)}),i(" adjustCoordinateSystem",function(){_P.adjust(t)}),i(" position",function(){YK(t)}),i(" positionSelfEdges",function(){CY(t)}),i(" removeBorderNodes",function(){gY(t)}),i(" normalize.undo",function(){hP.undo(t)}),i(" fixupEdgeLabelCoords",function(){mY(t)}),i(" undoCoordinateSystem",function(){_P.undo(t)}),i(" translateGraph",function(){pY(t)}),i(" assignNodeIntersects",function(){hY(t)}),i(" reversePoints",function(){_Y(t)}),i(" acyclic.undo",function(){pP.undo(t)})}function JK(t,i){re.forEach(t.nodes(),function(e){var n=t.node(e),o=i.node(e);n&&(n.x=o.x,n.y=o.y,i.children(e).length&&(n.width=o.width,n.height=o.height))}),re.forEach(t.edges(),function(e){var n=t.edge(e),o=i.edge(e);n.points=o.points,re.has(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=i.graph().width,t.graph().height=i.graph().height}var eY=["nodesep","edgesep","ranksep","marginx","marginy"],tY={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},nY=["acyclicer","ranker","rankdir","align"],iY=["width","height"],oY={width:0,height:0},rY=["minlen","weight","width","height","labeloffset"],aY={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},sY=["labelpos"];function cY(t){var i=new XK({multigraph:!0,compound:!0}),e=A_(t.graph());return i.setGraph(re.merge({},tY,R_(e,eY),re.pick(e,nY))),re.forEach(t.nodes(),function(n){var o=A_(t.node(n));i.setNode(n,re.defaults(R_(o,iY),oY)),i.setParent(n,t.parent(n))}),re.forEach(t.edges(),function(n){var o=A_(t.edge(n));i.setEdge(n,re.merge({},aY,R_(o,rY),re.pick(o,sY)))}),i}function dY(t){var i=t.graph();i.ranksep/=2,re.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function lY(t){re.forEach(t.edges(),function(i){var e=t.edge(i);if(e.width&&e.height){var n=t.node(i.v),o=t.node(i.w),r={rank:(o.rank-n.rank)/2+n.rank,e:i};zn.addDummyNode(t,"edge-proxy",r,"_ep")}})}function uY(t){var i=0;re.forEach(t.nodes(),function(e){var n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,i=re.max(i,n.maxRank))}),t.graph().maxRank=i}function fY(t){re.forEach(t.nodes(),function(i){var e=t.node(i);e.dummy==="edge-proxy"&&(t.edge(e.e).labelRank=e.rank,t.removeNode(i))})}function pY(t){var i=Number.POSITIVE_INFINITY,e=0,n=Number.POSITIVE_INFINITY,o=0,r=t.graph(),a=r.marginx||0,s=r.marginy||0;function c(u){var f=u.x,m=u.y,x=u.width,P=u.height;i=Math.min(i,f-x/2),e=Math.max(e,f+x/2),n=Math.min(n,m-P/2),o=Math.max(o,m+P/2)}re.forEach(t.nodes(),function(u){c(t.node(u))}),re.forEach(t.edges(),function(u){var f=t.edge(u);re.has(f,"x")&&c(f)}),i-=a,n-=s,re.forEach(t.nodes(),function(u){var f=t.node(u);f.x-=i,f.y-=n}),re.forEach(t.edges(),function(u){var f=t.edge(u);re.forEach(f.points,function(m){m.x-=i,m.y-=n}),re.has(f,"x")&&(f.x-=i),re.has(f,"y")&&(f.y-=n)}),r.width=e-i+a,r.height=o-n+s}function hY(t){re.forEach(t.edges(),function(i){var e=t.edge(i),n=t.node(i.v),o=t.node(i.w),r,a;e.points?(r=e.points[0],a=e.points[e.points.length-1]):(e.points=[],r=o,a=n),e.points.unshift(zn.intersectRect(n,r)),e.points.push(zn.intersectRect(o,a))})}function mY(t){re.forEach(t.edges(),function(i){var e=t.edge(i);if(re.has(e,"x"))switch((e.labelpos==="l"||e.labelpos==="r")&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset;break}})}function _Y(t){re.forEach(t.edges(),function(i){var e=t.edge(i);e.reversed&&e.points.reverse()})}function gY(t){re.forEach(t.nodes(),function(i){if(t.children(i).length){var e=t.node(i),n=t.node(e.borderTop),o=t.node(e.borderBottom),r=t.node(re.last(e.borderLeft)),a=t.node(re.last(e.borderRight));e.width=Math.abs(a.x-r.x),e.height=Math.abs(o.y-n.y),e.x=r.x+e.width/2,e.y=n.y+e.height/2}}),re.forEach(t.nodes(),function(i){t.node(i).dummy==="border"&&t.removeNode(i)})}function vY(t){re.forEach(t.edges(),function(i){if(i.v===i.w){var e=t.node(i.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:i,label:t.edge(i)}),t.removeEdge(i)}})}function yY(t){var i=zn.buildLayerMatrix(t);re.forEach(i,function(e){var n=0;re.forEach(e,function(o,r){var a=t.node(o);a.order=r+n,re.forEach(a.selfEdges,function(s){zn.addDummyNode(t,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:r+ ++n,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function CY(t){re.forEach(t.nodes(),function(i){var e=t.node(i);if(e.dummy==="selfedge"){var n=t.node(e.e.v),o=n.x+n.width/2,r=n.y,a=e.x-o,s=n.height/2;t.setEdge(e.e,e.label),t.removeNode(i),e.label.points=[{x:o+2*a/3,y:r-s},{x:o+5*a/6,y:r-s},{x:o+a,y:r},{x:o+5*a/6,y:r+s},{x:o+2*a/3,y:r+s}],e.label.x=e.x,e.label.y=e.y}})}function R_(t,i){return re.mapValues(re.pick(t,i),Number)}function A_(t){var i={};return re.forEach(t,function(e,n){i[n.toLowerCase()]=e}),i}});var CP=g((Xre,yP)=>{"use strict";var rp=Me(),xY=nt(),bY=wt().Graph;yP.exports={debugOrdering:wY};function wY(t){var i=xY.buildLayerMatrix(t),e=new bY({compound:!0,multigraph:!0}).setGraph({});return rp.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),rp.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),rp.forEach(i,function(n,o){var r="layer"+o;e.setNode(r,{rank:"same"}),rp.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var bP=g((Zre,xP)=>{"use strict";xP.exports="0.8.5"});var SP=g((Qre,wP)=>{"use strict";wP.exports={graphlib:wt(),layout:vP(),debug:CP(),util:{time:nt().time,notime:nt().notime},version:bP()}});var Kn=class{constructor(i,e,n,o,r){this.center=i,this.radiusX=e,this.radiusY=n,this.startAngle=o,this.endAngle=r}},A=class t{static castToPoint(i){return i||t.initialize()}static initialize(i=0,e=0){return{x:i,y:e}}static copy(i){return t.initialize(i.x,i.y)}static isEqual(i,e){return i.x===e.x&&i.y===e.y}static sum(i,e){return{x:i.x+e.x,y:i.y+e.y}}static sub(i,e){return{x:i.x-e.x,y:i.y-e.y}}static div(i,e){return{x:i.x/e,y:i.y/e}}static mult(i,e){return{x:i.x*e,y:i.y*e}}static interpolatePoints(i,e,n){let o=1-n;return t.initialize(i.x*o+e.x*n,i.y*o+e.y*n)}static roundTo(i,e){let n=Math.trunc(i.x/e),o=Math.trunc(i.y/e);return{x:n*e,y:o*e}}static hypotenuse(i,e){let n=e.x-i.x,o=e.y-i.y;return Math.abs(Math.sqrt(n*n+o*o))}static distance(i,e){let n=i.x-e.x,o=i.y-e.y;return Math.sqrt(n*n+o*o)}static getMinimum(i,e){return t.initialize(Math.min(i.x,e.x),Math.min(i.y,e.y))}static getMaximum(i,e){return t.initialize(Math.max(i.x,e.x),Math.max(i.y,e.y))}static matrixTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getScreenCTM();if(o){let r=e.createSVGPoint();r.x=i.x,r.y=i.y,n=r.matrixTransform(o.inverse())}return n}static elementTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getBoundingClientRect();return n=t.sub(n,t.initialize(o.left,o.top)),n}},Z=class t{constructor(i=0,e=0){this.x=i,this.y=e}static fromPoint(i){return new t(i.x,i.y)}add(i){let e=A.sum(this,i);return t.fromPoint(e)}sub(i){let e=A.sub(this,i);return t.fromPoint(e)}subNumber(i){let e=A.sub(this,new t(i,i));return t.fromPoint(e)}div(i){let e=A.div(this,i);return t.fromPoint(e)}mult(i){let e=A.mult(this,i);return t.fromPoint(e)}matrixTransform(i){let e=A.matrixTransform(this,i);return t.fromPoint(e)}elementTransform(i){let e=A.elementTransform(this,i);return t.fromPoint(e)}},Co=class{static initialize(i=A.initialize(),e=A.initialize()){return{point1:i,point2:e}}static copy(i){return{point1:i.point1,point2:i.point2}}static hypotenuse(i){return Math.sqrt(Math.pow(i.point1.x-i.point2.x,2)+Math.pow(i.point1.y-i.point2.y,2))}},Yn=class{constructor(i,e){this.point1=i,this.point2=e}},V=class t{static initialize(i=0,e=0,n=0,o=0){n<0&&(i=i+n,n=-n),o<0&&(e=e+o,o=-o);let r=A.initialize(i+n/2,e+o/2);return{x:i,y:e,width:n,height:o,gravityCenter:r}}static copy(i){return t.initialize(i.x,i.y,i.width,i.height)}static fromElement(i){let{x:e,y:n,width:o,height:r}=i.getBoundingClientRect();return t.initialize(e,n,o,r)}static isIncludePoint(i,e){return e.x>=t.left(i)&&e.x<=t.right(i)&&e.y>=t.top(i)&&e.y<=t.bottom(i)}static intersectionWithRect(i,e){return!(i.x+i.width<e.x||e.x+e.width<i.x||i.y+i.height<e.y||e.y+e.height<i.y)}static left(i){return i.x}static top(i){return i.y}static right(i){return i.x+i.width}static bottom(i){return i.y+i.height}static addPoint(i,e){let n=t.copy(i);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(i,e){let n=t.copy(i);return n.x*=e,n.y*=e,n.width*=e,n.height*=e,this.initialize(n.x,n.y,n.width,n.height)}static div(i,e){let n=t.copy(i);return n.x/=e,n.y/=e,n.width/=e,n.height/=e,this.initialize(n.x,n.y,n.width,n.height)}static addPointToSize(i,e){let n=t.copy(i);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(i){return!i||i.length===0?null:i.reduce((e,n)=>{let o=Math.min(e.x,n.x),r=Math.min(e.y,n.y),a=Math.max(e.x+e.width,n.x+n.width),s=Math.max(e.y+e.height,n.y+n.height);return t.initialize(o,r,a-o,s-r)},i[0])}static elementTransform(i,e){let n=e.getBoundingClientRect(),o=A.sub(i,A.initialize(n.left,n.top));return t.initialize(o.x,o.y,i.width,i.height)}static updateIsNotFinite(i){return!Number.isFinite(i.width)||!Number.isFinite(i.height)||!Number.isFinite(i.x)||!Number.isFinite(i.y)?t.initialize(0,0,0,0):i}};function Xg(t,i){let e=Math.max(t.width,i),n=Math.max(t.height,i),o=(e-t.width)/2,r=(n-t.height)/2;return V.initialize(t.x-o,t.y-r,e,n)}function Np(t,i){t=V.updateIsNotFinite(t),i.setAttribute("x",t.x.toString()),i.setAttribute("y",t.y.toString()),i.setAttribute("width",t.width.toString()),i.setAttribute("height",t.height.toString())}function Zg(t,i){t=V.updateIsNotFinite(t),i.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var Le=class t{constructor(i=0,e=0,n=0,o=0,r=0,a=0,s=0,c=0){this.x=i,this.y=e,this.width=n,this.height=o,this.radius1=r,this.radius2=a,this.radius3=s,this.radius4=c,this.gravityCenter=A.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(i){return new Z(i.x+i.width/2,i.y+i.height/2)}static fromRect(i){return new t(i.x,i.y,i.width,i.height)}static fromRoundedRect(i){return new t(i.x,i.y,i.width,i.height,i.radius1,i.radius2,i.radius3,i.radius4)}static fromCenter(i,e,n){return new t(i.gravityCenter.x-e/2,i.gravityCenter.y-n/2,e,n,i.radius1,i.radius2,i.radius3,i.radius4)}static fromPoint(i){return new t(i.x,i.y)}addPoint(i){let e=t.fromRoundedRect(this);return e.x+=i.x,e.y+=i.y,e.gravityCenter=this.calculateGravityCenter(e),e}},et=class t{static initialize(i=0,e=0){return{width:i,height:e}}static isEqual(i,e){return i.width===e.width&&i.height===e.height}static offsetFromElement(i){if(i instanceof SVGGraphicsElement){let e=i.getBBox();return t.initialize(e.width,e.height)}else if(i instanceof HTMLElement)return t.initialize(i.offsetWidth,i.offsetHeight)}};function nk(){return{position:A.initialize(),scaledPosition:A.initialize(),scale:1,rotate:0}}function ik(t){let i;if(t){t=t.replace("matrix(",""),t=t.replace(")","");let e=t.split(" ");i={position:{x:Number(e[4]),y:Number(e[5])},scaledPosition:A.initialize(),scale:Number(e[0]),rotate:0}}return i}var vn=class{static toString(i){let e=A.sum(i.position,i.scaledPosition);return`matrix(${i.scale}, 0, 0, ${i.scale}, ${e.x}, ${e.y})`}static fromString(i){return ik(i)}static default(){return nk()}},ot=class t{static initialize(i=0,e=0){return A.initialize(i,e)}static fromPoints(i,e){return t.initialize(e.x-i.x,e.y-i.y)}static vectorLength(i){return Math.sqrt(t.magnitudeSquared(i))}static magnitudeSquared(i){return i.x*i.x+i.y*i.y}static dotProduct(i,e){return i.x*e.x+i.y*e.y}static crossProduct(i,e){return i.x*e.y-i.y*e.x}static subtract(i,e){return t.initialize(i.x-e.x,i.y-e.y)}static add(i,e){return t.initialize(i.x+e.x,i.y+e.y)}static scale(i,e){return t.initialize(i.x*e,i.y*e)}static angle(i,e){let n=Math.acos(Math.max(-1,Math.min(t.dotProduct(i,e)/(t.vectorLength(i)*t.vectorLength(e)),1)));return t.crossProduct(i,e)<0?-n:n}},Op=class{static parseRoundedRect(i){let e=Math.PI*.5,n=i.x,o=i.y,r=i.x+i.width,a=i.y+i.height,s=i.x+i.radius1,c=i.y+i.radius1,u=i.x+i.width-i.radius2,f=i.y+i.radius2,m=i.x+i.width-i.radius3,x=i.y+i.height-i.radius3,P=i.x+i.radius4,E=i.y+i.height-i.radius4;return[new Kn({x:s,y:c},i.radius1,i.radius1,2*e,3*e),new Yn({x:s,y:o},{x:u,y:o}),new Kn({x:u,y:f},i.radius2,i.radius2,3*e,4*e),new Yn({x:r,y:f},{x:r,y:x}),new Kn({x:m,y:x},i.radius3,i.radius3,0,e),new Yn({x:m,y:a},{x:P,y:a}),new Kn({x:P,y:E},i.radius4,i.radius4,e,2*e),new Yn({x:n,y:E},{x:n,y:c})]}},Pi=class{static getRoundedRectIntersections(i,e,n){let o=Op.parseRoundedRect(n);for(let r of o)if(r instanceof Kn){let a=this.intersectArcWithLine(r,i,e);if(a.length>0)return a}else if(r instanceof Yn){let a=this.intersectLineSegments(i,e,r.point1,r.point2);if(a)return[a]}return[]}static getRoundedRectIntersectionsWithSVGPath(i,e){let n=i.getTotalLength(),o=[];for(let r=0;r<=n;r+=1){let a=i.getPointAtLength(r);o.push({x:a.x,y:a.y})}for(let r=1;r<o.length;r++){let a=this.getRoundedRectIntersections(o[r-1],o[r],e);if(a.length>0)return a}return[]}static intersectArcWithLine(i,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(i.center,i.radiusX,i.radiusY,e,n),i)}static intersectLineSegments(i,e,n,o){let r=e.x-i.x,a=e.y-i.y,s=o.x-n.x,c=o.y-n.y,u=(-a*(i.x-n.x)+r*(i.y-n.y))/(-s*a+r*c),f=(s*(i.y-n.y)-c*(i.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&f>=0&&f<=1?{x:i.x+f*r,y:i.y+f*a}:null}static filterPointsWithinArc(i,e){let{center:n,startAngle:o,endAngle:r}=e;if(i.length===0)return i;r<o&&([o,r]=[r,o]),(o<0||r<0)&&(o+=2*Math.PI,r+=2*Math.PI);let a=[];for(let s of i){let c=this.normalizeAngle(ot.angle(ot.initialize(1,0),ot.initialize(s.x-n.x,s.y-n.y)));c<o&&(c+=2*Math.PI),o<=c&&c<=r&&a.push(s)}return a}static normalizeAngle(i){let e=i%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(i,e,n,o,r){let a=ot.initialize(o.x,o.y),s=ot.fromPoints(o,r),c=ot.initialize(i.x,i.y),u=ot.subtract(a,c),f=ot.initialize(s.x/(e*e),s.y/(n*n)),m=ot.initialize(u.x/(e*e),u.y/(n*n)),x=ot.dotProduct(s,f),P=ot.dotProduct(s,m),E=ot.dotProduct(u,m)-1,N=P*P-x*E;return N<0?[]:this.calculateIntersectionPoints(N,x,P,o,r)}static calculateIntersectionPoints(i,e,n,o,r){let a=[];if(i>0){let s=Math.sqrt(i),c=(-n-s)/e,u=(-n+s)/e;c>=0&&c<=1&&a.push(A.interpolatePoints(o,r,c)),u>=0&&u<=1&&a.push(A.interpolatePoints(o,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(A.interpolatePoints(o,r,s))}return a}};var Rp=class{handle(i,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(i)),!!n)return e.get(this.execution).handle(i)}execute(i,e){return e.get(this.execution).handle(i)}setValidator(i){this.validator=i}setExecution(i){this.execution=i}},D=class t{constructor(){this._injector=l(Ye)}static registerPipeline(i,e,n){if(!i||!i.fToken)throw new Error("Type must have a fToken static property.");let o=this.pipelines.get(i.fToken)||new Rp;n?o.setValidator(e):o.setExecution(e),this.pipelines.set(i.fToken,o)}send(i){let e=t.pipelines.get(i.constructor.fToken);if(e)return e.handle(i,this._injector);throw new Error("Handler not registered for request type.")}execute(i){return t.pipelines.get(i.constructor.fToken).execute(i,this._injector)}};D.pipelines=new Map;D.\u0275fac=function(i){return new(i||D)};D.\u0275prov=y({token:D,factory:D.\u0275fac});function w(t){return function(i){D.registerPipeline(t,i,!1)}}var ok=(()=>{class t{setItem(e,n){localStorage.setItem(e,n)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rk=(()=>{class t{storage={};setItem(e,n){this.storage[e]=n}getItem(e){return this.storage[e]||null}removeItem(e){delete this.storage[e]}clear(){this.storage={}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ak=new ue("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>an(l(Hr))?l(ok):l(rk)}),sk=(()=>{class t{getComputedStyle(e){return window.getComputedStyle(e)}get innerWidth(){return window.innerWidth}get innerHeight(){return window.innerHeight}get pageXOffset(){return window.pageXOffset}get pageYOffset(){return window.pageYOffset}isMediaQuery(e){return window.matchMedia(e).matches}requestAnimationFrame(e){return window.requestAnimationFrame(e)}get location(){return window.location}open(e,n,o){window.open(e,n,o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ck=(()=>{class t{getComputedStyle(e){return new Proxy({getPropertyValue:n=>"0"},{get:(n,o)=>o==="getPropertyValue"?n.getPropertyValue:"0"})}get innerWidth(){return 0}get innerHeight(){return 0}get pageXOffset(){return 0}get pageYOffset(){return 0}isMediaQuery(e){return!1}requestAnimationFrame(e){return setTimeout(e,0)}get location(){return{href:"",pathname:"",search:"",hash:"",origin:""}}open(e,n,o){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),dk=new ue("F_WINDOW",{providedIn:"root",factory:()=>an(l(Hr))?l(sk):l(ck)}),yn=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(yn||{}),Ap;try{Ap=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Ap=!1}var Fp=(()=>{class t{_platformId;isBrowser=!1;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Ap)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(e){this._platformId=e,this.isBrowser=this._platformId?an(this._platformId):typeof document=="object"&&!!document}getOS(){let e=navigator.userAgent.toLowerCase(),n=/(macintosh|macintel|macppc|mac68k|macos)/i,o=/(win32|win64|windows|wince)/i,r;return n.test(e)?r=yn.MAC_OS:this.IOS?r=yn.IOS:o.test(e)?r=yn.WINDOWS:this.ANDROID?r=yn.ANDROID:!r&&/linux/.test(e)&&(r=yn.LINUX),r}static \u0275fac=function(n){return new(n||t)(yi(Hr))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ze=(()=>{class t{injectedDocument;windowService;localStorageService;platformService;constructor(e,n,o,r){this.injectedDocument=e,this.windowService=n,this.localStorageService=o,this.platformService=r}isBrowser(){return this.platformService.isBrowser}get window(){return this.windowService}get localStorage(){return this.localStorageService}get document(){return this.injectedDocument}toPixels(e,n,o,r){if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("%")){let a=parseFloat(e)/100;return Math.max(n,o)*a}else{if(e.endsWith("em"))return parseFloat(e)*parseFloat(r);if(e.endsWith("rem"))return parseFloat(e)*parseFloat(getComputedStyle(this.document.documentElement).fontSize);if(e.endsWith("vh")){let a=this.window.innerHeight/100;return parseFloat(e)*a}else if(e.endsWith("vw")){let a=this.window.innerWidth/100;return parseFloat(e)*a}}return parseFloat(e)||0}static \u0275fac=function(n){return new(n||t)(yi(Gr),yi(dk),yi(ak),yi(Fp))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Lp(t,i){return t.reduce((e,n)=>[...e,...i(n)],[])}function zp(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o<e.length;o++)e[o].removeAttribute("id");return n==="canvas"?e0(t,i):(n==="input"||n==="select"||n==="textarea")&&Jg(t,i),Qg("canvas",t,i,e0),Qg("input, textarea, select",t,i,Jg),i}function Qg(t,i,e,n){let o=i.querySelectorAll(t);if(o.length){let r=e.querySelectorAll(t);for(let a=0;a<o.length;a++)n(o[a],r[a])}}var lk=0;function Jg(t,i){i.type!=="file"&&(i.value=t.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${lk++}`)}function e0(t,i){let e=i.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function Bp(t,i,e){for(let n in i)if(i.hasOwnProperty(n)){let o=i[n];o?t.setProperty(n,o,e?.has(n)?"important":""):t.removeProperty(n)}return t}function t0(t){Bp(t.style,{"touch-action":"none","-webkit-user-drag":"none","-webkit-tap-highlight-color":"transparent","user-select":"none","-ms-user-select":"none","-webkit-user-select":"none","-moz-user-select":"none"})}function n0(t,i,e){return uk(t,e).dataset[i]}function uk(t,i){return t.closest(i)}function qp(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let n=i.createElement("div");return e.forEach(o=>n.appendChild(o)),n}function xo(t,i){let e=fk(t,i);return!!e&&!e.classList.contains(i+"-disabled")}function fk(t,i){return t.closest(i)}function Xt(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function Mi(t,i,e){let n=e[t.toUpperCase()]||pk(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${i}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function pk(t,i){return Object.keys(t).find(e=>t[e]===i)}var hk=["markerElement"],mk=["fConnectionGradientRenderer",""],_k=["f-connection-path",""],gk=["fConnectionSelection",""],vk=["f-connection-drag-handle-start",""],yk=["f-connection-drag-handle-end",""],Ck=["defs"],xk=["*"],bk=["fGroupsContainer"],wk=["fNodesContainer"],Sk=["fConnectionsContainer"],Tk=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],Ik=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],Ek=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],Pk=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function Mk(t,i){t&1&&(Je(),R(0,"linearGradient",3)),t&2&&M("fConnectionGradientRendererFor",i)}function kk(t,i){t&1&&(Je(),R(0,"circle",6))}function Dk(t,i){t&1&&ke(0,4)}var Ok="[_nghost-%COMP%]{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}",Nk=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],Rk=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],Up=new ue("F_BACKGROUND_PATTERN"),Vd=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(i){this.fPattern=i}},Ri=class{_items=[];_byId=new Map;get(i){return this._byId.get(i)}require(i){let e=this._byId.get(i);if(!e)throw new Error(`${this.kind} not found: ${i}`);return e}has(i){return this._byId.has(i)}getAll(){return this._items}size(){return this._items.length}add(i){let e=i.fId();if(this._byId.has(e))throw new Error(`${this.kind} already exists: ${e}`);this._items.push(i),this._byId.set(e,i)}addMany(i){for(let e of i)this.add(e)}remove(i){let e=i.fId(),n=this._byId.get(e);if(!n)return!1;this._byId.delete(e);let o=this._items.indexOf(n);return o>=0&&this._items.splice(o,1),!0}removeById(i){let e=this._byId.get(i);if(!e)return;this._byId.delete(i);let n=this._items.indexOf(e);return n>=0&&this._items.splice(n,1),e}clear(){this._items.length=0,this._byId.clear()}};function Xn(t){return{name:t}}var Wp=class{_instances=new Map;get(i){return this._instances.get(i.name)}require(i){let e=this.get(i);if(!e)throw new Error(`Instance not found: ${i.name}`);return e}has(i){return this._instances.has(i.name)}add(i,e){if(this._instances.has(i.name))throw new Error(`${i.name} already exists`);this._instances.set(i.name,e)}remove(i){if(!this._instances.has(i.name))throw new Error(`${i.name} does not exist`);return this._instances.delete(i.name),!0}clear(){this._instances.clear()}},wo=class extends Ri{kind;constructor(i){super(),this.kind=i}},$p=class extends Ri{kind="Connection Marker"},Kp=class extends Ri{kind="Connection";_instancesForCreate;_instancesForSnap;getForSnap(){return this._instancesForSnap}getForCreate(){return this._instancesForCreate}addForCreate(i){this._instancesForCreate=i}addForSnap(i){this._instancesForSnap=i}removeInstanceForCreate(){this._instancesForCreate=void 0}removeInstanceForSnap(){this._instancesForSnap=void 0}},Yp=class extends Ri{kind="Node"},Di=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(i=!0){this.notifyOnSubscribe=i}};function Ak(){return t=>{let i=null,e=null,n=()=>{i!==null&&cancelAnimationFrame(i),e!==null&&cancelAnimationFrame(e),i=e=null};return{callback:()=>{n(),i=requestAnimationFrame(()=>{i=null,e=requestAnimationFrame(()=>{e=null,t()})})},cleanup:n}}}function Fk(){return t=>{let i=null;return{callback:()=>{i!==null&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=null,t()})},cleanup:()=>{i!==null&&cancelAnimationFrame(i),i=null}}}}function jd(t){return i=>{let e=null;return{callback:()=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{e=null,i()},t)},cleanup:()=>{e!==null&&clearTimeout(e),e=null}}}}var yt=class{_listeners=new Set;notify(){this._listeners.forEach(i=>i())}listen(i){return this._listeners.add(i),()=>this.stop(i)}stop(i){this._listeners.delete(i)}},Xp=class extends yt{_htmlElement;_observer=new ResizeObserver(()=>this.notify());_isObserving=!1;constructor(i){super(),this._htmlElement=i}listen(i){return this._isObserving||(this._observer.observe(this._htmlElement),this._isObserving=!0),super.listen(i)}stop(i){super.stop(i),this._listeners.size===0&&this._disconnect()}_disconnect(){this._observer.unobserve(this._htmlElement),this._observer.disconnect(),this._isObserving=!1}},Bt=class t{_channels=[];_operators=[];constructor(...i){this._channels=[...i]}pipe(...i){let e=new t(...this._channels);return e._operators=[...this._operators,...i],e}listen(i,e){let n=e,o=[],r=[],a=[];for(let m of[...this._operators].reverse()){let x=m(n);n=x.callback,x.cleanup&&o.push(x.cleanup),x.onSubscribe&&r.push(x.onSubscribe),x.setTeardown&&a.push(x.setTeardown)}let s=this._channels.map(m=>m.listen(()=>n())),c=null,u=!1,f=()=>{u||(u=!0,c?.(),c=null,s.forEach(m=>m()),o.forEach(m=>m()))};a.slice().reverse().forEach(m=>m(f)),r.slice().reverse().forEach(m=>m(n)),c=i.onDestroy(f)}};function xf(){return t=>{let i=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{i&&e()})},cleanup:()=>{i=!1}}}}function i0(){return t=>{let i=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!i){i=!0;try{t()}finally{e?.()}}}}}}var Lk=(()=>{let t=class Ca{_store=l(k);handle({notifyOnSubscribe:e}){return e?new Bt(this._store.connectionsChanges$).pipe(xf(),jd(1)):new Bt(this._store.connectionsChanges$).pipe(jd(1))}static \u0275fac=function(n){return new(n||Ca)};static \u0275prov=y({token:Ca,factory:Ca.\u0275fac})};return t=b([w(Di)],t),t})(),Zp=class{static fToken=Symbol("ListenNodesChangesRequest")},zk=(()=>{let t=class xa{_store=l(k);handle(e){return new Bt(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||xa)};static \u0275prov=y({token:xa,factory:xa.\u0275fac})};return t=b([w(Zp)],t),t})(),Ud=class{static fToken=Symbol("ListenTransformChangesRequest")},Bk=(()=>{let t=class ba{_store=l(k);handle(e){return new Bt(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||ba)};static \u0275prov=y({token:ba,factory:ba.\u0275fac})};return t=b([w(Ud)],t),t})(),Zn=class{static fToken=Symbol("EmitConnectionsChangesRequest")},qk=(()=>{let t=class wa{_store=l(k);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||wa)};static \u0275prov=y({token:wa,factory:wa.\u0275fac})};return t=b([w(Zn)],t),t})(),wn=class{static fToken=Symbol("NotifyTransformChangedRequest")},k=(()=>{class t{transformChanges$=new yt;viewportAnimationChanges$=new yt;connectionsChanges$=new yt;_connectionsRevision=0;connectionsRenderedChanges$=new yt;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new yt;_nodesRevision=0;progressiveRenderChanges$=new yt;_pendingProgressiveRenderCount=0;get connectionsRevision(){return this._connectionsRevision}get connectionsRenderedRevision(){return this._connectionsRenderedRevision}get connectionsRenderedNodesRevision(){return this._connectionsRenderedNodesRevision}get nodesRevision(){return this._nodesRevision}get hasPendingProgressiveRender(){return this._pendingProgressiveRenderCount>0}get isViewportAnimating(){return this._viewportAnimationCount>0}get flowHost(){return this.fFlow?.hostElement}fFlow;fCanvas;get transform(){return this.fCanvas?.transform}nodes=new Yp;connections=new Kp;connectionMarkers=new $p;outputs=new wo("Output");inputs=new wo("Input");outlets=new wo("Outlet");instances=new Wp;fDraggable;emitNodeChanges(){this._nodesRevision++,this.nodesChanges$.notify()}emitConnectionChanges(){this._connectionsRevision++,this.connectionsChanges$.notify()}completeConnectionsRender(e,n){e<this._connectionsRenderedRevision||e===this._connectionsRenderedRevision&&n<=this._connectionsRenderedNodesRevision||(this._connectionsRenderedRevision=Math.min(e,this._connectionsRevision),this._connectionsRenderedNodesRevision=n,this.connectionsRenderedChanges$.notify())}beginProgressiveRender(){this._pendingProgressiveRenderCount++,this.progressiveRenderChanges$.notify()}endProgressiveRender(){this._pendingProgressiveRenderCount&&(this._pendingProgressiveRenderCount--,this.progressiveRenderChanges$.notify())}transformChanged(){this.transformChanges$.notify()}beginViewportAnimation(){this._viewportAnimationCount++,this.viewportAnimationChanges$.notify()}endViewportAnimation(){this._viewportAnimationCount&&(this._viewportAnimationCount--,this.viewportAnimationChanges$.notify())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Te={MAGNETIC_LINES:Xn("magnetic-lines"),MAGNETIC_RECTS:Xn("magnetic-rects"),ZOOM:Xn("zoom-controls"),BACKGROUND:Xn("background"),SELECTION_AREA:Xn("selection-area"),MINIMAP:Xn("minimap"),AUTO_PAN:Xn("auto-pan")},Gk=(()=>{let t=class Sa{_store=l(k);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||Sa)};static \u0275prov=y({token:Sa,factory:Sa.\u0275fac})};return t=b([w(wn)],t),t})(),Sn=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(i,e){this.key=i,this.instance=e}},Hk=(()=>{let t=class Ta{_store=l(k);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Ta)};static \u0275prov=y({token:Ta,factory:Ta.\u0275fac})};return t=b([w(Sn)],t),t})(),Tn=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(i){this.key=i}},Vk=(()=>{let t=class Ia{_store=l(k);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Ia)};static \u0275prov=y({token:Ia,factory:Ia.\u0275fac})};return t=b([w(Tn)],t),t})(),jk=[k,zk,Lk,Bk,qk,Gk,Hk,Vk],Uk=0,Wk=(()=>{let t=class Ea{_store=l(k);_browser=l(ze);get _backgroundElement(){return this._store.instances.get(Te.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let o=Ni("defs",this._browser);if(e.fPattern?.hostElement.remove(),n.forEach(r=>{o.append(r)}),n.length){this._backgroundElement?.firstChild?.appendChild(o),n[n.length-1].id="f-background-pattern-"+Uk++;let r=n[n.length-1].id,a=Ni("rect",this._browser);a.setAttribute("fill","url(#"+r+")"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),this._backgroundElement?.firstChild?.appendChild(a);let s=this._store.fCanvas?.transform||vn.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||Ea)};static \u0275prov=y({token:Ea,factory:Ea.\u0275fac})};return t=b([w(Vd)],t),t})(),So=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(i){this.fTransform=i}},$k=(()=>{let t=class Pa{_store=l(k);handle(e){this._store.instances.get(Te.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||Pa)};static \u0275prov=y({token:Pa,factory:Pa.\u0275fac})};return t=b([w(So)],t),t})(),Kk=[Wk,$k],Wd=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(i){this.instance=i}},Yk=(()=>{let t=class Ma{_store=l(k);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Ma)};static \u0275prov=y({token:Ma,factory:Ma.\u0275fac})};return t=b([w(Wd)],t),t})(),$d=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(i,e){this.id=i,this.animated=e}},Xk=(()=>{let t=class ka{_store=l(k);_mediator=l(D);get _transform(){return this._store.transform}handle({id:e,animated:n}){let o=this._store.nodes.get(e);o&&(this._toCenter(this._getNodeRect(o),this._getFlowRect(),o._position),this._mediator.execute(new Ai(n,Qn.VIEWPORT_ONLY)))}_toCenter(e,n,o){this._transform.scaledPosition=A.initialize(),this._transform.position=A.initialize((n.width-e.width)/2-o.x*this._transform.scale,(n.height-e.height)/2-o.y*this._transform.scale)}_getNodeRect(e){return V.fromElement(e.hostElement)}_getFlowRect(){return V.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||ka)};static \u0275prov=y({token:ka,factory:ka.\u0275fac})};return t=b([w($d)],t),t})(),Kd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(i,e){this.toCenter=i,this.animated=e}},Zk=(()=>{let t=class Da{_store=l(k);get _transform(){return this._store.transform}_mediator=l(D);handle({toCenter:e,animated:n}){let o=this._mediator.execute(new Hi)||V.initialize();o.width===0||o.height===0||(this.fitToParent(o,V.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Ai(n,Qn.VIEWPORT_ONLY)))}fitToParent(e,n,o,r){this._transform.scaledPosition=A.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);let a=e.width/this._transform.scale+r.x,s=e.height/this._transform.scale+r.y;(a>n.width||s>n.height||a<n.width&&s<n.height)&&(this._transform.scale=Math.min(n.width/a,n.height/s));let c=(n.width-a*this._transform.scale)/2-this._transform.position.x*this._transform.scale,u=(n.height-s*this._transform.scale)/2-this._transform.position.y*this._transform.scale;this._transform.position=A.initialize(c+r.x/2*this._transform.scale,u+r.y/2*this._transform.scale)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return A.initialize(n,o)}static \u0275fac=function(n){return new(n||Da)};static \u0275prov=y({token:Da,factory:Da.\u0275fac})};return t=b([w(Kd)],t),t})(),Yd=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(i,e){this.transform=i,this.position=e}},Qk=(()=>{let t=class Oa{_store=l(k);handle({transform:e,position:n}){n&&(A.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=A.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return A.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||Oa)};static \u0275prov=y({token:Oa,factory:Oa.\u0275fac})};return t=b([w(Yd)],t),t})(),Xd=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(i,e){this.transform=i,this.scale=e}},Jk=(()=>{let t=class Na{_store=l(k);handle(e){!e.scale&&e.scale!==0||(e.transform.scale=e.scale,this._store.fCanvas?.redraw())}static \u0275fac=function(n){return new(n||Na)};static \u0275prov=y({token:Na,factory:Na.\u0275fac})};return t=b([w(Xd)],t),t})(),Qn=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Qn||{}),Ai=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(i,e=Qn.WITH_CONNECTION_CHANGES){this.animated=i,this.context=e}};function k0(t,i){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),i(n))};t.addEventListener("transitionend",e)}var eD=(()=>{let t=class Ra{_store=l(k);get _canvas(){return this._store.fCanvas}handle(e){e.animated?this._redrawWithAnimation(e.context):this._redraw(e.context),this._canvas?.emitCanvasChangeEvent()}_redrawWithAnimation(e){this._store.beginViewportAnimation(),this._canvas?.redrawWithAnimation(),k0(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Qn.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Qn.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ra)};static \u0275prov=y({token:Ra,factory:Ra.\u0275fac})};return t=b([w(Ai)],t),t})(),Zd=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},tD=(()=>{let t=class Aa{_store=l(k);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Aa)};static \u0275prov=y({token:Aa,factory:Aa.\u0275fac})};return t=b([w(Zd)],t),t})(),Qd=class{static fToken=Symbol("ResetScaleRequest")},nD=(()=>{let t=class Fa{_store=l(k);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=A.initialize()}static \u0275fac=function(n){return new(n||Fa)};static \u0275prov=y({token:Fa,factory:Fa.\u0275fac})};return t=b([w(Qd)],t),t})(),Jd=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(i){this.animated=i}},iD=(()=>{let t=class La{_mediator=l(D);_store=l(k);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Hi)||V.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,V.fromElement(this._store.flowHost),this._store.nodes.getAll().map(o=>o._position)),this._mediator.execute(new Ai(e,Qn.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,o){this._transform.scaledPosition=A.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);let r=(n.width-e.width/this._transform.scale)/2-this._transform.position.x,a=(n.height-e.height/this._transform.scale)/2-this._transform.position.y;this._transform.scale=1,this._transform.position=A.initialize(r,a)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return A.initialize(n,o)}static \u0275fac=function(n){return new(n||La)};static \u0275prov=y({token:La,factory:La.\u0275fac})};return t=b([w(Jd)],t),t})(),el=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(i,e){this.scale=i,this.toPosition=e}},oD=(()=>{let t=class za{_store=l(k);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let o=A.sum(this._transform.scaledPosition,this._transform.position),r=n.x-(n.x-o.x)*e/this._transform.scale,a=n.y-(n.y-o.y)*e/this._transform.scale;this._transform.scale=e,this._transform.scaledPosition=A.sub(A.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||za)};static \u0275prov=y({token:za,factory:za.\u0275fac})};return t=b([w(el)],t),t})(),rD=[Yk,Xk,Zk,Qk,Jk,eD,tD,nD,iD,oD],Qp=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(i){this.connection=i}},aD=(()=>{let t=class Ba{_store=l(k);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||Ba)};static \u0275prov=y({token:Ba,factory:Ba.\u0275fac})};return t=b([w(Qp)],t),t})(),tl=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(i){this.instance=i}},sD=(()=>{let t=class qa{_store=l(k);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||qa)};static \u0275prov=y({token:qa,factory:qa.\u0275fac})};return t=b([w(tl)],t),t})(),nl=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(i){this.connection=i}},cD=(()=>{let t=class Ga{_store=l(k);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ga)};static \u0275prov=y({token:Ga,factory:Ga.\u0275fac})};return t=b([w(nl)],t),t})(),Jp=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(i){this.connection=i}},dD=(()=>{let t=class Ha{_store=l(k);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||Ha)};static \u0275prov=y({token:Ha,factory:Ha.\u0275fac})};return t=b([w(Jp)],t),t})(),Fi=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(i){this.connection=i}},o0=new ue("F_CONNECTION_CONTENT");var il=class t{points;cumulativeLengths;segmentTangents;totalLength;constructor(i){let e=t._removeConsecutiveDuplicates(i);if(e.length<2){this.points=[{x:0,y:0},{x:1,y:0}],this.cumulativeLengths=[0,1],this.segmentTangents=[{x:1,y:0}],this.totalLength=1;return}this.points=e;let n=this.points.length,o=n-1,r=new Array(n).fill(0),a=new Array(o),s=0;for(let c=0;c<o;c++){let u=this.points[c+1].x-this.points[c].x,f=this.points[c+1].y-this.points[c].y,m=Math.hypot(u,f),x=m?u/m:1,P=m?f/m:0;a[c]={x,y:P},s+=m,r[c+1]=s}this.cumulativeLengths=r,this.segmentTangents=a,this.totalLength=s||1}static from(i){return new t(i.map(e=>({x:e.x,y:e.y})))}static _removeConsecutiveDuplicates(i){let e=[];for(let n of i){let o=e[e.length-1];(!o||o.x!==n.x||o.y!==n.y)&&e.push({x:n.x,y:n.y})}return e}},eh=class t{_polyline;constructor(i=[]){this._polyline=new il(i)}updatePoints(i){return this._polyline=new il(i),this._polyline.totalLength}calculateTotalLength(i){return this.updatePoints(i)}get totalLength(){return this._polyline.totalLength}getPointAtProgress(i){let{points:e,cumulativeLengths:n,segmentTangents:o,totalLength:r}=this._polyline,s=t._clamp(i,0,1)*r,c=.5;if(s<=c)return{point:e[0],tangent:o[0]??{x:1,y:0},atEdge:!0};if(r-s<=c){let U=e.length-1;return{point:e[U],tangent:o[U-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),f=Math.max(1,u),m=n[f-1],x=n[f],P=t._safeRatio(s-m,x-m),E=e[f-1],N=e[f],j={x:t._lerp(E.x,N.x,P),y:t._lerp(E.y,N.y,P)},L=o[f-1]??{x:1,y:0};return{point:j,tangent:L,atEdge:!1}}getPointAtLength(i){return this.getPointAtProgress(i)}getPointAtDistance(i){let e=this._polyline.totalLength?i/this._polyline.totalLength:0;return this.getPointAtProgress(e)}static _findRightIndex(i,e){let n=0,o=i.length-1;for(;n<o;){let r=n+o>>1;i[r]<e?n=r+1:o=r}return n}static _lerp(i,e,n){return i+(e-i)*n}static _clamp(i,e,n){return i<e?e:i>n?n:i}static _safeRatio(i,e){let n=Math.abs(e)<1e-6?1e-6:e;return i/n}},D0=(function(t){return t.NONE="none",t.ALONG="along",t})(D0||{}),th=class{compute(i,e){let n=this._clamp01(e.position()),{point:o,tangent:r}=i.getPointAtLength(n),a={x:-r.y,y:r.x},s=e.offset()??0,c=o.x+a.x*s,u=o.y+a.y*s,m=this._sizeAlongDirection(e.hostElement,r)*.5,x=n*i.totalLength,P=i.totalLength-x,E=this._applyEdgeGuard(c,u,r,x,P,m),N=this._calculateContentRotation(e.align(),r);return{position:E,rotationDeg:N}}_clamp01(i){return i<=0?0:i>=1?1:i}_applyEdgeGuard(i,e,n,o,r,a){if(o<=a){let s=a-o;return{x:i+n.x*s,y:e+n.y*s}}if(r<=a){let s=a-r;return{x:i-n.x*s,y:e-n.y*s}}return{x:i,y:e}}_sizeAlongDirection(i,e){let n=V.fromElement(i);return Math.abs(e.x)*n.width+Math.abs(e.y)*n.height}_normalize180(i){let e=(i+180)%360;return e<0&&(e+=360),e-180}_keepUpright(i){let e=this._normalize180(i);return e>90?e-=180:e<-90&&(e+=180),e}_calculateContentRotation(i,e){let n=0;return i===D0.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},nh=class{_placement;constructor(i=new th){this._placement=i}layout(i,e){let n=new eh(i),o=n.totalLength;for(let r of e){let{position:a,rotationDeg:s}=this._placement.compute(n,r);r.hostElement.style.transform=this._createTransformString(a,s)}return o}_createTransformString(i,e){return`translate3d(${i.x}px, ${i.y}px, 0) translate(-50%, -50%) rotate(${e}deg)`}};var r0=new ue("F_CONNECTION_WAYPOINTS");function O0(t,i,e){return(t.x-i.x)**2+(t.y-i.y)**2<=e**2}function lD(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(o=>O0(i,o,n))}function uD(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(o=>O0(i,o,n))}function fD(t,i){for(let e of t){let n=uD(e,i);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let o=lD(e,i);if(o&&e.fWaypoints()?.visibility())return{connection:e,candidate:o}}}var bf=new ue("F_CONNECTION_COMPONENTS_PARENT");var _e=(function(t){return t.START="f-connection-marker-start",t.END="f-connection-marker-end",t.SELECTED_START="f-connection-selected-marker-start",t.SELECTED_END="f-connection-selected-marker-end",t.START_ALL_STATES="f-connection-marker-start-all-states",t.END_ALL_STATES="f-connection-marker-end-all-states",t})(_e||{}),ol=new ue("F_CONNECTION_MARKER"),pD=0,rl=class{fId=q(`f-marker-${pD++}`);hostElement=l(Ne).nativeElement};function N0(t,i=_e.START){if(typeof t!="string")return i;let e=t.trim().toLowerCase();return e?hD(e)??i:i}function hD(t){switch(t){case"start":case"f-connection-marker-start":return _e.START;case"end":case"f-connection-marker-end":return _e.END;case"selected-start":case"f-connection-selected-marker-start":return _e.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return _e.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return _e.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return _e.END_ALL_STATES;default:return null}}var R0=(()=>{class t extends rl{_markerElement=Ae.required("markerElement");_type=O(_e.END_ALL_STATES,{alias:"type",transform:e=>N0(e,_e.END_ALL_STATES)});get markerElement(){return this._markerElement().nativeElement}width=6;height=7;refX=5.5;refY=3.5;get type(){return this._type()}orient="auto";markerUnits="strokeWidth";static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,o){n&1&&Tt(o._markerElement,hk,5),n&2&&ct()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[ge([{provide:ol,useExisting:t}]),he],decls:3,vars:0,consts:[["markerElement",""],["viewBox","0 0 6 6",1,"f-marker"],["d","M0,0 L6,3 0,6Z"]],template:function(n,o){n&1&&(Je(),W(0,"svg",1,0),bi(2,"path",2),$())},encapsulation:2})}return t})();var A0=(()=>{class t extends rl{_mediator=l(D);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=_e.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new tl(this))}ngOnDestroy(){this._mediator.execute(new Pl(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275dir=Ee({type:t,selectors:[["svg","fMarker",""]],hostAttrs:[1,"f-component","f-marker"],inputs:{width:"width",height:"height",refX:"refX",refY:"refY",type:[2,"type","type",e=>N0(e,_e.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[ge([{provide:ol,useExisting:t}]),he]})}return t})(),xn=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(xn||{}),Se=(function(t){return t.DEFAULT="default",t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t})(Se||{});function mD({sourceRect:t,targetRect:i}){return{point1:t.gravityCenter,point2:i.gravityCenter}}var F=(function(t){return t.LEFT="left",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t.AUTO="auto",t})(F||{}),ki=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(ki||{});function _D({sourceRect:t,sourceConnectableSide:i,targetRect:e,targetConnectableSide:n}){return{point1:a0(t,i===F.AUTO?F.BOTTOM:i),point2:a0(e,n===F.AUTO?F.TOP:n)}}function a0(t,i){switch(i){case F.TOP:return{x:t.x+t.width/2,y:t.y};case F.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case F.LEFT:return{x:t.x,y:t.y+t.height/2};case F.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${i}`)}}function F0(t,i,e,n){if(!n||!n.rotationDeg)return Pi.getRoundedRectIntersections(t,i,e)[0];let o=Va(t,-n.rotationDeg,n.pivot),r=Va(i,-n.rotationDeg,n.pivot),a=gD(e,-n.rotationDeg,n.pivot),s=Pi.getRoundedRectIntersections(o,r,a)[0];return s?Va(s,n.rotationDeg,n.pivot):void 0}function gD(t,i,e){let n=Va(vD(t),i,e);return new Le(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function vD(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Va(t,i,e){let n=t.x-e.x,o=t.y-e.y,r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:n*a-o*s+e.x,y:n*s+o*a+e.y}}function yD({sourceRect:t,targetRect:i,sourceRotationContext:e,targetRotationContext:n}){return bD(CD(t,i,e),xD(t,i,n),t,i)}function CD(t,i,e){return F0(t.gravityCenter,i.gravityCenter,t,e)}function xD(t,i,e){return F0(i.gravityCenter,t.gravityCenter,i,e)}function bD(t,i,e,n){return{point1:t||e.gravityCenter,point2:i||n.gravityCenter}}var va=.5,wD={[xn.FLOATING]:yD,[xn.FIXED_CENTER]:mD,[xn.FIXED]:_D},Ki=(()=>{class t{handle(e){let n=this._calculateDirectionalVectors(e.sourceRect.gravityCenter.x,e.sourceRect.gravityCenter.y,e.targetRect.gravityCenter.x,e.targetRect.gravityCenter.y),o=this._determineSourceSide(e,n),r=this._determineTargetSide(e,n);return e.connection._applyResolvedSidesToConnection(o,r),this._getBehaviorHandler(e.connection.fBehavior)({sourceRect:e.sourceRect,targetRect:e.targetRect,sourceConnectableSide:o,targetConnectableSide:r,sourceRotationContext:e.sourceRotationContext,targetRotationContext:e.targetRotationContext})}_calculateDirectionalVectors(e,n,o,r){let a=o-e,s=r-n;return{sourceToTargetX:a,sourceToTargetY:s,targetToSourceX:-a,targetToSourceY:-s}}_determineSourceSide(e,n){return this._resolveConnectableSide(e.connection.fOutputSide(),n.sourceToTargetX,n.sourceToTargetY,e.sourceConnectableSide)}_determineTargetSide(e,n){return this._resolveConnectableSide(e.connection.fInputSide(),n.targetToSourceX,n.targetToSourceY,e.targetConnectableSide)}_resolveConnectableSide(e,n,o,r){if(e===Se.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(o);if(a<va&&s<va)return r;let u=a>=s;switch(e){case Se.CALCULATE:return u?n>=0?F.RIGHT:F.LEFT:o>=0?F.BOTTOM:F.TOP;case Se.CALCULATE_HORIZONTAL:return a<va?r:n>=0?F.RIGHT:F.LEFT;case Se.CALCULATE_VERTICAL:return s<va?r:o>=0?F.BOTTOM:F.TOP;case Se.TOP:return F.TOP;case Se.BOTTOM:return F.BOTTOM;case Se.LEFT:return F.LEFT;case Se.RIGHT:return F.RIGHT;default:return r}}_getBehaviorHandler(e){let n=wD[e];if(!n)throw new Error(`[Behavior] No handler for behavior: ${e}`);return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Pt=class{sourceRect;targetRect;connection;sourceConnectableSide;targetConnectableSide;sourceRotationContext;targetRotationContext;constructor(i,e,n,o,r,a,s){this.sourceRect=i,this.targetRect=e,this.connection=n,this.sourceConnectableSide=o,this.targetConnectableSide=r,this.sourceRotationContext=a,this.targetRotationContext=s}};function wf(t,i,e){return[t,...e??[],i]}function SD(t,i){let e=Math.abs(i.x-t.x)/2,n=i.x<t.x?i.x+e:i.x-e,o=Math.abs(i.y-t.y)/2,r=i.y<t.y?i.y+o:i.y-o;return{x:n,y:r}}function TD(t,i=32){let e=new Array(i+1);e[0]=ce({},t[0]);for(let n=1;n<=i;n++)e[n]=L0(t[0],t[1],t[2],t[3],n/i);return e}function L0(t,i,e,n,o){let r=1-o,a=o*o,s=r*r,c=s*r,u=a*o;return{x:c*t.x+3*s*o*i.x+3*r*a*e.x+u*n.x,y:c*t.y+3*s*o*i.y+3*r*a*e.y+u*n.y}}function z0(t){return t.map(i=>L0(i.p0,i.c1,i.c2,i.p3,.5))}function ID(t){if(t.length<2)throw new Error("Polylines must be at least two points");let i=ED(t);return i<=0?[ce({},t[0])]:[PD(t,i/2)]}function ED(t){let i=0;for(let e=0;e<t.length-1;e++)i+=B0(t[e],t[e+1]);return i}function PD(t,i){let e=0;for(let o=0;o<t.length-1;o++){let r=t[o],a=t[o+1],s=B0(r,a);if(!(s<=0)){if(e+s>=i){let c=(i-e)/s;return{x:r.x+(a.x-r.x)*c,y:r.y+(a.y-r.y)*c}}e+=s}}let n=t[t.length-1];return{x:n.x,y:n.y}}function B0(t,i){return Math.hypot(i.x-t.x,i.y-t.y)}function MD(t){let i=[];for(let e of t)for(let n of e){let o=i[i.length-1];(!o||o.x!==n.x||o.y!==n.y)&&i.push(n)}return i}function q0(t){if(!t.length)return"";let i=`M ${t[0].p0.x} ${t[0].p0.y}`;for(let e=0;e<t.length;e++){let n=t[e],o=e===t.length-1,r=o?n.p3.x+2e-4:n.p3.x,a=o?n.p3.y+2e-4:n.p3.y;i+=` C ${n.c1.x} ${n.c1.y}, ${n.c2.x} ${n.c2.y}, ${r} ${a}`}return i}function G0(t,i=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let o=t[n],r=TD([o.p0,o.c1,o.c2,o.p3],i);n>0&&r.shift(),e.push(...r)}return e}function kD(t,i=1e-6){let e=t.length;if(e<=2)return t;let n=[];n.push(t[0]);for(let r=1;r<e;r++){let a=t[r],s=n[n.length-1];(Math.abs(a.x-s.x)>i||Math.abs(a.y-s.y)>i)&&n.push(a)}if(n.length<=2)return n;let o=[];o.push(n[0]);for(let r=1;r<n.length-1;r++){let a=o[o.length-1],s=n[r],c=n[r+1],u=Math.abs(a.x-s.x)<=i&&Math.abs(s.x-c.x)<=i,f=Math.abs(a.y-s.y)<=i&&Math.abs(s.y-c.y)<=i;!u&&!f&&o.push(s)}return o.push(n[n.length-1]),o}var ih=class t{static _dir(i){switch(i){case F.LEFT:return{x:-1,y:0};case F.RIGHT:return{x:1,y:0};case F.TOP:return{x:0,y:-1};case F.BOTTOM:return{x:0,y:1};case F.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(i){return i===F.LEFT||i===F.RIGHT}static _handleLength(i,e,n,o){let r=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y),s=Math.hypot(r,a),c=n===F.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,o),f=o+.5*s,m=o*1.05+c*.3;return Math.min(f,Math.max(u,m))}static _softControl(i,e,n,o){let r=this._dir(i),a=n.x-e.x,s=n.y-e.y,c=Math.hypot(a,s)||1,u=a/c,f=s/c;if(i===F.AUTO)return{x:e.x+u*o,y:e.y+f*o};let m=r.x*u+r.y*f,x=.12,P=Math.max(0,-m)*.08,E=Math.min(.2,x+P),N=r.x*(1-E)+u*E,j=r.y*(1-E)+f*E,L=Math.hypot(N,j)||1;return{x:e.x+N/L*o,y:e.y+j/L*o}}handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=wf(i,n,a),u=[];for(let m=0;m<c.length-1;m++){let x=c[m],P=c[m+1],E=t._handleLength(x,P,e,s),N=t._handleLength(P,x,o,s),j=t._softControl(e,x,P,E),L=t._softControl(o,P,x,N);u.push({p0:x,c1:j,c2:L,p3:P,chainIndex:m})}let f=G0(u,12);return{path:q0(u),secondPoint:u[0]?.c1??i,penultimatePoint:u[u.length-1]?.c2??n,points:f,candidates:z0(u)}}},oh=class{handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=wf(i,n,a),c=[];for(let f=0;f<s.length-1;f++){let m=s[f],x=s[f+1],P=s0(e,m,x,r??0),E=s0(o,x,m,r??0);c.push({p0:m,c1:P,c2:E,p3:x,chainIndex:f})}let u=G0(c,12);return{path:q0(c),secondPoint:c[0]?.c1??i,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:z0(c)}}};function s0(t,i,e,n){let o={x:i.x,y:i.y};switch(t){case F.LEFT:o.x-=ya(i.x-e.x,n);break;case F.RIGHT:o.x+=ya(e.x-i.x,n);break;case F.TOP:o.y-=ya(i.y-e.y,n);break;case F.BOTTOM:o.y+=ya(e.y-i.y,n);break;case F.AUTO:break}return o}function ya(t,i){return t>=i?t:i*Math.sqrt(i-t)}function DD(t){let{axis:i,source:e,target:n,sourceSide:o,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:f,offset:m,sourceGapOffset:x,targetGapOffset:P}=t,E=OD(a,s),N=ND(i,c,f,E);return o===r?RD(i,e,n,m,c,f,a,s,x,P):N=AD(i,c,u,a,s,E,N),N}function OD(t,i){return{sourceTarget:[{x:t.x,y:i.y}],targetSource:[{x:i.x,y:t.y}]}}function ND(t,i,e,n){return t==="x"?i.x===e?n.targetSource:n.sourceTarget:i.y===e?n.sourceTarget:n.targetSource}function RD(t,i,e,n,o,r,a,s,c,u){let f=Math.abs(i[t]-e[t]);if(f>n)return;let m=Math.min(n-1,n-f);m<=0||(o[t]===r?c[t]=(a[t]>i[t]?-1:1)*m:u[t]=(s[t]>e[t]?-1:1)*m)}function AD(t,i,e,n,o,r,a){let s=t==="x"?"y":"x",c=i[t]===e[s],u=n[s]>o[s],f=n[s]<o[s];return i[t]===1&&(!c&&u||c&&f)||i[t]!==1&&(!c&&f||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var bo=1e-6,c0=2e-4,FD=.75;function LD(t,i){let e=t.length,n=[];n.push(`M ${t[0].x} ${t[0].y}`);for(let r=1;r<e-1;r++)n.push(zD(t[r-1],t[r],t[r+1],i));let o=t[e-1];return n.push(`L ${o.x+c0} ${o.y+c0}`),n.join(" ")}function zD(t,i,e,n){let o=i.x,r=i.y;if(n<=0)return`L ${o} ${r}`;let a=Math.abs(t.x-o)<=bo&&Math.abs(o-e.x)<=bo,s=Math.abs(t.y-r)<=bo&&Math.abs(r-e.y)<=bo;if(a||s)return`L ${o} ${r}`;let c=Math.hypot(o-t.x,r-t.y),u=Math.hypot(e.x-o,e.y-r),f=Math.min(c*.5,u*.5,n);if(f<FD)return`L ${o} ${r}`;if(Math.abs(t.y-r)<=bo){let j=t.x<e.x?-1:1,L=t.y<e.y?1:-1,U=o+f*j,ie=r+f*L;return`L ${U} ${r} Q ${o} ${r} ${o} ${ie}`}let x=t.x<e.x?1:-1,P=t.y<e.y?-1:1,E=r+f*P,N=o+f*x;return`L ${o} ${E} Q ${o} ${r} ${N} ${r}`}var d0={[F.LEFT]:A.initialize(-1,0),[F.RIGHT]:A.initialize(1,0),[F.TOP]:A.initialize(0,-1),[F.BOTTOM]:A.initialize(0,1),[F.AUTO]:A.initialize(0,0)},rh=class{handle({source:i,sourceSide:e,target:n,targetSide:o,waypoints:r,offset:a,radius:s}){let c=wf(i,n,r),u=[],f=[];for(let E=0;E<c.length-1;E++){let N=c[E],j=c[E+1],L=this._getPathPoints(N,e,j,o,a??0);u.push(L),f.push(...ID(L))}let m=kD(MD(u)),x=m.length>1?m[m.length-2]:i,P=m.length>1?m[1]:n;return{path:LD(m,s??0),penultimatePoint:x,secondPoint:P,points:m,candidates:f}}_getPathPoints(i,e,n,o,r){let a=d0[e],s=d0[o],c={x:i.x+a.x*r,y:i.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},f=this._getDirection(c,e,u),m=f.x!==0?"x":"y",x=f[m],P=[],E=A.initialize(),N=A.initialize(),j=SD(i,n);if(a[m]*s[m]===-1){let L=[{x:j.x,y:c.y},{x:j.x,y:u.y}],U=[{x:c.x,y:j.y},{x:u.x,y:j.y}];a[m]===x?P=m==="x"?L:U:P=m==="x"?U:L}else P=DD({axis:m,source:i,target:n,sourceSide:e,targetSide:o,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:x,offset:r,sourceGapOffset:E,targetGapOffset:N});return[i,{x:c.x+E.x,y:c.y+E.y},...P,{x:u.x+N.x,y:u.y+N.y},n]}_getDirection(i,e,n){return e===F.LEFT||e===F.RIGHT?i.x<n.x?A.initialize(1,0):A.initialize(-1,0):i.y<n.y?A.initialize(0,1):A.initialize(0,-1)}},l0=2e-4,ah=class{handle(i){let e=wf(i.source,i.target,i.waypoints),n=e.length,o=e[0],r=`M ${o.x} ${o.y}`,a=new Array(n-1);for(let s=0;s<n-1;s++){let c=e[s],u=e[s+1],f=s===n-2,m=f?u.x+l0:u.x,x=f?u.y+l0:u.y;r+=` L ${m} ${x}`,a[s]={x:(c.x+u.x)*.5,y:(c.y+u.y)*.5}}return{path:r,candidates:a,points:e,secondPoint:e[1]??i.target,penultimatePoint:e[n-2]??i.source}}},BD=new ue("F_CONNECTION_BUILDERS"),H0=(()=>{class t{_builtinBuilders={[ki.STRAIGHT]:new ah,[ki.BEZIER]:new oh,[ki.ADAPTIVE_CURVE]:new ih,[ki.SEGMENT]:new rh};_providedBuilders;_builders;constructor(){this._providedBuilders=l(BD,{optional:!0})||{},this._builders=ce(ce({},this._builtinBuilders),this._providedBuilders)}handle({type:e,payload:n}){let o=this._builders[e];if(!o)throw this._createBuilderNotFoundError(e);return o.handle(n)}_createBuilderNotFoundError(e){let n=Object.keys(this._builtinBuilders).sort(),o=Object.keys(this._providedBuilders).sort(),r=Object.keys(this._builders).sort(),a=n.filter(c=>c in this._providedBuilders).sort(),s=[`Connection Builder Error: builder type "${e}" not found.`,`Registered types: ${r.length?r.join(", "):"(none)"}`,`Built-in types: ${n.length?n.join(", "):"(none)"}`,`Provided (F_CONNECTION_BUILDERS) types: ${o.length?o.join(", "):"(none)"}`,a.length?`Overridden built-ins: ${a.join(", ")}`:null,"Tip: ensure you pass a valid Connection Type or provide a builder via F_CONNECTION_BUILDERS."].filter(Boolean);return new Error(s.join(`
|
|
1
|
+
import{c as aa,d as sa,e as ha}from"./chunk-3HLMBEDX.js";import{a as Pg,b as fa,c as Mg,d as kg,e as Dg,f as Og,g as Ng,h as Rg,i as Ag,j as Fg,k as Lg,n as gn,o as Bg,q as Ug,r as Wg,s as $g,t as Kg,u as Yg}from"./chunk-3AKR33GE.js";import"./chunk-VW2A6WZ3.js";import{a as pa,b as $n,c as qg,d as ma,e as _a,f as ga,g as Gg,h as Hg,i as Vg,j as jg}from"./chunk-UIUGLD7F.js";import{c as vg,d as yg,f as mn,g as _n}from"./chunk-UV3QRBRR.js";import{a as bg,b as da,c as la,d as wg,e as Sg,f as Tg,g as ua,h as Ig,i as Dp,j as yo,l as Eg,m as un,n as Ei,p as zg}from"./chunk-K365TVPA.js";import{D as cn,E as dn,H as ra,I as De,J as Oe,K as ca,L as Cg,M as ln,N as kp,Q as xg,R as Lt,V as fn,W as pn,X as hn,c as Ti,g as pg,h as hg,i as mg,j as Ii,k as sn,m as ta,p as na,q as ia,u as gg,w as Ft,x as oa}from"./chunk-WPUUCIS3.js";import{B as Mp,Ca as _g,H as lg,J as ug,V as fg,b as sg,k as cg,p as ea,u as dg}from"./chunk-4SG4352Z.js";import{f as rg,i as Jr,j as ag}from"./chunk-ZZJ7XWDX.js";import"./chunk-EPBUSS3I.js";import{j as ig,k as og,l as Qr,m as Si,q as an}from"./chunk-VNA3TMIO.js";import{$ as Gr,$a as Ee,$b as qe,Ab as bi,Ac as Zr,Bb as jn,Bc as Pp,Cb as Un,Cc as Wn,Db as wi,Eb as $r,Fb as Kr,Ga as go,Gb as se,Ha as vo,Hb as Tp,Ib as H,Ic as me,Ja as Vr,Jc as $e,Ka as d,Kb as _,L as y,Lb as Kt,M as vi,Mb as ke,Nb as Yr,O as ue,P as yi,Pa as jr,Pb as _t,Q as l,Qa as eg,Qb as gt,Rb as Ip,Sa as tg,Sb as Tt,Ta as wp,Tb as ct,U as J_,Ua as Ur,Ub as Yt,V as Ot,Vb as dt,W as z,Wb as de,X as B,Xb as Xr,Y as Je,Yb as Re,Z as qr,Za as K,Zb as v,_ as Ye,_a as xi,_b as C,aa as it,ab as Wr,ac as Ep,bb as he,bc as ng,ca as st,cb as be,da as Vn,fc as lt,g as b,gc as Xe,ha as q,hc as oe,ic as ge,ja as ne,jc as Nt,ka as Ci,kc as vt,la as J,lb as G,n as Z_,na as Ne,ob as T,pb as I,qb as Sp,ra as Hr,rb as Ce,rc as Rt,sb as Y,tb as X,tc as At,u as Q_,ub as M,uc as S,vb as p,wb as h,xb as R,xc as Ve,yb as W,yc as O,zb as $,zc as Ae}from"./chunk-HAWX5WNM.js";import{a as ce,b as Hn,c as gi,e as g,g as tk}from"./chunk-WCABR6TI.js";var Mv=g((Nee,Pv)=>{"use strict";function uF(){this.__data__=[],this.size=0}Pv.exports=uF});var ci=g((Ree,kv)=>{"use strict";function fF(t,i){return t===i||t!==t&&i!==i}kv.exports=fF});var dr=g((Aee,Dv)=>{"use strict";var pF=ci();function hF(t,i){for(var e=t.length;e--;)if(pF(t[e][0],i))return e;return-1}Dv.exports=hF});var Nv=g((Fee,Ov)=>{"use strict";var mF=dr(),_F=Array.prototype,gF=_F.splice;function vF(t){var i=this.__data__,e=mF(i,t);if(e<0)return!1;var n=i.length-1;return e==n?i.pop():gF.call(i,e,1),--this.size,!0}Ov.exports=vF});var Av=g((Lee,Rv)=>{"use strict";var yF=dr();function CF(t){var i=this.__data__,e=yF(i,t);return e<0?void 0:i[e][1]}Rv.exports=CF});var Lv=g((zee,Fv)=>{"use strict";var xF=dr();function bF(t){return xF(this.__data__,t)>-1}Fv.exports=bF});var Bv=g((Bee,zv)=>{"use strict";var wF=dr();function SF(t,i){var e=this.__data__,n=wF(e,t);return n<0?(++this.size,e.push([t,i])):e[n][1]=i,this}zv.exports=SF});var lr=g((qee,qv)=>{"use strict";var TF=Mv(),IF=Nv(),EF=Av(),PF=Lv(),MF=Bv();function Xi(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Xi.prototype.clear=TF;Xi.prototype.delete=IF;Xi.prototype.get=EF;Xi.prototype.has=PF;Xi.prototype.set=MF;qv.exports=Xi});var Hv=g((Gee,Gv)=>{"use strict";var kF=lr();function DF(){this.__data__=new kF,this.size=0}Gv.exports=DF});var jv=g((Hee,Vv)=>{"use strict";function OF(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}Vv.exports=OF});var Wv=g((Vee,Uv)=>{"use strict";function NF(t){return this.__data__.get(t)}Uv.exports=NF});var Kv=g((jee,$v)=>{"use strict";function RF(t){return this.__data__.has(t)}$v.exports=RF});var dm=g((Uee,Yv)=>{"use strict";var AF=typeof global=="object"&&global&&global.Object===Object&&global;Yv.exports=AF});var xt=g((Wee,Xv)=>{"use strict";var FF=dm(),LF=typeof self=="object"&&self&&self.Object===Object&&self,zF=FF||LF||Function("return this")();Xv.exports=zF});var di=g(($ee,Zv)=>{"use strict";var BF=xt(),qF=BF.Symbol;Zv.exports=qF});var ty=g((Kee,ey)=>{"use strict";var Qv=di(),Jv=Object.prototype,GF=Jv.hasOwnProperty,HF=Jv.toString,ur=Qv?Qv.toStringTag:void 0;function VF(t){var i=GF.call(t,ur),e=t[ur];try{t[ur]=void 0;var n=!0}catch{}var o=HF.call(t);return n&&(i?t[ur]=e:delete t[ur]),o}ey.exports=VF});var iy=g((Yee,ny)=>{"use strict";var jF=Object.prototype,UF=jF.toString;function WF(t){return UF.call(t)}ny.exports=WF});var Dn=g((Xee,ay)=>{"use strict";var oy=di(),$F=ty(),KF=iy(),YF="[object Null]",XF="[object Undefined]",ry=oy?oy.toStringTag:void 0;function ZF(t){return t==null?t===void 0?XF:YF:ry&&ry in Object(t)?$F(t):KF(t)}ay.exports=ZF});var ft=g((Zee,sy)=>{"use strict";function QF(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}sy.exports=QF});var Zi=g((Qee,cy)=>{"use strict";var JF=Dn(),eL=ft(),tL="[object AsyncFunction]",nL="[object Function]",iL="[object GeneratorFunction]",oL="[object Proxy]";function rL(t){if(!eL(t))return!1;var i=JF(t);return i==nL||i==iL||i==tL||i==oL}cy.exports=rL});var ly=g((Jee,dy)=>{"use strict";var aL=xt(),sL=aL["__core-js_shared__"];dy.exports=sL});var py=g((ete,fy)=>{"use strict";var lm=ly(),uy=(function(){var t=/[^.]+$/.exec(lm&&lm.keys&&lm.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function cL(t){return!!uy&&uy in t}fy.exports=cL});var um=g((tte,hy)=>{"use strict";var dL=Function.prototype,lL=dL.toString;function uL(t){if(t!=null){try{return lL.call(t)}catch{}try{return t+""}catch{}}return""}hy.exports=uL});var _y=g((nte,my)=>{"use strict";var fL=Zi(),pL=py(),hL=ft(),mL=um(),_L=/[\\^$.*+?()[\]{}|]/g,gL=/^\[object .+?Constructor\]$/,vL=Function.prototype,yL=Object.prototype,CL=vL.toString,xL=yL.hasOwnProperty,bL=RegExp("^"+CL.call(xL).replace(_L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wL(t){if(!hL(t)||pL(t))return!1;var i=fL(t)?bL:gL;return i.test(mL(t))}my.exports=wL});var vy=g((ite,gy)=>{"use strict";function SL(t,i){return t?.[i]}gy.exports=SL});var On=g((ote,yy)=>{"use strict";var TL=_y(),IL=vy();function EL(t,i){var e=IL(t,i);return TL(e)?e:void 0}yy.exports=EL});var Mf=g((rte,Cy)=>{"use strict";var PL=On(),ML=xt(),kL=PL(ML,"Map");Cy.exports=kL});var fr=g((ate,xy)=>{"use strict";var DL=On(),OL=DL(Object,"create");xy.exports=OL});var Sy=g((ste,wy)=>{"use strict";var by=fr();function NL(){this.__data__=by?by(null):{},this.size=0}wy.exports=NL});var Iy=g((cte,Ty)=>{"use strict";function RL(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}Ty.exports=RL});var Py=g((dte,Ey)=>{"use strict";var AL=fr(),FL="__lodash_hash_undefined__",LL=Object.prototype,zL=LL.hasOwnProperty;function BL(t){var i=this.__data__;if(AL){var e=i[t];return e===FL?void 0:e}return zL.call(i,t)?i[t]:void 0}Ey.exports=BL});var ky=g((lte,My)=>{"use strict";var qL=fr(),GL=Object.prototype,HL=GL.hasOwnProperty;function VL(t){var i=this.__data__;return qL?i[t]!==void 0:HL.call(i,t)}My.exports=VL});var Oy=g((ute,Dy)=>{"use strict";var jL=fr(),UL="__lodash_hash_undefined__";function WL(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=jL&&i===void 0?UL:i,this}Dy.exports=WL});var Ry=g((fte,Ny)=>{"use strict";var $L=Sy(),KL=Iy(),YL=Py(),XL=ky(),ZL=Oy();function Qi(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Qi.prototype.clear=$L;Qi.prototype.delete=KL;Qi.prototype.get=YL;Qi.prototype.has=XL;Qi.prototype.set=ZL;Ny.exports=Qi});var Ly=g((pte,Fy)=>{"use strict";var Ay=Ry(),QL=lr(),JL=Mf();function e3(){this.size=0,this.__data__={hash:new Ay,map:new(JL||QL),string:new Ay}}Fy.exports=e3});var By=g((hte,zy)=>{"use strict";function t3(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}zy.exports=t3});var pr=g((mte,qy)=>{"use strict";var n3=By();function i3(t,i){var e=t.__data__;return n3(i)?e[typeof i=="string"?"string":"hash"]:e.map}qy.exports=i3});var Hy=g((_te,Gy)=>{"use strict";var o3=pr();function r3(t){var i=o3(this,t).delete(t);return this.size-=i?1:0,i}Gy.exports=r3});var jy=g((gte,Vy)=>{"use strict";var a3=pr();function s3(t){return a3(this,t).get(t)}Vy.exports=s3});var Wy=g((vte,Uy)=>{"use strict";var c3=pr();function d3(t){return c3(this,t).has(t)}Uy.exports=d3});var Ky=g((yte,$y)=>{"use strict";var l3=pr();function u3(t,i){var e=l3(this,t),n=e.size;return e.set(t,i),this.size+=e.size==n?0:1,this}$y.exports=u3});var kf=g((Cte,Yy)=>{"use strict";var f3=Ly(),p3=Hy(),h3=jy(),m3=Wy(),_3=Ky();function Ji(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Ji.prototype.clear=f3;Ji.prototype.delete=p3;Ji.prototype.get=h3;Ji.prototype.has=m3;Ji.prototype.set=_3;Yy.exports=Ji});var Zy=g((xte,Xy)=>{"use strict";var g3=lr(),v3=Mf(),y3=kf(),C3=200;function x3(t,i){var e=this.__data__;if(e instanceof g3){var n=e.__data__;if(!v3||n.length<C3-1)return n.push([t,i]),this.size=++e.size,this;e=this.__data__=new y3(n)}return e.set(t,i),this.size=e.size,this}Xy.exports=x3});var hr=g((bte,Qy)=>{"use strict";var b3=lr(),w3=Hv(),S3=jv(),T3=Wv(),I3=Kv(),E3=Zy();function eo(t){var i=this.__data__=new b3(t);this.size=i.size}eo.prototype.clear=w3;eo.prototype.delete=S3;eo.prototype.get=T3;eo.prototype.has=I3;eo.prototype.set=E3;Qy.exports=eo});var Df=g((wte,Jy)=>{"use strict";function P3(t,i){for(var e=-1,n=t==null?0:t.length;++e<n&&i(t[e],e,t)!==!1;);return t}Jy.exports=P3});var fm=g((Ste,eC)=>{"use strict";var M3=On(),k3=(function(){try{var t=M3(Object,"defineProperty");return t({},"",{}),t}catch{}})();eC.exports=k3});var mr=g((Tte,nC)=>{"use strict";var tC=fm();function D3(t,i,e){i=="__proto__"&&tC?tC(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}nC.exports=D3});var _r=g((Ite,iC)=>{"use strict";var O3=mr(),N3=ci(),R3=Object.prototype,A3=R3.hasOwnProperty;function F3(t,i,e){var n=t[i];(!(A3.call(t,i)&&N3(n,e))||e===void 0&&!(i in t))&&O3(t,i,e)}iC.exports=F3});var to=g((Ete,oC)=>{"use strict";var L3=_r(),z3=mr();function B3(t,i,e,n){var o=!e;e||(e={});for(var r=-1,a=i.length;++r<a;){var s=i[r],c=n?n(e[s],t[s],s,e,t):void 0;c===void 0&&(c=t[s]),o?z3(e,s,c):L3(e,s,c)}return e}oC.exports=B3});var aC=g((Pte,rC)=>{"use strict";function q3(t,i){for(var e=-1,n=Array(t);++e<t;)n[e]=i(e);return n}rC.exports=q3});var Mt=g((Mte,sC)=>{"use strict";function G3(t){return t!=null&&typeof t=="object"}sC.exports=G3});var dC=g((kte,cC)=>{"use strict";var H3=Dn(),V3=Mt(),j3="[object Arguments]";function U3(t){return V3(t)&&H3(t)==j3}cC.exports=U3});var no=g((Dte,fC)=>{"use strict";var lC=dC(),W3=Mt(),uC=Object.prototype,$3=uC.hasOwnProperty,K3=uC.propertyIsEnumerable,Y3=lC((function(){return arguments})())?lC:function(t){return W3(t)&&$3.call(t,"callee")&&!K3.call(t,"callee")};fC.exports=Y3});var Ge=g((Ote,pC)=>{"use strict";var X3=Array.isArray;pC.exports=X3});var mC=g((Nte,hC)=>{"use strict";function Z3(){return!1}hC.exports=Z3});var li=g((gr,io)=>{"use strict";var Q3=xt(),J3=mC(),vC=typeof gr=="object"&&gr&&!gr.nodeType&&gr,_C=vC&&typeof io=="object"&&io&&!io.nodeType&&io,ez=_C&&_C.exports===vC,gC=ez?Q3.Buffer:void 0,tz=gC?gC.isBuffer:void 0,nz=tz||J3;io.exports=nz});var vr=g((Rte,yC)=>{"use strict";var iz=9007199254740991,oz=/^(?:0|[1-9]\d*)$/;function rz(t,i){var e=typeof t;return i=i??iz,!!i&&(e=="number"||e!="symbol"&&oz.test(t))&&t>-1&&t%1==0&&t<i}yC.exports=rz});var Of=g((Ate,CC)=>{"use strict";var az=9007199254740991;function sz(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=az}CC.exports=sz});var bC=g((Fte,xC)=>{"use strict";var cz=Dn(),dz=Of(),lz=Mt(),uz="[object Arguments]",fz="[object Array]",pz="[object Boolean]",hz="[object Date]",mz="[object Error]",_z="[object Function]",gz="[object Map]",vz="[object Number]",yz="[object Object]",Cz="[object RegExp]",xz="[object Set]",bz="[object String]",wz="[object WeakMap]",Sz="[object ArrayBuffer]",Tz="[object DataView]",Iz="[object Float32Array]",Ez="[object Float64Array]",Pz="[object Int8Array]",Mz="[object Int16Array]",kz="[object Int32Array]",Dz="[object Uint8Array]",Oz="[object Uint8ClampedArray]",Nz="[object Uint16Array]",Rz="[object Uint32Array]",Pe={};Pe[Iz]=Pe[Ez]=Pe[Pz]=Pe[Mz]=Pe[kz]=Pe[Dz]=Pe[Oz]=Pe[Nz]=Pe[Rz]=!0;Pe[uz]=Pe[fz]=Pe[Sz]=Pe[pz]=Pe[Tz]=Pe[hz]=Pe[mz]=Pe[_z]=Pe[gz]=Pe[vz]=Pe[yz]=Pe[Cz]=Pe[xz]=Pe[bz]=Pe[wz]=!1;function Az(t){return lz(t)&&dz(t.length)&&!!Pe[cz(t)]}xC.exports=Az});var yr=g((Lte,wC)=>{"use strict";function Fz(t){return function(i){return t(i)}}wC.exports=Fz});var Nf=g((Cr,oo)=>{"use strict";var Lz=dm(),SC=typeof Cr=="object"&&Cr&&!Cr.nodeType&&Cr,xr=SC&&typeof oo=="object"&&oo&&!oo.nodeType&&oo,zz=xr&&xr.exports===SC,pm=zz&&Lz.process,Bz=(function(){try{var t=xr&&xr.require&&xr.require("util").types;return t||pm&&pm.binding&&pm.binding("util")}catch{}})();oo.exports=Bz});var ro=g((zte,EC)=>{"use strict";var qz=bC(),Gz=yr(),TC=Nf(),IC=TC&&TC.isTypedArray,Hz=IC?Gz(IC):qz;EC.exports=Hz});var hm=g((Bte,PC)=>{"use strict";var Vz=aC(),jz=no(),Uz=Ge(),Wz=li(),$z=vr(),Kz=ro(),Yz=Object.prototype,Xz=Yz.hasOwnProperty;function Zz(t,i){var e=Uz(t),n=!e&&jz(t),o=!e&&!n&&Wz(t),r=!e&&!n&&!o&&Kz(t),a=e||n||o||r,s=a?Vz(t.length,String):[],c=s.length;for(var u in t)(i||Xz.call(t,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$z(u,c)))&&s.push(u);return s}PC.exports=Zz});var br=g((qte,MC)=>{"use strict";var Qz=Object.prototype;function Jz(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||Qz;return t===e}MC.exports=Jz});var mm=g((Gte,kC)=>{"use strict";function eB(t,i){return function(e){return t(i(e))}}kC.exports=eB});var OC=g((Hte,DC)=>{"use strict";var tB=mm(),nB=tB(Object.keys,Object);DC.exports=nB});var Rf=g((Vte,NC)=>{"use strict";var iB=br(),oB=OC(),rB=Object.prototype,aB=rB.hasOwnProperty;function sB(t){if(!iB(t))return oB(t);var i=[];for(var e in Object(t))aB.call(t,e)&&e!="constructor"&&i.push(e);return i}NC.exports=sB});var Ht=g((jte,RC)=>{"use strict";var cB=Zi(),dB=Of();function lB(t){return t!=null&&dB(t.length)&&!cB(t)}RC.exports=lB});var Qt=g((Ute,AC)=>{"use strict";var uB=hm(),fB=Rf(),pB=Ht();function hB(t){return pB(t)?uB(t):fB(t)}AC.exports=hB});var LC=g((Wte,FC)=>{"use strict";var mB=to(),_B=Qt();function gB(t,i){return t&&mB(i,_B(i),t)}FC.exports=gB});var BC=g(($te,zC)=>{"use strict";function vB(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}zC.exports=vB});var GC=g((Kte,qC)=>{"use strict";var yB=ft(),CB=br(),xB=BC(),bB=Object.prototype,wB=bB.hasOwnProperty;function SB(t){if(!yB(t))return xB(t);var i=CB(t),e=[];for(var n in t)n=="constructor"&&(i||!wB.call(t,n))||e.push(n);return e}qC.exports=SB});var Nn=g((Yte,HC)=>{"use strict";var TB=hm(),IB=GC(),EB=Ht();function PB(t){return EB(t)?TB(t,!0):IB(t)}HC.exports=PB});var jC=g((Xte,VC)=>{"use strict";var MB=to(),kB=Nn();function DB(t,i){return t&&MB(i,kB(i),t)}VC.exports=DB});var _m=g((wr,ao)=>{"use strict";var OB=xt(),KC=typeof wr=="object"&&wr&&!wr.nodeType&&wr,UC=KC&&typeof ao=="object"&&ao&&!ao.nodeType&&ao,NB=UC&&UC.exports===KC,WC=NB?OB.Buffer:void 0,$C=WC?WC.allocUnsafe:void 0;function RB(t,i){if(i)return t.slice();var e=t.length,n=$C?$C(e):new t.constructor(e);return t.copy(n),n}ao.exports=RB});var gm=g((Zte,YC)=>{"use strict";function AB(t,i){var e=-1,n=t.length;for(i||(i=Array(n));++e<n;)i[e]=t[e];return i}YC.exports=AB});var vm=g((Qte,XC)=>{"use strict";function FB(t,i){for(var e=-1,n=t==null?0:t.length,o=0,r=[];++e<n;){var a=t[e];i(a,e,t)&&(r[o++]=a)}return r}XC.exports=FB});var ym=g((Jte,ZC)=>{"use strict";function LB(){return[]}ZC.exports=LB});var Af=g((ene,JC)=>{"use strict";var zB=vm(),BB=ym(),qB=Object.prototype,GB=qB.propertyIsEnumerable,QC=Object.getOwnPropertySymbols,HB=QC?function(t){return t==null?[]:(t=Object(t),zB(QC(t),function(i){return GB.call(t,i)}))}:BB;JC.exports=HB});var tx=g((tne,ex)=>{"use strict";var VB=to(),jB=Af();function UB(t,i){return VB(t,jB(t),i)}ex.exports=UB});var Ff=g((nne,nx)=>{"use strict";function WB(t,i){for(var e=-1,n=i.length,o=t.length;++e<n;)t[o+e]=i[e];return t}nx.exports=WB});var Sr=g((ine,ix)=>{"use strict";var $B=mm(),KB=$B(Object.getPrototypeOf,Object);ix.exports=KB});var Cm=g((one,ox)=>{"use strict";var YB=Ff(),XB=Sr(),ZB=Af(),QB=ym(),JB=Object.getOwnPropertySymbols,eq=JB?function(t){for(var i=[];t;)YB(i,ZB(t)),t=XB(t);return i}:QB;ox.exports=eq});var ax=g((rne,rx)=>{"use strict";var tq=to(),nq=Cm();function iq(t,i){return tq(t,nq(t),i)}rx.exports=iq});var xm=g((ane,sx)=>{"use strict";var oq=Ff(),rq=Ge();function aq(t,i,e){var n=i(t);return rq(t)?n:oq(n,e(t))}sx.exports=aq});var bm=g((sne,cx)=>{"use strict";var sq=xm(),cq=Af(),dq=Qt();function lq(t){return sq(t,dq,cq)}cx.exports=lq});var lx=g((cne,dx)=>{"use strict";var uq=xm(),fq=Cm(),pq=Nn();function hq(t){return uq(t,pq,fq)}dx.exports=hq});var fx=g((dne,ux)=>{"use strict";var mq=On(),_q=xt(),gq=mq(_q,"DataView");ux.exports=gq});var hx=g((lne,px)=>{"use strict";var vq=On(),yq=xt(),Cq=vq(yq,"Promise");px.exports=Cq});var wm=g((une,mx)=>{"use strict";var xq=On(),bq=xt(),wq=xq(bq,"Set");mx.exports=wq});var gx=g((fne,_x)=>{"use strict";var Sq=On(),Tq=xt(),Iq=Sq(Tq,"WeakMap");_x.exports=Iq});var fi=g((pne,Sx)=>{"use strict";var Sm=fx(),Tm=Mf(),Im=hx(),Em=wm(),Pm=gx(),wx=Dn(),so=um(),vx="[object Map]",Eq="[object Object]",yx="[object Promise]",Cx="[object Set]",xx="[object WeakMap]",bx="[object DataView]",Pq=so(Sm),Mq=so(Tm),kq=so(Im),Dq=so(Em),Oq=so(Pm),ui=wx;(Sm&&ui(new Sm(new ArrayBuffer(1)))!=bx||Tm&&ui(new Tm)!=vx||Im&&ui(Im.resolve())!=yx||Em&&ui(new Em)!=Cx||Pm&&ui(new Pm)!=xx)&&(ui=function(t){var i=wx(t),e=i==Eq?t.constructor:void 0,n=e?so(e):"";if(n)switch(n){case Pq:return bx;case Mq:return vx;case kq:return yx;case Dq:return Cx;case Oq:return xx}return i});Sx.exports=ui});var Ix=g((hne,Tx)=>{"use strict";var Nq=Object.prototype,Rq=Nq.hasOwnProperty;function Aq(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Rq.call(t,"index")&&(e.index=t.index,e.input=t.input),e}Tx.exports=Aq});var Mm=g((mne,Ex)=>{"use strict";var Fq=xt(),Lq=Fq.Uint8Array;Ex.exports=Lq});var Lf=g((_ne,Mx)=>{"use strict";var Px=Mm();function zq(t){var i=new t.constructor(t.byteLength);return new Px(i).set(new Px(t)),i}Mx.exports=zq});var Dx=g((gne,kx)=>{"use strict";var Bq=Lf();function qq(t,i){var e=i?Bq(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}kx.exports=qq});var Nx=g((vne,Ox)=>{"use strict";var Gq=/\w*$/;function Hq(t){var i=new t.constructor(t.source,Gq.exec(t));return i.lastIndex=t.lastIndex,i}Ox.exports=Hq});var zx=g((yne,Lx)=>{"use strict";var Rx=di(),Ax=Rx?Rx.prototype:void 0,Fx=Ax?Ax.valueOf:void 0;function Vq(t){return Fx?Object(Fx.call(t)):{}}Lx.exports=Vq});var km=g((Cne,Bx)=>{"use strict";var jq=Lf();function Uq(t,i){var e=i?jq(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Bx.exports=Uq});var Gx=g((xne,qx)=>{"use strict";var Wq=Lf(),$q=Dx(),Kq=Nx(),Yq=zx(),Xq=km(),Zq="[object Boolean]",Qq="[object Date]",Jq="[object Map]",eG="[object Number]",tG="[object RegExp]",nG="[object Set]",iG="[object String]",oG="[object Symbol]",rG="[object ArrayBuffer]",aG="[object DataView]",sG="[object Float32Array]",cG="[object Float64Array]",dG="[object Int8Array]",lG="[object Int16Array]",uG="[object Int32Array]",fG="[object Uint8Array]",pG="[object Uint8ClampedArray]",hG="[object Uint16Array]",mG="[object Uint32Array]";function _G(t,i,e){var n=t.constructor;switch(i){case rG:return Wq(t);case Zq:case Qq:return new n(+t);case aG:return $q(t,e);case sG:case cG:case dG:case lG:case uG:case fG:case pG:case hG:case mG:return Xq(t,e);case Jq:return new n;case eG:case iG:return new n(t);case tG:return Kq(t);case nG:return new n;case oG:return Yq(t)}}qx.exports=_G});var Dm=g((bne,Vx)=>{"use strict";var gG=ft(),Hx=Object.create,vG=(function(){function t(){}return function(i){if(!gG(i))return{};if(Hx)return Hx(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}})();Vx.exports=vG});var Om=g((wne,jx)=>{"use strict";var yG=Dm(),CG=Sr(),xG=br();function bG(t){return typeof t.constructor=="function"&&!xG(t)?yG(CG(t)):{}}jx.exports=bG});var Wx=g((Sne,Ux)=>{"use strict";var wG=fi(),SG=Mt(),TG="[object Map]";function IG(t){return SG(t)&&wG(t)==TG}Ux.exports=IG});var Xx=g((Tne,Yx)=>{"use strict";var EG=Wx(),PG=yr(),$x=Nf(),Kx=$x&&$x.isMap,MG=Kx?PG(Kx):EG;Yx.exports=MG});var Qx=g((Ine,Zx)=>{"use strict";var kG=fi(),DG=Mt(),OG="[object Set]";function NG(t){return DG(t)&&kG(t)==OG}Zx.exports=NG});var nb=g((Ene,tb)=>{"use strict";var RG=Qx(),AG=yr(),Jx=Nf(),eb=Jx&&Jx.isSet,FG=eb?AG(eb):RG;tb.exports=FG});var Nm=g((Pne,ab)=>{"use strict";var LG=hr(),zG=Df(),BG=_r(),qG=LC(),GG=jC(),HG=_m(),VG=gm(),jG=tx(),UG=ax(),WG=bm(),$G=lx(),KG=fi(),YG=Ix(),XG=Gx(),ZG=Om(),QG=Ge(),JG=li(),eH=Xx(),tH=ft(),nH=nb(),iH=Qt(),oH=Nn(),rH=1,aH=2,sH=4,ib="[object Arguments]",cH="[object Array]",dH="[object Boolean]",lH="[object Date]",uH="[object Error]",ob="[object Function]",fH="[object GeneratorFunction]",pH="[object Map]",hH="[object Number]",rb="[object Object]",mH="[object RegExp]",_H="[object Set]",gH="[object String]",vH="[object Symbol]",yH="[object WeakMap]",CH="[object ArrayBuffer]",xH="[object DataView]",bH="[object Float32Array]",wH="[object Float64Array]",SH="[object Int8Array]",TH="[object Int16Array]",IH="[object Int32Array]",EH="[object Uint8Array]",PH="[object Uint8ClampedArray]",MH="[object Uint16Array]",kH="[object Uint32Array]",Ie={};Ie[ib]=Ie[cH]=Ie[CH]=Ie[xH]=Ie[dH]=Ie[lH]=Ie[bH]=Ie[wH]=Ie[SH]=Ie[TH]=Ie[IH]=Ie[pH]=Ie[hH]=Ie[rb]=Ie[mH]=Ie[_H]=Ie[gH]=Ie[vH]=Ie[EH]=Ie[PH]=Ie[MH]=Ie[kH]=!0;Ie[uH]=Ie[ob]=Ie[yH]=!1;function zf(t,i,e,n,o,r){var a,s=i&rH,c=i&aH,u=i&sH;if(e&&(a=o?e(t,n,o,r):e(t)),a!==void 0)return a;if(!tH(t))return t;var f=QG(t);if(f){if(a=YG(t),!s)return VG(t,a)}else{var m=KG(t),x=m==ob||m==fH;if(JG(t))return HG(t,s);if(m==rb||m==ib||x&&!o){if(a=c||x?{}:ZG(t),!s)return c?UG(t,GG(a,t)):jG(t,qG(a,t))}else{if(!Ie[m])return o?t:{};a=XG(t,m,s)}}r||(r=new LG);var P=r.get(t);if(P)return P;r.set(t,a),nH(t)?t.forEach(function(j){a.add(zf(j,i,e,j,t,r))}):eH(t)&&t.forEach(function(j,L){a.set(L,zf(j,i,e,L,t,r))});var E=u?c?$G:WG:c?oH:iH,N=f?void 0:E(t);return zG(N||t,function(j,L){N&&(L=j,j=t[L]),BG(a,L,zf(j,i,e,L,t,r))}),a}ab.exports=zf});var cb=g((Mne,sb)=>{"use strict";var DH=Nm(),OH=4;function NH(t){return DH(t,OH)}sb.exports=NH});var Bf=g((kne,db)=>{"use strict";function RH(t){return function(){return t}}db.exports=RH});var ub=g((Dne,lb)=>{"use strict";function AH(t){return function(i,e,n){for(var o=-1,r=Object(i),a=n(i),s=a.length;s--;){var c=a[t?s:++o];if(e(r[c],c,r)===!1)break}return i}}lb.exports=AH});var qf=g((One,fb)=>{"use strict";var FH=ub(),LH=FH();fb.exports=LH});var Gf=g((Nne,pb)=>{"use strict";var zH=qf(),BH=Qt();function qH(t,i){return t&&zH(t,i,BH)}pb.exports=qH});var mb=g((Rne,hb)=>{"use strict";var GH=Ht();function HH(t,i){return function(e,n){if(e==null)return e;if(!GH(e))return t(e,n);for(var o=e.length,r=i?o:-1,a=Object(e);(i?r--:++r<o)&&n(a[r],r,a)!==!1;);return e}}hb.exports=HH});var Tr=g((Ane,_b)=>{"use strict";var VH=Gf(),jH=mb(),UH=jH(VH);_b.exports=UH});var Rn=g((Fne,gb)=>{"use strict";function WH(t){return t}gb.exports=WH});var Rm=g((Lne,vb)=>{"use strict";var $H=Rn();function KH(t){return typeof t=="function"?t:$H}vb.exports=KH});var Am=g((zne,yb)=>{"use strict";var YH=Df(),XH=Tr(),ZH=Rm(),QH=Ge();function JH(t,i){var e=QH(t)?YH:XH;return e(t,ZH(i))}yb.exports=JH});var Fm=g((Bne,Cb)=>{"use strict";Cb.exports=Am()});var bb=g((qne,xb)=>{"use strict";var eV=Tr();function tV(t,i){var e=[];return eV(t,function(n,o,r){i(n,o,r)&&e.push(n)}),e}xb.exports=tV});var Sb=g((Gne,wb)=>{"use strict";var nV="__lodash_hash_undefined__";function iV(t){return this.__data__.set(t,nV),this}wb.exports=iV});var Ib=g((Hne,Tb)=>{"use strict";function oV(t){return this.__data__.has(t)}Tb.exports=oV});var Lm=g((Vne,Eb)=>{"use strict";var rV=kf(),aV=Sb(),sV=Ib();function Hf(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new rV;++i<e;)this.add(t[i])}Hf.prototype.add=Hf.prototype.push=aV;Hf.prototype.has=sV;Eb.exports=Hf});var Mb=g((jne,Pb)=>{"use strict";function cV(t,i){for(var e=-1,n=t==null?0:t.length;++e<n;)if(i(t[e],e,t))return!0;return!1}Pb.exports=cV});var zm=g((Une,kb)=>{"use strict";function dV(t,i){return t.has(i)}kb.exports=dV});var Bm=g((Wne,Db)=>{"use strict";var lV=Lm(),uV=Mb(),fV=zm(),pV=1,hV=2;function mV(t,i,e,n,o,r){var a=e&pV,s=t.length,c=i.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),f=r.get(i);if(u&&f)return u==i&&f==t;var m=-1,x=!0,P=e&hV?new lV:void 0;for(r.set(t,i),r.set(i,t);++m<s;){var E=t[m],N=i[m];if(n)var j=a?n(N,E,m,i,t,r):n(E,N,m,t,i,r);if(j!==void 0){if(j)continue;x=!1;break}if(P){if(!uV(i,function(L,U){if(!fV(P,U)&&(E===L||o(E,L,e,n,r)))return P.push(U)})){x=!1;break}}else if(!(E===N||o(E,N,e,n,r))){x=!1;break}}return r.delete(t),r.delete(i),x}Db.exports=mV});var Nb=g(($ne,Ob)=>{"use strict";function _V(t){var i=-1,e=Array(t.size);return t.forEach(function(n,o){e[++i]=[o,n]}),e}Ob.exports=_V});var Vf=g((Kne,Rb)=>{"use strict";function gV(t){var i=-1,e=Array(t.size);return t.forEach(function(n){e[++i]=n}),e}Rb.exports=gV});var Bb=g((Yne,zb)=>{"use strict";var Ab=di(),Fb=Mm(),vV=ci(),yV=Bm(),CV=Nb(),xV=Vf(),bV=1,wV=2,SV="[object Boolean]",TV="[object Date]",IV="[object Error]",EV="[object Map]",PV="[object Number]",MV="[object RegExp]",kV="[object Set]",DV="[object String]",OV="[object Symbol]",NV="[object ArrayBuffer]",RV="[object DataView]",Lb=Ab?Ab.prototype:void 0,qm=Lb?Lb.valueOf:void 0;function AV(t,i,e,n,o,r,a){switch(e){case RV:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case NV:return!(t.byteLength!=i.byteLength||!r(new Fb(t),new Fb(i)));case SV:case TV:case PV:return vV(+t,+i);case IV:return t.name==i.name&&t.message==i.message;case MV:case DV:return t==i+"";case EV:var s=CV;case kV:var c=n&bV;if(s||(s=xV),t.size!=i.size&&!c)return!1;var u=a.get(t);if(u)return u==i;n|=wV,a.set(t,i);var f=yV(s(t),s(i),n,o,r,a);return a.delete(t),f;case OV:if(qm)return qm.call(t)==qm.call(i)}return!1}zb.exports=AV});var Hb=g((Xne,Gb)=>{"use strict";var qb=bm(),FV=1,LV=Object.prototype,zV=LV.hasOwnProperty;function BV(t,i,e,n,o,r){var a=e&FV,s=qb(t),c=s.length,u=qb(i),f=u.length;if(c!=f&&!a)return!1;for(var m=c;m--;){var x=s[m];if(!(a?x in i:zV.call(i,x)))return!1}var P=r.get(t),E=r.get(i);if(P&&E)return P==i&&E==t;var N=!0;r.set(t,i),r.set(i,t);for(var j=a;++m<c;){x=s[m];var L=t[x],U=i[x];if(n)var ie=a?n(U,L,x,i,t,r):n(L,U,x,t,i,r);if(!(ie===void 0?L===U||o(L,U,e,n,r):ie)){N=!1;break}j||(j=x=="constructor")}if(N&&!j){var xe=t.constructor,le=i.constructor;xe!=le&&"constructor"in t&&"constructor"in i&&!(typeof xe=="function"&&xe instanceof xe&&typeof le=="function"&&le instanceof le)&&(N=!1)}return r.delete(t),r.delete(i),N}Gb.exports=BV});var Xb=g((Zne,Yb)=>{"use strict";var Gm=hr(),qV=Bm(),GV=Bb(),HV=Hb(),Vb=fi(),jb=Ge(),Ub=li(),VV=ro(),jV=1,Wb="[object Arguments]",$b="[object Array]",jf="[object Object]",UV=Object.prototype,Kb=UV.hasOwnProperty;function WV(t,i,e,n,o,r){var a=jb(t),s=jb(i),c=a?$b:Vb(t),u=s?$b:Vb(i);c=c==Wb?jf:c,u=u==Wb?jf:u;var f=c==jf,m=u==jf,x=c==u;if(x&&Ub(t)){if(!Ub(i))return!1;a=!0,f=!1}if(x&&!f)return r||(r=new Gm),a||VV(t)?qV(t,i,e,n,o,r):GV(t,i,c,e,n,o,r);if(!(e&jV)){var P=f&&Kb.call(t,"__wrapped__"),E=m&&Kb.call(i,"__wrapped__");if(P||E){var N=P?t.value():t,j=E?i.value():i;return r||(r=new Gm),o(N,j,e,n,r)}}return x?(r||(r=new Gm),HV(t,i,e,n,o,r)):!1}Yb.exports=WV});var Hm=g((Qne,Jb)=>{"use strict";var $V=Xb(),Zb=Mt();function Qb(t,i,e,n,o){return t===i?!0:t==null||i==null||!Zb(t)&&!Zb(i)?t!==t&&i!==i:$V(t,i,e,n,Qb,o)}Jb.exports=Qb});var tw=g((Jne,ew)=>{"use strict";var KV=hr(),YV=Hm(),XV=1,ZV=2;function QV(t,i,e,n){var o=e.length,r=o,a=!n;if(t==null)return!r;for(t=Object(t);o--;){var s=e[o];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<r;){s=e[o];var c=s[0],u=t[c],f=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var m=new KV;if(n)var x=n(u,f,c,t,i,m);if(!(x===void 0?YV(f,u,XV|ZV,n,m):x))return!1}}return!0}ew.exports=QV});var Vm=g((eie,nw)=>{"use strict";var JV=ft();function e4(t){return t===t&&!JV(t)}nw.exports=e4});var ow=g((tie,iw)=>{"use strict";var t4=Vm(),n4=Qt();function i4(t){for(var i=n4(t),e=i.length;e--;){var n=i[e],o=t[n];i[e]=[n,o,t4(o)]}return i}iw.exports=i4});var jm=g((nie,rw)=>{"use strict";function o4(t,i){return function(e){return e==null?!1:e[t]===i&&(i!==void 0||t in Object(e))}}rw.exports=o4});var sw=g((iie,aw)=>{"use strict";var r4=tw(),a4=ow(),s4=jm();function c4(t){var i=a4(t);return i.length==1&&i[0][2]?s4(i[0][0],i[0][1]):function(e){return e===t||r4(e,t,i)}}aw.exports=c4});var pi=g((oie,cw)=>{"use strict";var d4=Dn(),l4=Mt(),u4="[object Symbol]";function f4(t){return typeof t=="symbol"||l4(t)&&d4(t)==u4}cw.exports=f4});var Uf=g((rie,dw)=>{"use strict";var p4=Ge(),h4=pi(),m4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_4=/^\w*$/;function g4(t,i){if(p4(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||h4(t)?!0:_4.test(t)||!m4.test(t)||i!=null&&t in Object(i)}dw.exports=g4});var fw=g((aie,uw)=>{"use strict";var lw=kf(),v4="Expected a function";function Um(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError(v4);var e=function(){var n=arguments,o=i?i.apply(this,n):n[0],r=e.cache;if(r.has(o))return r.get(o);var a=t.apply(this,n);return e.cache=r.set(o,a)||r,a};return e.cache=new(Um.Cache||lw),e}Um.Cache=lw;uw.exports=Um});var hw=g((sie,pw)=>{"use strict";var y4=fw(),C4=500;function x4(t){var i=y4(t,function(n){return e.size===C4&&e.clear(),n}),e=i.cache;return i}pw.exports=x4});var _w=g((cie,mw)=>{"use strict";var b4=hw(),w4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S4=/\\(\\)?/g,T4=b4(function(t){var i=[];return t.charCodeAt(0)===46&&i.push(""),t.replace(w4,function(e,n,o,r){i.push(o?r.replace(S4,"$1"):n||e)}),i});mw.exports=T4});var Ir=g((die,gw)=>{"use strict";function I4(t,i){for(var e=-1,n=t==null?0:t.length,o=Array(n);++e<n;)o[e]=i(t[e],e,t);return o}gw.exports=I4});var ww=g((lie,bw)=>{"use strict";var vw=di(),E4=Ir(),P4=Ge(),M4=pi(),k4=1/0,yw=vw?vw.prototype:void 0,Cw=yw?yw.toString:void 0;function xw(t){if(typeof t=="string")return t;if(P4(t))return E4(t,xw)+"";if(M4(t))return Cw?Cw.call(t):"";var i=t+"";return i=="0"&&1/t==-k4?"-0":i}bw.exports=xw});var Wm=g((uie,Sw)=>{"use strict";var D4=ww();function O4(t){return t==null?"":D4(t)}Sw.exports=O4});var Er=g((fie,Tw)=>{"use strict";var N4=Ge(),R4=Uf(),A4=_w(),F4=Wm();function L4(t,i){return N4(t)?t:R4(t,i)?[t]:A4(F4(t))}Tw.exports=L4});var co=g((pie,Iw)=>{"use strict";var z4=pi(),B4=1/0;function q4(t){if(typeof t=="string"||z4(t))return t;var i=t+"";return i=="0"&&1/t==-B4?"-0":i}Iw.exports=q4});var Pr=g((hie,Ew)=>{"use strict";var G4=Er(),H4=co();function V4(t,i){i=G4(i,t);for(var e=0,n=i.length;t!=null&&e<n;)t=t[H4(i[e++])];return e&&e==n?t:void 0}Ew.exports=V4});var Mw=g((mie,Pw)=>{"use strict";var j4=Pr();function U4(t,i,e){var n=t==null?void 0:j4(t,i);return n===void 0?e:n}Pw.exports=U4});var Dw=g((_ie,kw)=>{"use strict";function W4(t,i){return t!=null&&i in Object(t)}kw.exports=W4});var $m=g((gie,Ow)=>{"use strict";var $4=Er(),K4=no(),Y4=Ge(),X4=vr(),Z4=Of(),Q4=co();function J4(t,i,e){i=$4(i,t);for(var n=-1,o=i.length,r=!1;++n<o;){var a=Q4(i[n]);if(!(r=t!=null&&e(t,a)))break;t=t[a]}return r||++n!=o?r:(o=t==null?0:t.length,!!o&&Z4(o)&&X4(a,o)&&(Y4(t)||K4(t)))}Ow.exports=J4});var Km=g((vie,Nw)=>{"use strict";var ej=Dw(),tj=$m();function nj(t,i){return t!=null&&tj(t,i,ej)}Nw.exports=nj});var Aw=g((yie,Rw)=>{"use strict";var ij=Hm(),oj=Mw(),rj=Km(),aj=Uf(),sj=Vm(),cj=jm(),dj=co(),lj=1,uj=2;function fj(t,i){return aj(t)&&sj(i)?cj(dj(t),i):function(e){var n=oj(e,t);return n===void 0&&n===i?rj(e,t):ij(i,n,lj|uj)}}Rw.exports=fj});var Ym=g((Cie,Fw)=>{"use strict";function pj(t){return function(i){return i?.[t]}}Fw.exports=pj});var zw=g((xie,Lw)=>{"use strict";var hj=Pr();function mj(t){return function(i){return hj(i,t)}}Lw.exports=mj});var qw=g((bie,Bw)=>{"use strict";var _j=Ym(),gj=zw(),vj=Uf(),yj=co();function Cj(t){return vj(t)?_j(yj(t)):gj(t)}Bw.exports=Cj});var Vt=g((wie,Gw)=>{"use strict";var xj=sw(),bj=Aw(),wj=Rn(),Sj=Ge(),Tj=qw();function Ij(t){return typeof t=="function"?t:t==null?wj:typeof t=="object"?Sj(t)?bj(t[0],t[1]):xj(t):Tj(t)}Gw.exports=Ij});var Xm=g((Sie,Hw)=>{"use strict";var Ej=vm(),Pj=bb(),Mj=Vt(),kj=Ge();function Dj(t,i){var e=kj(t)?Ej:Pj;return e(t,Mj(i,3))}Hw.exports=Dj});var jw=g((Tie,Vw)=>{"use strict";var Oj=Object.prototype,Nj=Oj.hasOwnProperty;function Rj(t,i){return t!=null&&Nj.call(t,i)}Vw.exports=Rj});var Zm=g((Iie,Uw)=>{"use strict";var Aj=jw(),Fj=$m();function Lj(t,i){return t!=null&&Fj(t,i,Aj)}Uw.exports=Lj});var $w=g((Eie,Ww)=>{"use strict";var zj=Rf(),Bj=fi(),qj=no(),Gj=Ge(),Hj=Ht(),Vj=li(),jj=br(),Uj=ro(),Wj="[object Map]",$j="[object Set]",Kj=Object.prototype,Yj=Kj.hasOwnProperty;function Xj(t){if(t==null)return!0;if(Hj(t)&&(Gj(t)||typeof t=="string"||typeof t.splice=="function"||Vj(t)||Uj(t)||qj(t)))return!t.length;var i=Bj(t);if(i==Wj||i==$j)return!t.size;if(jj(t))return!zj(t).length;for(var e in t)if(Yj.call(t,e))return!1;return!0}Ww.exports=Xj});var Qm=g((Pie,Kw)=>{"use strict";function Zj(t){return t===void 0}Kw.exports=Zj});var Jm=g((Mie,Yw)=>{"use strict";var Qj=Tr(),Jj=Ht();function e5(t,i){var e=-1,n=Jj(t)?Array(t.length):[];return Qj(t,function(o,r,a){n[++e]=i(o,r,a)}),n}Yw.exports=e5});var e_=g((kie,Xw)=>{"use strict";var t5=Ir(),n5=Vt(),i5=Jm(),o5=Ge();function r5(t,i){var e=o5(t)?t5:i5;return e(t,n5(i,3))}Xw.exports=r5});var Qw=g((Die,Zw)=>{"use strict";function a5(t,i,e,n){var o=-1,r=t==null?0:t.length;for(n&&r&&(e=t[++o]);++o<r;)e=i(e,t[o],o,t);return e}Zw.exports=a5});var eS=g((Oie,Jw)=>{"use strict";function s5(t,i,e,n,o){return o(t,function(r,a,s){e=n?(n=!1,r):i(e,r,a,s)}),e}Jw.exports=s5});var t_=g((Nie,tS)=>{"use strict";var c5=Qw(),d5=Tr(),l5=Vt(),u5=eS(),f5=Ge();function p5(t,i,e){var n=f5(t)?c5:u5,o=arguments.length<3;return n(t,l5(i,4),e,o,d5)}tS.exports=p5});var iS=g((Rie,nS)=>{"use strict";var h5=Dn(),m5=Ge(),_5=Mt(),g5="[object String]";function v5(t){return typeof t=="string"||!m5(t)&&_5(t)&&h5(t)==g5}nS.exports=v5});var rS=g((Aie,oS)=>{"use strict";var y5=Ym(),C5=y5("length");oS.exports=C5});var sS=g((Fie,aS)=>{"use strict";var x5="\\ud800-\\udfff",b5="\\u0300-\\u036f",w5="\\ufe20-\\ufe2f",S5="\\u20d0-\\u20ff",T5=b5+w5+S5,I5="\\ufe0e\\ufe0f",E5="\\u200d",P5=RegExp("["+E5+x5+T5+I5+"]");function M5(t){return P5.test(t)}aS.exports=M5});var _S=g((Lie,mS)=>{"use strict";var dS="\\ud800-\\udfff",k5="\\u0300-\\u036f",D5="\\ufe20-\\ufe2f",O5="\\u20d0-\\u20ff",N5=k5+D5+O5,R5="\\ufe0e\\ufe0f",A5="["+dS+"]",n_="["+N5+"]",i_="\\ud83c[\\udffb-\\udfff]",F5="(?:"+n_+"|"+i_+")",lS="[^"+dS+"]",uS="(?:\\ud83c[\\udde6-\\uddff]){2}",fS="[\\ud800-\\udbff][\\udc00-\\udfff]",L5="\\u200d",pS=F5+"?",hS="["+R5+"]?",z5="(?:"+L5+"(?:"+[lS,uS,fS].join("|")+")"+hS+pS+")*",B5=hS+pS+z5,q5="(?:"+[lS+n_+"?",n_,uS,fS,A5].join("|")+")",cS=RegExp(i_+"(?="+i_+")|"+q5+B5,"g");function G5(t){for(var i=cS.lastIndex=0;cS.test(t);)++i;return i}mS.exports=G5});var vS=g((zie,gS)=>{"use strict";var H5=rS(),V5=sS(),j5=_S();function U5(t){return V5(t)?j5(t):H5(t)}gS.exports=U5});var CS=g((Bie,yS)=>{"use strict";var W5=Rf(),$5=fi(),K5=Ht(),Y5=iS(),X5=vS(),Z5="[object Map]",Q5="[object Set]";function J5(t){if(t==null)return 0;if(K5(t))return Y5(t)?X5(t):t.length;var i=$5(t);return i==Z5||i==Q5?t.size:W5(t).length}yS.exports=J5});var bS=g((qie,xS)=>{"use strict";var eU=Df(),tU=Dm(),nU=Gf(),iU=Vt(),oU=Sr(),rU=Ge(),aU=li(),sU=Zi(),cU=ft(),dU=ro();function lU(t,i,e){var n=rU(t),o=n||aU(t)||dU(t);if(i=iU(i,4),e==null){var r=t&&t.constructor;o?e=n?new r:[]:cU(t)?e=sU(r)?tU(oU(t)):{}:e={}}return(o?eU:nU)(t,function(a,s,c){return i(e,a,s,c)}),e}xS.exports=lU});var IS=g((Gie,TS)=>{"use strict";var wS=di(),uU=no(),fU=Ge(),SS=wS?wS.isConcatSpreadable:void 0;function pU(t){return fU(t)||uU(t)||!!(SS&&t&&t[SS])}TS.exports=pU});var Wf=g((Hie,PS)=>{"use strict";var hU=Ff(),mU=IS();function ES(t,i,e,n,o){var r=-1,a=t.length;for(e||(e=mU),o||(o=[]);++r<a;){var s=t[r];i>0&&e(s)?i>1?ES(s,i-1,e,n,o):hU(o,s):n||(o[o.length]=s)}return o}PS.exports=ES});var kS=g((Vie,MS)=>{"use strict";function _U(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}MS.exports=_U});var o_=g((jie,OS)=>{"use strict";var gU=kS(),DS=Math.max;function vU(t,i,e){return i=DS(i===void 0?t.length-1:i,0),function(){for(var n=arguments,o=-1,r=DS(n.length-i,0),a=Array(r);++o<r;)a[o]=n[i+o];o=-1;for(var s=Array(i+1);++o<i;)s[o]=n[o];return s[i]=e(a),gU(t,this,s)}}OS.exports=vU});var AS=g((Uie,RS)=>{"use strict";var yU=Bf(),NS=fm(),CU=Rn(),xU=NS?function(t,i){return NS(t,"toString",{configurable:!0,enumerable:!1,value:yU(i),writable:!0})}:CU;RS.exports=xU});var LS=g((Wie,FS)=>{"use strict";var bU=800,wU=16,SU=Date.now;function TU(t){var i=0,e=0;return function(){var n=SU(),o=wU-(n-e);if(e=n,o>0){if(++i>=bU)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}FS.exports=TU});var r_=g(($ie,zS)=>{"use strict";var IU=AS(),EU=LS(),PU=EU(IU);zS.exports=PU});var Mr=g((Kie,BS)=>{"use strict";var MU=Rn(),kU=o_(),DU=r_();function OU(t,i){return DU(kU(t,i,MU),t+"")}BS.exports=OU});var a_=g((Yie,qS)=>{"use strict";function NU(t,i,e,n){for(var o=t.length,r=e+(n?1:-1);n?r--:++r<o;)if(i(t[r],r,t))return r;return-1}qS.exports=NU});var HS=g((Xie,GS)=>{"use strict";function RU(t){return t!==t}GS.exports=RU});var jS=g((Zie,VS)=>{"use strict";function AU(t,i,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===i)return n;return-1}VS.exports=AU});var WS=g((Qie,US)=>{"use strict";var FU=a_(),LU=HS(),zU=jS();function BU(t,i,e){return i===i?zU(t,i,e):FU(t,LU,e)}US.exports=BU});var KS=g((Jie,$S)=>{"use strict";var qU=WS();function GU(t,i){var e=t==null?0:t.length;return!!e&&qU(t,i,0)>-1}$S.exports=GU});var XS=g((eoe,YS)=>{"use strict";function HU(t,i,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(i,t[n]))return!0;return!1}YS.exports=HU});var QS=g((toe,ZS)=>{"use strict";function VU(){}ZS.exports=VU});var e1=g((noe,JS)=>{"use strict";var s_=wm(),jU=QS(),UU=Vf(),WU=1/0,$U=s_&&1/UU(new s_([,-0]))[1]==WU?function(t){return new s_(t)}:jU;JS.exports=$U});var n1=g((ioe,t1)=>{"use strict";var KU=Lm(),YU=KS(),XU=XS(),ZU=zm(),QU=e1(),JU=Vf(),eW=200;function tW(t,i,e){var n=-1,o=YU,r=t.length,a=!0,s=[],c=s;if(e)a=!1,o=XU;else if(r>=eW){var u=i?null:QU(t);if(u)return JU(u);a=!1,o=ZU,c=new KU}else c=i?[]:s;e:for(;++n<r;){var f=t[n],m=i?i(f):f;if(f=e||f!==0?f:0,a&&m===m){for(var x=c.length;x--;)if(c[x]===m)continue e;i&&c.push(m),s.push(f)}else o(c,m,e)||(c!==s&&c.push(m),s.push(f))}return s}t1.exports=tW});var c_=g((ooe,i1)=>{"use strict";var nW=Ht(),iW=Mt();function oW(t){return iW(t)&&nW(t)}i1.exports=oW});var r1=g((roe,o1)=>{"use strict";var rW=Wf(),aW=Mr(),sW=n1(),cW=c_(),dW=aW(function(t){return sW(rW(t,1,cW,!0))});o1.exports=dW});var s1=g((aoe,a1)=>{"use strict";var lW=Ir();function uW(t,i){return lW(i,function(e){return t[e]})}a1.exports=uW});var d_=g((soe,c1)=>{"use strict";var fW=s1(),pW=Qt();function hW(t){return t==null?[]:fW(t,pW(t))}c1.exports=hW});var pt=g((coe,d1)=>{"use strict";var $f;if(typeof gi=="function")try{$f={clone:cb(),constant:Bf(),each:Fm(),filter:Xm(),has:Zm(),isArray:Ge(),isEmpty:$w(),isFunction:Zi(),isUndefined:Qm(),keys:Qt(),map:e_(),reduce:t_(),size:CS(),transform:bS(),union:r1(),values:d_()}}catch{}$f||($f=window._);d1.exports=$f});var Kf=g((loe,p1)=>{"use strict";var ee=pt();p1.exports=ae;var mW="\0",hi="\0",l1="";function ae(t){this._isDirected=ee.has(t,"directed")?t.directed:!0,this._isMultigraph=ee.has(t,"multigraph")?t.multigraph:!1,this._isCompound=ee.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ee.constant(void 0),this._defaultEdgeLabelFn=ee.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[hi]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}ae.prototype._nodeCount=0;ae.prototype._edgeCount=0;ae.prototype.isDirected=function(){return this._isDirected};ae.prototype.isMultigraph=function(){return this._isMultigraph};ae.prototype.isCompound=function(){return this._isCompound};ae.prototype.setGraph=function(t){return this._label=t,this};ae.prototype.graph=function(){return this._label};ae.prototype.setDefaultNodeLabel=function(t){return ee.isFunction(t)||(t=ee.constant(t)),this._defaultNodeLabelFn=t,this};ae.prototype.nodeCount=function(){return this._nodeCount};ae.prototype.nodes=function(){return ee.keys(this._nodes)};ae.prototype.sources=function(){var t=this;return ee.filter(this.nodes(),function(i){return ee.isEmpty(t._in[i])})};ae.prototype.sinks=function(){var t=this;return ee.filter(this.nodes(),function(i){return ee.isEmpty(t._out[i])})};ae.prototype.setNodes=function(t,i){var e=arguments,n=this;return ee.each(t,function(o){e.length>1?n.setNode(o,i):n.setNode(o)}),this};ae.prototype.setNode=function(t,i){return ee.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=i),this):(this._nodes[t]=arguments.length>1?i:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=hi,this._children[t]={},this._children[hi][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};ae.prototype.node=function(t){return this._nodes[t]};ae.prototype.hasNode=function(t){return ee.has(this._nodes,t)};ae.prototype.removeNode=function(t){var i=this;if(ee.has(this._nodes,t)){var e=function(n){i.removeEdge(i._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ee.each(this.children(t),function(n){i.setParent(n)}),delete this._children[t]),ee.each(ee.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],ee.each(ee.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};ae.prototype.setParent=function(t,i){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ee.isUndefined(i))i=hi;else{i+="";for(var e=i;!ee.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+i+" as parent of "+t+" would create a cycle");this.setNode(i)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=i,this._children[i][t]=!0,this};ae.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};ae.prototype.parent=function(t){if(this._isCompound){var i=this._parent[t];if(i!==hi)return i}};ae.prototype.children=function(t){if(ee.isUndefined(t)&&(t=hi),this._isCompound){var i=this._children[t];if(i)return ee.keys(i)}else{if(t===hi)return this.nodes();if(this.hasNode(t))return[]}};ae.prototype.predecessors=function(t){var i=this._preds[t];if(i)return ee.keys(i)};ae.prototype.successors=function(t){var i=this._sucs[t];if(i)return ee.keys(i)};ae.prototype.neighbors=function(t){var i=this.predecessors(t);if(i)return ee.union(i,this.successors(t))};ae.prototype.isLeaf=function(t){var i;return this.isDirected()?i=this.successors(t):i=this.neighbors(t),i.length===0};ae.prototype.filterNodes=function(t){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});i.setGraph(this.graph());var e=this;ee.each(this._nodes,function(r,a){t(a)&&i.setNode(a,r)}),ee.each(this._edgeObjs,function(r){i.hasNode(r.v)&&i.hasNode(r.w)&&i.setEdge(r,e.edge(r))});var n={};function o(r){var a=e.parent(r);return a===void 0||i.hasNode(a)?(n[r]=a,a):a in n?n[a]:o(a)}return this._isCompound&&ee.each(i.nodes(),function(r){i.setParent(r,o(r))}),i};ae.prototype.setDefaultEdgeLabel=function(t){return ee.isFunction(t)||(t=ee.constant(t)),this._defaultEdgeLabelFn=t,this};ae.prototype.edgeCount=function(){return this._edgeCount};ae.prototype.edges=function(){return ee.values(this._edgeObjs)};ae.prototype.setPath=function(t,i){var e=this,n=arguments;return ee.reduce(t,function(o,r){return n.length>1?e.setEdge(o,r,i):e.setEdge(o,r),r}),this};ae.prototype.setEdge=function(){var t,i,e,n,o=!1,r=arguments[0];typeof r=="object"&&r!==null&&"v"in r?(t=r.v,i=r.w,e=r.name,arguments.length===2&&(n=arguments[1],o=!0)):(t=r,i=arguments[1],e=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),t=""+t,i=""+i,ee.isUndefined(e)||(e=""+e);var a=kr(this._isDirected,t,i,e);if(ee.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!ee.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(i),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(t,i,e);var s=_W(this._isDirected,t,i,e);return t=s.v,i=s.w,Object.freeze(s),this._edgeObjs[a]=s,u1(this._preds[i],t),u1(this._sucs[t],i),this._in[i][a]=s,this._out[t][a]=s,this._edgeCount++,this};ae.prototype.edge=function(t,i,e){var n=arguments.length===1?l_(this._isDirected,arguments[0]):kr(this._isDirected,t,i,e);return this._edgeLabels[n]};ae.prototype.hasEdge=function(t,i,e){var n=arguments.length===1?l_(this._isDirected,arguments[0]):kr(this._isDirected,t,i,e);return ee.has(this._edgeLabels,n)};ae.prototype.removeEdge=function(t,i,e){var n=arguments.length===1?l_(this._isDirected,arguments[0]):kr(this._isDirected,t,i,e),o=this._edgeObjs[n];return o&&(t=o.v,i=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],f1(this._preds[i],t),f1(this._sucs[t],i),delete this._in[i][n],delete this._out[t][n],this._edgeCount--),this};ae.prototype.inEdges=function(t,i){var e=this._in[t];if(e){var n=ee.values(e);return i?ee.filter(n,function(o){return o.v===i}):n}};ae.prototype.outEdges=function(t,i){var e=this._out[t];if(e){var n=ee.values(e);return i?ee.filter(n,function(o){return o.w===i}):n}};ae.prototype.nodeEdges=function(t,i){var e=this.inEdges(t,i);if(e)return e.concat(this.outEdges(t,i))};function u1(t,i){t[i]?t[i]++:t[i]=1}function f1(t,i){--t[i]||delete t[i]}function kr(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}return o+l1+r+l1+(ee.isUndefined(n)?mW:n)}function _W(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}var s={v:o,w:r};return n&&(s.name=n),s}function l_(t,i){return kr(t,i.v,i.w,i.name)}});var m1=g((uoe,h1)=>{"use strict";h1.exports="2.1.8"});var g1=g((foe,_1)=>{"use strict";_1.exports={Graph:Kf(),version:m1()}});var y1=g((poe,v1)=>{"use strict";var jt=pt(),gW=Kf();v1.exports={write:vW,read:xW};function vW(t){var i={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:yW(t),edges:CW(t)};return jt.isUndefined(t.graph())||(i.value=jt.clone(t.graph())),i}function yW(t){return jt.map(t.nodes(),function(i){var e=t.node(i),n=t.parent(i),o={v:i};return jt.isUndefined(e)||(o.value=e),jt.isUndefined(n)||(o.parent=n),o})}function CW(t){return jt.map(t.edges(),function(i){var e=t.edge(i),n={v:i.v,w:i.w};return jt.isUndefined(i.name)||(n.name=i.name),jt.isUndefined(e)||(n.value=e),n})}function xW(t){var i=new gW(t.options).setGraph(t.value);return jt.each(t.nodes,function(e){i.setNode(e.v,e.value),e.parent&&i.setParent(e.v,e.parent)}),jt.each(t.edges,function(e){i.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),i}});var x1=g((hoe,C1)=>{"use strict";var Yf=pt();C1.exports=bW;function bW(t){var i={},e=[],n;function o(r){Yf.has(i,r)||(i[r]=!0,n.push(r),Yf.each(t.successors(r),o),Yf.each(t.predecessors(r),o))}return Yf.each(t.nodes(),function(r){n=[],o(r),n.length&&e.push(n)}),e}});var u_=g((moe,w1)=>{"use strict";var b1=pt();w1.exports=bt;function bt(){this._arr=[],this._keyIndices={}}bt.prototype.size=function(){return this._arr.length};bt.prototype.keys=function(){return this._arr.map(function(t){return t.key})};bt.prototype.has=function(t){return b1.has(this._keyIndices,t)};bt.prototype.priority=function(t){var i=this._keyIndices[t];if(i!==void 0)return this._arr[i].priority};bt.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};bt.prototype.add=function(t,i){var e=this._keyIndices;if(t=String(t),!b1.has(e,t)){var n=this._arr,o=n.length;return e[t]=o,n.push({key:t,priority:i}),this._decrease(o),!0}return!1};bt.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key};bt.prototype.decrease=function(t,i){var e=this._keyIndices[t];if(i>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+i);this._arr[e].priority=i,this._decrease(e)};bt.prototype._heapify=function(t){var i=this._arr,e=2*t,n=e+1,o=t;e<i.length&&(o=i[e].priority<i[o].priority?e:o,n<i.length&&(o=i[n].priority<i[o].priority?n:o),o!==t&&(this._swap(t,o),this._heapify(o)))};bt.prototype._decrease=function(t){for(var i=this._arr,e=i[t].priority,n;t!==0&&(n=t>>1,!(i[n].priority<e));)this._swap(t,n),t=n};bt.prototype._swap=function(t,i){var e=this._arr,n=this._keyIndices,o=e[t],r=e[i];e[t]=r,e[i]=o,n[r.key]=t,n[o.key]=i}});var f_=g((_oe,S1)=>{"use strict";var wW=pt(),SW=u_();S1.exports=IW;var TW=wW.constant(1);function IW(t,i,e,n){return EW(t,String(i),e||TW,n||function(o){return t.outEdges(o)})}function EW(t,i,e,n){var o={},r=new SW,a,s,c=function(u){var f=u.v!==a?u.v:u.w,m=o[f],x=e(u),P=s.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+x);P<m.distance&&(m.distance=P,m.predecessor=a,r.decrease(f,P))};for(t.nodes().forEach(function(u){var f=u===i?0:Number.POSITIVE_INFINITY;o[u]={distance:f},r.add(u,f)});r.size()>0&&(a=r.removeMin(),s=o[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return o}});var I1=g((goe,T1)=>{"use strict";var PW=f_(),MW=pt();T1.exports=kW;function kW(t,i,e){return MW.transform(t.nodes(),function(n,o){n[o]=PW(t,o,i,e)},{})}});var p_=g((voe,P1)=>{"use strict";var E1=pt();P1.exports=DW;function DW(t){var i=0,e=[],n={},o=[];function r(a){var s=n[a]={onStack:!0,lowlink:i,index:i++};if(e.push(a),t.successors(a).forEach(function(f){E1.has(n,f)?n[f].onStack&&(s.lowlink=Math.min(s.lowlink,n[f].index)):(r(f),s.lowlink=Math.min(s.lowlink,n[f].lowlink))}),s.lowlink===s.index){var c=[],u;do u=e.pop(),n[u].onStack=!1,c.push(u);while(a!==u);o.push(c)}}return t.nodes().forEach(function(a){E1.has(n,a)||r(a)}),o}});var k1=g((yoe,M1)=>{"use strict";var OW=pt(),NW=p_();M1.exports=RW;function RW(t){return OW.filter(NW(t),function(i){return i.length>1||i.length===1&&t.hasEdge(i[0],i[0])})}});var O1=g((Coe,D1)=>{"use strict";var AW=pt();D1.exports=LW;var FW=AW.constant(1);function LW(t,i,e){return zW(t,i||FW,e||function(n){return t.outEdges(n)})}function zW(t,i,e){var n={},o=t.nodes();return o.forEach(function(r){n[r]={},n[r][r]={distance:0},o.forEach(function(a){r!==a&&(n[r][a]={distance:Number.POSITIVE_INFINITY})}),e(r).forEach(function(a){var s=a.v===r?a.w:a.v,c=i(a);n[r][s]={distance:c,predecessor:r}})}),o.forEach(function(r){var a=n[r];o.forEach(function(s){var c=n[s];o.forEach(function(u){var f=c[r],m=a[u],x=c[u],P=f.distance+m.distance;P<x.distance&&(x.distance=P,x.predecessor=m.predecessor)})})}),n}});var h_=g((xoe,R1)=>{"use strict";var Dr=pt();R1.exports=N1;N1.CycleException=Xf;function N1(t){var i={},e={},n=[];function o(r){if(Dr.has(e,r))throw new Xf;Dr.has(i,r)||(e[r]=!0,i[r]=!0,Dr.each(t.predecessors(r),o),delete e[r],n.push(r))}if(Dr.each(t.sinks(),o),Dr.size(i)!==t.nodeCount())throw new Xf;return n}function Xf(){}Xf.prototype=new Error});var L1=g((boe,F1)=>{"use strict";var A1=h_();F1.exports=BW;function BW(t){try{A1(t)}catch(i){if(i instanceof A1.CycleException)return!1;throw i}return!0}});var m_=g((woe,B1)=>{"use strict";var Zf=pt();B1.exports=qW;function qW(t,i,e){Zf.isArray(i)||(i=[i]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],r={};return Zf.each(i,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);z1(t,a,e==="post",r,n,o)}),o}function z1(t,i,e,n,o,r){Zf.has(n,i)||(n[i]=!0,e||r.push(i),Zf.each(o(i),function(a){z1(t,a,e,n,o,r)}),e&&r.push(i))}});var G1=g((Soe,q1)=>{"use strict";var GW=m_();q1.exports=HW;function HW(t,i){return GW(t,i,"post")}});var V1=g((Toe,H1)=>{"use strict";var VW=m_();H1.exports=jW;function jW(t,i){return VW(t,i,"pre")}});var W1=g((Ioe,U1)=>{"use strict";var j1=pt(),UW=Kf(),WW=u_();U1.exports=$W;function $W(t,i){var e=new UW,n={},o=new WW,r;function a(c){var u=c.v===r?c.w:c.v,f=o.priority(u);if(f!==void 0){var m=i(c);m<f&&(n[u]=r,o.decrease(u,m))}}if(t.nodeCount()===0)return e;j1.each(t.nodes(),function(c){o.add(c,Number.POSITIVE_INFINITY),e.setNode(c)}),o.decrease(t.nodes()[0],0);for(var s=!1;o.size()>0;){if(r=o.removeMin(),j1.has(n,r))e.setEdge(r,n[r]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(r).forEach(a)}return e}});var K1=g((Eoe,$1)=>{"use strict";$1.exports={components:x1(),dijkstra:f_(),dijkstraAll:I1(),findCycles:k1(),floydWarshall:O1(),isAcyclic:L1(),postorder:G1(),preorder:V1(),prim:W1(),tarjan:p_(),topsort:h_()}});var Z1=g((Poe,X1)=>{"use strict";var Y1=g1();X1.exports={Graph:Y1.Graph,json:y1(),alg:K1(),version:Y1.version}});var wt=g((Moe,Q1)=>{"use strict";var Qf;if(typeof gi=="function")try{Qf=Z1()}catch{}Qf||(Qf=window.graphlib);Q1.exports=Qf});var eT=g((Doe,J1)=>{"use strict";var KW=Nm(),YW=1,XW=4;function ZW(t){return KW(t,YW|XW)}J1.exports=ZW});var Or=g((Ooe,tT)=>{"use strict";var QW=ci(),JW=Ht(),e$=vr(),t$=ft();function n$(t,i,e){if(!t$(e))return!1;var n=typeof i;return(n=="number"?JW(e)&&e$(i,e.length):n=="string"&&i in e)?QW(e[i],t):!1}tT.exports=n$});var oT=g((Noe,iT)=>{"use strict";var i$=Mr(),o$=ci(),r$=Or(),a$=Nn(),nT=Object.prototype,s$=nT.hasOwnProperty,c$=i$(function(t,i){t=Object(t);var e=-1,n=i.length,o=n>2?i[2]:void 0;for(o&&r$(i[0],i[1],o)&&(n=1);++e<n;)for(var r=i[e],a=a$(r),s=-1,c=a.length;++s<c;){var u=a[s],f=t[u];(f===void 0||o$(f,nT[u])&&!s$.call(t,u))&&(t[u]=r[u])}return t});iT.exports=c$});var aT=g((Roe,rT)=>{"use strict";var d$=Vt(),l$=Ht(),u$=Qt();function f$(t){return function(i,e,n){var o=Object(i);if(!l$(i)){var r=d$(e,3);i=u$(i),e=function(s){return r(o[s],s,o)}}var a=t(i,e,n);return a>-1?o[r?i[a]:a]:void 0}}rT.exports=f$});var cT=g((Aoe,sT)=>{"use strict";var p$=/\s/;function h$(t){for(var i=t.length;i--&&p$.test(t.charAt(i)););return i}sT.exports=h$});var lT=g((Foe,dT)=>{"use strict";var m$=cT(),_$=/^\s+/;function g$(t){return t&&t.slice(0,m$(t)+1).replace(_$,"")}dT.exports=g$});var hT=g((Loe,pT)=>{"use strict";var v$=lT(),uT=ft(),y$=pi(),fT=NaN,C$=/^[-+]0x[0-9a-f]+$/i,x$=/^0b[01]+$/i,b$=/^0o[0-7]+$/i,w$=parseInt;function S$(t){if(typeof t=="number")return t;if(y$(t))return fT;if(uT(t)){var i=typeof t.valueOf=="function"?t.valueOf():t;t=uT(i)?i+"":i}if(typeof t!="string")return t===0?t:+t;t=v$(t);var e=x$.test(t);return e||b$.test(t)?w$(t.slice(2),e?2:8):C$.test(t)?fT:+t}pT.exports=S$});var __=g((zoe,_T)=>{"use strict";var T$=hT(),mT=1/0,I$=17976931348623157e292;function E$(t){if(!t)return t===0?t:0;if(t=T$(t),t===mT||t===-mT){var i=t<0?-1:1;return i*I$}return t===t?t:0}_T.exports=E$});var vT=g((Boe,gT)=>{"use strict";var P$=__();function M$(t){var i=P$(t),e=i%1;return i===i?e?i-e:i:0}gT.exports=M$});var CT=g((qoe,yT)=>{"use strict";var k$=a_(),D$=Vt(),O$=vT(),N$=Math.max;function R$(t,i,e){var n=t==null?0:t.length;if(!n)return-1;var o=e==null?0:O$(e);return o<0&&(o=N$(n+o,0)),k$(t,D$(i,3),o)}yT.exports=R$});var bT=g((Goe,xT)=>{"use strict";var A$=aT(),F$=CT(),L$=A$(F$);xT.exports=L$});var g_=g((Hoe,wT)=>{"use strict";var z$=Wf();function B$(t){var i=t==null?0:t.length;return i?z$(t,1):[]}wT.exports=B$});var TT=g((Voe,ST)=>{"use strict";var q$=qf(),G$=Rm(),H$=Nn();function V$(t,i){return t==null?t:q$(t,G$(i),H$)}ST.exports=V$});var ET=g((joe,IT)=>{"use strict";function j$(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}IT.exports=j$});var MT=g((Uoe,PT)=>{"use strict";var U$=mr(),W$=Gf(),$$=Vt();function K$(t,i){var e={};return i=$$(i,3),W$(t,function(n,o,r){U$(e,o,i(n,o,r))}),e}PT.exports=K$});var Jf=g((Woe,kT)=>{"use strict";var Y$=pi();function X$(t,i,e){for(var n=-1,o=t.length;++n<o;){var r=t[n],a=i(r);if(a!=null&&(s===void 0?a===a&&!Y$(a):e(a,s)))var s=a,c=r}return c}kT.exports=X$});var OT=g(($oe,DT)=>{"use strict";function Z$(t,i){return t>i}DT.exports=Z$});var RT=g((Koe,NT)=>{"use strict";var Q$=Jf(),J$=OT(),e8=Rn();function t8(t){return t&&t.length?Q$(t,e8,J$):void 0}NT.exports=t8});var v_=g((Yoe,AT)=>{"use strict";var n8=mr(),i8=ci();function o8(t,i,e){(e!==void 0&&!i8(t[i],e)||e===void 0&&!(i in t))&&n8(t,i,e)}AT.exports=o8});var zT=g((Xoe,LT)=>{"use strict";var r8=Dn(),a8=Sr(),s8=Mt(),c8="[object Object]",d8=Function.prototype,l8=Object.prototype,FT=d8.toString,u8=l8.hasOwnProperty,f8=FT.call(Object);function p8(t){if(!s8(t)||r8(t)!=c8)return!1;var i=a8(t);if(i===null)return!0;var e=u8.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&FT.call(e)==f8}LT.exports=p8});var y_=g((Zoe,BT)=>{"use strict";function h8(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}BT.exports=h8});var GT=g((Qoe,qT)=>{"use strict";var m8=to(),_8=Nn();function g8(t){return m8(t,_8(t))}qT.exports=g8});var $T=g((Joe,WT)=>{"use strict";var HT=v_(),v8=_m(),y8=km(),C8=gm(),x8=Om(),VT=no(),jT=Ge(),b8=c_(),w8=li(),S8=Zi(),T8=ft(),I8=zT(),E8=ro(),UT=y_(),P8=GT();function M8(t,i,e,n,o,r,a){var s=UT(t,e),c=UT(i,e),u=a.get(c);if(u){HT(t,e,u);return}var f=r?r(s,c,e+"",t,i,a):void 0,m=f===void 0;if(m){var x=jT(c),P=!x&&w8(c),E=!x&&!P&&E8(c);f=c,x||P||E?jT(s)?f=s:b8(s)?f=C8(s):P?(m=!1,f=v8(c,!0)):E?(m=!1,f=y8(c,!0)):f=[]:I8(c)||VT(c)?(f=s,VT(s)?f=P8(s):(!T8(s)||S8(s))&&(f=x8(c))):m=!1}m&&(a.set(c,f),o(f,c,n,r,a),a.delete(c)),HT(t,e,f)}WT.exports=M8});var XT=g((ere,YT)=>{"use strict";var k8=hr(),D8=v_(),O8=qf(),N8=$T(),R8=ft(),A8=Nn(),F8=y_();function KT(t,i,e,n,o){t!==i&&O8(i,function(r,a){if(o||(o=new k8),R8(r))N8(t,i,a,e,KT,n,o);else{var s=n?n(F8(t,a),r,a+"",t,i,o):void 0;s===void 0&&(s=r),D8(t,a,s)}},A8)}YT.exports=KT});var QT=g((tre,ZT)=>{"use strict";var L8=Mr(),z8=Or();function B8(t){return L8(function(i,e){var n=-1,o=e.length,r=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(r=t.length>3&&typeof r=="function"?(o--,r):void 0,a&&z8(e[0],e[1],a)&&(r=o<3?void 0:r,o=1),i=Object(i);++n<o;){var s=e[n];s&&t(i,s,n,r)}return i})}ZT.exports=B8});var eI=g((nre,JT)=>{"use strict";var q8=XT(),G8=QT(),H8=G8(function(t,i,e){q8(t,i,e)});JT.exports=H8});var C_=g((ire,tI)=>{"use strict";function V8(t,i){return t<i}tI.exports=V8});var iI=g((ore,nI)=>{"use strict";var j8=Jf(),U8=C_(),W8=Rn();function $8(t){return t&&t.length?j8(t,W8,U8):void 0}nI.exports=$8});var rI=g((rre,oI)=>{"use strict";var K8=Jf(),Y8=Vt(),X8=C_();function Z8(t,i){return t&&t.length?K8(t,Y8(i,2),X8):void 0}oI.exports=Z8});var sI=g((are,aI)=>{"use strict";var Q8=xt(),J8=function(){return Q8.Date.now()};aI.exports=J8});var lI=g((sre,dI)=>{"use strict";var e6=_r(),t6=Er(),n6=vr(),cI=ft(),i6=co();function o6(t,i,e,n){if(!cI(t))return t;i=t6(i,t);for(var o=-1,r=i.length,a=r-1,s=t;s!=null&&++o<r;){var c=i6(i[o]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=a){var f=s[c];u=n?n(f,c,s):void 0,u===void 0&&(u=cI(f)?f:n6(i[o+1])?[]:{})}e6(s,c,u),s=s[c]}return t}dI.exports=o6});var fI=g((cre,uI)=>{"use strict";var r6=Pr(),a6=lI(),s6=Er();function c6(t,i,e){for(var n=-1,o=i.length,r={};++n<o;){var a=i[n],s=r6(t,a);e(s,a)&&a6(r,s6(a,t),s)}return r}uI.exports=c6});var hI=g((dre,pI)=>{"use strict";var d6=fI(),l6=Km();function u6(t,i){return d6(t,i,function(e,n){return l6(t,n)})}pI.exports=u6});var _I=g((lre,mI)=>{"use strict";var f6=g_(),p6=o_(),h6=r_();function m6(t){return h6(p6(t,void 0,f6),t+"")}mI.exports=m6});var vI=g((ure,gI)=>{"use strict";var _6=hI(),g6=_I(),v6=g6(function(t,i){return t==null?{}:_6(t,i)});gI.exports=v6});var CI=g((fre,yI)=>{"use strict";var y6=Math.ceil,C6=Math.max;function x6(t,i,e,n){for(var o=-1,r=C6(y6((i-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++o]=t,t+=e;return a}yI.exports=x6});var bI=g((pre,xI)=>{"use strict";var b6=CI(),w6=Or(),x_=__();function S6(t){return function(i,e,n){return n&&typeof n!="number"&&w6(i,e,n)&&(e=n=void 0),i=x_(i),e===void 0?(e=i,i=0):e=x_(e),n=n===void 0?i<e?1:-1:x_(n),b6(i,e,n,t)}}xI.exports=S6});var SI=g((hre,wI)=>{"use strict";var T6=bI(),I6=T6();wI.exports=I6});var II=g((mre,TI)=>{"use strict";function E6(t,i){var e=t.length;for(t.sort(i);e--;)t[e]=t[e].value;return t}TI.exports=E6});var MI=g((_re,PI)=>{"use strict";var EI=pi();function P6(t,i){if(t!==i){var e=t!==void 0,n=t===null,o=t===t,r=EI(t),a=i!==void 0,s=i===null,c=i===i,u=EI(i);if(!s&&!u&&!r&&t>i||r&&a&&c&&!s&&!u||n&&a&&c||!e&&c||!o)return 1;if(!n&&!r&&!u&&t<i||u&&e&&o&&!n&&!r||s&&e&&o||!a&&o||!c)return-1}return 0}PI.exports=P6});var DI=g((gre,kI)=>{"use strict";var M6=MI();function k6(t,i,e){for(var n=-1,o=t.criteria,r=i.criteria,a=o.length,s=e.length;++n<a;){var c=M6(o[n],r[n]);if(c){if(n>=s)return c;var u=e[n];return c*(u=="desc"?-1:1)}}return t.index-i.index}kI.exports=k6});var NI=g((vre,OI)=>{"use strict";var b_=Ir(),D6=Pr(),O6=Vt(),N6=Jm(),R6=II(),A6=yr(),F6=DI(),L6=Rn(),z6=Ge();function B6(t,i,e){i.length?i=b_(i,function(r){return z6(r)?function(a){return D6(a,r.length===1?r[0]:r)}:r}):i=[L6];var n=-1;i=b_(i,A6(O6));var o=N6(t,function(r,a,s){var c=b_(i,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return R6(o,function(r,a){return F6(r,a,e)})}OI.exports=B6});var FI=g((yre,AI)=>{"use strict";var q6=Wf(),G6=NI(),H6=Mr(),RI=Or(),V6=H6(function(t,i){if(t==null)return[];var e=i.length;return e>1&&RI(t,i[0],i[1])?i=[]:e>2&&RI(i[0],i[1],i[2])&&(i=[i[0]]),G6(t,q6(i,1),[])});AI.exports=V6});var zI=g((Cre,LI)=>{"use strict";var j6=Wm(),U6=0;function W6(t){var i=++U6;return j6(t)+i}LI.exports=W6});var qI=g((xre,BI)=>{"use strict";function $6(t,i,e){for(var n=-1,o=t.length,r=i.length,a={};++n<o;){var s=n<r?i[n]:void 0;e(a,t[n],s)}return a}BI.exports=$6});var HI=g((bre,GI)=>{"use strict";var K6=_r(),Y6=qI();function X6(t,i){return Y6(t||[],i||[],K6)}GI.exports=X6});var Me=g((wre,VI)=>{"use strict";var ep;if(typeof gi=="function")try{ep={cloneDeep:eT(),constant:Bf(),defaults:oT(),each:Fm(),filter:Xm(),find:bT(),flatten:g_(),forEach:Am(),forIn:TT(),has:Zm(),isUndefined:Qm(),last:ET(),map:e_(),mapValues:MT(),max:RT(),merge:eI(),min:iI(),minBy:rI(),now:sI(),pick:vI(),range:SI(),reduce:t_(),sortBy:FI(),uniqueId:zI(),values:d_(),zipObject:HI()}}catch{}ep||(ep=window._);VI.exports=ep});var WI=g((Tre,UI)=>{"use strict";UI.exports=tp;function tp(){var t={};t._next=t._prev=t,this._sentinel=t}tp.prototype.dequeue=function(){var t=this._sentinel,i=t._prev;if(i!==t)return jI(i),i};tp.prototype.enqueue=function(t){var i=this._sentinel;t._prev&&t._next&&jI(t),t._next=i._next,i._next._prev=t,i._next=t,t._prev=i};tp.prototype.toString=function(){for(var t=[],i=this._sentinel,e=i._prev;e!==i;)t.push(JSON.stringify(e,Z6)),e=e._prev;return"["+t.join(", ")+"]"};function jI(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Z6(t,i){if(t!=="_next"&&t!=="_prev")return i}});var KI=g((Ire,$I)=>{"use strict";var Jt=Me(),Q6=wt().Graph,J6=WI();$I.exports=t7;var e7=Jt.constant(1);function t7(t,i){if(t.nodeCount()<=1)return[];var e=i7(t,i||e7),n=n7(e.graph,e.buckets,e.zeroIdx);return Jt.flatten(Jt.map(n,function(o){return t.outEdges(o.v,o.w)}),!0)}function n7(t,i,e){for(var n=[],o=i[i.length-1],r=i[0],a;t.nodeCount();){for(;a=r.dequeue();)w_(t,i,e,a);for(;a=o.dequeue();)w_(t,i,e,a);if(t.nodeCount()){for(var s=i.length-2;s>0;--s)if(a=i[s].dequeue(),a){n=n.concat(w_(t,i,e,a,!0));break}}}return n}function w_(t,i,e,n,o){var r=o?[]:void 0;return Jt.forEach(t.inEdges(n.v),function(a){var s=t.edge(a),c=t.node(a.v);o&&r.push({v:a.v,w:a.w}),c.out-=s,S_(i,e,c)}),Jt.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,S_(i,e,u)}),t.removeNode(n.v),r}function i7(t,i){var e=new Q6,n=0,o=0;Jt.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Jt.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=i(s),f=c+u;e.setEdge(s.v,s.w,f),o=Math.max(o,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Jt.range(o+n+3).map(function(){return new J6}),a=n+1;return Jt.forEach(e.nodes(),function(s){S_(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function S_(t,i,e){e.out?e.in?t[e.out-e.in+i].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}});var XI=g((Ere,YI)=>{"use strict";var mi=Me(),o7=KI();YI.exports={run:r7,undo:s7};function r7(t){var i=t.graph().acyclicer==="greedy"?o7(t,e(t)):a7(t);mi.forEach(i,function(n){var o=t.edge(n);t.removeEdge(n),o.forwardName=n.name,o.reversed=!0,t.setEdge(n.w,n.v,o,mi.uniqueId("rev"))});function e(n){return function(o){return n.edge(o).weight}}}function a7(t){var i=[],e={},n={};function o(r){mi.has(n,r)||(n[r]=!0,e[r]=!0,mi.forEach(t.outEdges(r),function(a){mi.has(e,a.w)?i.push(a):o(a.w)}),delete e[r])}return mi.forEach(t.nodes(),o),i}function s7(t){mi.forEach(t.edges(),function(i){var e=t.edge(i);if(e.reversed){t.removeEdge(i);var n=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(i.w,i.v,e,n)}})}});var nt=g((Pre,eE)=>{"use strict";var pe=Me(),ZI=wt().Graph;eE.exports={addDummyNode:QI,simplify:c7,asNonCompoundGraph:d7,successorWeights:l7,predecessorWeights:u7,intersectRect:f7,buildLayerMatrix:p7,normalizeRanks:h7,removeEmptyRanks:m7,addBorderNode:_7,maxRank:JI,partition:g7,time:v7,notime:y7};function QI(t,i,e,n){var o;do o=pe.uniqueId(n);while(t.hasNode(o));return e.dummy=i,t.setNode(o,e),o}function c7(t){var i=new ZI().setGraph(t.graph());return pe.forEach(t.nodes(),function(e){i.setNode(e,t.node(e))}),pe.forEach(t.edges(),function(e){var n=i.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);i.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),i}function d7(t){var i=new ZI({multigraph:t.isMultigraph()}).setGraph(t.graph());return pe.forEach(t.nodes(),function(e){t.children(e).length||i.setNode(e,t.node(e))}),pe.forEach(t.edges(),function(e){i.setEdge(e,t.edge(e))}),i}function l7(t){var i=pe.map(t.nodes(),function(e){var n={};return pe.forEach(t.outEdges(e),function(o){n[o.w]=(n[o.w]||0)+t.edge(o).weight}),n});return pe.zipObject(t.nodes(),i)}function u7(t){var i=pe.map(t.nodes(),function(e){var n={};return pe.forEach(t.inEdges(e),function(o){n[o.v]=(n[o.v]||0)+t.edge(o).weight}),n});return pe.zipObject(t.nodes(),i)}function f7(t,i){var e=t.x,n=t.y,o=i.x-e,r=i.y-n,a=t.width/2,s=t.height/2;if(!o&&!r)throw new Error("Not possible to find intersection inside of the rectangle");var c,u;return Math.abs(r)*a>Math.abs(o)*s?(r<0&&(s=-s),c=s*o/r,u=s):(o<0&&(a=-a),c=a,u=a*r/o),{x:e+c,y:n+u}}function p7(t){var i=pe.map(pe.range(JI(t)+1),function(){return[]});return pe.forEach(t.nodes(),function(e){var n=t.node(e),o=n.rank;pe.isUndefined(o)||(i[o][n.order]=e)}),i}function h7(t){var i=pe.min(pe.map(t.nodes(),function(e){return t.node(e).rank}));pe.forEach(t.nodes(),function(e){var n=t.node(e);pe.has(n,"rank")&&(n.rank-=i)})}function m7(t){var i=pe.min(pe.map(t.nodes(),function(r){return t.node(r).rank})),e=[];pe.forEach(t.nodes(),function(r){var a=t.node(r).rank-i;e[a]||(e[a]=[]),e[a].push(r)});var n=0,o=t.graph().nodeRankFactor;pe.forEach(e,function(r,a){pe.isUndefined(r)&&a%o!==0?--n:n&&pe.forEach(r,function(s){t.node(s).rank+=n})})}function _7(t,i,e,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=e,o.order=n),QI(t,"border",o,i)}function JI(t){return pe.max(pe.map(t.nodes(),function(i){var e=t.node(i).rank;if(!pe.isUndefined(e))return e}))}function g7(t,i){var e={lhs:[],rhs:[]};return pe.forEach(t,function(n){i(n)?e.lhs.push(n):e.rhs.push(n)}),e}function v7(t,i){var e=pe.now();try{return i()}finally{console.log(t+" time: "+(pe.now()-e)+"ms")}}function y7(t,i){return i()}});var iE=g((Mre,nE)=>{"use strict";var tE=Me(),C7=nt();nE.exports={run:x7,undo:w7};function x7(t){t.graph().dummyChains=[],tE.forEach(t.edges(),function(i){b7(t,i)})}function b7(t,i){var e=i.v,n=t.node(e).rank,o=i.w,r=t.node(o).rank,a=i.name,s=t.edge(i),c=s.labelRank;if(r!==n+1){t.removeEdge(i);var u,f,m;for(m=0,++n;n<r;++m,++n)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:i,rank:n},u=C7.addDummyNode(t,"edge",f,"_d"),n===c&&(f.width=s.width,f.height=s.height,f.dummy="edge-label",f.labelpos=s.labelpos),t.setEdge(e,u,{weight:s.weight},a),m===0&&t.graph().dummyChains.push(u),e=u;t.setEdge(e,o,{weight:s.weight},a)}}function w7(t){tE.forEach(t.graph().dummyChains,function(i){var e=t.node(i),n=e.edgeLabel,o;for(t.setEdge(e.edgeObj,n);e.dummy;)o=t.successors(i)[0],t.removeNode(i),n.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(n.x=e.x,n.y=e.y,n.width=e.width,n.height=e.height),i=o,e=t.node(i)})}});var Nr=g((kre,oE)=>{"use strict";var np=Me();oE.exports={longestPath:S7,slack:T7};function S7(t){var i={};function e(n){var o=t.node(n);if(np.has(i,n))return o.rank;i[n]=!0;var r=np.min(np.map(t.outEdges(n),function(a){return e(a.w)-t.edge(a).minlen}));return(r===Number.POSITIVE_INFINITY||r===void 0||r===null)&&(r=0),o.rank=r}np.forEach(t.sources(),e)}function T7(t,i){return t.node(i.w).rank-t.node(i.v).rank-t.edge(i).minlen}});var T_=g((Dre,rE)=>{"use strict";var ip=Me(),I7=wt().Graph,op=Nr().slack;rE.exports=E7;function E7(t){var i=new I7({directed:!1}),e=t.nodes()[0],n=t.nodeCount();i.setNode(e,{});for(var o,r;P7(i,t)<n;)o=M7(i,t),r=i.hasNode(o.v)?op(t,o):-op(t,o),k7(i,t,r);return i}function P7(t,i){function e(n){ip.forEach(i.nodeEdges(n),function(o){var r=o.v,a=n===r?o.w:r;!t.hasNode(a)&&!op(i,o)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return ip.forEach(t.nodes(),e),t.nodeCount()}function M7(t,i){return ip.minBy(i.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return op(i,e)})}function k7(t,i,e){ip.forEach(t.nodes(),function(n){i.node(n).rank+=e})}});var pE=g((Ore,fE)=>{"use strict";var en=Me(),D7=T_(),O7=Nr().slack,N7=Nr().longestPath,R7=wt().alg.preorder,A7=wt().alg.postorder,F7=nt().simplify;fE.exports=_i;_i.initLowLimValues=E_;_i.initCutValues=I_;_i.calcCutValue=sE;_i.leaveEdge=dE;_i.enterEdge=lE;_i.exchangeEdges=uE;function _i(t){t=F7(t),N7(t);var i=D7(t);E_(i),I_(i,t);for(var e,n;e=dE(i);)n=lE(i,t,e),uE(i,t,e,n)}function I_(t,i){var e=A7(t,t.nodes());e=e.slice(0,e.length-1),en.forEach(e,function(n){L7(t,i,n)})}function L7(t,i,e){var n=t.node(e),o=n.parent;t.edge(e,o).cutvalue=sE(t,i,e)}function sE(t,i,e){var n=t.node(e),o=n.parent,r=!0,a=i.edge(e,o),s=0;return a||(r=!1,a=i.edge(o,e)),s=a.weight,en.forEach(i.nodeEdges(e),function(c){var u=c.v===e,f=u?c.w:c.v;if(f!==o){var m=u===r,x=i.edge(c).weight;if(s+=m?x:-x,B7(t,e,f)){var P=t.edge(e,f).cutvalue;s+=m?-P:P}}}),s}function E_(t,i){arguments.length<2&&(i=t.nodes()[0]),cE(t,{},1,i)}function cE(t,i,e,n,o){var r=e,a=t.node(n);return i[n]=!0,en.forEach(t.neighbors(n),function(s){en.has(i,s)||(e=cE(t,i,e,s,n))}),a.low=r,a.lim=e++,o?a.parent=o:delete a.parent,e}function dE(t){return en.find(t.edges(),function(i){return t.edge(i).cutvalue<0})}function lE(t,i,e){var n=e.v,o=e.w;i.hasEdge(n,o)||(n=e.w,o=e.v);var r=t.node(n),a=t.node(o),s=r,c=!1;r.lim>a.lim&&(s=a,c=!0);var u=en.filter(i.edges(),function(f){return c===aE(t,t.node(f.v),s)&&c!==aE(t,t.node(f.w),s)});return en.minBy(u,function(f){return O7(i,f)})}function uE(t,i,e,n){var o=e.v,r=e.w;t.removeEdge(o,r),t.setEdge(n.v,n.w,{}),E_(t),I_(t,i),z7(t,i)}function z7(t,i){var e=en.find(t.nodes(),function(o){return!i.node(o).parent}),n=R7(t,e);n=n.slice(1),en.forEach(n,function(o){var r=t.node(o).parent,a=i.edge(o,r),s=!1;a||(a=i.edge(r,o),s=!0),i.node(o).rank=i.node(r).rank+(s?a.minlen:-a.minlen)})}function B7(t,i,e){return t.hasEdge(i,e)}function aE(t,i,e){return e.low<=i.lim&&i.lim<=e.lim}});var gE=g((Nre,_E)=>{"use strict";var q7=Nr(),mE=q7.longestPath,G7=T_(),H7=pE();_E.exports=V7;function V7(t){switch(t.graph().ranker){case"network-simplex":hE(t);break;case"tight-tree":U7(t);break;case"longest-path":j7(t);break;default:hE(t)}}var j7=mE;function U7(t){mE(t),G7(t)}function hE(t){H7(t)}});var yE=g((Rre,vE)=>{"use strict";var P_=Me();vE.exports=W7;function W7(t){var i=K7(t);P_.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),o=n.edgeObj,r=$7(t,i,o.v,o.w),a=r.path,s=r.lca,c=0,u=a[c],f=!0;e!==o.w;){if(n=t.node(e),f){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(f=!1)}if(!f){for(;c<a.length-1&&t.node(u=a[c+1]).minRank<=n.rank;)c++;u=a[c]}t.setParent(e,u),e=t.successors(e)[0]}})}function $7(t,i,e,n){var o=[],r=[],a=Math.min(i[e].low,i[n].low),s=Math.max(i[e].lim,i[n].lim),c,u;c=e;do c=t.parent(c),o.push(c);while(c&&(i[c].low>a||s>i[c].lim));for(u=c,c=n;(c=t.parent(c))!==u;)r.push(c);return{path:o.concat(r.reverse()),lca:u}}function K7(t){var i={},e=0;function n(o){var r=e;P_.forEach(t.children(o),n),i[o]={low:r,lim:e++}}return P_.forEach(t.children(),n),i}});var bE=g((Are,xE)=>{"use strict";var tn=Me(),M_=nt();xE.exports={run:Y7,cleanup:Q7};function Y7(t){var i=M_.addDummyNode(t,"root",{},"_root"),e=X7(t),n=tn.max(tn.values(e))-1,o=2*n+1;t.graph().nestingRoot=i,tn.forEach(t.edges(),function(a){t.edge(a).minlen*=o});var r=Z7(t)+1;tn.forEach(t.children(),function(a){CE(t,i,o,r,n,e,a)}),t.graph().nodeRankFactor=o}function CE(t,i,e,n,o,r,a){var s=t.children(a);if(!s.length){a!==i&&t.setEdge(i,a,{weight:0,minlen:e});return}var c=M_.addBorderNode(t,"_bt"),u=M_.addBorderNode(t,"_bb"),f=t.node(a);t.setParent(c,a),f.borderTop=c,t.setParent(u,a),f.borderBottom=u,tn.forEach(s,function(m){CE(t,i,e,n,o,r,m);var x=t.node(m),P=x.borderTop?x.borderTop:m,E=x.borderBottom?x.borderBottom:m,N=x.borderTop?n:2*n,j=P!==E?1:o-r[a]+1;t.setEdge(c,P,{weight:N,minlen:j,nestingEdge:!0}),t.setEdge(E,u,{weight:N,minlen:j,nestingEdge:!0})}),t.parent(a)||t.setEdge(i,c,{weight:0,minlen:o+r[a]})}function X7(t){var i={};function e(n,o){var r=t.children(n);r&&r.length&&tn.forEach(r,function(a){e(a,o+1)}),i[n]=o}return tn.forEach(t.children(),function(n){e(n,1)}),i}function Z7(t){return tn.reduce(t.edges(),function(i,e){return i+t.edge(e).weight},0)}function Q7(t){var i=t.graph();t.removeNode(i.nestingRoot),delete i.nestingRoot,tn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var TE=g((Fre,SE)=>{"use strict";var k_=Me(),J7=nt();SE.exports=eK;function eK(t){function i(e){var n=t.children(e),o=t.node(e);if(n.length&&k_.forEach(n,i),k_.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var r=o.minRank,a=o.maxRank+1;r<a;++r)wE(t,"borderLeft","_bl",e,o,r),wE(t,"borderRight","_br",e,o,r)}}k_.forEach(t.children(),i)}function wE(t,i,e,n,o,r){var a={width:0,height:0,rank:r,borderType:i},s=o[i][r-1],c=J7.addDummyNode(t,"border",a,e);o[i][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var ME=g((Lre,PE)=>{"use strict";var Ut=Me();PE.exports={adjust:tK,undo:nK};function tK(t){var i=t.graph().rankdir.toLowerCase();(i==="lr"||i==="rl")&&EE(t)}function nK(t){var i=t.graph().rankdir.toLowerCase();(i==="bt"||i==="rl")&&iK(t),(i==="lr"||i==="rl")&&(oK(t),EE(t))}function EE(t){Ut.forEach(t.nodes(),function(i){IE(t.node(i))}),Ut.forEach(t.edges(),function(i){IE(t.edge(i))})}function IE(t){var i=t.width;t.width=t.height,t.height=i}function iK(t){Ut.forEach(t.nodes(),function(i){D_(t.node(i))}),Ut.forEach(t.edges(),function(i){var e=t.edge(i);Ut.forEach(e.points,D_),Ut.has(e,"y")&&D_(e)})}function D_(t){t.y=-t.y}function oK(t){Ut.forEach(t.nodes(),function(i){O_(t.node(i))}),Ut.forEach(t.edges(),function(i){var e=t.edge(i);Ut.forEach(e.points,O_),Ut.has(e,"x")&&O_(e)})}function O_(t){var i=t.x;t.x=t.y,t.y=i}});var DE=g((zre,kE)=>{"use strict";var nn=Me();kE.exports=rK;function rK(t){var i={},e=nn.filter(t.nodes(),function(s){return!t.children(s).length}),n=nn.max(nn.map(e,function(s){return t.node(s).rank})),o=nn.map(nn.range(n+1),function(){return[]});function r(s){if(!nn.has(i,s)){i[s]=!0;var c=t.node(s);o[c.rank].push(s),nn.forEach(t.successors(s),r)}}var a=nn.sortBy(e,function(s){return t.node(s).rank});return nn.forEach(a,r),o}});var NE=g((Bre,OE)=>{"use strict";var An=Me();OE.exports=aK;function aK(t,i){for(var e=0,n=1;n<i.length;++n)e+=sK(t,i[n-1],i[n]);return e}function sK(t,i,e){for(var n=An.zipObject(e,An.map(e,function(u,f){return f})),o=An.flatten(An.map(i,function(u){return An.sortBy(An.map(t.outEdges(u),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")}),!0),r=1;r<e.length;)r<<=1;var a=2*r-1;r-=1;var s=An.map(new Array(a),function(){return 0}),c=0;return An.forEach(o.forEach(function(u){var f=u.pos+r;s[f]+=u.weight;for(var m=0;f>0;)f%2&&(m+=s[f+1]),f=f-1>>1,s[f]+=u.weight;c+=u.weight*m})),c}});var FE=g((qre,AE)=>{"use strict";var RE=Me();AE.exports=cK;function cK(t,i){return RE.map(i,function(e){var n=t.inEdges(e);if(n.length){var o=RE.reduce(n,function(r,a){var s=t.edge(a),c=t.node(a.v);return{sum:r.sum+s.weight*c.order,weight:r.weight+s.weight}},{sum:0,weight:0});return{v:e,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:e}})}});var zE=g((Gre,LE)=>{"use strict";var ht=Me();LE.exports=dK;function dK(t,i){var e={};ht.forEach(t,function(o,r){var a=e[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:r};ht.isUndefined(o.barycenter)||(a.barycenter=o.barycenter,a.weight=o.weight)}),ht.forEach(i.edges(),function(o){var r=e[o.v],a=e[o.w];!ht.isUndefined(r)&&!ht.isUndefined(a)&&(a.indegree++,r.out.push(e[o.w]))});var n=ht.filter(e,function(o){return!o.indegree});return lK(n)}function lK(t){var i=[];function e(r){return function(a){a.merged||(ht.isUndefined(a.barycenter)||ht.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&uK(r,a)}}function n(r){return function(a){a.in.push(r),--a.indegree===0&&t.push(a)}}for(;t.length;){var o=t.pop();i.push(o),ht.forEach(o.in.reverse(),e(o)),ht.forEach(o.out,n(o))}return ht.map(ht.filter(i,function(r){return!r.merged}),function(r){return ht.pick(r,["vs","i","barycenter","weight"])})}function uK(t,i){var e=0,n=0;t.weight&&(e+=t.barycenter*t.weight,n+=t.weight),i.weight&&(e+=i.barycenter*i.weight,n+=i.weight),t.vs=i.vs.concat(t.vs),t.barycenter=e/n,t.weight=n,t.i=Math.min(i.i,t.i),i.merged=!0}});var GE=g((Hre,qE)=>{"use strict";var Rr=Me(),fK=nt();qE.exports=pK;function pK(t,i){var e=fK.partition(t,function(f){return Rr.has(f,"barycenter")}),n=e.lhs,o=Rr.sortBy(e.rhs,function(f){return-f.i}),r=[],a=0,s=0,c=0;n.sort(hK(!!i)),c=BE(r,o,c),Rr.forEach(n,function(f){c+=f.vs.length,r.push(f.vs),a+=f.barycenter*f.weight,s+=f.weight,c=BE(r,o,c)});var u={vs:Rr.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function BE(t,i,e){for(var n;i.length&&(n=Rr.last(i)).i<=e;)i.pop(),t.push(n.vs),e++;return e}function hK(t){return function(i,e){return i.barycenter<e.barycenter?-1:i.barycenter>e.barycenter?1:t?e.i-i.i:i.i-e.i}}});var jE=g((Vre,VE)=>{"use strict";var Fn=Me(),mK=FE(),_K=zE(),gK=GE();VE.exports=HE;function HE(t,i,e,n){var o=t.children(i),r=t.node(i),a=r?r.borderLeft:void 0,s=r?r.borderRight:void 0,c={};a&&(o=Fn.filter(o,function(E){return E!==a&&E!==s}));var u=mK(t,o);Fn.forEach(u,function(E){if(t.children(E.v).length){var N=HE(t,E.v,e,n);c[E.v]=N,Fn.has(N,"barycenter")&&yK(E,N)}});var f=_K(u,e);vK(f,c);var m=gK(f,n);if(a&&(m.vs=Fn.flatten([a,m.vs,s],!0),t.predecessors(a).length)){var x=t.node(t.predecessors(a)[0]),P=t.node(t.predecessors(s)[0]);Fn.has(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+x.order+P.order)/(m.weight+2),m.weight+=2}return m}function vK(t,i){Fn.forEach(t,function(e){e.vs=Fn.flatten(e.vs.map(function(n){return i[n]?i[n].vs:n}),!0)})}function yK(t,i){Fn.isUndefined(t.barycenter)?(t.barycenter=i.barycenter,t.weight=i.weight):(t.barycenter=(t.barycenter*t.weight+i.barycenter*i.weight)/(t.weight+i.weight),t.weight+=i.weight)}});var WE=g((jre,UE)=>{"use strict";var Ar=Me(),CK=wt().Graph;UE.exports=xK;function xK(t,i,e){var n=bK(t),o=new CK({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Ar.forEach(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===i||a.minRank<=i&&i<=a.maxRank)&&(o.setNode(r),o.setParent(r,s||n),Ar.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,f=o.edge(u,r),m=Ar.isUndefined(f)?0:f.weight;o.setEdge(u,r,{weight:t.edge(c).weight+m})}),Ar.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[i],borderRight:a.borderRight[i]}))}),o}function bK(t){for(var i;t.hasNode(i=Ar.uniqueId("_root")););return i}});var KE=g((Ure,$E)=>{"use strict";var wK=Me();$E.exports=SK;function SK(t,i,e){var n={},o;wK.forEach(e,function(r){for(var a=t.parent(r),s,c;a;){if(s=t.parent(a),s?(c=n[s],n[s]=a):(c=o,o=a),c&&c!==a){i.setEdge(c,a);return}a=s}})}});var JE=g((Wre,QE)=>{"use strict";var Ln=Me(),TK=DE(),IK=NE(),EK=jE(),PK=WE(),MK=KE(),kK=wt().Graph,YE=nt();QE.exports=DK;function DK(t){var i=YE.maxRank(t),e=XE(t,Ln.range(1,i+1),"inEdges"),n=XE(t,Ln.range(i-1,-1,-1),"outEdges"),o=TK(t);ZE(t,o);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){OK(s%2?e:n,s%4>=2),o=YE.buildLayerMatrix(t);var u=IK(t,o);u<r&&(c=0,a=Ln.cloneDeep(o),r=u)}ZE(t,a)}function XE(t,i,e){return Ln.map(i,function(n){return PK(t,n,e)})}function OK(t,i){var e=new kK;Ln.forEach(t,function(n){var o=n.graph().root,r=EK(n,o,e,i);Ln.forEach(r.vs,function(a,s){n.node(a).order=s}),MK(n,e,r.vs)})}function ZE(t,i){Ln.forEach(i,function(e){Ln.forEach(e,function(n,o){t.node(n).order=o})})}});var dP=g(($re,cP)=>{"use strict";var te=Me(),NK=wt().Graph,RK=nt();cP.exports={positionX:LK,findType1Conflicts:eP,findType2Conflicts:tP,addConflict:N_,hasConflict:nP,verticalAlignment:iP,horizontalCompaction:oP,alignCoordinates:aP,findSmallestWidthAlignment:rP,balance:sP};function eP(t,i){var e={};function n(o,r){var a=0,s=0,c=o.length,u=te.last(r);return te.forEach(r,function(f,m){var x=AK(t,f),P=x?t.node(x).order:c;(x||f===u)&&(te.forEach(r.slice(s,m+1),function(E){te.forEach(t.predecessors(E),function(N){var j=t.node(N),L=j.order;(L<a||P<L)&&!(j.dummy&&t.node(E).dummy)&&N_(e,N,E)})}),s=m+1,a=P)}),r}return te.reduce(i,n),e}function tP(t,i){var e={};function n(r,a,s,c,u){var f;te.forEach(te.range(a,s),function(m){f=r[m],t.node(f).dummy&&te.forEach(t.predecessors(f),function(x){var P=t.node(x);P.dummy&&(P.order<c||P.order>u)&&N_(e,x,f)})})}function o(r,a){var s=-1,c,u=0;return te.forEach(a,function(f,m){if(t.node(f).dummy==="border"){var x=t.predecessors(f);x.length&&(c=t.node(x[0]).order,n(a,u,m,s,c),u=m,s=c)}n(a,u,a.length,c,r.length)}),a}return te.reduce(i,o),e}function AK(t,i){if(t.node(i).dummy)return te.find(t.predecessors(i),function(e){return t.node(e).dummy})}function N_(t,i,e){if(i>e){var n=i;i=e,e=n}var o=t[i];o||(t[i]=o={}),o[e]=!0}function nP(t,i,e){if(i>e){var n=i;i=e,e=n}return te.has(t[i],e)}function iP(t,i,e,n){var o={},r={},a={};return te.forEach(i,function(s){te.forEach(s,function(c,u){o[c]=c,r[c]=c,a[c]=u})}),te.forEach(i,function(s){var c=-1;te.forEach(s,function(u){var f=n(u);if(f.length){f=te.sortBy(f,function(N){return a[N]});for(var m=(f.length-1)/2,x=Math.floor(m),P=Math.ceil(m);x<=P;++x){var E=f[x];r[u]===u&&c<a[E]&&!nP(e,u,E)&&(r[E]=u,r[u]=o[u]=o[E],c=a[E])}}})}),{root:o,align:r}}function oP(t,i,e,n,o){var r={},a=FK(t,i,e,o),s=o?"borderLeft":"borderRight";function c(m,x){for(var P=a.nodes(),E=P.pop(),N={};E;)N[E]?m(E):(N[E]=!0,P.push(E),P=P.concat(x(E))),E=P.pop()}function u(m){r[m]=a.inEdges(m).reduce(function(x,P){return Math.max(x,r[P.v]+a.edge(P))},0)}function f(m){var x=a.outEdges(m).reduce(function(E,N){return Math.min(E,r[N.w]-a.edge(N))},Number.POSITIVE_INFINITY),P=t.node(m);x!==Number.POSITIVE_INFINITY&&P.borderType!==s&&(r[m]=Math.max(r[m],x))}return c(u,a.predecessors.bind(a)),c(f,a.successors.bind(a)),te.forEach(n,function(m){r[m]=r[e[m]]}),r}function FK(t,i,e,n){var o=new NK,r=t.graph(),a=zK(r.nodesep,r.edgesep,n);return te.forEach(i,function(s){var c;te.forEach(s,function(u){var f=e[u];if(o.setNode(f),c){var m=e[c],x=o.edge(m,f);o.setEdge(m,f,Math.max(a(t,u,c),x||0))}c=u})}),o}function rP(t,i){return te.minBy(te.values(i),function(e){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return te.forIn(e,function(r,a){var s=BK(t,a)/2;n=Math.max(r+s,n),o=Math.min(r-s,o)}),n-o})}function aP(t,i){var e=te.values(i),n=te.min(e),o=te.max(e);te.forEach(["u","d"],function(r){te.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==i){var f=te.values(c);u=a==="l"?n-te.min(f):o-te.max(f),u&&(t[s]=te.mapValues(c,function(m){return m+u}))}})})}function sP(t,i){return te.mapValues(t.ul,function(e,n){if(i)return t[i.toLowerCase()][n];var o=te.sortBy(te.map(t,n));return(o[1]+o[2])/2})}function LK(t){var i=RK.buildLayerMatrix(t),e=te.merge(eP(t,i),tP(t,i)),n={},o;te.forEach(["u","d"],function(a){o=a==="u"?i:te.values(i).reverse(),te.forEach(["l","r"],function(s){s==="r"&&(o=te.map(o,function(m){return te.values(m).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=iP(t,o,e,c),f=oP(t,o,u.root,u.align,s==="r");s==="r"&&(f=te.mapValues(f,function(m){return-m})),n[a+s]=f})});var r=rP(t,n);return aP(n,r),sP(n,t.graph().align)}function zK(t,i,e){return function(n,o,r){var a=n.node(o),s=n.node(r),c=0,u;if(c+=a.width/2,te.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(c+=e?u:-u),u=0,c+=(a.dummy?i:t)/2,c+=(s.dummy?i:t)/2,c+=s.width/2,te.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(c+=e?u:-u),u=0,c}}function BK(t,i){return t.node(i).width}});var fP=g((Kre,uP)=>{"use strict";var Fr=Me(),lP=nt(),qK=dP().positionX;uP.exports=GK;function GK(t){t=lP.asNonCompoundGraph(t),HK(t),Fr.forEach(qK(t),function(i,e){t.node(e).x=i})}function HK(t){var i=lP.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Fr.forEach(i,function(o){var r=Fr.max(Fr.map(o,function(a){return t.node(a).height}));Fr.forEach(o,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var vP=g((Yre,gP)=>{"use strict";var re=Me(),pP=XI(),hP=iE(),VK=gE(),jK=nt().normalizeRanks,UK=yE(),WK=nt().removeEmptyRanks,mP=bE(),$K=TE(),_P=ME(),KK=JE(),YK=fP(),zn=nt(),XK=wt().Graph;gP.exports=ZK;function ZK(t,i){var e=i&&i.debugTiming?zn.time:zn.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return cY(t)});e(" runLayout",function(){QK(n,e)}),e(" updateInputGraph",function(){JK(t,n)})})}function QK(t,i){i(" makeSpaceForEdgeLabels",function(){dY(t)}),i(" removeSelfEdges",function(){vY(t)}),i(" acyclic",function(){pP.run(t)}),i(" nestingGraph.run",function(){mP.run(t)}),i(" rank",function(){VK(zn.asNonCompoundGraph(t))}),i(" injectEdgeLabelProxies",function(){lY(t)}),i(" removeEmptyRanks",function(){WK(t)}),i(" nestingGraph.cleanup",function(){mP.cleanup(t)}),i(" normalizeRanks",function(){jK(t)}),i(" assignRankMinMax",function(){uY(t)}),i(" removeEdgeLabelProxies",function(){fY(t)}),i(" normalize.run",function(){hP.run(t)}),i(" parentDummyChains",function(){UK(t)}),i(" addBorderSegments",function(){$K(t)}),i(" order",function(){KK(t)}),i(" insertSelfEdges",function(){yY(t)}),i(" adjustCoordinateSystem",function(){_P.adjust(t)}),i(" position",function(){YK(t)}),i(" positionSelfEdges",function(){CY(t)}),i(" removeBorderNodes",function(){gY(t)}),i(" normalize.undo",function(){hP.undo(t)}),i(" fixupEdgeLabelCoords",function(){mY(t)}),i(" undoCoordinateSystem",function(){_P.undo(t)}),i(" translateGraph",function(){pY(t)}),i(" assignNodeIntersects",function(){hY(t)}),i(" reversePoints",function(){_Y(t)}),i(" acyclic.undo",function(){pP.undo(t)})}function JK(t,i){re.forEach(t.nodes(),function(e){var n=t.node(e),o=i.node(e);n&&(n.x=o.x,n.y=o.y,i.children(e).length&&(n.width=o.width,n.height=o.height))}),re.forEach(t.edges(),function(e){var n=t.edge(e),o=i.edge(e);n.points=o.points,re.has(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=i.graph().width,t.graph().height=i.graph().height}var eY=["nodesep","edgesep","ranksep","marginx","marginy"],tY={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},nY=["acyclicer","ranker","rankdir","align"],iY=["width","height"],oY={width:0,height:0},rY=["minlen","weight","width","height","labeloffset"],aY={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},sY=["labelpos"];function cY(t){var i=new XK({multigraph:!0,compound:!0}),e=A_(t.graph());return i.setGraph(re.merge({},tY,R_(e,eY),re.pick(e,nY))),re.forEach(t.nodes(),function(n){var o=A_(t.node(n));i.setNode(n,re.defaults(R_(o,iY),oY)),i.setParent(n,t.parent(n))}),re.forEach(t.edges(),function(n){var o=A_(t.edge(n));i.setEdge(n,re.merge({},aY,R_(o,rY),re.pick(o,sY)))}),i}function dY(t){var i=t.graph();i.ranksep/=2,re.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function lY(t){re.forEach(t.edges(),function(i){var e=t.edge(i);if(e.width&&e.height){var n=t.node(i.v),o=t.node(i.w),r={rank:(o.rank-n.rank)/2+n.rank,e:i};zn.addDummyNode(t,"edge-proxy",r,"_ep")}})}function uY(t){var i=0;re.forEach(t.nodes(),function(e){var n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,i=re.max(i,n.maxRank))}),t.graph().maxRank=i}function fY(t){re.forEach(t.nodes(),function(i){var e=t.node(i);e.dummy==="edge-proxy"&&(t.edge(e.e).labelRank=e.rank,t.removeNode(i))})}function pY(t){var i=Number.POSITIVE_INFINITY,e=0,n=Number.POSITIVE_INFINITY,o=0,r=t.graph(),a=r.marginx||0,s=r.marginy||0;function c(u){var f=u.x,m=u.y,x=u.width,P=u.height;i=Math.min(i,f-x/2),e=Math.max(e,f+x/2),n=Math.min(n,m-P/2),o=Math.max(o,m+P/2)}re.forEach(t.nodes(),function(u){c(t.node(u))}),re.forEach(t.edges(),function(u){var f=t.edge(u);re.has(f,"x")&&c(f)}),i-=a,n-=s,re.forEach(t.nodes(),function(u){var f=t.node(u);f.x-=i,f.y-=n}),re.forEach(t.edges(),function(u){var f=t.edge(u);re.forEach(f.points,function(m){m.x-=i,m.y-=n}),re.has(f,"x")&&(f.x-=i),re.has(f,"y")&&(f.y-=n)}),r.width=e-i+a,r.height=o-n+s}function hY(t){re.forEach(t.edges(),function(i){var e=t.edge(i),n=t.node(i.v),o=t.node(i.w),r,a;e.points?(r=e.points[0],a=e.points[e.points.length-1]):(e.points=[],r=o,a=n),e.points.unshift(zn.intersectRect(n,r)),e.points.push(zn.intersectRect(o,a))})}function mY(t){re.forEach(t.edges(),function(i){var e=t.edge(i);if(re.has(e,"x"))switch((e.labelpos==="l"||e.labelpos==="r")&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset;break}})}function _Y(t){re.forEach(t.edges(),function(i){var e=t.edge(i);e.reversed&&e.points.reverse()})}function gY(t){re.forEach(t.nodes(),function(i){if(t.children(i).length){var e=t.node(i),n=t.node(e.borderTop),o=t.node(e.borderBottom),r=t.node(re.last(e.borderLeft)),a=t.node(re.last(e.borderRight));e.width=Math.abs(a.x-r.x),e.height=Math.abs(o.y-n.y),e.x=r.x+e.width/2,e.y=n.y+e.height/2}}),re.forEach(t.nodes(),function(i){t.node(i).dummy==="border"&&t.removeNode(i)})}function vY(t){re.forEach(t.edges(),function(i){if(i.v===i.w){var e=t.node(i.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:i,label:t.edge(i)}),t.removeEdge(i)}})}function yY(t){var i=zn.buildLayerMatrix(t);re.forEach(i,function(e){var n=0;re.forEach(e,function(o,r){var a=t.node(o);a.order=r+n,re.forEach(a.selfEdges,function(s){zn.addDummyNode(t,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:r+ ++n,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function CY(t){re.forEach(t.nodes(),function(i){var e=t.node(i);if(e.dummy==="selfedge"){var n=t.node(e.e.v),o=n.x+n.width/2,r=n.y,a=e.x-o,s=n.height/2;t.setEdge(e.e,e.label),t.removeNode(i),e.label.points=[{x:o+2*a/3,y:r-s},{x:o+5*a/6,y:r-s},{x:o+a,y:r},{x:o+5*a/6,y:r+s},{x:o+2*a/3,y:r+s}],e.label.x=e.x,e.label.y=e.y}})}function R_(t,i){return re.mapValues(re.pick(t,i),Number)}function A_(t){var i={};return re.forEach(t,function(e,n){i[n.toLowerCase()]=e}),i}});var CP=g((Xre,yP)=>{"use strict";var rp=Me(),xY=nt(),bY=wt().Graph;yP.exports={debugOrdering:wY};function wY(t){var i=xY.buildLayerMatrix(t),e=new bY({compound:!0,multigraph:!0}).setGraph({});return rp.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),rp.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),rp.forEach(i,function(n,o){var r="layer"+o;e.setNode(r,{rank:"same"}),rp.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var bP=g((Zre,xP)=>{"use strict";xP.exports="0.8.5"});var SP=g((Qre,wP)=>{"use strict";wP.exports={graphlib:wt(),layout:vP(),debug:CP(),util:{time:nt().time,notime:nt().notime},version:bP()}});var Kn=class{constructor(i,e,n,o,r){this.center=i,this.radiusX=e,this.radiusY=n,this.startAngle=o,this.endAngle=r}},A=class t{static castToPoint(i){return i||t.initialize()}static initialize(i=0,e=0){return{x:i,y:e}}static copy(i){return t.initialize(i.x,i.y)}static isEqual(i,e){return i.x===e.x&&i.y===e.y}static sum(i,e){return{x:i.x+e.x,y:i.y+e.y}}static sub(i,e){return{x:i.x-e.x,y:i.y-e.y}}static div(i,e){return{x:i.x/e,y:i.y/e}}static mult(i,e){return{x:i.x*e,y:i.y*e}}static interpolatePoints(i,e,n){let o=1-n;return t.initialize(i.x*o+e.x*n,i.y*o+e.y*n)}static roundTo(i,e){let n=Math.trunc(i.x/e),o=Math.trunc(i.y/e);return{x:n*e,y:o*e}}static hypotenuse(i,e){let n=e.x-i.x,o=e.y-i.y;return Math.abs(Math.sqrt(n*n+o*o))}static distance(i,e){let n=i.x-e.x,o=i.y-e.y;return Math.sqrt(n*n+o*o)}static getMinimum(i,e){return t.initialize(Math.min(i.x,e.x),Math.min(i.y,e.y))}static getMaximum(i,e){return t.initialize(Math.max(i.x,e.x),Math.max(i.y,e.y))}static matrixTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getScreenCTM();if(o){let r=e.createSVGPoint();r.x=i.x,r.y=i.y,n=r.matrixTransform(o.inverse())}return n}static elementTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getBoundingClientRect();return n=t.sub(n,t.initialize(o.left,o.top)),n}},Z=class t{constructor(i=0,e=0){this.x=i,this.y=e}static fromPoint(i){return new t(i.x,i.y)}add(i){let e=A.sum(this,i);return t.fromPoint(e)}sub(i){let e=A.sub(this,i);return t.fromPoint(e)}subNumber(i){let e=A.sub(this,new t(i,i));return t.fromPoint(e)}div(i){let e=A.div(this,i);return t.fromPoint(e)}mult(i){let e=A.mult(this,i);return t.fromPoint(e)}matrixTransform(i){let e=A.matrixTransform(this,i);return t.fromPoint(e)}elementTransform(i){let e=A.elementTransform(this,i);return t.fromPoint(e)}},Co=class{static initialize(i=A.initialize(),e=A.initialize()){return{point1:i,point2:e}}static copy(i){return{point1:i.point1,point2:i.point2}}static hypotenuse(i){return Math.sqrt(Math.pow(i.point1.x-i.point2.x,2)+Math.pow(i.point1.y-i.point2.y,2))}},Yn=class{constructor(i,e){this.point1=i,this.point2=e}},V=class t{static initialize(i=0,e=0,n=0,o=0){n<0&&(i=i+n,n=-n),o<0&&(e=e+o,o=-o);let r=A.initialize(i+n/2,e+o/2);return{x:i,y:e,width:n,height:o,gravityCenter:r}}static copy(i){return t.initialize(i.x,i.y,i.width,i.height)}static fromElement(i){let{x:e,y:n,width:o,height:r}=i.getBoundingClientRect();return t.initialize(e,n,o,r)}static isIncludePoint(i,e){return e.x>=t.left(i)&&e.x<=t.right(i)&&e.y>=t.top(i)&&e.y<=t.bottom(i)}static intersectionWithRect(i,e){return!(i.x+i.width<e.x||e.x+e.width<i.x||i.y+i.height<e.y||e.y+e.height<i.y)}static left(i){return i.x}static top(i){return i.y}static right(i){return i.x+i.width}static bottom(i){return i.y+i.height}static addPoint(i,e){let n=t.copy(i);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(i,e){let n=t.copy(i);return n.x*=e,n.y*=e,n.width*=e,n.height*=e,this.initialize(n.x,n.y,n.width,n.height)}static div(i,e){let n=t.copy(i);return n.x/=e,n.y/=e,n.width/=e,n.height/=e,this.initialize(n.x,n.y,n.width,n.height)}static addPointToSize(i,e){let n=t.copy(i);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(i){return!i||i.length===0?null:i.reduce((e,n)=>{let o=Math.min(e.x,n.x),r=Math.min(e.y,n.y),a=Math.max(e.x+e.width,n.x+n.width),s=Math.max(e.y+e.height,n.y+n.height);return t.initialize(o,r,a-o,s-r)},i[0])}static elementTransform(i,e){let n=e.getBoundingClientRect(),o=A.sub(i,A.initialize(n.left,n.top));return t.initialize(o.x,o.y,i.width,i.height)}static updateIsNotFinite(i){return!Number.isFinite(i.width)||!Number.isFinite(i.height)||!Number.isFinite(i.x)||!Number.isFinite(i.y)?t.initialize(0,0,0,0):i}};function Xg(t,i){let e=Math.max(t.width,i),n=Math.max(t.height,i),o=(e-t.width)/2,r=(n-t.height)/2;return V.initialize(t.x-o,t.y-r,e,n)}function Np(t,i){t=V.updateIsNotFinite(t),i.setAttribute("x",t.x.toString()),i.setAttribute("y",t.y.toString()),i.setAttribute("width",t.width.toString()),i.setAttribute("height",t.height.toString())}function Zg(t,i){t=V.updateIsNotFinite(t),i.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var Le=class t{constructor(i=0,e=0,n=0,o=0,r=0,a=0,s=0,c=0){this.x=i,this.y=e,this.width=n,this.height=o,this.radius1=r,this.radius2=a,this.radius3=s,this.radius4=c,this.gravityCenter=A.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(i){return new Z(i.x+i.width/2,i.y+i.height/2)}static fromRect(i){return new t(i.x,i.y,i.width,i.height)}static fromRoundedRect(i){return new t(i.x,i.y,i.width,i.height,i.radius1,i.radius2,i.radius3,i.radius4)}static fromCenter(i,e,n){return new t(i.gravityCenter.x-e/2,i.gravityCenter.y-n/2,e,n,i.radius1,i.radius2,i.radius3,i.radius4)}static fromPoint(i){return new t(i.x,i.y)}addPoint(i){let e=t.fromRoundedRect(this);return e.x+=i.x,e.y+=i.y,e.gravityCenter=this.calculateGravityCenter(e),e}},et=class t{static initialize(i=0,e=0){return{width:i,height:e}}static isEqual(i,e){return i.width===e.width&&i.height===e.height}static offsetFromElement(i){if(i instanceof SVGGraphicsElement){let e=i.getBBox();return t.initialize(e.width,e.height)}else if(i instanceof HTMLElement)return t.initialize(i.offsetWidth,i.offsetHeight)}};function nk(){return{position:A.initialize(),scaledPosition:A.initialize(),scale:1,rotate:0}}function ik(t){let i;if(t){t=t.replace("matrix(",""),t=t.replace(")","");let e=t.split(" ");i={position:{x:Number(e[4]),y:Number(e[5])},scaledPosition:A.initialize(),scale:Number(e[0]),rotate:0}}return i}var vn=class{static toString(i){let e=A.sum(i.position,i.scaledPosition);return`matrix(${i.scale}, 0, 0, ${i.scale}, ${e.x}, ${e.y})`}static fromString(i){return ik(i)}static default(){return nk()}},ot=class t{static initialize(i=0,e=0){return A.initialize(i,e)}static fromPoints(i,e){return t.initialize(e.x-i.x,e.y-i.y)}static vectorLength(i){return Math.sqrt(t.magnitudeSquared(i))}static magnitudeSquared(i){return i.x*i.x+i.y*i.y}static dotProduct(i,e){return i.x*e.x+i.y*e.y}static crossProduct(i,e){return i.x*e.y-i.y*e.x}static subtract(i,e){return t.initialize(i.x-e.x,i.y-e.y)}static add(i,e){return t.initialize(i.x+e.x,i.y+e.y)}static scale(i,e){return t.initialize(i.x*e,i.y*e)}static angle(i,e){let n=Math.acos(Math.max(-1,Math.min(t.dotProduct(i,e)/(t.vectorLength(i)*t.vectorLength(e)),1)));return t.crossProduct(i,e)<0?-n:n}},Op=class{static parseRoundedRect(i){let e=Math.PI*.5,n=i.x,o=i.y,r=i.x+i.width,a=i.y+i.height,s=i.x+i.radius1,c=i.y+i.radius1,u=i.x+i.width-i.radius2,f=i.y+i.radius2,m=i.x+i.width-i.radius3,x=i.y+i.height-i.radius3,P=i.x+i.radius4,E=i.y+i.height-i.radius4;return[new Kn({x:s,y:c},i.radius1,i.radius1,2*e,3*e),new Yn({x:s,y:o},{x:u,y:o}),new Kn({x:u,y:f},i.radius2,i.radius2,3*e,4*e),new Yn({x:r,y:f},{x:r,y:x}),new Kn({x:m,y:x},i.radius3,i.radius3,0,e),new Yn({x:m,y:a},{x:P,y:a}),new Kn({x:P,y:E},i.radius4,i.radius4,e,2*e),new Yn({x:n,y:E},{x:n,y:c})]}},Pi=class{static getRoundedRectIntersections(i,e,n){let o=Op.parseRoundedRect(n);for(let r of o)if(r instanceof Kn){let a=this.intersectArcWithLine(r,i,e);if(a.length>0)return a}else if(r instanceof Yn){let a=this.intersectLineSegments(i,e,r.point1,r.point2);if(a)return[a]}return[]}static getRoundedRectIntersectionsWithSVGPath(i,e){let n=i.getTotalLength(),o=[];for(let r=0;r<=n;r+=1){let a=i.getPointAtLength(r);o.push({x:a.x,y:a.y})}for(let r=1;r<o.length;r++){let a=this.getRoundedRectIntersections(o[r-1],o[r],e);if(a.length>0)return a}return[]}static intersectArcWithLine(i,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(i.center,i.radiusX,i.radiusY,e,n),i)}static intersectLineSegments(i,e,n,o){let r=e.x-i.x,a=e.y-i.y,s=o.x-n.x,c=o.y-n.y,u=(-a*(i.x-n.x)+r*(i.y-n.y))/(-s*a+r*c),f=(s*(i.y-n.y)-c*(i.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&f>=0&&f<=1?{x:i.x+f*r,y:i.y+f*a}:null}static filterPointsWithinArc(i,e){let{center:n,startAngle:o,endAngle:r}=e;if(i.length===0)return i;r<o&&([o,r]=[r,o]),(o<0||r<0)&&(o+=2*Math.PI,r+=2*Math.PI);let a=[];for(let s of i){let c=this.normalizeAngle(ot.angle(ot.initialize(1,0),ot.initialize(s.x-n.x,s.y-n.y)));c<o&&(c+=2*Math.PI),o<=c&&c<=r&&a.push(s)}return a}static normalizeAngle(i){let e=i%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(i,e,n,o,r){let a=ot.initialize(o.x,o.y),s=ot.fromPoints(o,r),c=ot.initialize(i.x,i.y),u=ot.subtract(a,c),f=ot.initialize(s.x/(e*e),s.y/(n*n)),m=ot.initialize(u.x/(e*e),u.y/(n*n)),x=ot.dotProduct(s,f),P=ot.dotProduct(s,m),E=ot.dotProduct(u,m)-1,N=P*P-x*E;return N<0?[]:this.calculateIntersectionPoints(N,x,P,o,r)}static calculateIntersectionPoints(i,e,n,o,r){let a=[];if(i>0){let s=Math.sqrt(i),c=(-n-s)/e,u=(-n+s)/e;c>=0&&c<=1&&a.push(A.interpolatePoints(o,r,c)),u>=0&&u<=1&&a.push(A.interpolatePoints(o,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(A.interpolatePoints(o,r,s))}return a}};var Rp=class{handle(i,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(i)),!!n)return e.get(this.execution).handle(i)}execute(i,e){return e.get(this.execution).handle(i)}setValidator(i){this.validator=i}setExecution(i){this.execution=i}},D=class t{constructor(){this._injector=l(Ye)}static registerPipeline(i,e,n){if(!i||!i.fToken)throw new Error("Type must have a fToken static property.");let o=this.pipelines.get(i.fToken)||new Rp;n?o.setValidator(e):o.setExecution(e),this.pipelines.set(i.fToken,o)}send(i){let e=t.pipelines.get(i.constructor.fToken);if(e)return e.handle(i,this._injector);throw new Error("Handler not registered for request type.")}execute(i){return t.pipelines.get(i.constructor.fToken).execute(i,this._injector)}};D.pipelines=new Map;D.\u0275fac=function(i){return new(i||D)};D.\u0275prov=y({token:D,factory:D.\u0275fac});function w(t){return function(i){D.registerPipeline(t,i,!1)}}var ok=(()=>{class t{setItem(e,n){localStorage.setItem(e,n)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),rk=(()=>{class t{storage={};setItem(e,n){this.storage[e]=n}getItem(e){return this.storage[e]||null}removeItem(e){delete this.storage[e]}clear(){this.storage={}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ak=new ue("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>an(l(Hr))?l(ok):l(rk)}),sk=(()=>{class t{getComputedStyle(e){return window.getComputedStyle(e)}get innerWidth(){return window.innerWidth}get innerHeight(){return window.innerHeight}get pageXOffset(){return window.pageXOffset}get pageYOffset(){return window.pageYOffset}isMediaQuery(e){return window.matchMedia(e).matches}requestAnimationFrame(e){return window.requestAnimationFrame(e)}get location(){return window.location}open(e,n,o){window.open(e,n,o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ck=(()=>{class t{getComputedStyle(e){return new Proxy({getPropertyValue:n=>"0"},{get:(n,o)=>o==="getPropertyValue"?n.getPropertyValue:"0"})}get innerWidth(){return 0}get innerHeight(){return 0}get pageXOffset(){return 0}get pageYOffset(){return 0}isMediaQuery(e){return!1}requestAnimationFrame(e){return setTimeout(e,0)}get location(){return{href:"",pathname:"",search:"",hash:"",origin:""}}open(e,n,o){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),dk=new ue("F_WINDOW",{providedIn:"root",factory:()=>an(l(Hr))?l(sk):l(ck)}),yn=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(yn||{}),Ap;try{Ap=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Ap=!1}var Fp=(()=>{class t{_platformId;isBrowser=!1;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Ap)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(e){this._platformId=e,this.isBrowser=this._platformId?an(this._platformId):typeof document=="object"&&!!document}getOS(){let e=navigator.userAgent.toLowerCase(),n=/(macintosh|macintel|macppc|mac68k|macos)/i,o=/(win32|win64|windows|wince)/i,r;return n.test(e)?r=yn.MAC_OS:this.IOS?r=yn.IOS:o.test(e)?r=yn.WINDOWS:this.ANDROID?r=yn.ANDROID:!r&&/linux/.test(e)&&(r=yn.LINUX),r}static \u0275fac=function(n){return new(n||t)(yi(Hr))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ze=(()=>{class t{injectedDocument;windowService;localStorageService;platformService;constructor(e,n,o,r){this.injectedDocument=e,this.windowService=n,this.localStorageService=o,this.platformService=r}isBrowser(){return this.platformService.isBrowser}get window(){return this.windowService}get localStorage(){return this.localStorageService}get document(){return this.injectedDocument}toPixels(e,n,o,r){if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("%")){let a=parseFloat(e)/100;return Math.max(n,o)*a}else{if(e.endsWith("em"))return parseFloat(e)*parseFloat(r);if(e.endsWith("rem"))return parseFloat(e)*parseFloat(getComputedStyle(this.document.documentElement).fontSize);if(e.endsWith("vh")){let a=this.window.innerHeight/100;return parseFloat(e)*a}else if(e.endsWith("vw")){let a=this.window.innerWidth/100;return parseFloat(e)*a}}return parseFloat(e)||0}static \u0275fac=function(n){return new(n||t)(yi(Gr),yi(dk),yi(ak),yi(Fp))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Lp(t,i){return t.reduce((e,n)=>[...e,...i(n)],[])}function zp(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o<e.length;o++)e[o].removeAttribute("id");return n==="canvas"?e0(t,i):(n==="input"||n==="select"||n==="textarea")&&Jg(t,i),Qg("canvas",t,i,e0),Qg("input, textarea, select",t,i,Jg),i}function Qg(t,i,e,n){let o=i.querySelectorAll(t);if(o.length){let r=e.querySelectorAll(t);for(let a=0;a<o.length;a++)n(o[a],r[a])}}var lk=0;function Jg(t,i){i.type!=="file"&&(i.value=t.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${lk++}`)}function e0(t,i){let e=i.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function Bp(t,i,e){for(let n in i)if(i.hasOwnProperty(n)){let o=i[n];o?t.setProperty(n,o,e?.has(n)?"important":""):t.removeProperty(n)}return t}function t0(t){Bp(t.style,{"touch-action":"none","-webkit-user-drag":"none","-webkit-tap-highlight-color":"transparent","user-select":"none","-ms-user-select":"none","-webkit-user-select":"none","-moz-user-select":"none"})}function n0(t,i,e){return uk(t,e).dataset[i]}function uk(t,i){return t.closest(i)}function qp(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let n=i.createElement("div");return e.forEach(o=>n.appendChild(o)),n}function xo(t,i){let e=fk(t,i);return!!e&&!e.classList.contains(i+"-disabled")}function fk(t,i){return t.closest(i)}function Xt(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function Mi(t,i,e){let n=e[t.toUpperCase()]||pk(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${i}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function pk(t,i){return Object.keys(t).find(e=>t[e]===i)}var hk=["markerElement"],mk=["fConnectionGradientRenderer",""],_k=["f-connection-path",""],gk=["fConnectionSelection",""],vk=["f-connection-drag-handle-start",""],yk=["f-connection-drag-handle-end",""],Ck=["defs"],xk=["*"],bk=["fGroupsContainer"],wk=["fNodesContainer"],Sk=["fConnectionsContainer"],Tk=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],Ik=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],Ek=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],Pk=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function Mk(t,i){t&1&&(Je(),R(0,"linearGradient",3)),t&2&&M("fConnectionGradientRendererFor",i)}function kk(t,i){t&1&&(Je(),R(0,"circle",6))}function Dk(t,i){t&1&&ke(0,4)}var Ok="[_nghost-%COMP%]{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}",Nk=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],Rk=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],Up=new ue("F_BACKGROUND_PATTERN"),Vd=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(i){this.fPattern=i}},Ri=class{_items=[];_byId=new Map;get(i){return this._byId.get(i)}require(i){let e=this._byId.get(i);if(!e)throw new Error(`${this.kind} not found: ${i}`);return e}has(i){return this._byId.has(i)}getAll(){return this._items}size(){return this._items.length}add(i){let e=i.fId();if(this._byId.has(e))throw new Error(`${this.kind} already exists: ${e}`);this._items.push(i),this._byId.set(e,i)}addMany(i){for(let e of i)this.add(e)}remove(i){let e=i.fId(),n=this._byId.get(e);if(!n)return!1;this._byId.delete(e);let o=this._items.indexOf(n);return o>=0&&this._items.splice(o,1),!0}removeById(i){let e=this._byId.get(i);if(!e)return;this._byId.delete(i);let n=this._items.indexOf(e);return n>=0&&this._items.splice(n,1),e}clear(){this._items.length=0,this._byId.clear()}};function Xn(t){return{name:t}}var Wp=class{_instances=new Map;get(i){return this._instances.get(i.name)}require(i){let e=this.get(i);if(!e)throw new Error(`Instance not found: ${i.name}`);return e}has(i){return this._instances.has(i.name)}add(i,e){if(this._instances.has(i.name))throw new Error(`${i.name} already exists`);this._instances.set(i.name,e)}remove(i){if(!this._instances.has(i.name))throw new Error(`${i.name} does not exist`);return this._instances.delete(i.name),!0}clear(){this._instances.clear()}},wo=class extends Ri{kind;constructor(i){super(),this.kind=i}},$p=class extends Ri{kind="Connection Marker"},Kp=class extends Ri{kind="Connection";_instancesForCreate;_instancesForSnap;getForSnap(){return this._instancesForSnap}getForCreate(){return this._instancesForCreate}addForCreate(i){this._instancesForCreate=i}addForSnap(i){this._instancesForSnap=i}removeInstanceForCreate(){this._instancesForCreate=void 0}removeInstanceForSnap(){this._instancesForSnap=void 0}},Yp=class extends Ri{kind="Node"},Di=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(i=!0){this.notifyOnSubscribe=i}};function Ak(){return t=>{let i=null,e=null,n=()=>{i!==null&&cancelAnimationFrame(i),e!==null&&cancelAnimationFrame(e),i=e=null};return{callback:()=>{n(),i=requestAnimationFrame(()=>{i=null,e=requestAnimationFrame(()=>{e=null,t()})})},cleanup:n}}}function Fk(){return t=>{let i=null;return{callback:()=>{i!==null&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=null,t()})},cleanup:()=>{i!==null&&cancelAnimationFrame(i),i=null}}}}function jd(t){return i=>{let e=null;return{callback:()=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{e=null,i()},t)},cleanup:()=>{e!==null&&clearTimeout(e),e=null}}}}var yt=class{_listeners=new Set;notify(){this._listeners.forEach(i=>i())}listen(i){return this._listeners.add(i),()=>this.stop(i)}stop(i){this._listeners.delete(i)}},Xp=class extends yt{_htmlElement;_observer=new ResizeObserver(()=>this.notify());_isObserving=!1;constructor(i){super(),this._htmlElement=i}listen(i){return this._isObserving||(this._observer.observe(this._htmlElement),this._isObserving=!0),super.listen(i)}stop(i){super.stop(i),this._listeners.size===0&&this._disconnect()}_disconnect(){this._observer.unobserve(this._htmlElement),this._observer.disconnect(),this._isObserving=!1}},Bt=class t{_channels=[];_operators=[];constructor(...i){this._channels=[...i]}pipe(...i){let e=new t(...this._channels);return e._operators=[...this._operators,...i],e}listen(i,e){let n=e,o=[],r=[],a=[];for(let m of[...this._operators].reverse()){let x=m(n);n=x.callback,x.cleanup&&o.push(x.cleanup),x.onSubscribe&&r.push(x.onSubscribe),x.setTeardown&&a.push(x.setTeardown)}let s=this._channels.map(m=>m.listen(()=>n())),c=null,u=!1,f=()=>{u||(u=!0,c?.(),c=null,s.forEach(m=>m()),o.forEach(m=>m()))};a.slice().reverse().forEach(m=>m(f)),r.slice().reverse().forEach(m=>m(n)),c=i.onDestroy(f)}};function xf(){return t=>{let i=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{i&&e()})},cleanup:()=>{i=!1}}}}function i0(){return t=>{let i=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!i){i=!0;try{t()}finally{e?.()}}}}}}var Lk=(()=>{let t=class Ca{_store=l(k);handle({notifyOnSubscribe:e}){return e?new Bt(this._store.connectionsChanges$).pipe(xf(),jd(1)):new Bt(this._store.connectionsChanges$).pipe(jd(1))}static \u0275fac=function(n){return new(n||Ca)};static \u0275prov=y({token:Ca,factory:Ca.\u0275fac})};return t=b([w(Di)],t),t})(),Zp=class{static fToken=Symbol("ListenNodesChangesRequest")},zk=(()=>{let t=class xa{_store=l(k);handle(e){return new Bt(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||xa)};static \u0275prov=y({token:xa,factory:xa.\u0275fac})};return t=b([w(Zp)],t),t})(),Ud=class{static fToken=Symbol("ListenTransformChangesRequest")},Bk=(()=>{let t=class ba{_store=l(k);handle(e){return new Bt(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||ba)};static \u0275prov=y({token:ba,factory:ba.\u0275fac})};return t=b([w(Ud)],t),t})(),Zn=class{static fToken=Symbol("EmitConnectionsChangesRequest")},qk=(()=>{let t=class wa{_store=l(k);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||wa)};static \u0275prov=y({token:wa,factory:wa.\u0275fac})};return t=b([w(Zn)],t),t})(),wn=class{static fToken=Symbol("NotifyTransformChangedRequest")},k=(()=>{class t{transformChanges$=new yt;viewportAnimationChanges$=new yt;connectionsChanges$=new yt;_connectionsRevision=0;connectionsRenderedChanges$=new yt;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new yt;_nodesRevision=0;progressiveRenderChanges$=new yt;_pendingProgressiveRenderCount=0;get connectionsRevision(){return this._connectionsRevision}get connectionsRenderedRevision(){return this._connectionsRenderedRevision}get connectionsRenderedNodesRevision(){return this._connectionsRenderedNodesRevision}get nodesRevision(){return this._nodesRevision}get hasPendingProgressiveRender(){return this._pendingProgressiveRenderCount>0}get isViewportAnimating(){return this._viewportAnimationCount>0}get flowHost(){return this.fFlow?.hostElement}fFlow;fCanvas;get transform(){return this.fCanvas?.transform}nodes=new Yp;connections=new Kp;connectionMarkers=new $p;outputs=new wo("Output");inputs=new wo("Input");outlets=new wo("Outlet");instances=new Wp;fDraggable;emitNodeChanges(){this._nodesRevision++,this.nodesChanges$.notify()}emitConnectionChanges(){this._connectionsRevision++,this.connectionsChanges$.notify()}completeConnectionsRender(e,n){e<this._connectionsRenderedRevision||e===this._connectionsRenderedRevision&&n<=this._connectionsRenderedNodesRevision||(this._connectionsRenderedRevision=Math.min(e,this._connectionsRevision),this._connectionsRenderedNodesRevision=n,this.connectionsRenderedChanges$.notify())}beginProgressiveRender(){this._pendingProgressiveRenderCount++,this.progressiveRenderChanges$.notify()}endProgressiveRender(){this._pendingProgressiveRenderCount&&(this._pendingProgressiveRenderCount--,this.progressiveRenderChanges$.notify())}transformChanged(){this.transformChanges$.notify()}beginViewportAnimation(){this._viewportAnimationCount++,this.viewportAnimationChanges$.notify()}endViewportAnimation(){this._viewportAnimationCount&&(this._viewportAnimationCount--,this.viewportAnimationChanges$.notify())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Te={MAGNETIC_LINES:Xn("magnetic-lines"),MAGNETIC_RECTS:Xn("magnetic-rects"),ZOOM:Xn("zoom-controls"),BACKGROUND:Xn("background"),SELECTION_AREA:Xn("selection-area"),MINIMAP:Xn("minimap"),AUTO_PAN:Xn("auto-pan")},Gk=(()=>{let t=class Sa{_store=l(k);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||Sa)};static \u0275prov=y({token:Sa,factory:Sa.\u0275fac})};return t=b([w(wn)],t),t})(),Sn=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(i,e){this.key=i,this.instance=e}},Hk=(()=>{let t=class Ta{_store=l(k);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Ta)};static \u0275prov=y({token:Ta,factory:Ta.\u0275fac})};return t=b([w(Sn)],t),t})(),Tn=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(i){this.key=i}},Vk=(()=>{let t=class Ia{_store=l(k);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Ia)};static \u0275prov=y({token:Ia,factory:Ia.\u0275fac})};return t=b([w(Tn)],t),t})(),jk=[k,zk,Lk,Bk,qk,Gk,Hk,Vk],Uk=0,Wk=(()=>{let t=class Ea{_store=l(k);_browser=l(ze);get _backgroundElement(){return this._store.instances.get(Te.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let o=Ni("defs",this._browser);if(e.fPattern?.hostElement.remove(),n.forEach(r=>{o.append(r)}),n.length){this._backgroundElement?.firstChild?.appendChild(o),n[n.length-1].id="f-background-pattern-"+Uk++;let r=n[n.length-1].id,a=Ni("rect",this._browser);a.setAttribute("fill","url(#"+r+")"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),this._backgroundElement?.firstChild?.appendChild(a);let s=this._store.fCanvas?.transform||vn.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||Ea)};static \u0275prov=y({token:Ea,factory:Ea.\u0275fac})};return t=b([w(Vd)],t),t})(),So=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(i){this.fTransform=i}},$k=(()=>{let t=class Pa{_store=l(k);handle(e){this._store.instances.get(Te.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||Pa)};static \u0275prov=y({token:Pa,factory:Pa.\u0275fac})};return t=b([w(So)],t),t})(),Kk=[Wk,$k],Wd=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(i){this.instance=i}},Yk=(()=>{let t=class Ma{_store=l(k);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Ma)};static \u0275prov=y({token:Ma,factory:Ma.\u0275fac})};return t=b([w(Wd)],t),t})(),$d=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(i,e){this.id=i,this.animated=e}},Xk=(()=>{let t=class ka{_store=l(k);_mediator=l(D);get _transform(){return this._store.transform}handle({id:e,animated:n}){let o=this._store.nodes.get(e);o&&(this._toCenter(this._getNodeRect(o),this._getFlowRect(),o._position),this._mediator.execute(new Ai(n,Qn.VIEWPORT_ONLY)))}_toCenter(e,n,o){this._transform.scaledPosition=A.initialize(),this._transform.position=A.initialize((n.width-e.width)/2-o.x*this._transform.scale,(n.height-e.height)/2-o.y*this._transform.scale)}_getNodeRect(e){return V.fromElement(e.hostElement)}_getFlowRect(){return V.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||ka)};static \u0275prov=y({token:ka,factory:ka.\u0275fac})};return t=b([w($d)],t),t})(),Kd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(i,e){this.toCenter=i,this.animated=e}},Zk=(()=>{let t=class Da{_store=l(k);get _transform(){return this._store.transform}_mediator=l(D);handle({toCenter:e,animated:n}){let o=this._mediator.execute(new Hi)||V.initialize();o.width===0||o.height===0||(this.fitToParent(o,V.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Ai(n,Qn.VIEWPORT_ONLY)))}fitToParent(e,n,o,r){this._transform.scaledPosition=A.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);let a=e.width/this._transform.scale+r.x,s=e.height/this._transform.scale+r.y;(a>n.width||s>n.height||a<n.width&&s<n.height)&&(this._transform.scale=Math.min(n.width/a,n.height/s));let c=(n.width-a*this._transform.scale)/2-this._transform.position.x*this._transform.scale,u=(n.height-s*this._transform.scale)/2-this._transform.position.y*this._transform.scale;this._transform.position=A.initialize(c+r.x/2*this._transform.scale,u+r.y/2*this._transform.scale)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return A.initialize(n,o)}static \u0275fac=function(n){return new(n||Da)};static \u0275prov=y({token:Da,factory:Da.\u0275fac})};return t=b([w(Kd)],t),t})(),Yd=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(i,e){this.transform=i,this.position=e}},Qk=(()=>{let t=class Oa{_store=l(k);handle({transform:e,position:n}){n&&(A.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=A.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return A.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||Oa)};static \u0275prov=y({token:Oa,factory:Oa.\u0275fac})};return t=b([w(Yd)],t),t})(),Xd=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(i,e){this.transform=i,this.scale=e}},Jk=(()=>{let t=class Na{_store=l(k);handle(e){!e.scale&&e.scale!==0||(e.transform.scale=e.scale,this._store.fCanvas?.redraw())}static \u0275fac=function(n){return new(n||Na)};static \u0275prov=y({token:Na,factory:Na.\u0275fac})};return t=b([w(Xd)],t),t})(),Qn=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Qn||{}),Ai=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(i,e=Qn.WITH_CONNECTION_CHANGES){this.animated=i,this.context=e}};function k0(t,i){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),i(n))};t.addEventListener("transitionend",e)}var eD=(()=>{let t=class Ra{_store=l(k);get _canvas(){return this._store.fCanvas}handle(e){e.animated?this._redrawWithAnimation(e.context):this._redraw(e.context),this._canvas?.emitCanvasChangeEvent()}_redrawWithAnimation(e){this._store.beginViewportAnimation(),this._canvas?.redrawWithAnimation(),k0(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Qn.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Qn.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ra)};static \u0275prov=y({token:Ra,factory:Ra.\u0275fac})};return t=b([w(Ai)],t),t})(),Zd=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},tD=(()=>{let t=class Aa{_store=l(k);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Aa)};static \u0275prov=y({token:Aa,factory:Aa.\u0275fac})};return t=b([w(Zd)],t),t})(),Qd=class{static fToken=Symbol("ResetScaleRequest")},nD=(()=>{let t=class Fa{_store=l(k);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=A.initialize()}static \u0275fac=function(n){return new(n||Fa)};static \u0275prov=y({token:Fa,factory:Fa.\u0275fac})};return t=b([w(Qd)],t),t})(),Jd=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(i){this.animated=i}},iD=(()=>{let t=class La{_mediator=l(D);_store=l(k);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Hi)||V.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,V.fromElement(this._store.flowHost),this._store.nodes.getAll().map(o=>o._position)),this._mediator.execute(new Ai(e,Qn.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,o){this._transform.scaledPosition=A.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);let r=(n.width-e.width/this._transform.scale)/2-this._transform.position.x,a=(n.height-e.height/this._transform.scale)/2-this._transform.position.y;this._transform.scale=1,this._transform.position=A.initialize(r,a)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return A.initialize(n,o)}static \u0275fac=function(n){return new(n||La)};static \u0275prov=y({token:La,factory:La.\u0275fac})};return t=b([w(Jd)],t),t})(),el=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(i,e){this.scale=i,this.toPosition=e}},oD=(()=>{let t=class za{_store=l(k);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let o=A.sum(this._transform.scaledPosition,this._transform.position),r=n.x-(n.x-o.x)*e/this._transform.scale,a=n.y-(n.y-o.y)*e/this._transform.scale;this._transform.scale=e,this._transform.scaledPosition=A.sub(A.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||za)};static \u0275prov=y({token:za,factory:za.\u0275fac})};return t=b([w(el)],t),t})(),rD=[Yk,Xk,Zk,Qk,Jk,eD,tD,nD,iD,oD],Qp=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(i){this.connection=i}},aD=(()=>{let t=class Ba{_store=l(k);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||Ba)};static \u0275prov=y({token:Ba,factory:Ba.\u0275fac})};return t=b([w(Qp)],t),t})(),tl=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(i){this.instance=i}},sD=(()=>{let t=class qa{_store=l(k);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||qa)};static \u0275prov=y({token:qa,factory:qa.\u0275fac})};return t=b([w(tl)],t),t})(),nl=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(i){this.connection=i}},cD=(()=>{let t=class Ga{_store=l(k);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ga)};static \u0275prov=y({token:Ga,factory:Ga.\u0275fac})};return t=b([w(nl)],t),t})(),Jp=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(i){this.connection=i}},dD=(()=>{let t=class Ha{_store=l(k);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||Ha)};static \u0275prov=y({token:Ha,factory:Ha.\u0275fac})};return t=b([w(Jp)],t),t})(),Fi=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(i){this.connection=i}},o0=new ue("F_CONNECTION_CONTENT");var il=class t{points;cumulativeLengths;segmentTangents;totalLength;constructor(i){let e=t._removeConsecutiveDuplicates(i);if(e.length<2){this.points=[{x:0,y:0},{x:1,y:0}],this.cumulativeLengths=[0,1],this.segmentTangents=[{x:1,y:0}],this.totalLength=1;return}this.points=e;let n=this.points.length,o=n-1,r=new Array(n).fill(0),a=new Array(o),s=0;for(let c=0;c<o;c++){let u=this.points[c+1].x-this.points[c].x,f=this.points[c+1].y-this.points[c].y,m=Math.hypot(u,f),x=m?u/m:1,P=m?f/m:0;a[c]={x,y:P},s+=m,r[c+1]=s}this.cumulativeLengths=r,this.segmentTangents=a,this.totalLength=s||1}static from(i){return new t(i.map(e=>({x:e.x,y:e.y})))}static _removeConsecutiveDuplicates(i){let e=[];for(let n of i){let o=e[e.length-1];(!o||o.x!==n.x||o.y!==n.y)&&e.push({x:n.x,y:n.y})}return e}},eh=class t{_polyline;constructor(i=[]){this._polyline=new il(i)}updatePoints(i){return this._polyline=new il(i),this._polyline.totalLength}calculateTotalLength(i){return this.updatePoints(i)}get totalLength(){return this._polyline.totalLength}getPointAtProgress(i){let{points:e,cumulativeLengths:n,segmentTangents:o,totalLength:r}=this._polyline,s=t._clamp(i,0,1)*r,c=.5;if(s<=c)return{point:e[0],tangent:o[0]??{x:1,y:0},atEdge:!0};if(r-s<=c){let U=e.length-1;return{point:e[U],tangent:o[U-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),f=Math.max(1,u),m=n[f-1],x=n[f],P=t._safeRatio(s-m,x-m),E=e[f-1],N=e[f],j={x:t._lerp(E.x,N.x,P),y:t._lerp(E.y,N.y,P)},L=o[f-1]??{x:1,y:0};return{point:j,tangent:L,atEdge:!1}}getPointAtLength(i){return this.getPointAtProgress(i)}getPointAtDistance(i){let e=this._polyline.totalLength?i/this._polyline.totalLength:0;return this.getPointAtProgress(e)}static _findRightIndex(i,e){let n=0,o=i.length-1;for(;n<o;){let r=n+o>>1;i[r]<e?n=r+1:o=r}return n}static _lerp(i,e,n){return i+(e-i)*n}static _clamp(i,e,n){return i<e?e:i>n?n:i}static _safeRatio(i,e){let n=Math.abs(e)<1e-6?1e-6:e;return i/n}},D0=(function(t){return t.NONE="none",t.ALONG="along",t})(D0||{}),th=class{compute(i,e){let n=this._clamp01(e.position()),{point:o,tangent:r}=i.getPointAtLength(n),a={x:-r.y,y:r.x},s=e.offset()??0,c=o.x+a.x*s,u=o.y+a.y*s,m=this._sizeAlongDirection(e.hostElement,r)*.5,x=n*i.totalLength,P=i.totalLength-x,E=this._applyEdgeGuard(c,u,r,x,P,m),N=this._calculateContentRotation(e.align(),r);return{position:E,rotationDeg:N}}_clamp01(i){return i<=0?0:i>=1?1:i}_applyEdgeGuard(i,e,n,o,r,a){if(o<=a){let s=a-o;return{x:i+n.x*s,y:e+n.y*s}}if(r<=a){let s=a-r;return{x:i-n.x*s,y:e-n.y*s}}return{x:i,y:e}}_sizeAlongDirection(i,e){let n=V.fromElement(i);return Math.abs(e.x)*n.width+Math.abs(e.y)*n.height}_normalize180(i){let e=(i+180)%360;return e<0&&(e+=360),e-180}_keepUpright(i){let e=this._normalize180(i);return e>90?e-=180:e<-90&&(e+=180),e}_calculateContentRotation(i,e){let n=0;return i===D0.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},nh=class{_placement;constructor(i=new th){this._placement=i}layout(i,e){let n=new eh(i),o=n.totalLength;for(let r of e){let{position:a,rotationDeg:s}=this._placement.compute(n,r);r.hostElement.style.transform=this._createTransformString(a,s)}return o}_createTransformString(i,e){return`translate3d(${i.x}px, ${i.y}px, 0) translate(-50%, -50%) rotate(${e}deg)`}};var r0=new ue("F_CONNECTION_WAYPOINTS");function O0(t,i,e){return(t.x-i.x)**2+(t.y-i.y)**2<=e**2}function lD(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(o=>O0(i,o,n))}function uD(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(o=>O0(i,o,n))}function fD(t,i){for(let e of t){let n=uD(e,i);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let o=lD(e,i);if(o&&e.fWaypoints()?.visibility())return{connection:e,candidate:o}}}var bf=new ue("F_CONNECTION_COMPONENTS_PARENT");var _e=(function(t){return t.START="f-connection-marker-start",t.END="f-connection-marker-end",t.SELECTED_START="f-connection-selected-marker-start",t.SELECTED_END="f-connection-selected-marker-end",t.START_ALL_STATES="f-connection-marker-start-all-states",t.END_ALL_STATES="f-connection-marker-end-all-states",t})(_e||{}),ol=new ue("F_CONNECTION_MARKER"),pD=0,rl=class{fId=q(`f-marker-${pD++}`);hostElement=l(Ne).nativeElement};function N0(t,i=_e.START){if(typeof t!="string")return i;let e=t.trim().toLowerCase();return e?hD(e)??i:i}function hD(t){switch(t){case"start":case"f-connection-marker-start":return _e.START;case"end":case"f-connection-marker-end":return _e.END;case"selected-start":case"f-connection-selected-marker-start":return _e.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return _e.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return _e.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return _e.END_ALL_STATES;default:return null}}var R0=(()=>{class t extends rl{_markerElement=Ae.required("markerElement");_type=O(_e.END_ALL_STATES,{alias:"type",transform:e=>N0(e,_e.END_ALL_STATES)});get markerElement(){return this._markerElement().nativeElement}width=6;height=7;refX=5.5;refY=3.5;get type(){return this._type()}orient="auto";markerUnits="strokeWidth";static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,o){n&1&&Tt(o._markerElement,hk,5),n&2&&ct()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[ge([{provide:ol,useExisting:t}]),he],decls:3,vars:0,consts:[["markerElement",""],["viewBox","0 0 6 6",1,"f-marker"],["d","M0,0 L6,3 0,6Z"]],template:function(n,o){n&1&&(Je(),W(0,"svg",1,0),bi(2,"path",2),$())},encapsulation:2})}return t})();var A0=(()=>{class t extends rl{_mediator=l(D);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=_e.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new tl(this))}ngOnDestroy(){this._mediator.execute(new Pl(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275dir=Ee({type:t,selectors:[["svg","fMarker",""]],hostAttrs:[1,"f-component","f-marker"],inputs:{width:"width",height:"height",refX:"refX",refY:"refY",type:[2,"type","type",e=>N0(e,_e.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[ge([{provide:ol,useExisting:t}]),he]})}return t})(),xn=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(xn||{}),Se=(function(t){return t.DEFAULT="default",t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t})(Se||{});function mD({sourceRect:t,targetRect:i}){return{point1:t.gravityCenter,point2:i.gravityCenter}}var F=(function(t){return t.LEFT="left",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t.AUTO="auto",t})(F||{}),ki=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(ki||{});function _D({sourceRect:t,sourceConnectableSide:i,targetRect:e,targetConnectableSide:n}){return{point1:a0(t,i===F.AUTO?F.BOTTOM:i),point2:a0(e,n===F.AUTO?F.TOP:n)}}function a0(t,i){switch(i){case F.TOP:return{x:t.x+t.width/2,y:t.y};case F.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case F.LEFT:return{x:t.x,y:t.y+t.height/2};case F.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${i}`)}}function F0(t,i,e,n){if(!n||!n.rotationDeg)return Pi.getRoundedRectIntersections(t,i,e)[0];let o=Va(t,-n.rotationDeg,n.pivot),r=Va(i,-n.rotationDeg,n.pivot),a=gD(e,-n.rotationDeg,n.pivot),s=Pi.getRoundedRectIntersections(o,r,a)[0];return s?Va(s,n.rotationDeg,n.pivot):void 0}function gD(t,i,e){let n=Va(vD(t),i,e);return new Le(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function vD(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Va(t,i,e){let n=t.x-e.x,o=t.y-e.y,r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:n*a-o*s+e.x,y:n*s+o*a+e.y}}function yD({sourceRect:t,targetRect:i,sourceRotationContext:e,targetRotationContext:n}){return bD(CD(t,i,e),xD(t,i,n),t,i)}function CD(t,i,e){return F0(t.gravityCenter,i.gravityCenter,t,e)}function xD(t,i,e){return F0(i.gravityCenter,t.gravityCenter,i,e)}function bD(t,i,e,n){return{point1:t||e.gravityCenter,point2:i||n.gravityCenter}}var va=.5,wD={[xn.FLOATING]:yD,[xn.FIXED_CENTER]:mD,[xn.FIXED]:_D},Ki=(()=>{class t{handle(e){let n=this._calculateDirectionalVectors(e.sourceRect.gravityCenter.x,e.sourceRect.gravityCenter.y,e.targetRect.gravityCenter.x,e.targetRect.gravityCenter.y),o=this._determineSourceSide(e,n),r=this._determineTargetSide(e,n);return e.connection._applyResolvedSidesToConnection(o,r),this._getBehaviorHandler(e.connection.fBehavior)({sourceRect:e.sourceRect,targetRect:e.targetRect,sourceConnectableSide:o,targetConnectableSide:r,sourceRotationContext:e.sourceRotationContext,targetRotationContext:e.targetRotationContext})}_calculateDirectionalVectors(e,n,o,r){let a=o-e,s=r-n;return{sourceToTargetX:a,sourceToTargetY:s,targetToSourceX:-a,targetToSourceY:-s}}_determineSourceSide(e,n){return this._resolveConnectableSide(e.connection.fOutputSide(),n.sourceToTargetX,n.sourceToTargetY,e.sourceConnectableSide)}_determineTargetSide(e,n){return this._resolveConnectableSide(e.connection.fInputSide(),n.targetToSourceX,n.targetToSourceY,e.targetConnectableSide)}_resolveConnectableSide(e,n,o,r){if(e===Se.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(o);if(a<va&&s<va)return r;let u=a>=s;switch(e){case Se.CALCULATE:return u?n>=0?F.RIGHT:F.LEFT:o>=0?F.BOTTOM:F.TOP;case Se.CALCULATE_HORIZONTAL:return a<va?r:n>=0?F.RIGHT:F.LEFT;case Se.CALCULATE_VERTICAL:return s<va?r:o>=0?F.BOTTOM:F.TOP;case Se.TOP:return F.TOP;case Se.BOTTOM:return F.BOTTOM;case Se.LEFT:return F.LEFT;case Se.RIGHT:return F.RIGHT;default:return r}}_getBehaviorHandler(e){let n=wD[e];if(!n)throw new Error(`[Behavior] No handler for behavior: ${e}`);return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Pt=class{sourceRect;targetRect;connection;sourceConnectableSide;targetConnectableSide;sourceRotationContext;targetRotationContext;constructor(i,e,n,o,r,a,s){this.sourceRect=i,this.targetRect=e,this.connection=n,this.sourceConnectableSide=o,this.targetConnectableSide=r,this.sourceRotationContext=a,this.targetRotationContext=s}};function wf(t,i,e){return[t,...e??[],i]}function SD(t,i){let e=Math.abs(i.x-t.x)/2,n=i.x<t.x?i.x+e:i.x-e,o=Math.abs(i.y-t.y)/2,r=i.y<t.y?i.y+o:i.y-o;return{x:n,y:r}}function TD(t,i=32){let e=new Array(i+1);e[0]=ce({},t[0]);for(let n=1;n<=i;n++)e[n]=L0(t[0],t[1],t[2],t[3],n/i);return e}function L0(t,i,e,n,o){let r=1-o,a=o*o,s=r*r,c=s*r,u=a*o;return{x:c*t.x+3*s*o*i.x+3*r*a*e.x+u*n.x,y:c*t.y+3*s*o*i.y+3*r*a*e.y+u*n.y}}function z0(t){return t.map(i=>L0(i.p0,i.c1,i.c2,i.p3,.5))}function ID(t){if(t.length<2)throw new Error("Polylines must be at least two points");let i=ED(t);return i<=0?[ce({},t[0])]:[PD(t,i/2)]}function ED(t){let i=0;for(let e=0;e<t.length-1;e++)i+=B0(t[e],t[e+1]);return i}function PD(t,i){let e=0;for(let o=0;o<t.length-1;o++){let r=t[o],a=t[o+1],s=B0(r,a);if(!(s<=0)){if(e+s>=i){let c=(i-e)/s;return{x:r.x+(a.x-r.x)*c,y:r.y+(a.y-r.y)*c}}e+=s}}let n=t[t.length-1];return{x:n.x,y:n.y}}function B0(t,i){return Math.hypot(i.x-t.x,i.y-t.y)}function MD(t){let i=[];for(let e of t)for(let n of e){let o=i[i.length-1];(!o||o.x!==n.x||o.y!==n.y)&&i.push(n)}return i}function q0(t){if(!t.length)return"";let i=`M ${t[0].p0.x} ${t[0].p0.y}`;for(let e=0;e<t.length;e++){let n=t[e],o=e===t.length-1,r=o?n.p3.x+2e-4:n.p3.x,a=o?n.p3.y+2e-4:n.p3.y;i+=` C ${n.c1.x} ${n.c1.y}, ${n.c2.x} ${n.c2.y}, ${r} ${a}`}return i}function G0(t,i=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let o=t[n],r=TD([o.p0,o.c1,o.c2,o.p3],i);n>0&&r.shift(),e.push(...r)}return e}function kD(t,i=1e-6){let e=t.length;if(e<=2)return t;let n=[];n.push(t[0]);for(let r=1;r<e;r++){let a=t[r],s=n[n.length-1];(Math.abs(a.x-s.x)>i||Math.abs(a.y-s.y)>i)&&n.push(a)}if(n.length<=2)return n;let o=[];o.push(n[0]);for(let r=1;r<n.length-1;r++){let a=o[o.length-1],s=n[r],c=n[r+1],u=Math.abs(a.x-s.x)<=i&&Math.abs(s.x-c.x)<=i,f=Math.abs(a.y-s.y)<=i&&Math.abs(s.y-c.y)<=i;!u&&!f&&o.push(s)}return o.push(n[n.length-1]),o}var ih=class t{static _dir(i){switch(i){case F.LEFT:return{x:-1,y:0};case F.RIGHT:return{x:1,y:0};case F.TOP:return{x:0,y:-1};case F.BOTTOM:return{x:0,y:1};case F.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(i){return i===F.LEFT||i===F.RIGHT}static _handleLength(i,e,n,o){let r=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y),s=Math.hypot(r,a),c=n===F.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,o),f=o+.5*s,m=o*1.05+c*.3;return Math.min(f,Math.max(u,m))}static _softControl(i,e,n,o){let r=this._dir(i),a=n.x-e.x,s=n.y-e.y,c=Math.hypot(a,s)||1,u=a/c,f=s/c;if(i===F.AUTO)return{x:e.x+u*o,y:e.y+f*o};let m=r.x*u+r.y*f,x=.12,P=Math.max(0,-m)*.08,E=Math.min(.2,x+P),N=r.x*(1-E)+u*E,j=r.y*(1-E)+f*E,L=Math.hypot(N,j)||1;return{x:e.x+N/L*o,y:e.y+j/L*o}}handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=wf(i,n,a),u=[];for(let m=0;m<c.length-1;m++){let x=c[m],P=c[m+1],E=t._handleLength(x,P,e,s),N=t._handleLength(P,x,o,s),j=t._softControl(e,x,P,E),L=t._softControl(o,P,x,N);u.push({p0:x,c1:j,c2:L,p3:P,chainIndex:m})}let f=G0(u,12);return{path:q0(u),secondPoint:u[0]?.c1??i,penultimatePoint:u[u.length-1]?.c2??n,points:f,candidates:z0(u)}}},oh=class{handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=wf(i,n,a),c=[];for(let f=0;f<s.length-1;f++){let m=s[f],x=s[f+1],P=s0(e,m,x,r??0),E=s0(o,x,m,r??0);c.push({p0:m,c1:P,c2:E,p3:x,chainIndex:f})}let u=G0(c,12);return{path:q0(c),secondPoint:c[0]?.c1??i,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:z0(c)}}};function s0(t,i,e,n){let o={x:i.x,y:i.y};switch(t){case F.LEFT:o.x-=ya(i.x-e.x,n);break;case F.RIGHT:o.x+=ya(e.x-i.x,n);break;case F.TOP:o.y-=ya(i.y-e.y,n);break;case F.BOTTOM:o.y+=ya(e.y-i.y,n);break;case F.AUTO:break}return o}function ya(t,i){return t>=i?t:i*Math.sqrt(i-t)}function DD(t){let{axis:i,source:e,target:n,sourceSide:o,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:f,offset:m,sourceGapOffset:x,targetGapOffset:P}=t,E=OD(a,s),N=ND(i,c,f,E);return o===r?RD(i,e,n,m,c,f,a,s,x,P):N=AD(i,c,u,a,s,E,N),N}function OD(t,i){return{sourceTarget:[{x:t.x,y:i.y}],targetSource:[{x:i.x,y:t.y}]}}function ND(t,i,e,n){return t==="x"?i.x===e?n.targetSource:n.sourceTarget:i.y===e?n.sourceTarget:n.targetSource}function RD(t,i,e,n,o,r,a,s,c,u){let f=Math.abs(i[t]-e[t]);if(f>n)return;let m=Math.min(n-1,n-f);m<=0||(o[t]===r?c[t]=(a[t]>i[t]?-1:1)*m:u[t]=(s[t]>e[t]?-1:1)*m)}function AD(t,i,e,n,o,r,a){let s=t==="x"?"y":"x",c=i[t]===e[s],u=n[s]>o[s],f=n[s]<o[s];return i[t]===1&&(!c&&u||c&&f)||i[t]!==1&&(!c&&f||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var bo=1e-6,c0=2e-4,FD=.75;function LD(t,i){let e=t.length,n=[];n.push(`M ${t[0].x} ${t[0].y}`);for(let r=1;r<e-1;r++)n.push(zD(t[r-1],t[r],t[r+1],i));let o=t[e-1];return n.push(`L ${o.x+c0} ${o.y+c0}`),n.join(" ")}function zD(t,i,e,n){let o=i.x,r=i.y;if(n<=0)return`L ${o} ${r}`;let a=Math.abs(t.x-o)<=bo&&Math.abs(o-e.x)<=bo,s=Math.abs(t.y-r)<=bo&&Math.abs(r-e.y)<=bo;if(a||s)return`L ${o} ${r}`;let c=Math.hypot(o-t.x,r-t.y),u=Math.hypot(e.x-o,e.y-r),f=Math.min(c*.5,u*.5,n);if(f<FD)return`L ${o} ${r}`;if(Math.abs(t.y-r)<=bo){let j=t.x<e.x?-1:1,L=t.y<e.y?1:-1,U=o+f*j,ie=r+f*L;return`L ${U} ${r} Q ${o} ${r} ${o} ${ie}`}let x=t.x<e.x?1:-1,P=t.y<e.y?-1:1,E=r+f*P,N=o+f*x;return`L ${o} ${E} Q ${o} ${r} ${N} ${r}`}var d0={[F.LEFT]:A.initialize(-1,0),[F.RIGHT]:A.initialize(1,0),[F.TOP]:A.initialize(0,-1),[F.BOTTOM]:A.initialize(0,1),[F.AUTO]:A.initialize(0,0)},rh=class{handle({source:i,sourceSide:e,target:n,targetSide:o,waypoints:r,offset:a,radius:s}){let c=wf(i,n,r),u=[],f=[];for(let E=0;E<c.length-1;E++){let N=c[E],j=c[E+1],L=this._getPathPoints(N,e,j,o,a??0);u.push(L),f.push(...ID(L))}let m=kD(MD(u)),x=m.length>1?m[m.length-2]:i,P=m.length>1?m[1]:n;return{path:LD(m,s??0),penultimatePoint:x,secondPoint:P,points:m,candidates:f}}_getPathPoints(i,e,n,o,r){let a=d0[e],s=d0[o],c={x:i.x+a.x*r,y:i.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},f=this._getDirection(c,e,u),m=f.x!==0?"x":"y",x=f[m],P=[],E=A.initialize(),N=A.initialize(),j=SD(i,n);if(a[m]*s[m]===-1){let L=[{x:j.x,y:c.y},{x:j.x,y:u.y}],U=[{x:c.x,y:j.y},{x:u.x,y:j.y}];a[m]===x?P=m==="x"?L:U:P=m==="x"?U:L}else P=DD({axis:m,source:i,target:n,sourceSide:e,targetSide:o,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:x,offset:r,sourceGapOffset:E,targetGapOffset:N});return[i,{x:c.x+E.x,y:c.y+E.y},...P,{x:u.x+N.x,y:u.y+N.y},n]}_getDirection(i,e,n){return e===F.LEFT||e===F.RIGHT?i.x<n.x?A.initialize(1,0):A.initialize(-1,0):i.y<n.y?A.initialize(0,1):A.initialize(0,-1)}},l0=2e-4,ah=class{handle(i){let e=wf(i.source,i.target,i.waypoints),n=e.length,o=e[0],r=`M ${o.x} ${o.y}`,a=new Array(n-1);for(let s=0;s<n-1;s++){let c=e[s],u=e[s+1],f=s===n-2,m=f?u.x+l0:u.x,x=f?u.y+l0:u.y;r+=` L ${m} ${x}`,a[s]={x:(c.x+u.x)*.5,y:(c.y+u.y)*.5}}return{path:r,candidates:a,points:e,secondPoint:e[1]??i.target,penultimatePoint:e[n-2]??i.source}}},BD=new ue("F_CONNECTION_BUILDERS"),H0=(()=>{class t{_builtinBuilders={[ki.STRAIGHT]:new ah,[ki.BEZIER]:new oh,[ki.ADAPTIVE_CURVE]:new ih,[ki.SEGMENT]:new rh};_providedBuilders;_builders;constructor(){this._providedBuilders=l(BD,{optional:!0})||{},this._builders=ce(ce({},this._builtinBuilders),this._providedBuilders)}handle({type:e,payload:n}){let o=this._builders[e];if(!o)throw this._createBuilderNotFoundError(e);return o.handle(n)}_createBuilderNotFoundError(e){let n=Object.keys(this._builtinBuilders).sort(),o=Object.keys(this._providedBuilders).sort(),r=Object.keys(this._builders).sort(),a=n.filter(c=>c in this._providedBuilders).sort(),s=[`Connection Builder Error: builder type "${e}" not found.`,`Registered types: ${r.length?r.join(", "):"(none)"}`,`Built-in types: ${n.length?n.join(", "):"(none)"}`,`Provided (F_CONNECTION_BUILDERS) types: ${o.length?o.join(", "):"(none)"}`,a.length?`Overridden built-ins: ${a.join(", ")}`:null,"Tip: ensure you pass a valid Connection Type or provide a builder via F_CONNECTION_BUILDERS."].filter(Boolean);return new Error(s.join(`
|
|
2
2
|
`))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function qD(t,i,e){return Xt("connection_"+t+i+e)}function GD(t,i,e){return Xt("connection_for_selection_"+t+i+e)}function V0(t){return Xt("connection_gradient_"+t)}function HD(t){return`url(#${V0(t)})`}var VD=(()=>{class t{_connection=l(bf);_hostElement=l(Ne).nativeElement;_injector=l(Ye);_hostAttributes=new Map;_startColor;_endColor;gradientId=S(()=>V0(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){ne(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),At(()=>{this._updateGradient()})},{injector:this._injector})}get stop1Element(){return this._hostElement.children.item(0)}get stop2Element(){return this._hostElement.children.item(1)}redraw(e){let n=e.point2.x-e.point1.x,o=e.point2.y-e.point1.y,r=Math.sqrt(n*n+o*o)||.01,a=new Z(.5-.5*n/r,.5-.5*o/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new Z(.5+.5*n/r,.5+.5*o/r);this._setHostAttribute("x2",s.x.toString()),this._setHostAttribute("y2",s.y.toString()),this._updateGradient()}_updateGradient(){let e=this.gradient();this._setFromColor(e.fStartColor()),this._setToColor(e.fEndColor())}_setFromColor(e){let n=e||"transparent";this._startColor!==n&&(this._startColor=n,this.stop1Element.setAttribute("stop-color",n),this.stop1Element.style.setProperty("stop-color",n))}_setToColor(e){let n=e||"transparent";this._endColor!==n&&(this._endColor=n,this.stop2Element.setAttribute("stop-color",n),this.stop2Element.style.setProperty("stop-color",n))}_setHostAttribute(e,n){this._hostAttributes.get(e)!==n&&(this._hostAttributes.set(e,n),this._hostElement.setAttribute(e,n))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ee({type:t,standalone:!1})}return t})(),sh=(()=>{class t extends VD{gradient=O.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["linearGradient","fConnectionGradientRenderer",""]],hostVars:1,hostBindings:function(n,o){n&2&&G("id",o.gradientId())},inputs:{gradient:[1,"fConnectionGradientRendererFor","gradient"]},features:[he],attrs:mk,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,o){n&1&&($r(0,0),Je(),bi(1,"stop",1)(2,"stop",2),Kr())},encapsulation:2,changeDetection:0})}return t})(),u0=new ue("F_CONNECTION_GRADIENT");var ch=new ue("F_CONNECTION_PATH"),dh=class{hostElement=l(Ne).nativeElement},jD=(()=>{class t extends dh{_connection=l(bf);useGradient=O(!1);linkToGradient=S(()=>this.useGradient()?HD(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return qD(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}initialize(){this.deselect()}setPath(e){this.hostElement.setAttribute("d",`${e}`)}select(){this.hostElement.setAttribute("marker-start",`url(#${$D(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${KD(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${UD(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${WD(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["path","f-connection-path",""]],hostAttrs:[1,"f-component","f-connection-path"],hostVars:4,hostBindings:function(n,o){n&2&&(G("id",o.attrConnectionId)("data-f-path-id",o.fPathId),dt("stroke",o.linkToGradient()))},inputs:{useGradient:[1,"useGradient"]},standalone:!1,features:[ge([{provide:ch,useExisting:t}]),he],attrs:_k,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function UD(t){return Xt(`f-connection-marker-start-${t}`)}function WD(t){return Xt(`f-connection-marker-end-${t}`)}function $D(t){return Xt(`f-connection-selected-marker-start-${t}`)}function KD(t){return Xt(`f-connection-selected-marker-end-${t}`)}var lh=new ue("F_CONNECTION_SELECTION"),uh=class{hostElement=l(Ne).nativeElement},YD=(()=>{class t extends uh{_connection=l(bf);get connectionForSelectionId(){return GD(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}setPath(e){this.hostElement.setAttribute("d",`${e}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["path","fConnectionSelection",""]],hostAttrs:[1,"f-component","f-connection-selection"],hostVars:1,hostBindings:function(n,o){n&2&&G("id",o.connectionForSelectionId)},standalone:!1,features:[ge([{provide:lh,useExisting:t}]),he],attrs:gk,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),fh=new ue("F_CONNECTION_DRAG_HANDLE_END"),ph=new ue("F_CONNECTION_DRAG_HANDLE_START"),al=class{hostElement=l(Ne).nativeElement;point=A.initialize();class="f-connection-drag-handle";calculateCircleCenter(i,e,n){let o={x:e.x-i.x,y:e.y-i.y},r=Math.sqrt(o.x*o.x+o.y*o.y)||1,a={x:o.x/r,y:o.y/r},s={x:a.x*n,y:a.y*n};return{x:e.x-s.x,y:e.y-s.y}}},XD=(()=>{class t extends al{redraw(e,n){this.point=this.calculateCircleCenter(e,n,8),this.hostElement.setAttribute("cx",this.point.x.toString()),this.hostElement.setAttribute("cy",this.point.y.toString())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,o){n&2&&Re(o.class)},standalone:!1,features:[ge([{provide:ph,useExisting:t}]),he],attrs:vk,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),ZD=(()=>{class t extends al{redraw(e,n){this.point=this.calculateCircleCenter(e,n,8),this.hostElement.setAttribute("cx",this.point.x.toString()),this.hostElement.setAttribute("cy",this.point.y.toString())}static \u0275fac=(()=>{let e;return function(o){return(e||(e=J(t)))(o||t)}})();static \u0275cmp=K({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,o){n&2&&Re(o.class)},standalone:!1,features:[ge([{provide:fh,useExisting:t}]),he],attrs:yk,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),Gp="f-selected";function j0(t){return class extends t{fId=q("");fSelectionDisabled=q(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(Gp)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(Gp)}isSelected(){return this.hostElement.classList.contains(Gp)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...i){super(...i)}}}function QD(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...i){super(...i)}}}var JD=j0(QD(class{hostElement;constructor(t){this.hostElement=t}})),eO=(()=>{class t extends JD{_fConnectionBuilder=l(H0);path="";line=Co.initialize();fReassignableStart=q(!1);fDraggingDisabled=q(!1);fSelectionDisabled=q(!1);fDefs=Ae.required("defs");fPath=Ae.required(ch);fDragHandleStart=Ae(ph);fDragHandleEnd=Ae.required(fh);fSelection=Ae.required(lh);fContents=Pp(o0,{descendants:!0});fMarkers=Pp(ol,{descendants:!0});fGradient=Zr(u0);_fGradientRenderer=Ae(sh);fWaypoints=Zr(r0);fInputSide=q(Se.DEFAULT);_contentLayoutEngine=new nh;_sourceSide=F.AUTO;fOutputSide=q(Se.DEFAULT);_targetSide=F.AUTO;_penultimatePoint=A.initialize();_secondPoint=A.initialize();constructor(){super(l(Ne).nativeElement)}initialize(){this.redraw(),this.isSelected()?this.markChildrenAsSelected():this.unmarkChildrenAsSelected()}isContains(e){return(this.hostElement.firstChild?.lastChild).contains(e)||Array.from(this.fContents()?.values()??[]).some(n=>n.hostElement?.contains(e))||this.fWaypoints()?.hostElement?.contains(e)}setLine({point1:e,point2:n}){this.line=Co.initialize(e,n);let{path:o,points:r,penultimatePoint:a,secondPoint:s,candidates:c}=this._getPathResult(e,n);this.path=o,this._penultimatePoint=a||e,this._secondPoint=s||n,this.fWaypoints()?.candidates.set(c||[]),this._contentLayoutEngine.layout(r||[],this._contents())}_contents(){return Array.from(this.fContents()?.values()??[])}_getPathResult(e,n){return this._fConnectionBuilder.handle({type:this.fType,payload:{source:e,sourceSide:this._sourceSide,target:n,targetSide:this._targetSide,radius:this.fRadius,offset:this.fOffset,waypoints:this.fWaypoints()?.waypoints()||[]}})}markChildrenAsSelected(){this.fPath().select()}unmarkChildrenAsSelected(){this.fPath().deselect()}redraw(){this.fPath().setPath(this.path),this.fSelection().setPath(this.path),this.fDragHandleEnd().redraw(this._penultimatePoint,this.line.point2),this.fDragHandleStart()?.redraw(this._secondPoint,this.line.point1),this._fGradientRenderer()?.redraw(this.line)}getResolvedSides(){return{sourceSide:this._sourceSide,targetSide:this._targetSide}}_applyResolvedSidesToConnection(e,n){this._sourceSide=e,this._targetSide=n}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ee({type:t,contentQueries:function(n,o,r){n&1&&Ip(r,o.fContents,o0,5)(r,o.fMarkers,ol,5)(r,o.fGradient,u0,5)(r,o.fWaypoints,r0,5),n&2&&ct(4)},viewQuery:function(n,o){n&1&&Tt(o.fDefs,Ck,5)(o.fPath,ch,5)(o.fDragHandleStart,ph,5)(o.fDragHandleEnd,fh,5)(o.fSelection,lh,5)(o._fGradientRenderer,sh,5),n&2&&ct(6)},standalone:!1,features:[he]})}return t})(),tO=(()=>{let t=class ja{_browser=l(ze);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),o=e.fDefs();if(!o)return!1;let r=nO(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===o.nativeElement)return!1;let s=W0("defs",this._browser);return n.forEach(c=>{U0(c.type).forEach(u=>{let f=iO(u,c,e.fId(),this._browser),m=c.markerElement.cloneNode(!0);m.setAttribute("height",`${c.height}`),m.setAttribute("width",`${c.width}`),m.removeAttribute("markerUnits"),m.style.display="unset",f.append(m),s.append(f)})}),o.nativeElement.innerHTML=s.innerHTML,this._markerCache.set(e,{signature:r,defsElement:o.nativeElement}),this._makeSafariCompatible(e),!0}_findConnectionMarkers(e){return Array.from(e.fMarkers()??[])}_makeSafariCompatible(e){e.fPath().hostElement.replaceWith(e.fPath().hostElement)}static \u0275fac=function(n){return new(n||ja)};static \u0275prov=y({token:ja,factory:ja.\u0275fac})};return t=b([w(Fi)],t),t})();function nO(t){return t.map(i=>[...U0(i.type),i.width,i.height,i.refX,i.refY,i.orient,i.markerUnits,i.markerElement.outerHTML].join("|")).join("||")}function iO(t,i,e,n){let o=W0("marker",n);return o.setAttribute("id",Xt(t+"-"+e)),o.setAttribute("markerHeight",`${i.height}`),o.setAttribute("markerWidth",`${i.width}`),o.setAttribute("orient",`${i.orient}`),o.setAttribute("refX",`${i.refX}`),o.setAttribute("refY",`${i.refY}`),o.setAttribute("markerUnits",`${i.markerUnits}`),o}function U0(t){switch(t){case _e.START:return[_e.START];case _e.END:return[_e.END];case _e.SELECTED_START:return[_e.SELECTED_START];case _e.SELECTED_END:return[_e.SELECTED_END];case _e.START_ALL_STATES:return[_e.START,_e.SELECTED_START];case _e.END_ALL_STATES:return[_e.END,_e.SELECTED_END];default:return[]}}function W0(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}var Sf=(()=>{class t{renderTicket=0;_connectedInPreviousRender=new Set;beginRender(){return++this.renderTicket}resetConnectedConnectors(){for(let e of this._connectedInPreviousRender)e.resetConnected();this._connectedInPreviousRender.clear()}trackConnectedConnectors(e,n){this._connectedInPreviousRender.add(e),this._connectedInPreviousRender.add(n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),oO=String.raw`
|
|
3
3
|
const EPSILON = 0.5;
|
|
4
4
|
|