@kestra-io/ui-libs 0.0.227 → 0.0.228

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.
@@ -1,2 +1,2 @@
1
- "use strict";const W=require("@vue-flow/core"),I=require("./FlowYamlUtils-DAm_-0Qh.cjs"),bi=require("vue"),Co=require("humanize-duration"),yi=require("moment"),Ao=require("moment-timezone"),Oo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},No={EDIT:"edit",DELETE:"delete",SHOW_DESCRIPTION:"showDescription",COLLAPSE:"collapse",EXPAND:"expand",OPEN_LINK:"openLink",ADD_TASK:"addTask",SHOW_LOGS:"showLogs",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",ADD_ERROR:"addError",EXPAND_DEPENDENCIES:"expandDependencies",SHOW_CONDITION:"showCondition",RUN_TASK:"runTask"},se="cluster_",ko={EXECUTIONS:"executions",TASKRUNS:"taskruns"},xo={ALL:"all",ERROR:"error",HIDDEN:"hidden",DEFAULT:"all"},ee={TASK_WIDTH:184,TASK_HEIGHT:44,TRIGGER_WIDTH:184,TRIGGER_HEIGHT:44,DOT_WIDTH:5,DOT_HEIGHT:5,COLLAPSED_CLUSTER_WIDTH:150,COLLAPSED_CLUSTER_HEIGHT:44,TRIGGER_CLUSTER_WIDTH:350,TRIGGER_CLUSTER_HEIGHT:180},Lo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Po={DISPLAY_EXECUTIONS_COLUMNS:"displayExecutionsColumns",DISPLAY_FLOW_EXECUTIONS_COLUMNS:"displayFlowExecutionsColumns",SELECTED_TENANT:"selectedTenant",EXECUTE_FLOW_BEHAVIOUR:"executeFlowBehaviour",SHOW_CHART:"showChart",SHOW_FLOWS_CHART:"showFlowsChart",SHOW_LOGS_CHART:"showLogsChart",DEFAULT_NAMESPACE:"defaultNamespace",LATEST_NAMESPACE:"latestNamespace",PAGINATION_SIZE:"paginationSize",IMPERSONATE:"impersonate",EDITOR_VIEW_TYPE:"editorViewType"},Mo={SAME_TAB:"same tab",NEW_TAB:"new tab"},Fo={INPROGRESS:"IN-PROGRESS"};var Oe,mi;function Go(){if(mi)return Oe;mi=1;function e(a){return function(u,n,r){for(var t=-1,s=Object(u),i=r(u),f=i.length;f--;){var d=i[a?f:++t];if(n(s[d],d,s)===!1)break}return u}}return Oe=e,Oe}var Ne,qi;function Jt(){if(qi)return Ne;qi=1;var e=Go(),a=e();return Ne=a,Ne}var ke,Ei;function ei(){if(Ei)return ke;Ei=1;var e=Jt(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return ke=u,ke}var xe,wi;function Do(){if(wi)return xe;wi=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return xe=a,xe}var Le,Ri;function Uo(){if(Ri)return Le;Ri=1;function e(a){return this.__data__.has(a)}return Le=e,Le}var Pe,Ii;function Bs(){if(Ii)return Pe;Ii=1;var e=I.require_MapCache(),a=Do(),u=Uo();function n(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new e;++t<s;)this.add(r[t])}return n.prototype.add=n.prototype.push=a,n.prototype.has=u,Pe=n,Pe}var Me,Ti;function Bo(){if(Ti)return Me;Ti=1;function e(a,u){for(var n=-1,r=a==null?0:a.length;++n<r;)if(u(a[n],n,a))return!0;return!1}return Me=e,Me}var Fe,Si;function Hs(){if(Si)return Fe;Si=1;function e(a,u){return a.has(u)}return Fe=e,Fe}var Ge,Ci;function Ws(){if(Ci)return Ge;Ci=1;var e=Bs(),a=Bo(),u=Hs(),n=1,r=2;function t(s,i,f,d,o,c){var h=f&n,l=s.length,m=i.length;if(l!=m&&!(h&&m>l))return!1;var p=c.get(s),v=c.get(i);if(p&&v)return p==i&&v==s;var g=-1,b=!0,_=f&r?new e:void 0;for(c.set(s,i),c.set(i,s);++g<l;){var y=s[g],q=i[g];if(d)var R=h?d(q,y,g,i,s,c):d(y,q,g,s,i,c);if(R!==void 0){if(R)continue;b=!1;break}if(_){if(!a(i,function(E,C){if(!u(_,C)&&(y===E||o(y,E,f,d,c)))return _.push(C)})){b=!1;break}}else if(!(y===q||o(y,q,f,d,c))){b=!1;break}}return c.delete(s),c.delete(i),b}return Ge=t,Ge}var De,Ai;function Ho(){if(Ai)return De;Ai=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return De=e,De}var Ue,Oi;function ri(){if(Oi)return Ue;Oi=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return Ue=e,Ue}var Be,Ni;function Wo(){if(Ni)return Be;Ni=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Ws(),r=Ho(),t=ri(),s=1,i=2,f="[object Boolean]",d="[object Date]",o="[object Error]",c="[object Map]",h="[object Number]",l="[object RegExp]",m="[object Set]",p="[object String]",v="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",_=e?e.prototype:void 0,y=_?_.valueOf:void 0;function q(R,E,C,O,S,x,L){switch(C){case b:if(R.byteLength!=E.byteLength||R.byteOffset!=E.byteOffset)return!1;R=R.buffer,E=E.buffer;case g:return!(R.byteLength!=E.byteLength||!x(new a(R),new a(E)));case f:case d:case h:return u(+R,+E);case o:return R.name==E.name&&R.message==E.message;case l:case p:return R==E+"";case c:var P=r;case m:var M=O&s;if(P||(P=t),R.size!=E.size&&!M)return!1;var G=L.get(R);if(G)return G==E;O|=i,L.set(R,E);var B=n(P(R),P(E),O,S,x,L);return L.delete(R),B;case v:if(y)return y.call(R)==y.call(E)}return!1}return Be=q,Be}var He,ki;function Vo(){if(ki)return He;ki=1;var e=I.require_getAllKeys(),a=1,u=Object.prototype,n=u.hasOwnProperty;function r(t,s,i,f,d,o){var c=i&a,h=e(t),l=h.length,m=e(s),p=m.length;if(l!=p&&!c)return!1;for(var v=l;v--;){var g=h[v];if(!(c?g in s:n.call(s,g)))return!1}var b=o.get(t),_=o.get(s);if(b&&_)return b==s&&_==t;var y=!0;o.set(t,s),o.set(s,t);for(var q=c;++v<l;){g=h[v];var R=t[g],E=s[g];if(f)var C=c?f(E,R,g,s,t,o):f(R,E,g,t,s,o);if(!(C===void 0?R===E||d(R,E,i,f,o):C)){y=!1;break}q||(q=g=="constructor")}if(y&&!q){var O=t.constructor,S=s.constructor;O!=S&&"constructor"in t&&"constructor"in s&&!(typeof O=="function"&&O instanceof O&&typeof S=="function"&&S instanceof S)&&(y=!1)}return o.delete(t),o.delete(s),y}return He=r,He}var We,xi;function jo(){if(xi)return We;xi=1;var e=I.require_Stack(),a=Ws(),u=Wo(),n=Vo(),r=I.require_getTag(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsTypedArray(),f=1,d="[object Arguments]",o="[object Array]",c="[object Object]",h=Object.prototype,l=h.hasOwnProperty;function m(p,v,g,b,_,y){var q=t(p),R=t(v),E=q?o:r(p),C=R?o:r(v);E=E==d?c:E,C=C==d?c:C;var O=E==c,S=C==c,x=E==C;if(x&&s(p)){if(!s(v))return!1;q=!0,O=!1}if(x&&!O)return y||(y=new e),q||i(p)?a(p,v,g,b,_,y):u(p,v,E,g,b,_,y);if(!(g&f)){var L=O&&l.call(p,"__wrapped__"),P=S&&l.call(v,"__wrapped__");if(L||P){var M=L?p.value():p,G=P?v.value():v;return y||(y=new e),_(M,G,g,b,y)}}return x?(y||(y=new e),n(p,v,g,b,_,y)):!1}return We=m,We}var Ve,Li;function Vs(){if(Li)return Ve;Li=1;var e=jo(),a=I.requireIsObjectLike();function u(n,r,t,s,i){return n===r?!0:n==null||r==null||!a(n)&&!a(r)?n!==n&&r!==r:e(n,r,t,s,u,i)}return Ve=u,Ve}var je,Pi;function Ko(){if(Pi)return je;Pi=1;var e=I.require_Stack(),a=Vs(),u=1,n=2;function r(t,s,i,f){var d=i.length,o=d,c=!f;if(t==null)return!o;for(t=Object(t);d--;){var h=i[d];if(c&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++d<o;){h=i[d];var l=h[0],m=t[l],p=h[1];if(c&&h[2]){if(m===void 0&&!(l in t))return!1}else{var v=new e;if(f)var g=f(m,p,l,t,s,v);if(!(g===void 0?a(p,m,u|n,f,v):g))return!1}}return!0}return je=r,je}var Ke,Mi;function js(){if(Mi)return Ke;Mi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return Ke=a,Ke}var ze,Fi;function zo(){if(Fi)return ze;Fi=1;var e=js(),a=I.requireKeys();function u(n){for(var r=a(n),t=r.length;t--;){var s=r[t],i=n[s];r[t]=[s,i,e(i)]}return r}return ze=u,ze}var Ye,Gi;function Ks(){if(Gi)return Ye;Gi=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return Ye=e,Ye}var $e,Di;function Yo(){if(Di)return $e;Di=1;var e=Ko(),a=zo(),u=Ks();function n(r){var t=a(r);return t.length==1&&t[0][2]?u(t[0][0],t[0][1]):function(s){return s===r||e(s,r,t)}}return $e=n,$e}var Xe,Ui;function oe(){if(Ui)return Xe;Ui=1;var e=I.require_baseGetTag(),a=I.requireIsObjectLike(),u="[object Symbol]";function n(r){return typeof r=="symbol"||a(r)&&e(r)==u}return Xe=n,Xe}var Ze,Bi;function ni(){if(Bi)return Ze;Bi=1;var e=I.requireIsArray(),a=oe(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function r(t,s){if(e(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||a(t)?!0:n.test(t)||!u.test(t)||s!=null&&t in Object(s)}return Ze=r,Ze}var Qe,Hi;function $o(){if(Hi)return Qe;Hi=1;var e=I.require_MapCache(),a="Expected a function";function u(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(a);var t=function(){var s=arguments,i=r?r.apply(this,s):s[0],f=t.cache;if(f.has(i))return f.get(i);var d=n.apply(this,s);return t.cache=f.set(i,d)||f,d};return t.cache=new(u.Cache||e),t}return u.Cache=e,Qe=u,Qe}var Je,Wi;function Xo(){if(Wi)return Je;Wi=1;var e=$o(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Je=u,Je}var er,Vi;function Zo(){if(Vi)return er;Vi=1;var e=Xo(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,n=e(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(a,function(s,i,f,d){t.push(f?d.replace(u,"$1"):i||s)}),t});return er=n,er}var rr,ji;function be(){if(ji)return rr;ji=1;function e(a,u){for(var n=-1,r=a==null?0:a.length,t=Array(r);++n<r;)t[n]=u(a[n],n,a);return t}return rr=e,rr}var nr,Ki;function Qo(){if(Ki)return nr;Ki=1;var e=I.require_Symbol(),a=be(),u=I.requireIsArray(),n=oe(),r=e?e.prototype:void 0,t=r?r.toString:void 0;function s(i){if(typeof i=="string")return i;if(u(i))return a(i,s)+"";if(n(i))return t?t.call(i):"";var f=i+"";return f=="0"&&1/i==-1/0?"-0":f}return nr=s,nr}var tr,zi;function zs(){if(zi)return tr;zi=1;var e=Qo();function a(u){return u==null?"":e(u)}return tr=a,tr}var ir,Yi;function ye(){if(Yi)return ir;Yi=1;var e=I.requireIsArray(),a=ni(),u=Zo(),n=zs();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return ir=r,ir}var ar,$i;function le(){if($i)return ar;$i=1;var e=oe();function a(u){if(typeof u=="string"||e(u))return u;var n=u+"";return n=="0"&&1/u==-1/0?"-0":n}return ar=a,ar}var ur,Xi;function me(){if(Xi)return ur;Xi=1;var e=ye(),a=le();function u(n,r){r=e(r,n);for(var t=0,s=r.length;n!=null&&t<s;)n=n[a(r[t++])];return t&&t==s?n:void 0}return ur=u,ur}var sr,Zi;function Jo(){if(Zi)return sr;Zi=1;var e=me();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return sr=a,sr}var or,Qi;function ef(){if(Qi)return or;Qi=1;function e(a,u){return a!=null&&u in Object(a)}return or=e,or}var fr,Ji;function Ys(){if(Ji)return fr;Ji=1;var e=ye(),a=I.requireIsArguments(),u=I.requireIsArray(),n=I.require_isIndex(),r=I.requireIsLength(),t=le();function s(i,f,d){f=e(f,i);for(var o=-1,c=f.length,h=!1;++o<c;){var l=t(f[o]);if(!(h=i!=null&&d(i,l)))break;i=i[l]}return h||++o!=c?h:(c=i==null?0:i.length,!!c&&r(c)&&n(l,c)&&(u(i)||a(i)))}return fr=s,fr}var dr,ea;function $s(){if(ea)return dr;ea=1;var e=ef(),a=Ys();function u(n,r){return n!=null&&a(n,r,e)}return dr=u,dr}var cr,ra;function rf(){if(ra)return cr;ra=1;var e=Vs(),a=Jo(),u=$s(),n=ni(),r=js(),t=Ks(),s=le(),i=1,f=2;function d(o,c){return n(o)&&r(c)?t(s(o),c):function(h){var l=a(h,o);return l===void 0&&l===c?u(h,o):e(c,l,i|f)}}return cr=d,cr}var hr,na;function ae(){if(na)return hr;na=1;function e(a){return a}return hr=e,hr}var lr,ta;function Xs(){if(ta)return lr;ta=1;function e(a){return function(u){return u==null?void 0:u[a]}}return lr=e,lr}var vr,ia;function nf(){if(ia)return vr;ia=1;var e=me();function a(u){return function(n){return e(n,u)}}return vr=a,vr}var pr,aa;function tf(){if(aa)return pr;aa=1;var e=Xs(),a=nf(),u=ni(),n=le();function r(t){return u(t)?e(n(t)):a(t)}return pr=r,pr}var gr,ua;function re(){if(ua)return gr;ua=1;var e=Yo(),a=rf(),u=ae(),n=I.requireIsArray(),r=tf();function t(s){return typeof s=="function"?s:s==null?u:typeof s=="object"?n(s)?a(s[0],s[1]):e(s):r(s)}return gr=t,gr}var _r,sa;function Zs(){if(sa)return _r;sa=1;var e=I.require_baseAssignValue(),a=ei(),u=re();function n(r,t){var s={};return t=u(t,3),a(r,function(i,f,d){e(s,f,t(i,f,d))}),s}return _r=n,_r}const af={en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"},fr:{y:()=>"a",mo:()=>"mo",w:()=>"se",d:()=>"j",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}},uf="dateFormat",sf="timezone",pe={capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),dateFilter:(e,a)=>{var t,s;const u=(t=bi.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$moment().locale(),n=(s=bi.getCurrentInstance())==null?void 0:s.appContext.config.globalProperties.$moment(e).locale(u);let r;return a==="iso"?r="YYYY-MM-DD HH:mm:ss.SSS":r=a??localStorage.getItem(uf)??"llll",n.tz(localStorage.getItem(sf)??Ao.tz.guess()).format(r)},splitFirst(e,a){return e.split(a).slice(1).join(a)},duration(e){return yi.duration(e,yi.ISO_8601).asMilliseconds()/1e3},humanDuration(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=af,a.largest=2,typeof e!="number"&&(e=this.duration(e)),Co(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")},afterLastDot(e){return e.split(".").pop()},distinctFilter(e,a,u){return u.indexOf(e)===a}};function ti(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var br,oa;function of(){if(oa)return br;oa=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return br=u,br}var yr,fa;function ii(){if(fa)return yr;fa=1;function e(a){return function(){return a}}return yr=e,yr}var mr,da;function ff(){if(da)return mr;da=1;var e=I.requireIsArrayLike();function a(u,n){return function(r,t){if(r==null)return r;if(!e(r))return u(r,t);for(var s=r.length,i=n?s:-1,f=Object(r);(n?i--:++i<s)&&t(f[i],i,f)!==!1;);return r}}return mr=a,mr}var qr,ca;function qe(){if(ca)return qr;ca=1;var e=ei(),a=ff(),u=a(e);return qr=u,qr}var Er,ha;function Qs(){if(ha)return Er;ha=1;var e=ae();function a(u){return typeof u=="function"?u:e}return Er=a,Er}var wr,la;function Js(){if(la)return wr;la=1;var e=I.require_arrayEach(),a=qe(),u=Qs(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return wr=r,wr}var Rr,va;function eo(){return va||(va=1,Rr=Js()),Rr}var Ir,pa;function df(){if(pa)return Ir;pa=1;var e=qe();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Ir=a,Ir}var Tr,ga;function ro(){if(ga)return Tr;ga=1;var e=I.require_arrayFilter(),a=df(),u=re(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return Tr=r,Tr}var Sr,_a;function cf(){if(_a)return Sr;_a=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Sr=u,Sr}var Cr,ba;function no(){if(ba)return Cr;ba=1;var e=cf(),a=Ys();function u(n,r){return n!=null&&a(n,r,e)}return Cr=u,Cr}var Ar,ya;function hf(){if(ya)return Ar;ya=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArguments(),n=I.requireIsArray(),r=I.requireIsArrayLike(),t=I.requireIsBuffer(),s=I.require_isPrototype(),i=I.requireIsTypedArray(),f="[object Map]",d="[object Set]",o=Object.prototype,c=o.hasOwnProperty;function h(l){if(l==null)return!0;if(r(l)&&(n(l)||typeof l=="string"||typeof l.splice=="function"||t(l)||i(l)||u(l)))return!l.length;var m=a(l);if(m==f||m==d)return!l.size;if(s(l))return!e(l).length;for(var p in l)if(c.call(l,p))return!1;return!0}return Ar=h,Ar}var Or,ma;function to(){if(ma)return Or;ma=1;function e(a){return a===void 0}return Or=e,Or}var Nr,qa;function io(){if(qa)return Nr;qa=1;var e=qe(),a=I.requireIsArrayLike();function u(n,r){var t=-1,s=a(n)?Array(n.length):[];return e(n,function(i,f,d){s[++t]=r(i,f,d)}),s}return Nr=u,Nr}var kr,Ea;function ao(){if(Ea)return kr;Ea=1;var e=be(),a=re(),u=io(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return kr=r,kr}var xr,wa;function lf(){if(wa)return xr;wa=1;function e(a,u,n,r){var t=-1,s=a==null?0:a.length;for(r&&s&&(n=a[++t]);++t<s;)n=u(n,a[t],t,a);return n}return xr=e,xr}var Lr,Ra;function vf(){if(Ra)return Lr;Ra=1;function e(a,u,n,r,t){return t(a,function(s,i,f){n=r?(r=!1,s):u(n,s,i,f)}),n}return Lr=e,Lr}var Pr,Ia;function uo(){if(Ia)return Pr;Ia=1;var e=lf(),a=qe(),u=re(),n=vf(),r=I.requireIsArray();function t(s,i,f){var d=r(s)?e:n,o=arguments.length<3;return d(s,u(i,4),f,o,a)}return Pr=t,Pr}var Mr,Ta;function pf(){if(Ta)return Mr;Ta=1;var e=I.require_baseGetTag(),a=I.requireIsArray(),u=I.requireIsObjectLike(),n="[object String]";function r(t){return typeof t=="string"||!a(t)&&u(t)&&e(t)==n}return Mr=r,Mr}var Fr,Sa;function gf(){if(Sa)return Fr;Sa=1;var e=Xs(),a=e("length");return Fr=a,Fr}var Gr,Ca;function _f(){if(Ca)return Gr;Ca=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="\\u200d",i=RegExp("["+s+e+r+t+"]");function f(d){return i.test(d)}return Gr=f,Gr}var Dr,Aa;function bf(){if(Aa)return Dr;Aa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="["+e+"]",i="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+i+"|"+f+")",o="[^"+e+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",m=d+"?",p="["+t+"]?",v="(?:"+l+"(?:"+[o,c,h].join("|")+")"+p+m+")*",g=p+m+v,b="(?:"+[o+i+"?",i,c,h,s].join("|")+")",_=RegExp(f+"(?="+f+")|"+b+g,"g");function y(q){for(var R=_.lastIndex=0;_.test(q);)++R;return R}return Dr=y,Dr}var Ur,Oa;function yf(){if(Oa)return Ur;Oa=1;var e=gf(),a=_f(),u=bf();function n(r){return a(r)?u(r):e(r)}return Ur=n,Ur}var Br,Na;function mf(){if(Na)return Br;Na=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=pf(),r=yf(),t="[object Map]",s="[object Set]";function i(f){if(f==null)return 0;if(u(f))return n(f)?r(f):f.length;var d=a(f);return d==t||d==s?f.size:e(f).length}return Br=i,Br}var Hr,ka;function qf(){if(ka)return Hr;ka=1;var e=I.require_arrayEach(),a=I.require_baseCreate(),u=ei(),n=re(),r=I.require_getPrototype(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsFunction(),f=I.requireIsObject(),d=I.requireIsTypedArray();function o(c,h,l){var m=t(c),p=m||s(c)||d(c);if(h=n(h,4),l==null){var v=c&&c.constructor;p?l=m?new v:[]:f(c)?l=i(v)?a(r(c)):{}:l={}}return(p?e:u)(c,function(g,b,_){return h(l,g,b,_)}),l}return Hr=o,Hr}var Wr,xa;function Ef(){if(xa)return Wr;xa=1;var e=I.require_Symbol(),a=I.requireIsArguments(),u=I.requireIsArray(),n=e?e.isConcatSpreadable:void 0;function r(t){return u(t)||a(t)||!!(n&&t&&t[n])}return Wr=r,Wr}var Vr,La;function ai(){if(La)return Vr;La=1;var e=I.require_arrayPush(),a=Ef();function u(n,r,t,s,i){var f=-1,d=n.length;for(t||(t=a),i||(i=[]);++f<d;){var o=n[f];r>0&&t(o)?r>1?u(o,r-1,t,s,i):e(i,o):s||(i[i.length]=o)}return i}return Vr=u,Vr}var jr,Pa;function wf(){if(Pa)return jr;Pa=1;function e(a,u,n){switch(n.length){case 0:return a.call(u);case 1:return a.call(u,n[0]);case 2:return a.call(u,n[0],n[1]);case 3:return a.call(u,n[0],n[1],n[2])}return a.apply(u,n)}return jr=e,jr}var Kr,Ma;function so(){if(Ma)return Kr;Ma=1;var e=wf(),a=Math.max;function u(n,r,t){return r=a(r===void 0?n.length-1:r,0),function(){for(var s=arguments,i=-1,f=a(s.length-r,0),d=Array(f);++i<f;)d[i]=s[r+i];i=-1;for(var o=Array(r+1);++i<r;)o[i]=s[i];return o[r]=t(d),e(n,this,o)}}return Kr=u,Kr}var zr,Fa;function Rf(){if(Fa)return zr;Fa=1;var e=ii(),a=I.require_defineProperty(),u=ae(),n=a?function(r,t){return a(r,"toString",{configurable:!0,enumerable:!1,value:e(t),writable:!0})}:u;return zr=n,zr}var Yr,Ga;function If(){if(Ga)return Yr;Ga=1;var e=800,a=16,u=Date.now;function n(r){var t=0,s=0;return function(){var i=u(),f=a-(i-s);if(s=i,f>0){if(++t>=e)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}return Yr=n,Yr}var $r,Da;function oo(){if(Da)return $r;Da=1;var e=Rf(),a=If(),u=a(e);return $r=u,$r}var Xr,Ua;function Ee(){if(Ua)return Xr;Ua=1;var e=ae(),a=so(),u=oo();function n(r,t){return u(a(r,t,e),r+"")}return Xr=n,Xr}var Zr,Ba;function fo(){if(Ba)return Zr;Ba=1;function e(a,u,n,r){for(var t=a.length,s=n+(r?1:-1);r?s--:++s<t;)if(u(a[s],s,a))return s;return-1}return Zr=e,Zr}var Qr,Ha;function Tf(){if(Ha)return Qr;Ha=1;function e(a){return a!==a}return Qr=e,Qr}var Jr,Wa;function Sf(){if(Wa)return Jr;Wa=1;function e(a,u,n){for(var r=n-1,t=a.length;++r<t;)if(a[r]===u)return r;return-1}return Jr=e,Jr}var en,Va;function Cf(){if(Va)return en;Va=1;var e=fo(),a=Tf(),u=Sf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return en=n,en}var rn,ja;function Af(){if(ja)return rn;ja=1;var e=Cf();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return rn=a,rn}var nn,Ka;function Of(){if(Ka)return nn;Ka=1;function e(a,u,n){for(var r=-1,t=a==null?0:a.length;++r<t;)if(n(u,a[r]))return!0;return!1}return nn=e,nn}var tn,za;function Nf(){if(za)return tn;za=1;function e(){}return tn=e,tn}var an,Ya;function kf(){if(Ya)return an;Ya=1;var e=I.require_Set(),a=Nf(),u=ri(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return an=r,an}var un,$a;function xf(){if($a)return un;$a=1;var e=Bs(),a=Af(),u=Of(),n=Hs(),r=kf(),t=ri(),s=200;function i(f,d,o){var c=-1,h=a,l=f.length,m=!0,p=[],v=p;if(o)m=!1,h=u;else if(l>=s){var g=d?null:r(f);if(g)return t(g);m=!1,h=n,v=new e}else v=d?[]:p;e:for(;++c<l;){var b=f[c],_=d?d(b):b;if(b=o||b!==0?b:0,m&&_===_){for(var y=v.length;y--;)if(v[y]===_)continue e;d&&v.push(_),p.push(b)}else h(v,_,o)||(v!==p&&v.push(_),p.push(b))}return p}return un=i,un}var sn,Xa;function co(){if(Xa)return sn;Xa=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return sn=u,sn}var on,Za;function Lf(){if(Za)return on;Za=1;var e=ai(),a=Ee(),u=xf(),n=co(),r=a(function(t){return u(e(t,1,n,!0))});return on=r,on}var fn,Qa;function Pf(){if(Qa)return fn;Qa=1;var e=be();function a(u,n){return e(n,function(r){return u[r]})}return fn=a,fn}var dn,Ja;function ho(){if(Ja)return dn;Ja=1;var e=Pf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return dn=u,dn}var cn,eu;function X(){if(eu)return cn;eu=1;var e;if(typeof ti=="function")try{e={clone:of(),constant:ii(),each:eo(),filter:ro(),has:no(),isArray:I.requireIsArray(),isEmpty:hf(),isFunction:I.requireIsFunction(),isUndefined:to(),keys:I.requireKeys(),map:ao(),reduce:uo(),size:mf(),transform:qf(),union:Lf(),values:ho()}}catch{}return e||(e=window._),cn=e,cn}var hn,ru;function ui(){if(ru)return hn;ru=1;var e=X();hn=r;var a="\0",u="\0",n="";function r(o){this._isDirected=e.has(o,"directed")?o.directed:!0,this._isMultigraph=e.has(o,"multigraph")?o.multigraph:!1,this._isCompound=e.has(o,"compound")?o.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(o){return this._label=o,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultNodeLabelFn=o,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._in[c])})},r.prototype.sinks=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._out[c])})},r.prototype.setNodes=function(o,c){var h=arguments,l=this;return e.each(o,function(m){h.length>1?l.setNode(m,c):l.setNode(m)}),this},r.prototype.setNode=function(o,c){return e.has(this._nodes,o)?(arguments.length>1&&(this._nodes[o]=c),this):(this._nodes[o]=arguments.length>1?c:this._defaultNodeLabelFn(o),this._isCompound&&(this._parent[o]=u,this._children[o]={},this._children[u][o]=!0),this._in[o]={},this._preds[o]={},this._out[o]={},this._sucs[o]={},++this._nodeCount,this)},r.prototype.node=function(o){return this._nodes[o]},r.prototype.hasNode=function(o){return e.has(this._nodes,o)},r.prototype.removeNode=function(o){var c=this;if(e.has(this._nodes,o)){var h=function(l){c.removeEdge(c._edgeObjs[l])};delete this._nodes[o],this._isCompound&&(this._removeFromParentsChildList(o),delete this._parent[o],e.each(this.children(o),function(l){c.setParent(l)}),delete this._children[o]),e.each(e.keys(this._in[o]),h),delete this._in[o],delete this._preds[o],e.each(e.keys(this._out[o]),h),delete this._out[o],delete this._sucs[o],--this._nodeCount}return this},r.prototype.setParent=function(o,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=u;else{c+="";for(var h=c;!e.isUndefined(h);h=this.parent(h))if(h===o)throw new Error("Setting "+c+" as parent of "+o+" would create a cycle");this.setNode(c)}return this.setNode(o),this._removeFromParentsChildList(o),this._parent[o]=c,this._children[c][o]=!0,this},r.prototype._removeFromParentsChildList=function(o){delete this._children[this._parent[o]][o]},r.prototype.parent=function(o){if(this._isCompound){var c=this._parent[o];if(c!==u)return c}},r.prototype.children=function(o){if(e.isUndefined(o)&&(o=u),this._isCompound){var c=this._children[o];if(c)return e.keys(c)}else{if(o===u)return this.nodes();if(this.hasNode(o))return[]}},r.prototype.predecessors=function(o){var c=this._preds[o];if(c)return e.keys(c)},r.prototype.successors=function(o){var c=this._sucs[o];if(c)return e.keys(c)},r.prototype.neighbors=function(o){var c=this.predecessors(o);if(c)return e.union(c,this.successors(o))},r.prototype.isLeaf=function(o){var c;return this.isDirected()?c=this.successors(o):c=this.neighbors(o),c.length===0},r.prototype.filterNodes=function(o){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var h=this;e.each(this._nodes,function(p,v){o(v)&&c.setNode(v,p)}),e.each(this._edgeObjs,function(p){c.hasNode(p.v)&&c.hasNode(p.w)&&c.setEdge(p,h.edge(p))});var l={};function m(p){var v=h.parent(p);return v===void 0||c.hasNode(v)?(l[p]=v,v):v in l?l[v]:m(v)}return this._isCompound&&e.each(c.nodes(),function(p){c.setParent(p,m(p))}),c},r.prototype.setDefaultEdgeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultEdgeLabelFn=o,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(o,c){var h=this,l=arguments;return e.reduce(o,function(m,p){return l.length>1?h.setEdge(m,p,c):h.setEdge(m,p),p}),this},r.prototype.setEdge=function(){var o,c,h,l,m=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(o=p.v,c=p.w,h=p.name,arguments.length===2&&(l=arguments[1],m=!0)):(o=p,c=arguments[1],h=arguments[3],arguments.length>2&&(l=arguments[2],m=!0)),o=""+o,c=""+c,e.isUndefined(h)||(h=""+h);var v=i(this._isDirected,o,c,h);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=l),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(o),this.setNode(c),this._edgeLabels[v]=m?l:this._defaultEdgeLabelFn(o,c,h);var g=f(this._isDirected,o,c,h);return o=g.v,c=g.w,Object.freeze(g),this._edgeObjs[v]=g,t(this._preds[c],o),t(this._sucs[o],c),this._in[c][v]=g,this._out[o][v]=g,this._edgeCount++,this},r.prototype.edge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return this._edgeLabels[l]},r.prototype.hasEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return e.has(this._edgeLabels,l)},r.prototype.removeEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h),m=this._edgeObjs[l];return m&&(o=m.v,c=m.w,delete this._edgeLabels[l],delete this._edgeObjs[l],s(this._preds[c],o),s(this._sucs[o],c),delete this._in[c][l],delete this._out[o][l],this._edgeCount--),this},r.prototype.inEdges=function(o,c){var h=this._in[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.v===c}):l}},r.prototype.outEdges=function(o,c){var h=this._out[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.w===c}):l}},r.prototype.nodeEdges=function(o,c){var h=this.inEdges(o,c);if(h)return h.concat(this.outEdges(o,c))};function t(o,c){o[c]?o[c]++:o[c]=1}function s(o,c){--o[c]||delete o[c]}function i(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}return m+n+p+n+(e.isUndefined(l)?a:l)}function f(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}var g={v:m,w:p};return l&&(g.name=l),g}function d(o,c){return i(o,c.v,c.w,c.name)}return hn}var ln,nu;function Mf(){return nu||(nu=1,ln="2.1.8"),ln}var vn,tu;function Ff(){return tu||(tu=1,vn={Graph:ui(),version:Mf()}),vn}var pn,iu;function Gf(){if(iu)return pn;iu=1;var e=X(),a=ui();pn={write:u,read:t};function u(s){var i={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:r(s)};return e.isUndefined(s.graph())||(i.value=e.clone(s.graph())),i}function n(s){return e.map(s.nodes(),function(i){var f=s.node(i),d=s.parent(i),o={v:i};return e.isUndefined(f)||(o.value=f),e.isUndefined(d)||(o.parent=d),o})}function r(s){return e.map(s.edges(),function(i){var f=s.edge(i),d={v:i.v,w:i.w};return e.isUndefined(i.name)||(d.name=i.name),e.isUndefined(f)||(d.value=f),d})}function t(s){var i=new a(s.options).setGraph(s.value);return e.each(s.nodes,function(f){i.setNode(f.v,f.value),f.parent&&i.setParent(f.v,f.parent)}),e.each(s.edges,function(f){i.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),i}return pn}var gn,au;function Df(){if(au)return gn;au=1;var e=X();gn=a;function a(u){var n={},r=[],t;function s(i){e.has(n,i)||(n[i]=!0,t.push(i),e.each(u.successors(i),s),e.each(u.predecessors(i),s))}return e.each(u.nodes(),function(i){t=[],s(i),t.length&&r.push(t)}),r}return gn}var _n,uu;function lo(){if(uu)return _n;uu=1;var e=X();_n=a;function a(){this._arr=[],this._keyIndices={}}return a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map(function(u){return u.key})},a.prototype.has=function(u){return e.has(this._keyIndices,u)},a.prototype.priority=function(u){var n=this._keyIndices[u];if(n!==void 0)return this._arr[n].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(u,n){var r=this._keyIndices;if(u=String(u),!e.has(r,u)){var t=this._arr,s=t.length;return r[u]=s,t.push({key:u,priority:n}),this._decrease(s),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},a.prototype.decrease=function(u,n){var r=this._keyIndices[u];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},a.prototype._heapify=function(u){var n=this._arr,r=2*u,t=r+1,s=u;r<n.length&&(s=n[r].priority<n[s].priority?r:s,t<n.length&&(s=n[t].priority<n[s].priority?t:s),s!==u&&(this._swap(u,s),this._heapify(s)))},a.prototype._decrease=function(u){for(var n=this._arr,r=n[u].priority,t;u!==0&&(t=u>>1,!(n[t].priority<r));)this._swap(u,t),u=t},a.prototype._swap=function(u,n){var r=this._arr,t=this._keyIndices,s=r[u],i=r[n];r[u]=i,r[n]=s,t[i.key]=u,t[s.key]=n},_n}var bn,su;function vo(){if(su)return bn;su=1;var e=X(),a=lo();bn=n;var u=e.constant(1);function n(t,s,i,f){return r(t,String(s),i||u,f||function(d){return t.outEdges(d)})}function r(t,s,i,f){var d={},o=new a,c,h,l=function(m){var p=m.v!==c?m.v:m.w,v=d[p],g=i(m),b=h.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+g);b<v.distance&&(v.distance=b,v.predecessor=c,o.decrease(p,b))};for(t.nodes().forEach(function(m){var p=m===s?0:Number.POSITIVE_INFINITY;d[m]={distance:p},o.add(m,p)});o.size()>0&&(c=o.removeMin(),h=d[c],h.distance!==Number.POSITIVE_INFINITY);)f(c).forEach(l);return d}return bn}var yn,ou;function Uf(){if(ou)return yn;ou=1;var e=vo(),a=X();yn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return yn}var mn,fu;function po(){if(fu)return mn;fu=1;var e=X();mn=a;function a(u){var n=0,r=[],t={},s=[];function i(f){var d=t[f]={onStack:!0,lowlink:n,index:n++};if(r.push(f),u.successors(f).forEach(function(h){e.has(t,h)?t[h].onStack&&(d.lowlink=Math.min(d.lowlink,t[h].index)):(i(h),d.lowlink=Math.min(d.lowlink,t[h].lowlink))}),d.lowlink===d.index){var o=[],c;do c=r.pop(),t[c].onStack=!1,o.push(c);while(f!==c);s.push(o)}}return u.nodes().forEach(function(f){e.has(t,f)||i(f)}),s}return mn}var qn,du;function Bf(){if(du)return qn;du=1;var e=X(),a=po();qn=u;function u(n){return e.filter(a(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return qn}var En,cu;function Hf(){if(cu)return En;cu=1;var e=X();En=u;var a=e.constant(1);function u(r,t,s){return n(r,t||a,s||function(i){return r.outEdges(i)})}function n(r,t,s){var i={},f=r.nodes();return f.forEach(function(d){i[d]={},i[d][d]={distance:0},f.forEach(function(o){d!==o&&(i[d][o]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(o){var c=o.v===d?o.w:o.v,h=t(o);i[d][c]={distance:h,predecessor:d}})}),f.forEach(function(d){var o=i[d];f.forEach(function(c){var h=i[c];f.forEach(function(l){var m=h[d],p=o[l],v=h[l],g=m.distance+p.distance;g<v.distance&&(v.distance=g,v.predecessor=p.predecessor)})})}),i}return En}var wn,hu;function go(){if(hu)return wn;hu=1;var e=X();wn=a,a.CycleException=u;function a(n){var r={},t={},s=[];function i(f){if(e.has(t,f))throw new u;e.has(r,f)||(t[f]=!0,r[f]=!0,e.each(n.predecessors(f),i),delete t[f],s.push(f))}if(e.each(n.sinks(),i),e.size(r)!==n.nodeCount())throw new u;return s}function u(){}return u.prototype=new Error,wn}var Rn,lu;function Wf(){if(lu)return Rn;lu=1;var e=go();Rn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Rn}var In,vu;function _o(){if(vu)return In;vu=1;var e=X();In=a;function a(n,r,t){e.isArray(r)||(r=[r]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],f={};return e.each(r,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);u(n,d,t==="post",f,s,i)}),i}function u(n,r,t,s,i,f){e.has(s,r)||(s[r]=!0,t||f.push(r),e.each(i(r),function(d){u(n,d,t,s,i,f)}),t&&f.push(r))}return In}var Tn,pu;function Vf(){if(pu)return Tn;pu=1;var e=_o();Tn=a;function a(u,n){return e(u,n,"post")}return Tn}var Sn,gu;function jf(){if(gu)return Sn;gu=1;var e=_o();Sn=a;function a(u,n){return e(u,n,"pre")}return Sn}var Cn,_u;function Kf(){if(_u)return Cn;_u=1;var e=X(),a=ui(),u=lo();Cn=n;function n(r,t){var s=new a,i={},f=new u,d;function o(h){var l=h.v===d?h.w:h.v,m=f.priority(l);if(m!==void 0){var p=t(h);p<m&&(i[l]=d,f.decrease(l,p))}}if(r.nodeCount()===0)return s;e.each(r.nodes(),function(h){f.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),f.decrease(r.nodes()[0],0);for(var c=!1;f.size()>0;){if(d=f.removeMin(),e.has(i,d))s.setEdge(d,i[d]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(d).forEach(o)}return s}return Cn}var An,bu;function zf(){return bu||(bu=1,An={components:Df(),dijkstra:vo(),dijkstraAll:Uf(),findCycles:Bf(),floydWarshall:Hf(),isAcyclic:Wf(),postorder:Vf(),preorder:jf(),prim:Kf(),tarjan:po(),topsort:go()}),An}var On,yu;function Yf(){if(yu)return On;yu=1;var e=Ff();return On={Graph:e.Graph,json:Gf(),alg:zf(),version:e.version},On}var Nn,mu;function Z(){if(mu)return Nn;mu=1;var e;if(typeof ti=="function")try{e=Yf()}catch{}return e||(e=window.graphlib),Nn=e,Nn}var kn,qu;function we(){if(qu)return kn;qu=1;var e=I.requireEq(),a=I.requireIsArrayLike(),u=I.require_isIndex(),n=I.requireIsObject();function r(t,s,i){if(!n(i))return!1;var f=typeof s;return(f=="number"?a(i)&&u(s,i.length):f=="string"&&s in i)?e(i[s],t):!1}return kn=r,kn}var xn,Eu;function $f(){if(Eu)return xn;Eu=1;var e=Ee(),a=I.requireEq(),u=we(),n=I.requireKeysIn(),r=Object.prototype,t=r.hasOwnProperty,s=e(function(i,f){i=Object(i);var d=-1,o=f.length,c=o>2?f[2]:void 0;for(c&&u(f[0],f[1],c)&&(o=1);++d<o;)for(var h=f[d],l=n(h),m=-1,p=l.length;++m<p;){var v=l[m],g=i[v];(g===void 0||a(g,r[v])&&!t.call(i,v))&&(i[v]=h[v])}return i});return xn=s,xn}var Ln,wu;function Xf(){if(wu)return Ln;wu=1;var e=re(),a=I.requireIsArrayLike(),u=I.requireKeys();function n(r){return function(t,s,i){var f=Object(t);if(!a(t)){var d=e(s,3);t=u(t),s=function(c){return d(f[c],c,f)}}var o=r(t,s,i);return o>-1?f[d?t[o]:o]:void 0}}return Ln=n,Ln}var Pn,Ru;function Zf(){if(Ru)return Pn;Ru=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return Pn=a,Pn}var Mn,Iu;function Qf(){if(Iu)return Mn;Iu=1;var e=Zf(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return Mn=u,Mn}var Fn,Tu;function Jf(){if(Tu)return Fn;Tu=1;var e=Qf(),a=I.requireIsObject(),u=oe(),n=NaN,r=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=parseInt;function f(d){if(typeof d=="number")return d;if(u(d))return n;if(a(d)){var o=typeof d.valueOf=="function"?d.valueOf():d;d=a(o)?o+"":o}if(typeof d!="string")return d===0?d:+d;d=e(d);var c=t.test(d);return c||s.test(d)?i(d.slice(2),c?2:8):r.test(d)?n:+d}return Fn=f,Fn}var Gn,Su;function bo(){if(Su)return Gn;Su=1;var e=Jf(),a=1/0,u=17976931348623157e292;function n(r){if(!r)return r===0?r:0;if(r=e(r),r===a||r===-1/0){var t=r<0?-1:1;return t*u}return r===r?r:0}return Gn=n,Gn}var Dn,Cu;function ed(){if(Cu)return Dn;Cu=1;var e=bo();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Dn=a,Dn}var Un,Au;function rd(){if(Au)return Un;Au=1;var e=fo(),a=re(),u=ed(),n=Math.max;function r(t,s,i){var f=t==null?0:t.length;if(!f)return-1;var d=i==null?0:u(i);return d<0&&(d=n(f+d,0)),e(t,a(s,3),d)}return Un=r,Un}var Bn,Ou;function nd(){if(Ou)return Bn;Ou=1;var e=Xf(),a=rd(),u=e(a);return Bn=u,Bn}var Hn,Nu;function yo(){if(Nu)return Hn;Nu=1;var e=ai();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Hn=a,Hn}var Wn,ku;function td(){if(ku)return Wn;ku=1;var e=Jt(),a=Qs(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Wn=n,Wn}var Vn,xu;function id(){if(xu)return Vn;xu=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Vn=e,Vn}var jn,Lu;function si(){if(Lu)return jn;Lu=1;var e=oe();function a(u,n,r){for(var t=-1,s=u.length;++t<s;){var i=u[t],f=n(i);if(f!=null&&(d===void 0?f===f&&!e(f):r(f,d)))var d=f,o=i}return o}return jn=a,jn}var Kn,Pu;function ad(){if(Pu)return Kn;Pu=1;function e(a,u){return a>u}return Kn=e,Kn}var zn,Mu;function ud(){if(Mu)return zn;Mu=1;var e=si(),a=ad(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return zn=n,zn}var Yn,Fu;function mo(){if(Fu)return Yn;Fu=1;var e=I.require_baseAssignValue(),a=I.requireEq();function u(n,r,t){(t!==void 0&&!a(n[r],t)||t===void 0&&!(r in n))&&e(n,r,t)}return Yn=u,Yn}var $n,Gu;function sd(){if(Gu)return $n;Gu=1;var e=I.require_baseGetTag(),a=I.require_getPrototype(),u=I.requireIsObjectLike(),n="[object Object]",r=Function.prototype,t=Object.prototype,s=r.toString,i=t.hasOwnProperty,f=s.call(Object);function d(o){if(!u(o)||e(o)!=n)return!1;var c=a(o);if(c===null)return!0;var h=i.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==f}return $n=d,$n}var Xn,Du;function qo(){if(Du)return Xn;Du=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return Xn=e,Xn}var Zn,Uu;function od(){if(Uu)return Zn;Uu=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Zn=u,Zn}var Qn,Bu;function fd(){if(Bu)return Qn;Bu=1;var e=mo(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=co(),f=I.requireIsBuffer(),d=I.requireIsFunction(),o=I.requireIsObject(),c=sd(),h=I.requireIsTypedArray(),l=qo(),m=od();function p(v,g,b,_,y,q,R){var E=l(v,b),C=l(g,b),O=R.get(C);if(O){e(v,b,O);return}var S=q?q(E,C,b+"",v,g,R):void 0,x=S===void 0;if(x){var L=s(C),P=!L&&f(C),M=!L&&!P&&h(C);S=C,L||P||M?s(E)?S=E:i(E)?S=n(E):P?(x=!1,S=a(C,!0)):M?(x=!1,S=u(C,!0)):S=[]:c(C)||t(C)?(S=E,t(E)?S=m(E):(!o(E)||d(E))&&(S=r(C))):x=!1}x&&(R.set(C,S),y(S,C,_,q,R),R.delete(C)),e(v,b,S)}return Qn=p,Qn}var Jn,Hu;function dd(){if(Hu)return Jn;Hu=1;var e=I.require_Stack(),a=mo(),u=Jt(),n=fd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=qo();function i(f,d,o,c,h){f!==d&&u(d,function(l,m){if(h||(h=new e),r(l))n(f,d,m,o,i,c,h);else{var p=c?c(s(f,m),l,m+"",f,d,h):void 0;p===void 0&&(p=l),a(f,m,p)}},t)}return Jn=i,Jn}var et,Wu;function cd(){if(Wu)return et;Wu=1;var e=Ee(),a=we();function u(n){return e(function(r,t){var s=-1,i=t.length,f=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(f=n.length>3&&typeof f=="function"?(i--,f):void 0,d&&a(t[0],t[1],d)&&(f=i<3?void 0:f,i=1),r=Object(r);++s<i;){var o=t[s];o&&n(r,o,s,f)}return r})}return et=u,et}var rt,Vu;function hd(){if(Vu)return rt;Vu=1;var e=dd(),a=cd(),u=a(function(n,r,t){e(n,r,t)});return rt=u,rt}var nt,ju;function Eo(){if(ju)return nt;ju=1;function e(a,u){return a<u}return nt=e,nt}var tt,Ku;function ld(){if(Ku)return tt;Ku=1;var e=si(),a=Eo(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return tt=n,tt}var it,zu;function vd(){if(zu)return it;zu=1;var e=si(),a=re(),u=Eo();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return it=n,it}var at,Yu;function pd(){if(Yu)return at;Yu=1;var e=I.require_root(),a=function(){return e.Date.now()};return at=a,at}var ut,$u;function gd(){if($u)return ut;$u=1;var e=I.require_assignValue(),a=ye(),u=I.require_isIndex(),n=I.requireIsObject(),r=le();function t(s,i,f,d){if(!n(s))return s;i=a(i,s);for(var o=-1,c=i.length,h=c-1,l=s;l!=null&&++o<c;){var m=r(i[o]),p=f;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(o!=h){var v=l[m];p=d?d(v,m,l):void 0,p===void 0&&(p=n(v)?v:u(i[o+1])?[]:{})}e(l,m,p),l=l[m]}return s}return ut=t,ut}var st,Xu;function _d(){if(Xu)return st;Xu=1;var e=me(),a=gd(),u=ye();function n(r,t,s){for(var i=-1,f=t.length,d={};++i<f;){var o=t[i],c=e(r,o);s(c,o)&&a(d,u(o,r),c)}return d}return st=n,st}var ot,Zu;function bd(){if(Zu)return ot;Zu=1;var e=_d(),a=$s();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return ot=u,ot}var ft,Qu;function yd(){if(Qu)return ft;Qu=1;var e=yo(),a=so(),u=oo();function n(r){return u(a(r,void 0,e),r+"")}return ft=n,ft}var dt,Ju;function md(){if(Ju)return dt;Ju=1;var e=bd(),a=yd(),u=a(function(n,r){return n==null?{}:e(n,r)});return dt=u,dt}var ct,es;function qd(){if(es)return ct;es=1;var e=Math.ceil,a=Math.max;function u(n,r,t,s){for(var i=-1,f=a(e((r-n)/(t||1)),0),d=Array(f);f--;)d[s?f:++i]=n,n+=t;return d}return ct=u,ct}var ht,rs;function Ed(){if(rs)return ht;rs=1;var e=qd(),a=we(),u=bo();function n(r){return function(t,s,i){return i&&typeof i!="number"&&a(t,s,i)&&(s=i=void 0),t=u(t),s===void 0?(s=t,t=0):s=u(s),i=i===void 0?t<s?1:-1:u(i),e(t,s,i,r)}}return ht=n,ht}var lt,ns;function wd(){if(ns)return lt;ns=1;var e=Ed(),a=e();return lt=a,lt}var vt,ts;function Rd(){if(ts)return vt;ts=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return vt=e,vt}var pt,is;function Id(){if(is)return pt;is=1;var e=oe();function a(u,n){if(u!==n){var r=u!==void 0,t=u===null,s=u===u,i=e(u),f=n!==void 0,d=n===null,o=n===n,c=e(n);if(!d&&!c&&!i&&u>n||i&&f&&o&&!d&&!c||t&&f&&o||!r&&o||!s)return 1;if(!t&&!i&&!c&&u<n||c&&r&&s&&!t&&!i||d&&r&&s||!f&&s||!o)return-1}return 0}return pt=a,pt}var gt,as;function Td(){if(as)return gt;as=1;var e=Id();function a(u,n,r){for(var t=-1,s=u.criteria,i=n.criteria,f=s.length,d=r.length;++t<f;){var o=e(s[t],i[t]);if(o){if(t>=d)return o;var c=r[t];return o*(c=="desc"?-1:1)}}return u.index-n.index}return gt=a,gt}var _t,us;function Sd(){if(us)return _t;us=1;var e=be(),a=me(),u=re(),n=io(),r=Rd(),t=I.require_baseUnary(),s=Td(),i=ae(),f=I.requireIsArray();function d(o,c,h){c.length?c=e(c,function(p){return f(p)?function(v){return a(v,p.length===1?p[0]:p)}:p}):c=[i];var l=-1;c=e(c,t(u));var m=n(o,function(p,v,g){var b=e(c,function(_){return _(p)});return{criteria:b,index:++l,value:p}});return r(m,function(p,v){return s(p,v,h)})}return _t=d,_t}var bt,ss;function Cd(){if(ss)return bt;ss=1;var e=ai(),a=Sd(),u=Ee(),n=we(),r=u(function(t,s){if(t==null)return[];var i=s.length;return i>1&&n(t,s[0],s[1])?s=[]:i>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),a(t,e(s,1),[])});return bt=r,bt}var yt,os;function Ad(){if(os)return yt;os=1;var e=zs(),a=0;function u(n){var r=++a;return e(n)+r}return yt=u,yt}var mt,fs;function Od(){if(fs)return mt;fs=1;function e(a,u,n){for(var r=-1,t=a.length,s=u.length,i={};++r<t;){var f=r<s?u[r]:void 0;n(i,a[r],f)}return i}return mt=e,mt}var qt,ds;function Nd(){if(ds)return qt;ds=1;var e=I.require_assignValue(),a=Od();function u(n,r){return a(n||[],r||[],e)}return qt=u,qt}var Et,cs;function D(){if(cs)return Et;cs=1;var e;if(typeof ti=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ii(),defaults:$f(),each:eo(),filter:ro(),find:nd(),flatten:yo(),forEach:Js(),forIn:td(),has:no(),isUndefined:to(),last:id(),map:ao(),mapValues:Zs(),max:ud(),merge:hd(),min:ld(),minBy:vd(),now:pd(),pick:md(),range:wd(),reduce:uo(),sortBy:Cd(),uniqueId:Ad(),values:ho(),zipObject:Nd()}}catch{}return e||(e=window._),Et=e,Et}var wt,hs;function kd(){if(hs)return wt;hs=1,wt=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,r=n._prev;if(r!==n)return a(r),r},e.prototype.enqueue=function(n){var r=this._sentinel;n._prev&&n._next&&a(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r},e.prototype.toString=function(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,u)),t=t._prev;return"["+n.join(", ")+"]"};function a(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function u(n,r){if(n!=="_next"&&n!=="_prev")return r}return wt}var Rt,ls;function xd(){if(ls)return Rt;ls=1;var e=D(),a=Z().Graph,u=kd();Rt=r;var n=e.constant(1);function r(d,o){if(d.nodeCount()<=1)return[];var c=i(d,o||n),h=t(c.graph,c.buckets,c.zeroIdx);return e.flatten(e.map(h,function(l){return d.outEdges(l.v,l.w)}),!0)}function t(d,o,c){for(var h=[],l=o[o.length-1],m=o[0],p;d.nodeCount();){for(;p=m.dequeue();)s(d,o,c,p);for(;p=l.dequeue();)s(d,o,c,p);if(d.nodeCount()){for(var v=o.length-2;v>0;--v)if(p=o[v].dequeue(),p){h=h.concat(s(d,o,c,p,!0));break}}}return h}function s(d,o,c,h,l){var m=l?[]:void 0;return e.forEach(d.inEdges(h.v),function(p){var v=d.edge(p),g=d.node(p.v);l&&m.push({v:p.v,w:p.w}),g.out-=v,f(o,c,g)}),e.forEach(d.outEdges(h.v),function(p){var v=d.edge(p),g=p.w,b=d.node(g);b.in-=v,f(o,c,b)}),d.removeNode(h.v),m}function i(d,o){var c=new a,h=0,l=0;e.forEach(d.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(d.edges(),function(v){var g=c.edge(v.v,v.w)||0,b=o(v),_=g+b;c.setEdge(v.v,v.w,_),l=Math.max(l,c.node(v.v).out+=b),h=Math.max(h,c.node(v.w).in+=b)});var m=e.range(l+h+3).map(function(){return new u}),p=h+1;return e.forEach(c.nodes(),function(v){f(m,p,c.node(v))}),{graph:c,buckets:m,zeroIdx:p}}function f(d,o,c){c.out?c.in?d[c.out-c.in+o].enqueue(c):d[d.length-1].enqueue(c):d[0].enqueue(c)}return Rt}var It,vs;function Ld(){if(vs)return It;vs=1;var e=D(),a=xd();It={run:u,undo:r};function u(t){var s=t.graph().acyclicer==="greedy"?a(t,i(t)):n(t);e.forEach(s,function(f){var d=t.edge(f);t.removeEdge(f),d.forwardName=f.name,d.reversed=!0,t.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function i(f){return function(d){return f.edge(d).weight}}}function n(t){var s=[],i={},f={};function d(o){e.has(f,o)||(f[o]=!0,i[o]=!0,e.forEach(t.outEdges(o),function(c){e.has(i,c.w)?s.push(c):d(c.w)}),delete i[o])}return e.forEach(t.nodes(),d),s}function r(t){e.forEach(t.edges(),function(s){var i=t.edge(s);if(i.reversed){t.removeEdge(s);var f=i.forwardName;delete i.reversed,delete i.forwardName,t.setEdge(s.w,s.v,i,f)}})}return It}var Tt,ps;function z(){if(ps)return Tt;ps=1;var e=D(),a=Z().Graph;Tt={addDummyNode:u,simplify:n,asNonCompoundGraph:r,successorWeights:t,predecessorWeights:s,intersectRect:i,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:o,addBorderNode:c,maxRank:h,partition:l,time:m,notime:p};function u(v,g,b,_){var y;do y=e.uniqueId(_);while(v.hasNode(y));return b.dummy=g,v.setNode(y,b),y}function n(v){var g=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(b){g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){var _=g.edge(b.v,b.w)||{weight:0,minlen:1},y=v.edge(b);g.setEdge(b.v,b.w,{weight:_.weight+y.weight,minlen:Math.max(_.minlen,y.minlen)})}),g}function r(v){var g=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(b){v.children(b).length||g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){g.setEdge(b,v.edge(b))}),g}function t(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.outEdges(b),function(y){_[y.w]=(_[y.w]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function s(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.inEdges(b),function(y){_[y.v]=(_[y.v]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function i(v,g){var b=v.x,_=v.y,y=g.x-b,q=g.y-_,R=v.width/2,E=v.height/2;if(!y&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var C,O;return Math.abs(q)*R>Math.abs(y)*E?(q<0&&(E=-E),C=E*y/q,O=E):(y<0&&(R=-R),C=R,O=R*q/y),{x:b+C,y:_+O}}function f(v){var g=e.map(e.range(h(v)+1),function(){return[]});return e.forEach(v.nodes(),function(b){var _=v.node(b),y=_.rank;e.isUndefined(y)||(g[y][_.order]=b)}),g}function d(v){var g=e.min(e.map(v.nodes(),function(b){return v.node(b).rank}));e.forEach(v.nodes(),function(b){var _=v.node(b);e.has(_,"rank")&&(_.rank-=g)})}function o(v){var g=e.min(e.map(v.nodes(),function(q){return v.node(q).rank})),b=[];e.forEach(v.nodes(),function(q){var R=v.node(q).rank-g;b[R]||(b[R]=[]),b[R].push(q)});var _=0,y=v.graph().nodeRankFactor;e.forEach(b,function(q,R){e.isUndefined(q)&&R%y!==0?--_:_&&e.forEach(q,function(E){v.node(E).rank+=_})})}function c(v,g,b,_){var y={width:0,height:0};return arguments.length>=4&&(y.rank=b,y.order=_),u(v,"border",y,g)}function h(v){return e.max(e.map(v.nodes(),function(g){var b=v.node(g).rank;if(!e.isUndefined(b))return b}))}function l(v,g){var b={lhs:[],rhs:[]};return e.forEach(v,function(_){g(_)?b.lhs.push(_):b.rhs.push(_)}),b}function m(v,g){var b=e.now();try{return g()}finally{console.log(v+" time: "+(e.now()-b)+"ms")}}function p(v,g){return g()}return Tt}var St,gs;function Pd(){if(gs)return St;gs=1;var e=D(),a=z();St={run:u,undo:r};function u(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(s){n(t,s)})}function n(t,s){var i=s.v,f=t.node(i).rank,d=s.w,o=t.node(d).rank,c=s.name,h=t.edge(s),l=h.labelRank;if(o!==f+1){t.removeEdge(s);var m,p,v;for(v=0,++f;f<o;++v,++f)h.points=[],p={width:0,height:0,edgeLabel:h,edgeObj:s,rank:f},m=a.addDummyNode(t,"edge",p,"_d"),f===l&&(p.width=h.width,p.height=h.height,p.dummy="edge-label",p.labelpos=h.labelpos),t.setEdge(i,m,{weight:h.weight},c),v===0&&t.graph().dummyChains.push(m),i=m;t.setEdge(i,d,{weight:h.weight},c)}}function r(t){e.forEach(t.graph().dummyChains,function(s){var i=t.node(s),f=i.edgeLabel,d;for(t.setEdge(i.edgeObj,f);i.dummy;)d=t.successors(s)[0],t.removeNode(s),f.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(f.x=i.x,f.y=i.y,f.width=i.width,f.height=i.height),s=d,i=t.node(s)})}return St}var Ct,_s;function ge(){if(_s)return Ct;_s=1;var e=D();Ct={longestPath:a,slack:u};function a(n){var r={};function t(s){var i=n.node(s);if(e.has(r,s))return i.rank;r[s]=!0;var f=e.min(e.map(n.outEdges(s),function(d){return t(d.w)-n.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),i.rank=f}e.forEach(n.sources(),t)}function u(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}return Ct}var At,bs;function wo(){if(bs)return At;bs=1;var e=D(),a=Z().Graph,u=ge().slack;At=n;function n(i){var f=new a({directed:!1}),d=i.nodes()[0],o=i.nodeCount();f.setNode(d,{});for(var c,h;r(f,i)<o;)c=t(f,i),h=f.hasNode(c.v)?u(i,c):-u(i,c),s(f,i,h);return f}function r(i,f){function d(o){e.forEach(f.nodeEdges(o),function(c){var h=c.v,l=o===h?c.w:h;!i.hasNode(l)&&!u(f,c)&&(i.setNode(l,{}),i.setEdge(o,l,{}),d(l))})}return e.forEach(i.nodes(),d),i.nodeCount()}function t(i,f){return e.minBy(f.edges(),function(d){if(i.hasNode(d.v)!==i.hasNode(d.w))return u(f,d)})}function s(i,f,d){e.forEach(i.nodes(),function(o){f.node(o).rank+=d})}return At}var Ot,ys;function Md(){if(ys)return Ot;ys=1;var e=D(),a=wo(),u=ge().slack,n=ge().longestPath,r=Z().alg.preorder,t=Z().alg.postorder,s=z().simplify;Ot=i,i.initLowLimValues=c,i.initCutValues=f,i.calcCutValue=o,i.leaveEdge=l,i.enterEdge=m,i.exchangeEdges=p;function i(_){_=s(_),n(_);var y=a(_);c(y),f(y,_);for(var q,R;q=l(y);)R=m(y,_,q),p(y,_,q,R)}function f(_,y){var q=t(_,_.nodes());q=q.slice(0,q.length-1),e.forEach(q,function(R){d(_,y,R)})}function d(_,y,q){var R=_.node(q),E=R.parent;_.edge(q,E).cutvalue=o(_,y,q)}function o(_,y,q){var R=_.node(q),E=R.parent,C=!0,O=y.edge(q,E),S=0;return O||(C=!1,O=y.edge(E,q)),S=O.weight,e.forEach(y.nodeEdges(q),function(x){var L=x.v===q,P=L?x.w:x.v;if(P!==E){var M=L===C,G=y.edge(x).weight;if(S+=M?G:-G,g(_,q,P)){var B=_.edge(q,P).cutvalue;S+=M?-B:B}}}),S}function c(_,y){arguments.length<2&&(y=_.nodes()[0]),h(_,{},1,y)}function h(_,y,q,R,E){var C=q,O=_.node(R);return y[R]=!0,e.forEach(_.neighbors(R),function(S){e.has(y,S)||(q=h(_,y,q,S,R))}),O.low=C,O.lim=q++,E?O.parent=E:delete O.parent,q}function l(_){return e.find(_.edges(),function(y){return _.edge(y).cutvalue<0})}function m(_,y,q){var R=q.v,E=q.w;y.hasEdge(R,E)||(R=q.w,E=q.v);var C=_.node(R),O=_.node(E),S=C,x=!1;C.lim>O.lim&&(S=O,x=!0);var L=e.filter(y.edges(),function(P){return x===b(_,_.node(P.v),S)&&x!==b(_,_.node(P.w),S)});return e.minBy(L,function(P){return u(y,P)})}function p(_,y,q,R){var E=q.v,C=q.w;_.removeEdge(E,C),_.setEdge(R.v,R.w,{}),c(_),f(_,y),v(_,y)}function v(_,y){var q=e.find(_.nodes(),function(E){return!y.node(E).parent}),R=r(_,q);R=R.slice(1),e.forEach(R,function(E){var C=_.node(E).parent,O=y.edge(E,C),S=!1;O||(O=y.edge(C,E),S=!0),y.node(E).rank=y.node(C).rank+(S?O.minlen:-O.minlen)})}function g(_,y,q){return _.hasEdge(y,q)}function b(_,y,q){return q.low<=y.lim&&y.lim<=q.lim}return Ot}var Nt,ms;function Fd(){if(ms)return Nt;ms=1;var e=ge(),a=e.longestPath,u=wo(),n=Md();Nt=r;function r(f){switch(f.graph().ranker){case"network-simplex":i(f);break;case"tight-tree":s(f);break;case"longest-path":t(f);break;default:i(f)}}var t=a;function s(f){a(f),u(f)}function i(f){n(f)}return Nt}var kt,qs;function Gd(){if(qs)return kt;qs=1;var e=D();kt=a;function a(r){var t=n(r);e.forEach(r.graph().dummyChains,function(s){for(var i=r.node(s),f=i.edgeObj,d=u(r,t,f.v,f.w),o=d.path,c=d.lca,h=0,l=o[h],m=!0;s!==f.w;){if(i=r.node(s),m){for(;(l=o[h])!==c&&r.node(l).maxRank<i.rank;)h++;l===c&&(m=!1)}if(!m){for(;h<o.length-1&&r.node(l=o[h+1]).minRank<=i.rank;)h++;l=o[h]}r.setParent(s,l),s=r.successors(s)[0]}})}function u(r,t,s,i){var f=[],d=[],o=Math.min(t[s].low,t[i].low),c=Math.max(t[s].lim,t[i].lim),h,l;h=s;do h=r.parent(h),f.push(h);while(h&&(t[h].low>o||c>t[h].lim));for(l=h,h=i;(h=r.parent(h))!==l;)d.push(h);return{path:f.concat(d.reverse()),lca:l}}function n(r){var t={},s=0;function i(f){var d=s;e.forEach(r.children(f),i),t[f]={low:d,lim:s++}}return e.forEach(r.children(),i),t}return kt}var xt,Es;function Dd(){if(Es)return xt;Es=1;var e=D(),a=z();xt={run:u,cleanup:s};function u(i){var f=a.addDummyNode(i,"root",{},"_root"),d=r(i),o=e.max(e.values(d))-1,c=2*o+1;i.graph().nestingRoot=f,e.forEach(i.edges(),function(l){i.edge(l).minlen*=c});var h=t(i)+1;e.forEach(i.children(),function(l){n(i,f,c,h,o,d,l)}),i.graph().nodeRankFactor=c}function n(i,f,d,o,c,h,l){var m=i.children(l);if(!m.length){l!==f&&i.setEdge(f,l,{weight:0,minlen:d});return}var p=a.addBorderNode(i,"_bt"),v=a.addBorderNode(i,"_bb"),g=i.node(l);i.setParent(p,l),g.borderTop=p,i.setParent(v,l),g.borderBottom=v,e.forEach(m,function(b){n(i,f,d,o,c,h,b);var _=i.node(b),y=_.borderTop?_.borderTop:b,q=_.borderBottom?_.borderBottom:b,R=_.borderTop?o:2*o,E=y!==q?1:c-h[l]+1;i.setEdge(p,y,{weight:R,minlen:E,nestingEdge:!0}),i.setEdge(q,v,{weight:R,minlen:E,nestingEdge:!0})}),i.parent(l)||i.setEdge(f,p,{weight:0,minlen:c+h[l]})}function r(i){var f={};function d(o,c){var h=i.children(o);h&&h.length&&e.forEach(h,function(l){d(l,c+1)}),f[o]=c}return e.forEach(i.children(),function(o){d(o,1)}),f}function t(i){return e.reduce(i.edges(),function(f,d){return f+i.edge(d).weight},0)}function s(i){var f=i.graph();i.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(i.edges(),function(d){var o=i.edge(d);o.nestingEdge&&i.removeEdge(d)})}return xt}var Lt,ws;function Ud(){if(ws)return Lt;ws=1;var e=D(),a=z();Lt=u;function u(r){function t(s){var i=r.children(s),f=r.node(s);if(i.length&&e.forEach(i,t),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,o=f.maxRank+1;d<o;++d)n(r,"borderLeft","_bl",s,f,d),n(r,"borderRight","_br",s,f,d)}}e.forEach(r.children(),t)}function n(r,t,s,i,f,d){var o={width:0,height:0,rank:d,borderType:t},c=f[t][d-1],h=a.addDummyNode(r,"border",o,s);f[t][d]=h,r.setParent(h,i),c&&r.setEdge(c,h,{weight:1})}return Lt}var Pt,Rs;function Bd(){if(Rs)return Pt;Rs=1;var e=D();Pt={adjust:a,undo:u};function a(d){var o=d.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&n(d)}function u(d){var o=d.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&t(d),(o==="lr"||o==="rl")&&(i(d),n(d))}function n(d){e.forEach(d.nodes(),function(o){r(d.node(o))}),e.forEach(d.edges(),function(o){r(d.edge(o))})}function r(d){var o=d.width;d.width=d.height,d.height=o}function t(d){e.forEach(d.nodes(),function(o){s(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,s),e.has(c,"y")&&s(c)})}function s(d){d.y=-d.y}function i(d){e.forEach(d.nodes(),function(o){f(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,f),e.has(c,"x")&&f(c)})}function f(d){var o=d.x;d.x=d.y,d.y=o}return Pt}var Mt,Is;function Hd(){if(Is)return Mt;Is=1;var e=D();Mt=a;function a(u){var n={},r=e.filter(u.nodes(),function(d){return!u.children(d).length}),t=e.max(e.map(r,function(d){return u.node(d).rank})),s=e.map(e.range(t+1),function(){return[]});function i(d){if(!e.has(n,d)){n[d]=!0;var o=u.node(d);s[o.rank].push(d),e.forEach(u.successors(d),i)}}var f=e.sortBy(r,function(d){return u.node(d).rank});return e.forEach(f,i),s}return Mt}var Ft,Ts;function Wd(){if(Ts)return Ft;Ts=1;var e=D();Ft=a;function a(n,r){for(var t=0,s=1;s<r.length;++s)t+=u(n,r[s-1],r[s]);return t}function u(n,r,t){for(var s=e.zipObject(t,e.map(t,function(h,l){return l})),i=e.flatten(e.map(r,function(h){return e.sortBy(e.map(n.outEdges(h),function(l){return{pos:s[l.w],weight:n.edge(l).weight}}),"pos")}),!0),f=1;f<t.length;)f<<=1;var d=2*f-1;f-=1;var o=e.map(new Array(d),function(){return 0}),c=0;return e.forEach(i.forEach(function(h){var l=h.pos+f;o[l]+=h.weight;for(var m=0;l>0;)l%2&&(m+=o[l+1]),l=l-1>>1,o[l]+=h.weight;c+=h.weight*m})),c}return Ft}var Gt,Ss;function Vd(){if(Ss)return Gt;Ss=1;var e=D();Gt=a;function a(u,n){return e.map(n,function(r){var t=u.inEdges(r);if(t.length){var s=e.reduce(t,function(i,f){var d=u.edge(f),o=u.node(f.v);return{sum:i.sum+d.weight*o.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}return Gt}var Dt,Cs;function jd(){if(Cs)return Dt;Cs=1;var e=D();Dt=a;function a(r,t){var s={};e.forEach(r,function(f,d){var o=s[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(o.barycenter=f.barycenter,o.weight=f.weight)}),e.forEach(t.edges(),function(f){var d=s[f.v],o=s[f.w];!e.isUndefined(d)&&!e.isUndefined(o)&&(o.indegree++,d.out.push(s[f.w]))});var i=e.filter(s,function(f){return!f.indegree});return u(i)}function u(r){var t=[];function s(d){return function(o){o.merged||(e.isUndefined(o.barycenter)||e.isUndefined(d.barycenter)||o.barycenter>=d.barycenter)&&n(d,o)}}function i(d){return function(o){o.in.push(d),--o.indegree===0&&r.push(o)}}for(;r.length;){var f=r.pop();t.push(f),e.forEach(f.in.reverse(),s(f)),e.forEach(f.out,i(f))}return e.map(e.filter(t,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(r,t){var s=0,i=0;r.weight&&(s+=r.barycenter*r.weight,i+=r.weight),t.weight&&(s+=t.barycenter*t.weight,i+=t.weight),r.vs=t.vs.concat(r.vs),r.barycenter=s/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0}return Dt}var Ut,As;function Kd(){if(As)return Ut;As=1;var e=D(),a=z();Ut=u;function u(t,s){var i=a.partition(t,function(p){return e.has(p,"barycenter")}),f=i.lhs,d=e.sortBy(i.rhs,function(p){return-p.i}),o=[],c=0,h=0,l=0;f.sort(r(!!s)),l=n(o,d,l),e.forEach(f,function(p){l+=p.vs.length,o.push(p.vs),c+=p.barycenter*p.weight,h+=p.weight,l=n(o,d,l)});var m={vs:e.flatten(o,!0)};return h&&(m.barycenter=c/h,m.weight=h),m}function n(t,s,i){for(var f;s.length&&(f=e.last(s)).i<=i;)s.pop(),t.push(f.vs),i++;return i}function r(t){return function(s,i){return s.barycenter<i.barycenter?-1:s.barycenter>i.barycenter?1:t?i.i-s.i:s.i-i.i}}return Ut}var Bt,Os;function zd(){if(Os)return Bt;Os=1;var e=D(),a=Vd(),u=jd(),n=Kd();Bt=r;function r(i,f,d,o){var c=i.children(f),h=i.node(f),l=h?h.borderLeft:void 0,m=h?h.borderRight:void 0,p={};l&&(c=e.filter(c,function(q){return q!==l&&q!==m}));var v=a(i,c);e.forEach(v,function(q){if(i.children(q.v).length){var R=r(i,q.v,d,o);p[q.v]=R,e.has(R,"barycenter")&&s(q,R)}});var g=u(v,d);t(g,p);var b=n(g,o);if(l&&(b.vs=e.flatten([l,b.vs,m],!0),i.predecessors(l).length)){var _=i.node(i.predecessors(l)[0]),y=i.node(i.predecessors(m)[0]);e.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+_.order+y.order)/(b.weight+2),b.weight+=2}return b}function t(i,f){e.forEach(i,function(d){d.vs=e.flatten(d.vs.map(function(o){return f[o]?f[o].vs:o}),!0)})}function s(i,f){e.isUndefined(i.barycenter)?(i.barycenter=f.barycenter,i.weight=f.weight):(i.barycenter=(i.barycenter*i.weight+f.barycenter*f.weight)/(i.weight+f.weight),i.weight+=f.weight)}return Bt}var Ht,Ns;function Yd(){if(Ns)return Ht;Ns=1;var e=D(),a=Z().Graph;Ht=u;function u(r,t,s){var i=n(r),f=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(d){return r.node(d)});return e.forEach(r.nodes(),function(d){var o=r.node(d),c=r.parent(d);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(f.setNode(d),f.setParent(d,c||i),e.forEach(r[s](d),function(h){var l=h.v===d?h.w:h.v,m=f.edge(l,d),p=e.isUndefined(m)?0:m.weight;f.setEdge(l,d,{weight:r.edge(h).weight+p})}),e.has(o,"minRank")&&f.setNode(d,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),f}function n(r){for(var t;r.hasNode(t=e.uniqueId("_root")););return t}return Ht}var Wt,ks;function $d(){if(ks)return Wt;ks=1;var e=D();Wt=a;function a(u,n,r){var t={},s;e.forEach(r,function(i){for(var f=u.parent(i),d,o;f;){if(d=u.parent(f),d?(o=t[d],t[d]=f):(o=s,s=f),o&&o!==f){n.setEdge(o,f);return}f=d}})}return Wt}var Vt,xs;function Xd(){if(xs)return Vt;xs=1;var e=D(),a=Hd(),u=Wd(),n=zd(),r=Yd(),t=$d(),s=Z().Graph,i=z();Vt=f;function f(h){var l=i.maxRank(h),m=d(h,e.range(1,l+1),"inEdges"),p=d(h,e.range(l-1,-1,-1),"outEdges"),v=a(h);c(h,v);for(var g=Number.POSITIVE_INFINITY,b,_=0,y=0;y<4;++_,++y){o(_%2?m:p,_%4>=2),v=i.buildLayerMatrix(h);var q=u(h,v);q<g&&(y=0,b=e.cloneDeep(v),g=q)}c(h,b)}function d(h,l,m){return e.map(l,function(p){return r(h,p,m)})}function o(h,l){var m=new s;e.forEach(h,function(p){var v=p.graph().root,g=n(p,v,m,l);e.forEach(g.vs,function(b,_){p.node(b).order=_}),t(p,m,g.vs)})}function c(h,l){e.forEach(l,function(m){e.forEach(m,function(p,v){h.node(p).order=v})})}return Vt}var jt,Ls;function Zd(){if(Ls)return jt;Ls=1;var e=D(),a=Z().Graph,u=z();jt={positionX:m,findType1Conflicts:n,findType2Conflicts:r,addConflict:s,hasConflict:i,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:c,balance:l};function n(g,b){var _={};function y(q,R){var E=0,C=0,O=q.length,S=e.last(R);return e.forEach(R,function(x,L){var P=t(g,x),M=P?g.node(P).order:O;(P||x===S)&&(e.forEach(R.slice(C,L+1),function(G){e.forEach(g.predecessors(G),function(B){var te=g.node(B),ie=te.order;(ie<E||M<ie)&&!(te.dummy&&g.node(G).dummy)&&s(_,B,G)})}),C=L+1,E=M)}),R}return e.reduce(b,y),_}function r(g,b){var _={};function y(R,E,C,O,S){var x;e.forEach(e.range(E,C),function(L){x=R[L],g.node(x).dummy&&e.forEach(g.predecessors(x),function(P){var M=g.node(P);M.dummy&&(M.order<O||M.order>S)&&s(_,P,x)})})}function q(R,E){var C=-1,O,S=0;return e.forEach(E,function(x,L){if(g.node(x).dummy==="border"){var P=g.predecessors(x);P.length&&(O=g.node(P[0]).order,y(E,S,L,C,O),S=L,C=O)}y(E,S,E.length,O,R.length)}),E}return e.reduce(b,q),_}function t(g,b){if(g.node(b).dummy)return e.find(g.predecessors(b),function(_){return g.node(_).dummy})}function s(g,b,_){if(b>_){var y=b;b=_,_=y}var q=g[b];q||(g[b]=q={}),q[_]=!0}function i(g,b,_){if(b>_){var y=b;b=_,_=y}return e.has(g[b],_)}function f(g,b,_,y){var q={},R={},E={};return e.forEach(b,function(C){e.forEach(C,function(O,S){q[O]=O,R[O]=O,E[O]=S})}),e.forEach(b,function(C){var O=-1;e.forEach(C,function(S){var x=y(S);if(x.length){x=e.sortBy(x,function(B){return E[B]});for(var L=(x.length-1)/2,P=Math.floor(L),M=Math.ceil(L);P<=M;++P){var G=x[P];R[S]===S&&O<E[G]&&!i(_,S,G)&&(R[G]=S,R[S]=q[S]=q[G],O=E[G])}}})}),{root:q,align:R}}function d(g,b,_,y,q){var R={},E=o(g,b,_,q),C=q?"borderLeft":"borderRight";function O(L,P){for(var M=E.nodes(),G=M.pop(),B={};G;)B[G]?L(G):(B[G]=!0,M.push(G),M=M.concat(P(G))),G=M.pop()}function S(L){R[L]=E.inEdges(L).reduce(function(P,M){return Math.max(P,R[M.v]+E.edge(M))},0)}function x(L){var P=E.outEdges(L).reduce(function(G,B){return Math.min(G,R[B.w]-E.edge(B))},Number.POSITIVE_INFINITY),M=g.node(L);P!==Number.POSITIVE_INFINITY&&M.borderType!==C&&(R[L]=Math.max(R[L],P))}return O(S,E.predecessors.bind(E)),O(x,E.successors.bind(E)),e.forEach(y,function(L){R[L]=R[_[L]]}),R}function o(g,b,_,y){var q=new a,R=g.graph(),E=p(R.nodesep,R.edgesep,y);return e.forEach(b,function(C){var O;e.forEach(C,function(S){var x=_[S];if(q.setNode(x),O){var L=_[O],P=q.edge(L,x);q.setEdge(L,x,Math.max(E(g,S,O),P||0))}O=S})}),q}function c(g,b){return e.minBy(e.values(b),function(_){var y=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return e.forIn(_,function(R,E){var C=v(g,E)/2;y=Math.max(R+C,y),q=Math.min(R-C,q)}),y-q})}function h(g,b){var _=e.values(b),y=e.min(_),q=e.max(_);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(E){var C=R+E,O=g[C],S;if(O!==b){var x=e.values(O);S=E==="l"?y-e.min(x):q-e.max(x),S&&(g[C]=e.mapValues(O,function(L){return L+S}))}})})}function l(g,b){return e.mapValues(g.ul,function(_,y){if(b)return g[b.toLowerCase()][y];var q=e.sortBy(e.map(g,y));return(q[1]+q[2])/2})}function m(g){var b=u.buildLayerMatrix(g),_=e.merge(n(g,b),r(g,b)),y={},q;e.forEach(["u","d"],function(E){q=E==="u"?b:e.values(b).reverse(),e.forEach(["l","r"],function(C){C==="r"&&(q=e.map(q,function(L){return e.values(L).reverse()}));var O=(E==="u"?g.predecessors:g.successors).bind(g),S=f(g,q,_,O),x=d(g,q,S.root,S.align,C==="r");C==="r"&&(x=e.mapValues(x,function(L){return-L})),y[E+C]=x})});var R=c(g,y);return h(y,R),l(y,g.graph().align)}function p(g,b,_){return function(y,q,R){var E=y.node(q),C=y.node(R),O=0,S;if(O+=E.width/2,e.has(E,"labelpos"))switch(E.labelpos.toLowerCase()){case"l":S=-E.width/2;break;case"r":S=E.width/2;break}if(S&&(O+=_?S:-S),S=0,O+=(E.dummy?b:g)/2,O+=(C.dummy?b:g)/2,O+=C.width/2,e.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":S=C.width/2;break;case"r":S=-C.width/2;break}return S&&(O+=_?S:-S),S=0,O}}function v(g,b){return g.node(b).width}return jt}var Kt,Ps;function Qd(){if(Ps)return Kt;Ps=1;var e=D(),a=z(),u=Zd().positionX;Kt=n;function n(t){t=a.asNonCompoundGraph(t),r(t),e.forEach(u(t),function(s,i){t.node(i).x=s})}function r(t){var s=a.buildLayerMatrix(t),i=t.graph().ranksep,f=0;e.forEach(s,function(d){var o=e.max(e.map(d,function(c){return t.node(c).height}));e.forEach(d,function(c){t.node(c).y=f+o/2}),f+=o+i})}return Kt}var zt,Ms;function Jd(){if(Ms)return zt;Ms=1;var e=D(),a=Ld(),u=Pd(),n=Fd(),r=z().normalizeRanks,t=Gd(),s=z().removeEmptyRanks,i=Dd(),f=Ud(),d=Bd(),o=Xd(),c=Qd(),h=z(),l=Z().Graph;zt=m;function m(w,T){var A=T&&T.debugTiming?h.time:h.notime;A("layout",function(){var k=A(" buildLayoutGraph",function(){return O(w)});A(" runLayout",function(){p(k,A)}),A(" updateInputGraph",function(){v(w,k)})})}function p(w,T){T(" makeSpaceForEdgeLabels",function(){S(w)}),T(" removeSelfEdges",function(){N(w)}),T(" acyclic",function(){a.run(w)}),T(" nestingGraph.run",function(){i.run(w)}),T(" rank",function(){n(h.asNonCompoundGraph(w))}),T(" injectEdgeLabelProxies",function(){x(w)}),T(" removeEmptyRanks",function(){s(w)}),T(" nestingGraph.cleanup",function(){i.cleanup(w)}),T(" normalizeRanks",function(){r(w)}),T(" assignRankMinMax",function(){L(w)}),T(" removeEdgeLabelProxies",function(){P(w)}),T(" normalize.run",function(){u.run(w)}),T(" parentDummyChains",function(){t(w)}),T(" addBorderSegments",function(){f(w)}),T(" order",function(){o(w)}),T(" insertSelfEdges",function(){V(w)}),T(" adjustCoordinateSystem",function(){d.adjust(w)}),T(" position",function(){c(w)}),T(" positionSelfEdges",function(){j(w)}),T(" removeBorderNodes",function(){ie(w)}),T(" normalize.undo",function(){u.undo(w)}),T(" fixupEdgeLabelCoords",function(){B(w)}),T(" undoCoordinateSystem",function(){d.undo(w)}),T(" translateGraph",function(){M(w)}),T(" assignNodeIntersects",function(){G(w)}),T(" reversePoints",function(){te(w)}),T(" acyclic.undo",function(){a.undo(w)})}function v(w,T){e.forEach(w.nodes(),function(A){var k=w.node(A),F=T.node(A);k&&(k.x=F.x,k.y=F.y,T.children(A).length&&(k.width=F.width,k.height=F.height))}),e.forEach(w.edges(),function(A){var k=w.edge(A),F=T.edge(A);k.points=F.points,e.has(F,"x")&&(k.x=F.x,k.y=F.y)}),w.graph().width=T.graph().width,w.graph().height=T.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],y=["width","height"],q={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function O(w){var T=new l({multigraph:!0,compound:!0}),A=J(w.graph());return T.setGraph(e.merge({},b,Q(A,g),e.pick(A,_))),e.forEach(w.nodes(),function(k){var F=J(w.node(k));T.setNode(k,e.defaults(Q(F,y),q)),T.setParent(k,w.parent(k))}),e.forEach(w.edges(),function(k){var F=J(w.edge(k));T.setEdge(k,e.merge({},E,Q(F,R),e.pick(F,C)))}),T}function S(w){var T=w.graph();T.ranksep/=2,e.forEach(w.edges(),function(A){var k=w.edge(A);k.minlen*=2,k.labelpos.toLowerCase()!=="c"&&(T.rankdir==="TB"||T.rankdir==="BT"?k.width+=k.labeloffset:k.height+=k.labeloffset)})}function x(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(A.width&&A.height){var k=w.node(T.v),F=w.node(T.w),U={rank:(F.rank-k.rank)/2+k.rank,e:T};h.addDummyNode(w,"edge-proxy",U,"_ep")}})}function L(w){var T=0;e.forEach(w.nodes(),function(A){var k=w.node(A);k.borderTop&&(k.minRank=w.node(k.borderTop).rank,k.maxRank=w.node(k.borderBottom).rank,T=e.max(T,k.maxRank))}),w.graph().maxRank=T}function P(w){e.forEach(w.nodes(),function(T){var A=w.node(T);A.dummy==="edge-proxy"&&(w.edge(A.e).labelRank=A.rank,w.removeNode(T))})}function M(w){var T=Number.POSITIVE_INFINITY,A=0,k=Number.POSITIVE_INFINITY,F=0,U=w.graph(),H=U.marginx||0,Y=U.marginy||0;function pi($){var K=$.x,fe=$.y,gi=$.width,_i=$.height;T=Math.min(T,K-gi/2),A=Math.max(A,K+gi/2),k=Math.min(k,fe-_i/2),F=Math.max(F,fe+_i/2)}e.forEach(w.nodes(),function($){pi(w.node($))}),e.forEach(w.edges(),function($){var K=w.edge($);e.has(K,"x")&&pi(K)}),T-=H,k-=Y,e.forEach(w.nodes(),function($){var K=w.node($);K.x-=T,K.y-=k}),e.forEach(w.edges(),function($){var K=w.edge($);e.forEach(K.points,function(fe){fe.x-=T,fe.y-=k}),e.has(K,"x")&&(K.x-=T),e.has(K,"y")&&(K.y-=k)}),U.width=A-T+H,U.height=F-k+Y}function G(w){e.forEach(w.edges(),function(T){var A=w.edge(T),k=w.node(T.v),F=w.node(T.w),U,H;A.points?(U=A.points[0],H=A.points[A.points.length-1]):(A.points=[],U=F,H=k),A.points.unshift(h.intersectRect(k,U)),A.points.push(h.intersectRect(F,H))})}function B(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(e.has(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function te(w){e.forEach(w.edges(),function(T){var A=w.edge(T);A.reversed&&A.points.reverse()})}function ie(w){e.forEach(w.nodes(),function(T){if(w.children(T).length){var A=w.node(T),k=w.node(A.borderTop),F=w.node(A.borderBottom),U=w.node(e.last(A.borderLeft)),H=w.node(e.last(A.borderRight));A.width=Math.abs(H.x-U.x),A.height=Math.abs(F.y-k.y),A.x=U.x+A.width/2,A.y=k.y+A.height/2}}),e.forEach(w.nodes(),function(T){w.node(T).dummy==="border"&&w.removeNode(T)})}function N(w){e.forEach(w.edges(),function(T){if(T.v===T.w){var A=w.node(T.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:T,label:w.edge(T)}),w.removeEdge(T)}})}function V(w){var T=h.buildLayerMatrix(w);e.forEach(T,function(A){var k=0;e.forEach(A,function(F,U){var H=w.node(F);H.order=U+k,e.forEach(H.selfEdges,function(Y){h.addDummyNode(w,"selfedge",{width:Y.label.width,height:Y.label.height,rank:H.rank,order:U+ ++k,e:Y.e,label:Y.label},"_se")}),delete H.selfEdges})})}function j(w){e.forEach(w.nodes(),function(T){var A=w.node(T);if(A.dummy==="selfedge"){var k=w.node(A.e.v),F=k.x+k.width/2,U=k.y,H=A.x-F,Y=k.height/2;w.setEdge(A.e,A.label),w.removeNode(T),A.label.points=[{x:F+2*H/3,y:U-Y},{x:F+5*H/6,y:U-Y},{x:F+H,y:U},{x:F+5*H/6,y:U+Y},{x:F+2*H/3,y:U+Y}],A.label.x=A.x,A.label.y=A.y}})}function Q(w,T){return e.mapValues(e.pick(w,T),Number)}function J(w){var T={};return e.forEach(w,function(A,k){T[k.toLowerCase()]=A}),T}return zt}var Yt,Fs;function ec(){if(Fs)return Yt;Fs=1;var e=D(),a=z(),u=Z().Graph;Yt={debugOrdering:n};function n(r){var t=a.buildLayerMatrix(r),s=new u({compound:!0,multigraph:!0}).setGraph({});return e.forEach(r.nodes(),function(i){s.setNode(i,{label:i}),s.setParent(i,"layer"+r.node(i).rank)}),e.forEach(r.edges(),function(i){s.setEdge(i.v,i.w,{},i.name)}),e.forEach(t,function(i,f){var d="layer"+f;s.setNode(d,{rank:"same"}),e.reduce(i,function(o,c){return s.setEdge(o,c,{style:"invis"}),c})}),s}return Yt}var $t,Gs;function rc(){return Gs||(Gs=1,$t="0.8.5"),$t}var Xt,Ds;function nc(){return Ds||(Ds=1,Xt={graphlib:Z(),layout:Jd(),debug:ec(),util:{time:z().time,notime:z().notime},version:rc()}),Xt}var tc=nc();const Us=I.getDefaultExportFromCjs(tc),ne="root.Triggers";function Re(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=Re(e,r.source);t.length>0&&n.push(...t)}return n}function Ie(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=Ie(e,r.target);t.length>0&&n.push(...t)}return n}function Te(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=n(a),t=r?[r]:[];for(const s of u.value)if(s.target===a){t.push(s.sourceNode);const i=Te(e,s.source);i.length>0&&t.push(...i)}return t}function Se(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=[n(a)];for(const t of u.value)if(t.source===a){r.push(t.targetNode);const s=Se(e,t.target);s.length>0&&r.push(...s)}return r}function Ro(e,a){return[...Re(e,a),...Te(e,a),...Ie(e,a),...Se(e,a)]}function oi(e,a,u,n,r,t,s){const i=new Us.graphlib.Graph({compound:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:u?"LR":"TB"});for(const f of e.nodes)a.includes(f.uid)||i.setNode(f.uid,{width:ce(f),height:he(f)});for(const f of e.clusters||[]){const d=f.cluster.uid.replace(se,"");if(n.includes(f.cluster.uid)&&t.has(d)){const o={uid:d,type:"collapsedcluster"};i.setNode(d,{width:ce(o),height:he(o)}),s.push(o);continue}if(!r[f.cluster.uid]){i.setNode(f.cluster.uid,{clusterLabelPos:"top"});for(const o of f.nodes||[])a.includes(o)||i.setParent(o,f.cluster.uid)}if(f.parents){const o=r[f.cluster.uid]?r[f.cluster.uid]:f.cluster.uid;a.includes(o)||i.setParent(o,f.parents[f.parents.length-1])}}for(const f of e.edges||[]){const d=Ae(f.source,f.target,r,a);d&&i.setEdge(d.source,d.target)}return Us.layout(i),i}function de(e,a){const u={x:e.x-e.width/2,y:e.y-e.height/2};if(a){const n=de(a);u.x=u.x-n.x,u.y=u.y-n.y}return u}function ce(e){return Ce(e)||ve(e)?ee.TASK_WIDTH:ue(e)?ee.COLLAPSED_CLUSTER_WIDTH:ee.DOT_WIDTH}function he(e){return Ce(e)||ve(e)?ee.TASK_HEIGHT:ue(e)?ee.COLLAPSED_CLUSTER_HEIGHT:ee.DOT_HEIGHT}function Ce(e){return["GraphTask","SubflowGraphTask$1"].some(a=>e.type.endsWith(a))}function ve(e){return e.type.endsWith("GraphTrigger")}function ue(e){return e.type==="collapsedcluster"}function Ae(e,a,u,n){const r=u[e]?u[e]:e,t=u[a]?u[a]:a;return r===t||n.includes(r)||n.includes(t)?null:{target:t,source:r}}function Io(e){const{getEdges:a,getNodes:u,getElements:n,removeEdges:r,removeNodes:t,removeSelectedElements:s}=W.useVueFlow(e);r(a.value),t(u.value),s(n.value)}function fi(e){return e?I.flowHaveTasks(e):!1}function di(e,a){return e.uid===ne||ve(e)||ue(e)?"success":e.type.endsWith("SubflowGraphTask")?"primary":e.branchType=="ERROR"?"danger":e.branchType=="FINALLY"?"warning":a.has(e.uid)?"blue":"default"}function ci(e,a,u,n){var d,o,c;if(n.some(h=>e.source.startsWith(h)&&e.target.startsWith(h))||u.includes(e.target)||e.source.startsWith(ne)||e.target.startsWith(ne))return;const r=e.target.split(".");r.pop();const t=r.join("."),s=pe.afterLastDot(t),i=a[e.target];if(i.type.endsWith("GraphClusterEnd")&&((c=(o=(d=a[t])==null?void 0:d.task)==null?void 0:o.type)!=null&&c.endsWith("Parallel")))return;if(i.type.endsWith("GraphClusterRoot"))return[s,"before"];const f=a[e.source].type.endsWith("GraphClusterEnd");if(!f&&i.type.endsWith("GraphClusterEnd"))return[pe.afterLastDot(e.source),"after"];if(f){const h=e.source.split(".");return[h[h.length-2],"after"]}return[pe.afterLastDot(e.target),"before"]}function hi(e,a,u){const n=s=>{var f,d;const i=s.split(".");for(let o=1;o<=i.length;o++){const c=i.slice(0,o).join("."),h=(f=u[c])==null?void 0:f.branchType;if(h)return h}return((d=a[s])==null?void 0:d.branchType)??null},r=n(e.source),t=n(e.target);return[r,t].includes("ERROR")?"danger":[r,t].includes("FINALLY")?"warning":null}function To(e,a,u,n,r,t,s,i,f,d,o,c,h){var E,C,O,S,x,L,P,M,G,B,te,ie;const l=[],m=[se+ne];if(!n||r&&!fi(r)){l.push({id:"start",type:"dot",position:{x:0,y:0},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"end",type:"dot",position:s?{x:50,y:0}:{x:0,y:50},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"start|end",source:"start",target:"end",type:"edge",data:{edge:{relation:{relationType:"SEQUENTIAL"}},isFlowable:!1,initTask:!0,color:"primary"}});return}const p=oi(n,t,s,m,i,f,d),v={},g=n.clusters||[],b=g.map(N=>N.cluster),_=b.filter(N=>N.type.endsWith("SubflowGraphCluster")).map(N=>N.taskNode.uid),y=Object.fromEntries(n.nodes.concat(d).map(N=>[N.uid,N]));for(const N of g)if(!i[N.cluster.uid]&&!f.has(N.cluster.uid)){((C=(E=N.cluster.taskNode)==null?void 0:E.task)==null?void 0:C.type)==="io.kestra.core.tasks.flows.Dag"&&_.push(N.cluster.taskNode.uid);for(const w of N.nodes)v[w]=N.cluster;const V=N.cluster.uid,j=p.node(V),Q=N.parents?N.parents[N.parents.length-1]:void 0,J=li(N.cluster);l.push({id:V,type:"cluster",parentNode:Q,position:de(j,Q?p.node(Q):void 0),style:{width:V===ne&&s?ee.TRIGGER_CLUSTER_WIDTH+"px":j.width+"px",height:V===ne&&!s?ee.TRIGGER_CLUSTER_HEIGHT+"px":j.height+"px"},data:{collapsable:!0,color:J,taskNode:N.cluster.taskNode,unused:N.cluster.taskNode?y[N.cluster.taskNode.uid].unused:!1},class:`ks-topology-${J}-border rounded p-2`})}for(const N of n.nodes.concat(d))if(!t.includes(N.uid)){const V=p.node(N.uid);let j="task";_e(N)?j="dot":N.type.includes("GraphTrigger")?j="trigger":N.type==="collapsedcluster"&&(j="collapsedcluster");const Q=di(N,f),J=o||((S=(O=N.task)==null?void 0:O.type)==null?void 0:S.includes("$"))||_.some(w=>N.uid.startsWith(w+"."));l.push({id:N.uid,type:j,position:de(V,v[N.uid]?p.node(v[N.uid].uid):void 0),style:{width:ce(N)+"px",height:he(N)+"px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:v[N.uid]?v[N.uid].uid:void 0,draggable:j==="task"?!J:!1,data:{node:N,parent:v[N.uid]?v[N.uid]:void 0,namespace:((P=(L=(x=v[N.uid])==null?void 0:x.taskNode)==null?void 0:L.task)==null?void 0:P.namespace)??u,flowId:((B=(G=(M=v[N.uid])==null?void 0:M.taskNode)==null?void 0:G.task)==null?void 0:B.flowId)??a,isFlowable:((te=v[N.uid])==null?void 0:te.uid)===se+N.uid&&!N.type.endsWith("SubflowGraphTask"),color:Q,expandable:vi(N,v,i,h),isReadOnly:J,iconComponent:ue(N)?"lightning-bolt":null,executionId:N.executionId,unused:N.unused},class:N.type==="collapsedcluster"?`ks-topology-${Q}-border rounded`:""})}const q=b.filter(N=>N.taskNode).map(N=>N.taskNode.uid),R=n.edges??[];for(const N of R){const V=Ae(N.source,N.target,i,t);if(V){const j=hi(N,y,v);l.push({id:V.source+"|"+V.target,source:V.source,target:V.target,type:"edge",markerEnd:_e(y[V.target])?"":{id:"marker-"+(y[V.target].branchType?(ie=y[V.target].branchType)==null?void 0:ie.toLocaleLowerCase():"custom"),type:W.MarkerType.ArrowClosed,color:j?`var(--ks-border-${j})`:"var(--ks-topology-edge-color)"},data:{haveAdd:!o&&c&&ci(N,y,q,_),haveDashArray:y[N.source].type.endsWith("GraphTrigger")||y[N.target].type.endsWith("GraphTrigger")||N.source.startsWith(ne),color:j,unused:N.unused},style:{zIndex:10}})}}return l}function _e(e){return["GraphClusterRoot","GraphClusterFinally","GraphClusterAfterExecution","GraphClusterEnd"].some(a=>e.type.endsWith(a))}function li(e){return e.uid===se+ne?"success":e.type.endsWith("SubflowGraphCluster")?"primary":e.branchType==="ERROR"?"danger":"blue"}function vi(e,a,u,n){var r,t;return Object.values(u).includes(e.uid)||ue(e)?!0:e.type.endsWith("SubflowGraphTask")&&((t=(r=a[e.uid])==null?void 0:r.uid)==null?void 0:t.replace(se,""))!==e.uid&&n}function Zt(e){const u=e.nodes.map(n=>n.uid).filter(n=>!e.edges.some(r=>r.target===n));return e.nodes.filter(n=>u.includes(n.uid))}function So(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function Qt(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>So(e,t)).filter(Boolean),u.length===0)return[];r=u.map(t=>t.target),n=e.nodes.filter(t=>r.includes(t.uid)&&t.task)}while(!n.length);return n}function ic(e,a,u){if(!u)return!1;let n=Zt(e),r=Zt(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>Qt(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>Qt(e,s)),n.length!==r.length)return!1;for(const s of r){const i=n.find(o=>{var c,h;return((c=o.task)==null?void 0:c.id)===((h=s.task)==null?void 0:h.id)}),f=(i==null?void 0:i.task)??{},d=s.task??{};if(!i||Object.keys(f).length!==Object.keys(d).length)return!1;for(const o in s.task)if(f[o]!==d[o])return!1}}while(n.length&&r.length&&t-- >0);return t<=0?(console.warn("areTasksIdenticalInGraphUntilTask: Infinite loop detected, stopping comparison."),!1):!0}const ac={isClusterRootOrEnd:_e,computeClusterColor:li,isExpandableTask:vi,generateGraph:To,generateDagreGraph:oi,getNodePosition:de,getNodeWidth:ce,getNodeHeight:he,isTaskNode:Ce,isTriggerNode:ve,isCollapsedCluster:ue,replaceIfCollapsed:Ae,cleanGraph:Io,flowHaveTasks:fi,nodeColor:di,haveAdd:ci,getEdgeColor:hi,predecessorsEdge:Re,successorsEdge:Ie,predecessorsNode:Te,successorsNode:Se,linkedElements:Ro};exports.CLUSTER_PREFIX=se;exports.EVENTS=No;exports.NODE_SIZES=ee;exports.SECTIONS=Oo;exports.Utils=pe;exports.VueFlowUtils=ac;exports.areTasksIdenticalInGraphUntilTask=ic;exports.cleanGraph=Io;exports.computeClusterColor=li;exports.editorViewTypes=Lo;exports.executeFlowBehaviours=Mo;exports.flowHaveTasks=fi;exports.generateDagreGraph=oi;exports.generateGraph=To;exports.getEdgeColor=hi;exports.getNextTaskNodes=Qt;exports.getNodeHeight=he;exports.getNodePosition=de;exports.getNodeWidth=ce;exports.getRootNodes=Zt;exports.getTargetNodesEdges=So;exports.haveAdd=ci;exports.isClusterRootOrEnd=_e;exports.isCollapsedCluster=ue;exports.isExpandableTask=vi;exports.isTaskNode=Ce;exports.isTriggerNode=ve;exports.linkedElements=Ro;exports.logDisplayTypes=xo;exports.nodeColor=di;exports.predecessorsEdge=Re;exports.predecessorsNode=Te;exports.replaceIfCollapsed=Ae;exports.requireMapValues=Zs;exports.stateDisplayValues=Fo;exports.stateGlobalChartTypes=ko;exports.storageKeys=Po;exports.successorsEdge=Ie;exports.successorsNode=Se;
2
- //# sourceMappingURL=VueFlowUtils-CL70qtJ4.cjs.map
1
+ "use strict";const W=require("@vue-flow/core"),I=require("./FlowYamlUtils-DvtepVr2.cjs"),bi=require("vue"),Co=require("humanize-duration"),yi=require("moment"),Ao=require("moment-timezone"),Oo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},No={EDIT:"edit",DELETE:"delete",SHOW_DESCRIPTION:"showDescription",COLLAPSE:"collapse",EXPAND:"expand",OPEN_LINK:"openLink",ADD_TASK:"addTask",SHOW_LOGS:"showLogs",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",ADD_ERROR:"addError",EXPAND_DEPENDENCIES:"expandDependencies",SHOW_CONDITION:"showCondition",RUN_TASK:"runTask"},se="cluster_",ko={EXECUTIONS:"executions",TASKRUNS:"taskruns"},xo={ALL:"all",ERROR:"error",HIDDEN:"hidden",DEFAULT:"all"},ee={TASK_WIDTH:184,TASK_HEIGHT:44,TRIGGER_WIDTH:184,TRIGGER_HEIGHT:44,DOT_WIDTH:5,DOT_HEIGHT:5,COLLAPSED_CLUSTER_WIDTH:150,COLLAPSED_CLUSTER_HEIGHT:44,TRIGGER_CLUSTER_WIDTH:350,TRIGGER_CLUSTER_HEIGHT:180},Lo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Po={DISPLAY_EXECUTIONS_COLUMNS:"displayExecutionsColumns",DISPLAY_FLOW_EXECUTIONS_COLUMNS:"displayFlowExecutionsColumns",SELECTED_TENANT:"selectedTenant",EXECUTE_FLOW_BEHAVIOUR:"executeFlowBehaviour",SHOW_CHART:"showChart",SHOW_FLOWS_CHART:"showFlowsChart",SHOW_LOGS_CHART:"showLogsChart",DEFAULT_NAMESPACE:"defaultNamespace",LATEST_NAMESPACE:"latestNamespace",PAGINATION_SIZE:"paginationSize",IMPERSONATE:"impersonate",EDITOR_VIEW_TYPE:"editorViewType"},Mo={SAME_TAB:"same tab",NEW_TAB:"new tab"},Fo={INPROGRESS:"IN-PROGRESS"};var Oe,mi;function Go(){if(mi)return Oe;mi=1;function e(a){return function(u,n,r){for(var t=-1,s=Object(u),i=r(u),f=i.length;f--;){var d=i[a?f:++t];if(n(s[d],d,s)===!1)break}return u}}return Oe=e,Oe}var Ne,qi;function Jt(){if(qi)return Ne;qi=1;var e=Go(),a=e();return Ne=a,Ne}var ke,Ei;function ei(){if(Ei)return ke;Ei=1;var e=Jt(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return ke=u,ke}var xe,wi;function Do(){if(wi)return xe;wi=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return xe=a,xe}var Le,Ri;function Uo(){if(Ri)return Le;Ri=1;function e(a){return this.__data__.has(a)}return Le=e,Le}var Pe,Ii;function Bs(){if(Ii)return Pe;Ii=1;var e=I.require_MapCache(),a=Do(),u=Uo();function n(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new e;++t<s;)this.add(r[t])}return n.prototype.add=n.prototype.push=a,n.prototype.has=u,Pe=n,Pe}var Me,Ti;function Bo(){if(Ti)return Me;Ti=1;function e(a,u){for(var n=-1,r=a==null?0:a.length;++n<r;)if(u(a[n],n,a))return!0;return!1}return Me=e,Me}var Fe,Si;function Hs(){if(Si)return Fe;Si=1;function e(a,u){return a.has(u)}return Fe=e,Fe}var Ge,Ci;function Ws(){if(Ci)return Ge;Ci=1;var e=Bs(),a=Bo(),u=Hs(),n=1,r=2;function t(s,i,f,d,o,c){var h=f&n,l=s.length,m=i.length;if(l!=m&&!(h&&m>l))return!1;var p=c.get(s),v=c.get(i);if(p&&v)return p==i&&v==s;var g=-1,b=!0,_=f&r?new e:void 0;for(c.set(s,i),c.set(i,s);++g<l;){var y=s[g],q=i[g];if(d)var R=h?d(q,y,g,i,s,c):d(y,q,g,s,i,c);if(R!==void 0){if(R)continue;b=!1;break}if(_){if(!a(i,function(E,C){if(!u(_,C)&&(y===E||o(y,E,f,d,c)))return _.push(C)})){b=!1;break}}else if(!(y===q||o(y,q,f,d,c))){b=!1;break}}return c.delete(s),c.delete(i),b}return Ge=t,Ge}var De,Ai;function Ho(){if(Ai)return De;Ai=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return De=e,De}var Ue,Oi;function ri(){if(Oi)return Ue;Oi=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return Ue=e,Ue}var Be,Ni;function Wo(){if(Ni)return Be;Ni=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Ws(),r=Ho(),t=ri(),s=1,i=2,f="[object Boolean]",d="[object Date]",o="[object Error]",c="[object Map]",h="[object Number]",l="[object RegExp]",m="[object Set]",p="[object String]",v="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",_=e?e.prototype:void 0,y=_?_.valueOf:void 0;function q(R,E,C,O,S,x,L){switch(C){case b:if(R.byteLength!=E.byteLength||R.byteOffset!=E.byteOffset)return!1;R=R.buffer,E=E.buffer;case g:return!(R.byteLength!=E.byteLength||!x(new a(R),new a(E)));case f:case d:case h:return u(+R,+E);case o:return R.name==E.name&&R.message==E.message;case l:case p:return R==E+"";case c:var P=r;case m:var M=O&s;if(P||(P=t),R.size!=E.size&&!M)return!1;var G=L.get(R);if(G)return G==E;O|=i,L.set(R,E);var B=n(P(R),P(E),O,S,x,L);return L.delete(R),B;case v:if(y)return y.call(R)==y.call(E)}return!1}return Be=q,Be}var He,ki;function Vo(){if(ki)return He;ki=1;var e=I.require_getAllKeys(),a=1,u=Object.prototype,n=u.hasOwnProperty;function r(t,s,i,f,d,o){var c=i&a,h=e(t),l=h.length,m=e(s),p=m.length;if(l!=p&&!c)return!1;for(var v=l;v--;){var g=h[v];if(!(c?g in s:n.call(s,g)))return!1}var b=o.get(t),_=o.get(s);if(b&&_)return b==s&&_==t;var y=!0;o.set(t,s),o.set(s,t);for(var q=c;++v<l;){g=h[v];var R=t[g],E=s[g];if(f)var C=c?f(E,R,g,s,t,o):f(R,E,g,t,s,o);if(!(C===void 0?R===E||d(R,E,i,f,o):C)){y=!1;break}q||(q=g=="constructor")}if(y&&!q){var O=t.constructor,S=s.constructor;O!=S&&"constructor"in t&&"constructor"in s&&!(typeof O=="function"&&O instanceof O&&typeof S=="function"&&S instanceof S)&&(y=!1)}return o.delete(t),o.delete(s),y}return He=r,He}var We,xi;function jo(){if(xi)return We;xi=1;var e=I.require_Stack(),a=Ws(),u=Wo(),n=Vo(),r=I.require_getTag(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsTypedArray(),f=1,d="[object Arguments]",o="[object Array]",c="[object Object]",h=Object.prototype,l=h.hasOwnProperty;function m(p,v,g,b,_,y){var q=t(p),R=t(v),E=q?o:r(p),C=R?o:r(v);E=E==d?c:E,C=C==d?c:C;var O=E==c,S=C==c,x=E==C;if(x&&s(p)){if(!s(v))return!1;q=!0,O=!1}if(x&&!O)return y||(y=new e),q||i(p)?a(p,v,g,b,_,y):u(p,v,E,g,b,_,y);if(!(g&f)){var L=O&&l.call(p,"__wrapped__"),P=S&&l.call(v,"__wrapped__");if(L||P){var M=L?p.value():p,G=P?v.value():v;return y||(y=new e),_(M,G,g,b,y)}}return x?(y||(y=new e),n(p,v,g,b,_,y)):!1}return We=m,We}var Ve,Li;function Vs(){if(Li)return Ve;Li=1;var e=jo(),a=I.requireIsObjectLike();function u(n,r,t,s,i){return n===r?!0:n==null||r==null||!a(n)&&!a(r)?n!==n&&r!==r:e(n,r,t,s,u,i)}return Ve=u,Ve}var je,Pi;function Ko(){if(Pi)return je;Pi=1;var e=I.require_Stack(),a=Vs(),u=1,n=2;function r(t,s,i,f){var d=i.length,o=d,c=!f;if(t==null)return!o;for(t=Object(t);d--;){var h=i[d];if(c&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++d<o;){h=i[d];var l=h[0],m=t[l],p=h[1];if(c&&h[2]){if(m===void 0&&!(l in t))return!1}else{var v=new e;if(f)var g=f(m,p,l,t,s,v);if(!(g===void 0?a(p,m,u|n,f,v):g))return!1}}return!0}return je=r,je}var Ke,Mi;function js(){if(Mi)return Ke;Mi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return Ke=a,Ke}var ze,Fi;function zo(){if(Fi)return ze;Fi=1;var e=js(),a=I.requireKeys();function u(n){for(var r=a(n),t=r.length;t--;){var s=r[t],i=n[s];r[t]=[s,i,e(i)]}return r}return ze=u,ze}var Ye,Gi;function Ks(){if(Gi)return Ye;Gi=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return Ye=e,Ye}var $e,Di;function Yo(){if(Di)return $e;Di=1;var e=Ko(),a=zo(),u=Ks();function n(r){var t=a(r);return t.length==1&&t[0][2]?u(t[0][0],t[0][1]):function(s){return s===r||e(s,r,t)}}return $e=n,$e}var Xe,Ui;function oe(){if(Ui)return Xe;Ui=1;var e=I.require_baseGetTag(),a=I.requireIsObjectLike(),u="[object Symbol]";function n(r){return typeof r=="symbol"||a(r)&&e(r)==u}return Xe=n,Xe}var Ze,Bi;function ni(){if(Bi)return Ze;Bi=1;var e=I.requireIsArray(),a=oe(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function r(t,s){if(e(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||a(t)?!0:n.test(t)||!u.test(t)||s!=null&&t in Object(s)}return Ze=r,Ze}var Qe,Hi;function $o(){if(Hi)return Qe;Hi=1;var e=I.require_MapCache(),a="Expected a function";function u(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(a);var t=function(){var s=arguments,i=r?r.apply(this,s):s[0],f=t.cache;if(f.has(i))return f.get(i);var d=n.apply(this,s);return t.cache=f.set(i,d)||f,d};return t.cache=new(u.Cache||e),t}return u.Cache=e,Qe=u,Qe}var Je,Wi;function Xo(){if(Wi)return Je;Wi=1;var e=$o(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Je=u,Je}var er,Vi;function Zo(){if(Vi)return er;Vi=1;var e=Xo(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,n=e(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(a,function(s,i,f,d){t.push(f?d.replace(u,"$1"):i||s)}),t});return er=n,er}var rr,ji;function be(){if(ji)return rr;ji=1;function e(a,u){for(var n=-1,r=a==null?0:a.length,t=Array(r);++n<r;)t[n]=u(a[n],n,a);return t}return rr=e,rr}var nr,Ki;function Qo(){if(Ki)return nr;Ki=1;var e=I.require_Symbol(),a=be(),u=I.requireIsArray(),n=oe(),r=e?e.prototype:void 0,t=r?r.toString:void 0;function s(i){if(typeof i=="string")return i;if(u(i))return a(i,s)+"";if(n(i))return t?t.call(i):"";var f=i+"";return f=="0"&&1/i==-1/0?"-0":f}return nr=s,nr}var tr,zi;function zs(){if(zi)return tr;zi=1;var e=Qo();function a(u){return u==null?"":e(u)}return tr=a,tr}var ir,Yi;function ye(){if(Yi)return ir;Yi=1;var e=I.requireIsArray(),a=ni(),u=Zo(),n=zs();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return ir=r,ir}var ar,$i;function le(){if($i)return ar;$i=1;var e=oe();function a(u){if(typeof u=="string"||e(u))return u;var n=u+"";return n=="0"&&1/u==-1/0?"-0":n}return ar=a,ar}var ur,Xi;function me(){if(Xi)return ur;Xi=1;var e=ye(),a=le();function u(n,r){r=e(r,n);for(var t=0,s=r.length;n!=null&&t<s;)n=n[a(r[t++])];return t&&t==s?n:void 0}return ur=u,ur}var sr,Zi;function Jo(){if(Zi)return sr;Zi=1;var e=me();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return sr=a,sr}var or,Qi;function ef(){if(Qi)return or;Qi=1;function e(a,u){return a!=null&&u in Object(a)}return or=e,or}var fr,Ji;function Ys(){if(Ji)return fr;Ji=1;var e=ye(),a=I.requireIsArguments(),u=I.requireIsArray(),n=I.require_isIndex(),r=I.requireIsLength(),t=le();function s(i,f,d){f=e(f,i);for(var o=-1,c=f.length,h=!1;++o<c;){var l=t(f[o]);if(!(h=i!=null&&d(i,l)))break;i=i[l]}return h||++o!=c?h:(c=i==null?0:i.length,!!c&&r(c)&&n(l,c)&&(u(i)||a(i)))}return fr=s,fr}var dr,ea;function $s(){if(ea)return dr;ea=1;var e=ef(),a=Ys();function u(n,r){return n!=null&&a(n,r,e)}return dr=u,dr}var cr,ra;function rf(){if(ra)return cr;ra=1;var e=Vs(),a=Jo(),u=$s(),n=ni(),r=js(),t=Ks(),s=le(),i=1,f=2;function d(o,c){return n(o)&&r(c)?t(s(o),c):function(h){var l=a(h,o);return l===void 0&&l===c?u(h,o):e(c,l,i|f)}}return cr=d,cr}var hr,na;function ae(){if(na)return hr;na=1;function e(a){return a}return hr=e,hr}var lr,ta;function Xs(){if(ta)return lr;ta=1;function e(a){return function(u){return u==null?void 0:u[a]}}return lr=e,lr}var vr,ia;function nf(){if(ia)return vr;ia=1;var e=me();function a(u){return function(n){return e(n,u)}}return vr=a,vr}var pr,aa;function tf(){if(aa)return pr;aa=1;var e=Xs(),a=nf(),u=ni(),n=le();function r(t){return u(t)?e(n(t)):a(t)}return pr=r,pr}var gr,ua;function re(){if(ua)return gr;ua=1;var e=Yo(),a=rf(),u=ae(),n=I.requireIsArray(),r=tf();function t(s){return typeof s=="function"?s:s==null?u:typeof s=="object"?n(s)?a(s[0],s[1]):e(s):r(s)}return gr=t,gr}var _r,sa;function Zs(){if(sa)return _r;sa=1;var e=I.require_baseAssignValue(),a=ei(),u=re();function n(r,t){var s={};return t=u(t,3),a(r,function(i,f,d){e(s,f,t(i,f,d))}),s}return _r=n,_r}const af={en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"},fr:{y:()=>"a",mo:()=>"mo",w:()=>"se",d:()=>"j",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}},uf="dateFormat",sf="timezone",pe={capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),dateFilter:(e,a)=>{var t,s;const u=(t=bi.getCurrentInstance())==null?void 0:t.appContext.config.globalProperties.$moment().locale(),n=(s=bi.getCurrentInstance())==null?void 0:s.appContext.config.globalProperties.$moment(e).locale(u);let r;return a==="iso"?r="YYYY-MM-DD HH:mm:ss.SSS":r=a??localStorage.getItem(uf)??"llll",n.tz(localStorage.getItem(sf)??Ao.tz.guess()).format(r)},splitFirst(e,a){return e.split(a).slice(1).join(a)},duration(e){return yi.duration(e,yi.ISO_8601).asMilliseconds()/1e3},humanDuration(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=af,a.largest=2,typeof e!="number"&&(e=this.duration(e)),Co(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")},afterLastDot(e){return e.split(".").pop()},distinctFilter(e,a,u){return u.indexOf(e)===a}};function ti(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var br,oa;function of(){if(oa)return br;oa=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return br=u,br}var yr,fa;function ii(){if(fa)return yr;fa=1;function e(a){return function(){return a}}return yr=e,yr}var mr,da;function ff(){if(da)return mr;da=1;var e=I.requireIsArrayLike();function a(u,n){return function(r,t){if(r==null)return r;if(!e(r))return u(r,t);for(var s=r.length,i=n?s:-1,f=Object(r);(n?i--:++i<s)&&t(f[i],i,f)!==!1;);return r}}return mr=a,mr}var qr,ca;function qe(){if(ca)return qr;ca=1;var e=ei(),a=ff(),u=a(e);return qr=u,qr}var Er,ha;function Qs(){if(ha)return Er;ha=1;var e=ae();function a(u){return typeof u=="function"?u:e}return Er=a,Er}var wr,la;function Js(){if(la)return wr;la=1;var e=I.require_arrayEach(),a=qe(),u=Qs(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return wr=r,wr}var Rr,va;function eo(){return va||(va=1,Rr=Js()),Rr}var Ir,pa;function df(){if(pa)return Ir;pa=1;var e=qe();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Ir=a,Ir}var Tr,ga;function ro(){if(ga)return Tr;ga=1;var e=I.require_arrayFilter(),a=df(),u=re(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return Tr=r,Tr}var Sr,_a;function cf(){if(_a)return Sr;_a=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Sr=u,Sr}var Cr,ba;function no(){if(ba)return Cr;ba=1;var e=cf(),a=Ys();function u(n,r){return n!=null&&a(n,r,e)}return Cr=u,Cr}var Ar,ya;function hf(){if(ya)return Ar;ya=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArguments(),n=I.requireIsArray(),r=I.requireIsArrayLike(),t=I.requireIsBuffer(),s=I.require_isPrototype(),i=I.requireIsTypedArray(),f="[object Map]",d="[object Set]",o=Object.prototype,c=o.hasOwnProperty;function h(l){if(l==null)return!0;if(r(l)&&(n(l)||typeof l=="string"||typeof l.splice=="function"||t(l)||i(l)||u(l)))return!l.length;var m=a(l);if(m==f||m==d)return!l.size;if(s(l))return!e(l).length;for(var p in l)if(c.call(l,p))return!1;return!0}return Ar=h,Ar}var Or,ma;function to(){if(ma)return Or;ma=1;function e(a){return a===void 0}return Or=e,Or}var Nr,qa;function io(){if(qa)return Nr;qa=1;var e=qe(),a=I.requireIsArrayLike();function u(n,r){var t=-1,s=a(n)?Array(n.length):[];return e(n,function(i,f,d){s[++t]=r(i,f,d)}),s}return Nr=u,Nr}var kr,Ea;function ao(){if(Ea)return kr;Ea=1;var e=be(),a=re(),u=io(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return kr=r,kr}var xr,wa;function lf(){if(wa)return xr;wa=1;function e(a,u,n,r){var t=-1,s=a==null?0:a.length;for(r&&s&&(n=a[++t]);++t<s;)n=u(n,a[t],t,a);return n}return xr=e,xr}var Lr,Ra;function vf(){if(Ra)return Lr;Ra=1;function e(a,u,n,r,t){return t(a,function(s,i,f){n=r?(r=!1,s):u(n,s,i,f)}),n}return Lr=e,Lr}var Pr,Ia;function uo(){if(Ia)return Pr;Ia=1;var e=lf(),a=qe(),u=re(),n=vf(),r=I.requireIsArray();function t(s,i,f){var d=r(s)?e:n,o=arguments.length<3;return d(s,u(i,4),f,o,a)}return Pr=t,Pr}var Mr,Ta;function pf(){if(Ta)return Mr;Ta=1;var e=I.require_baseGetTag(),a=I.requireIsArray(),u=I.requireIsObjectLike(),n="[object String]";function r(t){return typeof t=="string"||!a(t)&&u(t)&&e(t)==n}return Mr=r,Mr}var Fr,Sa;function gf(){if(Sa)return Fr;Sa=1;var e=Xs(),a=e("length");return Fr=a,Fr}var Gr,Ca;function _f(){if(Ca)return Gr;Ca=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="\\u200d",i=RegExp("["+s+e+r+t+"]");function f(d){return i.test(d)}return Gr=f,Gr}var Dr,Aa;function bf(){if(Aa)return Dr;Aa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="["+e+"]",i="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+i+"|"+f+")",o="[^"+e+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",m=d+"?",p="["+t+"]?",v="(?:"+l+"(?:"+[o,c,h].join("|")+")"+p+m+")*",g=p+m+v,b="(?:"+[o+i+"?",i,c,h,s].join("|")+")",_=RegExp(f+"(?="+f+")|"+b+g,"g");function y(q){for(var R=_.lastIndex=0;_.test(q);)++R;return R}return Dr=y,Dr}var Ur,Oa;function yf(){if(Oa)return Ur;Oa=1;var e=gf(),a=_f(),u=bf();function n(r){return a(r)?u(r):e(r)}return Ur=n,Ur}var Br,Na;function mf(){if(Na)return Br;Na=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=pf(),r=yf(),t="[object Map]",s="[object Set]";function i(f){if(f==null)return 0;if(u(f))return n(f)?r(f):f.length;var d=a(f);return d==t||d==s?f.size:e(f).length}return Br=i,Br}var Hr,ka;function qf(){if(ka)return Hr;ka=1;var e=I.require_arrayEach(),a=I.require_baseCreate(),u=ei(),n=re(),r=I.require_getPrototype(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsFunction(),f=I.requireIsObject(),d=I.requireIsTypedArray();function o(c,h,l){var m=t(c),p=m||s(c)||d(c);if(h=n(h,4),l==null){var v=c&&c.constructor;p?l=m?new v:[]:f(c)?l=i(v)?a(r(c)):{}:l={}}return(p?e:u)(c,function(g,b,_){return h(l,g,b,_)}),l}return Hr=o,Hr}var Wr,xa;function Ef(){if(xa)return Wr;xa=1;var e=I.require_Symbol(),a=I.requireIsArguments(),u=I.requireIsArray(),n=e?e.isConcatSpreadable:void 0;function r(t){return u(t)||a(t)||!!(n&&t&&t[n])}return Wr=r,Wr}var Vr,La;function ai(){if(La)return Vr;La=1;var e=I.require_arrayPush(),a=Ef();function u(n,r,t,s,i){var f=-1,d=n.length;for(t||(t=a),i||(i=[]);++f<d;){var o=n[f];r>0&&t(o)?r>1?u(o,r-1,t,s,i):e(i,o):s||(i[i.length]=o)}return i}return Vr=u,Vr}var jr,Pa;function wf(){if(Pa)return jr;Pa=1;function e(a,u,n){switch(n.length){case 0:return a.call(u);case 1:return a.call(u,n[0]);case 2:return a.call(u,n[0],n[1]);case 3:return a.call(u,n[0],n[1],n[2])}return a.apply(u,n)}return jr=e,jr}var Kr,Ma;function so(){if(Ma)return Kr;Ma=1;var e=wf(),a=Math.max;function u(n,r,t){return r=a(r===void 0?n.length-1:r,0),function(){for(var s=arguments,i=-1,f=a(s.length-r,0),d=Array(f);++i<f;)d[i]=s[r+i];i=-1;for(var o=Array(r+1);++i<r;)o[i]=s[i];return o[r]=t(d),e(n,this,o)}}return Kr=u,Kr}var zr,Fa;function Rf(){if(Fa)return zr;Fa=1;var e=ii(),a=I.require_defineProperty(),u=ae(),n=a?function(r,t){return a(r,"toString",{configurable:!0,enumerable:!1,value:e(t),writable:!0})}:u;return zr=n,zr}var Yr,Ga;function If(){if(Ga)return Yr;Ga=1;var e=800,a=16,u=Date.now;function n(r){var t=0,s=0;return function(){var i=u(),f=a-(i-s);if(s=i,f>0){if(++t>=e)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}return Yr=n,Yr}var $r,Da;function oo(){if(Da)return $r;Da=1;var e=Rf(),a=If(),u=a(e);return $r=u,$r}var Xr,Ua;function Ee(){if(Ua)return Xr;Ua=1;var e=ae(),a=so(),u=oo();function n(r,t){return u(a(r,t,e),r+"")}return Xr=n,Xr}var Zr,Ba;function fo(){if(Ba)return Zr;Ba=1;function e(a,u,n,r){for(var t=a.length,s=n+(r?1:-1);r?s--:++s<t;)if(u(a[s],s,a))return s;return-1}return Zr=e,Zr}var Qr,Ha;function Tf(){if(Ha)return Qr;Ha=1;function e(a){return a!==a}return Qr=e,Qr}var Jr,Wa;function Sf(){if(Wa)return Jr;Wa=1;function e(a,u,n){for(var r=n-1,t=a.length;++r<t;)if(a[r]===u)return r;return-1}return Jr=e,Jr}var en,Va;function Cf(){if(Va)return en;Va=1;var e=fo(),a=Tf(),u=Sf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return en=n,en}var rn,ja;function Af(){if(ja)return rn;ja=1;var e=Cf();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return rn=a,rn}var nn,Ka;function Of(){if(Ka)return nn;Ka=1;function e(a,u,n){for(var r=-1,t=a==null?0:a.length;++r<t;)if(n(u,a[r]))return!0;return!1}return nn=e,nn}var tn,za;function Nf(){if(za)return tn;za=1;function e(){}return tn=e,tn}var an,Ya;function kf(){if(Ya)return an;Ya=1;var e=I.require_Set(),a=Nf(),u=ri(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return an=r,an}var un,$a;function xf(){if($a)return un;$a=1;var e=Bs(),a=Af(),u=Of(),n=Hs(),r=kf(),t=ri(),s=200;function i(f,d,o){var c=-1,h=a,l=f.length,m=!0,p=[],v=p;if(o)m=!1,h=u;else if(l>=s){var g=d?null:r(f);if(g)return t(g);m=!1,h=n,v=new e}else v=d?[]:p;e:for(;++c<l;){var b=f[c],_=d?d(b):b;if(b=o||b!==0?b:0,m&&_===_){for(var y=v.length;y--;)if(v[y]===_)continue e;d&&v.push(_),p.push(b)}else h(v,_,o)||(v!==p&&v.push(_),p.push(b))}return p}return un=i,un}var sn,Xa;function co(){if(Xa)return sn;Xa=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return sn=u,sn}var on,Za;function Lf(){if(Za)return on;Za=1;var e=ai(),a=Ee(),u=xf(),n=co(),r=a(function(t){return u(e(t,1,n,!0))});return on=r,on}var fn,Qa;function Pf(){if(Qa)return fn;Qa=1;var e=be();function a(u,n){return e(n,function(r){return u[r]})}return fn=a,fn}var dn,Ja;function ho(){if(Ja)return dn;Ja=1;var e=Pf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return dn=u,dn}var cn,eu;function X(){if(eu)return cn;eu=1;var e;if(typeof ti=="function")try{e={clone:of(),constant:ii(),each:eo(),filter:ro(),has:no(),isArray:I.requireIsArray(),isEmpty:hf(),isFunction:I.requireIsFunction(),isUndefined:to(),keys:I.requireKeys(),map:ao(),reduce:uo(),size:mf(),transform:qf(),union:Lf(),values:ho()}}catch{}return e||(e=window._),cn=e,cn}var hn,ru;function ui(){if(ru)return hn;ru=1;var e=X();hn=r;var a="\0",u="\0",n="";function r(o){this._isDirected=e.has(o,"directed")?o.directed:!0,this._isMultigraph=e.has(o,"multigraph")?o.multigraph:!1,this._isCompound=e.has(o,"compound")?o.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(o){return this._label=o,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultNodeLabelFn=o,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._in[c])})},r.prototype.sinks=function(){var o=this;return e.filter(this.nodes(),function(c){return e.isEmpty(o._out[c])})},r.prototype.setNodes=function(o,c){var h=arguments,l=this;return e.each(o,function(m){h.length>1?l.setNode(m,c):l.setNode(m)}),this},r.prototype.setNode=function(o,c){return e.has(this._nodes,o)?(arguments.length>1&&(this._nodes[o]=c),this):(this._nodes[o]=arguments.length>1?c:this._defaultNodeLabelFn(o),this._isCompound&&(this._parent[o]=u,this._children[o]={},this._children[u][o]=!0),this._in[o]={},this._preds[o]={},this._out[o]={},this._sucs[o]={},++this._nodeCount,this)},r.prototype.node=function(o){return this._nodes[o]},r.prototype.hasNode=function(o){return e.has(this._nodes,o)},r.prototype.removeNode=function(o){var c=this;if(e.has(this._nodes,o)){var h=function(l){c.removeEdge(c._edgeObjs[l])};delete this._nodes[o],this._isCompound&&(this._removeFromParentsChildList(o),delete this._parent[o],e.each(this.children(o),function(l){c.setParent(l)}),delete this._children[o]),e.each(e.keys(this._in[o]),h),delete this._in[o],delete this._preds[o],e.each(e.keys(this._out[o]),h),delete this._out[o],delete this._sucs[o],--this._nodeCount}return this},r.prototype.setParent=function(o,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=u;else{c+="";for(var h=c;!e.isUndefined(h);h=this.parent(h))if(h===o)throw new Error("Setting "+c+" as parent of "+o+" would create a cycle");this.setNode(c)}return this.setNode(o),this._removeFromParentsChildList(o),this._parent[o]=c,this._children[c][o]=!0,this},r.prototype._removeFromParentsChildList=function(o){delete this._children[this._parent[o]][o]},r.prototype.parent=function(o){if(this._isCompound){var c=this._parent[o];if(c!==u)return c}},r.prototype.children=function(o){if(e.isUndefined(o)&&(o=u),this._isCompound){var c=this._children[o];if(c)return e.keys(c)}else{if(o===u)return this.nodes();if(this.hasNode(o))return[]}},r.prototype.predecessors=function(o){var c=this._preds[o];if(c)return e.keys(c)},r.prototype.successors=function(o){var c=this._sucs[o];if(c)return e.keys(c)},r.prototype.neighbors=function(o){var c=this.predecessors(o);if(c)return e.union(c,this.successors(o))},r.prototype.isLeaf=function(o){var c;return this.isDirected()?c=this.successors(o):c=this.neighbors(o),c.length===0},r.prototype.filterNodes=function(o){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var h=this;e.each(this._nodes,function(p,v){o(v)&&c.setNode(v,p)}),e.each(this._edgeObjs,function(p){c.hasNode(p.v)&&c.hasNode(p.w)&&c.setEdge(p,h.edge(p))});var l={};function m(p){var v=h.parent(p);return v===void 0||c.hasNode(v)?(l[p]=v,v):v in l?l[v]:m(v)}return this._isCompound&&e.each(c.nodes(),function(p){c.setParent(p,m(p))}),c},r.prototype.setDefaultEdgeLabel=function(o){return e.isFunction(o)||(o=e.constant(o)),this._defaultEdgeLabelFn=o,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(o,c){var h=this,l=arguments;return e.reduce(o,function(m,p){return l.length>1?h.setEdge(m,p,c):h.setEdge(m,p),p}),this},r.prototype.setEdge=function(){var o,c,h,l,m=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(o=p.v,c=p.w,h=p.name,arguments.length===2&&(l=arguments[1],m=!0)):(o=p,c=arguments[1],h=arguments[3],arguments.length>2&&(l=arguments[2],m=!0)),o=""+o,c=""+c,e.isUndefined(h)||(h=""+h);var v=i(this._isDirected,o,c,h);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=l),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(o),this.setNode(c),this._edgeLabels[v]=m?l:this._defaultEdgeLabelFn(o,c,h);var g=f(this._isDirected,o,c,h);return o=g.v,c=g.w,Object.freeze(g),this._edgeObjs[v]=g,t(this._preds[c],o),t(this._sucs[o],c),this._in[c][v]=g,this._out[o][v]=g,this._edgeCount++,this},r.prototype.edge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return this._edgeLabels[l]},r.prototype.hasEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h);return e.has(this._edgeLabels,l)},r.prototype.removeEdge=function(o,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,o,c,h),m=this._edgeObjs[l];return m&&(o=m.v,c=m.w,delete this._edgeLabels[l],delete this._edgeObjs[l],s(this._preds[c],o),s(this._sucs[o],c),delete this._in[c][l],delete this._out[o][l],this._edgeCount--),this},r.prototype.inEdges=function(o,c){var h=this._in[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.v===c}):l}},r.prototype.outEdges=function(o,c){var h=this._out[o];if(h){var l=e.values(h);return c?e.filter(l,function(m){return m.w===c}):l}},r.prototype.nodeEdges=function(o,c){var h=this.inEdges(o,c);if(h)return h.concat(this.outEdges(o,c))};function t(o,c){o[c]?o[c]++:o[c]=1}function s(o,c){--o[c]||delete o[c]}function i(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}return m+n+p+n+(e.isUndefined(l)?a:l)}function f(o,c,h,l){var m=""+c,p=""+h;if(!o&&m>p){var v=m;m=p,p=v}var g={v:m,w:p};return l&&(g.name=l),g}function d(o,c){return i(o,c.v,c.w,c.name)}return hn}var ln,nu;function Mf(){return nu||(nu=1,ln="2.1.8"),ln}var vn,tu;function Ff(){return tu||(tu=1,vn={Graph:ui(),version:Mf()}),vn}var pn,iu;function Gf(){if(iu)return pn;iu=1;var e=X(),a=ui();pn={write:u,read:t};function u(s){var i={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:r(s)};return e.isUndefined(s.graph())||(i.value=e.clone(s.graph())),i}function n(s){return e.map(s.nodes(),function(i){var f=s.node(i),d=s.parent(i),o={v:i};return e.isUndefined(f)||(o.value=f),e.isUndefined(d)||(o.parent=d),o})}function r(s){return e.map(s.edges(),function(i){var f=s.edge(i),d={v:i.v,w:i.w};return e.isUndefined(i.name)||(d.name=i.name),e.isUndefined(f)||(d.value=f),d})}function t(s){var i=new a(s.options).setGraph(s.value);return e.each(s.nodes,function(f){i.setNode(f.v,f.value),f.parent&&i.setParent(f.v,f.parent)}),e.each(s.edges,function(f){i.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),i}return pn}var gn,au;function Df(){if(au)return gn;au=1;var e=X();gn=a;function a(u){var n={},r=[],t;function s(i){e.has(n,i)||(n[i]=!0,t.push(i),e.each(u.successors(i),s),e.each(u.predecessors(i),s))}return e.each(u.nodes(),function(i){t=[],s(i),t.length&&r.push(t)}),r}return gn}var _n,uu;function lo(){if(uu)return _n;uu=1;var e=X();_n=a;function a(){this._arr=[],this._keyIndices={}}return a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map(function(u){return u.key})},a.prototype.has=function(u){return e.has(this._keyIndices,u)},a.prototype.priority=function(u){var n=this._keyIndices[u];if(n!==void 0)return this._arr[n].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(u,n){var r=this._keyIndices;if(u=String(u),!e.has(r,u)){var t=this._arr,s=t.length;return r[u]=s,t.push({key:u,priority:n}),this._decrease(s),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},a.prototype.decrease=function(u,n){var r=this._keyIndices[u];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},a.prototype._heapify=function(u){var n=this._arr,r=2*u,t=r+1,s=u;r<n.length&&(s=n[r].priority<n[s].priority?r:s,t<n.length&&(s=n[t].priority<n[s].priority?t:s),s!==u&&(this._swap(u,s),this._heapify(s)))},a.prototype._decrease=function(u){for(var n=this._arr,r=n[u].priority,t;u!==0&&(t=u>>1,!(n[t].priority<r));)this._swap(u,t),u=t},a.prototype._swap=function(u,n){var r=this._arr,t=this._keyIndices,s=r[u],i=r[n];r[u]=i,r[n]=s,t[i.key]=u,t[s.key]=n},_n}var bn,su;function vo(){if(su)return bn;su=1;var e=X(),a=lo();bn=n;var u=e.constant(1);function n(t,s,i,f){return r(t,String(s),i||u,f||function(d){return t.outEdges(d)})}function r(t,s,i,f){var d={},o=new a,c,h,l=function(m){var p=m.v!==c?m.v:m.w,v=d[p],g=i(m),b=h.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+g);b<v.distance&&(v.distance=b,v.predecessor=c,o.decrease(p,b))};for(t.nodes().forEach(function(m){var p=m===s?0:Number.POSITIVE_INFINITY;d[m]={distance:p},o.add(m,p)});o.size()>0&&(c=o.removeMin(),h=d[c],h.distance!==Number.POSITIVE_INFINITY);)f(c).forEach(l);return d}return bn}var yn,ou;function Uf(){if(ou)return yn;ou=1;var e=vo(),a=X();yn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return yn}var mn,fu;function po(){if(fu)return mn;fu=1;var e=X();mn=a;function a(u){var n=0,r=[],t={},s=[];function i(f){var d=t[f]={onStack:!0,lowlink:n,index:n++};if(r.push(f),u.successors(f).forEach(function(h){e.has(t,h)?t[h].onStack&&(d.lowlink=Math.min(d.lowlink,t[h].index)):(i(h),d.lowlink=Math.min(d.lowlink,t[h].lowlink))}),d.lowlink===d.index){var o=[],c;do c=r.pop(),t[c].onStack=!1,o.push(c);while(f!==c);s.push(o)}}return u.nodes().forEach(function(f){e.has(t,f)||i(f)}),s}return mn}var qn,du;function Bf(){if(du)return qn;du=1;var e=X(),a=po();qn=u;function u(n){return e.filter(a(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return qn}var En,cu;function Hf(){if(cu)return En;cu=1;var e=X();En=u;var a=e.constant(1);function u(r,t,s){return n(r,t||a,s||function(i){return r.outEdges(i)})}function n(r,t,s){var i={},f=r.nodes();return f.forEach(function(d){i[d]={},i[d][d]={distance:0},f.forEach(function(o){d!==o&&(i[d][o]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(o){var c=o.v===d?o.w:o.v,h=t(o);i[d][c]={distance:h,predecessor:d}})}),f.forEach(function(d){var o=i[d];f.forEach(function(c){var h=i[c];f.forEach(function(l){var m=h[d],p=o[l],v=h[l],g=m.distance+p.distance;g<v.distance&&(v.distance=g,v.predecessor=p.predecessor)})})}),i}return En}var wn,hu;function go(){if(hu)return wn;hu=1;var e=X();wn=a,a.CycleException=u;function a(n){var r={},t={},s=[];function i(f){if(e.has(t,f))throw new u;e.has(r,f)||(t[f]=!0,r[f]=!0,e.each(n.predecessors(f),i),delete t[f],s.push(f))}if(e.each(n.sinks(),i),e.size(r)!==n.nodeCount())throw new u;return s}function u(){}return u.prototype=new Error,wn}var Rn,lu;function Wf(){if(lu)return Rn;lu=1;var e=go();Rn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Rn}var In,vu;function _o(){if(vu)return In;vu=1;var e=X();In=a;function a(n,r,t){e.isArray(r)||(r=[r]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],f={};return e.each(r,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);u(n,d,t==="post",f,s,i)}),i}function u(n,r,t,s,i,f){e.has(s,r)||(s[r]=!0,t||f.push(r),e.each(i(r),function(d){u(n,d,t,s,i,f)}),t&&f.push(r))}return In}var Tn,pu;function Vf(){if(pu)return Tn;pu=1;var e=_o();Tn=a;function a(u,n){return e(u,n,"post")}return Tn}var Sn,gu;function jf(){if(gu)return Sn;gu=1;var e=_o();Sn=a;function a(u,n){return e(u,n,"pre")}return Sn}var Cn,_u;function Kf(){if(_u)return Cn;_u=1;var e=X(),a=ui(),u=lo();Cn=n;function n(r,t){var s=new a,i={},f=new u,d;function o(h){var l=h.v===d?h.w:h.v,m=f.priority(l);if(m!==void 0){var p=t(h);p<m&&(i[l]=d,f.decrease(l,p))}}if(r.nodeCount()===0)return s;e.each(r.nodes(),function(h){f.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),f.decrease(r.nodes()[0],0);for(var c=!1;f.size()>0;){if(d=f.removeMin(),e.has(i,d))s.setEdge(d,i[d]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(d).forEach(o)}return s}return Cn}var An,bu;function zf(){return bu||(bu=1,An={components:Df(),dijkstra:vo(),dijkstraAll:Uf(),findCycles:Bf(),floydWarshall:Hf(),isAcyclic:Wf(),postorder:Vf(),preorder:jf(),prim:Kf(),tarjan:po(),topsort:go()}),An}var On,yu;function Yf(){if(yu)return On;yu=1;var e=Ff();return On={Graph:e.Graph,json:Gf(),alg:zf(),version:e.version},On}var Nn,mu;function Z(){if(mu)return Nn;mu=1;var e;if(typeof ti=="function")try{e=Yf()}catch{}return e||(e=window.graphlib),Nn=e,Nn}var kn,qu;function we(){if(qu)return kn;qu=1;var e=I.requireEq(),a=I.requireIsArrayLike(),u=I.require_isIndex(),n=I.requireIsObject();function r(t,s,i){if(!n(i))return!1;var f=typeof s;return(f=="number"?a(i)&&u(s,i.length):f=="string"&&s in i)?e(i[s],t):!1}return kn=r,kn}var xn,Eu;function $f(){if(Eu)return xn;Eu=1;var e=Ee(),a=I.requireEq(),u=we(),n=I.requireKeysIn(),r=Object.prototype,t=r.hasOwnProperty,s=e(function(i,f){i=Object(i);var d=-1,o=f.length,c=o>2?f[2]:void 0;for(c&&u(f[0],f[1],c)&&(o=1);++d<o;)for(var h=f[d],l=n(h),m=-1,p=l.length;++m<p;){var v=l[m],g=i[v];(g===void 0||a(g,r[v])&&!t.call(i,v))&&(i[v]=h[v])}return i});return xn=s,xn}var Ln,wu;function Xf(){if(wu)return Ln;wu=1;var e=re(),a=I.requireIsArrayLike(),u=I.requireKeys();function n(r){return function(t,s,i){var f=Object(t);if(!a(t)){var d=e(s,3);t=u(t),s=function(c){return d(f[c],c,f)}}var o=r(t,s,i);return o>-1?f[d?t[o]:o]:void 0}}return Ln=n,Ln}var Pn,Ru;function Zf(){if(Ru)return Pn;Ru=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return Pn=a,Pn}var Mn,Iu;function Qf(){if(Iu)return Mn;Iu=1;var e=Zf(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return Mn=u,Mn}var Fn,Tu;function Jf(){if(Tu)return Fn;Tu=1;var e=Qf(),a=I.requireIsObject(),u=oe(),n=NaN,r=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=parseInt;function f(d){if(typeof d=="number")return d;if(u(d))return n;if(a(d)){var o=typeof d.valueOf=="function"?d.valueOf():d;d=a(o)?o+"":o}if(typeof d!="string")return d===0?d:+d;d=e(d);var c=t.test(d);return c||s.test(d)?i(d.slice(2),c?2:8):r.test(d)?n:+d}return Fn=f,Fn}var Gn,Su;function bo(){if(Su)return Gn;Su=1;var e=Jf(),a=1/0,u=17976931348623157e292;function n(r){if(!r)return r===0?r:0;if(r=e(r),r===a||r===-1/0){var t=r<0?-1:1;return t*u}return r===r?r:0}return Gn=n,Gn}var Dn,Cu;function ed(){if(Cu)return Dn;Cu=1;var e=bo();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Dn=a,Dn}var Un,Au;function rd(){if(Au)return Un;Au=1;var e=fo(),a=re(),u=ed(),n=Math.max;function r(t,s,i){var f=t==null?0:t.length;if(!f)return-1;var d=i==null?0:u(i);return d<0&&(d=n(f+d,0)),e(t,a(s,3),d)}return Un=r,Un}var Bn,Ou;function nd(){if(Ou)return Bn;Ou=1;var e=Xf(),a=rd(),u=e(a);return Bn=u,Bn}var Hn,Nu;function yo(){if(Nu)return Hn;Nu=1;var e=ai();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Hn=a,Hn}var Wn,ku;function td(){if(ku)return Wn;ku=1;var e=Jt(),a=Qs(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Wn=n,Wn}var Vn,xu;function id(){if(xu)return Vn;xu=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Vn=e,Vn}var jn,Lu;function si(){if(Lu)return jn;Lu=1;var e=oe();function a(u,n,r){for(var t=-1,s=u.length;++t<s;){var i=u[t],f=n(i);if(f!=null&&(d===void 0?f===f&&!e(f):r(f,d)))var d=f,o=i}return o}return jn=a,jn}var Kn,Pu;function ad(){if(Pu)return Kn;Pu=1;function e(a,u){return a>u}return Kn=e,Kn}var zn,Mu;function ud(){if(Mu)return zn;Mu=1;var e=si(),a=ad(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return zn=n,zn}var Yn,Fu;function mo(){if(Fu)return Yn;Fu=1;var e=I.require_baseAssignValue(),a=I.requireEq();function u(n,r,t){(t!==void 0&&!a(n[r],t)||t===void 0&&!(r in n))&&e(n,r,t)}return Yn=u,Yn}var $n,Gu;function sd(){if(Gu)return $n;Gu=1;var e=I.require_baseGetTag(),a=I.require_getPrototype(),u=I.requireIsObjectLike(),n="[object Object]",r=Function.prototype,t=Object.prototype,s=r.toString,i=t.hasOwnProperty,f=s.call(Object);function d(o){if(!u(o)||e(o)!=n)return!1;var c=a(o);if(c===null)return!0;var h=i.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==f}return $n=d,$n}var Xn,Du;function qo(){if(Du)return Xn;Du=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return Xn=e,Xn}var Zn,Uu;function od(){if(Uu)return Zn;Uu=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Zn=u,Zn}var Qn,Bu;function fd(){if(Bu)return Qn;Bu=1;var e=mo(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=co(),f=I.requireIsBuffer(),d=I.requireIsFunction(),o=I.requireIsObject(),c=sd(),h=I.requireIsTypedArray(),l=qo(),m=od();function p(v,g,b,_,y,q,R){var E=l(v,b),C=l(g,b),O=R.get(C);if(O){e(v,b,O);return}var S=q?q(E,C,b+"",v,g,R):void 0,x=S===void 0;if(x){var L=s(C),P=!L&&f(C),M=!L&&!P&&h(C);S=C,L||P||M?s(E)?S=E:i(E)?S=n(E):P?(x=!1,S=a(C,!0)):M?(x=!1,S=u(C,!0)):S=[]:c(C)||t(C)?(S=E,t(E)?S=m(E):(!o(E)||d(E))&&(S=r(C))):x=!1}x&&(R.set(C,S),y(S,C,_,q,R),R.delete(C)),e(v,b,S)}return Qn=p,Qn}var Jn,Hu;function dd(){if(Hu)return Jn;Hu=1;var e=I.require_Stack(),a=mo(),u=Jt(),n=fd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=qo();function i(f,d,o,c,h){f!==d&&u(d,function(l,m){if(h||(h=new e),r(l))n(f,d,m,o,i,c,h);else{var p=c?c(s(f,m),l,m+"",f,d,h):void 0;p===void 0&&(p=l),a(f,m,p)}},t)}return Jn=i,Jn}var et,Wu;function cd(){if(Wu)return et;Wu=1;var e=Ee(),a=we();function u(n){return e(function(r,t){var s=-1,i=t.length,f=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(f=n.length>3&&typeof f=="function"?(i--,f):void 0,d&&a(t[0],t[1],d)&&(f=i<3?void 0:f,i=1),r=Object(r);++s<i;){var o=t[s];o&&n(r,o,s,f)}return r})}return et=u,et}var rt,Vu;function hd(){if(Vu)return rt;Vu=1;var e=dd(),a=cd(),u=a(function(n,r,t){e(n,r,t)});return rt=u,rt}var nt,ju;function Eo(){if(ju)return nt;ju=1;function e(a,u){return a<u}return nt=e,nt}var tt,Ku;function ld(){if(Ku)return tt;Ku=1;var e=si(),a=Eo(),u=ae();function n(r){return r&&r.length?e(r,u,a):void 0}return tt=n,tt}var it,zu;function vd(){if(zu)return it;zu=1;var e=si(),a=re(),u=Eo();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return it=n,it}var at,Yu;function pd(){if(Yu)return at;Yu=1;var e=I.require_root(),a=function(){return e.Date.now()};return at=a,at}var ut,$u;function gd(){if($u)return ut;$u=1;var e=I.require_assignValue(),a=ye(),u=I.require_isIndex(),n=I.requireIsObject(),r=le();function t(s,i,f,d){if(!n(s))return s;i=a(i,s);for(var o=-1,c=i.length,h=c-1,l=s;l!=null&&++o<c;){var m=r(i[o]),p=f;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(o!=h){var v=l[m];p=d?d(v,m,l):void 0,p===void 0&&(p=n(v)?v:u(i[o+1])?[]:{})}e(l,m,p),l=l[m]}return s}return ut=t,ut}var st,Xu;function _d(){if(Xu)return st;Xu=1;var e=me(),a=gd(),u=ye();function n(r,t,s){for(var i=-1,f=t.length,d={};++i<f;){var o=t[i],c=e(r,o);s(c,o)&&a(d,u(o,r),c)}return d}return st=n,st}var ot,Zu;function bd(){if(Zu)return ot;Zu=1;var e=_d(),a=$s();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return ot=u,ot}var ft,Qu;function yd(){if(Qu)return ft;Qu=1;var e=yo(),a=so(),u=oo();function n(r){return u(a(r,void 0,e),r+"")}return ft=n,ft}var dt,Ju;function md(){if(Ju)return dt;Ju=1;var e=bd(),a=yd(),u=a(function(n,r){return n==null?{}:e(n,r)});return dt=u,dt}var ct,es;function qd(){if(es)return ct;es=1;var e=Math.ceil,a=Math.max;function u(n,r,t,s){for(var i=-1,f=a(e((r-n)/(t||1)),0),d=Array(f);f--;)d[s?f:++i]=n,n+=t;return d}return ct=u,ct}var ht,rs;function Ed(){if(rs)return ht;rs=1;var e=qd(),a=we(),u=bo();function n(r){return function(t,s,i){return i&&typeof i!="number"&&a(t,s,i)&&(s=i=void 0),t=u(t),s===void 0?(s=t,t=0):s=u(s),i=i===void 0?t<s?1:-1:u(i),e(t,s,i,r)}}return ht=n,ht}var lt,ns;function wd(){if(ns)return lt;ns=1;var e=Ed(),a=e();return lt=a,lt}var vt,ts;function Rd(){if(ts)return vt;ts=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return vt=e,vt}var pt,is;function Id(){if(is)return pt;is=1;var e=oe();function a(u,n){if(u!==n){var r=u!==void 0,t=u===null,s=u===u,i=e(u),f=n!==void 0,d=n===null,o=n===n,c=e(n);if(!d&&!c&&!i&&u>n||i&&f&&o&&!d&&!c||t&&f&&o||!r&&o||!s)return 1;if(!t&&!i&&!c&&u<n||c&&r&&s&&!t&&!i||d&&r&&s||!f&&s||!o)return-1}return 0}return pt=a,pt}var gt,as;function Td(){if(as)return gt;as=1;var e=Id();function a(u,n,r){for(var t=-1,s=u.criteria,i=n.criteria,f=s.length,d=r.length;++t<f;){var o=e(s[t],i[t]);if(o){if(t>=d)return o;var c=r[t];return o*(c=="desc"?-1:1)}}return u.index-n.index}return gt=a,gt}var _t,us;function Sd(){if(us)return _t;us=1;var e=be(),a=me(),u=re(),n=io(),r=Rd(),t=I.require_baseUnary(),s=Td(),i=ae(),f=I.requireIsArray();function d(o,c,h){c.length?c=e(c,function(p){return f(p)?function(v){return a(v,p.length===1?p[0]:p)}:p}):c=[i];var l=-1;c=e(c,t(u));var m=n(o,function(p,v,g){var b=e(c,function(_){return _(p)});return{criteria:b,index:++l,value:p}});return r(m,function(p,v){return s(p,v,h)})}return _t=d,_t}var bt,ss;function Cd(){if(ss)return bt;ss=1;var e=ai(),a=Sd(),u=Ee(),n=we(),r=u(function(t,s){if(t==null)return[];var i=s.length;return i>1&&n(t,s[0],s[1])?s=[]:i>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),a(t,e(s,1),[])});return bt=r,bt}var yt,os;function Ad(){if(os)return yt;os=1;var e=zs(),a=0;function u(n){var r=++a;return e(n)+r}return yt=u,yt}var mt,fs;function Od(){if(fs)return mt;fs=1;function e(a,u,n){for(var r=-1,t=a.length,s=u.length,i={};++r<t;){var f=r<s?u[r]:void 0;n(i,a[r],f)}return i}return mt=e,mt}var qt,ds;function Nd(){if(ds)return qt;ds=1;var e=I.require_assignValue(),a=Od();function u(n,r){return a(n||[],r||[],e)}return qt=u,qt}var Et,cs;function D(){if(cs)return Et;cs=1;var e;if(typeof ti=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ii(),defaults:$f(),each:eo(),filter:ro(),find:nd(),flatten:yo(),forEach:Js(),forIn:td(),has:no(),isUndefined:to(),last:id(),map:ao(),mapValues:Zs(),max:ud(),merge:hd(),min:ld(),minBy:vd(),now:pd(),pick:md(),range:wd(),reduce:uo(),sortBy:Cd(),uniqueId:Ad(),values:ho(),zipObject:Nd()}}catch{}return e||(e=window._),Et=e,Et}var wt,hs;function kd(){if(hs)return wt;hs=1,wt=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,r=n._prev;if(r!==n)return a(r),r},e.prototype.enqueue=function(n){var r=this._sentinel;n._prev&&n._next&&a(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r},e.prototype.toString=function(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,u)),t=t._prev;return"["+n.join(", ")+"]"};function a(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function u(n,r){if(n!=="_next"&&n!=="_prev")return r}return wt}var Rt,ls;function xd(){if(ls)return Rt;ls=1;var e=D(),a=Z().Graph,u=kd();Rt=r;var n=e.constant(1);function r(d,o){if(d.nodeCount()<=1)return[];var c=i(d,o||n),h=t(c.graph,c.buckets,c.zeroIdx);return e.flatten(e.map(h,function(l){return d.outEdges(l.v,l.w)}),!0)}function t(d,o,c){for(var h=[],l=o[o.length-1],m=o[0],p;d.nodeCount();){for(;p=m.dequeue();)s(d,o,c,p);for(;p=l.dequeue();)s(d,o,c,p);if(d.nodeCount()){for(var v=o.length-2;v>0;--v)if(p=o[v].dequeue(),p){h=h.concat(s(d,o,c,p,!0));break}}}return h}function s(d,o,c,h,l){var m=l?[]:void 0;return e.forEach(d.inEdges(h.v),function(p){var v=d.edge(p),g=d.node(p.v);l&&m.push({v:p.v,w:p.w}),g.out-=v,f(o,c,g)}),e.forEach(d.outEdges(h.v),function(p){var v=d.edge(p),g=p.w,b=d.node(g);b.in-=v,f(o,c,b)}),d.removeNode(h.v),m}function i(d,o){var c=new a,h=0,l=0;e.forEach(d.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(d.edges(),function(v){var g=c.edge(v.v,v.w)||0,b=o(v),_=g+b;c.setEdge(v.v,v.w,_),l=Math.max(l,c.node(v.v).out+=b),h=Math.max(h,c.node(v.w).in+=b)});var m=e.range(l+h+3).map(function(){return new u}),p=h+1;return e.forEach(c.nodes(),function(v){f(m,p,c.node(v))}),{graph:c,buckets:m,zeroIdx:p}}function f(d,o,c){c.out?c.in?d[c.out-c.in+o].enqueue(c):d[d.length-1].enqueue(c):d[0].enqueue(c)}return Rt}var It,vs;function Ld(){if(vs)return It;vs=1;var e=D(),a=xd();It={run:u,undo:r};function u(t){var s=t.graph().acyclicer==="greedy"?a(t,i(t)):n(t);e.forEach(s,function(f){var d=t.edge(f);t.removeEdge(f),d.forwardName=f.name,d.reversed=!0,t.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function i(f){return function(d){return f.edge(d).weight}}}function n(t){var s=[],i={},f={};function d(o){e.has(f,o)||(f[o]=!0,i[o]=!0,e.forEach(t.outEdges(o),function(c){e.has(i,c.w)?s.push(c):d(c.w)}),delete i[o])}return e.forEach(t.nodes(),d),s}function r(t){e.forEach(t.edges(),function(s){var i=t.edge(s);if(i.reversed){t.removeEdge(s);var f=i.forwardName;delete i.reversed,delete i.forwardName,t.setEdge(s.w,s.v,i,f)}})}return It}var Tt,ps;function z(){if(ps)return Tt;ps=1;var e=D(),a=Z().Graph;Tt={addDummyNode:u,simplify:n,asNonCompoundGraph:r,successorWeights:t,predecessorWeights:s,intersectRect:i,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:o,addBorderNode:c,maxRank:h,partition:l,time:m,notime:p};function u(v,g,b,_){var y;do y=e.uniqueId(_);while(v.hasNode(y));return b.dummy=g,v.setNode(y,b),y}function n(v){var g=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(b){g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){var _=g.edge(b.v,b.w)||{weight:0,minlen:1},y=v.edge(b);g.setEdge(b.v,b.w,{weight:_.weight+y.weight,minlen:Math.max(_.minlen,y.minlen)})}),g}function r(v){var g=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(b){v.children(b).length||g.setNode(b,v.node(b))}),e.forEach(v.edges(),function(b){g.setEdge(b,v.edge(b))}),g}function t(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.outEdges(b),function(y){_[y.w]=(_[y.w]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function s(v){var g=e.map(v.nodes(),function(b){var _={};return e.forEach(v.inEdges(b),function(y){_[y.v]=(_[y.v]||0)+v.edge(y).weight}),_});return e.zipObject(v.nodes(),g)}function i(v,g){var b=v.x,_=v.y,y=g.x-b,q=g.y-_,R=v.width/2,E=v.height/2;if(!y&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var C,O;return Math.abs(q)*R>Math.abs(y)*E?(q<0&&(E=-E),C=E*y/q,O=E):(y<0&&(R=-R),C=R,O=R*q/y),{x:b+C,y:_+O}}function f(v){var g=e.map(e.range(h(v)+1),function(){return[]});return e.forEach(v.nodes(),function(b){var _=v.node(b),y=_.rank;e.isUndefined(y)||(g[y][_.order]=b)}),g}function d(v){var g=e.min(e.map(v.nodes(),function(b){return v.node(b).rank}));e.forEach(v.nodes(),function(b){var _=v.node(b);e.has(_,"rank")&&(_.rank-=g)})}function o(v){var g=e.min(e.map(v.nodes(),function(q){return v.node(q).rank})),b=[];e.forEach(v.nodes(),function(q){var R=v.node(q).rank-g;b[R]||(b[R]=[]),b[R].push(q)});var _=0,y=v.graph().nodeRankFactor;e.forEach(b,function(q,R){e.isUndefined(q)&&R%y!==0?--_:_&&e.forEach(q,function(E){v.node(E).rank+=_})})}function c(v,g,b,_){var y={width:0,height:0};return arguments.length>=4&&(y.rank=b,y.order=_),u(v,"border",y,g)}function h(v){return e.max(e.map(v.nodes(),function(g){var b=v.node(g).rank;if(!e.isUndefined(b))return b}))}function l(v,g){var b={lhs:[],rhs:[]};return e.forEach(v,function(_){g(_)?b.lhs.push(_):b.rhs.push(_)}),b}function m(v,g){var b=e.now();try{return g()}finally{console.log(v+" time: "+(e.now()-b)+"ms")}}function p(v,g){return g()}return Tt}var St,gs;function Pd(){if(gs)return St;gs=1;var e=D(),a=z();St={run:u,undo:r};function u(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(s){n(t,s)})}function n(t,s){var i=s.v,f=t.node(i).rank,d=s.w,o=t.node(d).rank,c=s.name,h=t.edge(s),l=h.labelRank;if(o!==f+1){t.removeEdge(s);var m,p,v;for(v=0,++f;f<o;++v,++f)h.points=[],p={width:0,height:0,edgeLabel:h,edgeObj:s,rank:f},m=a.addDummyNode(t,"edge",p,"_d"),f===l&&(p.width=h.width,p.height=h.height,p.dummy="edge-label",p.labelpos=h.labelpos),t.setEdge(i,m,{weight:h.weight},c),v===0&&t.graph().dummyChains.push(m),i=m;t.setEdge(i,d,{weight:h.weight},c)}}function r(t){e.forEach(t.graph().dummyChains,function(s){var i=t.node(s),f=i.edgeLabel,d;for(t.setEdge(i.edgeObj,f);i.dummy;)d=t.successors(s)[0],t.removeNode(s),f.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(f.x=i.x,f.y=i.y,f.width=i.width,f.height=i.height),s=d,i=t.node(s)})}return St}var Ct,_s;function ge(){if(_s)return Ct;_s=1;var e=D();Ct={longestPath:a,slack:u};function a(n){var r={};function t(s){var i=n.node(s);if(e.has(r,s))return i.rank;r[s]=!0;var f=e.min(e.map(n.outEdges(s),function(d){return t(d.w)-n.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),i.rank=f}e.forEach(n.sources(),t)}function u(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}return Ct}var At,bs;function wo(){if(bs)return At;bs=1;var e=D(),a=Z().Graph,u=ge().slack;At=n;function n(i){var f=new a({directed:!1}),d=i.nodes()[0],o=i.nodeCount();f.setNode(d,{});for(var c,h;r(f,i)<o;)c=t(f,i),h=f.hasNode(c.v)?u(i,c):-u(i,c),s(f,i,h);return f}function r(i,f){function d(o){e.forEach(f.nodeEdges(o),function(c){var h=c.v,l=o===h?c.w:h;!i.hasNode(l)&&!u(f,c)&&(i.setNode(l,{}),i.setEdge(o,l,{}),d(l))})}return e.forEach(i.nodes(),d),i.nodeCount()}function t(i,f){return e.minBy(f.edges(),function(d){if(i.hasNode(d.v)!==i.hasNode(d.w))return u(f,d)})}function s(i,f,d){e.forEach(i.nodes(),function(o){f.node(o).rank+=d})}return At}var Ot,ys;function Md(){if(ys)return Ot;ys=1;var e=D(),a=wo(),u=ge().slack,n=ge().longestPath,r=Z().alg.preorder,t=Z().alg.postorder,s=z().simplify;Ot=i,i.initLowLimValues=c,i.initCutValues=f,i.calcCutValue=o,i.leaveEdge=l,i.enterEdge=m,i.exchangeEdges=p;function i(_){_=s(_),n(_);var y=a(_);c(y),f(y,_);for(var q,R;q=l(y);)R=m(y,_,q),p(y,_,q,R)}function f(_,y){var q=t(_,_.nodes());q=q.slice(0,q.length-1),e.forEach(q,function(R){d(_,y,R)})}function d(_,y,q){var R=_.node(q),E=R.parent;_.edge(q,E).cutvalue=o(_,y,q)}function o(_,y,q){var R=_.node(q),E=R.parent,C=!0,O=y.edge(q,E),S=0;return O||(C=!1,O=y.edge(E,q)),S=O.weight,e.forEach(y.nodeEdges(q),function(x){var L=x.v===q,P=L?x.w:x.v;if(P!==E){var M=L===C,G=y.edge(x).weight;if(S+=M?G:-G,g(_,q,P)){var B=_.edge(q,P).cutvalue;S+=M?-B:B}}}),S}function c(_,y){arguments.length<2&&(y=_.nodes()[0]),h(_,{},1,y)}function h(_,y,q,R,E){var C=q,O=_.node(R);return y[R]=!0,e.forEach(_.neighbors(R),function(S){e.has(y,S)||(q=h(_,y,q,S,R))}),O.low=C,O.lim=q++,E?O.parent=E:delete O.parent,q}function l(_){return e.find(_.edges(),function(y){return _.edge(y).cutvalue<0})}function m(_,y,q){var R=q.v,E=q.w;y.hasEdge(R,E)||(R=q.w,E=q.v);var C=_.node(R),O=_.node(E),S=C,x=!1;C.lim>O.lim&&(S=O,x=!0);var L=e.filter(y.edges(),function(P){return x===b(_,_.node(P.v),S)&&x!==b(_,_.node(P.w),S)});return e.minBy(L,function(P){return u(y,P)})}function p(_,y,q,R){var E=q.v,C=q.w;_.removeEdge(E,C),_.setEdge(R.v,R.w,{}),c(_),f(_,y),v(_,y)}function v(_,y){var q=e.find(_.nodes(),function(E){return!y.node(E).parent}),R=r(_,q);R=R.slice(1),e.forEach(R,function(E){var C=_.node(E).parent,O=y.edge(E,C),S=!1;O||(O=y.edge(C,E),S=!0),y.node(E).rank=y.node(C).rank+(S?O.minlen:-O.minlen)})}function g(_,y,q){return _.hasEdge(y,q)}function b(_,y,q){return q.low<=y.lim&&y.lim<=q.lim}return Ot}var Nt,ms;function Fd(){if(ms)return Nt;ms=1;var e=ge(),a=e.longestPath,u=wo(),n=Md();Nt=r;function r(f){switch(f.graph().ranker){case"network-simplex":i(f);break;case"tight-tree":s(f);break;case"longest-path":t(f);break;default:i(f)}}var t=a;function s(f){a(f),u(f)}function i(f){n(f)}return Nt}var kt,qs;function Gd(){if(qs)return kt;qs=1;var e=D();kt=a;function a(r){var t=n(r);e.forEach(r.graph().dummyChains,function(s){for(var i=r.node(s),f=i.edgeObj,d=u(r,t,f.v,f.w),o=d.path,c=d.lca,h=0,l=o[h],m=!0;s!==f.w;){if(i=r.node(s),m){for(;(l=o[h])!==c&&r.node(l).maxRank<i.rank;)h++;l===c&&(m=!1)}if(!m){for(;h<o.length-1&&r.node(l=o[h+1]).minRank<=i.rank;)h++;l=o[h]}r.setParent(s,l),s=r.successors(s)[0]}})}function u(r,t,s,i){var f=[],d=[],o=Math.min(t[s].low,t[i].low),c=Math.max(t[s].lim,t[i].lim),h,l;h=s;do h=r.parent(h),f.push(h);while(h&&(t[h].low>o||c>t[h].lim));for(l=h,h=i;(h=r.parent(h))!==l;)d.push(h);return{path:f.concat(d.reverse()),lca:l}}function n(r){var t={},s=0;function i(f){var d=s;e.forEach(r.children(f),i),t[f]={low:d,lim:s++}}return e.forEach(r.children(),i),t}return kt}var xt,Es;function Dd(){if(Es)return xt;Es=1;var e=D(),a=z();xt={run:u,cleanup:s};function u(i){var f=a.addDummyNode(i,"root",{},"_root"),d=r(i),o=e.max(e.values(d))-1,c=2*o+1;i.graph().nestingRoot=f,e.forEach(i.edges(),function(l){i.edge(l).minlen*=c});var h=t(i)+1;e.forEach(i.children(),function(l){n(i,f,c,h,o,d,l)}),i.graph().nodeRankFactor=c}function n(i,f,d,o,c,h,l){var m=i.children(l);if(!m.length){l!==f&&i.setEdge(f,l,{weight:0,minlen:d});return}var p=a.addBorderNode(i,"_bt"),v=a.addBorderNode(i,"_bb"),g=i.node(l);i.setParent(p,l),g.borderTop=p,i.setParent(v,l),g.borderBottom=v,e.forEach(m,function(b){n(i,f,d,o,c,h,b);var _=i.node(b),y=_.borderTop?_.borderTop:b,q=_.borderBottom?_.borderBottom:b,R=_.borderTop?o:2*o,E=y!==q?1:c-h[l]+1;i.setEdge(p,y,{weight:R,minlen:E,nestingEdge:!0}),i.setEdge(q,v,{weight:R,minlen:E,nestingEdge:!0})}),i.parent(l)||i.setEdge(f,p,{weight:0,minlen:c+h[l]})}function r(i){var f={};function d(o,c){var h=i.children(o);h&&h.length&&e.forEach(h,function(l){d(l,c+1)}),f[o]=c}return e.forEach(i.children(),function(o){d(o,1)}),f}function t(i){return e.reduce(i.edges(),function(f,d){return f+i.edge(d).weight},0)}function s(i){var f=i.graph();i.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(i.edges(),function(d){var o=i.edge(d);o.nestingEdge&&i.removeEdge(d)})}return xt}var Lt,ws;function Ud(){if(ws)return Lt;ws=1;var e=D(),a=z();Lt=u;function u(r){function t(s){var i=r.children(s),f=r.node(s);if(i.length&&e.forEach(i,t),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,o=f.maxRank+1;d<o;++d)n(r,"borderLeft","_bl",s,f,d),n(r,"borderRight","_br",s,f,d)}}e.forEach(r.children(),t)}function n(r,t,s,i,f,d){var o={width:0,height:0,rank:d,borderType:t},c=f[t][d-1],h=a.addDummyNode(r,"border",o,s);f[t][d]=h,r.setParent(h,i),c&&r.setEdge(c,h,{weight:1})}return Lt}var Pt,Rs;function Bd(){if(Rs)return Pt;Rs=1;var e=D();Pt={adjust:a,undo:u};function a(d){var o=d.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&n(d)}function u(d){var o=d.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&t(d),(o==="lr"||o==="rl")&&(i(d),n(d))}function n(d){e.forEach(d.nodes(),function(o){r(d.node(o))}),e.forEach(d.edges(),function(o){r(d.edge(o))})}function r(d){var o=d.width;d.width=d.height,d.height=o}function t(d){e.forEach(d.nodes(),function(o){s(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,s),e.has(c,"y")&&s(c)})}function s(d){d.y=-d.y}function i(d){e.forEach(d.nodes(),function(o){f(d.node(o))}),e.forEach(d.edges(),function(o){var c=d.edge(o);e.forEach(c.points,f),e.has(c,"x")&&f(c)})}function f(d){var o=d.x;d.x=d.y,d.y=o}return Pt}var Mt,Is;function Hd(){if(Is)return Mt;Is=1;var e=D();Mt=a;function a(u){var n={},r=e.filter(u.nodes(),function(d){return!u.children(d).length}),t=e.max(e.map(r,function(d){return u.node(d).rank})),s=e.map(e.range(t+1),function(){return[]});function i(d){if(!e.has(n,d)){n[d]=!0;var o=u.node(d);s[o.rank].push(d),e.forEach(u.successors(d),i)}}var f=e.sortBy(r,function(d){return u.node(d).rank});return e.forEach(f,i),s}return Mt}var Ft,Ts;function Wd(){if(Ts)return Ft;Ts=1;var e=D();Ft=a;function a(n,r){for(var t=0,s=1;s<r.length;++s)t+=u(n,r[s-1],r[s]);return t}function u(n,r,t){for(var s=e.zipObject(t,e.map(t,function(h,l){return l})),i=e.flatten(e.map(r,function(h){return e.sortBy(e.map(n.outEdges(h),function(l){return{pos:s[l.w],weight:n.edge(l).weight}}),"pos")}),!0),f=1;f<t.length;)f<<=1;var d=2*f-1;f-=1;var o=e.map(new Array(d),function(){return 0}),c=0;return e.forEach(i.forEach(function(h){var l=h.pos+f;o[l]+=h.weight;for(var m=0;l>0;)l%2&&(m+=o[l+1]),l=l-1>>1,o[l]+=h.weight;c+=h.weight*m})),c}return Ft}var Gt,Ss;function Vd(){if(Ss)return Gt;Ss=1;var e=D();Gt=a;function a(u,n){return e.map(n,function(r){var t=u.inEdges(r);if(t.length){var s=e.reduce(t,function(i,f){var d=u.edge(f),o=u.node(f.v);return{sum:i.sum+d.weight*o.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}return Gt}var Dt,Cs;function jd(){if(Cs)return Dt;Cs=1;var e=D();Dt=a;function a(r,t){var s={};e.forEach(r,function(f,d){var o=s[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(o.barycenter=f.barycenter,o.weight=f.weight)}),e.forEach(t.edges(),function(f){var d=s[f.v],o=s[f.w];!e.isUndefined(d)&&!e.isUndefined(o)&&(o.indegree++,d.out.push(s[f.w]))});var i=e.filter(s,function(f){return!f.indegree});return u(i)}function u(r){var t=[];function s(d){return function(o){o.merged||(e.isUndefined(o.barycenter)||e.isUndefined(d.barycenter)||o.barycenter>=d.barycenter)&&n(d,o)}}function i(d){return function(o){o.in.push(d),--o.indegree===0&&r.push(o)}}for(;r.length;){var f=r.pop();t.push(f),e.forEach(f.in.reverse(),s(f)),e.forEach(f.out,i(f))}return e.map(e.filter(t,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(r,t){var s=0,i=0;r.weight&&(s+=r.barycenter*r.weight,i+=r.weight),t.weight&&(s+=t.barycenter*t.weight,i+=t.weight),r.vs=t.vs.concat(r.vs),r.barycenter=s/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0}return Dt}var Ut,As;function Kd(){if(As)return Ut;As=1;var e=D(),a=z();Ut=u;function u(t,s){var i=a.partition(t,function(p){return e.has(p,"barycenter")}),f=i.lhs,d=e.sortBy(i.rhs,function(p){return-p.i}),o=[],c=0,h=0,l=0;f.sort(r(!!s)),l=n(o,d,l),e.forEach(f,function(p){l+=p.vs.length,o.push(p.vs),c+=p.barycenter*p.weight,h+=p.weight,l=n(o,d,l)});var m={vs:e.flatten(o,!0)};return h&&(m.barycenter=c/h,m.weight=h),m}function n(t,s,i){for(var f;s.length&&(f=e.last(s)).i<=i;)s.pop(),t.push(f.vs),i++;return i}function r(t){return function(s,i){return s.barycenter<i.barycenter?-1:s.barycenter>i.barycenter?1:t?i.i-s.i:s.i-i.i}}return Ut}var Bt,Os;function zd(){if(Os)return Bt;Os=1;var e=D(),a=Vd(),u=jd(),n=Kd();Bt=r;function r(i,f,d,o){var c=i.children(f),h=i.node(f),l=h?h.borderLeft:void 0,m=h?h.borderRight:void 0,p={};l&&(c=e.filter(c,function(q){return q!==l&&q!==m}));var v=a(i,c);e.forEach(v,function(q){if(i.children(q.v).length){var R=r(i,q.v,d,o);p[q.v]=R,e.has(R,"barycenter")&&s(q,R)}});var g=u(v,d);t(g,p);var b=n(g,o);if(l&&(b.vs=e.flatten([l,b.vs,m],!0),i.predecessors(l).length)){var _=i.node(i.predecessors(l)[0]),y=i.node(i.predecessors(m)[0]);e.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+_.order+y.order)/(b.weight+2),b.weight+=2}return b}function t(i,f){e.forEach(i,function(d){d.vs=e.flatten(d.vs.map(function(o){return f[o]?f[o].vs:o}),!0)})}function s(i,f){e.isUndefined(i.barycenter)?(i.barycenter=f.barycenter,i.weight=f.weight):(i.barycenter=(i.barycenter*i.weight+f.barycenter*f.weight)/(i.weight+f.weight),i.weight+=f.weight)}return Bt}var Ht,Ns;function Yd(){if(Ns)return Ht;Ns=1;var e=D(),a=Z().Graph;Ht=u;function u(r,t,s){var i=n(r),f=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(d){return r.node(d)});return e.forEach(r.nodes(),function(d){var o=r.node(d),c=r.parent(d);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(f.setNode(d),f.setParent(d,c||i),e.forEach(r[s](d),function(h){var l=h.v===d?h.w:h.v,m=f.edge(l,d),p=e.isUndefined(m)?0:m.weight;f.setEdge(l,d,{weight:r.edge(h).weight+p})}),e.has(o,"minRank")&&f.setNode(d,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),f}function n(r){for(var t;r.hasNode(t=e.uniqueId("_root")););return t}return Ht}var Wt,ks;function $d(){if(ks)return Wt;ks=1;var e=D();Wt=a;function a(u,n,r){var t={},s;e.forEach(r,function(i){for(var f=u.parent(i),d,o;f;){if(d=u.parent(f),d?(o=t[d],t[d]=f):(o=s,s=f),o&&o!==f){n.setEdge(o,f);return}f=d}})}return Wt}var Vt,xs;function Xd(){if(xs)return Vt;xs=1;var e=D(),a=Hd(),u=Wd(),n=zd(),r=Yd(),t=$d(),s=Z().Graph,i=z();Vt=f;function f(h){var l=i.maxRank(h),m=d(h,e.range(1,l+1),"inEdges"),p=d(h,e.range(l-1,-1,-1),"outEdges"),v=a(h);c(h,v);for(var g=Number.POSITIVE_INFINITY,b,_=0,y=0;y<4;++_,++y){o(_%2?m:p,_%4>=2),v=i.buildLayerMatrix(h);var q=u(h,v);q<g&&(y=0,b=e.cloneDeep(v),g=q)}c(h,b)}function d(h,l,m){return e.map(l,function(p){return r(h,p,m)})}function o(h,l){var m=new s;e.forEach(h,function(p){var v=p.graph().root,g=n(p,v,m,l);e.forEach(g.vs,function(b,_){p.node(b).order=_}),t(p,m,g.vs)})}function c(h,l){e.forEach(l,function(m){e.forEach(m,function(p,v){h.node(p).order=v})})}return Vt}var jt,Ls;function Zd(){if(Ls)return jt;Ls=1;var e=D(),a=Z().Graph,u=z();jt={positionX:m,findType1Conflicts:n,findType2Conflicts:r,addConflict:s,hasConflict:i,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:c,balance:l};function n(g,b){var _={};function y(q,R){var E=0,C=0,O=q.length,S=e.last(R);return e.forEach(R,function(x,L){var P=t(g,x),M=P?g.node(P).order:O;(P||x===S)&&(e.forEach(R.slice(C,L+1),function(G){e.forEach(g.predecessors(G),function(B){var te=g.node(B),ie=te.order;(ie<E||M<ie)&&!(te.dummy&&g.node(G).dummy)&&s(_,B,G)})}),C=L+1,E=M)}),R}return e.reduce(b,y),_}function r(g,b){var _={};function y(R,E,C,O,S){var x;e.forEach(e.range(E,C),function(L){x=R[L],g.node(x).dummy&&e.forEach(g.predecessors(x),function(P){var M=g.node(P);M.dummy&&(M.order<O||M.order>S)&&s(_,P,x)})})}function q(R,E){var C=-1,O,S=0;return e.forEach(E,function(x,L){if(g.node(x).dummy==="border"){var P=g.predecessors(x);P.length&&(O=g.node(P[0]).order,y(E,S,L,C,O),S=L,C=O)}y(E,S,E.length,O,R.length)}),E}return e.reduce(b,q),_}function t(g,b){if(g.node(b).dummy)return e.find(g.predecessors(b),function(_){return g.node(_).dummy})}function s(g,b,_){if(b>_){var y=b;b=_,_=y}var q=g[b];q||(g[b]=q={}),q[_]=!0}function i(g,b,_){if(b>_){var y=b;b=_,_=y}return e.has(g[b],_)}function f(g,b,_,y){var q={},R={},E={};return e.forEach(b,function(C){e.forEach(C,function(O,S){q[O]=O,R[O]=O,E[O]=S})}),e.forEach(b,function(C){var O=-1;e.forEach(C,function(S){var x=y(S);if(x.length){x=e.sortBy(x,function(B){return E[B]});for(var L=(x.length-1)/2,P=Math.floor(L),M=Math.ceil(L);P<=M;++P){var G=x[P];R[S]===S&&O<E[G]&&!i(_,S,G)&&(R[G]=S,R[S]=q[S]=q[G],O=E[G])}}})}),{root:q,align:R}}function d(g,b,_,y,q){var R={},E=o(g,b,_,q),C=q?"borderLeft":"borderRight";function O(L,P){for(var M=E.nodes(),G=M.pop(),B={};G;)B[G]?L(G):(B[G]=!0,M.push(G),M=M.concat(P(G))),G=M.pop()}function S(L){R[L]=E.inEdges(L).reduce(function(P,M){return Math.max(P,R[M.v]+E.edge(M))},0)}function x(L){var P=E.outEdges(L).reduce(function(G,B){return Math.min(G,R[B.w]-E.edge(B))},Number.POSITIVE_INFINITY),M=g.node(L);P!==Number.POSITIVE_INFINITY&&M.borderType!==C&&(R[L]=Math.max(R[L],P))}return O(S,E.predecessors.bind(E)),O(x,E.successors.bind(E)),e.forEach(y,function(L){R[L]=R[_[L]]}),R}function o(g,b,_,y){var q=new a,R=g.graph(),E=p(R.nodesep,R.edgesep,y);return e.forEach(b,function(C){var O;e.forEach(C,function(S){var x=_[S];if(q.setNode(x),O){var L=_[O],P=q.edge(L,x);q.setEdge(L,x,Math.max(E(g,S,O),P||0))}O=S})}),q}function c(g,b){return e.minBy(e.values(b),function(_){var y=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return e.forIn(_,function(R,E){var C=v(g,E)/2;y=Math.max(R+C,y),q=Math.min(R-C,q)}),y-q})}function h(g,b){var _=e.values(b),y=e.min(_),q=e.max(_);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(E){var C=R+E,O=g[C],S;if(O!==b){var x=e.values(O);S=E==="l"?y-e.min(x):q-e.max(x),S&&(g[C]=e.mapValues(O,function(L){return L+S}))}})})}function l(g,b){return e.mapValues(g.ul,function(_,y){if(b)return g[b.toLowerCase()][y];var q=e.sortBy(e.map(g,y));return(q[1]+q[2])/2})}function m(g){var b=u.buildLayerMatrix(g),_=e.merge(n(g,b),r(g,b)),y={},q;e.forEach(["u","d"],function(E){q=E==="u"?b:e.values(b).reverse(),e.forEach(["l","r"],function(C){C==="r"&&(q=e.map(q,function(L){return e.values(L).reverse()}));var O=(E==="u"?g.predecessors:g.successors).bind(g),S=f(g,q,_,O),x=d(g,q,S.root,S.align,C==="r");C==="r"&&(x=e.mapValues(x,function(L){return-L})),y[E+C]=x})});var R=c(g,y);return h(y,R),l(y,g.graph().align)}function p(g,b,_){return function(y,q,R){var E=y.node(q),C=y.node(R),O=0,S;if(O+=E.width/2,e.has(E,"labelpos"))switch(E.labelpos.toLowerCase()){case"l":S=-E.width/2;break;case"r":S=E.width/2;break}if(S&&(O+=_?S:-S),S=0,O+=(E.dummy?b:g)/2,O+=(C.dummy?b:g)/2,O+=C.width/2,e.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":S=C.width/2;break;case"r":S=-C.width/2;break}return S&&(O+=_?S:-S),S=0,O}}function v(g,b){return g.node(b).width}return jt}var Kt,Ps;function Qd(){if(Ps)return Kt;Ps=1;var e=D(),a=z(),u=Zd().positionX;Kt=n;function n(t){t=a.asNonCompoundGraph(t),r(t),e.forEach(u(t),function(s,i){t.node(i).x=s})}function r(t){var s=a.buildLayerMatrix(t),i=t.graph().ranksep,f=0;e.forEach(s,function(d){var o=e.max(e.map(d,function(c){return t.node(c).height}));e.forEach(d,function(c){t.node(c).y=f+o/2}),f+=o+i})}return Kt}var zt,Ms;function Jd(){if(Ms)return zt;Ms=1;var e=D(),a=Ld(),u=Pd(),n=Fd(),r=z().normalizeRanks,t=Gd(),s=z().removeEmptyRanks,i=Dd(),f=Ud(),d=Bd(),o=Xd(),c=Qd(),h=z(),l=Z().Graph;zt=m;function m(w,T){var A=T&&T.debugTiming?h.time:h.notime;A("layout",function(){var k=A(" buildLayoutGraph",function(){return O(w)});A(" runLayout",function(){p(k,A)}),A(" updateInputGraph",function(){v(w,k)})})}function p(w,T){T(" makeSpaceForEdgeLabels",function(){S(w)}),T(" removeSelfEdges",function(){N(w)}),T(" acyclic",function(){a.run(w)}),T(" nestingGraph.run",function(){i.run(w)}),T(" rank",function(){n(h.asNonCompoundGraph(w))}),T(" injectEdgeLabelProxies",function(){x(w)}),T(" removeEmptyRanks",function(){s(w)}),T(" nestingGraph.cleanup",function(){i.cleanup(w)}),T(" normalizeRanks",function(){r(w)}),T(" assignRankMinMax",function(){L(w)}),T(" removeEdgeLabelProxies",function(){P(w)}),T(" normalize.run",function(){u.run(w)}),T(" parentDummyChains",function(){t(w)}),T(" addBorderSegments",function(){f(w)}),T(" order",function(){o(w)}),T(" insertSelfEdges",function(){V(w)}),T(" adjustCoordinateSystem",function(){d.adjust(w)}),T(" position",function(){c(w)}),T(" positionSelfEdges",function(){j(w)}),T(" removeBorderNodes",function(){ie(w)}),T(" normalize.undo",function(){u.undo(w)}),T(" fixupEdgeLabelCoords",function(){B(w)}),T(" undoCoordinateSystem",function(){d.undo(w)}),T(" translateGraph",function(){M(w)}),T(" assignNodeIntersects",function(){G(w)}),T(" reversePoints",function(){te(w)}),T(" acyclic.undo",function(){a.undo(w)})}function v(w,T){e.forEach(w.nodes(),function(A){var k=w.node(A),F=T.node(A);k&&(k.x=F.x,k.y=F.y,T.children(A).length&&(k.width=F.width,k.height=F.height))}),e.forEach(w.edges(),function(A){var k=w.edge(A),F=T.edge(A);k.points=F.points,e.has(F,"x")&&(k.x=F.x,k.y=F.y)}),w.graph().width=T.graph().width,w.graph().height=T.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],y=["width","height"],q={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function O(w){var T=new l({multigraph:!0,compound:!0}),A=J(w.graph());return T.setGraph(e.merge({},b,Q(A,g),e.pick(A,_))),e.forEach(w.nodes(),function(k){var F=J(w.node(k));T.setNode(k,e.defaults(Q(F,y),q)),T.setParent(k,w.parent(k))}),e.forEach(w.edges(),function(k){var F=J(w.edge(k));T.setEdge(k,e.merge({},E,Q(F,R),e.pick(F,C)))}),T}function S(w){var T=w.graph();T.ranksep/=2,e.forEach(w.edges(),function(A){var k=w.edge(A);k.minlen*=2,k.labelpos.toLowerCase()!=="c"&&(T.rankdir==="TB"||T.rankdir==="BT"?k.width+=k.labeloffset:k.height+=k.labeloffset)})}function x(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(A.width&&A.height){var k=w.node(T.v),F=w.node(T.w),U={rank:(F.rank-k.rank)/2+k.rank,e:T};h.addDummyNode(w,"edge-proxy",U,"_ep")}})}function L(w){var T=0;e.forEach(w.nodes(),function(A){var k=w.node(A);k.borderTop&&(k.minRank=w.node(k.borderTop).rank,k.maxRank=w.node(k.borderBottom).rank,T=e.max(T,k.maxRank))}),w.graph().maxRank=T}function P(w){e.forEach(w.nodes(),function(T){var A=w.node(T);A.dummy==="edge-proxy"&&(w.edge(A.e).labelRank=A.rank,w.removeNode(T))})}function M(w){var T=Number.POSITIVE_INFINITY,A=0,k=Number.POSITIVE_INFINITY,F=0,U=w.graph(),H=U.marginx||0,Y=U.marginy||0;function pi($){var K=$.x,fe=$.y,gi=$.width,_i=$.height;T=Math.min(T,K-gi/2),A=Math.max(A,K+gi/2),k=Math.min(k,fe-_i/2),F=Math.max(F,fe+_i/2)}e.forEach(w.nodes(),function($){pi(w.node($))}),e.forEach(w.edges(),function($){var K=w.edge($);e.has(K,"x")&&pi(K)}),T-=H,k-=Y,e.forEach(w.nodes(),function($){var K=w.node($);K.x-=T,K.y-=k}),e.forEach(w.edges(),function($){var K=w.edge($);e.forEach(K.points,function(fe){fe.x-=T,fe.y-=k}),e.has(K,"x")&&(K.x-=T),e.has(K,"y")&&(K.y-=k)}),U.width=A-T+H,U.height=F-k+Y}function G(w){e.forEach(w.edges(),function(T){var A=w.edge(T),k=w.node(T.v),F=w.node(T.w),U,H;A.points?(U=A.points[0],H=A.points[A.points.length-1]):(A.points=[],U=F,H=k),A.points.unshift(h.intersectRect(k,U)),A.points.push(h.intersectRect(F,H))})}function B(w){e.forEach(w.edges(),function(T){var A=w.edge(T);if(e.has(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function te(w){e.forEach(w.edges(),function(T){var A=w.edge(T);A.reversed&&A.points.reverse()})}function ie(w){e.forEach(w.nodes(),function(T){if(w.children(T).length){var A=w.node(T),k=w.node(A.borderTop),F=w.node(A.borderBottom),U=w.node(e.last(A.borderLeft)),H=w.node(e.last(A.borderRight));A.width=Math.abs(H.x-U.x),A.height=Math.abs(F.y-k.y),A.x=U.x+A.width/2,A.y=k.y+A.height/2}}),e.forEach(w.nodes(),function(T){w.node(T).dummy==="border"&&w.removeNode(T)})}function N(w){e.forEach(w.edges(),function(T){if(T.v===T.w){var A=w.node(T.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:T,label:w.edge(T)}),w.removeEdge(T)}})}function V(w){var T=h.buildLayerMatrix(w);e.forEach(T,function(A){var k=0;e.forEach(A,function(F,U){var H=w.node(F);H.order=U+k,e.forEach(H.selfEdges,function(Y){h.addDummyNode(w,"selfedge",{width:Y.label.width,height:Y.label.height,rank:H.rank,order:U+ ++k,e:Y.e,label:Y.label},"_se")}),delete H.selfEdges})})}function j(w){e.forEach(w.nodes(),function(T){var A=w.node(T);if(A.dummy==="selfedge"){var k=w.node(A.e.v),F=k.x+k.width/2,U=k.y,H=A.x-F,Y=k.height/2;w.setEdge(A.e,A.label),w.removeNode(T),A.label.points=[{x:F+2*H/3,y:U-Y},{x:F+5*H/6,y:U-Y},{x:F+H,y:U},{x:F+5*H/6,y:U+Y},{x:F+2*H/3,y:U+Y}],A.label.x=A.x,A.label.y=A.y}})}function Q(w,T){return e.mapValues(e.pick(w,T),Number)}function J(w){var T={};return e.forEach(w,function(A,k){T[k.toLowerCase()]=A}),T}return zt}var Yt,Fs;function ec(){if(Fs)return Yt;Fs=1;var e=D(),a=z(),u=Z().Graph;Yt={debugOrdering:n};function n(r){var t=a.buildLayerMatrix(r),s=new u({compound:!0,multigraph:!0}).setGraph({});return e.forEach(r.nodes(),function(i){s.setNode(i,{label:i}),s.setParent(i,"layer"+r.node(i).rank)}),e.forEach(r.edges(),function(i){s.setEdge(i.v,i.w,{},i.name)}),e.forEach(t,function(i,f){var d="layer"+f;s.setNode(d,{rank:"same"}),e.reduce(i,function(o,c){return s.setEdge(o,c,{style:"invis"}),c})}),s}return Yt}var $t,Gs;function rc(){return Gs||(Gs=1,$t="0.8.5"),$t}var Xt,Ds;function nc(){return Ds||(Ds=1,Xt={graphlib:Z(),layout:Jd(),debug:ec(),util:{time:z().time,notime:z().notime},version:rc()}),Xt}var tc=nc();const Us=I.getDefaultExportFromCjs(tc),ne="root.Triggers";function Re(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=Re(e,r.source);t.length>0&&n.push(...t)}return n}function Ie(e,a){const{getEdges:u}=W.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=Ie(e,r.target);t.length>0&&n.push(...t)}return n}function Te(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=n(a),t=r?[r]:[];for(const s of u.value)if(s.target===a){t.push(s.sourceNode);const i=Te(e,s.source);i.length>0&&t.push(...i)}return t}function Se(e,a){const{getEdges:u,findNode:n}=W.useVueFlow(e),r=[n(a)];for(const t of u.value)if(t.source===a){r.push(t.targetNode);const s=Se(e,t.target);s.length>0&&r.push(...s)}return r}function Ro(e,a){return[...Re(e,a),...Te(e,a),...Ie(e,a),...Se(e,a)]}function oi(e,a,u,n,r,t,s){const i=new Us.graphlib.Graph({compound:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:u?"LR":"TB"});for(const f of e.nodes)a.includes(f.uid)||i.setNode(f.uid,{width:ce(f),height:he(f)});for(const f of e.clusters||[]){const d=f.cluster.uid.replace(se,"");if(n.includes(f.cluster.uid)&&t.has(d)){const o={uid:d,type:"collapsedcluster"};i.setNode(d,{width:ce(o),height:he(o)}),s.push(o);continue}if(!r[f.cluster.uid]){i.setNode(f.cluster.uid,{clusterLabelPos:"top"});for(const o of f.nodes||[])a.includes(o)||i.setParent(o,f.cluster.uid)}if(f.parents){const o=r[f.cluster.uid]?r[f.cluster.uid]:f.cluster.uid;a.includes(o)||i.setParent(o,f.parents[f.parents.length-1])}}for(const f of e.edges||[]){const d=Ae(f.source,f.target,r,a);d&&i.setEdge(d.source,d.target)}return Us.layout(i),i}function de(e,a){const u={x:e.x-e.width/2,y:e.y-e.height/2};if(a){const n=de(a);u.x=u.x-n.x,u.y=u.y-n.y}return u}function ce(e){return Ce(e)||ve(e)?ee.TASK_WIDTH:ue(e)?ee.COLLAPSED_CLUSTER_WIDTH:ee.DOT_WIDTH}function he(e){return Ce(e)||ve(e)?ee.TASK_HEIGHT:ue(e)?ee.COLLAPSED_CLUSTER_HEIGHT:ee.DOT_HEIGHT}function Ce(e){return["GraphTask","SubflowGraphTask$1"].some(a=>e.type.endsWith(a))}function ve(e){return e.type.endsWith("GraphTrigger")}function ue(e){return e.type==="collapsedcluster"}function Ae(e,a,u,n){const r=u[e]?u[e]:e,t=u[a]?u[a]:a;return r===t||n.includes(r)||n.includes(t)?null:{target:t,source:r}}function Io(e){const{getEdges:a,getNodes:u,getElements:n,removeEdges:r,removeNodes:t,removeSelectedElements:s}=W.useVueFlow(e);r(a.value),t(u.value),s(n.value)}function fi(e){return e?I.flowHaveTasks(e):!1}function di(e,a){return e.uid===ne||ve(e)||ue(e)?"success":e.type.endsWith("SubflowGraphTask")?"primary":e.branchType=="ERROR"?"danger":e.branchType=="FINALLY"?"warning":a.has(e.uid)?"blue":"default"}function ci(e,a,u,n){var d,o,c;if(n.some(h=>e.source.startsWith(h)&&e.target.startsWith(h))||u.includes(e.target)||e.source.startsWith(ne)||e.target.startsWith(ne))return;const r=e.target.split(".");r.pop();const t=r.join("."),s=pe.afterLastDot(t),i=a[e.target];if(i.type.endsWith("GraphClusterEnd")&&((c=(o=(d=a[t])==null?void 0:d.task)==null?void 0:o.type)!=null&&c.endsWith("Parallel")))return;if(i.type.endsWith("GraphClusterRoot"))return[s,"before"];const f=a[e.source].type.endsWith("GraphClusterEnd");if(!f&&i.type.endsWith("GraphClusterEnd"))return[pe.afterLastDot(e.source),"after"];if(f){const h=e.source.split(".");return[h[h.length-2],"after"]}return[pe.afterLastDot(e.target),"before"]}function hi(e,a,u){const n=s=>{var f,d;const i=s.split(".");for(let o=1;o<=i.length;o++){const c=i.slice(0,o).join("."),h=(f=u[c])==null?void 0:f.branchType;if(h)return h}return((d=a[s])==null?void 0:d.branchType)??null},r=n(e.source),t=n(e.target);return[r,t].includes("ERROR")?"danger":[r,t].includes("FINALLY")?"warning":null}function To(e,a,u,n,r,t,s,i,f,d,o,c,h){var E,C,O,S,x,L,P,M,G,B,te,ie;const l=[],m=[se+ne];if(!n||r&&!fi(r)){l.push({id:"start",type:"dot",position:{x:0,y:0},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"end",type:"dot",position:s?{x:50,y:0}:{x:0,y:50},style:{width:"5px",height:"5px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"start|end",source:"start",target:"end",type:"edge",data:{edge:{relation:{relationType:"SEQUENTIAL"}},isFlowable:!1,initTask:!0,color:"primary"}});return}const p=oi(n,t,s,m,i,f,d),v={},g=n.clusters||[],b=g.map(N=>N.cluster),_=b.filter(N=>N.type.endsWith("SubflowGraphCluster")).map(N=>N.taskNode.uid),y=Object.fromEntries(n.nodes.concat(d).map(N=>[N.uid,N]));for(const N of g)if(!i[N.cluster.uid]&&!f.has(N.cluster.uid)){((C=(E=N.cluster.taskNode)==null?void 0:E.task)==null?void 0:C.type)==="io.kestra.core.tasks.flows.Dag"&&_.push(N.cluster.taskNode.uid);for(const w of N.nodes)v[w]=N.cluster;const V=N.cluster.uid,j=p.node(V),Q=N.parents?N.parents[N.parents.length-1]:void 0,J=li(N.cluster);l.push({id:V,type:"cluster",parentNode:Q,position:de(j,Q?p.node(Q):void 0),style:{width:V===ne&&s?ee.TRIGGER_CLUSTER_WIDTH+"px":j.width+"px",height:V===ne&&!s?ee.TRIGGER_CLUSTER_HEIGHT+"px":j.height+"px"},data:{collapsable:!0,color:J,taskNode:N.cluster.taskNode,unused:N.cluster.taskNode?y[N.cluster.taskNode.uid].unused:!1},class:`ks-topology-${J}-border rounded p-2`})}for(const N of n.nodes.concat(d))if(!t.includes(N.uid)){const V=p.node(N.uid);let j="task";_e(N)?j="dot":N.type.includes("GraphTrigger")?j="trigger":N.type==="collapsedcluster"&&(j="collapsedcluster");const Q=di(N,f),J=o||((S=(O=N.task)==null?void 0:O.type)==null?void 0:S.includes("$"))||_.some(w=>N.uid.startsWith(w+"."));l.push({id:N.uid,type:j,position:de(V,v[N.uid]?p.node(v[N.uid].uid):void 0),style:{width:ce(N)+"px",height:he(N)+"px"},sourcePosition:s?W.Position.Right:W.Position.Bottom,targetPosition:s?W.Position.Left:W.Position.Top,parentNode:v[N.uid]?v[N.uid].uid:void 0,draggable:j==="task"?!J:!1,data:{node:N,parent:v[N.uid]?v[N.uid]:void 0,namespace:((P=(L=(x=v[N.uid])==null?void 0:x.taskNode)==null?void 0:L.task)==null?void 0:P.namespace)??u,flowId:((B=(G=(M=v[N.uid])==null?void 0:M.taskNode)==null?void 0:G.task)==null?void 0:B.flowId)??a,isFlowable:((te=v[N.uid])==null?void 0:te.uid)===se+N.uid&&!N.type.endsWith("SubflowGraphTask"),color:Q,expandable:vi(N,v,i,h),isReadOnly:J,iconComponent:ue(N)?"lightning-bolt":null,executionId:N.executionId,unused:N.unused},class:N.type==="collapsedcluster"?`ks-topology-${Q}-border rounded`:""})}const q=b.filter(N=>N.taskNode).map(N=>N.taskNode.uid),R=n.edges??[];for(const N of R){const V=Ae(N.source,N.target,i,t);if(V){const j=hi(N,y,v);l.push({id:V.source+"|"+V.target,source:V.source,target:V.target,type:"edge",markerEnd:_e(y[V.target])?"":{id:"marker-"+(y[V.target].branchType?(ie=y[V.target].branchType)==null?void 0:ie.toLocaleLowerCase():"custom"),type:W.MarkerType.ArrowClosed,color:j?`var(--ks-border-${j})`:"var(--ks-topology-edge-color)"},data:{haveAdd:!o&&c&&ci(N,y,q,_),haveDashArray:y[N.source].type.endsWith("GraphTrigger")||y[N.target].type.endsWith("GraphTrigger")||N.source.startsWith(ne),color:j,unused:N.unused},style:{zIndex:10}})}}return l}function _e(e){return["GraphClusterRoot","GraphClusterFinally","GraphClusterAfterExecution","GraphClusterEnd"].some(a=>e.type.endsWith(a))}function li(e){return e.uid===se+ne?"success":e.type.endsWith("SubflowGraphCluster")?"primary":e.branchType==="ERROR"?"danger":"blue"}function vi(e,a,u,n){var r,t;return Object.values(u).includes(e.uid)||ue(e)?!0:e.type.endsWith("SubflowGraphTask")&&((t=(r=a[e.uid])==null?void 0:r.uid)==null?void 0:t.replace(se,""))!==e.uid&&n}function Zt(e){const u=e.nodes.map(n=>n.uid).filter(n=>!e.edges.some(r=>r.target===n));return e.nodes.filter(n=>u.includes(n.uid))}function So(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function Qt(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>So(e,t)).filter(Boolean),u.length===0)return[];r=u.map(t=>t.target),n=e.nodes.filter(t=>r.includes(t.uid)&&t.task)}while(!n.length);return n}function ic(e,a,u){if(!u)return!1;let n=Zt(e),r=Zt(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>Qt(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>Qt(e,s)),n.length!==r.length)return!1;for(const s of r){const i=n.find(o=>{var c,h;return((c=o.task)==null?void 0:c.id)===((h=s.task)==null?void 0:h.id)}),f=(i==null?void 0:i.task)??{},d=s.task??{};if(!i||Object.keys(f).length!==Object.keys(d).length)return!1;for(const o in s.task)if(f[o]!==d[o])return!1}}while(n.length&&r.length&&t-- >0);return t<=0?(console.warn("areTasksIdenticalInGraphUntilTask: Infinite loop detected, stopping comparison."),!1):!0}const ac={isClusterRootOrEnd:_e,computeClusterColor:li,isExpandableTask:vi,generateGraph:To,generateDagreGraph:oi,getNodePosition:de,getNodeWidth:ce,getNodeHeight:he,isTaskNode:Ce,isTriggerNode:ve,isCollapsedCluster:ue,replaceIfCollapsed:Ae,cleanGraph:Io,flowHaveTasks:fi,nodeColor:di,haveAdd:ci,getEdgeColor:hi,predecessorsEdge:Re,successorsEdge:Ie,predecessorsNode:Te,successorsNode:Se,linkedElements:Ro};exports.CLUSTER_PREFIX=se;exports.EVENTS=No;exports.NODE_SIZES=ee;exports.SECTIONS=Oo;exports.Utils=pe;exports.VueFlowUtils=ac;exports.areTasksIdenticalInGraphUntilTask=ic;exports.cleanGraph=Io;exports.computeClusterColor=li;exports.editorViewTypes=Lo;exports.executeFlowBehaviours=Mo;exports.flowHaveTasks=fi;exports.generateDagreGraph=oi;exports.generateGraph=To;exports.getEdgeColor=hi;exports.getNextTaskNodes=Qt;exports.getNodeHeight=he;exports.getNodePosition=de;exports.getNodeWidth=ce;exports.getRootNodes=Zt;exports.getTargetNodesEdges=So;exports.haveAdd=ci;exports.isClusterRootOrEnd=_e;exports.isCollapsedCluster=ue;exports.isExpandableTask=vi;exports.isTaskNode=Ce;exports.isTriggerNode=ve;exports.linkedElements=Ro;exports.logDisplayTypes=xo;exports.nodeColor=di;exports.predecessorsEdge=Re;exports.predecessorsNode=Te;exports.replaceIfCollapsed=Ae;exports.requireMapValues=Zs;exports.stateDisplayValues=Fo;exports.stateGlobalChartTypes=ko;exports.storageKeys=Po;exports.successorsEdge=Ie;exports.successorsNode=Se;
2
+ //# sourceMappingURL=VueFlowUtils-dC12uRkV.cjs.map