From 2cef2f4142eb457d61e6d2ce6914714d11dcd17c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 00:29:46 +0000 Subject: [PATCH] Deployed 0547a455 to nightly with MkDocs 1.6.1 and mike 2.1.4 --- .../unpkg.com/mermaid@11/dist/mermaid.min.js | 12 +-- nightly/nightly-release/index.html | 8 +- nightly/sitemap.xml | 74 +++++++++--------- nightly/sitemap.xml.gz | Bin 508 -> 508 bytes 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/nightly/assets/external/unpkg.com/mermaid@11/dist/mermaid.min.js b/nightly/assets/external/unpkg.com/mermaid@11/dist/mermaid.min.js index 887a528b..79b89d7c 100644 --- a/nightly/assets/external/unpkg.com/mermaid@11/dist/mermaid.min.js +++ b/nightly/assets/external/unpkg.com/mermaid@11/dist/mermaid.min.js @@ -596,7 +596,7 @@ You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t== L0,20`)},"requirement_arrow"),aQe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),sQe=s((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),oQe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),lQe={extension:GZe,composition:zZe,aggregation:VZe,dependency:WZe,lollipop:qZe,point:HZe,circle:UZe,cross:YZe,barb:jZe,barbNeo:XZe,only_one:KZe,zero_or_one:ZZe,one_or_more:QZe,zero_or_more:JZe,only_one_neo:eQe,zero_or_one_neo:tQe,one_or_more_neo:rQe,zero_or_more_neo:nQe,requirement_arrow:iQe,requirement_contains:sQe,requirement_arrow_neo:aQe,requirement_contains_neo:oQe},Gy=FZe});async function Eh(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?L2[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return n.attr("data-look",un(t.look)),t.tooltip&&i.attr("title",t.tooltip),$4.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var $4,$ue,Fue,au,Lm=F(()=>{"use strict";St();R4();er();$4=new Map;s(Eh,"insertNode");$ue=s((e,t)=>{$4.set(t.id,e)},"setNodeElem"),Fue=s(()=>{$4.clear()},"clear"),au=s(e=>{let t=$4.get(e.id);se.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var Gue,zue=F(()=>{"use strict";br();Yr();St();B2();Fy();B4();Lm();Ht();er();Gue={common:Tt,getConfig:Lt,insertCluster:sf,insertEdge:of,insertEdgeLabel:oc,insertMarkers:Gy,insertNode:Eh,interpolateToCurve:qN,labelHelper:yt,log:se,positionEdgeLabel:$y}});var cQe,F4,bO=F(()=>{"use strict";cQe=typeof global=="object"&&global&&global.Object===Object&&global,F4=cQe});var uQe,hQe,Oi,bl=F(()=>{"use strict";bO();uQe=typeof self=="object"&&self&&self.Object===Object&&self,hQe=F4||uQe||Function("return this")(),Oi=hQe});var dQe,Pa,Dm=F(()=>{"use strict";bl();dQe=Oi.Symbol,Pa=dQe});function mQe(e){var t=fQe.call(e,F2),r=e[F2];try{e[F2]=void 0;var n=!0}catch{}var i=pQe.call(e);return n&&(t?e[F2]=r:delete e[F2]),i}var Vue,fQe,pQe,F2,Wue,que=F(()=>{"use strict";Dm();Vue=Object.prototype,fQe=Vue.hasOwnProperty,pQe=Vue.toString,F2=Pa?Pa.toStringTag:void 0;s(mQe,"getRawTag");Wue=mQe});function vQe(e){return yQe.call(e)}var gQe,yQe,Hue,Uue=F(()=>{"use strict";gQe=Object.prototype,yQe=gQe.toString;s(vQe,"objectToString");Hue=vQe});function TQe(e){return e==null?e===void 0?bQe:xQe:Yue&&Yue in Object(e)?Wue(e):Hue(e)}var xQe,bQe,Yue,Gs,lf=F(()=>{"use strict";Dm();que();Uue();xQe="[object Null]",bQe="[object Undefined]",Yue=Pa?Pa.toStringTag:void 0;s(TQe,"baseGetTag");Gs=TQe});function CQe(e){return e!=null&&typeof e=="object"}var qi,lc=F(()=>{"use strict";s(CQe,"isObjectLike");qi=CQe});function wQe(e){return typeof e=="symbol"||qi(e)&&Gs(e)==SQe}var SQe,Yo,Im=F(()=>{"use strict";lf();lc();SQe="[object Symbol]";s(wQe,"isSymbol");Yo=wQe});function kQe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{"use strict";s(kQe,"arrayMap");su=kQe});var EQe,Zr,na=F(()=>{"use strict";EQe=Array.isArray,Zr=EQe});function Kue(e){if(typeof e=="string")return e;if(Zr(e))return su(e,Kue)+"";if(Yo(e))return Xue?Xue.call(e):"";var t=e+"";return t=="0"&&1/e==-AQe?"-0":t}var AQe,jue,Xue,Zue,Que=F(()=>{"use strict";Dm();G2();na();Im();AQe=1/0,jue=Pa?Pa.prototype:void 0,Xue=jue?jue.toString:void 0;s(Kue,"baseToString");Zue=Kue});function _Qe(e){for(var t=e.length;t--&&RQe.test(e.charAt(t)););return t}var RQe,Jue,ehe=F(()=>{"use strict";RQe=/\s/;s(_Qe,"trimmedEndIndex");Jue=_Qe});function DQe(e){return e&&e.slice(0,Jue(e)+1).replace(LQe,"")}var LQe,the,rhe=F(()=>{"use strict";ehe();LQe=/^\s+/;s(DQe,"baseTrim");the=DQe});function IQe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var yi,Tl=F(()=>{"use strict";s(IQe,"isObject");yi=IQe});function BQe(e){if(typeof e=="number")return e;if(Yo(e))return nhe;if(yi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=yi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=the(e);var r=NQe.test(e);return r||PQe.test(e)?OQe(e.slice(2),r?2:8):MQe.test(e)?nhe:+e}var nhe,MQe,NQe,PQe,OQe,ihe,ahe=F(()=>{"use strict";rhe();Tl();Im();nhe=NaN,MQe=/^[-+]0x[0-9a-f]+$/i,NQe=/^0b[01]+$/i,PQe=/^0o[0-7]+$/i,OQe=parseInt;s(BQe,"toNumber");ihe=BQe});function FQe(e){if(!e)return e===0?e:0;if(e=ihe(e),e===she||e===-she){var t=e<0?-1:1;return t*$Qe}return e===e?e:0}var she,$Qe,zy,TO=F(()=>{"use strict";ahe();she=1/0,$Qe=17976931348623157e292;s(FQe,"toFinite");zy=FQe});function GQe(e){var t=zy(e),r=t%1;return t===t?r?t-r:t:0}var ohe,lhe=F(()=>{"use strict";TO();s(GQe,"toInteger");ohe=GQe});function zQe(e){return e}var uo,cf=F(()=>{"use strict";s(zQe,"identity");uo=zQe});function UQe(e){if(!yi(e))return!1;var t=Gs(e);return t==WQe||t==qQe||t==VQe||t==HQe}var VQe,WQe,qQe,HQe,ou,z2=F(()=>{"use strict";lf();Tl();VQe="[object AsyncFunction]",WQe="[object Function]",qQe="[object GeneratorFunction]",HQe="[object Proxy]";s(UQe,"isFunction");ou=UQe});var YQe,G4,che=F(()=>{"use strict";bl();YQe=Oi["__core-js_shared__"],G4=YQe});function jQe(e){return!!uhe&&uhe in e}var uhe,hhe,dhe=F(()=>{"use strict";che();uhe=(function(){var e=/[^.]+$/.exec(G4&&G4.keys&&G4.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();s(jQe,"isMasked");hhe=jQe});function ZQe(e){if(e!=null){try{return KQe.call(e)}catch{}try{return e+""}catch{}}return""}var XQe,KQe,Ah,CO=F(()=>{"use strict";XQe=Function.prototype,KQe=XQe.toString;s(ZQe,"toSource");Ah=ZQe});function aJe(e){if(!yi(e)||hhe(e))return!1;var t=ou(e)?iJe:JQe;return t.test(Ah(e))}var QQe,JQe,eJe,tJe,rJe,nJe,iJe,fhe,phe=F(()=>{"use strict";z2();dhe();Tl();CO();QQe=/[\\^$.*+?()[\]{}|]/g,JQe=/^\[object .+?Constructor\]$/,eJe=Function.prototype,tJe=Object.prototype,rJe=eJe.toString,nJe=tJe.hasOwnProperty,iJe=RegExp("^"+rJe.call(nJe).replace(QQe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(aJe,"baseIsNative");fhe=aJe});function sJe(e,t){return e?.[t]}var mhe,ghe=F(()=>{"use strict";s(sJe,"getValue");mhe=sJe});function oJe(e,t){var r=mhe(e,t);return fhe(r)?r:void 0}var ho,uf=F(()=>{"use strict";phe();ghe();s(oJe,"getNative");ho=oJe});var lJe,z4,yhe=F(()=>{"use strict";uf();bl();lJe=ho(Oi,"WeakMap"),z4=lJe});var vhe,cJe,xhe,bhe=F(()=>{"use strict";Tl();vhe=Object.create,cJe=(function(){function e(){}return s(e,"object"),function(t){if(!yi(t))return{};if(vhe)return vhe(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),xhe=cJe});function uJe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var The,Che=F(()=>{"use strict";s(uJe,"apply");The=uJe});function hJe(){}var She,whe=F(()=>{"use strict";s(hJe,"noop");She=hJe});function dJe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{"use strict";s(dJe,"copyArray");V4=dJe});function gJe(e){var t=0,r=0;return function(){var n=mJe(),i=pJe-(n-r);if(r=n,i>0){if(++t>=fJe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var fJe,pJe,mJe,khe,Ehe=F(()=>{"use strict";fJe=800,pJe=16,mJe=Date.now;s(gJe,"shortOut");khe=gJe});function yJe(e){return function(){return e}}var fo,wO=F(()=>{"use strict";s(yJe,"constant");fo=yJe});var vJe,Vy,kO=F(()=>{"use strict";uf();vJe=(function(){try{var e=ho(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Vy=vJe});var xJe,Ahe,Rhe=F(()=>{"use strict";wO();kO();cf();xJe=Vy?function(e,t){return Vy(e,"toString",{configurable:!0,enumerable:!1,value:fo(t),writable:!0})}:uo,Ahe=xJe});var bJe,W4,EO=F(()=>{"use strict";Rhe();Ehe();bJe=khe(Ahe),W4=bJe});function TJe(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";s(TJe,"arrayEach");q4=TJe});function CJe(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{"use strict";s(CJe,"baseFindIndex");H4=CJe});function SJe(e){return e!==e}var _he,Lhe=F(()=>{"use strict";s(SJe,"baseIsNaN");_he=SJe});function wJe(e,t,r){for(var n=r-1,i=e.length;++n{"use strict";s(wJe,"strictIndexOf");Dhe=wJe});function kJe(e,t,r){return t===t?Dhe(e,t,r):H4(e,_he,r)}var Mhe,Nhe=F(()=>{"use strict";RO();Lhe();Ihe();s(kJe,"baseIndexOf");Mhe=kJe});function EJe(e,t){var r=e==null?0:e.length;return!!r&&Mhe(e,t,0)>-1}var Phe,Ohe=F(()=>{"use strict";Nhe();s(EJe,"arrayIncludes");Phe=EJe});function _Je(e,t){var r=typeof e;return t=t??AJe,!!t&&(r=="number"||r!="symbol"&&RJe.test(e))&&e>-1&&e%1==0&&e{"use strict";AJe=9007199254740991,RJe=/^(?:0|[1-9]\d*)$/;s(_Je,"isIndex");hf=_Je});function LJe(e,t,r){t=="__proto__"&&Vy?Vy(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var df,W2=F(()=>{"use strict";kO();s(LJe,"baseAssignValue");df=LJe});function DJe(e,t){return e===t||e!==e&&t!==t}var Cl,Mm=F(()=>{"use strict";s(DJe,"eq");Cl=DJe});function NJe(e,t,r){var n=e[t];(!(MJe.call(e,t)&&Cl(n,r))||r===void 0&&!(t in e))&&df(e,t,r)}var IJe,MJe,ff,q2=F(()=>{"use strict";W2();Mm();IJe=Object.prototype,MJe=IJe.hasOwnProperty;s(NJe,"assignValue");ff=NJe});function PJe(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a{"use strict";q2();W2();s(PJe,"copyObject");lu=PJe});function OJe(e,t,r){return t=Bhe(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Bhe(n.length-t,0),o=Array(a);++i{"use strict";Che();Bhe=Math.max;s(OJe,"overRest");U4=OJe});function BJe(e,t){return W4(U4(e,t,uo),e+"")}var pf,H2=F(()=>{"use strict";cf();_O();EO();s(BJe,"baseRest");pf=BJe});function FJe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$Je}var $Je,qy,Y4=F(()=>{"use strict";$Je=9007199254740991;s(FJe,"isLength");qy=FJe});function GJe(e){return e!=null&&qy(e.length)&&!ou(e)}var Oa,cu=F(()=>{"use strict";z2();Y4();s(GJe,"isArrayLike");Oa=GJe});function zJe(e,t,r){if(!yi(r))return!1;var n=typeof t;return(n=="number"?Oa(r)&&hf(t,r.length):n=="string"&&t in r)?Cl(r[t],e):!1}var Rh,U2=F(()=>{"use strict";Mm();cu();V2();Tl();s(zJe,"isIterateeCall");Rh=zJe});function VJe(e){return pf(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Rh(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n{"use strict";H2();U2();s(VJe,"createAssigner");$he=VJe});function qJe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||WJe;return e===r}var WJe,mf,Y2=F(()=>{"use strict";WJe=Object.prototype;s(qJe,"isPrototype");mf=qJe});function HJe(e,t){for(var r=-1,n=Array(e);++r{"use strict";s(HJe,"baseTimes");Ghe=HJe});function YJe(e){return qi(e)&&Gs(e)==UJe}var UJe,LO,Vhe=F(()=>{"use strict";lf();lc();UJe="[object Arguments]";s(YJe,"baseIsArguments");LO=YJe});var Whe,jJe,XJe,KJe,cc,Hy=F(()=>{"use strict";Vhe();lc();Whe=Object.prototype,jJe=Whe.hasOwnProperty,XJe=Whe.propertyIsEnumerable,KJe=LO((function(){return arguments})())?LO:function(e){return qi(e)&&jJe.call(e,"callee")&&!XJe.call(e,"callee")},cc=KJe});function ZJe(){return!1}var qhe,Hhe=F(()=>{"use strict";s(ZJe,"stubFalse");qhe=ZJe});var jhe,Uhe,QJe,Yhe,JJe,eet,uc,Uy=F(()=>{"use strict";bl();Hhe();jhe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uhe=jhe&&typeof module=="object"&&module&&!module.nodeType&&module,QJe=Uhe&&Uhe.exports===jhe,Yhe=QJe?Oi.Buffer:void 0,JJe=Yhe?Yhe.isBuffer:void 0,eet=JJe||qhe,uc=eet});function Aet(e){return qi(e)&&qy(e.length)&&!!ci[Gs(e)]}var tet,ret,net,iet,aet,set,oet,cet,uet,het,det,fet,pet,met,get,yet,vet,xet,bet,Tet,Cet,wet,ket,Eet,ci,Xhe,Khe=F(()=>{"use strict";lf();Y4();lc();tet="[object Arguments]",ret="[object Array]",net="[object Boolean]",iet="[object Date]",aet="[object Error]",set="[object Function]",oet="[object Map]",cet="[object Number]",uet="[object Object]",het="[object RegExp]",det="[object Set]",fet="[object String]",pet="[object WeakMap]",met="[object ArrayBuffer]",get="[object DataView]",yet="[object Float32Array]",vet="[object Float64Array]",xet="[object Int8Array]",bet="[object Int16Array]",Tet="[object Int32Array]",Cet="[object Uint8Array]",wet="[object Uint8ClampedArray]",ket="[object Uint16Array]",Eet="[object Uint32Array]",ci={};ci[yet]=ci[vet]=ci[xet]=ci[bet]=ci[Tet]=ci[Cet]=ci[wet]=ci[ket]=ci[Eet]=!0;ci[tet]=ci[ret]=ci[met]=ci[net]=ci[get]=ci[iet]=ci[aet]=ci[set]=ci[oet]=ci[cet]=ci[uet]=ci[het]=ci[det]=ci[fet]=ci[pet]=!1;s(Aet,"baseIsTypedArray");Xhe=Aet});function Ret(e){return function(t){return e(t)}}var gf,j2=F(()=>{"use strict";s(Ret,"baseUnary");gf=Ret});var Zhe,X2,_et,DO,Let,_h,j4=F(()=>{"use strict";bO();Zhe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,X2=Zhe&&typeof module=="object"&&module&&!module.nodeType&&module,_et=X2&&X2.exports===Zhe,DO=_et&&F4.process,Let=(function(){try{var e=X2&&X2.require&&X2.require("util").types;return e||DO&&DO.binding&&DO.binding("util")}catch{}})(),_h=Let});var Qhe,Det,yf,K2=F(()=>{"use strict";Khe();j2();j4();Qhe=_h&&_h.isTypedArray,Det=Qhe?gf(Qhe):Xhe,yf=Det});function Net(e,t){var r=Zr(e),n=!r&&cc(e),i=!r&&!n&&uc(e),a=!r&&!n&&!i&&yf(e),o=r||n||i||a,l=o?Ghe(e.length,String):[],u=l.length;for(var h in e)(t||Met.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||hf(h,u)))&&l.push(h);return l}var Iet,Met,X4,IO=F(()=>{"use strict";zhe();Hy();na();Uy();V2();K2();Iet=Object.prototype,Met=Iet.hasOwnProperty;s(Net,"arrayLikeKeys");X4=Net});function Pet(e,t){return function(r){return e(t(r))}}var K4,MO=F(()=>{"use strict";s(Pet,"overArg");K4=Pet});var Oet,Jhe,ede=F(()=>{"use strict";MO();Oet=K4(Object.keys,Object),Jhe=Oet});function Fet(e){if(!mf(e))return Jhe(e);var t=[];for(var r in Object(e))$et.call(e,r)&&r!="constructor"&&t.push(r);return t}var Bet,$et,Yy,Z4=F(()=>{"use strict";Y2();ede();Bet=Object.prototype,$et=Bet.hasOwnProperty;s(Fet,"baseKeys");Yy=Fet});function Get(e){return Oa(e)?X4(e):Yy(e)}var Bi,Lh=F(()=>{"use strict";IO();Z4();cu();s(Get,"keys");Bi=Get});function zet(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var tde,rde=F(()=>{"use strict";s(zet,"nativeKeysIn");tde=zet});function qet(e){if(!yi(e))return tde(e);var t=mf(e),r=[];for(var n in e)n=="constructor"&&(t||!Wet.call(e,n))||r.push(n);return r}var Vet,Wet,nde,ide=F(()=>{"use strict";Tl();Y2();rde();Vet=Object.prototype,Wet=Vet.hasOwnProperty;s(qet,"baseKeysIn");nde=qet});function Het(e){return Oa(e)?X4(e,!0):nde(e)}var po,vf=F(()=>{"use strict";IO();ide();cu();s(Het,"keysIn");po=Het});function jet(e,t){if(Zr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Yo(e)?!0:Yet.test(e)||!Uet.test(e)||t!=null&&e in Object(t)}var Uet,Yet,jy,Q4=F(()=>{"use strict";na();Im();Uet=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yet=/^\w*$/;s(jet,"isKey");jy=jet});var Xet,Dh,Z2=F(()=>{"use strict";uf();Xet=ho(Object,"create"),Dh=Xet});function Ket(){this.__data__=Dh?Dh(null):{},this.size=0}var ade,sde=F(()=>{"use strict";Z2();s(Ket,"hashClear");ade=Ket});function Zet(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ode,lde=F(()=>{"use strict";s(Zet,"hashDelete");ode=Zet});function ttt(e){var t=this.__data__;if(Dh){var r=t[e];return r===Qet?void 0:r}return ett.call(t,e)?t[e]:void 0}var Qet,Jet,ett,cde,ude=F(()=>{"use strict";Z2();Qet="__lodash_hash_undefined__",Jet=Object.prototype,ett=Jet.hasOwnProperty;s(ttt,"hashGet");cde=ttt});function itt(e){var t=this.__data__;return Dh?t[e]!==void 0:ntt.call(t,e)}var rtt,ntt,hde,dde=F(()=>{"use strict";Z2();rtt=Object.prototype,ntt=rtt.hasOwnProperty;s(itt,"hashHas");hde=itt});function stt(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Dh&&t===void 0?att:t,this}var att,fde,pde=F(()=>{"use strict";Z2();att="__lodash_hash_undefined__";s(stt,"hashSet");fde=stt});function Xy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";sde();lde();ude();dde();pde();s(Xy,"Hash");Xy.prototype.clear=ade;Xy.prototype.delete=ode;Xy.prototype.get=cde;Xy.prototype.has=hde;Xy.prototype.set=fde;NO=Xy});function ott(){this.__data__=[],this.size=0}var gde,yde=F(()=>{"use strict";s(ott,"listCacheClear");gde=ott});function ltt(e,t){for(var r=e.length;r--;)if(Cl(e[r][0],t))return r;return-1}var xf,Q2=F(()=>{"use strict";Mm();s(ltt,"assocIndexOf");xf=ltt});function htt(e){var t=this.__data__,r=xf(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():utt.call(t,r,1),--this.size,!0}var ctt,utt,vde,xde=F(()=>{"use strict";Q2();ctt=Array.prototype,utt=ctt.splice;s(htt,"listCacheDelete");vde=htt});function dtt(e){var t=this.__data__,r=xf(t,e);return r<0?void 0:t[r][1]}var bde,Tde=F(()=>{"use strict";Q2();s(dtt,"listCacheGet");bde=dtt});function ftt(e){return xf(this.__data__,e)>-1}var Cde,Sde=F(()=>{"use strict";Q2();s(ftt,"listCacheHas");Cde=ftt});function ptt(e,t){var r=this.__data__,n=xf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var wde,kde=F(()=>{"use strict";Q2();s(ptt,"listCacheSet");wde=ptt});function Ky(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";yde();xde();Tde();Sde();kde();s(Ky,"ListCache");Ky.prototype.clear=gde;Ky.prototype.delete=vde;Ky.prototype.get=bde;Ky.prototype.has=Cde;Ky.prototype.set=wde;bf=Ky});var mtt,Tf,J4=F(()=>{"use strict";uf();bl();mtt=ho(Oi,"Map"),Tf=mtt});function gtt(){this.size=0,this.__data__={hash:new NO,map:new(Tf||bf),string:new NO}}var Ede,Ade=F(()=>{"use strict";mde();J2();J4();s(gtt,"mapCacheClear");Ede=gtt});function ytt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Rde,_de=F(()=>{"use strict";s(ytt,"isKeyable");Rde=ytt});function vtt(e,t){var r=e.__data__;return Rde(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Cf,eT=F(()=>{"use strict";_de();s(vtt,"getMapData");Cf=vtt});function xtt(e){var t=Cf(this,e).delete(e);return this.size-=t?1:0,t}var Lde,Dde=F(()=>{"use strict";eT();s(xtt,"mapCacheDelete");Lde=xtt});function btt(e){return Cf(this,e).get(e)}var Ide,Mde=F(()=>{"use strict";eT();s(btt,"mapCacheGet");Ide=btt});function Ttt(e){return Cf(this,e).has(e)}var Nde,Pde=F(()=>{"use strict";eT();s(Ttt,"mapCacheHas");Nde=Ttt});function Ctt(e,t){var r=Cf(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ode,Bde=F(()=>{"use strict";eT();s(Ctt,"mapCacheSet");Ode=Ctt});function Zy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Ade();Dde();Mde();Pde();Bde();s(Zy,"MapCache");Zy.prototype.clear=Ede;Zy.prototype.delete=Lde;Zy.prototype.get=Ide;Zy.prototype.has=Nde;Zy.prototype.set=Ode;Nm=Zy});function PO(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Stt);var r=s(function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new(PO.Cache||Nm),r}var Stt,$de,Fde=F(()=>{"use strict";e3();Stt="Expected a function";s(PO,"memoize");PO.Cache=Nm;$de=PO});function ktt(e){var t=$de(e,function(n){return r.size===wtt&&r.clear(),n}),r=t.cache;return t}var wtt,Gde,zde=F(()=>{"use strict";Fde();wtt=500;s(ktt,"memoizeCapped");Gde=ktt});var Ett,Att,Rtt,Vde,Wde=F(()=>{"use strict";zde();Ett=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Att=/\\(\\)?/g,Rtt=Gde(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ett,function(r,n,i,a){t.push(i?a.replace(Att,"$1"):n||r)}),t}),Vde=Rtt});function _tt(e){return e==null?"":Zue(e)}var t3,OO=F(()=>{"use strict";Que();s(_tt,"toString");t3=_tt});function Ltt(e,t){return Zr(e)?e:jy(e,t)?[e]:Vde(t3(e))}var Sf,tT=F(()=>{"use strict";na();Q4();Wde();OO();s(Ltt,"castPath");Sf=Ltt});function Itt(e){if(typeof e=="string"||Yo(e))return e;var t=e+"";return t=="0"&&1/e==-Dtt?"-0":t}var Dtt,uu,Qy=F(()=>{"use strict";Im();Dtt=1/0;s(Itt,"toKey");uu=Itt});function Mtt(e,t){t=Sf(t,e);for(var r=0,n=t.length;e!=null&&r{"use strict";tT();Qy();s(Mtt,"baseGet");wf=Mtt});function Ntt(e,t,r){var n=e==null?void 0:wf(e,t);return n===void 0?r:n}var qde,Hde=F(()=>{"use strict";rT();s(Ntt,"get");qde=Ntt});function Ptt(e,t){for(var r=-1,n=t.length,i=e.length;++r{"use strict";s(Ptt,"arrayPush");Jy=Ptt});function Ott(e){return Zr(e)||cc(e)||!!(Ude&&e&&e[Ude])}var Ude,Yde,jde=F(()=>{"use strict";Dm();Hy();na();Ude=Pa?Pa.isConcatSpreadable:void 0;s(Ott,"isFlattenable");Yde=Ott});function Xde(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Yde),i||(i=[]);++a0&&r(l)?t>1?Xde(l,t-1,r,n,i):Jy(i,l):n||(i[i.length]=l)}return i}var e1,n3=F(()=>{"use strict";r3();jde();s(Xde,"baseFlatten");e1=Xde});function Btt(e){var t=e==null?0:e.length;return t?e1(e,1):[]}var Sl,BO=F(()=>{"use strict";n3();s(Btt,"flatten");Sl=Btt});function $tt(e){return W4(U4(e,void 0,Sl),e+"")}var Kde,Zde=F(()=>{"use strict";BO();_O();EO();s($tt,"flatRest");Kde=$tt});var Ftt,t1,i3=F(()=>{"use strict";MO();Ftt=K4(Object.getPrototypeOf,Object),t1=Ftt});function Htt(e){if(!qi(e)||Gs(e)!=Gtt)return!1;var t=t1(e);if(t===null)return!0;var r=Wtt.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Qde.call(r)==qtt}var Gtt,ztt,Vtt,Qde,Wtt,qtt,Jde,efe=F(()=>{"use strict";lf();i3();lc();Gtt="[object Object]",ztt=Function.prototype,Vtt=Object.prototype,Qde=ztt.toString,Wtt=Vtt.hasOwnProperty,qtt=Qde.call(Object);s(Htt,"isPlainObject");Jde=Htt});function ert(e){return Jtt.test(e)}var Utt,Ytt,jtt,Xtt,Ktt,Ztt,Qtt,Jtt,tfe,rfe=F(()=>{"use strict";Utt="\\ud800-\\udfff",Ytt="\\u0300-\\u036f",jtt="\\ufe20-\\ufe2f",Xtt="\\u20d0-\\u20ff",Ktt=Ytt+jtt+Xtt,Ztt="\\ufe0e\\ufe0f",Qtt="\\u200d",Jtt=RegExp("["+Qtt+Utt+Ktt+Ztt+"]");s(ert,"hasUnicode");tfe=ert});function trt(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i{"use strict";s(trt,"arrayReduce");nfe=trt});function rrt(){this.__data__=new bf,this.size=0}var afe,sfe=F(()=>{"use strict";J2();s(rrt,"stackClear");afe=rrt});function nrt(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var ofe,lfe=F(()=>{"use strict";s(nrt,"stackDelete");ofe=nrt});function irt(e){return this.__data__.get(e)}var cfe,ufe=F(()=>{"use strict";s(irt,"stackGet");cfe=irt});function art(e){return this.__data__.has(e)}var hfe,dfe=F(()=>{"use strict";s(art,"stackHas");hfe=art});function ort(e,t){var r=this.__data__;if(r instanceof bf){var n=r.__data__;if(!Tf||n.length{"use strict";J2();J4();e3();srt=200;s(ort,"stackSet");ffe=ort});function r1(e){var t=this.__data__=new bf(e);this.size=t.size}var hu,nT=F(()=>{"use strict";J2();sfe();lfe();ufe();dfe();pfe();s(r1,"Stack");r1.prototype.clear=afe;r1.prototype.delete=ofe;r1.prototype.get=cfe;r1.prototype.has=hfe;r1.prototype.set=ffe;hu=r1});function lrt(e,t){return e&&lu(t,Bi(t),e)}var mfe,gfe=F(()=>{"use strict";Wy();Lh();s(lrt,"baseAssign");mfe=lrt});function crt(e,t){return e&&lu(t,po(t),e)}var yfe,vfe=F(()=>{"use strict";Wy();vf();s(crt,"baseAssignIn");yfe=crt});function hrt(e,t){if(t)return e.slice();var r=e.length,n=Tfe?Tfe(r):new e.constructor(r);return e.copy(n),n}var Cfe,xfe,urt,bfe,Tfe,a3,$O=F(()=>{"use strict";bl();Cfe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xfe=Cfe&&typeof module=="object"&&module&&!module.nodeType&&module,urt=xfe&&xfe.exports===Cfe,bfe=urt?Oi.Buffer:void 0,Tfe=bfe?bfe.allocUnsafe:void 0;s(hrt,"cloneBuffer");a3=hrt});function drt(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r{"use strict";s(drt,"arrayFilter");s3=drt});function frt(){return[]}var o3,GO=F(()=>{"use strict";s(frt,"stubArray");o3=frt});var prt,mrt,Sfe,grt,n1,l3=F(()=>{"use strict";FO();GO();prt=Object.prototype,mrt=prt.propertyIsEnumerable,Sfe=Object.getOwnPropertySymbols,grt=Sfe?function(e){return e==null?[]:(e=Object(e),s3(Sfe(e),function(t){return mrt.call(e,t)}))}:o3,n1=grt});function yrt(e,t){return lu(e,n1(e),t)}var wfe,kfe=F(()=>{"use strict";Wy();l3();s(yrt,"copySymbols");wfe=yrt});var vrt,xrt,c3,zO=F(()=>{"use strict";r3();i3();l3();GO();vrt=Object.getOwnPropertySymbols,xrt=vrt?function(e){for(var t=[];e;)Jy(t,n1(e)),e=t1(e);return t}:o3,c3=xrt});function brt(e,t){return lu(e,c3(e),t)}var Efe,Afe=F(()=>{"use strict";Wy();zO();s(brt,"copySymbolsIn");Efe=brt});function Trt(e,t,r){var n=t(e);return Zr(e)?n:Jy(n,r(e))}var u3,VO=F(()=>{"use strict";r3();na();s(Trt,"baseGetAllKeys");u3=Trt});function Crt(e){return u3(e,Bi,n1)}var iT,WO=F(()=>{"use strict";VO();l3();Lh();s(Crt,"getAllKeys");iT=Crt});function Srt(e){return u3(e,po,c3)}var Rfe,_fe=F(()=>{"use strict";VO();zO();vf();s(Srt,"getAllKeysIn");Rfe=Srt});var wrt,h3,Lfe=F(()=>{"use strict";uf();bl();wrt=ho(Oi,"DataView"),h3=wrt});var krt,d3,Dfe=F(()=>{"use strict";uf();bl();krt=ho(Oi,"Promise"),d3=krt});var Ert,kf,qO=F(()=>{"use strict";uf();bl();Ert=ho(Oi,"Set"),kf=Ert});var Ife,Art,Mfe,Nfe,Pfe,Ofe,Rrt,_rt,Lrt,Drt,Irt,Pm,jo,Om=F(()=>{"use strict";Lfe();J4();Dfe();qO();yhe();lf();CO();Ife="[object Map]",Art="[object Object]",Mfe="[object Promise]",Nfe="[object Set]",Pfe="[object WeakMap]",Ofe="[object DataView]",Rrt=Ah(h3),_rt=Ah(Tf),Lrt=Ah(d3),Drt=Ah(kf),Irt=Ah(z4),Pm=Gs;(h3&&Pm(new h3(new ArrayBuffer(1)))!=Ofe||Tf&&Pm(new Tf)!=Ife||d3&&Pm(d3.resolve())!=Mfe||kf&&Pm(new kf)!=Nfe||z4&&Pm(new z4)!=Pfe)&&(Pm=s(function(e){var t=Gs(e),r=t==Art?e.constructor:void 0,n=r?Ah(r):"";if(n)switch(n){case Rrt:return Ofe;case _rt:return Ife;case Lrt:return Mfe;case Drt:return Nfe;case Irt:return Pfe}return t},"getTag"));jo=Pm});function Prt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Nrt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Mrt,Nrt,Bfe,$fe=F(()=>{"use strict";Mrt=Object.prototype,Nrt=Mrt.hasOwnProperty;s(Prt,"initCloneArray");Bfe=Prt});var Ort,i1,HO=F(()=>{"use strict";bl();Ort=Oi.Uint8Array,i1=Ort});function Brt(e){var t=new e.constructor(e.byteLength);return new i1(t).set(new i1(e)),t}var a1,f3=F(()=>{"use strict";HO();s(Brt,"cloneArrayBuffer");a1=Brt});function $rt(e,t){var r=t?a1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Ffe,Gfe=F(()=>{"use strict";f3();s($rt,"cloneDataView");Ffe=$rt});function Grt(e){var t=new e.constructor(e.source,Frt.exec(e));return t.lastIndex=e.lastIndex,t}var Frt,zfe,Vfe=F(()=>{"use strict";Frt=/\w*$/;s(Grt,"cloneRegExp");zfe=Grt});function zrt(e){return qfe?Object(qfe.call(e)):{}}var Wfe,qfe,Hfe,Ufe=F(()=>{"use strict";Dm();Wfe=Pa?Pa.prototype:void 0,qfe=Wfe?Wfe.valueOf:void 0;s(zrt,"cloneSymbol");Hfe=zrt});function Vrt(e,t){var r=t?a1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var p3,UO=F(()=>{"use strict";f3();s(Vrt,"cloneTypedArray");p3=Vrt});function lnt(e,t,r){var n=e.constructor;switch(t){case Zrt:return a1(e);case Wrt:case qrt:return new n(+e);case Qrt:return Ffe(e,r);case Jrt:case ent:case tnt:case rnt:case nnt:case int:case ant:case snt:case ont:return p3(e,r);case Hrt:return new n;case Urt:case Xrt:return new n(e);case Yrt:return zfe(e);case jrt:return new n;case Krt:return Hfe(e)}}var Wrt,qrt,Hrt,Urt,Yrt,jrt,Xrt,Krt,Zrt,Qrt,Jrt,ent,tnt,rnt,nnt,int,ant,snt,ont,Yfe,jfe=F(()=>{"use strict";f3();Gfe();Vfe();Ufe();UO();Wrt="[object Boolean]",qrt="[object Date]",Hrt="[object Map]",Urt="[object Number]",Yrt="[object RegExp]",jrt="[object Set]",Xrt="[object String]",Krt="[object Symbol]",Zrt="[object ArrayBuffer]",Qrt="[object DataView]",Jrt="[object Float32Array]",ent="[object Float64Array]",tnt="[object Int8Array]",rnt="[object Int16Array]",nnt="[object Int32Array]",int="[object Uint8Array]",ant="[object Uint8ClampedArray]",snt="[object Uint16Array]",ont="[object Uint32Array]";s(lnt,"initCloneByTag");Yfe=lnt});function cnt(e){return typeof e.constructor=="function"&&!mf(e)?xhe(t1(e)):{}}var m3,YO=F(()=>{"use strict";bhe();i3();Y2();s(cnt,"initCloneObject");m3=cnt});function hnt(e){return qi(e)&&jo(e)==unt}var unt,Xfe,Kfe=F(()=>{"use strict";Om();lc();unt="[object Map]";s(hnt,"baseIsMap");Xfe=hnt});var Zfe,dnt,Qfe,Jfe=F(()=>{"use strict";Kfe();j2();j4();Zfe=_h&&_h.isMap,dnt=Zfe?gf(Zfe):Xfe,Qfe=dnt});function pnt(e){return qi(e)&&jo(e)==fnt}var fnt,epe,tpe=F(()=>{"use strict";Om();lc();fnt="[object Set]";s(pnt,"baseIsSet");epe=pnt});var rpe,mnt,npe,ipe=F(()=>{"use strict";tpe();j2();j4();rpe=_h&&_h.isSet,mnt=rpe?gf(rpe):epe,npe=mnt});function g3(e,t,r,n,i,a){var o,l=t&gnt,u=t&ynt,h=t&vnt;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!yi(e))return e;var d=Zr(e);if(d){if(o=Bfe(e),!l)return V4(e,o)}else{var f=jo(e),p=f==spe||f==Snt;if(uc(e))return a3(e,l);if(f==ope||f==ape||p&&!i){if(o=u||p?{}:m3(e),!l)return u?Efe(e,yfe(o,e)):wfe(e,mfe(o,e))}else{if(!Zn[f])return i?e:{};o=Yfe(e,f,l)}}a||(a=new hu);var m=a.get(e);if(m)return m;a.set(e,o),npe(e)?e.forEach(function(v){o.add(g3(v,t,r,v,e,a))}):Qfe(e)&&e.forEach(function(v,x){o.set(x,g3(v,t,r,x,e,a))});var g=h?u?Rfe:iT:u?po:Bi,y=d?void 0:g(e);return q4(y||e,function(v,x){y&&(x=v,v=e[x]),ff(o,x,g3(v,t,r,x,e,a))}),o}var gnt,ynt,vnt,ape,xnt,bnt,Tnt,Cnt,spe,Snt,wnt,knt,ope,Ent,Ant,Rnt,_nt,Lnt,Dnt,Int,Mnt,Nnt,Pnt,Ont,Bnt,$nt,Fnt,Gnt,znt,Zn,lpe,cpe=F(()=>{"use strict";nT();AO();q2();gfe();vfe();$O();SO();kfe();Afe();WO();_fe();Om();$fe();jfe();YO();na();Uy();Jfe();Tl();ipe();Lh();vf();gnt=1,ynt=2,vnt=4,ape="[object Arguments]",xnt="[object Array]",bnt="[object Boolean]",Tnt="[object Date]",Cnt="[object Error]",spe="[object Function]",Snt="[object GeneratorFunction]",wnt="[object Map]",knt="[object Number]",ope="[object Object]",Ent="[object RegExp]",Ant="[object Set]",Rnt="[object String]",_nt="[object Symbol]",Lnt="[object WeakMap]",Dnt="[object ArrayBuffer]",Int="[object DataView]",Mnt="[object Float32Array]",Nnt="[object Float64Array]",Pnt="[object Int8Array]",Ont="[object Int16Array]",Bnt="[object Int32Array]",$nt="[object Uint8Array]",Fnt="[object Uint8ClampedArray]",Gnt="[object Uint16Array]",znt="[object Uint32Array]",Zn={};Zn[ape]=Zn[xnt]=Zn[Dnt]=Zn[Int]=Zn[bnt]=Zn[Tnt]=Zn[Mnt]=Zn[Nnt]=Zn[Pnt]=Zn[Ont]=Zn[Bnt]=Zn[wnt]=Zn[knt]=Zn[ope]=Zn[Ent]=Zn[Ant]=Zn[Rnt]=Zn[_nt]=Zn[$nt]=Zn[Fnt]=Zn[Gnt]=Zn[znt]=!0;Zn[Cnt]=Zn[spe]=Zn[Lnt]=!1;s(g3,"baseClone");lpe=g3});function qnt(e){return lpe(e,Vnt|Wnt)}var Vnt,Wnt,jO,upe=F(()=>{"use strict";cpe();Vnt=1,Wnt=4;s(qnt,"cloneDeep");jO=qnt});function Unt(e){return this.__data__.set(e,Hnt),this}var Hnt,hpe,dpe=F(()=>{"use strict";Hnt="__lodash_hash_undefined__";s(Unt,"setCacheAdd");hpe=Unt});function Ynt(e){return this.__data__.has(e)}var fpe,ppe=F(()=>{"use strict";s(Ynt,"setCacheHas");fpe=Ynt});function y3(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Nm;++t{"use strict";e3();dpe();ppe();s(y3,"SetCache");y3.prototype.add=y3.prototype.push=hpe;y3.prototype.has=fpe;v3=y3});function jnt(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";s(jnt,"arraySome");mpe=jnt});function Xnt(e,t){return e.has(t)}var x3,KO=F(()=>{"use strict";s(Xnt,"cacheHas");x3=Xnt});function Qnt(e,t,r,n,i,a){var o=r&Knt,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&Znt?new v3:void 0;for(a.set(e,t),a.set(t,e);++f{"use strict";XO();gpe();KO();Knt=1,Znt=2;s(Qnt,"equalArrays");b3=Qnt});function Jnt(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var ype,vpe=F(()=>{"use strict";s(Jnt,"mapToArray");ype=Jnt});function eit(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var s1,T3=F(()=>{"use strict";s(eit,"setToArray");s1=eit});function pit(e,t,r,n,i,a,o){switch(r){case fit:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dit:return!(e.byteLength!=t.byteLength||!a(new i1(e),new i1(t)));case nit:case iit:case oit:return Cl(+e,+t);case ait:return e.name==t.name&&e.message==t.message;case lit:case uit:return e==t+"";case sit:var l=ype;case cit:var u=n&tit;if(l||(l=s1),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;n|=rit,o.set(e,t);var d=b3(l(e),l(t),n,i,a,o);return o.delete(e),d;case hit:if(QO)return QO.call(e)==QO.call(t)}return!1}var tit,rit,nit,iit,ait,sit,oit,lit,cit,uit,hit,dit,fit,xpe,QO,bpe,Tpe=F(()=>{"use strict";Dm();HO();Mm();ZO();vpe();T3();tit=1,rit=2,nit="[object Boolean]",iit="[object Date]",ait="[object Error]",sit="[object Map]",oit="[object Number]",lit="[object RegExp]",cit="[object Set]",uit="[object String]",hit="[object Symbol]",dit="[object ArrayBuffer]",fit="[object DataView]",xpe=Pa?Pa.prototype:void 0,QO=xpe?xpe.valueOf:void 0;s(pit,"equalByTag");bpe=pit});function vit(e,t,r,n,i,a){var o=r&mit,l=iT(e),u=l.length,h=iT(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:yit.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var v=o;++f{"use strict";WO();mit=1,git=Object.prototype,yit=git.hasOwnProperty;s(vit,"equalObjects");Cpe=vit});function Tit(e,t,r,n,i,a){var o=Zr(e),l=Zr(t),u=o?kpe:jo(e),h=l?kpe:jo(t);u=u==wpe?C3:u,h=h==wpe?C3:h;var d=u==C3,f=h==C3,p=u==h;if(p&&uc(e)){if(!uc(t))return!1;o=!0,d=!1}if(p&&!d)return a||(a=new hu),o||yf(e)?b3(e,t,r,n,i,a):bpe(e,t,u,r,n,i,a);if(!(r&xit)){var m=d&&Epe.call(e,"__wrapped__"),g=f&&Epe.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,v=g?t.value():t;return a||(a=new hu),i(y,v,r,n,a)}}return p?(a||(a=new hu),Cpe(e,t,r,n,i,a)):!1}var xit,wpe,kpe,C3,bit,Epe,Ape,Rpe=F(()=>{"use strict";nT();ZO();Tpe();Spe();Om();na();Uy();K2();xit=1,wpe="[object Arguments]",kpe="[object Array]",C3="[object Object]",bit=Object.prototype,Epe=bit.hasOwnProperty;s(Tit,"baseIsEqualDeep");Ape=Tit});function _pe(e,t,r,n,i){return e===t?!0:e==null||t==null||!qi(e)&&!qi(t)?e!==e&&t!==t:Ape(e,t,r,n,_pe,i)}var S3,JO=F(()=>{"use strict";Rpe();lc();s(_pe,"baseIsEqual");S3=_pe});function wit(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i{"use strict";nT();JO();Cit=1,Sit=2;s(wit,"baseIsMatch");Lpe=wit});function kit(e){return e===e&&!yi(e)}var w3,e9=F(()=>{"use strict";Tl();s(kit,"isStrictComparable");w3=kit});function Eit(e){for(var t=Bi(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,w3(i)]}return t}var Ipe,Mpe=F(()=>{"use strict";e9();Lh();s(Eit,"getMatchData");Ipe=Eit});function Ait(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var k3,t9=F(()=>{"use strict";s(Ait,"matchesStrictComparable");k3=Ait});function Rit(e){var t=Ipe(e);return t.length==1&&t[0][2]?k3(t[0][0],t[0][1]):function(r){return r===e||Lpe(r,e,t)}}var Npe,Ppe=F(()=>{"use strict";Dpe();Mpe();t9();s(Rit,"baseMatches");Npe=Rit});function _it(e,t){return e!=null&&t in Object(e)}var Ope,Bpe=F(()=>{"use strict";s(_it,"baseHasIn");Ope=_it});function Lit(e,t,r){t=Sf(t,e);for(var n=-1,i=t.length,a=!1;++n{"use strict";tT();Hy();na();V2();Y4();Qy();s(Lit,"hasPath");E3=Lit});function Dit(e,t){return e!=null&&E3(e,t,Ope)}var A3,n9=F(()=>{"use strict";Bpe();r9();s(Dit,"hasIn");A3=Dit});function Nit(e,t){return jy(e)&&w3(t)?k3(uu(e),t):function(r){var n=qde(r,e);return n===void 0&&n===t?A3(r,e):S3(t,n,Iit|Mit)}}var Iit,Mit,$pe,Fpe=F(()=>{"use strict";JO();Hde();n9();Q4();e9();t9();Qy();Iit=1,Mit=2;s(Nit,"baseMatchesProperty");$pe=Nit});function Pit(e){return function(t){return t?.[e]}}var R3,i9=F(()=>{"use strict";s(Pit,"baseProperty");R3=Pit});function Oit(e){return function(t){return wf(t,e)}}var Gpe,zpe=F(()=>{"use strict";rT();s(Oit,"basePropertyDeep");Gpe=Oit});function Bit(e){return jy(e)?R3(uu(e)):Gpe(e)}var Vpe,Wpe=F(()=>{"use strict";i9();zpe();Q4();Qy();s(Bit,"property");Vpe=Bit});function $it(e){return typeof e=="function"?e:e==null?uo:typeof e=="object"?Zr(e)?$pe(e[0],e[1]):Npe(e):Vpe(e)}var vs,Ih=F(()=>{"use strict";Ppe();Fpe();cf();na();Wpe();s($it,"baseIteratee");vs=$it});function Fit(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var qpe,Hpe=F(()=>{"use strict";s(Fit,"createBaseFor");qpe=Fit});var Git,o1,_3=F(()=>{"use strict";Hpe();Git=qpe(),o1=Git});function zit(e,t){return e&&o1(e,t,Bi)}var l1,L3=F(()=>{"use strict";_3();Lh();s(zit,"baseForOwn");l1=zit});function Vit(e,t){return function(r,n){if(r==null)return r;if(!Oa(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a{"use strict";cu();s(Vit,"createBaseEach");Upe=Vit});var Wit,Ef,aT=F(()=>{"use strict";L3();Ype();Wit=Upe(l1),Ef=Wit});var qit,D3,jpe=F(()=>{"use strict";bl();qit=s(function(){return Oi.Date.now()},"now"),D3=qit});var Xpe,Hit,Uit,a9,Kpe=F(()=>{"use strict";H2();Mm();U2();vf();Xpe=Object.prototype,Hit=Xpe.hasOwnProperty,Uit=pf(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Rh(t[0],t[1],i)&&(n=1);++r{"use strict";W2();Mm();s(Yit,"assignMergeValue");sT=Yit});function jit(e){return qi(e)&&Oa(e)}var I3,o9=F(()=>{"use strict";cu();lc();s(jit,"isArrayLikeObject");I3=jit});function Xit(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var oT,l9=F(()=>{"use strict";s(Xit,"safeGet");oT=Xit});function Kit(e){return lu(e,po(e))}var Zpe,Qpe=F(()=>{"use strict";Wy();vf();s(Kit,"toPlainObject");Zpe=Kit});function Zit(e,t,r,n,i,a,o){var l=oT(e,r),u=oT(t,r),h=o.get(u);if(h){sT(e,r,h);return}var d=a?a(l,u,r+"",e,t,o):void 0,f=d===void 0;if(f){var p=Zr(u),m=!p&&uc(u),g=!p&&!m&&yf(u);d=u,p||m||g?Zr(l)?d=l:I3(l)?d=V4(l):m?(f=!1,d=a3(u,!0)):g?(f=!1,d=p3(u,!0)):d=[]:Jde(u)||cc(u)?(d=l,cc(l)?d=Zpe(l):(!yi(l)||ou(l))&&(d=m3(u))):f=!1}f&&(o.set(u,d),i(d,u,n,a,o),o.delete(u)),sT(e,r,d)}var Jpe,eme=F(()=>{"use strict";s9();$O();UO();SO();YO();Hy();na();o9();Uy();z2();Tl();efe();K2();l9();Qpe();s(Zit,"baseMergeDeep");Jpe=Zit});function tme(e,t,r,n,i){e!==t&&o1(t,function(a,o){if(i||(i=new hu),yi(a))Jpe(e,t,o,r,tme,n,i);else{var l=n?n(oT(e,o),a,o+"",e,t,i):void 0;l===void 0&&(l=a),sT(e,o,l)}},po)}var rme,nme=F(()=>{"use strict";nT();s9();_3();eme();Tl();vf();l9();s(tme,"baseMerge");rme=tme});function Qit(e,t,r){for(var n=-1,i=e==null?0:e.length;++n{"use strict";s(Qit,"arrayIncludesWith");ime=Qit});function Jit(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Af,sme=F(()=>{"use strict";s(Jit,"last");Af=Jit});function eat(e){return typeof e=="function"?e:uo}var c1,M3=F(()=>{"use strict";cf();s(eat,"castFunction");c1=eat});function tat(e,t){var r=Zr(e)?q4:Ef;return r(e,c1(t))}var at,c9=F(()=>{"use strict";AO();aT();M3();na();s(tat,"forEach");at=tat});var ome=F(()=>{"use strict";c9()});function rat(e,t){var r=[];return Ef(e,function(n,i,a){t(n,i,a)&&r.push(n)}),r}var lme,cme=F(()=>{"use strict";aT();s(rat,"baseFilter");lme=rat});function nat(e,t){var r=Zr(e)?s3:lme;return r(e,vs(t,3))}var zs,ume=F(()=>{"use strict";FO();cme();Ih();na();s(nat,"filter");zs=nat});function iat(e){return function(t,r,n){var i=Object(t);if(!Oa(t)){var a=vs(r,3);t=Bi(t),r=s(function(l){return a(i[l],l,i)},"predicate")}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var hme,dme=F(()=>{"use strict";Ih();cu();Lh();s(iat,"createFind");hme=iat});function sat(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:ohe(r);return i<0&&(i=aat(n+i,0)),H4(e,vs(t,3),i)}var aat,fme,pme=F(()=>{"use strict";RO();Ih();lhe();aat=Math.max;s(sat,"findIndex");fme=sat});var oat,u1,mme=F(()=>{"use strict";dme();pme();oat=hme(fme),u1=oat});function lat(e,t){var r=-1,n=Oa(e)?Array(e.length):[];return Ef(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var N3,u9=F(()=>{"use strict";aT();cu();s(lat,"baseMap");N3=lat});function cat(e,t){var r=Zr(e)?su:N3;return r(e,vs(t,3))}var Fn,gme=F(()=>{"use strict";G2();Ih();u9();na();s(cat,"map");Fn=cat});function uat(e,t){return e==null?e:o1(e,c1(t),po)}var h9,yme=F(()=>{"use strict";_3();M3();vf();s(uat,"forIn");h9=uat});function hat(e,t){return e&&l1(e,c1(t))}var d9,vme=F(()=>{"use strict";L3();M3();s(hat,"forOwn");d9=hat});function dat(e,t){return e>t}var xme,bme=F(()=>{"use strict";s(dat,"baseGt");xme=dat});function mat(e,t){return e!=null&&pat.call(e,t)}var fat,pat,Tme,Cme=F(()=>{"use strict";fat=Object.prototype,pat=fat.hasOwnProperty;s(mat,"baseHas");Tme=mat});function gat(e,t){return e!=null&&E3(e,t,Tme)}var lT,Sme=F(()=>{"use strict";Cme();r9();s(gat,"has");lT=gat});function vat(e){return typeof e=="string"||!Zr(e)&&qi(e)&&Gs(e)==yat}var yat,wme,kme=F(()=>{"use strict";lf();na();lc();yat="[object String]";s(vat,"isString");wme=vat});function xat(e,t){return su(t,function(r){return e[r]})}var Eme,Ame=F(()=>{"use strict";G2();s(xat,"baseValues");Eme=xat});function bat(e){return e==null?[]:Eme(e,Bi(e))}var Xo,Rme=F(()=>{"use strict";Ame();Lh();s(bat,"values");Xo=bat});function kat(e){if(e==null)return!0;if(Oa(e)&&(Zr(e)||typeof e=="string"||typeof e.splice=="function"||uc(e)||yf(e)||cc(e)))return!e.length;var t=jo(e);if(t==Tat||t==Cat)return!e.size;if(mf(e))return!Yy(e).length;for(var r in e)if(wat.call(e,r))return!1;return!0}var Tat,Cat,Sat,wat,P3,_me=F(()=>{"use strict";Z4();Om();Hy();na();cu();Uy();Y2();K2();Tat="[object Map]",Cat="[object Set]",Sat=Object.prototype,wat=Sat.hasOwnProperty;s(kat,"isEmpty");P3=kat});function Eat(e){return e===void 0}var $i,Lme=F(()=>{"use strict";s(Eat,"isUndefined");$i=Eat});function Aat(e,t){return e{"use strict";s(Aat,"baseLt");O3=Aat});function Rat(e,t){var r={};return t=vs(t,3),l1(e,function(n,i,a){df(r,i,t(n,i,a))}),r}var Bm,Dme=F(()=>{"use strict";W2();L3();Ih();s(Rat,"mapValues");Bm=Rat});function _at(e,t,r){for(var n=-1,i=e.length;++n{"use strict";Im();s(_at,"baseExtremum");h1=_at});function Lat(e){return e&&e.length?h1(e,uo,xme):void 0}var mo,Ime=F(()=>{"use strict";B3();bme();cf();s(Lat,"max");mo=Lat});var Dat,d1,Mme=F(()=>{"use strict";nme();Fhe();Dat=$he(function(e,t,r){rme(e,t,r)}),d1=Dat});function Iat(e){return e&&e.length?h1(e,uo,O3):void 0}var Mh,Nme=F(()=>{"use strict";B3();f9();cf();s(Iat,"min");Mh=Iat});function Mat(e,t){return e&&e.length?h1(e,vs(t,2),O3):void 0}var $m,Pme=F(()=>{"use strict";B3();Ih();f9();s(Mat,"minBy");$m=Mat});function Nat(e,t,r,n){if(!yi(e))return e;t=Sf(t,e);for(var i=-1,a=t.length,o=a-1,l=e;l!=null&&++i{"use strict";q2();tT();V2();Tl();Qy();s(Nat,"baseSet");Ome=Nat});function Pat(e,t,r){for(var n=-1,i=t.length,a={};++n{"use strict";rT();Bme();tT();s(Pat,"basePickBy");$me=Pat});function Oat(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Gme,zme=F(()=>{"use strict";s(Oat,"baseSortBy");Gme=Oat});function Bat(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=Yo(e),o=t!==void 0,l=t===null,u=t===t,h=Yo(t);if(!l&&!h&&!a&&e>t||a&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&e{"use strict";Im();s(Bat,"compareAscending");Vme=Bat});function $at(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,l=r.length;++n=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return e.index-t.index}var qme,Hme=F(()=>{"use strict";Wme();s($at,"compareMultiple");qme=$at});function Fat(e,t,r){t.length?t=su(t,function(a){return Zr(a)?function(o){return wf(o,a.length===1?a[0]:a)}:a}):t=[uo];var n=-1;t=su(t,gf(vs));var i=N3(e,function(a,o,l){var u=su(t,function(h){return h(a)});return{criteria:u,index:++n,value:a}});return Gme(i,function(a,o){return qme(a,o,r)})}var Ume,Yme=F(()=>{"use strict";G2();rT();Ih();u9();zme();j2();Hme();cf();na();s(Fat,"baseOrderBy");Ume=Fat});var Gat,jme,Xme=F(()=>{"use strict";i9();Gat=R3("length"),jme=Gat});function Qat(e){for(var t=Kme.lastIndex=0;Kme.test(e);)++t;return t}var Zme,zat,Vat,Wat,qat,Hat,Uat,p9,m9,Yat,Qme,Jme,ege,jat,tge,rge,Xat,Kat,Zat,Kme,nge,ige=F(()=>{"use strict";Zme="\\ud800-\\udfff",zat="\\u0300-\\u036f",Vat="\\ufe20-\\ufe2f",Wat="\\u20d0-\\u20ff",qat=zat+Vat+Wat,Hat="\\ufe0e\\ufe0f",Uat="["+Zme+"]",p9="["+qat+"]",m9="\\ud83c[\\udffb-\\udfff]",Yat="(?:"+p9+"|"+m9+")",Qme="[^"+Zme+"]",Jme="(?:\\ud83c[\\udde6-\\uddff]){2}",ege="[\\ud800-\\udbff][\\udc00-\\udfff]",jat="\\u200d",tge=Yat+"?",rge="["+Hat+"]?",Xat="(?:"+jat+"(?:"+[Qme,Jme,ege].join("|")+")"+rge+tge+")*",Kat=rge+tge+Xat,Zat="(?:"+[Qme+p9+"?",p9,Jme,ege,Uat].join("|")+")",Kme=RegExp(m9+"(?="+m9+")|"+Zat+Kat,"g");s(Qat,"unicodeSize");nge=Qat});function Jat(e){return tfe(e)?nge(e):jme(e)}var age,sge=F(()=>{"use strict";Xme();rfe();ige();s(Jat,"stringSize");age=Jat});function est(e,t){return $me(e,t,function(r,n){return A3(e,n)})}var oge,lge=F(()=>{"use strict";Fme();n9();s(est,"basePick");oge=est});var tst,Fm,cge=F(()=>{"use strict";lge();Zde();tst=Kde(function(e,t){return e==null?{}:oge(e,t)}),Fm=tst});function ist(e,t,r,n){for(var i=-1,a=nst(rst((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var rst,nst,uge,hge=F(()=>{"use strict";rst=Math.ceil,nst=Math.max;s(ist,"baseRange");uge=ist});function ast(e){return function(t,r,n){return n&&typeof n!="number"&&Rh(t,r,n)&&(r=n=void 0),t=zy(t),r===void 0?(r=t,t=0):r=zy(r),n=n===void 0?t{"use strict";hge();U2();TO();s(ast,"createRange");dge=ast});var sst,wl,pge=F(()=>{"use strict";fge();sst=dge(),wl=sst});function ost(e,t,r,n,i){return i(e,function(a,o,l){r=n?(n=!1,a):t(r,a,o,l)}),r}var mge,gge=F(()=>{"use strict";s(ost,"baseReduce");mge=ost});function lst(e,t,r){var n=Zr(e)?nfe:mge,i=arguments.length<3;return n(e,vs(t,4),r,i,Ef)}var du,yge=F(()=>{"use strict";ife();aT();Ih();gge();na();s(lst,"reduce");du=lst});function hst(e){if(e==null)return 0;if(Oa(e))return wme(e)?age(e):e.length;var t=jo(e);return t==cst||t==ust?e.size:Yy(e).length}var cst,ust,g9,vge=F(()=>{"use strict";Z4();Om();cu();kme();sge();cst="[object Map]",ust="[object Set]";s(hst,"size");g9=hst});var dst,fu,xge=F(()=>{"use strict";n3();Yme();H2();U2();dst=pf(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Rh(e,t[0],t[1])?t=[]:r>2&&Rh(t[0],t[1],t[2])&&(t=[t[0]]),Ume(e,e1(t,1),[])}),fu=dst});var fst,pst,bge,Tge=F(()=>{"use strict";qO();whe();T3();fst=1/0,pst=kf&&1/s1(new kf([,-0]))[1]==fst?function(e){return new kf(e)}:She,bge=pst});function gst(e,t,r){var n=-1,i=Phe,a=e.length,o=!0,l=[],u=l;if(r)o=!1,i=ime;else if(a>=mst){var h=t?null:bge(e);if(h)return s1(h);o=!1,i=x3,u=new v3}else u=t?[]:l;e:for(;++n{"use strict";XO();Ohe();ame();KO();Tge();T3();mst=200;s(gst,"baseUniq");Cge=gst});var yst,y9,wge=F(()=>{"use strict";n3();H2();Sge();o9();yst=pf(function(e){return Cge(e1(e,1,I3,!0))}),y9=yst});function xst(e){var t=++vst;return t3(e)+t}var vst,Gm,kge=F(()=>{"use strict";OO();vst=0;s(xst,"uniqueId");Gm=xst});function bst(e,t,r){for(var n=-1,i=e.length,a=t.length,o={};++n{"use strict";s(bst,"baseZipObject");Ege=bst});function Tst(e,t){return Ege(e||[],t||[],ff)}var $3,Rge=F(()=>{"use strict";q2();Age();s(Tst,"zipObject");$3=Tst});var Gn=F(()=>{"use strict";upe();wO();Kpe();ome();ume();mme();BO();c9();yme();vme();Sme();na();_me();z2();Lme();Lh();sme();gme();Dme();Ime();Mme();Nme();Pme();jpe();cge();pge();yge();vge();xge();wge();kge();Rme();Rge();});function Lge(e,t){e[t]?e[t]++:e[t]=1}function Dge(e,t){--e[t]||delete e[t]}function cT(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+_ge+a+_ge+($i(n)?Cst:n)}function Sst(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var l={v:i,w:a};return n&&(l.name=n),l}function v9(e,t){return cT(e,t.v,t.w,t.name)}var Cst,zm,_ge,Ln,x9=F(()=>{"use strict";Gn();Cst="\0",zm="\0",_ge="",Ln=class{static{s(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=fo(void 0),this._defaultEdgeLabelFn=fo(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[zm]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return ou(t)||(t=fo(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Bi(this._nodes)}sources(){var t=this;return zs(this.nodes(),function(r){return P3(t._in[r])})}sinks(){var t=this;return zs(this.nodes(),function(r){return P3(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return at(t,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=zm,this._children[t]={},this._children[zm][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=s(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],at(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),at(Bi(this._in[t]),r),delete this._in[t],delete this._preds[t],at(Bi(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if($i(r))r=zm;else{r+="";for(var n=r;!$i(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==zm)return r}}children(t){if($i(t)&&(t=zm),this._isCompound){var r=this._children[t];if(r)return Bi(r)}else{if(t===zm)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Bi(r)}successors(t){var r=this._sucs[t];if(r)return Bi(r)}neighbors(t){var r=this.predecessors(t);if(r)return y9(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;at(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),at(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:a(l)}return s(a,"findParent"),this._isCompound&&at(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return ou(t)||(t=fo(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Xo(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return du(t,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var t,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(t=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,r=""+r,$i(n)||(n=""+n);var l=cT(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!$i(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,r,n);var u=Sst(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,Lge(this._preds[r],t),Lge(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?v9(this._isDirected,arguments[0]):cT(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?v9(this._isDirected,arguments[0]):cT(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?v9(this._isDirected,arguments[0]):cT(this._isDirected,t,r,n),a=this._edgeObjs[i];return a&&(t=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Dge(this._preds[r],t),Dge(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=Xo(n);return r?zs(i,function(a){return a.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=Xo(n);return r?zs(i,function(a){return a.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};Ln.prototype._nodeCount=0;Ln.prototype._edgeCount=0;s(Lge,"incrementOrInitEntry");s(Dge,"decrementOrRemoveEntry");s(cT,"edgeArgsToId");s(Sst,"edgeArgsToObj");s(v9,"edgeObjToId")});var Ko=F(()=>{"use strict";x9()});function Ige(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function wst(e,t){if(e!=="_next"&&e!=="_prev")return t}var F3,Mge=F(()=>{"use strict";F3=class{static{s(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return Ige(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&Ige(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,n=r._prev;n!==r;)t.push(JSON.stringify(n,wst)),n=n._prev;return"["+t.join(", ")+"]"}};s(Ige,"unlink");s(wst,"filterOutLinks")});function Nge(e,t){if(e.nodeCount()<=1)return[];var r=Ast(e,t||kst),n=Est(r.graph,r.buckets,r.zeroIdx);return Sl(Fn(n,function(i){return e.outEdges(i.v,i.w)}))}function Est(e,t,r){for(var n=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)b9(e,t,r,o);for(;o=i.dequeue();)b9(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){n=n.concat(b9(e,t,r,o,!0));break}}}return n}function b9(e,t,r,n,i){var a=i?[]:void 0;return at(e.inEdges(n.v),function(o){var l=e.edge(o),u=e.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=l,T9(t,r,u)}),at(e.outEdges(n.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,T9(t,r,h)}),e.removeNode(n.v),a}function Ast(e,t){var r=new Ln,n=0,i=0;at(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),at(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),d=u+h;r.setEdge(l.v,l.w,d),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var a=wl(i+n+3).map(function(){return new F3}),o=n+1;return at(r.nodes(),function(l){T9(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function T9(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var kst,Pge=F(()=>{"use strict";Gn();Ko();Mge();kst=fo(1);s(Nge,"greedyFAS");s(Est,"doGreedyFAS");s(b9,"removeNode");s(Ast,"buildState");s(T9,"assignBucket")});function Oge(e){var t=e.graph().acyclicer==="greedy"?Nge(e,r(e)):Rst(e);at(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,Gm("rev"))});function r(n){return function(i){return n.edge(i).weight}}s(r,"weightFn")}function Rst(e){var t=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,at(e.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):i(o.w)}),delete r[a])}return s(i,"dfs"),at(e.nodes(),i),t}function Bge(e){at(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var C9=F(()=>{"use strict";Gn();Pge();s(Oge,"run");s(Rst,"dfsFAS");s(Bge,"undo")});function pu(e,t,r,n){var i;do i=Gm(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function Fge(e){var t=new Ln().setGraph(e.graph());return at(e.nodes(),function(r){t.setNode(r,e.node(r))}),at(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function G3(e){var t=new Ln({multigraph:e.isMultigraph()}).setGraph(e.graph());return at(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),at(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function S9(e,t){var r=e.x,n=e.y,i=t.x-r,a=t.y-n,o=e.width/2,l=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(o=-o),u=o,h=o*a/i),{x:r+u,y:n+h}}function Rf(e){var t=Fn(wl(k9(e)+1),function(){return[]});return at(e.nodes(),function(r){var n=e.node(r),i=n.rank;$i(i)||(t[i][n.order]=r)}),t}function Gge(e){var t=Mh(Fn(e.nodes(),function(r){return e.node(r).rank}));at(e.nodes(),function(r){var n=e.node(r);lT(n,"rank")&&(n.rank-=t)})}function zge(e){var t=Mh(Fn(e.nodes(),function(a){return e.node(a).rank})),r=[];at(e.nodes(),function(a){var o=e.node(a).rank-t;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=e.graph().nodeRankFactor;at(r,function(a,o){$i(a)&&o%i!==0?--n:n&&at(a,function(l){e.node(l).rank+=n})})}function w9(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),pu(e,"border",i,t)}function k9(e){return mo(Fn(e.nodes(),function(t){var r=e.node(t).rank;if(!$i(r))return r}))}function Vge(e,t){var r={lhs:[],rhs:[]};return at(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Wge(e,t){var r=D3();try{return t()}finally{console.log(e+" time: "+(D3()-r)+"ms")}}function qge(e,t){return t()}var mu=F(()=>{"use strict";Gn();Ko();s(pu,"addDummyNode");s(Fge,"simplify");s(G3,"asNonCompoundGraph");s(S9,"intersectRect");s(Rf,"buildLayerMatrix");s(Gge,"normalizeRanks");s(zge,"removeEmptyRanks");s(w9,"addBorderNode");s(k9,"maxRank");s(Vge,"partition");s(Wge,"time");s(qge,"notime")});function Uge(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&at(n,t),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a{"use strict";Gn();mu();s(Uge,"addBorderSegments");s(Hge,"addBorderNode")});function Xge(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Zge(e)}function Kge(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&_st(e),(t==="lr"||t==="rl")&&(Lst(e),Zge(e))}function Zge(e){at(e.nodes(),function(t){jge(e.node(t))}),at(e.edges(),function(t){jge(e.edge(t))})}function jge(e){var t=e.width;e.width=e.height,e.height=t}function _st(e){at(e.nodes(),function(t){E9(e.node(t))}),at(e.edges(),function(t){var r=e.edge(t);at(r.points,E9),Object.prototype.hasOwnProperty.call(r,"y")&&E9(r)})}function E9(e){e.y=-e.y}function Lst(e){at(e.nodes(),function(t){A9(e.node(t))}),at(e.edges(),function(t){var r=e.edge(t);at(r.points,A9),Object.prototype.hasOwnProperty.call(r,"x")&&A9(r)})}function A9(e){var t=e.x;e.x=e.y,e.y=t}var Qge=F(()=>{"use strict";Gn();s(Xge,"adjust");s(Kge,"undo");s(Zge,"swapWidthHeight");s(jge,"swapWidthHeightOne");s(_st,"reverseY");s(E9,"reverseYOne");s(Lst,"swapXY");s(A9,"swapXYOne")});function Jge(e){e.graph().dummyChains=[],at(e.edges(),function(t){Ist(e,t)})}function Ist(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(a!==n+1){e.removeEdge(t);var h=void 0,d,f;for(f=0,++n;n{"use strict";Gn();mu();s(Jge,"run");s(Ist,"normalizeEdge");s(e0e,"undo")});function hT(e){var t={};function r(n){var i=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return i.rank;t[n]=!0;var a=Mh(Fn(e.outEdges(n),function(o){return r(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}s(r,"dfs"),at(e.sources(),r)}function Vm(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var z3=F(()=>{"use strict";Gn();s(hT,"longestPath");s(Vm,"slack")});function V3(e){var t=new Ln({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,a;Mst(t,e){"use strict";Gn();Ko();z3();s(V3,"feasibleTree");s(Mst,"tightTree");s(Nst,"findMinSlackEdge");s(Pst,"shiftRanks")});var r0e=F(()=>{"use strict"});var L9=F(()=>{"use strict"});var i6r,D9=F(()=>{"use strict";Gn();L9();i6r=fo(1)});var n0e=F(()=>{"use strict";D9()});var I9=F(()=>{"use strict"});var i0e=F(()=>{"use strict";I9()});var m6r,a0e=F(()=>{"use strict";Gn();m6r=fo(1)});function M9(e){var t={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new dT;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,at(e.predecessors(a),i),delete r[a],n.push(a))}if(s(i,"visit"),at(e.sinks(),i),g9(t)!==e.nodeCount())throw new dT;return n}function dT(){}var N9=F(()=>{"use strict";Gn();M9.CycleException=dT;s(M9,"topsort");s(dT,"CycleException");dT.prototype=new Error});var s0e=F(()=>{"use strict";N9()});function W3(e,t,r){Zr(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return at(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);o0e(e,o,r==="post",a,n,i)}),i}function o0e(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),at(i(t),function(o){o0e(e,o,r,n,i,a)}),r&&a.push(t))}var P9=F(()=>{"use strict";Gn();s(W3,"dfs");s(o0e,"doDfs")});function O9(e,t){return W3(e,t,"post")}var l0e=F(()=>{"use strict";P9();s(O9,"postorder")});function B9(e,t){return W3(e,t,"pre")}var c0e=F(()=>{"use strict";P9();s(B9,"preorder")});var u0e=F(()=>{"use strict";L9();x9()});var h0e=F(()=>{"use strict";r0e();D9();n0e();i0e();a0e();s0e();l0e();c0e();u0e();I9();N9()});function Lf(e){e=Fge(e),hT(e);var t=V3(e);F9(t),$9(t,e);for(var r,n;r=m0e(t);)n=g0e(t,e,r),y0e(t,e,r,n)}function $9(e,t){var r=O9(e,e.nodes());r=r.slice(0,r.length-1),at(r,function(n){Gst(e,t,n)})}function Gst(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=f0e(e,t,r)}function f0e(e,t,r){var n=e.node(r),i=n.parent,a=!0,o=t.edge(r,i),l=0;return o||(a=!1,o=t.edge(i,r)),l=o.weight,at(t.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==i){var f=h===a,p=t.edge(u).weight;if(l+=f?p:-p,Vst(e,r,d)){var m=e.edge(r,d).cutvalue;l+=f?-m:m}}}),l}function F9(e,t){arguments.length<2&&(t=e.nodes()[0]),p0e(e,{},1,t)}function p0e(e,t,r,n,i){var a=r,o=e.node(n);return t[n]=!0,at(e.neighbors(n),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=p0e(e,t,r,l,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function m0e(e){return u1(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g0e(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var a=e.node(n),o=e.node(i),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=zs(t.edges(),function(d){return u===d0e(e,e.node(d.v),l)&&u!==d0e(e,e.node(d.w),l)});return $m(h,function(d){return Vm(t,d)})}function y0e(e,t,r,n){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(n.v,n.w,{}),F9(e),$9(e,t),zst(e,t)}function zst(e,t){var r=u1(e.nodes(),function(i){return!t.node(i).parent}),n=B9(e,r);n=n.slice(1),at(n,function(i){var a=e.node(i).parent,o=t.edge(i,a),l=!1;o||(o=t.edge(a,i),l=!0),t.node(i).rank=t.node(a).rank+(l?o.minlen:-o.minlen)})}function Vst(e,t,r){return e.hasEdge(t,r)}function d0e(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var v0e=F(()=>{"use strict";Gn();h0e();mu();_9();z3();Lf.initLowLimValues=F9;Lf.initCutValues=$9;Lf.calcCutValue=f0e;Lf.leaveEdge=m0e;Lf.enterEdge=g0e;Lf.exchangeEdges=y0e;s(Lf,"networkSimplex");s($9,"initCutValues");s(Gst,"assignCutValue");s(f0e,"calcCutValue");s(F9,"initLowLimValues");s(p0e,"dfsAssignLowLim");s(m0e,"leaveEdge");s(g0e,"enterEdge");s(y0e,"exchangeEdges");s(zst,"updateRanks");s(Vst,"isTreeEdge");s(d0e,"isDescendant")});function G9(e){switch(e.graph().ranker){case"network-simplex":x0e(e);break;case"tight-tree":qst(e);break;case"longest-path":Wst(e);break;default:x0e(e)}}function qst(e){hT(e),V3(e)}function x0e(e){Lf(e)}var Wst,z9=F(()=>{"use strict";_9();v0e();z3();s(G9,"rank");Wst=hT;s(qst,"tightTreeRanker");s(x0e,"networkSimplexRanker")});function b0e(e){var t=pu(e,"root",{},"_root"),r=Hst(e),n=mo(Xo(r))-1,i=2*n+1;e.graph().nestingRoot=t,at(e.edges(),function(o){e.edge(o).minlen*=i});var a=Ust(e)+1;at(e.children(),function(o){T0e(e,t,i,a,n,r,o)}),e.graph().nodeRankFactor=i}function T0e(e,t,r,n,i,a,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=w9(e,"_bt"),h=w9(e,"_bb"),d=e.node(o);e.setParent(u,o),d.borderTop=u,e.setParent(h,o),d.borderBottom=h,at(l,function(f){T0e(e,t,r,n,i,a,f);var p=e.node(f),m=p.borderTop?p.borderTop:f,g=p.borderBottom?p.borderBottom:f,y=p.borderTop?n:2*n,v=m!==g?1:i-a[o]+1;e.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:i+a[o]})}function Hst(e){var t={};function r(n,i){var a=e.children(n);a&&a.length&&at(a,function(o){r(o,i+1)}),t[n]=i}return s(r,"dfs"),at(e.children(),function(n){r(n,1)}),t}function Ust(e){return du(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function C0e(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,at(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var S0e=F(()=>{"use strict";Gn();mu();s(b0e,"run");s(T0e,"dfs");s(Hst,"treeDepths");s(Ust,"sumWeights");s(C0e,"cleanup")});function w0e(e,t,r){var n={},i;at(r,function(a){for(var o=e.parent(a),l,u;o;){if(l=e.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var k0e=F(()=>{"use strict";Gn();s(w0e,"addSubgraphConstraints")});function E0e(e,t,r){var n=jst(e),i=new Ln({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return e.node(a)});return at(e.nodes(),function(a){var o=e.node(a),l=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,l||n),at(e[r](a),function(u){var h=u.v===a?u.w:u.v,d=i.edge(h,a),f=$i(d)?0:d.weight;i.setEdge(h,a,{weight:e.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function jst(e){for(var t;e.hasNode(t=Gm("_root")););return t}var A0e=F(()=>{"use strict";Gn();Ko();s(E0e,"buildLayerGraph");s(jst,"createRootNode")});function R0e(e,t){for(var r=0,n=1;n0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=h.weight;u+=h.weight*f})),u}var _0e=F(()=>{"use strict";Gn();s(R0e,"crossCount");s(Xst,"twoLayerCrossCount")});function L0e(e){var t={},r=zs(e.nodes(),function(l){return!e.children(l).length}),n=mo(Fn(r,function(l){return e.node(l).rank})),i=Fn(wl(n+1),function(){return[]});function a(l){if(!lT(t,l)){t[l]=!0;var u=e.node(l);i[u.rank].push(l),at(e.successors(l),a)}}s(a,"dfs");var o=fu(r,function(l){return e.node(l).rank});return at(o,a),i}var D0e=F(()=>{"use strict";Gn();s(L0e,"initOrder")});function I0e(e,t){return Fn(t,function(r){var n=e.inEdges(r);if(n.length){var i=du(n,function(a,o){var l=e.edge(o),u=e.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var M0e=F(()=>{"use strict";Gn();s(I0e,"barycenter")});function N0e(e,t){var r={};at(e,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};$i(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),at(t.edges(),function(i){var a=r[i.v],o=r[i.w];!$i(a)&&!$i(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=zs(r,function(i){return!i.indegree});return Kst(n)}function Kst(e){var t=[];function r(a){return function(o){o.merged||($i(o.barycenter)||$i(a.barycenter)||o.barycenter>=a.barycenter)&&Zst(a,o)}}s(r,"handleIn");function n(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(s(n,"handleOut");e.length;){var i=e.pop();t.push(i),at(i.in.reverse(),r(i)),at(i.out,n(i))}return Fn(zs(t,function(a){return!a.merged}),function(a){return Fm(a,["vs","i","barycenter","weight"])})}function Zst(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var P0e=F(()=>{"use strict";Gn();s(N0e,"resolveConflicts");s(Kst,"doResolveConflicts");s(Zst,"mergeEntries")});function B0e(e,t){var r=Vge(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,i=fu(r.rhs,function(d){return-d.i}),a=[],o=0,l=0,u=0;n.sort(Qst(!!t)),u=O0e(a,i,u),at(n,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,l+=d.weight,u=O0e(a,i,u)});var h={vs:Sl(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function O0e(e,t,r){for(var n;t.length&&(n=Af(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Qst(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var $0e=F(()=>{"use strict";Gn();mu();s(B0e,"sort");s(O0e,"consumeUnsortable");s(Qst,"compareWithBias")});function V9(e,t,r,n){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(i=zs(i,function(g){return g!==o&&g!==l}));var h=I0e(e,i);at(h,function(g){if(e.children(g.v).length){var y=V9(e,g.v,r,n);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&eot(g,y)}});var d=N0e(h,r);Jst(d,u);var f=B0e(d,n);if(o&&(f.vs=Sl([o,f.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function Jst(e,t){at(e,function(r){r.vs=Sl(r.vs.map(function(n){return t[n]?t[n].vs:n}))})}function eot(e,t){$i(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var F0e=F(()=>{"use strict";Gn();M0e();P0e();$0e();s(V9,"sortSubgraph");s(Jst,"expandSubgraphs");s(eot,"mergeBarycenters")});function V0e(e){var t=k9(e),r=G0e(e,wl(1,t+1),"inEdges"),n=G0e(e,wl(t-1,-1,-1),"outEdges"),i=L0e(e);z0e(e,i);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){tot(l%2?r:n,l%4>=2),i=Rf(e);var h=R0e(e,i);h{"use strict";Gn();Ko();mu();k0e();A0e();_0e();D0e();F0e();s(V0e,"order");s(G0e,"buildLayerGraphs");s(tot,"sweepLayerGraphs");s(z0e,"assignOrder")});function q0e(e){var t=not(e);at(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,a=rot(e,t,i.v,i.w),o=a.path,l=a.lca,u=0,h=o[u],d=!0;r!==i.w;){if(n=e.node(r),d){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=n;(u=e.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h}}function not(e){var t={},r=0;function n(i){var a=r;at(e.children(i),n),t[i]={low:a,lim:r++}}return s(n,"dfs"),at(e.children(),n),t}var H0e=F(()=>{"use strict";Gn();s(q0e,"parentDummyChains");s(rot,"findPath");s(not,"postorder")});function iot(e,t){var r={};function n(i,a){var o=0,l=0,u=i.length,h=Af(a);return at(a,function(d,f){var p=sot(e,d),m=p?e.node(p).order:u;(p||d===h)&&(at(a.slice(l,f+1),function(g){at(e.predecessors(g),function(y){var v=e.node(y),x=v.order;(xh)&&U0e(r,p,d)})})}s(n,"scan");function i(a,o){var l=-1,u,h=0;return at(o,function(d,f){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(u=e.node(p[0]).order,n(o,h,f,l,u),h=f,l=u)}n(o,h,o.length,u,a.length)}),o}return s(i,"visitLayer"),du(t,i),r}function sot(e,t){if(e.node(t).dummy)return u1(e.predecessors(t),function(r){return e.node(r).dummy})}function U0e(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function oot(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function lot(e,t,r,n){var i={},a={},o={};return at(t,function(l){at(l,function(u,h){i[u]=u,a[u]=u,o[u]=h})}),at(t,function(l){var u=-1;at(l,function(h){var d=n(h);if(d.length){d=fu(d,function(y){return o[y]});for(var f=(d.length-1)/2,p=Math.floor(f),m=Math.ceil(f);p<=m;++p){var g=d[p];a[h]===h&&u{"use strict";Gn();Ko();mu();s(iot,"findType1Conflicts");s(aot,"findType2Conflicts");s(sot,"findOtherInnerSegmentNode");s(U0e,"addConflict");s(oot,"hasConflict");s(lot,"verticalAlignment");s(cot,"horizontalCompaction");s(uot,"buildBlockGraph");s(hot,"findSmallestWidthAlignment");s(dot,"alignCoordinates");s(fot,"balance");s(Y0e,"positionX");s(pot,"sep");s(mot,"width")});function X0e(e){e=G3(e),got(e),d9(Y0e(e),function(t,r){e.node(r).x=t})}function got(e){var t=Rf(e),r=e.graph().ranksep,n=0;at(t,function(i){var a=mo(Fn(i,function(o){return e.node(o).height}));at(i,function(o){e.node(o).y=n+a/2}),n+=a+r})}var K0e=F(()=>{"use strict";Gn();mu();j0e();s(X0e,"position");s(got,"positionY")});function fT(e,t){var r=t&&t.debugTiming?Wge:qge;r("layout",()=>{var n=r(" buildLayoutGraph",()=>Aot(e));r(" runLayout",()=>yot(n,r)),r(" updateInputGraph",()=>vot(e,n))})}function yot(e,t){t(" makeSpaceForEdgeLabels",()=>Rot(e)),t(" removeSelfEdges",()=>Bot(e)),t(" acyclic",()=>Oge(e)),t(" nestingGraph.run",()=>b0e(e)),t(" rank",()=>G9(G3(e))),t(" injectEdgeLabelProxies",()=>_ot(e)),t(" removeEmptyRanks",()=>zge(e)),t(" nestingGraph.cleanup",()=>C0e(e)),t(" normalizeRanks",()=>Gge(e)),t(" assignRankMinMax",()=>Lot(e)),t(" removeEdgeLabelProxies",()=>Dot(e)),t(" normalize.run",()=>Jge(e)),t(" parentDummyChains",()=>q0e(e)),t(" addBorderSegments",()=>Uge(e)),t(" order",()=>V0e(e)),t(" insertSelfEdges",()=>$ot(e)),t(" adjustCoordinateSystem",()=>Xge(e)),t(" position",()=>X0e(e)),t(" positionSelfEdges",()=>Fot(e)),t(" removeBorderNodes",()=>Oot(e)),t(" normalize.undo",()=>e0e(e)),t(" fixupEdgeLabelCoords",()=>Not(e)),t(" undoCoordinateSystem",()=>Kge(e)),t(" translateGraph",()=>Iot(e)),t(" assignNodeIntersects",()=>Mot(e)),t(" reversePoints",()=>Pot(e)),t(" acyclic.undo",()=>Bge(e))}function vot(e,t){at(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),at(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function Aot(e){var t=new Ln({multigraph:!0,compound:!0}),r=q9(e.graph());return t.setGraph(d1({},bot,W9(r,xot),Fm(r,Tot))),at(e.nodes(),function(n){var i=q9(e.node(n));t.setNode(n,a9(W9(i,Cot),Sot)),t.setParent(n,e.parent(n))}),at(e.edges(),function(n){var i=q9(e.edge(n));t.setEdge(n,d1({},kot,W9(i,wot),Fm(i,Eot)))}),t}function Rot(e){var t=e.graph();t.ranksep/=2,at(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function _ot(e){at(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-n.rank)/2+n.rank,e:t};pu(e,"edge-proxy",a,"_ep")}})}function Lot(e){var t=0;at(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=mo(t,n.maxRank))}),e.graph().maxRank=t}function Dot(e){at(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function Iot(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=e.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,m=h.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,f-m/2),i=Math.max(i,f+m/2)}s(u,"getExtremes"),at(e.nodes(),function(h){u(e.node(h))}),at(e.edges(),function(h){var d=e.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),t-=o,n-=l,at(e.nodes(),function(h){var d=e.node(h);d.x-=t,d.y-=n}),at(e.edges(),function(h){var d=e.edge(h);at(d.points,function(f){f.x-=t,f.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),a.width=r-t+o,a.height=i-n+l}function Mot(e){at(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(S9(n,a)),r.points.push(S9(i,o))})}function Not(e){at(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Pot(e){at(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Oot(e){at(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),a=e.node(Af(r.borderLeft)),o=e.node(Af(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),at(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Bot(e){at(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function $ot(e){var t=Rf(e);at(t,function(r){var n=0;at(r,function(i,a){var o=e.node(i);o.order=a+n,at(o.selfEdges,function(l){pu(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function Fot(e){at(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,l=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*o/3,y:a-l},{x:i+5*o/6,y:a-l},{x:i+o,y:a},{x:i+5*o/6,y:a+l},{x:i+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function W9(e,t){return Bm(Fm(e,t),Number)}function q9(e){var t={};return at(e,function(r,n){t[n.toLowerCase()]=r}),t}var xot,bot,Tot,Cot,Sot,wot,kot,Eot,Z0e=F(()=>{"use strict";Gn();Ko();Yge();Qge();C9();R9();z9();S0e();W0e();H0e();K0e();mu();s(fT,"layout");s(yot,"runLayout");s(vot,"updateInputGraph");xot=["nodesep","edgesep","ranksep","marginx","marginy"],bot={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Tot=["acyclicer","ranker","rankdir","align"],Cot=["width","height"],Sot={width:0,height:0},wot=["minlen","weight","width","height","labeloffset"],kot={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Eot=["labelpos"];s(Aot,"buildLayoutGraph");s(Rot,"makeSpaceForEdgeLabels");s(_ot,"injectEdgeLabelProxies");s(Lot,"assignRankMinMax");s(Dot,"removeEdgeLabelProxies");s(Iot,"translateGraph");s(Mot,"assignNodeIntersects");s(Not,"fixupEdgeLabelCoords");s(Pot,"reversePointsForReversedEdges");s(Oot,"removeBorderNodes");s(Bot,"removeSelfEdges");s($ot,"insertSelfEdges");s(Fot,"positionSelfEdges");s(W9,"selectNumberAttrs");s(q9,"canonicalize")});var H9=F(()=>{"use strict";C9();Z0e();R9();z9()});var Q0e=F(()=>{"use strict"});var eye={};sr(eye,{captureNodeSizes:()=>qot,shouldCaptureSizes:()=>zot});function J0e(){if(!(typeof globalThis>"u"))return globalThis}function zot(){return!!J0e()?.mermaidCaptureSizes}function Vot(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}function Wot(e,t){let r=J0e();if(!r)return;let n=t.node(),a=((n&&"ownerSVGElement"in n?n.ownerSVGElement:null)??n)?.id??"(unknown)";r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}function qot(e,t){let r=[];for(let n of t.nodes)n.isGroup||r.push({id:n.id,width:n.width??0,height:n.height??0});r.length!==0&&Wot({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:Vot()},nodes:r},e)}var tye=F(()=>{"use strict";Q0e();s(J0e,"getCaptureGlobal");s(zot,"shouldCaptureSizes");s(Vot,"capturedFromLocation");s(Wot,"emitCapturedSizes");s(qot,"captureNodeSizes")});function U9(e,{edgePathsClass:t="edges edgePath"}={}){let r=e.insert("g").attr("class","root"),n=r.insert("g").attr("class","clusters"),i=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:n,edgePaths:i,edgeLabels:a,nodes:o,rootGroups:r}}async function Hot(e,t){if(t.label){let{shapeSvg:r,bbox:n}=await yt(e,t);t.labelBBox={width:n.width,height:n.height},r.remove()}else t.labelBBox={width:0,height:0}}async function Y9(e,t,r){let n=await Eh(e,t,r),i=n.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,n}async function rye(e,t){let r=new Ln({multigraph:!0,compound:!0}),n=[...t.edges],i=Pe(),a=U9(e),{edgeLabels:o,nodes:l}=a,u=new Map,h=e.node()!=null;await Promise.all(t.nodes.map(async d=>{if(d.isGroup)h&&await Hot(l,d),r.setNode(d.id,{...d});else{if(h){let f=await Y9(l,d,{config:i,dir:d.dir});u.set(d.id,f)}r.setNode(d.id,{...d})}}));for(let d of n)h&&O4(d)&&await oc(o,d),r.setEdge(d.start,d.end,{...d},d.id),t.edges.some(p=>p.id===d.id)||t.edges.push(d);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:d}=await Promise.resolve().then(()=>(tye(),eye));d(e,t)}return{graph:r,groups:a,nodeElements:u}}var j9=F(()=>{"use strict";Ko();Jt();Fy();Lm();Ht();s(U9,"createLayoutElementGroups");s(Hot,"measureGroupLabel");s(Y9,"insertMeasuredNode");s(rye,"createGraphWithElements")});var qr,Wm,iye,aye,pT,Uot,sye,oye,Yot,qm,nye,lye,cye,uye,q3,hye,jot,X9=F(()=>{"use strict";St();Ko();qr=new Map,Wm=new Map,iye=new Map,aye=s(()=>{Wm.clear(),iye.clear(),qr.clear()},"clear"),pT=s((e,t)=>{let r=Wm.get(t)||[];return se.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Uot=s((e,t)=>{let r=Wm.get(t)||[];return se.info("Descendants of ",t," is ",r),se.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||pT(e.v,t)||pT(e.w,t)||r.includes(e.w):(se.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),sye=s((e,t,r,n)=>{se.debug("Copying children of ",e,"root",n,"data",t.node(e),n);let i=t.children(e)||[];e!==n&&i.push(e),se.debug("Copying (nodes) clusterId",e,"nodes",i),i.forEach(a=>{if(t.children(a).length>0)sye(a,t,r,n);else{let o=t.node(a);se.info("cp ",a," to ",n," with parent ",e),r.setNode(a,o),n!==t.parent(a)&&(se.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==n&&a!==e?(se.debug("Setting parent",a,e),r.setParent(a,e)):(se.info("In copy ",e,"root",n,"data",t.node(e),n),se.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==n,"node!==clusterId",a!==e));let l=t.edges(a);se.debug("Copying Edges",l),l.forEach(u=>{se.info("Edge",u);let h=t.edge(u.v,u.w,u.name);se.info("Edge data",h,n);try{Uot(u,n)?(se.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),se.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):se.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",e)}catch(d){se.error(d)}})}se.debug("Removing node",a),t.removeNode(a)})},"copy"),oye=s((e,t)=>{let r=t.children(e),n=[...r];for(let i of r)iye.set(i,e),n=[...n,...oye(i,t)];return n},"extractDescendants"),Yot=s((e,t,r)=>{let n=e.edges().filter(u=>u.v===t||u.w===t),i=e.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),qm=s((e,t,r)=>{let n=t.children(e);if(se.trace("Searching children of id ",e,n),n.length<1)return e;let i;for(let a of n){let o=qm(a,t,r),l=Yot(t,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),nye=s(e=>!qr.has(e)||!qr.get(e).externalConnections?e:qr.has(e)?qr.get(e).id:e,"getAnchorId"),lye=s((e,t)=>{if(!e||t>10){se.debug("Opting out, no graph ");return}else se.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(se.debug("Cluster identified",r," Replacement id in edges: ",qm(r,e,r)),Wm.set(r,oye(r,e)),qr.set(r,{id:qm(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let n=e.children(r),i=e.edges();n.length>0?(se.debug("Cluster identified",r,Wm),i.forEach(a=>{let o=pT(a.v,r),l=pT(a.w,r);o^l&&(se.debug("Edge: ",a," leaves cluster ",r),se.debug("Descendants of XXX ",r,": ",Wm.get(r)),qr.get(r).externalConnections=!0)})):se.debug("Not a cluster ",r,Wm)});for(let r of qr.keys()){let n=qr.get(r).id,i=e.parent(n);i!==r&&qr.has(i)&&!qr.get(i).externalConnections&&(qr.get(r).id=i);let a=e.edges().some(o=>o.v===r);if(n&&qr.get(r)?.externalConnections&&a&&hye(e,n,r)){let o=jot(e,r,e.parent(n));o&&(qr.get(r).id=o)}}e.edges().forEach(function(r){let n=e.edge(r);se.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),se.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,a=r.w;if(se.debug("Fix XXX",qr,"ids:",r.v,r.w,"Translating: ",qr.get(r.v)," --- ",qr.get(r.w)),qr.get(r.v)||qr.get(r.w)){if(se.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),i=nye(r.v),a=nye(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v){let o=e.parent(i);qr.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=e.parent(a);qr.get(o).externalConnections=!0,n.toCluster=r.w}se.debug("Fix Replacing with XXX",i,a,r.name),e.setEdge(i,a,n,r.name)}}),cye(e,0),se.trace(qr)},"adjustClustersAndEdges"),cye=s((e,t)=>{if(t>10){se.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i of r){let a=e.children(i);n=n||a.length>0}if(!n){se.debug("Done, no node has children",e.nodes());return}se.debug("Nodes = ",r,t);for(let i of r)if(se.debug("Extracting node",i,qr,qr.has(i)&&!qr.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!qr.has(i))se.debug("Not a cluster",i,t);else if(!qr.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){se.debug("Cluster without external connections, without a parent and with children",i,t);let o=e.graph().rankdir==="TB"?"LR":"TB";qr.get(i)?.clusterData?.dir&&(o=qr.get(i).clusterData.dir,se.debug("Fixing dir",qr.get(i).clusterData.dir,o));let l=new Ln({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});sye(i,e,l,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:qr.get(i).clusterData,label:qr.get(i).label,graph:l})}else se.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!qr.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),se.debug(qr);r=e.nodes(),se.debug("New list of nodes",r);for(let i of r){let a=e.node(i);se.debug(" Now next level",i,a),a?.clusterNode&&cye(a.graph,t+1)}},"extractor"),uye=s((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(n=>{let i=e.children(n),a=uye(e,i);r=[...r,...a]}),r},"sorter"),q3=s(e=>uye(e,e.children()),"sortNodesByHierarchy"),hye=s((e,t,r)=>{let n=e.parent(t);for(;n&&n!==r;){let i=qr.get(n);if(i&&!i.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),jot=s((e,t,r)=>{let n=e.children(t)??[];for(let i of n){if(i===r||pT(i,r))continue;let a=qm(i,e,t);if(a&&!hye(e,a,t))return a}return null},"findSafeAnchorNode")});function f1({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:n,afterPaint:i,paintOptions:a}){let o=t??Z9;return s(async function(u,h,d,f){let p=h.select("g");(d?.insertMarkers??Gy)(p,u.markers,u.type,u.diagramId),K9();let m={element:p,helpers:d,options:f};m.preparedLayout=await e?.(u,m);let g=await o(u,m),y=await r(u,m),v={...m,measure:g};n?await n(u,v,y):await Q9(u,v,a),await i?.(u,v,y)},"render")}function K9(){Fue(),Bue(),Rue(),aye()}async function Z9(e,{element:t}){return await rye(t,e)}async function Q9(e,t,r={}){let{measure:n}=t,{groups:i}=n;for(let o of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(o,t)||await Xot(i,o,t,r);let a=Zot(e.nodes);for(let o of e.edges)Qot(o,r)||await Jot(i,o,a,e,r,t)}async function Xot(e,t,r,n){t.clusterNode?au(t):Kot(t,r,n)?await sf(e.clusters,t):au(t)}function Kot(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}function Zot(e){let t=new Map;for(let r of e)r?.id&&t.set(r.id,r);return t}function Qot(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function Jot(e,t,r,n,i,a){let o=of(e.edgePaths,{...t},i.clusterDb??new Map,n.type,dye(t.start,t,r,a,i),dye(t.end,t,r,a,i),n.diagramId,elt(t,i));O4(t)&&(_m.has(t.id)||await oc(e.edgeLabels,t),tlt(t,o))}function dye(e,t,r,n,i){return i.getEdgeNode?.(e,t,n)??(e?r.get(e)??{}:{})}function elt(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}function tlt(e,t){let r=t?.updatedPath??t?.originalPath,n=Lt(),{subGraphTitleTotalMargin:i}=kh({flowchart:n.flowchart??{}});if(e.label){let a=_m.get(e.id),o=e.x,l=e.y;if(r){let u=or.calcLabelPosition(r);se.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t?.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(e?.startLabelLeft){let a=Pi.get(e.id).startLeft,o=e?.x,l=e?.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=Pi.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=Pi.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=Pi.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}}var H3=F(()=>{"use strict";St();My();br();er();O2();j9();B2();Fy();B4();Lm();X9();s(f1,"createCommonLayoutRenderer");s(K9,"clearLayoutRenderState");s(Z9,"defaultMeasureLayout");s(Q9,"paintLayoutData");s(Xot,"paintLayoutNode");s(Kot,"shouldPaintAsCluster");s(Zot,"buildNodeLookup");s(Qot,"shouldSkipPaintEdge");s(Jot,"paintLayoutEdge");s(dye,"getRenderedNode");s(elt,"shouldSkipIntersect");s(tlt,"positionRenderedEdgeLabel")});var Tye={};sr(Tye,{applyDagreLayoutResult:()=>vye,getEdgesToRender:()=>J9,measureDagreLayout:()=>xye,prepareLayoutForDagre:()=>eB,render:()=>flt,runDagreLayoutCore:()=>bye});var fye,pye,rlt,nlt,ilt,alt,slt,J9,gye,yye,olt,mye,llt,vye,clt,ult,eB,xye,bye,hlt,dlt,flt,Cye=F(()=>{"use strict";H9();Ko();j9();H3();My();Ht();X9();Lm();B2();Fy();St();O2();Jt();fye=s((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),pye=s((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),rlt=s(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),nlt=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],ilt=s((e,t,r,n,i)=>{let a=[],o=new Set;if(r.forEach(({start:d,end:f})=>{d!==n&&o.add(d),f!==n&&o.add(f)}),o.forEach(d=>{let f=e.node(d);typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)}),a.length===0&&r.forEach(({edge:d})=>{(d.points??[]).forEach(f=>{typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)})}),a.length===0)return pye(i);let l=a.reduce((d,f)=>({x:d.x+f.x/a.length,y:d.y+f.y/a.length}),{x:0,y:0}),u=l.x-t.x,h=l.y-t.y;return Math.abs(u)>Math.abs(h)?u>0?"right":"left":Math.abs(h)>0?h>0?"bottom":"top":pye(i)},"getSelfLoopSide"),alt=s((e,t="top",r=0,n=0)=>{let i=e.x,a=e.y-r,o=e.width/2,l=e.height/2,u=Math.max(36,Math.min(100,e.width*.8)),h=fye(Math.max(n,e.width*.35),36,u),d=fye(Math.min(e.width,e.height)*.45,24,48);switch(t){case"bottom":{let f=a+l;return[{x:i-h/2,y:f},{x:i-h/2,y:f+d},{x:i+h/2,y:f+d},{x:i+h/2,y:f}]}case"right":{let f=i+o;return[{x:f,y:a-h/2},{x:f+d,y:a-h/2},{x:f+d,y:a+h/2},{x:f,y:a+h/2}]}case"left":{let f=i-o;return[{x:f,y:a-h/2},{x:f-d,y:a-h/2},{x:f-d,y:a+h/2},{x:f,y:a+h/2}]}case"top":default:{let f=a-l;return[{x:i-h/2,y:f},{x:i-h/2,y:f-d},{x:i+h/2,y:f-d},{x:i+h/2,y:f}]}}},"getSelfLoopPoints"),slt=s((e,t,r="top",n=0,i={})=>{let o=e.x,l=e.y-n,u=i.width??0,h=i.height??0;switch(r){case"bottom":return{x:o,y:Math.max(...t.map(d=>d.y))+h/2+4};case"right":return{x:Math.max(...t.map(d=>d.x))+u/2+4,y:l};case"left":return{x:Math.min(...t.map(d=>d.x))-u/2-4,y:l};case"top":default:return{x:o,y:Math.min(...t.map(d=>d.y))-h/2-4}}},"getSelfLoopLabelPosition"),J9=s((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(o=>{let l=e.edge(o);if(r&&l.selfLoop){let u=l.selfLoop.id;n.has(u)||n.set(u,[]),n.get(u).push({edge:l,start:o.v,end:o.w})}else i.push({edge:l,start:o.v,end:o.w})}),n.forEach(o=>{if(o.length!==3){o.forEach(x=>i.push(x));return}o.sort((x,b)=>x.edge.selfLoop.order-b.edge.selfLoop.order);let[l,u,h]=o,d=l.edge.originalEdge??u.edge.originalEdge??h.edge.originalEdge??u.edge,f=e.node(d.start);if(!f){o.forEach(x=>i.push(x));return}let p={width:u.edge.width,height:u.edge.height},m=ilt(e,f,o,d.start,a),g=alt(f,m,t,p.width??0),y=slt(f,g,m,t,p),v={...u.edge,...d,id:d.id,points:g,start:d.start,end:d.end,x:y.x,y:y.y,width:p.width,height:p.height,labelStyle:u.edge.labelStyle,fromCluster:l.edge.fromCluster??u.edge.fromCluster??h.edge.fromCluster,toCluster:l.edge.toCluster??u.edge.toCluster??h.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),gye=s(async({element:e,graph:t,diagramType:r,id:n,parentCluster:i,siteConfig:a})=>{let o=t.graph().rankdir;se.trace("Dir in recursive render - dir:",o);let{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f}=U9(e,{edgePathsClass:"edgePaths"});t.nodes()?se.info("Recursive render XXX",t.nodes()):se.info("No nodes found for",t),t.edges().length>0&&se.info("Recursive edges",t.edge(t.edges()[0]));let p=rlt(r);await Promise.all(t.nodes().map(async function(y){let v=t.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));se.trace(`Setting data for parent cluster XXX + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),sQe=s((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),oQe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),lQe={extension:GZe,composition:zZe,aggregation:VZe,dependency:WZe,lollipop:qZe,point:HZe,circle:UZe,cross:YZe,barb:jZe,barbNeo:XZe,only_one:KZe,zero_or_one:ZZe,one_or_more:QZe,zero_or_more:JZe,only_one_neo:eQe,zero_or_one_neo:tQe,one_or_more_neo:rQe,zero_or_more_neo:nQe,requirement_arrow:iQe,requirement_contains:sQe,requirement_arrow_neo:aQe,requirement_contains_neo:oQe},Gy=FZe});async function Eh(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?L2[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return n.attr("data-look",un(t.look)),t.tooltip&&i.attr("title",t.tooltip),$4.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var $4,$ue,Fue,au,Lm=F(()=>{"use strict";St();R4();er();$4=new Map;s(Eh,"insertNode");$ue=s((e,t)=>{$4.set(t.id,e)},"setNodeElem"),Fue=s(()=>{$4.clear()},"clear"),au=s(e=>{let t=$4.get(e.id);se.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var Gue,zue=F(()=>{"use strict";br();Yr();St();B2();Fy();B4();Lm();Ht();er();Gue={common:Tt,getConfig:Lt,insertCluster:sf,insertEdge:of,insertEdgeLabel:oc,insertMarkers:Gy,insertNode:Eh,interpolateToCurve:qN,labelHelper:yt,log:se,positionEdgeLabel:$y}});var cQe,F4,bO=F(()=>{"use strict";cQe=typeof global=="object"&&global&&global.Object===Object&&global,F4=cQe});var uQe,hQe,Oi,bl=F(()=>{"use strict";bO();uQe=typeof self=="object"&&self&&self.Object===Object&&self,hQe=F4||uQe||Function("return this")(),Oi=hQe});var dQe,Pa,Dm=F(()=>{"use strict";bl();dQe=Oi.Symbol,Pa=dQe});function mQe(e){var t=fQe.call(e,F2),r=e[F2];try{e[F2]=void 0;var n=!0}catch{}var i=pQe.call(e);return n&&(t?e[F2]=r:delete e[F2]),i}var Vue,fQe,pQe,F2,Wue,que=F(()=>{"use strict";Dm();Vue=Object.prototype,fQe=Vue.hasOwnProperty,pQe=Vue.toString,F2=Pa?Pa.toStringTag:void 0;s(mQe,"getRawTag");Wue=mQe});function vQe(e){return yQe.call(e)}var gQe,yQe,Hue,Uue=F(()=>{"use strict";gQe=Object.prototype,yQe=gQe.toString;s(vQe,"objectToString");Hue=vQe});function TQe(e){return e==null?e===void 0?bQe:xQe:Yue&&Yue in Object(e)?Wue(e):Hue(e)}var xQe,bQe,Yue,Gs,lf=F(()=>{"use strict";Dm();que();Uue();xQe="[object Null]",bQe="[object Undefined]",Yue=Pa?Pa.toStringTag:void 0;s(TQe,"baseGetTag");Gs=TQe});function CQe(e){return e!=null&&typeof e=="object"}var qi,lc=F(()=>{"use strict";s(CQe,"isObjectLike");qi=CQe});function wQe(e){return typeof e=="symbol"||qi(e)&&Gs(e)==SQe}var SQe,Yo,Im=F(()=>{"use strict";lf();lc();SQe="[object Symbol]";s(wQe,"isSymbol");Yo=wQe});function kQe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{"use strict";s(kQe,"arrayMap");su=kQe});var EQe,Zr,na=F(()=>{"use strict";EQe=Array.isArray,Zr=EQe});function Kue(e){if(typeof e=="string")return e;if(Zr(e))return su(e,Kue)+"";if(Yo(e))return Xue?Xue.call(e):"";var t=e+"";return t=="0"&&1/e==-AQe?"-0":t}var AQe,jue,Xue,Zue,Que=F(()=>{"use strict";Dm();G2();na();Im();AQe=1/0,jue=Pa?Pa.prototype:void 0,Xue=jue?jue.toString:void 0;s(Kue,"baseToString");Zue=Kue});function _Qe(e){for(var t=e.length;t--&&RQe.test(e.charAt(t)););return t}var RQe,Jue,ehe=F(()=>{"use strict";RQe=/\s/;s(_Qe,"trimmedEndIndex");Jue=_Qe});function DQe(e){return e&&e.slice(0,Jue(e)+1).replace(LQe,"")}var LQe,the,rhe=F(()=>{"use strict";ehe();LQe=/^\s+/;s(DQe,"baseTrim");the=DQe});function IQe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var yi,Tl=F(()=>{"use strict";s(IQe,"isObject");yi=IQe});function BQe(e){if(typeof e=="number")return e;if(Yo(e))return nhe;if(yi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=yi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=the(e);var r=NQe.test(e);return r||PQe.test(e)?OQe(e.slice(2),r?2:8):MQe.test(e)?nhe:+e}var nhe,MQe,NQe,PQe,OQe,ihe,ahe=F(()=>{"use strict";rhe();Tl();Im();nhe=NaN,MQe=/^[-+]0x[0-9a-f]+$/i,NQe=/^0b[01]+$/i,PQe=/^0o[0-7]+$/i,OQe=parseInt;s(BQe,"toNumber");ihe=BQe});function FQe(e){if(!e)return e===0?e:0;if(e=ihe(e),e===she||e===-she){var t=e<0?-1:1;return t*$Qe}return e===e?e:0}var she,$Qe,zy,TO=F(()=>{"use strict";ahe();she=1/0,$Qe=17976931348623157e292;s(FQe,"toFinite");zy=FQe});function GQe(e){var t=zy(e),r=t%1;return t===t?r?t-r:t:0}var ohe,lhe=F(()=>{"use strict";TO();s(GQe,"toInteger");ohe=GQe});function zQe(e){return e}var uo,cf=F(()=>{"use strict";s(zQe,"identity");uo=zQe});function UQe(e){if(!yi(e))return!1;var t=Gs(e);return t==WQe||t==qQe||t==VQe||t==HQe}var VQe,WQe,qQe,HQe,ou,z2=F(()=>{"use strict";lf();Tl();VQe="[object AsyncFunction]",WQe="[object Function]",qQe="[object GeneratorFunction]",HQe="[object Proxy]";s(UQe,"isFunction");ou=UQe});var YQe,G4,che=F(()=>{"use strict";bl();YQe=Oi["__core-js_shared__"],G4=YQe});function jQe(e){return!!uhe&&uhe in e}var uhe,hhe,dhe=F(()=>{"use strict";che();uhe=(function(){var e=/[^.]+$/.exec(G4&&G4.keys&&G4.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();s(jQe,"isMasked");hhe=jQe});function ZQe(e){if(e!=null){try{return KQe.call(e)}catch{}try{return e+""}catch{}}return""}var XQe,KQe,Ah,CO=F(()=>{"use strict";XQe=Function.prototype,KQe=XQe.toString;s(ZQe,"toSource");Ah=ZQe});function aJe(e){if(!yi(e)||hhe(e))return!1;var t=ou(e)?iJe:JQe;return t.test(Ah(e))}var QQe,JQe,eJe,tJe,rJe,nJe,iJe,fhe,phe=F(()=>{"use strict";z2();dhe();Tl();CO();QQe=/[\\^$.*+?()[\]{}|]/g,JQe=/^\[object .+?Constructor\]$/,eJe=Function.prototype,tJe=Object.prototype,rJe=eJe.toString,nJe=tJe.hasOwnProperty,iJe=RegExp("^"+rJe.call(nJe).replace(QQe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(aJe,"baseIsNative");fhe=aJe});function sJe(e,t){return e?.[t]}var mhe,ghe=F(()=>{"use strict";s(sJe,"getValue");mhe=sJe});function oJe(e,t){var r=mhe(e,t);return fhe(r)?r:void 0}var ho,uf=F(()=>{"use strict";phe();ghe();s(oJe,"getNative");ho=oJe});var lJe,z4,yhe=F(()=>{"use strict";uf();bl();lJe=ho(Oi,"WeakMap"),z4=lJe});var vhe,cJe,xhe,bhe=F(()=>{"use strict";Tl();vhe=Object.create,cJe=(function(){function e(){}return s(e,"object"),function(t){if(!yi(t))return{};if(vhe)return vhe(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),xhe=cJe});function uJe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var The,Che=F(()=>{"use strict";s(uJe,"apply");The=uJe});function hJe(){}var She,whe=F(()=>{"use strict";s(hJe,"noop");She=hJe});function dJe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{"use strict";s(dJe,"copyArray");V4=dJe});function gJe(e){var t=0,r=0;return function(){var n=mJe(),i=pJe-(n-r);if(r=n,i>0){if(++t>=fJe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var fJe,pJe,mJe,khe,Ehe=F(()=>{"use strict";fJe=800,pJe=16,mJe=Date.now;s(gJe,"shortOut");khe=gJe});function yJe(e){return function(){return e}}var fo,wO=F(()=>{"use strict";s(yJe,"constant");fo=yJe});var vJe,Vy,kO=F(()=>{"use strict";uf();vJe=(function(){try{var e=ho(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Vy=vJe});var xJe,Ahe,Rhe=F(()=>{"use strict";wO();kO();cf();xJe=Vy?function(e,t){return Vy(e,"toString",{configurable:!0,enumerable:!1,value:fo(t),writable:!0})}:uo,Ahe=xJe});var bJe,W4,EO=F(()=>{"use strict";Rhe();Ehe();bJe=khe(Ahe),W4=bJe});function TJe(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";s(TJe,"arrayEach");q4=TJe});function CJe(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{"use strict";s(CJe,"baseFindIndex");H4=CJe});function SJe(e){return e!==e}var _he,Lhe=F(()=>{"use strict";s(SJe,"baseIsNaN");_he=SJe});function wJe(e,t,r){for(var n=r-1,i=e.length;++n{"use strict";s(wJe,"strictIndexOf");Dhe=wJe});function kJe(e,t,r){return t===t?Dhe(e,t,r):H4(e,_he,r)}var Mhe,Nhe=F(()=>{"use strict";RO();Lhe();Ihe();s(kJe,"baseIndexOf");Mhe=kJe});function EJe(e,t){var r=e==null?0:e.length;return!!r&&Mhe(e,t,0)>-1}var Phe,Ohe=F(()=>{"use strict";Nhe();s(EJe,"arrayIncludes");Phe=EJe});function _Je(e,t){var r=typeof e;return t=t??AJe,!!t&&(r=="number"||r!="symbol"&&RJe.test(e))&&e>-1&&e%1==0&&e{"use strict";AJe=9007199254740991,RJe=/^(?:0|[1-9]\d*)$/;s(_Je,"isIndex");hf=_Je});function LJe(e,t,r){t=="__proto__"&&Vy?Vy(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var df,W2=F(()=>{"use strict";kO();s(LJe,"baseAssignValue");df=LJe});function DJe(e,t){return e===t||e!==e&&t!==t}var Cl,Mm=F(()=>{"use strict";s(DJe,"eq");Cl=DJe});function NJe(e,t,r){var n=e[t];(!(MJe.call(e,t)&&Cl(n,r))||r===void 0&&!(t in e))&&df(e,t,r)}var IJe,MJe,ff,q2=F(()=>{"use strict";W2();Mm();IJe=Object.prototype,MJe=IJe.hasOwnProperty;s(NJe,"assignValue");ff=NJe});function PJe(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a{"use strict";q2();W2();s(PJe,"copyObject");lu=PJe});function OJe(e,t,r){return t=Bhe(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Bhe(n.length-t,0),o=Array(a);++i{"use strict";Che();Bhe=Math.max;s(OJe,"overRest");U4=OJe});function BJe(e,t){return W4(U4(e,t,uo),e+"")}var pf,H2=F(()=>{"use strict";cf();_O();EO();s(BJe,"baseRest");pf=BJe});function FJe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$Je}var $Je,qy,Y4=F(()=>{"use strict";$Je=9007199254740991;s(FJe,"isLength");qy=FJe});function GJe(e){return e!=null&&qy(e.length)&&!ou(e)}var Oa,cu=F(()=>{"use strict";z2();Y4();s(GJe,"isArrayLike");Oa=GJe});function zJe(e,t,r){if(!yi(r))return!1;var n=typeof t;return(n=="number"?Oa(r)&&hf(t,r.length):n=="string"&&t in r)?Cl(r[t],e):!1}var Rh,U2=F(()=>{"use strict";Mm();cu();V2();Tl();s(zJe,"isIterateeCall");Rh=zJe});function VJe(e){return pf(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Rh(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n{"use strict";H2();U2();s(VJe,"createAssigner");$he=VJe});function qJe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||WJe;return e===r}var WJe,mf,Y2=F(()=>{"use strict";WJe=Object.prototype;s(qJe,"isPrototype");mf=qJe});function HJe(e,t){for(var r=-1,n=Array(e);++r{"use strict";s(HJe,"baseTimes");Ghe=HJe});function YJe(e){return qi(e)&&Gs(e)==UJe}var UJe,LO,Vhe=F(()=>{"use strict";lf();lc();UJe="[object Arguments]";s(YJe,"baseIsArguments");LO=YJe});var Whe,jJe,XJe,KJe,cc,Hy=F(()=>{"use strict";Vhe();lc();Whe=Object.prototype,jJe=Whe.hasOwnProperty,XJe=Whe.propertyIsEnumerable,KJe=LO((function(){return arguments})())?LO:function(e){return qi(e)&&jJe.call(e,"callee")&&!XJe.call(e,"callee")},cc=KJe});function ZJe(){return!1}var qhe,Hhe=F(()=>{"use strict";s(ZJe,"stubFalse");qhe=ZJe});var jhe,Uhe,QJe,Yhe,JJe,eet,uc,Uy=F(()=>{"use strict";bl();Hhe();jhe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uhe=jhe&&typeof module=="object"&&module&&!module.nodeType&&module,QJe=Uhe&&Uhe.exports===jhe,Yhe=QJe?Oi.Buffer:void 0,JJe=Yhe?Yhe.isBuffer:void 0,eet=JJe||qhe,uc=eet});function Aet(e){return qi(e)&&qy(e.length)&&!!ci[Gs(e)]}var tet,ret,net,iet,aet,set,oet,cet,uet,het,det,fet,pet,met,get,yet,vet,xet,bet,Tet,Cet,wet,ket,Eet,ci,Xhe,Khe=F(()=>{"use strict";lf();Y4();lc();tet="[object Arguments]",ret="[object Array]",net="[object Boolean]",iet="[object Date]",aet="[object Error]",set="[object Function]",oet="[object Map]",cet="[object Number]",uet="[object Object]",het="[object RegExp]",det="[object Set]",fet="[object String]",pet="[object WeakMap]",met="[object ArrayBuffer]",get="[object DataView]",yet="[object Float32Array]",vet="[object Float64Array]",xet="[object Int8Array]",bet="[object Int16Array]",Tet="[object Int32Array]",Cet="[object Uint8Array]",wet="[object Uint8ClampedArray]",ket="[object Uint16Array]",Eet="[object Uint32Array]",ci={};ci[yet]=ci[vet]=ci[xet]=ci[bet]=ci[Tet]=ci[Cet]=ci[wet]=ci[ket]=ci[Eet]=!0;ci[tet]=ci[ret]=ci[met]=ci[net]=ci[get]=ci[iet]=ci[aet]=ci[set]=ci[oet]=ci[cet]=ci[uet]=ci[het]=ci[det]=ci[fet]=ci[pet]=!1;s(Aet,"baseIsTypedArray");Xhe=Aet});function Ret(e){return function(t){return e(t)}}var gf,j2=F(()=>{"use strict";s(Ret,"baseUnary");gf=Ret});var Zhe,X2,_et,DO,Let,_h,j4=F(()=>{"use strict";bO();Zhe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,X2=Zhe&&typeof module=="object"&&module&&!module.nodeType&&module,_et=X2&&X2.exports===Zhe,DO=_et&&F4.process,Let=(function(){try{var e=X2&&X2.require&&X2.require("util").types;return e||DO&&DO.binding&&DO.binding("util")}catch{}})(),_h=Let});var Qhe,Det,yf,K2=F(()=>{"use strict";Khe();j2();j4();Qhe=_h&&_h.isTypedArray,Det=Qhe?gf(Qhe):Xhe,yf=Det});function Net(e,t){var r=Zr(e),n=!r&&cc(e),i=!r&&!n&&uc(e),a=!r&&!n&&!i&&yf(e),o=r||n||i||a,l=o?Ghe(e.length,String):[],u=l.length;for(var h in e)(t||Met.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||hf(h,u)))&&l.push(h);return l}var Iet,Met,X4,IO=F(()=>{"use strict";zhe();Hy();na();Uy();V2();K2();Iet=Object.prototype,Met=Iet.hasOwnProperty;s(Net,"arrayLikeKeys");X4=Net});function Pet(e,t){return function(r){return e(t(r))}}var K4,MO=F(()=>{"use strict";s(Pet,"overArg");K4=Pet});var Oet,Jhe,ede=F(()=>{"use strict";MO();Oet=K4(Object.keys,Object),Jhe=Oet});function Fet(e){if(!mf(e))return Jhe(e);var t=[];for(var r in Object(e))$et.call(e,r)&&r!="constructor"&&t.push(r);return t}var Bet,$et,Yy,Z4=F(()=>{"use strict";Y2();ede();Bet=Object.prototype,$et=Bet.hasOwnProperty;s(Fet,"baseKeys");Yy=Fet});function Get(e){return Oa(e)?X4(e):Yy(e)}var Bi,Lh=F(()=>{"use strict";IO();Z4();cu();s(Get,"keys");Bi=Get});function zet(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var tde,rde=F(()=>{"use strict";s(zet,"nativeKeysIn");tde=zet});function qet(e){if(!yi(e))return tde(e);var t=mf(e),r=[];for(var n in e)n=="constructor"&&(t||!Wet.call(e,n))||r.push(n);return r}var Vet,Wet,nde,ide=F(()=>{"use strict";Tl();Y2();rde();Vet=Object.prototype,Wet=Vet.hasOwnProperty;s(qet,"baseKeysIn");nde=qet});function Het(e){return Oa(e)?X4(e,!0):nde(e)}var po,vf=F(()=>{"use strict";IO();ide();cu();s(Het,"keysIn");po=Het});function jet(e,t){if(Zr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Yo(e)?!0:Yet.test(e)||!Uet.test(e)||t!=null&&e in Object(t)}var Uet,Yet,jy,Q4=F(()=>{"use strict";na();Im();Uet=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yet=/^\w*$/;s(jet,"isKey");jy=jet});var Xet,Dh,Z2=F(()=>{"use strict";uf();Xet=ho(Object,"create"),Dh=Xet});function Ket(){this.__data__=Dh?Dh(null):{},this.size=0}var ade,sde=F(()=>{"use strict";Z2();s(Ket,"hashClear");ade=Ket});function Zet(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ode,lde=F(()=>{"use strict";s(Zet,"hashDelete");ode=Zet});function ttt(e){var t=this.__data__;if(Dh){var r=t[e];return r===Qet?void 0:r}return ett.call(t,e)?t[e]:void 0}var Qet,Jet,ett,cde,ude=F(()=>{"use strict";Z2();Qet="__lodash_hash_undefined__",Jet=Object.prototype,ett=Jet.hasOwnProperty;s(ttt,"hashGet");cde=ttt});function itt(e){var t=this.__data__;return Dh?t[e]!==void 0:ntt.call(t,e)}var rtt,ntt,hde,dde=F(()=>{"use strict";Z2();rtt=Object.prototype,ntt=rtt.hasOwnProperty;s(itt,"hashHas");hde=itt});function stt(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Dh&&t===void 0?att:t,this}var att,fde,pde=F(()=>{"use strict";Z2();att="__lodash_hash_undefined__";s(stt,"hashSet");fde=stt});function Xy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";sde();lde();ude();dde();pde();s(Xy,"Hash");Xy.prototype.clear=ade;Xy.prototype.delete=ode;Xy.prototype.get=cde;Xy.prototype.has=hde;Xy.prototype.set=fde;NO=Xy});function ott(){this.__data__=[],this.size=0}var gde,yde=F(()=>{"use strict";s(ott,"listCacheClear");gde=ott});function ltt(e,t){for(var r=e.length;r--;)if(Cl(e[r][0],t))return r;return-1}var xf,Q2=F(()=>{"use strict";Mm();s(ltt,"assocIndexOf");xf=ltt});function htt(e){var t=this.__data__,r=xf(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():utt.call(t,r,1),--this.size,!0}var ctt,utt,vde,xde=F(()=>{"use strict";Q2();ctt=Array.prototype,utt=ctt.splice;s(htt,"listCacheDelete");vde=htt});function dtt(e){var t=this.__data__,r=xf(t,e);return r<0?void 0:t[r][1]}var bde,Tde=F(()=>{"use strict";Q2();s(dtt,"listCacheGet");bde=dtt});function ftt(e){return xf(this.__data__,e)>-1}var Cde,Sde=F(()=>{"use strict";Q2();s(ftt,"listCacheHas");Cde=ftt});function ptt(e,t){var r=this.__data__,n=xf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var wde,kde=F(()=>{"use strict";Q2();s(ptt,"listCacheSet");wde=ptt});function Ky(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";yde();xde();Tde();Sde();kde();s(Ky,"ListCache");Ky.prototype.clear=gde;Ky.prototype.delete=vde;Ky.prototype.get=bde;Ky.prototype.has=Cde;Ky.prototype.set=wde;bf=Ky});var mtt,Tf,J4=F(()=>{"use strict";uf();bl();mtt=ho(Oi,"Map"),Tf=mtt});function gtt(){this.size=0,this.__data__={hash:new NO,map:new(Tf||bf),string:new NO}}var Ede,Ade=F(()=>{"use strict";mde();J2();J4();s(gtt,"mapCacheClear");Ede=gtt});function ytt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Rde,_de=F(()=>{"use strict";s(ytt,"isKeyable");Rde=ytt});function vtt(e,t){var r=e.__data__;return Rde(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Cf,eT=F(()=>{"use strict";_de();s(vtt,"getMapData");Cf=vtt});function xtt(e){var t=Cf(this,e).delete(e);return this.size-=t?1:0,t}var Lde,Dde=F(()=>{"use strict";eT();s(xtt,"mapCacheDelete");Lde=xtt});function btt(e){return Cf(this,e).get(e)}var Ide,Mde=F(()=>{"use strict";eT();s(btt,"mapCacheGet");Ide=btt});function Ttt(e){return Cf(this,e).has(e)}var Nde,Pde=F(()=>{"use strict";eT();s(Ttt,"mapCacheHas");Nde=Ttt});function Ctt(e,t){var r=Cf(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ode,Bde=F(()=>{"use strict";eT();s(Ctt,"mapCacheSet");Ode=Ctt});function Zy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Ade();Dde();Mde();Pde();Bde();s(Zy,"MapCache");Zy.prototype.clear=Ede;Zy.prototype.delete=Lde;Zy.prototype.get=Ide;Zy.prototype.has=Nde;Zy.prototype.set=Ode;Nm=Zy});function PO(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Stt);var r=s(function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new(PO.Cache||Nm),r}var Stt,$de,Fde=F(()=>{"use strict";e3();Stt="Expected a function";s(PO,"memoize");PO.Cache=Nm;$de=PO});function ktt(e){var t=$de(e,function(n){return r.size===wtt&&r.clear(),n}),r=t.cache;return t}var wtt,Gde,zde=F(()=>{"use strict";Fde();wtt=500;s(ktt,"memoizeCapped");Gde=ktt});var Ett,Att,Rtt,Vde,Wde=F(()=>{"use strict";zde();Ett=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Att=/\\(\\)?/g,Rtt=Gde(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ett,function(r,n,i,a){t.push(i?a.replace(Att,"$1"):n||r)}),t}),Vde=Rtt});function _tt(e){return e==null?"":Zue(e)}var t3,OO=F(()=>{"use strict";Que();s(_tt,"toString");t3=_tt});function Ltt(e,t){return Zr(e)?e:jy(e,t)?[e]:Vde(t3(e))}var Sf,tT=F(()=>{"use strict";na();Q4();Wde();OO();s(Ltt,"castPath");Sf=Ltt});function Itt(e){if(typeof e=="string"||Yo(e))return e;var t=e+"";return t=="0"&&1/e==-Dtt?"-0":t}var Dtt,uu,Qy=F(()=>{"use strict";Im();Dtt=1/0;s(Itt,"toKey");uu=Itt});function Mtt(e,t){t=Sf(t,e);for(var r=0,n=t.length;e!=null&&r{"use strict";tT();Qy();s(Mtt,"baseGet");wf=Mtt});function Ntt(e,t,r){var n=e==null?void 0:wf(e,t);return n===void 0?r:n}var qde,Hde=F(()=>{"use strict";rT();s(Ntt,"get");qde=Ntt});function Ptt(e,t){for(var r=-1,n=t.length,i=e.length;++r{"use strict";s(Ptt,"arrayPush");Jy=Ptt});function Ott(e){return Zr(e)||cc(e)||!!(Ude&&e&&e[Ude])}var Ude,Yde,jde=F(()=>{"use strict";Dm();Hy();na();Ude=Pa?Pa.isConcatSpreadable:void 0;s(Ott,"isFlattenable");Yde=Ott});function Xde(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Yde),i||(i=[]);++a0&&r(l)?t>1?Xde(l,t-1,r,n,i):Jy(i,l):n||(i[i.length]=l)}return i}var e1,n3=F(()=>{"use strict";r3();jde();s(Xde,"baseFlatten");e1=Xde});function Btt(e){var t=e==null?0:e.length;return t?e1(e,1):[]}var Sl,BO=F(()=>{"use strict";n3();s(Btt,"flatten");Sl=Btt});function $tt(e){return W4(U4(e,void 0,Sl),e+"")}var Kde,Zde=F(()=>{"use strict";BO();_O();EO();s($tt,"flatRest");Kde=$tt});var Ftt,t1,i3=F(()=>{"use strict";MO();Ftt=K4(Object.getPrototypeOf,Object),t1=Ftt});function Htt(e){if(!qi(e)||Gs(e)!=Gtt)return!1;var t=t1(e);if(t===null)return!0;var r=Wtt.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Qde.call(r)==qtt}var Gtt,ztt,Vtt,Qde,Wtt,qtt,Jde,efe=F(()=>{"use strict";lf();i3();lc();Gtt="[object Object]",ztt=Function.prototype,Vtt=Object.prototype,Qde=ztt.toString,Wtt=Vtt.hasOwnProperty,qtt=Qde.call(Object);s(Htt,"isPlainObject");Jde=Htt});function ert(e){return Jtt.test(e)}var Utt,Ytt,jtt,Xtt,Ktt,Ztt,Qtt,Jtt,tfe,rfe=F(()=>{"use strict";Utt="\\ud800-\\udfff",Ytt="\\u0300-\\u036f",jtt="\\ufe20-\\ufe2f",Xtt="\\u20d0-\\u20ff",Ktt=Ytt+jtt+Xtt,Ztt="\\ufe0e\\ufe0f",Qtt="\\u200d",Jtt=RegExp("["+Qtt+Utt+Ktt+Ztt+"]");s(ert,"hasUnicode");tfe=ert});function trt(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i{"use strict";s(trt,"arrayReduce");nfe=trt});function rrt(){this.__data__=new bf,this.size=0}var afe,sfe=F(()=>{"use strict";J2();s(rrt,"stackClear");afe=rrt});function nrt(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var ofe,lfe=F(()=>{"use strict";s(nrt,"stackDelete");ofe=nrt});function irt(e){return this.__data__.get(e)}var cfe,ufe=F(()=>{"use strict";s(irt,"stackGet");cfe=irt});function art(e){return this.__data__.has(e)}var hfe,dfe=F(()=>{"use strict";s(art,"stackHas");hfe=art});function ort(e,t){var r=this.__data__;if(r instanceof bf){var n=r.__data__;if(!Tf||n.length{"use strict";J2();J4();e3();srt=200;s(ort,"stackSet");ffe=ort});function r1(e){var t=this.__data__=new bf(e);this.size=t.size}var hu,nT=F(()=>{"use strict";J2();sfe();lfe();ufe();dfe();pfe();s(r1,"Stack");r1.prototype.clear=afe;r1.prototype.delete=ofe;r1.prototype.get=cfe;r1.prototype.has=hfe;r1.prototype.set=ffe;hu=r1});function lrt(e,t){return e&&lu(t,Bi(t),e)}var mfe,gfe=F(()=>{"use strict";Wy();Lh();s(lrt,"baseAssign");mfe=lrt});function crt(e,t){return e&&lu(t,po(t),e)}var yfe,vfe=F(()=>{"use strict";Wy();vf();s(crt,"baseAssignIn");yfe=crt});function hrt(e,t){if(t)return e.slice();var r=e.length,n=Tfe?Tfe(r):new e.constructor(r);return e.copy(n),n}var Cfe,xfe,urt,bfe,Tfe,a3,$O=F(()=>{"use strict";bl();Cfe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xfe=Cfe&&typeof module=="object"&&module&&!module.nodeType&&module,urt=xfe&&xfe.exports===Cfe,bfe=urt?Oi.Buffer:void 0,Tfe=bfe?bfe.allocUnsafe:void 0;s(hrt,"cloneBuffer");a3=hrt});function drt(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r{"use strict";s(drt,"arrayFilter");s3=drt});function frt(){return[]}var o3,GO=F(()=>{"use strict";s(frt,"stubArray");o3=frt});var prt,mrt,Sfe,grt,n1,l3=F(()=>{"use strict";FO();GO();prt=Object.prototype,mrt=prt.propertyIsEnumerable,Sfe=Object.getOwnPropertySymbols,grt=Sfe?function(e){return e==null?[]:(e=Object(e),s3(Sfe(e),function(t){return mrt.call(e,t)}))}:o3,n1=grt});function yrt(e,t){return lu(e,n1(e),t)}var wfe,kfe=F(()=>{"use strict";Wy();l3();s(yrt,"copySymbols");wfe=yrt});var vrt,xrt,c3,zO=F(()=>{"use strict";r3();i3();l3();GO();vrt=Object.getOwnPropertySymbols,xrt=vrt?function(e){for(var t=[];e;)Jy(t,n1(e)),e=t1(e);return t}:o3,c3=xrt});function brt(e,t){return lu(e,c3(e),t)}var Efe,Afe=F(()=>{"use strict";Wy();zO();s(brt,"copySymbolsIn");Efe=brt});function Trt(e,t,r){var n=t(e);return Zr(e)?n:Jy(n,r(e))}var u3,VO=F(()=>{"use strict";r3();na();s(Trt,"baseGetAllKeys");u3=Trt});function Crt(e){return u3(e,Bi,n1)}var iT,WO=F(()=>{"use strict";VO();l3();Lh();s(Crt,"getAllKeys");iT=Crt});function Srt(e){return u3(e,po,c3)}var Rfe,_fe=F(()=>{"use strict";VO();zO();vf();s(Srt,"getAllKeysIn");Rfe=Srt});var wrt,h3,Lfe=F(()=>{"use strict";uf();bl();wrt=ho(Oi,"DataView"),h3=wrt});var krt,d3,Dfe=F(()=>{"use strict";uf();bl();krt=ho(Oi,"Promise"),d3=krt});var Ert,kf,qO=F(()=>{"use strict";uf();bl();Ert=ho(Oi,"Set"),kf=Ert});var Ife,Art,Mfe,Nfe,Pfe,Ofe,Rrt,_rt,Lrt,Drt,Irt,Pm,jo,Om=F(()=>{"use strict";Lfe();J4();Dfe();qO();yhe();lf();CO();Ife="[object Map]",Art="[object Object]",Mfe="[object Promise]",Nfe="[object Set]",Pfe="[object WeakMap]",Ofe="[object DataView]",Rrt=Ah(h3),_rt=Ah(Tf),Lrt=Ah(d3),Drt=Ah(kf),Irt=Ah(z4),Pm=Gs;(h3&&Pm(new h3(new ArrayBuffer(1)))!=Ofe||Tf&&Pm(new Tf)!=Ife||d3&&Pm(d3.resolve())!=Mfe||kf&&Pm(new kf)!=Nfe||z4&&Pm(new z4)!=Pfe)&&(Pm=s(function(e){var t=Gs(e),r=t==Art?e.constructor:void 0,n=r?Ah(r):"";if(n)switch(n){case Rrt:return Ofe;case _rt:return Ife;case Lrt:return Mfe;case Drt:return Nfe;case Irt:return Pfe}return t},"getTag"));jo=Pm});function Prt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Nrt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Mrt,Nrt,Bfe,$fe=F(()=>{"use strict";Mrt=Object.prototype,Nrt=Mrt.hasOwnProperty;s(Prt,"initCloneArray");Bfe=Prt});var Ort,i1,HO=F(()=>{"use strict";bl();Ort=Oi.Uint8Array,i1=Ort});function Brt(e){var t=new e.constructor(e.byteLength);return new i1(t).set(new i1(e)),t}var a1,f3=F(()=>{"use strict";HO();s(Brt,"cloneArrayBuffer");a1=Brt});function $rt(e,t){var r=t?a1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Ffe,Gfe=F(()=>{"use strict";f3();s($rt,"cloneDataView");Ffe=$rt});function Grt(e){var t=new e.constructor(e.source,Frt.exec(e));return t.lastIndex=e.lastIndex,t}var Frt,zfe,Vfe=F(()=>{"use strict";Frt=/\w*$/;s(Grt,"cloneRegExp");zfe=Grt});function zrt(e){return qfe?Object(qfe.call(e)):{}}var Wfe,qfe,Hfe,Ufe=F(()=>{"use strict";Dm();Wfe=Pa?Pa.prototype:void 0,qfe=Wfe?Wfe.valueOf:void 0;s(zrt,"cloneSymbol");Hfe=zrt});function Vrt(e,t){var r=t?a1(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var p3,UO=F(()=>{"use strict";f3();s(Vrt,"cloneTypedArray");p3=Vrt});function lnt(e,t,r){var n=e.constructor;switch(t){case Zrt:return a1(e);case Wrt:case qrt:return new n(+e);case Qrt:return Ffe(e,r);case Jrt:case ent:case tnt:case rnt:case nnt:case int:case ant:case snt:case ont:return p3(e,r);case Hrt:return new n;case Urt:case Xrt:return new n(e);case Yrt:return zfe(e);case jrt:return new n;case Krt:return Hfe(e)}}var Wrt,qrt,Hrt,Urt,Yrt,jrt,Xrt,Krt,Zrt,Qrt,Jrt,ent,tnt,rnt,nnt,int,ant,snt,ont,Yfe,jfe=F(()=>{"use strict";f3();Gfe();Vfe();Ufe();UO();Wrt="[object Boolean]",qrt="[object Date]",Hrt="[object Map]",Urt="[object Number]",Yrt="[object RegExp]",jrt="[object Set]",Xrt="[object String]",Krt="[object Symbol]",Zrt="[object ArrayBuffer]",Qrt="[object DataView]",Jrt="[object Float32Array]",ent="[object Float64Array]",tnt="[object Int8Array]",rnt="[object Int16Array]",nnt="[object Int32Array]",int="[object Uint8Array]",ant="[object Uint8ClampedArray]",snt="[object Uint16Array]",ont="[object Uint32Array]";s(lnt,"initCloneByTag");Yfe=lnt});function cnt(e){return typeof e.constructor=="function"&&!mf(e)?xhe(t1(e)):{}}var m3,YO=F(()=>{"use strict";bhe();i3();Y2();s(cnt,"initCloneObject");m3=cnt});function hnt(e){return qi(e)&&jo(e)==unt}var unt,Xfe,Kfe=F(()=>{"use strict";Om();lc();unt="[object Map]";s(hnt,"baseIsMap");Xfe=hnt});var Zfe,dnt,Qfe,Jfe=F(()=>{"use strict";Kfe();j2();j4();Zfe=_h&&_h.isMap,dnt=Zfe?gf(Zfe):Xfe,Qfe=dnt});function pnt(e){return qi(e)&&jo(e)==fnt}var fnt,epe,tpe=F(()=>{"use strict";Om();lc();fnt="[object Set]";s(pnt,"baseIsSet");epe=pnt});var rpe,mnt,npe,ipe=F(()=>{"use strict";tpe();j2();j4();rpe=_h&&_h.isSet,mnt=rpe?gf(rpe):epe,npe=mnt});function g3(e,t,r,n,i,a){var o,l=t&gnt,u=t&ynt,h=t&vnt;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!yi(e))return e;var d=Zr(e);if(d){if(o=Bfe(e),!l)return V4(e,o)}else{var f=jo(e),p=f==spe||f==Snt;if(uc(e))return a3(e,l);if(f==ope||f==ape||p&&!i){if(o=u||p?{}:m3(e),!l)return u?Efe(e,yfe(o,e)):wfe(e,mfe(o,e))}else{if(!Zn[f])return i?e:{};o=Yfe(e,f,l)}}a||(a=new hu);var m=a.get(e);if(m)return m;a.set(e,o),npe(e)?e.forEach(function(v){o.add(g3(v,t,r,v,e,a))}):Qfe(e)&&e.forEach(function(v,x){o.set(x,g3(v,t,r,x,e,a))});var g=h?u?Rfe:iT:u?po:Bi,y=d?void 0:g(e);return q4(y||e,function(v,x){y&&(x=v,v=e[x]),ff(o,x,g3(v,t,r,x,e,a))}),o}var gnt,ynt,vnt,ape,xnt,bnt,Tnt,Cnt,spe,Snt,wnt,knt,ope,Ent,Ant,Rnt,_nt,Lnt,Dnt,Int,Mnt,Nnt,Pnt,Ont,Bnt,$nt,Fnt,Gnt,znt,Zn,lpe,cpe=F(()=>{"use strict";nT();AO();q2();gfe();vfe();$O();SO();kfe();Afe();WO();_fe();Om();$fe();jfe();YO();na();Uy();Jfe();Tl();ipe();Lh();vf();gnt=1,ynt=2,vnt=4,ape="[object Arguments]",xnt="[object Array]",bnt="[object Boolean]",Tnt="[object Date]",Cnt="[object Error]",spe="[object Function]",Snt="[object GeneratorFunction]",wnt="[object Map]",knt="[object Number]",ope="[object Object]",Ent="[object RegExp]",Ant="[object Set]",Rnt="[object String]",_nt="[object Symbol]",Lnt="[object WeakMap]",Dnt="[object ArrayBuffer]",Int="[object DataView]",Mnt="[object Float32Array]",Nnt="[object Float64Array]",Pnt="[object Int8Array]",Ont="[object Int16Array]",Bnt="[object Int32Array]",$nt="[object Uint8Array]",Fnt="[object Uint8ClampedArray]",Gnt="[object Uint16Array]",znt="[object Uint32Array]",Zn={};Zn[ape]=Zn[xnt]=Zn[Dnt]=Zn[Int]=Zn[bnt]=Zn[Tnt]=Zn[Mnt]=Zn[Nnt]=Zn[Pnt]=Zn[Ont]=Zn[Bnt]=Zn[wnt]=Zn[knt]=Zn[ope]=Zn[Ent]=Zn[Ant]=Zn[Rnt]=Zn[_nt]=Zn[$nt]=Zn[Fnt]=Zn[Gnt]=Zn[znt]=!0;Zn[Cnt]=Zn[spe]=Zn[Lnt]=!1;s(g3,"baseClone");lpe=g3});function qnt(e){return lpe(e,Vnt|Wnt)}var Vnt,Wnt,jO,upe=F(()=>{"use strict";cpe();Vnt=1,Wnt=4;s(qnt,"cloneDeep");jO=qnt});function Unt(e){return this.__data__.set(e,Hnt),this}var Hnt,hpe,dpe=F(()=>{"use strict";Hnt="__lodash_hash_undefined__";s(Unt,"setCacheAdd");hpe=Unt});function Ynt(e){return this.__data__.has(e)}var fpe,ppe=F(()=>{"use strict";s(Ynt,"setCacheHas");fpe=Ynt});function y3(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Nm;++t{"use strict";e3();dpe();ppe();s(y3,"SetCache");y3.prototype.add=y3.prototype.push=hpe;y3.prototype.has=fpe;v3=y3});function jnt(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";s(jnt,"arraySome");mpe=jnt});function Xnt(e,t){return e.has(t)}var x3,KO=F(()=>{"use strict";s(Xnt,"cacheHas");x3=Xnt});function Qnt(e,t,r,n,i,a){var o=r&Knt,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&Znt?new v3:void 0;for(a.set(e,t),a.set(t,e);++f{"use strict";XO();gpe();KO();Knt=1,Znt=2;s(Qnt,"equalArrays");b3=Qnt});function Jnt(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var ype,vpe=F(()=>{"use strict";s(Jnt,"mapToArray");ype=Jnt});function eit(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var s1,T3=F(()=>{"use strict";s(eit,"setToArray");s1=eit});function pit(e,t,r,n,i,a,o){switch(r){case fit:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dit:return!(e.byteLength!=t.byteLength||!a(new i1(e),new i1(t)));case nit:case iit:case oit:return Cl(+e,+t);case ait:return e.name==t.name&&e.message==t.message;case lit:case uit:return e==t+"";case sit:var l=ype;case cit:var u=n&tit;if(l||(l=s1),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;n|=rit,o.set(e,t);var d=b3(l(e),l(t),n,i,a,o);return o.delete(e),d;case hit:if(QO)return QO.call(e)==QO.call(t)}return!1}var tit,rit,nit,iit,ait,sit,oit,lit,cit,uit,hit,dit,fit,xpe,QO,bpe,Tpe=F(()=>{"use strict";Dm();HO();Mm();ZO();vpe();T3();tit=1,rit=2,nit="[object Boolean]",iit="[object Date]",ait="[object Error]",sit="[object Map]",oit="[object Number]",lit="[object RegExp]",cit="[object Set]",uit="[object String]",hit="[object Symbol]",dit="[object ArrayBuffer]",fit="[object DataView]",xpe=Pa?Pa.prototype:void 0,QO=xpe?xpe.valueOf:void 0;s(pit,"equalByTag");bpe=pit});function vit(e,t,r,n,i,a){var o=r&mit,l=iT(e),u=l.length,h=iT(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:yit.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var v=o;++f{"use strict";WO();mit=1,git=Object.prototype,yit=git.hasOwnProperty;s(vit,"equalObjects");Cpe=vit});function Tit(e,t,r,n,i,a){var o=Zr(e),l=Zr(t),u=o?kpe:jo(e),h=l?kpe:jo(t);u=u==wpe?C3:u,h=h==wpe?C3:h;var d=u==C3,f=h==C3,p=u==h;if(p&&uc(e)){if(!uc(t))return!1;o=!0,d=!1}if(p&&!d)return a||(a=new hu),o||yf(e)?b3(e,t,r,n,i,a):bpe(e,t,u,r,n,i,a);if(!(r&xit)){var m=d&&Epe.call(e,"__wrapped__"),g=f&&Epe.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,v=g?t.value():t;return a||(a=new hu),i(y,v,r,n,a)}}return p?(a||(a=new hu),Cpe(e,t,r,n,i,a)):!1}var xit,wpe,kpe,C3,bit,Epe,Ape,Rpe=F(()=>{"use strict";nT();ZO();Tpe();Spe();Om();na();Uy();K2();xit=1,wpe="[object Arguments]",kpe="[object Array]",C3="[object Object]",bit=Object.prototype,Epe=bit.hasOwnProperty;s(Tit,"baseIsEqualDeep");Ape=Tit});function _pe(e,t,r,n,i){return e===t?!0:e==null||t==null||!qi(e)&&!qi(t)?e!==e&&t!==t:Ape(e,t,r,n,_pe,i)}var S3,JO=F(()=>{"use strict";Rpe();lc();s(_pe,"baseIsEqual");S3=_pe});function wit(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i{"use strict";nT();JO();Cit=1,Sit=2;s(wit,"baseIsMatch");Lpe=wit});function kit(e){return e===e&&!yi(e)}var w3,e9=F(()=>{"use strict";Tl();s(kit,"isStrictComparable");w3=kit});function Eit(e){for(var t=Bi(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,w3(i)]}return t}var Ipe,Mpe=F(()=>{"use strict";e9();Lh();s(Eit,"getMatchData");Ipe=Eit});function Ait(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var k3,t9=F(()=>{"use strict";s(Ait,"matchesStrictComparable");k3=Ait});function Rit(e){var t=Ipe(e);return t.length==1&&t[0][2]?k3(t[0][0],t[0][1]):function(r){return r===e||Lpe(r,e,t)}}var Npe,Ppe=F(()=>{"use strict";Dpe();Mpe();t9();s(Rit,"baseMatches");Npe=Rit});function _it(e,t){return e!=null&&t in Object(e)}var Ope,Bpe=F(()=>{"use strict";s(_it,"baseHasIn");Ope=_it});function Lit(e,t,r){t=Sf(t,e);for(var n=-1,i=t.length,a=!1;++n{"use strict";tT();Hy();na();V2();Y4();Qy();s(Lit,"hasPath");E3=Lit});function Dit(e,t){return e!=null&&E3(e,t,Ope)}var A3,n9=F(()=>{"use strict";Bpe();r9();s(Dit,"hasIn");A3=Dit});function Nit(e,t){return jy(e)&&w3(t)?k3(uu(e),t):function(r){var n=qde(r,e);return n===void 0&&n===t?A3(r,e):S3(t,n,Iit|Mit)}}var Iit,Mit,$pe,Fpe=F(()=>{"use strict";JO();Hde();n9();Q4();e9();t9();Qy();Iit=1,Mit=2;s(Nit,"baseMatchesProperty");$pe=Nit});function Pit(e){return function(t){return t?.[e]}}var R3,i9=F(()=>{"use strict";s(Pit,"baseProperty");R3=Pit});function Oit(e){return function(t){return wf(t,e)}}var Gpe,zpe=F(()=>{"use strict";rT();s(Oit,"basePropertyDeep");Gpe=Oit});function Bit(e){return jy(e)?R3(uu(e)):Gpe(e)}var Vpe,Wpe=F(()=>{"use strict";i9();zpe();Q4();Qy();s(Bit,"property");Vpe=Bit});function $it(e){return typeof e=="function"?e:e==null?uo:typeof e=="object"?Zr(e)?$pe(e[0],e[1]):Npe(e):Vpe(e)}var vs,Ih=F(()=>{"use strict";Ppe();Fpe();cf();na();Wpe();s($it,"baseIteratee");vs=$it});function Fit(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var qpe,Hpe=F(()=>{"use strict";s(Fit,"createBaseFor");qpe=Fit});var Git,o1,_3=F(()=>{"use strict";Hpe();Git=qpe(),o1=Git});function zit(e,t){return e&&o1(e,t,Bi)}var l1,L3=F(()=>{"use strict";_3();Lh();s(zit,"baseForOwn");l1=zit});function Vit(e,t){return function(r,n){if(r==null)return r;if(!Oa(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a{"use strict";cu();s(Vit,"createBaseEach");Upe=Vit});var Wit,Ef,aT=F(()=>{"use strict";L3();Ype();Wit=Upe(l1),Ef=Wit});var qit,D3,jpe=F(()=>{"use strict";bl();qit=s(function(){return Oi.Date.now()},"now"),D3=qit});var Xpe,Hit,Uit,a9,Kpe=F(()=>{"use strict";H2();Mm();U2();vf();Xpe=Object.prototype,Hit=Xpe.hasOwnProperty,Uit=pf(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Rh(t[0],t[1],i)&&(n=1);++r{"use strict";W2();Mm();s(Yit,"assignMergeValue");sT=Yit});function jit(e){return qi(e)&&Oa(e)}var I3,o9=F(()=>{"use strict";cu();lc();s(jit,"isArrayLikeObject");I3=jit});function Xit(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var oT,l9=F(()=>{"use strict";s(Xit,"safeGet");oT=Xit});function Kit(e){return lu(e,po(e))}var Zpe,Qpe=F(()=>{"use strict";Wy();vf();s(Kit,"toPlainObject");Zpe=Kit});function Zit(e,t,r,n,i,a,o){var l=oT(e,r),u=oT(t,r),h=o.get(u);if(h){sT(e,r,h);return}var d=a?a(l,u,r+"",e,t,o):void 0,f=d===void 0;if(f){var p=Zr(u),m=!p&&uc(u),g=!p&&!m&&yf(u);d=u,p||m||g?Zr(l)?d=l:I3(l)?d=V4(l):m?(f=!1,d=a3(u,!0)):g?(f=!1,d=p3(u,!0)):d=[]:Jde(u)||cc(u)?(d=l,cc(l)?d=Zpe(l):(!yi(l)||ou(l))&&(d=m3(u))):f=!1}f&&(o.set(u,d),i(d,u,n,a,o),o.delete(u)),sT(e,r,d)}var Jpe,eme=F(()=>{"use strict";s9();$O();UO();SO();YO();Hy();na();o9();Uy();z2();Tl();efe();K2();l9();Qpe();s(Zit,"baseMergeDeep");Jpe=Zit});function tme(e,t,r,n,i){e!==t&&o1(t,function(a,o){if(i||(i=new hu),yi(a))Jpe(e,t,o,r,tme,n,i);else{var l=n?n(oT(e,o),a,o+"",e,t,i):void 0;l===void 0&&(l=a),sT(e,o,l)}},po)}var rme,nme=F(()=>{"use strict";nT();s9();_3();eme();Tl();vf();l9();s(tme,"baseMerge");rme=tme});function Qit(e,t,r){for(var n=-1,i=e==null?0:e.length;++n{"use strict";s(Qit,"arrayIncludesWith");ime=Qit});function Jit(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Af,sme=F(()=>{"use strict";s(Jit,"last");Af=Jit});function eat(e){return typeof e=="function"?e:uo}var c1,M3=F(()=>{"use strict";cf();s(eat,"castFunction");c1=eat});function tat(e,t){var r=Zr(e)?q4:Ef;return r(e,c1(t))}var at,c9=F(()=>{"use strict";AO();aT();M3();na();s(tat,"forEach");at=tat});var ome=F(()=>{"use strict";c9()});function rat(e,t){var r=[];return Ef(e,function(n,i,a){t(n,i,a)&&r.push(n)}),r}var lme,cme=F(()=>{"use strict";aT();s(rat,"baseFilter");lme=rat});function nat(e,t){var r=Zr(e)?s3:lme;return r(e,vs(t,3))}var zs,ume=F(()=>{"use strict";FO();cme();Ih();na();s(nat,"filter");zs=nat});function iat(e){return function(t,r,n){var i=Object(t);if(!Oa(t)){var a=vs(r,3);t=Bi(t),r=s(function(l){return a(i[l],l,i)},"predicate")}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var hme,dme=F(()=>{"use strict";Ih();cu();Lh();s(iat,"createFind");hme=iat});function sat(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:ohe(r);return i<0&&(i=aat(n+i,0)),H4(e,vs(t,3),i)}var aat,fme,pme=F(()=>{"use strict";RO();Ih();lhe();aat=Math.max;s(sat,"findIndex");fme=sat});var oat,u1,mme=F(()=>{"use strict";dme();pme();oat=hme(fme),u1=oat});function lat(e,t){var r=-1,n=Oa(e)?Array(e.length):[];return Ef(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var N3,u9=F(()=>{"use strict";aT();cu();s(lat,"baseMap");N3=lat});function cat(e,t){var r=Zr(e)?su:N3;return r(e,vs(t,3))}var Fn,gme=F(()=>{"use strict";G2();Ih();u9();na();s(cat,"map");Fn=cat});function uat(e,t){return e==null?e:o1(e,c1(t),po)}var h9,yme=F(()=>{"use strict";_3();M3();vf();s(uat,"forIn");h9=uat});function hat(e,t){return e&&l1(e,c1(t))}var d9,vme=F(()=>{"use strict";L3();M3();s(hat,"forOwn");d9=hat});function dat(e,t){return e>t}var xme,bme=F(()=>{"use strict";s(dat,"baseGt");xme=dat});function mat(e,t){return e!=null&&pat.call(e,t)}var fat,pat,Tme,Cme=F(()=>{"use strict";fat=Object.prototype,pat=fat.hasOwnProperty;s(mat,"baseHas");Tme=mat});function gat(e,t){return e!=null&&E3(e,t,Tme)}var lT,Sme=F(()=>{"use strict";Cme();r9();s(gat,"has");lT=gat});function vat(e){return typeof e=="string"||!Zr(e)&&qi(e)&&Gs(e)==yat}var yat,wme,kme=F(()=>{"use strict";lf();na();lc();yat="[object String]";s(vat,"isString");wme=vat});function xat(e,t){return su(t,function(r){return e[r]})}var Eme,Ame=F(()=>{"use strict";G2();s(xat,"baseValues");Eme=xat});function bat(e){return e==null?[]:Eme(e,Bi(e))}var Xo,Rme=F(()=>{"use strict";Ame();Lh();s(bat,"values");Xo=bat});function kat(e){if(e==null)return!0;if(Oa(e)&&(Zr(e)||typeof e=="string"||typeof e.splice=="function"||uc(e)||yf(e)||cc(e)))return!e.length;var t=jo(e);if(t==Tat||t==Cat)return!e.size;if(mf(e))return!Yy(e).length;for(var r in e)if(wat.call(e,r))return!1;return!0}var Tat,Cat,Sat,wat,P3,_me=F(()=>{"use strict";Z4();Om();Hy();na();cu();Uy();Y2();K2();Tat="[object Map]",Cat="[object Set]",Sat=Object.prototype,wat=Sat.hasOwnProperty;s(kat,"isEmpty");P3=kat});function Eat(e){return e===void 0}var $i,Lme=F(()=>{"use strict";s(Eat,"isUndefined");$i=Eat});function Aat(e,t){return e{"use strict";s(Aat,"baseLt");O3=Aat});function Rat(e,t){var r={};return t=vs(t,3),l1(e,function(n,i,a){df(r,i,t(n,i,a))}),r}var Bm,Dme=F(()=>{"use strict";W2();L3();Ih();s(Rat,"mapValues");Bm=Rat});function _at(e,t,r){for(var n=-1,i=e.length;++n{"use strict";Im();s(_at,"baseExtremum");h1=_at});function Lat(e){return e&&e.length?h1(e,uo,xme):void 0}var mo,Ime=F(()=>{"use strict";B3();bme();cf();s(Lat,"max");mo=Lat});var Dat,d1,Mme=F(()=>{"use strict";nme();Fhe();Dat=$he(function(e,t,r){rme(e,t,r)}),d1=Dat});function Iat(e){return e&&e.length?h1(e,uo,O3):void 0}var Mh,Nme=F(()=>{"use strict";B3();f9();cf();s(Iat,"min");Mh=Iat});function Mat(e,t){return e&&e.length?h1(e,vs(t,2),O3):void 0}var $m,Pme=F(()=>{"use strict";B3();Ih();f9();s(Mat,"minBy");$m=Mat});function Nat(e,t,r,n){if(!yi(e))return e;t=Sf(t,e);for(var i=-1,a=t.length,o=a-1,l=e;l!=null&&++i{"use strict";q2();tT();V2();Tl();Qy();s(Nat,"baseSet");Ome=Nat});function Pat(e,t,r){for(var n=-1,i=t.length,a={};++n{"use strict";rT();Bme();tT();s(Pat,"basePickBy");$me=Pat});function Oat(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Gme,zme=F(()=>{"use strict";s(Oat,"baseSortBy");Gme=Oat});function Bat(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=Yo(e),o=t!==void 0,l=t===null,u=t===t,h=Yo(t);if(!l&&!h&&!a&&e>t||a&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&e{"use strict";Im();s(Bat,"compareAscending");Vme=Bat});function $at(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,l=r.length;++n=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return e.index-t.index}var qme,Hme=F(()=>{"use strict";Wme();s($at,"compareMultiple");qme=$at});function Fat(e,t,r){t.length?t=su(t,function(a){return Zr(a)?function(o){return wf(o,a.length===1?a[0]:a)}:a}):t=[uo];var n=-1;t=su(t,gf(vs));var i=N3(e,function(a,o,l){var u=su(t,function(h){return h(a)});return{criteria:u,index:++n,value:a}});return Gme(i,function(a,o){return qme(a,o,r)})}var Ume,Yme=F(()=>{"use strict";G2();rT();Ih();u9();zme();j2();Hme();cf();na();s(Fat,"baseOrderBy");Ume=Fat});var Gat,jme,Xme=F(()=>{"use strict";i9();Gat=R3("length"),jme=Gat});function Qat(e){for(var t=Kme.lastIndex=0;Kme.test(e);)++t;return t}var Zme,zat,Vat,Wat,qat,Hat,Uat,p9,m9,Yat,Qme,Jme,ege,jat,tge,rge,Xat,Kat,Zat,Kme,nge,ige=F(()=>{"use strict";Zme="\\ud800-\\udfff",zat="\\u0300-\\u036f",Vat="\\ufe20-\\ufe2f",Wat="\\u20d0-\\u20ff",qat=zat+Vat+Wat,Hat="\\ufe0e\\ufe0f",Uat="["+Zme+"]",p9="["+qat+"]",m9="\\ud83c[\\udffb-\\udfff]",Yat="(?:"+p9+"|"+m9+")",Qme="[^"+Zme+"]",Jme="(?:\\ud83c[\\udde6-\\uddff]){2}",ege="[\\ud800-\\udbff][\\udc00-\\udfff]",jat="\\u200d",tge=Yat+"?",rge="["+Hat+"]?",Xat="(?:"+jat+"(?:"+[Qme,Jme,ege].join("|")+")"+rge+tge+")*",Kat=rge+tge+Xat,Zat="(?:"+[Qme+p9+"?",p9,Jme,ege,Uat].join("|")+")",Kme=RegExp(m9+"(?="+m9+")|"+Zat+Kat,"g");s(Qat,"unicodeSize");nge=Qat});function Jat(e){return tfe(e)?nge(e):jme(e)}var age,sge=F(()=>{"use strict";Xme();rfe();ige();s(Jat,"stringSize");age=Jat});function est(e,t){return $me(e,t,function(r,n){return A3(e,n)})}var oge,lge=F(()=>{"use strict";Fme();n9();s(est,"basePick");oge=est});var tst,Fm,cge=F(()=>{"use strict";lge();Zde();tst=Kde(function(e,t){return e==null?{}:oge(e,t)}),Fm=tst});function ist(e,t,r,n){for(var i=-1,a=nst(rst((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var rst,nst,uge,hge=F(()=>{"use strict";rst=Math.ceil,nst=Math.max;s(ist,"baseRange");uge=ist});function ast(e){return function(t,r,n){return n&&typeof n!="number"&&Rh(t,r,n)&&(r=n=void 0),t=zy(t),r===void 0?(r=t,t=0):r=zy(r),n=n===void 0?t{"use strict";hge();U2();TO();s(ast,"createRange");dge=ast});var sst,wl,pge=F(()=>{"use strict";fge();sst=dge(),wl=sst});function ost(e,t,r,n,i){return i(e,function(a,o,l){r=n?(n=!1,a):t(r,a,o,l)}),r}var mge,gge=F(()=>{"use strict";s(ost,"baseReduce");mge=ost});function lst(e,t,r){var n=Zr(e)?nfe:mge,i=arguments.length<3;return n(e,vs(t,4),r,i,Ef)}var du,yge=F(()=>{"use strict";ife();aT();Ih();gge();na();s(lst,"reduce");du=lst});function hst(e){if(e==null)return 0;if(Oa(e))return wme(e)?age(e):e.length;var t=jo(e);return t==cst||t==ust?e.size:Yy(e).length}var cst,ust,g9,vge=F(()=>{"use strict";Z4();Om();cu();kme();sge();cst="[object Map]",ust="[object Set]";s(hst,"size");g9=hst});var dst,fu,xge=F(()=>{"use strict";n3();Yme();H2();U2();dst=pf(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Rh(e,t[0],t[1])?t=[]:r>2&&Rh(t[0],t[1],t[2])&&(t=[t[0]]),Ume(e,e1(t,1),[])}),fu=dst});var fst,pst,bge,Tge=F(()=>{"use strict";qO();whe();T3();fst=1/0,pst=kf&&1/s1(new kf([,-0]))[1]==fst?function(e){return new kf(e)}:She,bge=pst});function gst(e,t,r){var n=-1,i=Phe,a=e.length,o=!0,l=[],u=l;if(r)o=!1,i=ime;else if(a>=mst){var h=t?null:bge(e);if(h)return s1(h);o=!1,i=x3,u=new v3}else u=t?[]:l;e:for(;++n{"use strict";XO();Ohe();ame();KO();Tge();T3();mst=200;s(gst,"baseUniq");Cge=gst});var yst,y9,wge=F(()=>{"use strict";n3();H2();Sge();o9();yst=pf(function(e){return Cge(e1(e,1,I3,!0))}),y9=yst});function xst(e){var t=++vst;return t3(e)+t}var vst,Gm,kge=F(()=>{"use strict";OO();vst=0;s(xst,"uniqueId");Gm=xst});function bst(e,t,r){for(var n=-1,i=e.length,a=t.length,o={};++n{"use strict";s(bst,"baseZipObject");Ege=bst});function Tst(e,t){return Ege(e||[],t||[],ff)}var $3,Rge=F(()=>{"use strict";q2();Age();s(Tst,"zipObject");$3=Tst});var Gn=F(()=>{"use strict";upe();wO();Kpe();ome();ume();mme();BO();c9();yme();vme();Sme();na();_me();z2();Lme();Lh();sme();gme();Dme();Ime();Mme();Nme();Pme();jpe();cge();pge();yge();vge();xge();wge();kge();Rme();Rge();});function Lge(e,t){e[t]?e[t]++:e[t]=1}function Dge(e,t){--e[t]||delete e[t]}function cT(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+_ge+a+_ge+($i(n)?Cst:n)}function Sst(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var l={v:i,w:a};return n&&(l.name=n),l}function v9(e,t){return cT(e,t.v,t.w,t.name)}var Cst,zm,_ge,Ln,x9=F(()=>{"use strict";Gn();Cst="\0",zm="\0",_ge="",Ln=class{static{s(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=fo(void 0),this._defaultEdgeLabelFn=fo(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[zm]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return ou(t)||(t=fo(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Bi(this._nodes)}sources(){var t=this;return zs(this.nodes(),function(r){return P3(t._in[r])})}sinks(){var t=this;return zs(this.nodes(),function(r){return P3(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return at(t,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=zm,this._children[t]={},this._children[zm][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=s(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],at(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),at(Bi(this._in[t]),r),delete this._in[t],delete this._preds[t],at(Bi(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if($i(r))r=zm;else{r+="";for(var n=r;!$i(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==zm)return r}}children(t){if($i(t)&&(t=zm),this._isCompound){var r=this._children[t];if(r)return Bi(r)}else{if(t===zm)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Bi(r)}successors(t){var r=this._sucs[t];if(r)return Bi(r)}neighbors(t){var r=this.predecessors(t);if(r)return y9(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;at(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),at(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:a(l)}return s(a,"findParent"),this._isCompound&&at(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return ou(t)||(t=fo(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Xo(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return du(t,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var t,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(t=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,r=""+r,$i(n)||(n=""+n);var l=cT(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!$i(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,r,n);var u=Sst(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,Lge(this._preds[r],t),Lge(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?v9(this._isDirected,arguments[0]):cT(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?v9(this._isDirected,arguments[0]):cT(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?v9(this._isDirected,arguments[0]):cT(this._isDirected,t,r,n),a=this._edgeObjs[i];return a&&(t=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Dge(this._preds[r],t),Dge(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=Xo(n);return r?zs(i,function(a){return a.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=Xo(n);return r?zs(i,function(a){return a.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};Ln.prototype._nodeCount=0;Ln.prototype._edgeCount=0;s(Lge,"incrementOrInitEntry");s(Dge,"decrementOrRemoveEntry");s(cT,"edgeArgsToId");s(Sst,"edgeArgsToObj");s(v9,"edgeObjToId")});var Ko=F(()=>{"use strict";x9()});function Ige(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function wst(e,t){if(e!=="_next"&&e!=="_prev")return t}var F3,Mge=F(()=>{"use strict";F3=class{static{s(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return Ige(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&Ige(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,n=r._prev;n!==r;)t.push(JSON.stringify(n,wst)),n=n._prev;return"["+t.join(", ")+"]"}};s(Ige,"unlink");s(wst,"filterOutLinks")});function Nge(e,t){if(e.nodeCount()<=1)return[];var r=Ast(e,t||kst),n=Est(r.graph,r.buckets,r.zeroIdx);return Sl(Fn(n,function(i){return e.outEdges(i.v,i.w)}))}function Est(e,t,r){for(var n=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)b9(e,t,r,o);for(;o=i.dequeue();)b9(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){n=n.concat(b9(e,t,r,o,!0));break}}}return n}function b9(e,t,r,n,i){var a=i?[]:void 0;return at(e.inEdges(n.v),function(o){var l=e.edge(o),u=e.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=l,T9(t,r,u)}),at(e.outEdges(n.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,T9(t,r,h)}),e.removeNode(n.v),a}function Ast(e,t){var r=new Ln,n=0,i=0;at(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),at(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),d=u+h;r.setEdge(l.v,l.w,d),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var a=wl(i+n+3).map(function(){return new F3}),o=n+1;return at(r.nodes(),function(l){T9(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function T9(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var kst,Pge=F(()=>{"use strict";Gn();Ko();Mge();kst=fo(1);s(Nge,"greedyFAS");s(Est,"doGreedyFAS");s(b9,"removeNode");s(Ast,"buildState");s(T9,"assignBucket")});function Oge(e){var t=e.graph().acyclicer==="greedy"?Nge(e,r(e)):Rst(e);at(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,Gm("rev"))});function r(n){return function(i){return n.edge(i).weight}}s(r,"weightFn")}function Rst(e){var t=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,at(e.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):i(o.w)}),delete r[a])}return s(i,"dfs"),at(e.nodes(),i),t}function Bge(e){at(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var C9=F(()=>{"use strict";Gn();Pge();s(Oge,"run");s(Rst,"dfsFAS");s(Bge,"undo")});function pu(e,t,r,n){var i;do i=Gm(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function Fge(e){var t=new Ln().setGraph(e.graph());return at(e.nodes(),function(r){t.setNode(r,e.node(r))}),at(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function G3(e){var t=new Ln({multigraph:e.isMultigraph()}).setGraph(e.graph());return at(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),at(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function S9(e,t){var r=e.x,n=e.y,i=t.x-r,a=t.y-n,o=e.width/2,l=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(o=-o),u=o,h=o*a/i),{x:r+u,y:n+h}}function Rf(e){var t=Fn(wl(k9(e)+1),function(){return[]});return at(e.nodes(),function(r){var n=e.node(r),i=n.rank;$i(i)||(t[i][n.order]=r)}),t}function Gge(e){var t=Mh(Fn(e.nodes(),function(r){return e.node(r).rank}));at(e.nodes(),function(r){var n=e.node(r);lT(n,"rank")&&(n.rank-=t)})}function zge(e){var t=Mh(Fn(e.nodes(),function(a){return e.node(a).rank})),r=[];at(e.nodes(),function(a){var o=e.node(a).rank-t;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=e.graph().nodeRankFactor;at(r,function(a,o){$i(a)&&o%i!==0?--n:n&&at(a,function(l){e.node(l).rank+=n})})}function w9(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),pu(e,"border",i,t)}function k9(e){return mo(Fn(e.nodes(),function(t){var r=e.node(t).rank;if(!$i(r))return r}))}function Vge(e,t){var r={lhs:[],rhs:[]};return at(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Wge(e,t){var r=D3();try{return t()}finally{console.log(e+" time: "+(D3()-r)+"ms")}}function qge(e,t){return t()}var mu=F(()=>{"use strict";Gn();Ko();s(pu,"addDummyNode");s(Fge,"simplify");s(G3,"asNonCompoundGraph");s(S9,"intersectRect");s(Rf,"buildLayerMatrix");s(Gge,"normalizeRanks");s(zge,"removeEmptyRanks");s(w9,"addBorderNode");s(k9,"maxRank");s(Vge,"partition");s(Wge,"time");s(qge,"notime")});function Uge(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&at(n,t),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a{"use strict";Gn();mu();s(Uge,"addBorderSegments");s(Hge,"addBorderNode")});function Xge(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Zge(e)}function Kge(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&_st(e),(t==="lr"||t==="rl")&&(Lst(e),Zge(e))}function Zge(e){at(e.nodes(),function(t){jge(e.node(t))}),at(e.edges(),function(t){jge(e.edge(t))})}function jge(e){var t=e.width;e.width=e.height,e.height=t}function _st(e){at(e.nodes(),function(t){E9(e.node(t))}),at(e.edges(),function(t){var r=e.edge(t);at(r.points,E9),Object.prototype.hasOwnProperty.call(r,"y")&&E9(r)})}function E9(e){e.y=-e.y}function Lst(e){at(e.nodes(),function(t){A9(e.node(t))}),at(e.edges(),function(t){var r=e.edge(t);at(r.points,A9),Object.prototype.hasOwnProperty.call(r,"x")&&A9(r)})}function A9(e){var t=e.x;e.x=e.y,e.y=t}var Qge=F(()=>{"use strict";Gn();s(Xge,"adjust");s(Kge,"undo");s(Zge,"swapWidthHeight");s(jge,"swapWidthHeightOne");s(_st,"reverseY");s(E9,"reverseYOne");s(Lst,"swapXY");s(A9,"swapXYOne")});function Jge(e){e.graph().dummyChains=[],at(e.edges(),function(t){Ist(e,t)})}function Ist(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(a!==n+1){e.removeEdge(t);var h=void 0,d,f;for(f=0,++n;n{"use strict";Gn();mu();s(Jge,"run");s(Ist,"normalizeEdge");s(e0e,"undo")});function hT(e){var t={};function r(n){var i=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return i.rank;t[n]=!0;var a=Mh(Fn(e.outEdges(n),function(o){return r(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}s(r,"dfs"),at(e.sources(),r)}function Vm(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var z3=F(()=>{"use strict";Gn();s(hT,"longestPath");s(Vm,"slack")});function V3(e){var t=new Ln({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,a;Mst(t,e){"use strict";Gn();Ko();z3();s(V3,"feasibleTree");s(Mst,"tightTree");s(Nst,"findMinSlackEdge");s(Pst,"shiftRanks")});var r0e=F(()=>{"use strict"});var L9=F(()=>{"use strict"});var i6r,D9=F(()=>{"use strict";Gn();L9();i6r=fo(1)});var n0e=F(()=>{"use strict";D9()});var I9=F(()=>{"use strict"});var i0e=F(()=>{"use strict";I9()});var m6r,a0e=F(()=>{"use strict";Gn();m6r=fo(1)});function M9(e){var t={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new dT;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,at(e.predecessors(a),i),delete r[a],n.push(a))}if(s(i,"visit"),at(e.sinks(),i),g9(t)!==e.nodeCount())throw new dT;return n}function dT(){}var N9=F(()=>{"use strict";Gn();M9.CycleException=dT;s(M9,"topsort");s(dT,"CycleException");dT.prototype=new Error});var s0e=F(()=>{"use strict";N9()});function W3(e,t,r){Zr(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return at(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);o0e(e,o,r==="post",a,n,i)}),i}function o0e(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),at(i(t),function(o){o0e(e,o,r,n,i,a)}),r&&a.push(t))}var P9=F(()=>{"use strict";Gn();s(W3,"dfs");s(o0e,"doDfs")});function O9(e,t){return W3(e,t,"post")}var l0e=F(()=>{"use strict";P9();s(O9,"postorder")});function B9(e,t){return W3(e,t,"pre")}var c0e=F(()=>{"use strict";P9();s(B9,"preorder")});var u0e=F(()=>{"use strict";L9();x9()});var h0e=F(()=>{"use strict";r0e();D9();n0e();i0e();a0e();s0e();l0e();c0e();u0e();I9();N9()});function Lf(e){e=Fge(e),hT(e);var t=V3(e);F9(t),$9(t,e);for(var r,n;r=m0e(t);)n=g0e(t,e,r),y0e(t,e,r,n)}function $9(e,t){var r=O9(e,e.nodes());r=r.slice(0,r.length-1),at(r,function(n){Gst(e,t,n)})}function Gst(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=f0e(e,t,r)}function f0e(e,t,r){var n=e.node(r),i=n.parent,a=!0,o=t.edge(r,i),l=0;return o||(a=!1,o=t.edge(i,r)),l=o.weight,at(t.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==i){var f=h===a,p=t.edge(u).weight;if(l+=f?p:-p,Vst(e,r,d)){var m=e.edge(r,d).cutvalue;l+=f?-m:m}}}),l}function F9(e,t){arguments.length<2&&(t=e.nodes()[0]),p0e(e,{},1,t)}function p0e(e,t,r,n,i){var a=r,o=e.node(n);return t[n]=!0,at(e.neighbors(n),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=p0e(e,t,r,l,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function m0e(e){return u1(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g0e(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var a=e.node(n),o=e.node(i),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=zs(t.edges(),function(d){return u===d0e(e,e.node(d.v),l)&&u!==d0e(e,e.node(d.w),l)});return $m(h,function(d){return Vm(t,d)})}function y0e(e,t,r,n){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(n.v,n.w,{}),F9(e),$9(e,t),zst(e,t)}function zst(e,t){var r=u1(e.nodes(),function(i){return!t.node(i).parent}),n=B9(e,r);n=n.slice(1),at(n,function(i){var a=e.node(i).parent,o=t.edge(i,a),l=!1;o||(o=t.edge(a,i),l=!0),t.node(i).rank=t.node(a).rank+(l?o.minlen:-o.minlen)})}function Vst(e,t,r){return e.hasEdge(t,r)}function d0e(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var v0e=F(()=>{"use strict";Gn();h0e();mu();_9();z3();Lf.initLowLimValues=F9;Lf.initCutValues=$9;Lf.calcCutValue=f0e;Lf.leaveEdge=m0e;Lf.enterEdge=g0e;Lf.exchangeEdges=y0e;s(Lf,"networkSimplex");s($9,"initCutValues");s(Gst,"assignCutValue");s(f0e,"calcCutValue");s(F9,"initLowLimValues");s(p0e,"dfsAssignLowLim");s(m0e,"leaveEdge");s(g0e,"enterEdge");s(y0e,"exchangeEdges");s(zst,"updateRanks");s(Vst,"isTreeEdge");s(d0e,"isDescendant")});function G9(e){switch(e.graph().ranker){case"network-simplex":x0e(e);break;case"tight-tree":qst(e);break;case"longest-path":Wst(e);break;default:x0e(e)}}function qst(e){hT(e),V3(e)}function x0e(e){Lf(e)}var Wst,z9=F(()=>{"use strict";_9();v0e();z3();s(G9,"rank");Wst=hT;s(qst,"tightTreeRanker");s(x0e,"networkSimplexRanker")});function b0e(e){var t=pu(e,"root",{},"_root"),r=Hst(e),n=mo(Xo(r))-1,i=2*n+1;e.graph().nestingRoot=t,at(e.edges(),function(o){e.edge(o).minlen*=i});var a=Ust(e)+1;at(e.children(),function(o){T0e(e,t,i,a,n,r,o)}),e.graph().nodeRankFactor=i}function T0e(e,t,r,n,i,a,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=w9(e,"_bt"),h=w9(e,"_bb"),d=e.node(o);e.setParent(u,o),d.borderTop=u,e.setParent(h,o),d.borderBottom=h,at(l,function(f){T0e(e,t,r,n,i,a,f);var p=e.node(f),m=p.borderTop?p.borderTop:f,g=p.borderBottom?p.borderBottom:f,y=p.borderTop?n:2*n,v=m!==g?1:i-a[o]+1;e.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:i+a[o]})}function Hst(e){var t={};function r(n,i){var a=e.children(n);a&&a.length&&at(a,function(o){r(o,i+1)}),t[n]=i}return s(r,"dfs"),at(e.children(),function(n){r(n,1)}),t}function Ust(e){return du(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function C0e(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,at(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var S0e=F(()=>{"use strict";Gn();mu();s(b0e,"run");s(T0e,"dfs");s(Hst,"treeDepths");s(Ust,"sumWeights");s(C0e,"cleanup")});function w0e(e,t,r){var n={},i;at(r,function(a){for(var o=e.parent(a),l,u;o;){if(l=e.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var k0e=F(()=>{"use strict";Gn();s(w0e,"addSubgraphConstraints")});function E0e(e,t,r){var n=jst(e),i=new Ln({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return e.node(a)});return at(e.nodes(),function(a){var o=e.node(a),l=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,l||n),at(e[r](a),function(u){var h=u.v===a?u.w:u.v,d=i.edge(h,a),f=$i(d)?0:d.weight;i.setEdge(h,a,{weight:e.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function jst(e){for(var t;e.hasNode(t=Gm("_root")););return t}var A0e=F(()=>{"use strict";Gn();Ko();s(E0e,"buildLayerGraph");s(jst,"createRootNode")});function R0e(e,t){for(var r=0,n=1;n0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=h.weight;u+=h.weight*f})),u}var _0e=F(()=>{"use strict";Gn();s(R0e,"crossCount");s(Xst,"twoLayerCrossCount")});function L0e(e){var t={},r=zs(e.nodes(),function(l){return!e.children(l).length}),n=mo(Fn(r,function(l){return e.node(l).rank})),i=Fn(wl(n+1),function(){return[]});function a(l){if(!lT(t,l)){t[l]=!0;var u=e.node(l);i[u.rank].push(l),at(e.successors(l),a)}}s(a,"dfs");var o=fu(r,function(l){return e.node(l).rank});return at(o,a),i}var D0e=F(()=>{"use strict";Gn();s(L0e,"initOrder")});function I0e(e,t){return Fn(t,function(r){var n=e.inEdges(r);if(n.length){var i=du(n,function(a,o){var l=e.edge(o),u=e.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var M0e=F(()=>{"use strict";Gn();s(I0e,"barycenter")});function N0e(e,t){var r={};at(e,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};$i(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),at(t.edges(),function(i){var a=r[i.v],o=r[i.w];!$i(a)&&!$i(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=zs(r,function(i){return!i.indegree});return Kst(n)}function Kst(e){var t=[];function r(a){return function(o){o.merged||($i(o.barycenter)||$i(a.barycenter)||o.barycenter>=a.barycenter)&&Zst(a,o)}}s(r,"handleIn");function n(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(s(n,"handleOut");e.length;){var i=e.pop();t.push(i),at(i.in.reverse(),r(i)),at(i.out,n(i))}return Fn(zs(t,function(a){return!a.merged}),function(a){return Fm(a,["vs","i","barycenter","weight"])})}function Zst(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var P0e=F(()=>{"use strict";Gn();s(N0e,"resolveConflicts");s(Kst,"doResolveConflicts");s(Zst,"mergeEntries")});function B0e(e,t){var r=Vge(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,i=fu(r.rhs,function(d){return-d.i}),a=[],o=0,l=0,u=0;n.sort(Qst(!!t)),u=O0e(a,i,u),at(n,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,l+=d.weight,u=O0e(a,i,u)});var h={vs:Sl(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function O0e(e,t,r){for(var n;t.length&&(n=Af(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Qst(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var $0e=F(()=>{"use strict";Gn();mu();s(B0e,"sort");s(O0e,"consumeUnsortable");s(Qst,"compareWithBias")});function V9(e,t,r,n){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(i=zs(i,function(g){return g!==o&&g!==l}));var h=I0e(e,i);at(h,function(g){if(e.children(g.v).length){var y=V9(e,g.v,r,n);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&eot(g,y)}});var d=N0e(h,r);Jst(d,u);var f=B0e(d,n);if(o&&(f.vs=Sl([o,f.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function Jst(e,t){at(e,function(r){r.vs=Sl(r.vs.map(function(n){return t[n]?t[n].vs:n}))})}function eot(e,t){$i(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var F0e=F(()=>{"use strict";Gn();M0e();P0e();$0e();s(V9,"sortSubgraph");s(Jst,"expandSubgraphs");s(eot,"mergeBarycenters")});function V0e(e){var t=k9(e),r=G0e(e,wl(1,t+1),"inEdges"),n=G0e(e,wl(t-1,-1,-1),"outEdges"),i=L0e(e);z0e(e,i);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){tot(l%2?r:n,l%4>=2),i=Rf(e);var h=R0e(e,i);h{"use strict";Gn();Ko();mu();k0e();A0e();_0e();D0e();F0e();s(V0e,"order");s(G0e,"buildLayerGraphs");s(tot,"sweepLayerGraphs");s(z0e,"assignOrder")});function q0e(e){var t=not(e);at(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,a=rot(e,t,i.v,i.w),o=a.path,l=a.lca,u=0,h=o[u],d=!0;r!==i.w;){if(n=e.node(r),d){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=n;(u=e.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h}}function not(e){var t={},r=0;function n(i){var a=r;at(e.children(i),n),t[i]={low:a,lim:r++}}return s(n,"dfs"),at(e.children(),n),t}var H0e=F(()=>{"use strict";Gn();s(q0e,"parentDummyChains");s(rot,"findPath");s(not,"postorder")});function iot(e,t){var r={};function n(i,a){var o=0,l=0,u=i.length,h=Af(a);return at(a,function(d,f){var p=sot(e,d),m=p?e.node(p).order:u;(p||d===h)&&(at(a.slice(l,f+1),function(g){at(e.predecessors(g),function(y){var v=e.node(y),x=v.order;(xh)&&U0e(r,p,d)})})}s(n,"scan");function i(a,o){var l=-1,u,h=0;return at(o,function(d,f){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(u=e.node(p[0]).order,n(o,h,f,l,u),h=f,l=u)}n(o,h,o.length,u,a.length)}),o}return s(i,"visitLayer"),du(t,i),r}function sot(e,t){if(e.node(t).dummy)return u1(e.predecessors(t),function(r){return e.node(r).dummy})}function U0e(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function oot(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function lot(e,t,r,n){var i={},a={},o={};return at(t,function(l){at(l,function(u,h){i[u]=u,a[u]=u,o[u]=h})}),at(t,function(l){var u=-1;at(l,function(h){var d=n(h);if(d.length){d=fu(d,function(y){return o[y]});for(var f=(d.length-1)/2,p=Math.floor(f),m=Math.ceil(f);p<=m;++p){var g=d[p];a[h]===h&&u{"use strict";Gn();Ko();mu();s(iot,"findType1Conflicts");s(aot,"findType2Conflicts");s(sot,"findOtherInnerSegmentNode");s(U0e,"addConflict");s(oot,"hasConflict");s(lot,"verticalAlignment");s(cot,"horizontalCompaction");s(uot,"buildBlockGraph");s(hot,"findSmallestWidthAlignment");s(dot,"alignCoordinates");s(fot,"balance");s(Y0e,"positionX");s(pot,"sep");s(mot,"width")});function X0e(e){e=G3(e),got(e),d9(Y0e(e),function(t,r){e.node(r).x=t})}function got(e){var t=Rf(e),r=e.graph().ranksep,n=0;at(t,function(i){var a=mo(Fn(i,function(o){return e.node(o).height}));at(i,function(o){e.node(o).y=n+a/2}),n+=a+r})}var K0e=F(()=>{"use strict";Gn();mu();j0e();s(X0e,"position");s(got,"positionY")});function fT(e,t){var r=t&&t.debugTiming?Wge:qge;r("layout",()=>{var n=r(" buildLayoutGraph",()=>Aot(e));r(" runLayout",()=>yot(n,r)),r(" updateInputGraph",()=>vot(e,n))})}function yot(e,t){t(" makeSpaceForEdgeLabels",()=>Rot(e)),t(" removeSelfEdges",()=>Bot(e)),t(" acyclic",()=>Oge(e)),t(" nestingGraph.run",()=>b0e(e)),t(" rank",()=>G9(G3(e))),t(" injectEdgeLabelProxies",()=>_ot(e)),t(" removeEmptyRanks",()=>zge(e)),t(" nestingGraph.cleanup",()=>C0e(e)),t(" normalizeRanks",()=>Gge(e)),t(" assignRankMinMax",()=>Lot(e)),t(" removeEdgeLabelProxies",()=>Dot(e)),t(" normalize.run",()=>Jge(e)),t(" parentDummyChains",()=>q0e(e)),t(" addBorderSegments",()=>Uge(e)),t(" order",()=>V0e(e)),t(" insertSelfEdges",()=>$ot(e)),t(" adjustCoordinateSystem",()=>Xge(e)),t(" position",()=>X0e(e)),t(" positionSelfEdges",()=>Fot(e)),t(" removeBorderNodes",()=>Oot(e)),t(" normalize.undo",()=>e0e(e)),t(" fixupEdgeLabelCoords",()=>Not(e)),t(" undoCoordinateSystem",()=>Kge(e)),t(" translateGraph",()=>Iot(e)),t(" assignNodeIntersects",()=>Mot(e)),t(" reversePoints",()=>Pot(e)),t(" acyclic.undo",()=>Bge(e))}function vot(e,t){at(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),at(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function Aot(e){var t=new Ln({multigraph:!0,compound:!0}),r=q9(e.graph());return t.setGraph(d1({},bot,W9(r,xot),Fm(r,Tot))),at(e.nodes(),function(n){var i=q9(e.node(n));t.setNode(n,a9(W9(i,Cot),Sot)),t.setParent(n,e.parent(n))}),at(e.edges(),function(n){var i=q9(e.edge(n));t.setEdge(n,d1({},kot,W9(i,wot),Fm(i,Eot)))}),t}function Rot(e){var t=e.graph();t.ranksep/=2,at(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function _ot(e){at(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-n.rank)/2+n.rank,e:t};pu(e,"edge-proxy",a,"_ep")}})}function Lot(e){var t=0;at(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=mo(t,n.maxRank))}),e.graph().maxRank=t}function Dot(e){at(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function Iot(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=e.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,m=h.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,f-m/2),i=Math.max(i,f+m/2)}s(u,"getExtremes"),at(e.nodes(),function(h){u(e.node(h))}),at(e.edges(),function(h){var d=e.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),t-=o,n-=l,at(e.nodes(),function(h){var d=e.node(h);d.x-=t,d.y-=n}),at(e.edges(),function(h){var d=e.edge(h);at(d.points,function(f){f.x-=t,f.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),a.width=r-t+o,a.height=i-n+l}function Mot(e){at(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(S9(n,a)),r.points.push(S9(i,o))})}function Not(e){at(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Pot(e){at(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Oot(e){at(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),a=e.node(Af(r.borderLeft)),o=e.node(Af(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),at(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Bot(e){at(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function $ot(e){var t=Rf(e);at(t,function(r){var n=0;at(r,function(i,a){var o=e.node(i);o.order=a+n,at(o.selfEdges,function(l){pu(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function Fot(e){at(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,l=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*o/3,y:a-l},{x:i+5*o/6,y:a-l},{x:i+o,y:a},{x:i+5*o/6,y:a+l},{x:i+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function W9(e,t){return Bm(Fm(e,t),Number)}function q9(e){var t={};return at(e,function(r,n){t[n.toLowerCase()]=r}),t}var xot,bot,Tot,Cot,Sot,wot,kot,Eot,Z0e=F(()=>{"use strict";Gn();Ko();Yge();Qge();C9();R9();z9();S0e();W0e();H0e();K0e();mu();s(fT,"layout");s(yot,"runLayout");s(vot,"updateInputGraph");xot=["nodesep","edgesep","ranksep","marginx","marginy"],bot={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Tot=["acyclicer","ranker","rankdir","align"],Cot=["width","height"],Sot={width:0,height:0},wot=["minlen","weight","width","height","labeloffset"],kot={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Eot=["labelpos"];s(Aot,"buildLayoutGraph");s(Rot,"makeSpaceForEdgeLabels");s(_ot,"injectEdgeLabelProxies");s(Lot,"assignRankMinMax");s(Dot,"removeEdgeLabelProxies");s(Iot,"translateGraph");s(Mot,"assignNodeIntersects");s(Not,"fixupEdgeLabelCoords");s(Pot,"reversePointsForReversedEdges");s(Oot,"removeBorderNodes");s(Bot,"removeSelfEdges");s($ot,"insertSelfEdges");s(Fot,"positionSelfEdges");s(W9,"selectNumberAttrs");s(q9,"canonicalize")});var H9=F(()=>{"use strict";C9();Z0e();R9();z9()});var Q0e=F(()=>{"use strict"});var eye={};sr(eye,{captureNodeSizes:()=>qot,shouldCaptureSizes:()=>zot});function J0e(){if(!(typeof globalThis>"u"))return globalThis}function zot(){return!!J0e()?.mermaidCaptureSizes}function Vot(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}function Wot(e,t){let r=J0e();if(!r)return;let n=t.node(),a=((n&&"ownerSVGElement"in n?n.ownerSVGElement:null)??n)?.id??"(unknown)";r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}function qot(e,t){let r=[];for(let n of t.nodes)n.isGroup||r.push({id:n.id,width:n.width??0,height:n.height??0});r.length!==0&&Wot({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:Vot()},nodes:r},e)}var tye=F(()=>{"use strict";Q0e();s(J0e,"getCaptureGlobal");s(zot,"shouldCaptureSizes");s(Vot,"capturedFromLocation");s(Wot,"emitCapturedSizes");s(qot,"captureNodeSizes")});function U9(e,{edgePathsClass:t="edges edgePaths"}={}){let r=e.insert("g").attr("class","root"),n=r.insert("g").attr("class","clusters"),i=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:n,edgePaths:i,edgeLabels:a,nodes:o,rootGroups:r}}async function Hot(e,t){if(t.label){let{shapeSvg:r,bbox:n}=await yt(e,t);t.labelBBox={width:n.width,height:n.height},r.remove()}else t.labelBBox={width:0,height:0}}async function Y9(e,t,r){let n=await Eh(e,t,r),i=n.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,n}async function rye(e,t){let r=new Ln({multigraph:!0,compound:!0}),n=[...t.edges],i=Pe(),a=U9(e),{edgeLabels:o,nodes:l}=a,u=new Map,h=e.node()!=null;await Promise.all(t.nodes.map(async d=>{if(d.isGroup)h&&await Hot(l,d),r.setNode(d.id,{...d});else{if(h){let f=await Y9(l,d,{config:i,dir:d.dir});u.set(d.id,f)}r.setNode(d.id,{...d})}}));for(let d of n)h&&O4(d)&&await oc(o,d),r.setEdge(d.start,d.end,{...d},d.id),t.edges.some(p=>p.id===d.id)||t.edges.push(d);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:d}=await Promise.resolve().then(()=>(tye(),eye));d(e,t)}return{graph:r,groups:a,nodeElements:u}}var j9=F(()=>{"use strict";Ko();Jt();Fy();Lm();Ht();s(U9,"createLayoutElementGroups");s(Hot,"measureGroupLabel");s(Y9,"insertMeasuredNode");s(rye,"createGraphWithElements")});var qr,Wm,iye,aye,pT,Uot,sye,oye,Yot,qm,nye,lye,cye,uye,q3,hye,jot,X9=F(()=>{"use strict";St();Ko();qr=new Map,Wm=new Map,iye=new Map,aye=s(()=>{Wm.clear(),iye.clear(),qr.clear()},"clear"),pT=s((e,t)=>{let r=Wm.get(t)||[];return se.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Uot=s((e,t)=>{let r=Wm.get(t)||[];return se.info("Descendants of ",t," is ",r),se.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||pT(e.v,t)||pT(e.w,t)||r.includes(e.w):(se.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),sye=s((e,t,r,n)=>{se.debug("Copying children of ",e,"root",n,"data",t.node(e),n);let i=t.children(e)||[];e!==n&&i.push(e),se.debug("Copying (nodes) clusterId",e,"nodes",i),i.forEach(a=>{if(t.children(a).length>0)sye(a,t,r,n);else{let o=t.node(a);se.info("cp ",a," to ",n," with parent ",e),r.setNode(a,o),n!==t.parent(a)&&(se.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==n&&a!==e?(se.debug("Setting parent",a,e),r.setParent(a,e)):(se.info("In copy ",e,"root",n,"data",t.node(e),n),se.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==n,"node!==clusterId",a!==e));let l=t.edges(a);se.debug("Copying Edges",l),l.forEach(u=>{se.info("Edge",u);let h=t.edge(u.v,u.w,u.name);se.info("Edge data",h,n);try{Uot(u,n)?(se.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),se.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):se.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",e)}catch(d){se.error(d)}})}se.debug("Removing node",a),t.removeNode(a)})},"copy"),oye=s((e,t)=>{let r=t.children(e),n=[...r];for(let i of r)iye.set(i,e),n=[...n,...oye(i,t)];return n},"extractDescendants"),Yot=s((e,t,r)=>{let n=e.edges().filter(u=>u.v===t||u.w===t),i=e.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),qm=s((e,t,r)=>{let n=t.children(e);if(se.trace("Searching children of id ",e,n),n.length<1)return e;let i;for(let a of n){let o=qm(a,t,r),l=Yot(t,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),nye=s(e=>!qr.has(e)||!qr.get(e).externalConnections?e:qr.has(e)?qr.get(e).id:e,"getAnchorId"),lye=s((e,t)=>{if(!e||t>10){se.debug("Opting out, no graph ");return}else se.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(se.debug("Cluster identified",r," Replacement id in edges: ",qm(r,e,r)),Wm.set(r,oye(r,e)),qr.set(r,{id:qm(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let n=e.children(r),i=e.edges();n.length>0?(se.debug("Cluster identified",r,Wm),i.forEach(a=>{let o=pT(a.v,r),l=pT(a.w,r);o^l&&(se.debug("Edge: ",a," leaves cluster ",r),se.debug("Descendants of XXX ",r,": ",Wm.get(r)),qr.get(r).externalConnections=!0)})):se.debug("Not a cluster ",r,Wm)});for(let r of qr.keys()){let n=qr.get(r).id,i=e.parent(n);i!==r&&qr.has(i)&&!qr.get(i).externalConnections&&(qr.get(r).id=i);let a=e.edges().some(o=>o.v===r);if(n&&qr.get(r)?.externalConnections&&a&&hye(e,n,r)){let o=jot(e,r,e.parent(n));o&&(qr.get(r).id=o)}}e.edges().forEach(function(r){let n=e.edge(r);se.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),se.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,a=r.w;if(se.debug("Fix XXX",qr,"ids:",r.v,r.w,"Translating: ",qr.get(r.v)," --- ",qr.get(r.w)),qr.get(r.v)||qr.get(r.w)){if(se.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),i=nye(r.v),a=nye(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v){let o=e.parent(i);qr.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=e.parent(a);qr.get(o).externalConnections=!0,n.toCluster=r.w}se.debug("Fix Replacing with XXX",i,a,r.name),e.setEdge(i,a,n,r.name)}}),cye(e,0),se.trace(qr)},"adjustClustersAndEdges"),cye=s((e,t)=>{if(t>10){se.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i of r){let a=e.children(i);n=n||a.length>0}if(!n){se.debug("Done, no node has children",e.nodes());return}se.debug("Nodes = ",r,t);for(let i of r)if(se.debug("Extracting node",i,qr,qr.has(i)&&!qr.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!qr.has(i))se.debug("Not a cluster",i,t);else if(!qr.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){se.debug("Cluster without external connections, without a parent and with children",i,t);let o=e.graph().rankdir==="TB"?"LR":"TB";qr.get(i)?.clusterData?.dir&&(o=qr.get(i).clusterData.dir,se.debug("Fixing dir",qr.get(i).clusterData.dir,o));let l=new Ln({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});sye(i,e,l,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:qr.get(i).clusterData,label:qr.get(i).label,graph:l})}else se.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!qr.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),se.debug(qr);r=e.nodes(),se.debug("New list of nodes",r);for(let i of r){let a=e.node(i);se.debug(" Now next level",i,a),a?.clusterNode&&cye(a.graph,t+1)}},"extractor"),uye=s((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(n=>{let i=e.children(n),a=uye(e,i);r=[...r,...a]}),r},"sorter"),q3=s(e=>uye(e,e.children()),"sortNodesByHierarchy"),hye=s((e,t,r)=>{let n=e.parent(t);for(;n&&n!==r;){let i=qr.get(n);if(i&&!i.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),jot=s((e,t,r)=>{let n=e.children(t)??[];for(let i of n){if(i===r||pT(i,r))continue;let a=qm(i,e,t);if(a&&!hye(e,a,t))return a}return null},"findSafeAnchorNode")});function f1({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:n,afterPaint:i,paintOptions:a}){let o=t??Z9;return s(async function(u,h,d,f){let p=h.select("g");(d?.insertMarkers??Gy)(p,u.markers,u.type,u.diagramId),K9();let m={element:p,helpers:d,options:f};m.preparedLayout=await e?.(u,m);let g=await o(u,m),y=await r(u,m),v={...m,measure:g};n?await n(u,v,y):await Q9(u,v,a),await i?.(u,v,y)},"render")}function K9(){Fue(),Bue(),Rue(),aye()}async function Z9(e,{element:t}){return await rye(t,e)}async function Q9(e,t,r={}){let{measure:n}=t,{groups:i}=n;for(let o of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(o,t)||await Xot(i,o,t,r);let a=Zot(e.nodes);for(let o of e.edges)Qot(o,r)||await Jot(i,o,a,e,r,t)}async function Xot(e,t,r,n){t.clusterNode?au(t):Kot(t,r,n)?await sf(e.clusters,t):au(t)}function Kot(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}function Zot(e){let t=new Map;for(let r of e)r?.id&&t.set(r.id,r);return t}function Qot(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function Jot(e,t,r,n,i,a){let o=of(e.edgePaths,{...t},i.clusterDb??new Map,n.type,dye(t.start,t,r,a,i),dye(t.end,t,r,a,i),n.diagramId,elt(t,i));O4(t)&&(_m.has(t.id)||await oc(e.edgeLabels,t),tlt(t,o))}function dye(e,t,r,n,i){return i.getEdgeNode?.(e,t,n)??(e?r.get(e)??{}:{})}function elt(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}function tlt(e,t){let r=t?.updatedPath??t?.originalPath,n=Lt(),{subGraphTitleTotalMargin:i}=kh({flowchart:n.flowchart??{}});if(e.label){let a=_m.get(e.id),o=e.x,l=e.y;if(r){let u=or.calcLabelPosition(r);se.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t?.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(e?.startLabelLeft){let a=Pi.get(e.id).startLeft,o=e?.x,l=e?.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=Pi.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=Pi.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=Pi.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=or.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}}var H3=F(()=>{"use strict";St();My();br();er();O2();j9();B2();Fy();B4();Lm();X9();s(f1,"createCommonLayoutRenderer");s(K9,"clearLayoutRenderState");s(Z9,"defaultMeasureLayout");s(Q9,"paintLayoutData");s(Xot,"paintLayoutNode");s(Kot,"shouldPaintAsCluster");s(Zot,"buildNodeLookup");s(Qot,"shouldSkipPaintEdge");s(Jot,"paintLayoutEdge");s(dye,"getRenderedNode");s(elt,"shouldSkipIntersect");s(tlt,"positionRenderedEdgeLabel")});var Tye={};sr(Tye,{applyDagreLayoutResult:()=>vye,getEdgesToRender:()=>J9,measureDagreLayout:()=>xye,prepareLayoutForDagre:()=>eB,render:()=>flt,runDagreLayoutCore:()=>bye});var fye,pye,rlt,nlt,ilt,alt,slt,J9,gye,yye,olt,mye,llt,vye,clt,ult,eB,xye,bye,hlt,dlt,flt,Cye=F(()=>{"use strict";H9();Ko();j9();H3();My();Ht();X9();Lm();B2();Fy();St();O2();Jt();fye=s((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),pye=s((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),rlt=s(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),nlt=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],ilt=s((e,t,r,n,i)=>{let a=[],o=new Set;if(r.forEach(({start:d,end:f})=>{d!==n&&o.add(d),f!==n&&o.add(f)}),o.forEach(d=>{let f=e.node(d);typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)}),a.length===0&&r.forEach(({edge:d})=>{(d.points??[]).forEach(f=>{typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)})}),a.length===0)return pye(i);let l=a.reduce((d,f)=>({x:d.x+f.x/a.length,y:d.y+f.y/a.length}),{x:0,y:0}),u=l.x-t.x,h=l.y-t.y;return Math.abs(u)>Math.abs(h)?u>0?"right":"left":Math.abs(h)>0?h>0?"bottom":"top":pye(i)},"getSelfLoopSide"),alt=s((e,t="top",r=0,n=0)=>{let i=e.x,a=e.y-r,o=e.width/2,l=e.height/2,u=Math.max(36,Math.min(100,e.width*.8)),h=fye(Math.max(n,e.width*.35),36,u),d=fye(Math.min(e.width,e.height)*.45,24,48);switch(t){case"bottom":{let f=a+l;return[{x:i-h/2,y:f},{x:i-h/2,y:f+d},{x:i+h/2,y:f+d},{x:i+h/2,y:f}]}case"right":{let f=i+o;return[{x:f,y:a-h/2},{x:f+d,y:a-h/2},{x:f+d,y:a+h/2},{x:f,y:a+h/2}]}case"left":{let f=i-o;return[{x:f,y:a-h/2},{x:f-d,y:a-h/2},{x:f-d,y:a+h/2},{x:f,y:a+h/2}]}case"top":default:{let f=a-l;return[{x:i-h/2,y:f},{x:i-h/2,y:f-d},{x:i+h/2,y:f-d},{x:i+h/2,y:f}]}}},"getSelfLoopPoints"),slt=s((e,t,r="top",n=0,i={})=>{let o=e.x,l=e.y-n,u=i.width??0,h=i.height??0;switch(r){case"bottom":return{x:o,y:Math.max(...t.map(d=>d.y))+h/2+4};case"right":return{x:Math.max(...t.map(d=>d.x))+u/2+4,y:l};case"left":return{x:Math.min(...t.map(d=>d.x))-u/2-4,y:l};case"top":default:return{x:o,y:Math.min(...t.map(d=>d.y))-h/2-4}}},"getSelfLoopLabelPosition"),J9=s((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(o=>{let l=e.edge(o);if(r&&l.selfLoop){let u=l.selfLoop.id;n.has(u)||n.set(u,[]),n.get(u).push({edge:l,start:o.v,end:o.w})}else i.push({edge:l,start:o.v,end:o.w})}),n.forEach(o=>{if(o.length!==3){o.forEach(x=>i.push(x));return}o.sort((x,b)=>x.edge.selfLoop.order-b.edge.selfLoop.order);let[l,u,h]=o,d=l.edge.originalEdge??u.edge.originalEdge??h.edge.originalEdge??u.edge,f=e.node(d.start);if(!f){o.forEach(x=>i.push(x));return}let p={width:u.edge.width,height:u.edge.height},m=ilt(e,f,o,d.start,a),g=alt(f,m,t,p.width??0),y=slt(f,g,m,t,p),v={...u.edge,...d,id:d.id,points:g,start:d.start,end:d.end,x:y.x,y:y.y,width:p.width,height:p.height,labelStyle:u.edge.labelStyle,fromCluster:l.edge.fromCluster??u.edge.fromCluster??h.edge.fromCluster,toCluster:l.edge.toCluster??u.edge.toCluster??h.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),gye=s(async({element:e,graph:t,diagramType:r,id:n,parentCluster:i,siteConfig:a})=>{let o=t.graph().rankdir;se.trace("Dir in recursive render - dir:",o);let{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f}=U9(e,{edgePathsClass:"edgePaths"});t.nodes()?se.info("Recursive render XXX",t.nodes()):se.info("No nodes found for",t),t.edges().length>0&&se.info("Recursive edges",t.edge(t.edges()[0]));let p=rlt(r);await Promise.all(t.nodes().map(async function(y){let v=t.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));se.trace(`Setting data for parent cluster XXX Node.id = `,y,` data=`,x.height,` Parent cluster`,i.height),t.setNode(i.id,x),t.parent(y)||(se.trace("Setting parent",y,i.id),t.setParent(y,i.id,x))}if(se.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),v?.clusterNode){se.info("Cluster identified XBX",y,v.width,t.node(y));let{ranksep:x,nodesep:b}=t.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let T=await ult({element:d,graph:v.graph,diagramType:r,id:n,parentCluster:t.node(y),siteConfig:a}),w=T.elem;ht(v,w),v.diff=T.diff||0,se.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),$ue(w,v)}else t.children(y).length>0?(se.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",t),se.trace(qm(v.id,t)),qr.set(v.id,{id:qm(v.id,t),node:v})):(se.trace("Node - the non recursive path XAX",y,d,t.node(y),o),await Y9(d,t.node(y),{config:a,dir:o}))})),await s(async()=>{let y=t.edges().map(async function(v){let x=t.edge(v.v,v.w,v.name);if(se.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),se.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(t.edge(v))),se.info("Fix",qr,"ids:",v.v,v.w,"Translating: ",qr.get(v.v),qr.get(v.w)),p&&x.selfLoop){if(x.selfLoop.order!==1)return;let b={...x.originalEdge,...x,id:x.selfLoop.id,startLabelLeft:x.originalEdge?.startLabelLeft??x.startLabelLeft,startLabelRight:x.originalEdge?.startLabelRight??x.startLabelRight,endLabelLeft:x.originalEdge?.endLabelLeft??x.endLabelLeft,endLabelRight:x.originalEdge?.endLabelRight??x.endLabelRight};await oc(h,b),x.width=b.width,x.height=b.height,x.labelStyle=b.labelStyle;return}await oc(h,x)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:g}=kh(a);return{elem:f,graph:t,groups:{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f},diagramType:r,id:n,mergeSelfLoops:p,subGraphTitleTotalMargin:g}},"measureDagreGraph"),yye=s(e=>{se.info("############################################# XXX"),se.info("### Layout ### XXX"),se.info("############################################# XXX"),fT(e)},"runDagreGraphLayout"),olt=s((e,t,r)=>{let n=e.node(t);if(!n)return;let i={...n};return n?.clusterNode?i.y=(n.y??0)+r:e.children(t).length>0?i.height=(n.height??0)+r:i.y=(n.y??0)+r/2,i},"normalizeDagreNode"),mye=s((e,t)=>{nlt.forEach(r=>{t[r]!==void 0&&(e[r]=t[r])})},"applyDagreNodeLayout"),llt=s((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(i=>({...i,y:typeof i.y=="number"?i.y+n:i.y}))}),"normalizeDagreEdge"),vye=s((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(l=>[l.id,l]));q3(r).forEach(l=>{let u=olt(r,l,i);if(!u)return;mye(r.node(l),u);let h=a.get(l);h&&mye(h,u)});let o=i/2;return e.edges=J9(r,o,{mergeSelfLoops:n}).map(({edge:l,start:u,end:h})=>llt(l,u,h,o)),e},"applyDagreLayoutResult"),clt=s(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:i,id:a,mergeSelfLoops:o,subGraphTitleTotalMargin:l})=>{let u=0;await Promise.all(q3(t).map(async function(f){let p=t.node(f);if(se.info("Position XBX => "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p?.clusterNode)p.y+=l,se.info("A tainted cluster node XBX1",f,p.id,p.width,p.height,p.x,p.y,t.parent(f)),qr.get(p.id).node=p,au(p);else if(t.children(f).length>0){se.info("A pure cluster node XBX1",f,p.id,p.x,p.y,p.width,p.height,t.parent(f)),p.height+=l,t.node(p.parentId);let m=p?.padding/2||0,g=p?.labelBBox?.height||0,y=g-m||0;se.debug("OffsetY",y,"labelHeight",g,"halfPadding",m),await sf(r,p),qr.get(p.id).node=p}else{let m=t.node(p.parentId);p.y+=l/2,se.info("A regular node XBX1 - using the padding",p.id,"parent",p.parentId,p.width,p.height,p.x,p.y,"offsetY",p.offsetY,"parent",m,m?.offsetY,p),au(p)}}));let h=l/2;return J9(t,h,{mergeSelfLoops:o}).forEach(function({edge:f,start:p,end:m}){se.info("Edge "+p+" -> "+m+": "+JSON.stringify(f),f),f.points.forEach(x=>x.y+=h);let g=t.node(p),y=t.node(m),v=of(n,f,qr,i,g,y,a);$y(f,v)}),t.nodes().forEach(function(f){let p=t.node(f);se.info(f,p.type,p.diff),p.isGroup&&(u=p.diff)}),se.warn("Returning from recursive render XAX",e,u),{elem:e,diff:u}},"paintDagreLayoutCore"),ult=s(async e=>{let t=await gye(e);return yye(t.graph),await clt(t)},"renderDagreSubgraph"),eB=s(e=>{let t=new Ln({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{t.setNode(r.id,{...r}),r.parentId&&t.setParent(r.id,r.parentId)}),se.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){let n=r.start,i=n+"---"+n+"---1",a=n+"---"+n+"---2",o=t.node(n);t.setNode(i,{domId:i,id:i,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(i,o.parentId),t.setNode(a,{domId:a,id:a,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(a,o.parentId);let l=structuredClone(r),u=structuredClone(r),h=structuredClone(r),d=structuredClone(r);u.originalEdge=l,u.selfLoop={id:l.id,order:0},h.originalEdge=l,h.selfLoop={id:l.id,order:1},d.originalEdge=l,d.selfLoop={id:l.id,order:2},u.label="",u.arrowTypeEnd="none",u.endLabelLeft="",u.endLabelRight="",u.startLabelLeft="",u.id=n+"-cyclic-special-1",h.startLabelRight="",h.startLabelLeft="",h.endLabelLeft="",h.endLabelRight="",h.arrowTypeStart="none",h.arrowTypeEnd="none",h.id=n+"-cyclic-special-mid",d.label="",d.startLabelRight="",d.startLabelLeft="",d.arrowTypeStart="none",o.isGroup&&(u.fromCluster=n,d.toCluster=n),d.id=n+"-cyclic-special-2",d.arrowTypeStart="none",t.setEdge(n,i,u,n+"-cyclic-special-0"),t.setEdge(i,a,h,n+"-cyclic-special-1"),t.setEdge(a,n,d,n+"-cyclic-special-2")}else t.setEdge(r.start,r.end,{...r},r.id)}),lye(t),{graph:t}},"prepareLayoutForDagre"),xye=s(async(e,{element:t,preparedLayout:r})=>{let n=r??eB(e),i=Pe(),a=await gye({element:t,graph:n.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return n.measuredLayout=a,a},"measureDagreLayout"),bye=s((e,t)=>{let r=t.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return yye(r.graph),vye(e,r),r},"runDagreLayoutCore"),hlt=s((e,{measure:t})=>q3(t.graph).map(r=>t.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),dlt=s((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),flt=f1({prepareLayout:eB,measureLayout:xye,runLayoutCore:bye,paintOptions:{clusterDb:qr,getNodes:hlt,getEdgeNode:dlt,skipNode:s((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:s((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})});function tB(e){let t=[];for(let r=0;r=1-Y3||p<=Y3||p>=1-Y3?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}function wye(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function mlt(e){let t=[];for(let r=0;r=Math.abs(r)?t>=0?1:0:r>=0?1:0}function vlt(e,t){if(e.length<2)return e.map(a=>({...a}));let r=e.map(a=>({...a})),n=t.arrowTypeStart&&ra[t.arrowTypeStart];if(n){let a=e[0],o=e[1],l=Math.atan2(o.y-a.y,o.x-a.x);r[0].x=a.x+n*Math.cos(l),r[0].y=a.y+n*Math.sin(l)}let i=t.arrowTypeEnd&&ra[t.arrowTypeEnd];if(i){let a=e.length,o=e[a-2],l=e[a-1],u=Math.atan2(l.y-o.y,l.x-o.x);r[a-1].x=l.x-i*Math.cos(u),r[a-1].y=l.y-i*Math.sin(u)}return r}function xlt(e,t,r,n,i){let a=e.point.x,o=e.point.y,l={x:a-t*e.r,y:o-r*e.r},u={x:a+t*e.r,y:o+r*e.r},h=[`L${mT(l)}`];return i==="arc"?h.push(`A${gu(e.r)},${gu(e.r)} 0 0 ${n} ${mT(u)}`):h.push(`M${mT(u)}`),h}function kye(e,t,r,n){let i=t.x-e.x,a=t.y-e.y,o=r.x-t.x,l=r.y-t.y,u=Math.hypot(i,a),h=Math.hypot(o,l);if(u0){let T=kye(i[h-1],i[h],i[h+1]??i[h],Sye);T&&(y=T.cutLen)}let v=f,x=null;a&&hT.t-w.t);for(let T of b)T.r=Math.min(T.r,T.d-y,v-T.d);for(let T=0;Tw){let C=w/2;b[T].r=Math.min(b[T].r,C),b[T+1].r=Math.min(b[T+1].r,C)}}for(let T of b)T.r=2?n:null}catch{return null}}function Eye(e,t,r){if(!r.enabled)return;let n=e.node();if(!n)return;let i=new Map;for(let h of t)i.set(h.id,h);let a=[],o=new Map;for(let h of t){let d=typeof CSS<"u"&&CSS.escape?CSS.escape(h.id):h.id,f=n.querySelector(`path[data-id="${d}"]`);if(!f)continue;o.set(h.id,f);let m=Slt(f.getAttribute("data-points"))??h.points;a.push({...h,points:m})}let l=mlt(a);if(l.length===0)return;let u=new Map;for(let h of l){let d=u.get(h.jumpEdgeId)??[];d.push(h),u.set(h.jumpEdgeId,d)}for(let h of a){let d=u.get(h.id);if(!d||d.length===0)continue;let p=i.get(h.id)?.curve;if(p!==void 0&&!Clt(p))continue;let m=o.get(h.id);if(!m)continue;if(p===void 0){let T=m.getAttribute("d")??"";if(!Tlt(T))continue}let g=m.getAttribute("style")??"",y=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(g),v=y?Number.parseFloat(y[1]):null,x=y?Number.parseFloat(y[2]):null,b=blt(h,d,r);if(m.setAttribute("d",b),v!==null&&x!==null&&typeof m.getTotalLength=="function"){let T=m.getTotalLength(),w=Math.max(0,T-v-x),C=`0 ${v} ${w} ${x}`,S=g.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${C};`).replace(/;\s*;+/g,";");m.setAttribute("style",S)}}}var Sye,U3,Y3,ylt,Aye=F(()=>{"use strict";xO();Sye=5,U3=1e-5,Y3=1e-6;s(tB,"buildSegmentList");s(plt,"segmentIntersection");s(wye,"isHorizontalSeg");s(mlt,"findEdgeIntersections");s(gu,"fmt");s(mT,"pointToString");s(glt,"getArcSweepFlag");ylt=.001;s(vlt,"applyMarkerOffsets");s(xlt,"emitJump");s(kye,"computeRoundedCorner");s(blt,"rewriteEdgePath");s(Tlt,"isStraightPath");s(Clt,"curveSupportsLineHops");s(Slt,"decodeDataPoints");s(Eye,"applyLineJumpsToSvg")});function Rye(e,{measure:t}){let r=e.config?.swimlane?.lineHops;if(r===!1)return;let n=r==="gap"?"gap":"arc",i=e.edges.filter(a=>Array.isArray(a.points)&&a.points.length>=2).map(a=>({id:a.id,points:a.points,curve:a.curve,arrowTypeStart:a.arrowTypeStart,arrowTypeEnd:a.arrowTypeEnd}));Eye(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}var _ye=F(()=>{"use strict";Aye();s(Rye,"applySwimlaneLineJumps")});function Lye(e){return Math.max(e.padding??20,20)}function wlt(e){let{x:t,y:r,width:n,height:i}=e,a=e.swimlaneContentTop;if(typeof t!="number"||typeof r!="number"||typeof n!="number"||typeof i!="number"||typeof a!="number"||!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(i)||!Number.isFinite(a)||n<=0||i<=0){delete e.groupTitleRect;return}let o=r-i/2,l=Math.min(a,r+i/2),u=Math.min(21,Math.max(0,l-o)),h=o+u;if(h<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-n/2,right:t+n/2,top:o,bottom:h}}function Dye(e){let t=e.direction,r=e.nodes??=[];for(let a of e.nodes??[])a.isGroup&&!a.parentId&&(a.shape="swimlane",t&&(a.direction=t));let n=r.filter(a=>!a.isGroup&&!a.parentId);if(n.length===0)return;let i=r.find(a=>a.id===rB);i?i.isGroup&&(i.shape="swimlane",t&&(i.direction=t)):(i={id:rB,label:"",isGroup:!0,shape:"swimlane",padding:20,...t?{direction:t}:{}},r.push(i));for(let a of n)a.parentId=rB}function Iye(e){let t=new Map;for(let u of e.nodes??[])t.set(u.id,u);let r=[];for(let u of e.edges??[]){let h=typeof u.start=="string"?u.start:void 0,d=typeof u.end=="string"?u.end:void 0;!h||!d||u.labelNodeId||r.push({id:u.id,src:h,dst:d,ref:u})}let n=e.nodes??[],i=n.filter(u=>u.isGroup),a=n.filter(u=>!u.isGroup);return{nodes:[...[...i].reverse(),...a].map(u=>u.id),edges:r,layout:e,nodeById:t}}function Mye(e,t,r,n){let{layout:i}=e,a=e.nodeById,o=n?.layerGap??100,l=n?.nodeGap??40,u=0;for(let p of t.layers){let m=0;for(let g of p){let y=a.get(g);if(!y){m++;continue}y.layer=u,y.order=m;let v=r.x[g]??m*l,x=r.y[g]??u*o;y.x=v,y.y=x,m++}u++}let h=i.nodes??[],d=new Map,f=[];for(let p of h){if(!p?.isGroup)continue;p.parentId||f.push(p);let m=h.filter(b=>b.parentId===p.id),g=1/0,y=-1/0,v=1/0,x=-1/0;for(let b of m){let T=b.x??r.x[b.id],w=b.y??r.y[b.id],C=b.width??0,S=b.height??0;T!=null&&w!=null&&(g=Math.min(g,T-C/2),y=Math.max(y,T+C/2),v=Math.min(v,w-S/2),x=Math.max(x,w+S/2))}if(g===1/0||v===1/0)p.x=p.x??0,p.y=p.y??0,p.width=p.width??0,p.height=p.height??0;else{let b=p.padding??20,T=p.parentId?b:2*Lye(p),w=b,C=Math.max(0,y-g)+T,S=Math.max(0,x-v)+w,k=(g+y)/2,R=(v+x)/2;p.x=k,p.y=R,p.width=C,p.height=S,d.set(p.id,{minX:g,maxX:y,minY:v,maxY:x})}}if(f.length>0&&d.size>0){let p=1/0,m=-1/0,g=0;for(let y of f){let v=y.padding??20;v>g&&(g=v);let x=d.get(y.id);x&&(p=Math.min(p,x.minY),m=Math.max(m,x.maxY))}if(p!==1/0&&m!==-1/0){let y=Math.max(0,m-p),x=Math.max(g,36),b=y+2*x,T=(p+m)/2;for(let M of f)M.y=T,M.height=b,M.swimlaneContentTop=p;let w=[...f].sort((M,P)=>{let N=M.x??0,_=P.x??0;return N-_}),C=[],S=[],k=[];for(let M of w){let P=d.get(M.id);if(!P)continue;let N=Math.max(0,P.maxX-P.minX)+2*Lye(M),_=(P.minX+P.maxX)/2;C.push(M.id),S.push(_),k.push(N)}let R=C.length;if(R>0){let M=new Map;if(R===1)M.set(C[0],k[0]);else{let P=[];for(let D=0;D{"use strict";rB="__swimlane_default__";s(Lye,"topLaneHorizontalPadding");s(wlt,"assignTopLaneTitleRect");s(Dye,"prepareLayoutForSwimlanes");s(Iye,"toGraphView");s(Mye,"writeBackToLayoutData")});function Nye(e){let t=[],r=[],n=new Map;for(let o of e.nodes)n.set(o.id,o);for(let o of e.edges){if(!o.label||o.label.length===0||o.isLayoutOnly||o.labelNodeId)continue;let l=o.start?n.get(o.start):void 0,u=o.end?n.get(o.end):void 0;if(!l||!u){se.warn(klt,`Edge ${o.id} has missing source or target node`);continue}let h=`edge-label-${o.start}-${o.end}-${o.id}`,f=l.parentId!==u.parentId?u.parentId:l.parentId,p={id:h,label:o.label,edgeStart:o.start??"",edgeEnd:o.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:f,isGroup:!1,labelStyle:Array.isArray(o.labelStyle)?o.labelStyle[0]:o.labelStyle??"",...l.dir?{dir:l.dir}:{}};t.push(p),o.labelNodeId=h,o.label=void 0,o.text=void 0;let m={id:`${o.id}-to-label`,start:o.start,end:h,type:"normal",isLayoutOnly:!0},g={id:`${o.id}-from-label`,start:h,end:o.end,type:"normal",isLayoutOnly:!0};r.push(m,g)}let i=[...e.nodes,...t],a=[...e.edges,...r];return{...e,nodes:i,edges:a}}var klt,Pye=F(()=>{"use strict";St();klt="[EdgeLabelNodes]";s(Nye,"createEdgeLabelNodes")});function Bye(e){let t=e.x??0,r=e.y??0,n=e.width??0,i=e.height??0;return n>0&&i>0?{cx:t,cy:r,rect:p1(t,r,n,i)}:void 0}function $ye(e){if(e.isGroup)return;let t=Bye(e);return t?{id:String(e.id??""),cx:t.cx,cy:t.cy,rect:t.rect}:void 0}function go(e,t,r=.001){return Math.abs(e.x-t.x)r}function Ei(e,t,r=.001){return tn(e,t,r)&&Math.abs(e.y-t.y)>r}function xs(e,t,r,n){return Math.max(0,Math.min(Math.max(e,t),Math.max(r,n))-Math.max(Math.min(e,t),Math.min(r,n)))}function hc(e,t,r=.001){return e.horizontal&&t.horizontal&&an(e.a,t.a,r)?xs(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&tn(e.a,t.a,r)?xs(e.a.y,e.b.y,t.a.y,t.b.y):0}function Df(e,t=.001){let r=[];for(let n=0;n0?r[r.length-1]:void 0;(!i||!go(i,n,t))&&r.push({x:n.x,y:n.y})}return r}function j3(e,t=.001){if(!e||e.length!==4)return;let[r,n,i,a]=e;return ki(r,n,t)&&Ei(n,i,t)&&ki(i,a,t)?{kind:"HVH",p0:r,p1:n,p2:i,p3:a}:Ei(r,n,t)&&ki(n,i,t)&&Ei(i,a,t)?{kind:"VHV",p0:r,p1:n,p2:i,p3:a}:void 0}function gT(e,t,r,n=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),l=Math.max(e.y,t.y);return a>r.left-n&&ir.top-n&&ot.left+r&&e.xt.top+r&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function K3(e,t){return e.leftt.left&&e.topt.top}function iB(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function p1(e,t,r,n){return{left:e-r/2,right:e+r/2,top:t-n/2,bottom:t+n/2}}function Ba(e){return Bye(e)?.rect}function If(e,t){switch(t){case"top":return{x:e.cx,y:e.rect.top};case"bottom":return{x:e.cx,y:e.rect.bottom};case"left":return{x:e.rect.left,y:e.cy};case"right":return{x:e.rect.right,y:e.cy}}}function Z3(e,t,r,n,i,a=.001){let o=t==="left"||t==="right",l=n==="left"||n==="right";if(o&&l){if(t==="right"&&n==="left"&&e.xr.x){if(an(e,r,a))return[e,r];let f=(e.x+r.x)/2;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}if(t===n){if(an(e,r,a))return;let f=t==="left"?Math.min(e.x,r.x)-i:Math.max(e.x,r.x)+i;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}return}if(!o&&!l){if(t===n){if(tn(e,r,a))return;let p=t==="top"?Math.min(e.y,r.y)-i:Math.max(e.y,r.y)+i;return[e,{x:e.x,y:p},{x:r.x,y:p},r]}if(!(t==="bottom"&&n==="top"&&e.yr.y))return;if(tn(e,r,a))return[e,r];let f=(e.y+r.y)/2;return[e,{x:e.x,y:f},{x:r.x,y:f},r]}if(o&&!l){let d=t==="right"&&r.x>e.x||t==="left"&&r.xr.y;return d&&f?[e,{x:r.x,y:e.y},r]:void 0}let u=t==="bottom"&&r.y>e.y||t==="top"&&r.yr.x;return u&&h?[e,{x:e.x,y:r.y},r]:void 0}function Q3(e,t,r,n){return t==="left"||t==="right"?[e,{x:n,y:e.y},{x:n,y:r.y},r]:[e,{x:e.x,y:n},{x:r.x,y:n},r]}function m1(e){let t=new Map,r=[];for(let n of e){if(n.isEdgeLabel)continue;let i=$ye(n);i&&(t.set(i.id,i),r.push({id:i.id,rect:i.rect}))}return{nodeInfoById:t,realNodeRects:r}}function yu(e){let t=[],r=[];for(let n of e){let i=$ye(n);if(!i)continue;let a={id:i.id,rect:i.rect};n.isEdgeLabel?r.push(a):t.push(a)}return{realNodeRects:t,labelNodeRects:r}}function Gye(e,{includeEdgeLabels:t=!0}={}){let r=[];for(let n of e){if(n.isGroup||!t&&n.isEdgeLabel)continue;let i=n.x??0,a=n.y??0,o=n.width??0,l=n.height??0;r.push({nodeId:n.id,...p1(i,a,o,l)})}return r}function J3(e,t,r=.001){let n=e.start,i=e.end;if(!n||!i)return;let a=t.get(n),o=t.get(i);if(!(!a||!o))return{srcId:n,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)g||px)return!1;let b=Math.abs(y-d.a.x)i:a&&l&&an(e,r,i)?xs(e.x,t.x,r.x,n.x)>i:!1}function yT(e,t,r,n,{epsilon:i=.001,skipDegenerateOther:a=!1}={}){for(let o of r){if(o===n||o.isLayoutOnly)continue;let l=o.points;if(!(!l||l.length<2))for(let u=0;up+i&&gy+i&&fn+.001&&e=2?t[t.length-2]:void 0,u=(o?tn(o,i):!1)?{x:i.x,y:a.y}:{x:a.x,y:i.y};t.push(u)}t.push(a)}let r=[];for(let n of t){let i=r[r.length-1];(!i||!go(i,n))&&r.push(n)}return r}function kl(e){if(e.length<3)return e;let t=[...e];for(let r=0;r<32;r++){let n=Rlt(t);if(t=n.points,!n.changed)break}return t}var fc=F(()=>{"use strict";s(Bye,"measuredNodeRect");s($ye,"nodeBoundsInfoFor");s(go,"samePoint");s(tn,"sameX");s(an,"sameY");s(ki,"isHorizontalSegment");s(Ei,"isVerticalSegment");s(xs,"overlapLength");s(hc,"sameAxisSegmentOverlapLength");s(Df,"orthogonalSegmentsForPoints");s(yo,"countOrthogonalBends");s(rn,"dedupeConsecutivePoints");s(j3,"classifyThreeSegmentRoute");s(gT,"segmentBoundsOverlapRect");s(X3,"pointInsideRect");s(Fye,"rectContainsRect");s(K3,"rectsOverlap");s(iB,"inflateRect");s(p1,"rectFromCenterSize");s(Ba,"rectOfNodeBounds");s(If,"portForRectSide");s(Z3,"buildOrthogonalPortPath");s(Q3,"buildSameSideTrackPath");s(m1,"collectRealNodeBounds");s(yu,"collectNodeRectEntries");s(Gye,"collectLayoutNodeRects");s(J3,"getNodePairGeometry");s(Qn,"segmentHitsAnyRect");s(aB,"orthogonalSegmentsCross");s(Elt,"sameAxisSegmentsOverlap");s(yT,"segmentConflictsWithAnyEdge");s(dc,"orthogonalSegmentsStrictlyCross");s(Oye,"strictlyBetween");s(Alt,"isCollinearIntermediate");s(Rlt,"simplifyPolylineOnce");s(vT,"orthogonalizePolyline");s(kl,"simplifyPolyline")});function Zye(e,t,r){let n=e;if(n.isLayoutOnly||!n.points||n.points.length=0&&i=e.length)return e;let a=i-n;if(a<0||a>=e.length)return e;let o=Llt(e[i],e[a],t);return r?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}function Qye(e,t){for(let r of e){let n=Zye(r,t,2);if(!n)continue;let i=[...n.points];n.srcRect&&(i=Vye(i,n.srcRect,!0)),n.dstRect&&(i=Vye(i,n.dstRect,!1)),i=kl(vT(i)),i=Jye(i,n.srcRect,n.dstRect),n.edge.points=kl(vT(i))}}function Wye(e,t,r,n=!1){if(an(e,t,Dr)){if(t.yr.bottom+Dr)return t;if(n){if(e.xr.right+Dr)return{x:r.right,y:e.y}}return{x:Math.abs(t.x-r.left)<=Math.abs(t.x-r.right)?r.left:r.right,y:e.y}}if(tn(e,t,Dr)){if(t.xr.right+Dr)return t;if(n){if(e.yr.bottom+Dr)return{x:e.x,y:r.bottom}}let i=Math.abs(t.y-r.top)<=Math.abs(t.y-r.bottom);return{x:e.x,y:i?r.top:r.bottom}}return t}function sB(e,t,r){let n=e[t];for(let i=t+r;i>=0&&in.lo)),r=Math.min(...e.map(n=>n.hi));if(!(t>r))return{lo:t,hi:r}}function Hye(e,t){return t==="left"||t==="right"?oB(e.top,e.bottom):oB(e.left,e.right)}function lB(e,t,r){let n=e.y>=r.top-Dr&&e.y<=r.bottom+Dr,i=e.x>=r.left-Dr&&e.x<=r.right+Dr;if(an(e,t,Dr)&&n){if(Math.abs(e.x-r.left)0?Dlt(a):void 0}function Uye(e,t,r,n,i){let a=Ilt(e,t,r,n,i);if(!a)return;let o=i?e.y:e.x,l=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(l-o)({...l}));for(let l=t;l>=0&&l=r.left-Dr&&Math.max(e.x,t.x)<=r.right+Dr,i=Math.min(e.y,t.y)>=r.top-Dr&&Math.max(e.y,t.y)<=r.bottom+Dr;if(Math.abs(e.y-r.top)n.bottom+Dr;case"left":return an(t,r,Dr)&&r.xn.right+Dr}}function Kye(e,t,r){if(e.length<3)return e;if(r){let a=jye(e[0],e[1],t);return a&&Xye(a,e[1],e[2],t)?e.slice(1):e}let n=e.length-1,i=jye(e[n-1],e[n],t);return i&&Xye(i,e[n-1],e[n-2],t)?e.slice(0,n):e}function Plt(e,t,r){let n=e;if(t){let a=sB(n,0,1);if(a){let o=Wye(a,n[0],t);o!==n[0]&&(n=[o,...n.slice(1)])}n=Kye(n,t,!0)}if(r){let a=n.length-1,o=sB(n,a,-1);if(o){let l=Wye(o,n[a],r,!0);l!==n[a]&&(n=[...n.slice(0,a),l])}n=Kye(n,r,!1)}let i=Jye(n,t,r);return i!==n||n.length===2?i:(t&&(n=Yye(n,t,!0)),r&&(n=Yye(n,r,!1)),n)}function cB(e,t){for(let r of e){let n=Zye(r,t,2);if(!n)continue;let i=rn(n.points,Dr),a=Plt(i,n.srcRect,n.dstRect);if(a.length<3){n.edge.points=a;continue}let o=[a[0],{...a[0]},...a.slice(1,-1),a[a.length-1],{...a[a.length-1]}];n.edge.points=o}}var Dr,_lt,zye,e1e=F(()=>{"use strict";fc();Dr=.001,_lt=.5,zye=4;s(Zye,"endpointContextFor");s(Llt,"segmentEnterPoint");s(Vye,"clipEndpoint");s(Qye,"clipEdgeEndpointsToNodeBoundaries");s(Wye,"snapEndpointToBoundary");s(sB,"firstDistinctAdjacent");s(oB,"cornerClearanceRange");s(qye,"clampToCornerClearance");s(Dlt,"intersectRanges");s(Hye,"clearanceRangeForSide");s(lB,"terminalSideForSegment");s(e5,"isHorizontalSide");s(Ilt,"straightClearanceRange");s(Uye,"clearStraightEndpointCornerAxis");s(Jye,"clearStraightEndpointCornerConnections");s(Mlt,"cornerClearedEndpoint");s(Nlt,"moveCollinearEndpointRun");s(Yye,"clearEndpointCornerConnection");s(jye,"borderSideForSegment");s(Xye,"leavesOutward");s(Kye,"collapseOwnBorderStub");s(Plt,"snapAndCollapseEndpoints");s(cB,"prepareEdgeEndpointsForRenderer")});function r1e(e){return new Map(e.map(t=>[t.id,t]))}function Olt(e,t){let r=e.parentId,n=null;for(;r;){let i=t.get(r);if(!i?.isGroup)break;n=i.id,r=i.parentId}return n}function t1e(e,t){let r=0,n=e.parentId;for(;n;){let i=t.get(n);if(!i?.isGroup)break;r++,n=i.parentId}return r}function n1e(e){let t=1/0,r=-1/0,n=1/0,i=-1/0;for(let a of e){let o=a.x,l=a.y;if(typeof o!="number"||typeof l!="number")continue;let u=a.width??0,h=a.height??0;t=Math.min(t,o-u/2),r=Math.max(r,o+u/2),n=Math.min(n,l-h/2),i=Math.max(i,l+h/2)}return t===1/0||n===1/0?null:{minX:t,maxX:r,minY:n,maxY:i}}function Blt(e,t){let r=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+r,e.height=Math.max(0,t.maxY-t.minY)+r}function $lt(e){let t=r1e(e),r=e.filter(n=>n.isGroup&&n.parentId).sort((n,i)=>t1e(i,t)-t1e(n,t));for(let n of r){let i=e.filter(o=>o.parentId===n.id),a=n1e(i);a&&Blt(n,a)}}function uB(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(u=>!u.isGroup),a=1/0,o=-1/0;for(let u of i){let h=u[t];typeof h=="number"&&(a=Math.min(a,h),o=Math.max(o,h))}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let l=s(u=>a+o-u,"mirror");for(let u of r){let h=u[t];typeof h=="number"&&(u[t]=l(h));let d=u.groupTitleRect;d&&(u.groupTitleRect=t==="x"?{...d,left:l(d.right),right:l(d.left)}:{...d,top:l(d.bottom),bottom:l(d.top)})}for(let u of n)for(let h of u.points??[])h[t]=l(h[t]);return!0}function i1e(e){return(e.nodes??[]).some(r=>!r.isGroup)?uB(e,"y"):!0}function a1e(e,t="LR"){let r=e.nodes??[],n=e.edges??[],i=r.filter(A=>!A.isGroup),a=1/0,o=1/0;for(let A of i){let I=A.x??0,D=A.y??0;I0?Math.max(1,d/f):1;for(let A of i){let I=A.x??0,L=((A.y??0)-o)*p+l,B=I-a;A.x=L,A.y=B}for(let A of n)if(A.points)for(let I of A.points){let D=I.x,B=(I.y-o)*p+l,O=D-a;I.x=B,I.y=O}$lt(r);let m=r.filter(A=>A.isGroup&&!A.parentId);if(m.length===0)return t==="RL"&&uB(e,"x"),!0;let g=r1e(r),y=new Map;for(let A of r){if(A.isGroup)continue;let I=Olt(A,g);if(!I)continue;let D=y.get(I)??[];D.push(A),y.set(I,D)}let v=0;for(let A of m){let I=A.padding??0;I>v&&(v=I)}let x=[],b=1/0,T=-1/0;for(let A of m){let I=y.get(A.id)??[],D=n1e(I);D&&(b=Math.min(b,D.minX),T=Math.max(T,D.maxX),x.push({lane:A,contentTop:D.minY,contentBottom:D.maxY,centerY:(D.minY+D.maxY)/2}))}if(b===1/0||T===-1/0)return!0;let w=Math.max(0,T-b),C=Math.max(v,10),S=w+2*C,k=l+S,P=(b+T)/2-S/2-l,N=P+k/2,_=Math.max(v,l);x.sort((A,I)=>A.centerY-I.centerY);for(let A=0;A{"use strict";s(r1e,"buildNodeMap");s(Olt,"resolveTopLevelGroupId");s(t1e,"groupDepth");s(n1e,"boundsForChildren");s(Blt,"applyGroupBounds");s($lt,"recomputeNestedGroupBounds");s(uB,"mirrorAxis");s(i1e,"applyBtDirectionTransform");s(a1e,"applyLrDirectionTransform")});function o1e(e,t){let{nodeInfoById:r,realNodeRects:n}=m1(t);for(let i of e){if(i.isLayoutOnly)continue;let a=i.points;if(!a||a.length<4)continue;let o=j3(rn(a,pc),pc);if(!o)continue;let{p3:l}=o,u=o.kind==="HVH",h=J3(i,r,pc);if(!h)continue;let{srcId:d,dstId:f,srcInfo:p,dstInfo:m,collinearX:g,collinearY:y}=h;if(g||y)continue;let v,x=p.rect;for(let b of Glt){let T,w,C;if(u){let N=m.cy>p.cy?x.bottom:x.top,_=p.cx+b;if(_<=x.left+pc||_>=x.right-pc)continue;T={x:_,y:N},w={x:_,y:l.y},C={x:l.x,y:l.y}}else{let N=m.cx>p.cx?x.right:x.left,_=p.cy+b;if(_<=x.top+pc||_>=x.bottom-pc)continue;T={x:N,y:_},w={x:l.x,y:_},C={x:l.x,y:l.y}}let S=go(T,w,pc),k=go(w,C,pc);if(S&&k||!S&&Qn(T,w,n,[d],1)||!k&&Qn(w,C,n,[f],1))continue;let R=!S&&yT(T,w,e,i,{epsilon:pc,skipDegenerateOther:!0}),M=!k&&yT(w,C,e,i,{epsilon:pc,skipDegenerateOther:!0});if(!(R||M)){S?v=[w,C]:k?v=[T,w]:v=[T,w,C];break}}v&&(i.points=v)}}var pc,Flt,t5,Glt,l1e=F(()=>{"use strict";fc();pc=1e-6,Flt=8,t5=Flt,Glt=[0,t5,-t5,2*t5,-2*t5];s(o1e,"portSwapToLShape")});function c1e(e,t){let{realNodeRects:a,labelNodeRects:o}=yu(t.values());for(let l of e){if(l.isLayoutOnly)continue;let u=l.points;if(!u||u.length<4)continue;let h=rn(u,.001);if(h.length<4)continue;let d=h.length-1,f=h[d],p=h[d-1],m=h[d-2],g=f.x-p.x,y=f.y-p.y,v=Math.hypot(g,y);if(v>=10||v<.001)continue;let x=p.x-m.x,b=p.y-m.y;if(Math.hypot(x,b)<.001)continue;let w=ki(p,f,.001),C=Ei(p,f,.001),S=ki(m,p,.001),k=Ei(m,p,.001);if(!(w&&k||C&&S))continue;let R=l.end,M=l.start,P=R?t.get(R):void 0;if(!P)continue;let N=P.x??0,_=P.y??0,A=Ba(P);if(!A)continue;let I,D;if(k){let z=b<0;I={x:N,y:m.y},D={x:N,y:z?A.bottom:A.top}}else{let z=x>0;I={x:m.x,y:_},D={x:z?A.right:A.left,y:_}}if(Qn(I,D,a,R?[R]:[],-2)||Qn(I,D,o,[],-2))continue;if(M){let z=t.get(M),H=z?Ba(z):void 0;if(H&&X3(I,H,2))continue}let L=s((z,H)=>`${z.x.toFixed(3)},${z.y.toFixed(3)}|${H.x.toFixed(3)},${H.y.toFixed(3)}`,"ownSegmentKey"),B=new Set;for(let z=0;z{for(let K of e){if(K===l||K.isLayoutOnly)continue;let J=K.points;if(!(!J||J.length<2))for(let ne=0;ne=0){let z=h[d-3],H=[M,R].filter(K=>!!K);if(Qn(z,I,a,H,-2)||O(z,I))continue}let W=[...h.slice(0,d-2),I,D];l.points=W;let V=l.labelNodeId;if(V){let z=t.get(V);if(z){let H=z.width??0,K=z.height??0;if(H>0&&K>0){let J,ne,Z=-1;for(let pe=0;pe=H+2||Ee&&ce>=K+2)&&ce>Z&&(Z=ce,J=(te.x+fe.x)/2,ne=(te.y+fe.y)/2)}J!==void 0&&ne!==void 0&&(z.x=J,z.y=ne)}}}}}var u1e=F(()=>{"use strict";fc();s(c1e,"collapseShortTerminalStub")});function h1e(e,t){let i=s((m,g)=>{let y=m.x??0,v=m.y??0,x=g.x-y,b=g.y-v,T=(m.width??0)/2,w=(m.height??0)/2;return Math.abs(b)*T>Math.abs(x)*w?(b<0&&(w=-w),{x:y+(b===0?0:w*x/b),y:v+w}):(x<0&&(T=-T),{x:y+T,y:v+(x===0?0:T*b/x)})},"rectIntersect"),a=s((m,g)=>{let y=rn(m.points??[]);if(y.length<2)return;let v=g?m.start:m.end,x=v?t.get(v):void 0,b=x?Ba(x):void 0;if(!x||!v||!b)return;let T=g?y[0]:y[y.length-1],w=g?y[1]:y[y.length-2],C=i(x,T),S=T;if(hB(w,C)&&(S=w),tn(C,S,ir))return{edge:m,edgeId:String(m.id??""),nodeId:v,atStart:g,orientation:"V",coord:C.x,min:Math.min(C.y,S.y),max:Math.max(C.y,S.y),boundary:C,railEnd:S,rect:b};if(an(C,S,ir))return{edge:m,edgeId:String(m.id??""),nodeId:v,atStart:g,orientation:"H",coord:C.y,min:Math.min(C.x,S.x),max:Math.max(C.x,S.x),boundary:C,railEnd:S,rect:b}},"terminalLaneFor"),o=s((m,g)=>Math.max(0,Math.min(m.max,g.max)-Math.max(m.min,g.min)),"projectedOverlapLength"),l=s((m,g)=>m.nodeId!==g.nodeId||m.orientation!==g.orientation?!1:m.orientation==="H"?(Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1)&&tn(m.boundary,g.boundary,1):(Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1)&&an(m.boundary,g.boundary,1),"sameTerminalFace"),u=s((m,g)=>m.nodeId!==g.nodeId||m.orientation!==g.orientation?!1:o(m,g)>=$a&&Math.abs(m.coord-g.coord)<.5,"exactTerminalLaneConflict"),h=s((m,g)=>{if(m.nodeId!==g.nodeId||m.orientation!==g.orientation||m.orientation!=="H"||m.atStart===g.atStart)return!1;let y=o(m,g);if(y<$a)return!1;let v=m.rect.bottom-m.rect.top;return y2*v?!1:l(m,g)&&Math.abs(m.coord-g.coord)<16},"nearTerminalLaneConflict"),d=s((m,g)=>{let y=rn(m.edge.points??[]);if(y.length<2)return;let v=m.orientation==="V"?{x:m.boundary.x+g,y:m.boundary.y}:{x:m.boundary.x,y:m.boundary.y+g},x=m.orientation==="V"?{x:m.railEnd.x+g,y:m.railEnd.y}:{x:m.railEnd.x,y:m.railEnd.y+g};if(!s(()=>Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1?an(v,m.boundary,ir)&&v.x>=m.rect.left+1&&v.x<=m.rect.right-1:Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1?tn(v,m.boundary,ir)&&v.y>=m.rect.top+1&&v.y<=m.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(m.atStart){let S=y.length>1&&go(y[1],m.railEnd,ir),k=y.slice(S?2:1),R=k[0];return R&&!hB(R,x)?void 0:[v,x,...k]}let T=y.length>1&&go(y[y.length-2],m.railEnd,ir),w=y.slice(0,T?-2:-1),C=w[w.length-1];if(!(C&&!hB(C,x)))return[...w,x,v]},"shiftedCandidate"),f=s(m=>{let g=m.edge,y=rn(g.points??[]);if(y.length!==2)return!1;let v=g.start,x=g.end,b=v?t.get(v):void 0,T=x?t.get(x):void 0;if(!b||!T)return!1;let w=b.x??0,C=b.y??0,S=T.x??0,k=T.y??0,[R,M]=y;return an(R,M,ir)&&Math.abs(C-k)<1&&Math.abs(w-S)>1||tn(R,M,ir)&&Math.abs(w-S)<1&&Math.abs(C-k)>1},"laneIsStraightCollinearConnector"),p=[-7,7,-14,14,-21,21];for(let m=0;m<8;m++){let g=e.filter(v=>!v.isLayoutOnly).flatMap(v=>[a(v,!0),a(v,!1)]).filter(v=>!!v),y=!1;for(let v=0;v{let R=f(S),M=f(k);return R!==M?Number(R)-Number(M):+!k.atStart-+!S.atStart});for(let S of C){for(let k of p){let R=d(S,k);if(!R)continue;let M=a({...S.edge,points:R},S.atStart);if(!(!M||g.some(P=>P.edge!==S.edge&&(u(M,P)||w&&h(M,P))))){S.edge.points=R,y=!0;break}}if(y)break}}if(!y)return}}function d1e(e,t){let{realNodeRects:i,labelNodeRects:a}=yu(t.values()),o=s((u,h)=>{let d=u.start,f=u.end,p=Qr(h);if(p.length!==h.length-1)return!1;let m=[d,f].filter(g=>!!g);for(let g of p)if(Qn(g.a,g.b,i,m,-2)||Qn(g.a,g.b,a,[],-2))return!1;for(let g of e){if(g===u||g.isLayoutOnly)continue;let y=g.points;if(!(!y||y.length<2)){for(let v of p)for(let x of Qr(rn(y)))if(hc(v,x,.5)>=$a||dc(v.a,v.b,x.a,x.b,ir))return!1}}return!0},"candidateIsSafe"),l=s((u,h)=>{if(h+4>=u.length)return;let d=u[h],f=u[h+1],p=u[h+2],m=u[h+3],g=u[h+4],y=ki(d,f)&&Ei(f,p)&&ki(p,m)&&Ei(m,g)&&tn(d,m,ir)&&tn(d,g,ir)&&tn(f,p,ir)&&(f.x-d.x)*(m.x-p.x)<0,v=Ei(d,f)&&ki(f,p)&&Ei(p,m)&&ki(m,g)&&an(d,m,ir)&&an(d,g,ir)&&an(f,p,ir)&&(f.y-d.y)*(m.y-p.y)<0;if(y||v)return rn([...u.slice(0,h+1),g,...u.slice(h+5)]);if(h+5>=u.length)return;let x=u[h+5],b=Ei(d,f)&&ki(f,p)&&Ei(p,m)&&ki(m,g)&&Ei(g,x)&&tn(d,g,ir)&&tn(d,x,ir)&&tn(p,m,ir)&&(p.x-f.x)*(g.x-m.x)<0,T=ki(d,f)&&Ei(f,p)&&ki(p,m)&&Ei(m,g)&&ki(g,x)&&an(d,g,ir)&&an(d,x,ir)&&an(p,m,ir)&&(p.y-f.y)*(g.y-m.y)<0;if(!(!b&&!T))return rn([...u.slice(0,h+1),x,...u.slice(h+6)])},"withoutDogleg");for(let u=0;u<8;u++){let h=!1;for(let d of e){if(d.isLayoutOnly)continue;let f=rn(d.points??[]);for(let p=0;p<=f.length-5;p++){let m=l(f,p);if(!(!m||!o(d,m))){d.points=m,h=!0;break}}if(h)break}if(!h)return}}function dB(e,t){let{realNodeRects:a,labelNodeRects:o}=yu(t.values()),l=e.filter(g=>!g.isLayoutOnly),u=s((g,y,v)=>rn(g===y?v??[]:g.points??[]),"pointsFor"),h=s((g,y)=>{let v=0;for(let x=0;x{let y=Qr(g);if(y.length!==3)return;let v=y[1];if(!(y[0].horizontal===v.horizontal||y[2].horizontal===v.horizontal))return{index:v.index,horizontal:v.horizontal,vertical:v.vertical,segment:v}},"middleRail"),f=s((g,y)=>{let v=[g.start,g.end].filter(x=>!!x);return a.filter(x=>{if(v.includes(x.id))return!1;let b=x.rect;return y.horizontal?xs(y.a.x,y.b.x,b.left,b.right)>=$a&&y.a.y>=b.top-2&&y.a.y<=b.bottom+2:xs(y.a.y,y.b.y,b.top,b.bottom)>=$a&&y.a.x>=b.left-2&&y.a.x<=b.right+2})},"blockingRectsFor"),p=s((g,y,v)=>{let x=g.map(T=>({...T}));if(y.horizontal)x[y.index].y=v,x[y.index+1].y=v;else if(y.vertical)x[y.index].x=v,x[y.index+1].x=v;else return;let b=kl(rn(x));return Qr(b).length===b.length-1?b:void 0},"candidateByMovingRail"),m=s((g,y,v)=>{let x=[g.start,g.end].filter(T=>!!T),b=Qr(y);if(b.length!==y.length-1)return!1;for(let T of b)if(Qn(T.a,T.b,a,x,-2)||Qn(T.a,T.b,o,[],-2))return!1;for(let T of l)if(T!==g){for(let w of b)for(let C of Qr(u(T)))if(hc(w,C,.5)>=$a)return!1}return h(g,y)<=v},"candidateIsSafe");for(let g=0;g<8;g++){let y=h(),v=!1;for(let x of l){let b=u(x),T=d(b);if(!T)continue;let w=f(x,T.segment);if(w.length===0)continue;let C=T.horizontal?[Math.min(...w.map(S=>S.rect.top))-20,Math.max(...w.map(S=>S.rect.bottom))+20]:[Math.min(...w.map(S=>S.rect.left))-20,Math.max(...w.map(S=>S.rect.right))+20];for(let S of C){let k=p(b,T.segment,S);if(!(!k||!m(x,k,y))){x.points=k,v=!0;break}}if(v)break}if(!v)return}}function fB(e,t){let n=s(u=>{let h=u.groupTitleRect;if(!(!h||typeof h.left!="number"||typeof h.right!="number"||typeof h.top!="number"||typeof h.bottom!="number"||!Number.isFinite(h.left)||!Number.isFinite(h.right)||!Number.isFinite(h.top)||!Number.isFinite(h.bottom)||h.right<=h.left||h.bottom<=h.top))return{left:h.left,right:h.right,top:h.top,bottom:h.bottom}},"validTitleRect"),i=s(u=>{if(!u.isGroup||u.parentId)return;let h=u.direction,d=typeof h=="string"?h.toUpperCase():"";if(d==="LR"||d==="RL"||d==="BT")return;let f=n(u),p=u.y,m=u.height;if(!f||typeof p!="number"||typeof m!="number"||!Number.isFinite(p)||!Number.isFinite(m)||m<=0)return;let g=f.right-f.left,y=f.bottom-f.top;if(!(y<=0||g{if(!u.horizontal)return!1;let d=u.a.y;return d<=h.top+ir||d>=h.bottom-ir?!1:xs(u.a.x,u.b.x,h.left,h.right)>=$a},"horizontalSegmentIntersectsTitle"),o=[...t.values()].map(i).filter(u=>!!u);if(o.length===0)return;let l=0;for(let u of e){if(u.isLayoutOnly)continue;let h=rn(u.points??[]);for(let d of Qr(h))for(let f of o)a(d,f.rect)&&(l=Math.max(l,f.rect.bottom-d.a.y+4))}if(!(l<=ir))for(let u of o){let h=u.node.y,d=u.node.height;typeof h!="number"||typeof d!="number"||!Number.isFinite(h)||!Number.isFinite(d)||d<=0||(u.node.y=h-l/2,u.node.height=d+l,u.node.groupTitleRect={...u.rect,top:u.rect.top-l,bottom:u.rect.bottom-l})}}function pB(e,t){let n=s(h=>{let d=h.groupTitleRect;if(!(!d||typeof d.left!="number"||typeof d.right!="number"||typeof d.top!="number"||typeof d.bottom!="number"||!Number.isFinite(d.left)||!Number.isFinite(d.right)||!Number.isFinite(d.top)||!Number.isFinite(d.bottom)||d.right<=d.left||d.bottom<=d.top))return{left:d.left,right:d.right,top:d.top,bottom:d.bottom}},"validTitleRect"),i=s(h=>{if(!h.isGroup||h.parentId||h.direction!=="LR")return;let f=n(h),p=h.x,m=h.width;if(!f||typeof p!="number"||typeof m!="number"||!Number.isFinite(p)||!Number.isFinite(m)||m<=0)return;let g=f.right-f.left,y=f.bottom-f.top;if(!(g<=0||y{if(!h.vertical)return!1;let f=h.a.x;return f<=d.left+ir||f>=d.right-ir?!1:xs(h.a.y,h.b.y,d.top,d.bottom)>=$a},"verticalSegmentIntersectsTitle"),o=s((h,d)=>{if(!h.horizontal)return!1;let f=h.a.y;return f<=d.top+ir||f>=d.bottom-ir?!1:xs(h.a.x,h.b.x,d.left,d.right)>=$a},"horizontalSegmentIntersectsTitle"),l=[...t.values()].map(i).filter(h=>!!h);if(l.length===0)return;let u=0;for(let h of e){if(h.isLayoutOnly)continue;let d=rn(h.points??[]);for(let f of Qr(d))for(let p of l)if(a(f,p.rect))u=Math.max(u,p.rect.right-f.a.x+4);else if(o(f,p.rect)){let m=Math.min(f.a.x,f.b.x);u=Math.max(u,p.rect.right-m+4)}}if(!(u<=ir))for(let h of l){let d=h.node.x,f=h.node.width;typeof d!="number"||typeof f!="number"||!Number.isFinite(d)||!Number.isFinite(f)||f<=0||(h.node.x=d-u/2,h.node.width=f+u,h.node.groupTitleRect={...h.rect,left:h.rect.left-u,right:h.rect.right-u})}}function f1e(e,t){let{realNodeRects:i}=yu(t.values()),a=e.filter(y=>!y.isLayoutOnly),o=s((y,v=new Map)=>rn(v.get(y)??y.points??[]),"replacementPointsFor"),l=s((y=new Map)=>{let v=0;for(let x=0;xa.reduce((v,x)=>v+yo(o(x,y)),0),"totalBends"),h=s(y=>{let v=o(y);if(v.length<4)return;let x=v[v.length-2],b=v[v.length-1];if(!(!ki(x,b,ir)&&!Ei(x,b,ir)))return{tailStart:x,terminal:b}},"terminalTailFor"),d=s((y,v)=>{let x=o(y);if(x.length<3)return;let b=x[0],T=x[1],w;if(ki(b,T,ir))w={x:T.x,y:v.tailStart.y};else if(Ei(b,T,ir))w={x:v.tailStart.x,y:T.y};else return;let C=kl(rn([b,T,w,v.tailStart,v.terminal]));return Qr(C).length===C.length-1?C:void 0},"candidateWithDestinationTail"),f=s((y,v)=>{let x=[y.start,y.end].filter(b=>!!b);for(let b of Qr(v))if(Qn(b.a,b.b,i,x,-2))return!0;return!1},"pathHasNodeHit"),p=s((y,v,x)=>{for(let b of a)if(b!==y){for(let T of Qr(v))for(let w of Qr(o(b,x)))if(hc(T,w,.5)>=$a)return!0}return!1},"pathHasSharedTrack"),m=s((y,v,x)=>!f(y,v)&&!p(y,v,x),"candidateIsSafe"),g=s(()=>{let y=new Map;for(let v of a){let x=v.end;if(!x||!t.has(x)||o(v).length<4)continue;let T=y.get(x)??[];T.push(v),y.set(x,T)}return y},"edgesByDestination");for(let y=0;y<4;y++){let v=l();if(v===0)return;let x=u(),b,T=v,w=x;for(let C of g().values())for(let S=0;S=v||D>T||D===T&&L>=w||(b=I,T=D,w=L)}if(!b)return;for(let[C,S]of b)C.points=S}}function p1e(e,t){let{realNodeRects:o,labelNodeRects:l}=yu(t.values()),u=e.filter(C=>!C.isLayoutOnly),h=s((C,S=new Map)=>rn(S.get(C)??C.points??[]),"replacementPointsFor"),d=s((C=new Map)=>{let S=0;for(let k=0;ku.reduce((S,k)=>S+yo(h(k,C)),0),"totalBends"),p=s(C=>{let S=C.start,k=C.end,R=S?t.get(S):void 0,M=k?t.get(k):void 0,P=R?Ba(R):void 0,N=M?Ba(M):void 0;return P&&N?{src:P,dst:N}:void 0},"endpointRectsFor"),m=s((C,S,k)=>{if(k.index<=0||k.index+1>=S.length-1)return;let R=p(C);if(R){if(k.vertical){let M=k.a.x,P=Math.min(R.src.left,R.dst.left),N=Math.max(R.src.right,R.dst.right),_=MN+ir?"right":void 0;return _?{edge:C,points:S,segmentIndex:k.index,axis:"vertical",side:_,coord:M,min:Math.min(k.a.y,k.b.y),max:Math.max(k.a.y,k.b.y)}:void 0}if(k.horizontal){let M=k.a.y,P=Math.min(R.src.top,R.dst.top),N=Math.max(R.src.bottom,R.dst.bottom),_=MN+ir?"bottom":void 0;return _?{edge:C,points:S,segmentIndex:k.index,axis:"horizontal",side:_,coord:M,min:Math.min(k.a.x,k.b.x),max:Math.max(k.a.x,k.b.x)}:void 0}}},"externalRailForSegment"),g=s(()=>{let C=[];for(let S of u){let k=h(S);for(let R of Qr(k)){let M=m(S,k,R);M&&C.push(M)}}return C},"collectExternalRails"),y=s((C,S)=>C.edge!==S.edge&&C.axis===S.axis&&C.side===S.side&&xs(C.min,C.max,S.min,S.max)>=$a,"railsInteract"),v=s(C=>{let S=[],k=new Set;for(let R of C){if(k.has(R))continue;let M=[R],P=[];for(k.add(R);M.length>0;){let N=M.pop();P.push(N);for(let _ of C)!k.has(_)&&y(N,_)&&(k.add(_),M.push(_))}P.length>1&&S.push(P)}return S},"connectedComponents"),x=s(C=>{let S=[];for(let k of C)S.some(R=>Math.abs(R-k.coord){let S=C.map(M=>M.coord),k=x(C),R=[];if(C.length<=6){let M=new Array(k.length).fill(!1),P=[],N=s(()=>{if(P.length===C.length){P.some((_,A)=>Math.abs(_-S[A])>=ir)&&R.push([...P]);return}for(let[_,A]of k.entries())M[_]||(M[_]=!0,P.push(A),N(),P.pop(),M[_]=!1)},"visit");return N(),R}for(let M=0;M{let k=new Map;for(let[M,P]of C.entries()){let N=S[M],_=k.get(P.edge)??P.points.map(A=>({x:A.x,y:A.y}));P.axis==="vertical"?(_[P.segmentIndex].x=N,_[P.segmentIndex+1].x=N):(_[P.segmentIndex].y=N,_[P.segmentIndex+1].y=N),k.set(P.edge,_)}let R=new Map;for(let[M,P]of k){let N=kl(rn(P));if(Qr(N).length!==N.length-1)return;R.set(M,N)}return R},"replacementsForAssignment"),w=s(C=>{for(let[S,k]of C){let R=[S.start,S.end].filter(M=>!!M);for(let M of Qr(k))if(Qn(M.a,M.b,o,R,-2)||Qn(M.a,M.b,l,[],-2))return!1}for(let S=0;S=$a)return!1}}return!0},"candidateIsSafe");for(let C=0;C<4;C++){let S=d();if(S===0)return;let k,R=S,M=f(),P=Number.POSITIVE_INFINITY;for(let N of v(g()))for(let _ of b(N)){let A=T(N,_);if(!A||!w(A))continue;let I=d(A);if(I>=S)continue;let D=f(A),L=N.reduce((B,O,$)=>B+Math.abs(_[$]-O.coord),0);I>R||I===R&&(D>M||D===M&&L>=P)||(k=A,R=I,M=D,P=L)}if(!k)return;for(let[N,_]of k)N.points=_}}function m1e(e,t){let{realNodeRects:i,labelNodeRects:a}=yu(t.values()),o=e.filter(g=>!g.isLayoutOnly),l=s((g,y,v)=>rn(g===y?v??[]:g.points??[]),"pointsFor"),u=s(g=>Qr(g).reduce((y,v)=>{let x=v.a.x-v.b.x,b=v.a.y-v.b.y;return y+Math.hypot(x,b)},0),"pathLength"),h=s((g,y)=>{let v=0;for(let x=0;x{if(g.horizontal){let v=g.a.y;return(Math.abs(v-y.top)<1||Math.abs(v-y.bottom)<1)&&xs(g.a.x,g.b.x,y.left,y.right)>=$a}if(g.vertical){let v=g.a.x;return(Math.abs(v-y.left)<1||Math.abs(v-y.right)<1)&&xs(g.a.y,g.b.y,y.top,y.bottom)>=$a}return!1},"segmentRunsAlongRectBorder"),f=s(g=>{let y=[g.start,g.end].filter(x=>!!x),v=[];for(let x of y){let b=t.get(x),T=b?Ba(b):void 0;T&&v.push(T)}return v},"endpointRectsFor"),p=s((g,y)=>{if(y+3>=g.length)return[];let v=g[y],x=g[y+1],b=g[y+2],T=g[y+3],w=ki(v,x,ir)&&Ei(x,b,ir)&&ki(b,T,ir),C=Ei(v,x,ir)&&ki(x,b,ir)&&Ei(b,T,ir);if(!w&&!C)return[];if(!(w?Math.sign(x.x-v.x)!==Math.sign(T.x-b.x):Math.sign(x.y-v.y)!==Math.sign(T.y-b.y)))return[];let k=tn(v,T,ir)||an(v,T,ir)?[]:[{x:v.x,y:T.y},{x:T.x,y:v.y}],R=k.length===0?[[...g.slice(0,y+1),...g.slice(y+3)]]:k.map(P=>[...g.slice(0,y+1),P,...g.slice(y+3)]),M=new Set;return R.map(P=>kl(rn(P))).filter(P=>{if(Qr(P).length!==P.length-1||!P.some(_=>go(_,T,ir)))return!1;let N=P.map(_=>`${_.x.toFixed(3)},${_.y.toFixed(3)}`).join("|");return M.has(N)?!1:(M.add(N),!0)})},"shortcutCandidatesAt"),m=s((g,y,v)=>{let x=[g.start,g.end].filter(T=>!!T),b=f(g);for(let T of Qr(y))if(Qn(T.a,T.b,i,x,-2)||Qn(T.a,T.b,a,[],-2)||b.some(w=>d(T,w)))return!1;for(let T of o)if(T!==g){for(let w of Qr(y))for(let C of Qr(l(T)))if(hc(w,C,.5)>=$a)return!1}return h(g,y)<=v},"candidateIsSafe");for(let g=0;g<8;g++){let y=h(),v,x,b=y,T=Number.POSITIVE_INFINITY,w=Number.POSITIVE_INFINITY;for(let C of o){let S=l(C),k=yo(S,ir),R=u(S);for(let M=0;M<=S.length-4;M++)for(let P of p(S,M)){let N=yo(P,ir),_=u(P);if(!(Nb||I===b&&(N>T||N===T&&_>=w)||(v=C,x=P,b=I,T=N,w=_)}}if(!v||!x)return;v.points=x}}function g1e(e,t){let o=[];for(let ye of t.values()){if(ye.isGroup||ye.isEdgeLabel)continue;let Be=ye.x??0,Ie=ye.y??0,Ne=Ba(ye);Ne&&o.push({id:String(ye.id??""),cx:Be,cy:Ie,rect:Ne})}if(o.length===0)return;let l=new Map(o.map(ye=>[ye.id,ye])),u=o.map(ye=>({id:ye.id,rect:ye.rect})),h=["top","bottom","left","right"],d={top:Math.min(...o.map(ye=>ye.rect.top))-20,bottom:Math.max(...o.map(ye=>ye.rect.bottom))+20,left:Math.min(...o.map(ye=>ye.rect.left))-20,right:Math.max(...o.map(ye=>ye.rect.right))+20},f=e.filter(ye=>!ye.isLayoutOnly),p=new Map(f.map((ye,Be)=>[ye,Be])),m=s(ye=>{let Be=ye==="left"||ye==="top"?-1:1,Ie=[];for(let Ne=0;Ne<=2;Ne++)Ie.push(d[ye]+Be*20*Ne);return Ie},"outwardTracksForSide"),g=s((ye,Be=new Map)=>rn(Be.get(ye)??ye.points??[]),"replacementPointsFor"),y=s((ye,Be)=>{let Ie=0;for(let Ne of ye)for(let re of Be)dc(Ne.a,Ne.b,re.a,re.b,ir)&&Ie++;return Ie},"crossingCountBetweenSegments"),v=s((ye,Be)=>y(Qr(ye),Qr(Be)),"crossingCountBetweenPaths"),x=s((ye=new Map)=>{let Be=0,Ie=[],Ne=new Set,re=[],ue=s(le=>{Ne.has(le)||(Ne.add(le),re.push(le))},"addEdge");for(let le=0;le0&&(Be+=X,Ie.push({first:he,second:G,count:X}),ue(he),ue(G))}}return re.sort((le,he)=>(p.get(le)??0)-(p.get(he)??0)),{count:Be,pairs:Ie,edgeSet:Ne,edges:re}},"crossingSnapshot"),b=s((ye,Be)=>{let Ie=new Set(Be.keys());if(Ie.size===0)return ye.count;let Ne=0;for(let ue of ye.pairs)(Ie.has(ue.first)||Ie.has(ue.second))&&(Ne+=ue.count);let re=0;for(let ue=0;ue{let Be=new Map;for(let re of ye.pairs){let ue=Be.get(re.first)??new Set;ue.add(re.second),Be.set(re.first,ue);let le=Be.get(re.second)??new Set;le.add(re.first),Be.set(re.second,le)}let Ie=[],Ne=new Set;for(let re of ye.edges){if(Ne.has(re))continue;let ue=[re],le=[];for(Ne.add(re);ue.length>0;){let he=ue.pop();le.push(he);for(let Te of Be.get(he)??[])Ne.has(Te)||(Ne.add(Te),ue.push(Te))}le.sort((he,Te)=>(p.get(he)??0)-(p.get(Te)??0)),le.length>1&&Ie.push(le)}return Ie},"crossingComponents"),w=s(ye=>[ye.start,ye.end].filter(Be=>!!Be),"endpointIdsFor"),C=s(ye=>{let Be=[];for(let Ie of T(ye)){let Ne=new Set(Ie),re=new Set(Ie.flatMap(le=>w(le))),ue=[...Ie];for(let le of f)Ne.has(le)||w(le).some(he=>re.has(he))&&ue.push(le);ue.sort((le,he)=>(p.get(le)??0)-(p.get(he)??0)),Be.push(ue)}return Be},"pairSearchGroups"),S=s((ye,Be,Ie)=>b(ye,new Map([[Be,Ie]])),"crossingCountWithSingleReplacement"),k=s(ye=>{let Be=new Map;for(let Ie of ye.pairs)Be.set(Ie.first,(Be.get(Ie.first)??0)+Ie.count),Be.set(Ie.second,(Be.get(Ie.second)??0)+Ie.count);return Be},"currentCrossingsByEdge"),R=s(ye=>ye.slice(1).reduce((Be,Ie,Ne)=>{let re=ye[Ne];return Be+Math.abs(Ie.x-re.x)+Math.abs(Ie.y-re.y)},0),"pathLength"),M=s((ye=new Map)=>f.reduce((Be,Ie)=>Be+yo(g(Ie,ye)),0),"totalBends"),P=s((ye=new Map)=>f.reduce((Be,Ie)=>Be+R(g(Ie,ye)),0),"totalLength"),N=s((ye,Be,Ie=new Map)=>{let Ne=Qr(Be);for(let re of f)if(re!==ye){for(let ue of Ne)for(let le of Qr(g(re,Ie)))if(hc(ue,le,.5)>=$a)return!0}return!1},"pathHasSegmentConflict"),_=s((ye,Be)=>{let Ie=[ye.start,ye.end].filter(Ne=>!!Ne);for(let Ne of Qr(Be))if(Qn(Ne.a,Ne.b,u,Ie,-2))return!0;return!1},"pathHitsNode"),A=s((ye,Be)=>{let Ie=kl(rn(Be));Qr(Ie).length===Ie.length-1&&ye.push(Ie)},"pushOrthogonalCandidate"),I=s(ye=>ye==="left"||ye==="right","sideIsHorizontal"),D=s((ye,Be,Ie)=>{switch(Be){case"left":return Math.min(ye.x,Ie.x)-20;case"right":return Math.max(ye.x,Ie.x)+20;case"top":return Math.min(ye.y,Ie.y)-20;case"bottom":return Math.max(ye.y,Ie.y)+20}},"localTrackForSameSide"),L=s((ye,Be,Ie,Ne)=>{let re=Ie==="left"||Ie==="top"?-1:1,ue=[D(Be,Ie,Ne),d[Ie]];for(let le of ue)for(let he=0;he<=2;he++)A(ye,Q3(Be,Ie,Ne,le+re*20*he))},"addSameSideCandidates"),B=s((ye,Be,Ie,Ne,re)=>{for(let ue of m(Ie))for(let le of m(re))A(ye,[Be,{x:ue,y:Be.y},{x:ue,y:le},{x:Ne.x,y:le},Ne])},"addHorizontalToVerticalCandidates"),O=s((ye,Be,Ie,Ne,re)=>{for(let ue of m(Ie))for(let le of m(re))A(ye,[Be,{x:Be.x,y:ue},{x:le,y:ue},{x:le,y:Ne.y},Ne])},"addVerticalToHorizontalCandidates"),$=s((ye,Be,Ie,Ne,re)=>{let ue=[...m("top"),...m("bottom")];for(let le of m(Ie))for(let he of m(re))for(let Te of ue)A(ye,[Be,{x:le,y:Be.y},{x:le,y:Te},{x:he,y:Te},{x:he,y:Ne.y},Ne])},"addHorizontalPairCandidates"),W=s((ye,Be,Ie,Ne,re)=>{let ue=[...m("left"),...m("right")];for(let le of m(Ie))for(let he of m(re))for(let Te of ue)A(ye,[Be,{x:Be.x,y:le},{x:Te,y:le},{x:Te,y:he},{x:Ne.x,y:he},Ne])},"addVerticalPairCandidates"),V=s(ye=>{let Be=new Set;return ye.map(Ie=>rn(Ie)).filter(Ie=>{let Ne=Ie.map(re=>`${re.x.toFixed(3)},${re.y.toFixed(3)}`).join("|");return Be.has(Ne)||Ie.length<2?!1:(Be.add(Ne),!0)})},"dedupeCandidatePaths"),z=s((ye,Be,Ie,Ne)=>{let re=[],ue=Z3(ye,Be,Ie,Ne,20,ir);ue&&A(re,ue),Be===Ne&&L(re,ye,Be,Ie);let le=I(Be),he=I(Ne);return le&&!he?B(re,ye,Be,Ie,Ne):!le&&he?O(re,ye,Be,Ie,Ne):le?$(re,ye,Be,Ie,Ne):W(re,ye,Be,Ie,Ne),V(re)},"buildCandidatesForSides"),H=s((ye,Be,Ie,Ne)=>{let re=[...m("left"),...m("right")],ue=[...m("top"),...m("bottom")];for(let le of h){let he=If(Ne,le),Te=le==="top"||le==="bottom"?m(le):ue;for(let oe of re){A(ye,[Be,Ie,{x:oe,y:Ie.y},{x:oe,y:he.y},he]);for(let G of Te)A(ye,[Be,Ie,{x:oe,y:Ie.y},{x:oe,y:G},{x:he.x,y:G},he])}}},"addVerticalDepartureOuterTrackCandidates"),K=s((ye,Be,Ie,Ne)=>{let re=[...m("left"),...m("right")],ue=[...m("top"),...m("bottom")];for(let le of h){let he=If(Ne,le),Te=le==="left"||le==="right"?m(le):re;for(let oe of ue){A(ye,[Be,Ie,{x:Ie.x,y:oe},{x:he.x,y:oe},he]);for(let G of Te)A(ye,[Be,Ie,{x:Ie.x,y:oe},{x:G,y:oe},{x:G,y:he.y},he])}}},"addHorizontalDepartureOuterTrackCandidates"),J=s(ye=>{let Be=ye.start,Ie=ye.end,Ne=Ie?l.get(Ie):void 0;if(!Be||!Ne)return[];let re=rn(ye.points??[]);if(re.length<4)return[];let ue=re[0],le=re[1],he=[];return Ei(ue,le,ir)?H(he,ue,le,Ne):ki(ue,le,ir)&&K(he,ue,le,Ne),he},"terminalPreservingOuterTrackCandidates"),ne=s(ye=>{let Be=ye.start,Ie=ye.end,Ne=Be?l.get(Be):void 0,re=Ie?l.get(Ie):void 0;if(!Ne||!re)return[];let ue=[];for(let le of h){let he=If(Ne,le);for(let Te of h)ue.push(...z(he,le,If(re,Te),Te))}return ue.push(...J(ye)),ue},"candidatePathsFor"),Z=s(()=>new Map(f.map(ye=>[ye,Qr(g(ye))])),"currentSegmentsByEdge"),pe=s((ye,Be,Ie)=>{let Ne=new Set;for(let re of f){if(re===ye)continue;let ue=Ie.get(re)??Qr(g(re));Be.some(le=>ue.some(he=>hc(le,he,.5)>=$a))&&Ne.add(re)}return Ne},"sharedTrackConflictsFor"),te=s((ye,Be,Ie,Ne)=>{let re=new Set;return ne(ye).map(le=>kl(rn(le))).filter(le=>{if(_(ye,le))return!1;let he=le.map(Te=>`${Te.x.toFixed(3)},${Te.y.toFixed(3)}`).join("|");return re.has(he)||le.length<2?!1:(re.add(he),!0)}).map(le=>{let he=Qr(le),Te=0;for(let oe of f)oe!==ye&&(Te+=y(he,Ie.get(oe)??Qr(g(oe))));return{candidate:le,candidateSegments:he,crossings:Be.count-(Ne.get(ye)??0)+Te,bends:yo(le,ir),totalBends:yo(le),length:R(le)}}).filter(({crossings:le})=>le<=Be.count).sort((le,he)=>le.crossings-he.crossings||le.bends-he.bends||le.length-he.length).slice(0,48).map(le=>({path:le.candidate,segments:le.candidateSegments,sharedTrackConflicts:pe(ye,le.candidateSegments,Ie),totalBends:le.totalBends,length:le.length}))},"pairCandidatesFor"),fe=s((ye,Be,Ie,Ne,re,ue)=>{let le=0;for(let Te of ye.pairs)(Te.first===Be||Te.second===Be||Te.first===Ne||Te.second===Ne)&&(le+=Te.count);let he=y(Ie.segments,re.segments);for(let Te of f){if(Te===Be||Te===Ne)continue;let oe=ue.get(Te)??Qr(g(Te));he+=y(Ie.segments,oe)+y(re.segments,oe)}return ye.count-le+he},"pairCrossingCount"),ce=s((ye,Be)=>{for(let Ie of ye.sharedTrackConflicts)if(Ie!==Be)return!1;return!0},"conflictsOnlyWith"),de=s((ye,Be)=>ye.segments.some(Ie=>Be.segments.some(Ne=>hc(Ie,Ne,.5)>=$a)),"candidatesShareTrack"),Ee=s((ye,Be,Ie,Ne)=>ce(Be,Ie.edge)&&ce(Ne,ye.edge)&&!de(Be,Ne),"pairCandidatesAreCompatible"),we=s((ye,Be,Ie,Ne,re)=>{let ue=fe(ye.current,Be.edge,Ie,Ne.edge,re,ye.baseSegments);if(!(ue>=ye.current.count))return{replacements:new Map([[Be.edge,Ie.path],[Ne.edge,re.path]]),crossings:ue,bends:ye.currentBends-(ye.baseBendsByEdge.get(Be.edge)??0)-(ye.baseBendsByEdge.get(Ne.edge)??0)+Ie.totalBends+re.totalBends,length:ye.currentLength-(ye.baseLengthByEdge.get(Be.edge)??0)-(ye.baseLengthByEdge.get(Ne.edge)??0)+Ie.length+re.length}},"scorePairReplacement"),Fe=s((ye,Be)=>ye.crossings{let re=Ne;for(let ue of Be.candidates)for(let le of Ie.candidates){if(!Ee(Be,ue,Ie,le))continue;let he=we(ye,Be,ue,Ie,le);he&&Fe(he,re)&&(re=he)}return re},"bestScoreForOptionPair"),He=s(ye=>{let Be=M(),Ie=P(),Ne=Z(),re=k(ye),ue=new Map(f.map(X=>[X,yo(g(X))])),le=new Map(f.map(X=>[X,R(g(X))])),he=new Map,Te=C(ye);for(let X of Te)for(let ee of X){if(he.has(ee))continue;let q=te(ee,ye,Ne,re);q.length>0&&he.set(ee,{edge:ee,candidates:q})}let oe={replacements:new Map,crossings:ye.count,bends:Be,length:Ie},G={current:ye,currentBends:Be,currentLength:Ie,baseBendsByEdge:ue,baseLengthByEdge:le,baseSegments:Ne};for(let X of Te){let ee=new Set(X.filter(ie=>ye.edgeSet.has(ie))),q=X.map(ie=>he.get(ie)).filter(ie=>!!ie);for(let ie=0;ie0?oe.replacements:void 0},"bestPairedReplacement");for(let ye=0;ye<4;ye++){let Be=x(),Ie=Be.count;if(Ie===0)return;let Ne,re,ue=Ie,le=Number.POSITIVE_INFINITY;for(let Te of Be.edges){let oe=yo(g(Te),ir);for(let G of ne(Te)){let X=_(Te,G),ee=!X&&N(Te,G),q=S(Be,Te,G),ie=yo(G,ir);X||ee||!(que||q===ue&&ie>=le||(Ne=Te,re=G,ue=q,le=ie)}}if(Ne&&re){Ne.points=re;continue}let he=He(Be);if(!he)return;for(let[Te,oe]of he)Te.points=oe}}var ir,$a,Qr,hB,y1e=F(()=>{"use strict";fc();ir=.001,$a=8,Qr=Df,hB=s((e,t)=>tn(e,t,ir)||an(e,t,ir),"orthogonallyAligned");s(h1e,"separateSharedRenderedTerminalLanes");s(d1e,"collapseRedundantRectangularDoglegs");s(dB,"liftObstacleHuggingSameSideRails");s(fB,"liftTopLaneTitleBandsAboveRails");s(pB,"shiftLeftLaneTitleBandsLeftOfRails");s(f1e,"swapDestinationTerminalTailsToReduceCrossings");s(p1e,"reassignCrossingExternalRailChannels");s(m1e,"shortcutRedundantOrthogonalJogs");s(g1e,"resolveRenderedOrthogonalCrossings")});function v1e(e,t){let{nodeInfoById:r,realNodeRects:n}=m1(t),i=["top","bottom","left","right"],a=20,o={top:Math.min(...n.map(y=>y.rect.top))-a,bottom:Math.max(...n.map(y=>y.rect.bottom))+a,left:Math.min(...n.map(y=>y.rect.left))-a,right:Math.max(...n.map(y=>y.rect.right))+a},l=s((y,v,x,b)=>{let T=[],w=Z3(y,v,x,b,a,Mf);return w&&T.push(w),v===b&&T.push(Q3(y,v,x,o[v])),T},"buildOrthogonalPathCandidates"),u=s((y,v)=>{for(let x=0;x{let b=0,T=Df(y,Mf),w=v.start,C=v.end;for(let S of e){if(S===v||S.isLayoutOnly)continue;let k=S.start,R=S.end;if(!x&&w&&C&&(k===w||k===C||R===w||R===C))continue;let M=S.points;if(!(!M||M.length<2))for(let P of T)for(let N of Df(M,Mf)){if(aB(P.a,P.b,N.a,N.b,Mf,Mf)){b++;continue}hc(P,N,Mf)>=zlt&&b++}}return b},"pathConflictCount"),d=4,f=s((y,v)=>{let x=Math.abs(y.y-v.rect.top),b=Math.abs(y.y-v.rect.bottom),T=Math.abs(y.x-v.rect.left),w=Math.abs(y.x-v.rect.right),C="top",S=x;return b{let b=p.get(y)??[];b.push({side:v,edgeId:x}),p.set(y,b)},"addFaceClaim");for(let y of e){if(y.isLayoutOnly)continue;let v=y.points??[];if(v.length<1)continue;let x=y.id??"",b=y.start,T=y.end;if(b){let w=r.get(b);w&&m(b,f(v[0],w),x)}if(T){let w=r.get(T);w&&m(T,f(v[v.length-1],w),x)}}let g=s((y,v,x)=>p.get(y)?.some(b=>b.edgeId!==x&&b.side===v)??!1,"faceIsClaimed");for(let y of e){if(y.isLayoutOnly)continue;let v=y.points;if(!v||v.length<2)continue;let x=yo(v,Mf);if(x0){let O=h(L,y,!0);if(O>P||O===P&&B>=N)continue;P=O,N=B,M=L;continue}h(L,y)>R||BI.edgeId!==S));let A=p.get(T);A&&p.set(T,A.filter(I=>I.edgeId!==S)),m(b,f(M[0],w),S),m(T,f(M[M.length-1],C),S)}}}var Mf,zlt,x1e=F(()=>{"use strict";fc();Mf=.001,zlt=8;s(v1e,"simplifyDetouredEdges")});function T1e(e,t){let r=t?0:e.length-1,n=t?1:-1,i=e[r],a=e[r+n];if(!i||!a)return;let o=a.x-i.x,l=a.y-i.y;if(!(Math.abs(o)+Math.abs(l)a&&K3(e,Vlt(a)))}function n5(e,t){let r=[];for(let g of e){if(g.isLayoutOnly)continue;let y=g.points;if(!(!y||y.length<2))for(let v=0;v{let v=iB(y,a);for(let{nodeId:x,rect:b}of n)if(x!==g&&K3(v,b))return!0;return!1},"labelOverlapsForeignNode"),h=s((g,y)=>{let v=iB(y,a);for(let x of r)if(x.edgeId!==g&&gT(x.p1,x.p2,v))return!0;return!1},"labelOverlapsForeignEdge"),d=s((g,y,v)=>u(g,v)||h(y,v),"labelOverlapsAnything"),f=[],p=s(g=>{for(let{id:y,rect:v}of i)if(Fye(v,g))return y},"findContainingLane"),m=s((g,y)=>f.some(v=>v.labelId!==g&&K3(y,v.rect)),"overlapsPlacedLabel");for(let g of e){if(g.isLayoutOnly)continue;let y=g.labelNodeId;if(!y)continue;let v=t.get(y);if(!v)continue;let x=g.points;if(!x||x.length<2)continue;let b=v.width??0,T=v.height??0;if(b<=0||T<=0)continue;let w=[];for(let V=0;V=vo&&J>=vo||w.push({idx:V,length:K+J,orientation:K>=vo?"horizontal":"vertical",midX:(z.x+H.x)/2,midY:(z.y+H.y)/2})}if(w.length===0)continue;let C=w.length>=3?w.filter(V=>V.idx>0&&V.idx0?C:w,k=b>=T?"horizontal":"vertical",R=s(V=>[...V].sort((z,H)=>{let K=z.orientation===k,J=H.orientation===k;if(K!==J)return K?-1:1;let ne=z.length>=(z.orientation==="horizontal"?b:T)+2,Z=H.length>=(H.orientation==="horizontal"?b:T)+2;return ne!==Z?ne?-1:1:H.length-z.length}),"rankSegments"),M=w[0],P=w[w.length-1],N=[.5,.25,.75,.05,.95,.15,.85,.1,.9],_=s((V,z)=>{let H=x[V.idx],K=x[V.idx+1];return{midX:H.x+(K.x-H.x)*z,midY:H.y+(K.y-H.y)*z}},"anchorAtT"),A=s((V,z,H)=>Math.min(H,Math.max(z,V)),"clamp"),I=s((V,z)=>V.midX>=z.left-vo&&V.midX<=z.right+vo&&V.midY>=z.top-vo&&V.midY<=z.bottom+vo,"pointInsideRectInclusive"),D=s(V=>{let z=p1(V.midX,V.midY,b,T),H=p(z);if(H)return{laneId:H,anchor:V,rect:z};let K=i.find(({rect:ce})=>I(V,ce));if(!K)return;let J=K.rect.left+b/2+o,ne=K.rect.right-b/2-o,Z=K.rect.top+T/2+o,pe=K.rect.bottom-T/2-o;if(J>ne||Z>pe)return;let te={midX:A(V.midX,J,ne),midY:A(V.midY,Z,pe)},fe=p1(te.midX,te.midY,b,T);return I(V,fe)?{laneId:K.id,anchor:te,rect:fe}:void 0},"placementForAnchor"),L=s((V,z,H)=>V.orientation==="horizontal"?Math.abs(z.midX-H.x):Math.abs(z.midY-H.y),"distanceAlongSegment"),B=s((V,z)=>{let K=(V.orientation==="horizontal"?b/2:T/2)+l;if(V===M){let J=x[V.idx];if(L(V,z,J)+vo{let z=R(V);for(let H of z)for(let K of N){let J=_(H,K);if(!B(H,J))continue;let ne=D(J);if(ne&&!C1e(ne.rect,x)&&!m(y,ne.rect)&&!d(y,g.id,ne.rect))return{laneId:ne.laneId,anchor:ne.anchor}}},"tryPool"),$=s((V,z,H=!1)=>{let K=R(V);for(let J of K){let ne={midX:J.midX,midY:J.midY};if(z&&!B(J,ne))continue;let Z=D(ne);if(Z&&!C1e(Z.rect,x)&&!m(y,Z.rect)&&!u(y,Z.rect)&&(H||!h(g.id,Z.rect)))return{laneId:Z.laneId,anchor:Z.anchor}}},"findLaneContainingFallback"),W=O(S)??(S.lengthH.labelId===y);z>=0?f[z]={labelId:y,rect:V}:f.push({labelId:y,rect:V})}}}var vo,b1e,r5,S1e=F(()=>{"use strict";fc();vo=.001,b1e=10,r5=7;s(T1e,"markerClearanceRectFor");s(Vlt,"normalizeRect");s(C1e,"labelOverlapsOwnMarker");s(n5,"anchorLabelsToPolyline")});function k1e(e,t){return e{let d=k1e(l,u),f=0,p=s(m=>{if(!m)return;let g=i.get(m);if(!g)return;let y=h==="x"?g.w/2:g.h/2;y>f&&(f=y)},"consider");p(o.labelNodeId);for(let m of e){if(m===o||m.isLayoutOnly)continue;let g=m.start,y=m.end;!g||!y||k1e(g,y)===d&&p(m.labelNodeId)}return f>0?f+qlt:0},"labelClearanceFor");for(let o of e){if(o.isLayoutOnly)continue;let l=o.points;if(!j3(l,mB))continue;let u=J3(o,r,mB);if(!u)continue;let{srcId:h,dstId:d,srcInfo:f,dstInfo:p,collinearX:m,collinearY:g}=u;if(m===g)continue;let y,v;if(m){let C=p.cy>f.cy;y={x:f.cx,y:C?f.rect.bottom:f.rect.top},v={x:p.cx,y:C?p.rect.top:p.rect.bottom}}else{let C=p.cx>f.cx;y={x:C?f.rect.right:f.rect.left,y:f.cy},v={x:C?p.rect.left:p.rect.right,y:p.cy}}if(Qn(y,v,n,[h,d],1))continue;let b=a(o,h,d,m?"x":"y"),T=b>w1e?b:w1e,w=[0,T,-T];for(let C of w){let S={...y},k={...v};if(m){if(S.x+=C,k.x+=C,S.x<=f.rect.left||S.x>=f.rect.right||k.x<=p.rect.left||k.x>=p.rect.right)continue}else if(S.y+=C,k.y+=C,S.y<=f.rect.top||S.y>=f.rect.bottom||k.y<=p.rect.top||k.y>=p.rect.bottom)continue;if(!Qn(S,k,n,[h,d],1)&&!yT(S,k,e,o,{epsilon:mB})){o.points=[S,k];break}}}}var mB,Wlt,w1e,qlt,A1e=F(()=>{"use strict";fc();mB=1e-6,Wlt=8,w1e=Wlt/2,qlt=3;s(k1e,"pairKey");s(E1e,"straightenCollinearSiblingDetours")});function gB(e,t){let{realNodeRects:h,labelNodeRects:d}=yu(t.values()),f=s((S,k)=>Df(k,.001).map(R=>({...R,edge:S,interior:R.index>=1&&R.index<=k.length-3})),"segmentsFor"),p=s(()=>{let S=[];for(let k of e){if(k.isLayoutOnly)continue;let R=k.points;!R||R.length<2||S.push(...f(k,rn(R)))}return S},"allSegments"),m=s((S,k)=>S.horizontal&&k.horizontal?xs(S.a.x,S.b.x,k.a.x,k.b.x)>=8&&Math.abs(S.a.y-k.a.y)<7:S.vertical&&k.vertical?xs(S.a.y,S.b.y,k.a.y,k.b.y)>=8&&Math.abs(S.a.x-k.a.x)<7:!1,"hasCrowdedParallelTrack"),g=s((S,k)=>{let R=S.start,M=S.end,P=f(S,k);if(P.length!==k.length-1)return!1;let N=[R,M].filter(A=>!!A),_=S.labelNodeId?[S.labelNodeId]:[];for(let A of P)if(Qn(A.a,A.b,h,N,-2)||Qn(A.a,A.b,d,_,-2))return!1;for(let A of e){if(A===S||A.isLayoutOnly)continue;let I=A.points;if(!(!I||I.length<2)){for(let D of P)for(let L of f(A,rn(I)))if(m(D,L)||dc(D.a,D.b,L.a,L.b,.001))return!1}}return!0},"candidateIsSafe"),y=s((S,k)=>{let R=rn(S.edge.points??[]);if(R.length<4||S.index>=R.length-1)return;let M=R.map(P=>({...P}));if(S.horizontal)M[S.index].y+=k,M[S.index+1].y+=k;else if(S.vertical)M[S.index].x+=k,M[S.index+1].x+=k;else return;return f(S.edge,M).length===M.length-1?M:void 0},"shiftedCandidate"),v=s((S,k)=>({x:S.x??(k.left+k.right)/2,y:S.y??(k.top+k.bottom)/2}),"nodeCenter"),x=s(S=>{let k=S.edge,R=rn(k.points??[]);if(R.length!==4||S.index!==1)return;let M=k.start?t.get(k.start):void 0,P=k.end?t.get(k.end):void 0,N=M?Ba(M):void 0,_=P?Ba(P):void 0,A=R.slice(S.index+2);if(!(!M||!P||!N||!_||A.length===0))return{sourceCenter:v(M,N),targetCenter:v(P,_),sourceRect:N,tail:A}},"sourceDetourContextFor"),b=s((S,k,R,M,P,N)=>{let _=M.y>=R.y,A=_?P.bottom:P.top,I=A+(_?20:-20);if(_&&S.b.y<=I+.001||!_&&S.b.y>=I-.001)return;let D=S.a.x+k;return rn([{x:R.x,y:A},{x:R.x,y:I},{x:D,y:I},{x:D,y:S.b.y},...N],.001)},"verticalSourceDetour"),T=s((S,k,R,M,P,N)=>{let _=M.x>=R.x,A=_?P.right:P.left,I=A+(_?20:-20);if(_&&S.b.x<=I+.001||!_&&S.b.x>=I-.001)return;let D=S.a.y+k;return rn([{x:A,y:R.y},{x:I,y:R.y},{x:I,y:D},{x:S.b.x,y:D},...N],.001)},"horizontalSourceDetour"),w=s((S,k)=>{let R=x(S);if(R){if(S.vertical)return b(S,k,R.sourceCenter,R.targetCenter,R.sourceRect,R.tail);if(S.horizontal)return T(S,k,R.sourceCenter,R.targetCenter,R.sourceRect,R.tail)}},"sourceDetourCandidate"),C=[-7,7,-14,14,-21,21];for(let S=0;S<12;S++){let k=p(),R=!1;for(let M=0;MI.interior);for(let I of A){for(let D of C){let L=y(I,D);if(L&&g(I.edge,L)){I.edge.points=L,R=!0;break}let B=w(I,D);if(B&&g(I.edge,B)){I.edge.points=B,R=!0;break}}if(R)break}}if(!R)return}}var R1e=F(()=>{"use strict";fc();s(gB,"nudgeSharedInteriorSubpaths")});function Hlt(e,t,r,n){let i=t.x-e.x,a=t.y-e.y,o=n.x-r.x,l=n.y-r.y,u=i*l-a*o;if(Math.abs(u)<1e-10)return!1;let h=r.x-e.x,d=r.y-e.y,f=(h*l-d*o)/u,p=(h*a-d*i)/u,m=.01;return f>m&&f<1-m&&p>m&&p<1-m}function yB(e){let t=e.nodes??[],r=e.edges??[],n=[];if(!r.length||!t.length)return n;let i=Gye(t),a=1,o=[];for(let u of r){if(u.isLayoutOnly)continue;let h=u.points;if(!h||h.length<2)continue;let d=u.start,f=u.end,p=u.labelNodeId,m=u.id??`${d}->${f}`;for(let g of i)if(!(g.nodeId===d||g.nodeId===f)&&!(p&&g.nodeId===p)){for(let y=0;y0){let u=n.filter(d=>d.type==="edge-node-overlap").length,h=n.filter(d=>d.type==="edge-edge-crossing").length;se.warn(`[SWIMLANE_VALIDATE] ${n.length} issue(s) detected: ${u} edge-node overlap(s), ${h} edge crossing(s)`);for(let d of n)se.warn(`[SWIMLANE_VALIDATE] ${d.type}: ${d.detail}`)}return n}var _1e=F(()=>{"use strict";St();fc();s(Hlt,"segmentsIntersect");s(yB,"validateSwimlanesLayout")});function L1e(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(l=>!l.isGroup);if((t==="LR"||t==="RL")&&i.length>0&&!a1e(e,t)||t==="BT"&&i.length>0&&!i1e(e))return;for(let l of n){if(l.isLayoutOnly)continue;let u=l.points;!u||u.length<2||(l.points=kl(vT(u)))}v1e(n,r),E1e(n,r),o1e(n,r);let a=new Map;for(let l of r)a.set(String(l.id),l);n5(n,a),Qye(n,a),c1e(n,a),gB(n,a),h1e(n,a),d1e(n,a),dB(n,a),f1e(n,a);let o=s(()=>{g1e(n,a),p1e(n,a),m1e(n,a),n5(n,a),cB(n,a),dB(n,a),n5(n,a),cB(n,a)},"finalizeRenderedEdges");o(),gB(n,a),o(),fB(n,a),pB(n,a),fB(n,a),pB(n,a)}var D1e=F(()=>{"use strict";e1e();fc();s1e();l1e();u1e();y1e();x1e();S1e();A1e();R1e();_1e();s(L1e,"postProcessSwimlaneLayout")});function xo(e){let t=new Map(e.nodeById),r=new Set,n=[];for(let a of e.edges){if(!t.has(a.src)||!t.has(a.dst))continue;let o=`${a.id}:${a.src}->${a.dst}`;r.has(o)||(r.add(o),n.push(a))}return{nodes:[...t.keys()],edges:n,layout:e.layout,nodeById:t}}function i5(e,t){return e.edges.filter(r=>r.dst===t)}function Ult(e){let t=new Map;for(let r of e.nodes)t.set(r,[]);for(let r of e.edges)t.get(r.src).push(r.dst);return t}function vB(e){let t=Ult(e);for(let r of t.values())r.sort((n,i)=>n.localeCompare(i));return t}function xB(e){let t=new Map;for(let r of e.nodes)t.set(r,0);for(let r of e.edges)t.set(r.dst,(t.get(r.dst)??0)+1);return t}function bB(e){return[...e.entries()].filter(([,t])=>t===0).map(([t])=>t).sort((t,r)=>t.localeCompare(r))}function g1(e,t=()=>!0){let r=new Map,n=new Map;for(let i of e.nodes)r.set(i,[]),n.set(i,[]);for(let i of e.edges)t(i)&&(n.get(i.src).push(i.dst),r.get(i.dst).push(i.src));return{preds:r,succs:n}}function a5(e,t,r,n){let i=0;for(let o of e.nodes)n?.skipGroups&&e.nodeById.get(o)?.isGroup||(i=Math.max(i,r[o]??0));let a=Array.from({length:i+1},()=>[]);for(let o of t)n?.skipGroups&&e.nodeById.get(o)?.isGroup||a[Math.max(0,r[o]??0)].push(o);return a}function Nf(e){let t=xB(e),r=bB(t),n=[],i=vB(e);for(;r.length;){let a=r.shift();n.push(a);for(let o of i.get(a)??[])if(t.set(o,(t.get(o)??0)-1),(t.get(o)??0)===0){let l=0;for(;l{if(i-n<=1)return 0;let a=n+i>>1,o=r(n,a)+r(a,i),l=n,u=a,h=n;for(;l=i||l{"use strict";s(xo,"normalizeGraph");s(i5,"incoming");s(Ult,"buildSuccessorMap");s(vB,"buildSortedSuccessorMap");s(xB,"buildInDegreeMap");s(bB,"sortedZeroInDegreeNodes");s(g1,"buildPredecessorSuccessorMaps");s(a5,"buildLayersFromRanks");s(Nf,"topoSortIfAcyclic");s(Hm,"buildLayerIndex");s(s5,"countInversions")});function I1e(e){let t=xo(e),r=new Map;for(let d of t.nodes)r.set(d,[]);for(let d of t.edges)r.get(d.src).push(d);for(let d of r.values())d.sort((f,p)=>f.dst===p.dst?f.id.localeCompare(p.id):f.dst.localeCompare(p.dst));let n=Object.create(null);for(let d of t.nodes)n[d]=0;let i=[],a=s(d=>{n[d]=1;for(let f of r.get(d)??[]){let p=f.dst;n[p]===0?a(p):n[p]===1&&i.push(f)}n[d]=2},"dfs"),o=[...t.nodes].sort((d,f)=>d.localeCompare(f));for(let d of o)n[d]===0&&a(d);let l=new Set(i.map(d=>`${d.id}:${d.src}->${d.dst}`)),u=t.edges.map(d=>l.has(`${d.id}:${d.src}->${d.dst}`)?{id:d.id,src:d.dst,dst:d.src,weight:d.weight,ref:d.ref}:d);return{acyclic:{nodes:[...t.nodes],edges:u,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:i}}var M1e=F(()=>{"use strict";vu();s(I1e,"removeCycles_DFS")});function Ylt(e){let t=new Map,r=s(n=>{if(t.has(n))return t.get(n);let i=e.nodeById.get(n);if(!i)return t.set(n,null),null;let a=i.parentId;if(!a)return t.set(n,null),null;let l=r(a)??a;return t.set(n,l),l},"resolve");for(let n of e.nodes)r(n);return t}function bs(e){let t=Ylt(e);return r=>t.get(r)??null}function o5(e){let t=[];for(let r of e.layout.nodes??[])r.isGroup&&!r.parentId&&t.push(r.id);return[...new Set(t)].reverse()}function l5(e,t){let r=o5(e);if(!t||t.length===0)return r;let n=new Set(r),i=new Set,a=[];for(let o of t)!n.has(o)||i.has(o)||(i.add(o),a.push(o));for(let o of r)i.has(o)||a.push(o);return a}var Nh=F(()=>{"use strict";s(Ylt,"buildTopLaneMap");s(bs,"createTopLaneResolver");s(o5,"buildTopLaneOrder");s(l5,"resolveTopLaneOrder")});var N1e,Um,TB,y1=F(()=>{"use strict";N1e={EPSILON:1e-6},Um={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},TB={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40}});function P1e(e,t){let r=xo(e),n=t?.laneOf??(()=>null),i=t?.rankHint,{preds:a}=g1(r);for(let C of a.values())C.sort((S,k)=>S.localeCompare(k));let o=Nf(r)??[...r.nodes].sort((C,S)=>C.localeCompare(S)),l=new Map;for(let[C,S]of o.entries())l.set(S,C);let u=new Map,h=new Map;for(let C of r.nodes)h.set(C,[]);for(let C of o){let S=(a.get(C)??[]).filter(k=>u.has(k));if(S.length>0){let k=jlt(C,S,{laneOf:n,rankHint:i,topoIndex:l});u.set(C,k),h.get(k).push(C)}else u.has(C)||u.set(C,null)}for(let C of r.nodes)u.has(C)||u.set(C,null);let d=new Set;for(let C of r.nodes)(u.get(C)??null)===null&&d.add(C);let f=[...d].sort((C,S)=>{let k=l.get(C)??0,R=l.get(S)??0;return k===R?C.localeCompare(S):k-R}),p=Xlt(r),m=new Map;for(let[C,S]of p.entries())m.set(C,[...S].sort((k,R)=>k.localeCompare(R)));let g=Klt(m),y=Zlt(m),v=new Map;for(let C of r.nodes)v.set(C,[]);for(let C of y)for(let S of C.nodes){let k=v.get(S);k?k.push(C.id):v.set(S,[C.id])}let x=[],b=[],T=new Set,w=s(C=>{if(!T.has(C)){T.add(C),x.push(C);for(let S of h.get(C)??[])w(S);b.push(C)}},"walk");for(let C of f)w(C);for(let C of o)w(C);return{parent:u,children:h,roots:f,componentOf:g,blocks:y,nodeBlocks:v,adjacency:m,preorder:x,postorder:b,topologicalOrder:o}}function jlt(e,t,r){let n=r.laneOf(e);return[...t].sort((a,o)=>{let l=r.laneOf(a),u=r.laneOf(o),h=l!=null&&l===n,d=u!=null&&u===n;if(h!==d)return h?-1:1;let f=r.rankHint?.[a],p=r.rankHint?.[o];if(f!=null&&p!=null&&f!==p)return p-f;let m=r.topoIndex.get(a)??0,g=r.topoIndex.get(o)??0;return m!==g?m-g:a.localeCompare(o)})[0]}function Xlt(e){let t=new Map;for(let r of e.nodes)t.set(r,new Set);for(let r of e.edges)t.get(r.src).add(r.dst),t.get(r.dst).add(r.src);return t}function Klt(e){let t=new Map,r=0;for(let n of e.keys()){if(t.has(n))continue;let i=[n];for(;i.length>0;){let a=i.pop();if(!t.has(a)){t.set(a,r);for(let o of e.get(a)??[])t.has(o)||i.push(o)}}r++}return t}function Zlt(e){let t=new Map,r=new Map,n=[],i=[],a=0,o=s((l,u)=>{t.set(l,++a),r.set(l,a);for(let h of e.get(l)??[])h!==u&&(t.has(h)?(t.get(h)??0)<(t.get(l)??0)&&(n.push([l,h]),r.set(l,Math.min(r.get(l)??a,t.get(h)??a))):(n.push([l,h]),o(h,l),r.set(l,Math.min(r.get(l)??a,r.get(h)??a)),(r.get(h)??0)>=(t.get(l)??0)&&i.push(Qlt(l,h,n,i.length))))},"visit");for(let l of e.keys())t.has(l)||o(l,null);return i}function Qlt(e,t,r,n){let i=[],a=new Set;for(;r.length>0;){let o=r.pop();if(i.push(o),a.add(o[0]),a.add(o[1]),o[0]===e&&o[1]===t||o[0]===t&&o[1]===e)break}return{id:n,edges:i,nodes:[...a]}}var O1e=F(()=>{"use strict";vu();s(P1e,"buildDrivingTree");s(jlt,"chooseParent");s(Xlt,"buildAdjacency");s(Klt,"assignComponents");s(Zlt,"computeBlocks");s(Qlt,"popBlock")});function B1e(e,t,r){let n=[...e.nodes],i=new Map;for(let[b,T]of n.entries())i.set(T,b);let a=n.length,o=new Array(a).fill(-1),l=new Array(a).fill(0),u=[],h=new Set;for(let b of n){let T=r.parent.get(b)??null,w=i.get(b);w!=null&&T==null&&(o[w]=-1,l[w]=0,h.has(b)||(h.add(b),u.push(b)))}for(;u.length>0;){let b=u.shift(),T=i.get(b);if(T==null)continue;let w=r.children.get(b)??[];for(let C of w){if(h.has(C))continue;let S=i.get(C);S!=null&&(o[S]=T,l[S]=l[T]+1,h.add(C),u.push(C))}}for(let b of n){if(h.has(b))continue;let T=i.get(b);T!=null&&(o[T]=-1,l[T]=0,h.add(b))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,a)))+1),f=Array.from({length:d},()=>new Array(a).fill(-1));for(let b=0;b{if(b===-1||T===-1)return-1;l[b]>C&1&&(b=f[C][b],b===-1))return-1;if(b===T)return b;for(let C=d-1;C>=0;C--){let S=f[C][b],k=f[C][T];S===-1||k===-1||S!==k&&(b=S,T=k)}return f[0][b]},"lcaIndex"),m=Array.from({length:a},()=>new Map);for(let b of e.edges){let T=b.src,w=b.dst,C=t[T],S=t[w];if(C==null||S==null||(C>S&&([T,w]=[w,T],[C,S]=[S,C]),C==null||S==null||C===S))continue;let k=i.get(T),R=i.get(w);if(k==null||R==null)continue;let M=p(k,R);if(M===-1)continue;let P=m[M];for(let N=C;N{if(T.size!==0)for(let[w,C]of T)b.set(w,(b.get(w)??0)+C)},"mergeInto"),v=new Set,x=s(b=>{let T=i.get(b);v.add(b);let w=T==null?void 0:m[T],C=w?new Map(w):new Map,S=r.children.get(b)??[];for(let k of S){let R=x(k),M=t[b];if(M!=null){let P=g.get(b);P||(P=new Map,g.set(b,P));let N=R.get(M)??0,_=t[k];_!=null&&_>M&&(N+=1),P.set(k,N)}y(C,R)}return C},"dfs");for(let b of r.roots)v.has(b)||x(b);for(let b of n)v.has(b)||x(b);return g}var $1e=F(()=>{"use strict";s(B1e,"computeSubtreeCrossCounts")});function F1e(e,t,r){let n=new Map,i=s(a=>{let o=r[a]??0,l=[...t.get(a)??[]];l.sort(CB(r));for(let u of l){i(u);let h=n.get(u);h!=null&&(o=Math.min(o,h))}n.set(a,o)},"annotate");for(let a of e)i(a);return n}function CB(e){return(t,r)=>{let n=e[t]??0,i=e[r]??0;return n===i?t.localeCompare(r):n-i}}function G1e(e,t,r,n){let i=0;for(let u of t){let h=r[u]??0;h>i&&(i=h)}let a=Array.from({length:i+1},()=>[]),o=new Set,l=s(u=>{if(o.has(u))return;o.add(u);let h=r[u]??0;a[h]||(a[h]=[]),a[h].push(u);for(let d of n(u))l(d)},"emit");for(let u of e)l(u);for(let u of t)if(!o.has(u)){let h=r[u]??0;a[h]||(a[h]=[]),a[h].push(u),o.add(u)}return a}function z1e(e){let t=[];for(let r of e){let n=new Set,i=[];for(let a of r)n.has(a)||(n.add(a),i.push(a));t.push(i)}return t}var V1e=F(()=>{"use strict";s(F1e,"annotateMinimumLayers");s(CB,"compareByRankThenId");s(G1e,"emitNodesInTreeOrder");s(z1e,"deduplicateLayers")});function Jlt(e,t,r,n){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,l=[],u=[],h=r.get(i);for(let d of a){let f=n.get(d)??o;f>o?l.push({child:d,min:f}):u.push(d)}return l.sort((d,f)=>d.min===f.min?d.child.localeCompare(f.child):d.min-f.min),u.sort((d,f)=>{let p=h?.get(d)??0,m=h?.get(f)??0;if(p!==m)return p-m;let g=n.get(d)??o,y=n.get(f)??o;return g!==y?g-y:d.localeCompare(f)}),[...l.map(d=>d.child),...u]}}function xT(e,t,r){let n=P1e(e,{rankHint:t,laneOf:r}),{children:i,roots:a}=n;for(let f of e.nodes)i.has(f)||i.set(f,[]);let o=B1e(e,t,n),l=[...a].sort(CB(t)),u=F1e(l,i,t),h=Jlt(i,t,o,u),d=G1e(l,e.nodes,t,h);return d=z1e(d),d}var SB=F(()=>{"use strict";O1e();$1e();V1e();s(Jlt,"createChildOrderer");s(xT,"buildMultitreeLayerOrder")});function ect(e,t,r){let n=new Set(e),i=new Set(t),a=Hm(t),o=[];for(let l of r)n.has(l.src)&&i.has(l.dst)&&o.push(a.get(l.dst));return s5(o)}function W1e(e,t,r){let n=[];for(let a of t){let o=r[a.src],l=r[a.dst];if(o==null||l==null||o===l)continue;let u=a.src,h=a.dst,d=o,f=l;o>l&&(u=a.dst,h=a.src,d=l,f=o);for(let p=d;p(r[p]??0)-(r[f]??0));for(let f of d){let p=r[f]??0;if(p===0)continue;let m=0;for(let x of n.get(f)??[])m=Math.max(m,(r[x]??0)+1);if(m>=p)continue;let g=p;r[f]=m;let y=xT(e,r,i),v=W1e(y,e.edges,r);v{"use strict";vu();y1();Nh();SB();s(ect,"countCrossingsBetweenAdjacent");s(W1e,"totalCrossings");s(q1e,"optimizeRanksByCrossings")});function U1e(e,t){let r=bs(e),n=[...e.nodes].sort((i,a)=>(t[i]??0)-(t[a]??0)||i.localeCompare(a));for(let i of n){let a=r(i);if(!a)continue;let o=e.edges.filter(y=>y.src===i);if(o.length===0)continue;let l=!1,u=0;for(let y of o){let v=r(y.dst);v==null||v===a?l=!0:u++}if(u===0||l)continue;let h=0,d=!1;for(let y of e.edges){if(y.dst!==i)continue;let v=r(y.src);v&&(v===a?d=!0:h++)}if(h>0||!d)continue;let f=t[i]??0,p=f+u,m=0;for(let y of e.edges)y.dst===i&&(m=Math.max(m,(t[y.src]??0)+1));let g=Math.max(f,m,p);g!==f&&(t[i]=g)}}var Y1e=F(()=>{"use strict";Nh();s(U1e,"adjustCrossLaneSources")});function j1e(e,t){let r=xo(e),n=Nf(r)??[...r.nodes].sort(),i=t?.compactSingleInput??!1,a=bs(r),o=Object.create(null);for(let u of n){let h=i5(r,u),d=t?.ignoreCrossLaneEdges?h.filter(f=>{let p=a(f.src),m=a(u);return!p||!m?!0:p===m}):h;if(d.length===0)o[u]=0;else if(i&&d.length===1){let f=d[0].src,p=a(f),m=a(u);p!==m?o[u]=o[f]??0:o[u]=(o[f]??0)+1}else{let f=-1/0;for(let p of d)f=Math.max(f,(o[p.src]??0)+1);o[u]=f===-1/0?0:f}}return(t?.optimizeRanksByCrossings??!1)&&(o=q1e(r,o)),t?.ignoreCrossLaneEdges&&U1e(r,o),{layers:xT(r,o,a),rankOf:o,dummy:new Set}}var X1e=F(()=>{"use strict";vu();Nh();H1e();Y1e();SB();s(j1e,"assignLayers_LongestPath")});function K1e(e,t){let r=xo(e),i={...j1e(r,{compactSingleInput:t?.compactSingleInput,ignoreCrossLaneEdges:t?.ignoreCrossLaneEdges,optimizeRanksByCrossings:t?.optimizeRanksByCrossings}).rankOf},a=bs(r),{preds:o,succs:l}=g1(r,g=>{if(t?.ignoreCrossLaneEdges){let y=a(g.src),v=a(g.dst);if(y&&v&&y!==v)return!1}return!0}),u=Nf(r)??[...r.nodes],h=[...u].reverse(),d=s((g,y)=>{let v=0;for(let T of o.get(g)??[])v=Math.max(v,(i[T]??0)+1);let x=Number.POSITIVE_INFINITY,b=l.get(g)??[];return b.length>0&&(x=Math.min(...b.map(T=>(i[T]??0)-1))),Number.isFinite(x)||(x=Math.max(v,y)),Math.min(Math.max(y,v),x)},"clampFeasible"),f=Um.GRAVITY_ITERATIONS,p=s(g=>{let y=!1;for(let v of g){let x=o.get(v)??[],b=l.get(v)??[];if(x.length===0&&b.length===0)continue;let T=x.length>0?x.reduce((k,R)=>k+(i[R]??0)+1,0)/x.length:i[v]??0,w=b.length>0?b.reduce((k,R)=>k+(i[R]??0)-1,0)/b.length:i[v]??0,C=Math.round((T+w)/2),S=d(v,C);S!==i[v]&&(i[v]=S,y=!0)}return y},"relaxOrder");for(let g=0;g0){let v=Math.min(...y.map(x=>(i[x]??0)-1));(i[g]??0)>v&&(i[g]=v)}}return{layers:a5(r,u,i),rankOf:i,dummy:new Set}}var Z1e=F(()=>{"use strict";vu();Nh();y1();X1e();s(K1e,"assignLayers_Gravity")});function tct(e){let t=xB(e),r=vB(e),n=bB(t),i=[];for(;n.length>0;){let a=[];for(let o of n){i.push(o);for(let l of r.get(o)??[])t.set(l,(t.get(l)??0)-1),(t.get(l)??0)===0&&a.push(l)}n=a.sort((o,l)=>o.localeCompare(l))}return i.length===e.nodes.length?i:null}function Q1e(e,t){let r=xo(e),n=t?.direction==="LR"?tct(r)??[...r.nodes].sort():Nf(r)??[...r.nodes].sort(),i=bs(r),a=s(d=>i(d)??d,"laneOf"),o=Object.create(null),l=new Map,u=s((d,f)=>t?.ignoreCrossLaneEdges??!0?a(d)===a(f)?1:0:1,"edgeWeight");for(let d of n){if(r.nodeById.get(d)?.isGroup)continue;let p=i5(r,d),m=0;if(p.length>0)for(let x of p){let b=x.src,T=o[b]??0;m=Math.max(m,T+u(b,d))}let g=a(d),y=l.get(g)??0,v=Math.max(m,y);o[d]=v,l.set(g,v+1)}return{layers:a5(r,n,o,{skipGroups:!0}),rankOf:o,dummy:new Set}}var J1e=F(()=>{"use strict";vu();Nh();s(tct,"topoSortByGenerationIfAcyclic");s(Q1e,"assignLayers_LaneAwareCompact")});function eve(e,t){let r=xo(t),{rankOf:n}=e,i=e.layers.map(m=>[...m]),a=new Set(e.dummy?[...e.dummy]:[]),o=0,l=new Map(r.nodeById),u=s(m=>{let g=`placeholder-${o++}`,y={id:g,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(g,y),a.add(g);i.length<=m;)i.push([]);return i[m].push(g),n[g]=m,g},"addDummyAt"),h=[...r.edges].sort((m,g)=>m.id===g.id?m.src===g.src?m.dst.localeCompare(g.dst):m.src.localeCompare(g.src):m.id.localeCompare(g.id)),d=[];for(let m of h){let g=n[m.src]??0,y=n[m.dst]??0;if(y-g<=1){d.push(m);continue}let v=m.src;for(let b=g+1,T=0;b!r.nodes.includes(m))],edges:d,layout:r.layout,nodeById:l};return{layering:{layers:i,rankOf:n,dummy:a},graphWithDummies:p}}var tve=F(()=>{"use strict";vu();s(eve,"makeProperLayering")});function rve(e){let t=e.length;if(t===0)return Number.POSITIVE_INFINITY;let r=[...e].sort((n,i)=>n-i);return t%2===1?r[(t-1)/2]:.5*(r[t/2-1]+r[t/2])}function nve(e){return e.length===0?Number.POSITIVE_INFINITY:e.reduce((r,n)=>r+n,0)/e.length}function rct(e,t,r,n){let i=new Map;for(let a of e)i.set(a,[]);for(let a of r)n==="down"?t.has(a.src)&&i.has(a.dst)&&i.get(a.dst).push(t.get(a.src)):t.has(a.dst)&&i.has(a.src)&&i.get(a.src).push(t.get(a.dst));return i}function nct(e,t,r){let n=r.get(e)??0,i=r.get(t)??0;return n!==i?n-i:e.localeCompare(t)}function ive(e,t,r){let n=new Set(e),i=new Set(t),a=Hm(e),o=Hm(t),l=[];for(let h of r)n.has(h.src)&&i.has(h.dst)&&l.push({u:a.get(h.src),v:o.get(h.dst)});l.sort((h,d)=>h.u===d.u?h.v-d.v:h.u-d.u);let u=l.map(h=>h.v);return s5(u)}function wB(e,t,r){return[...e].sort((n,i)=>{let a=rve(t.get(n)??[]),o=rve(t.get(i)??[]);return a===o?nct(n,i,r):isFinite(a)?isFinite(o)?a-o:-1:1})}function ave(e,t,r,n,i,a){let o=Hm(e),l=Hm(t),u=rct(t,o,r,n);if(!i||!a||a.length===0)return wB(t,u,l);let h=new Map;for(let p of t){let m=i(p),g=h.get(m)??[];g.push(p),h.set(m,g)}let d=[];for(let p of a){let m=h.get(p);if(!m||m.length===0)continue;let g=wB(m,u,l);d.push(...g)}let f=h.get(null);if(f&&f.length>0){let p=wB(f,u,l);for(let m of p){let g=nve(u.get(m)??[]),y=d.length;if(isFinite(g))for(let[v,x]of d.entries()){let b=nve(u.get(x)??[]);if(go.has(y.src)&&l.has(y.dst)),d=u?r.filter(y=>l.has(y.src)&&u.has(y.dst)):void 0,f=s(y=>{let v=ive(e,y,h);return d&&n&&(v+=ive(y,n,d)),v},"crossingScore"),p=i?new Map:null;if(i&&p)for(let y of t)p.set(y,i(y));let m=!0,g=f(a);for(;m;){m=!1;for(let y=0;y+1[...l]),i=t.edges,a=bs(t),o=l5(t,r?.laneOrder);for(let l=0;l<3;l++){for(let u=1;u=0;u--)n[u]=ave(n[u+1],n[u],i,"up",a,o),n[u]=sve(n[u+1],n[u],i,n[u-1],a)}return{layers:n}}var lve=F(()=>{"use strict";vu();Nh();s(rve,"median");s(nve,"barycenter");s(rct,"neighborPositionsFor");s(nct,"currentOrderTieBreak");s(ive,"countCrossingsBetweenAdjacent");s(wB,"sortByHeuristic");s(ave,"reorderLayer");s(sve,"transposeImprove");s(ove,"orderLayers")});function cve(e,t,r){let n=r?.layerGap??TB.DEFAULT_LAYER_GAP,i=r?.nodeGap??TB.DEFAULT_NODE_GAP,a=r?.laneGap??i*2,o=r?.direction??"TB",l=o==="LR"||o==="RL",u=e.layers,h=Object.create(null),d=Object.create(null),f=s(P=>t.nodeById.get(P),"getNode"),p=s(P=>f(P)?.width??0,"getWidth"),m=s(P=>f(P)?.height??0,"getHeight"),g=bs(t),y=l5(t,r?.laneOrder),v=u.map(P=>P.reduce((N,_)=>Math.max(N,m(_)),0)),x=[];if(l)for(let P=0;P+1Math.max(O,p($)),0),_=u[P+1].reduce((O,$)=>Math.max(O,p($)),0),A=v[P],I=v[P+1],D=A/2+I/2,L=(N+_)/2,B=Math.max(0,L-D-n);x.push(B)}let b=new Set;for(let P of u)for(let N of P)b.add(g(N));let T=b.has(null),w=y.filter(P=>b.has(P)),C=[...T?[null]:[],...w],S=Object.create(null);for(let P of w)S[P]=0;T&&(S.null=0);for(let P of u){let N=Object.create(null),_=[];for(let A of P){let I=g(A);I===null?_.push(A):(N[I]||=[]).push(A)}for(let[A,I]of Object.entries(N)){let D=I.reduce((L,B)=>L+p(B),0)+i*Math.max(0,I.length-1);S[A]=Math.max(S[A]??0,D)}if(T&&_.length){let A=_.reduce((I,D)=>I+p(D),0)+i*Math.max(0,_.length-1);S.null=Math.max(S.null??0,A)}}let k=new Map;{let P=C.map(A=>(A===null?S.null:S[A])??0),_=-(P.reduce((A,I)=>A+I,0)+a*Math.max(0,C.length-1))/2;for(let A=0;Ap(V)),$=O.reduce((V,z)=>V+z,0)+i*(L.length-1),W=B-$/2;for(let[V,z]of L.entries()){let H=O[V];h[z]=W+H/2,d[z]=R+_/2,W+=H+i}}}let I=x[P]??0;R+=_+n+I}let M=new Map;for(let P of t.edges){let N=P.ref.id;M.has(N)||M.set(N,[]),M.get(N).push(P)}for(let[,P]of M){if(P.length===0)continue;let N=P[0].ref,_=N.start,A=N.end;if(_==null||A==null)continue;let I=Math.round(((h[_]??0)+(h[A]??0))/2),D=new Set;for(let L of P)D.add(L.src),D.add(L.dst);for(let L of D){if(L===_||L===A)continue;t.nodeById.get(L)?.isDummy&&(h[L]=I)}}return{x:h,y:d}}var uve=F(()=>{"use strict";y1();Nh();s(cve,"assignCoordinates")});function ict(e){let t=2166136261;for(let r=0;r>>0}function act(e){let t=e>>>0;return()=>{t+=1831565813;let r=t;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}}function sct(e,t){let r=[...e],n=act(t);for(let i=r.length-1;i>0;i--){let a=Math.floor(n()*(i+1));[r[i],r[a]]=[r[a],r[i]]}return r}function oct(e,t){let r=0;for(let[n,i]of e.entries())r+=Math.abs(n-(t.get(i)??n));return r}function hve(e,t){let r=new Map;for(let[i,a]of e.entries())r.set(a,i);let n=0;for(let{a:i,b:a,weight:o}of t){let l=r.get(i),u=r.get(a);l==null||u==null||(n+=o*Math.abs(l-u))}return n}function lct(e){let t=o5(e);if(t.length<2)return[];let r=new Map(t.map((a,o)=>[a,o])),n=bs(e),i=new Map;for(let a of e.layout.edges??[]){if(a.isLayoutOnly)continue;let o=typeof a.start=="string"?a.start:void 0,l=typeof a.end=="string"?a.end:void 0;if(!o||!l||!e.nodeById.has(o)||!e.nodeById.has(l))continue;let u=n(o),h=n(l);if(!u||!h||u===h)continue;let d=r.get(u),f=r.get(h);if(d==null||f==null)continue;let[p,m]=d<=f?[u,h]:[h,u],g=`${p}\0${m}`,y=i.get(g);y?y.weight++:i.set(g,{a:p,b:m,weight:1})}return[...i.values()]}function dve(e,t,r){let n=[...e],i=hve(n,t),a=!0,o=0,l=Math.max(1,n.length);for(;a&&oi.a===a.a?i.b.localeCompare(a.b):i.a.localeCompare(a.a)).map(({a:i,b:a,weight:o})=>`${i}:${a}:${o}`).join("|");return ict(`${e.join("|")}#${n}#${r}`)}function fve(e,t={}){let r=o5(e);if(r.length<2)return r;let n=lct(e);if(n.length===0)return r;let i=new Map(r.map((l,u)=>[l,u])),a=dve(r,n,i),o=Math.max(0,t.restarts??kB);for(let l=0;l{"use strict";Nh();kB=8;s(ict,"hashString");s(act,"mulberry32");s(sct,"deterministicShuffle");s(oct,"sourceDistance");s(hve,"laneArrangementCost");s(lct,"buildWeightedLaneEdges");s(dve,"greedySwitch");s(cct,"isBetterCandidate");s(uct,"seedForRestart");s(fve,"optimizeTopLaneOrder")});function mve(e,t){let r=t?.ignoreCrossLaneEdges??!0,n=t?.optimizeRanksByCrossings??!0,i=xo(e),a=t?.automaticLaneOrdering?fve(i,{restarts:kB}):void 0,o=I1e(i),l=o.acyclic,u=r?Q1e(l,{compactSingleInput:t?.compactSingleInput??Um.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:t?.direction}):K1e(l,{compactSingleInput:t?.compactSingleInput??Um.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:n}),{layering:h,graphWithDummies:d}=eve(u,l),f=ove(h,d,{laneOrder:a}),p=cve(f,d,{layerGap:t?.layerGap,nodeGap:t?.nodeGap,direction:t?.direction,laneOrder:a});return{acyclic:l,reversed:o.reversed,layering:h,ordered:f,coordinates:p}}var gve=F(()=>{"use strict";vu();M1e();Z1e();J1e();tve();lve();uve();y1();pve();s(mve,"sugiyamaLayout")});function yve(e,t,r){let n=e.x??0,i=e.y??0,a=t.x-n,o=t.y-i,l=Math.abs(a),u=Math.abs(o);return lJr&&u*3>=l?o>0?"bottom":"top":l>Jr?a>0?"right":"left":r}function vve(e,t){return Math.abs(e.to-t.from)re.isGroup&&!re.parentId);for(let re of h){let ue={id:re.id},le=s(he=>{o.set(he.id,ue),r.filter(Te=>Te.parentId===he.id).forEach(le)},"assignLane");le(re)}let d=r.filter(re=>!re.isGroup&&!re.isEdgeLabel).map(re=>{let ue=re.width??10,le=re.height??10,he=re.x??0,Te=re.y??0,oe=hct;return{nodeId:re.id,minX:he-ue/2-oe,maxX:he+ue/2+oe,minY:Te-le/2-oe,maxY:Te+le/2+oe,visualXHalfExtent:u?le/2+oe:ue/2+oe}}),f=s((re,ue,le,he)=>{let Te=l.find(oe=>oe.orientation===re&&Math.abs(oe.coord-ue)<1);return Te||(Te={id:`pipe-${re}-${ue.toFixed(0)}`,orientation:re,coord:ue,spanMin:le,spanMax:he,tracks:[]},l.push(Te)),Te.spanMin=Math.min(Te.spanMin,le),Te.spanMax=Math.max(Te.spanMax,he),Te},"getOrAddPipe"),p=s((re,ue)=>{let le=re.width??10,he=re.height??10,Te=re.x??0,oe=re.y??0;switch(ue){case"top":return{x:Te,y:oe-he/2};case"bottom":return{x:Te,y:oe+he/2};case"left":return{x:Te-le/2,y:oe};case"right":return{x:Te+le/2,y:oe}}},"portForSide"),m=s((re,ue,le)=>p(re,yve(re,ue,le?"bottom":"top")),"getOrthogonalPort"),g=[],y=[],v=new Set,x=1e3,b=s((re,ue,le)=>{if(g.length===0)return 0;let he=Math.abs(ue.y-le.y)ee||q.from-Jr<=G&&q.to+Jr>=G&&(oe+=x)}else if(Te){let G=ue.x,X=Math.min(ue.y,le.y)-Jr,ee=Math.max(ue.y,le.y)+Jr;if(ee<=X)return 0;for(let q of g)q.edgeIndex===re||q.orientation!=="horizontal"||q.pipe.coordee||q.from-Jr<=G&&q.to+Jr>=G&&(oe+=x)}return oe},"crossingPenalty"),T=i.map((re,ue)=>{if(!re.start||!re.end)return{idx:ue,crossLane:0,dx:0,dy:0};let le=a.get(re.start),he=a.get(re.end),Te=o.get(re.start),oe=o.get(re.end),G=Te&&oe&&Te.id!==oe.id?1:0,X=le&&he?Math.abs((he.x??0)-(le.x??0)):0,ee=le&&he?Math.abs((he.y??0)-(le.y??0)):0;return{idx:ue,crossLane:G,dx:X,dy:ee}}).sort((re,ue)=>{if(re.crossLane!==ue.crossLane)return ue.crossLane-re.crossLane;let le=re.dx+re.dy,he=ue.dx+ue.dy;return Math.abs(le-he)>1?le-he:re.idx-ue.idx}).map(re=>re.idx),w=s((re,ue,le,he)=>{let Te=Math.min(re.x,ue.x),oe=Math.max(re.x,ue.x),G=Math.min(re.y,ue.y),X=Math.max(re.y,ue.y);return!!d.find(q=>le&&q.nodeId===le||he&&q.nodeId===he?!1:Math.abs(re.x-ue.x)>Jr?q.minYre.y&&q.maxX>Te&&q.minXre.x&&q.maxY>G&&q.minYyve(re,ue,"bottom"),"determineSide"),R=new Map;for(let[re,ue]of i.entries()){if(!ue.start||!ue.end||ue.start===ue.end||ue.points&&ue.points.length>0)continue;let le=a.get(ue.start),he=a.get(ue.end);if(!le||!he)continue;let Te=(he.x??0)-(le.x??0),oe=(he.y??0)-(le.y??0);R.set(re,{edgeIdx:re,srcId:ue.start,dstId:ue.end,srcSide:k(le,{x:he.x??0,y:he.y??0}),dstSide:k(he,{x:le.x??0,y:le.y??0}),absDx:Math.abs(Te),absDy:Math.abs(oe),dxSign:Math.sign(Te),dySign:Math.sign(oe)})}let M=s(re=>re.srcSide==="top"||re.srcSide==="bottom"?re.absDx===0?1/0:re.absDy/re.absDx:re.absDy===0?1/0:re.absDx/re.absDy,"preferenceStrength"),P=s(re=>re.srcSide==="top"||re.srcSide==="bottom"?re.dxSign>=0?"right":"left":re.dySign>=0?"bottom":"top","secondarySide"),N=new Map;for(let re of R.values()){let ue=`${re.srcId}:${re.srcSide}`;N.has(ue)||N.set(ue,[]),N.get(ue).push(re)}let _=new Map,A=s((re,ue)=>`${re}:${ue}`,"loadKey");for(let re of R.values())_.set(A(re.srcId,re.srcSide),(_.get(A(re.srcId,re.srcSide))??0)+1),_.set(A(re.dstId,re.dstSide),(_.get(A(re.dstId,re.dstSide))??0)+1);for(let re of N.values())if(!(re.length<2)){re.sort((ue,le)=>{let he=M(ue),Te=M(le);return Math.abs(he-Te)>1e-9?Te-he:ue.edgeIdx-le.edgeIdx});for(let ue=1;ue=Te||(_.set(A(le.srcId,le.srcSide),Te-1),_.set(A(le.srcId,he),oe+1),le.srcSide=he)}}let I=s(re=>{let ue=re?.shape;return ue==="question"||ue==="diamond"},"isDiamondNode"),D=new Map;for(let re of R.values())D.has(re.dstId)||D.set(re.dstId,new Set),D.get(re.dstId).add(re.dstSide);for(let re of R.values()){if(!I(a.get(re.srcId)))continue;let ue=D.get(re.srcId);if(!ue?.has(re.srcSide))continue;let le=P(re);if(ue.has(le)||(_.get(A(re.srcId,le))??0)>0)continue;let he=_.get(A(re.srcId,re.srcSide))??0;_.set(A(re.srcId,re.srcSide),Math.max(0,he-1)),_.set(A(re.srcId,le),1),re.srcSide=le}for(let re of R.values()){let{edgeIdx:ue,srcId:le,dstId:he,srcSide:Te,dstSide:oe}=re,G=a.get(le),X=a.get(he),ee=`${le}:${Te}:src`,q=Te==="top"||Te==="bottom"?X.x??0:X.y??0;C.has(ee)||C.set(ee,[]),C.get(ee).push({edgeIdx:ue,oppositeCoord:q});let ie=`${he}:${oe}:dst`,j=oe==="top"||oe==="bottom"?G.x??0:G.y??0;C.has(ie)||C.set(ie,[]),C.get(ie).push({edgeIdx:ue,oppositeCoord:j})}let L=new Map,B=8;for(let[re,ue]of C){if(ue.length<2)continue;ue.sort((Se,Ce)=>Se.oppositeCoord-Ce.oppositeCoord);let le=re.split(":"),he=le.slice(0,-2).join(":"),Te=le[le.length-2],oe=le[le.length-1],G=a.get(he);if(!G)continue;let ee=Te==="left"||Te==="right"?G.height??10:G.width??10,q=G.shape,j=q==="question"||q==="diamond"?ee*.3:ee,Y=Math.min(20,Math.max(B,j/(ue.length+1))),me=-(Y*(ue.length-1))/2;for(let[Se,Ce]of ue.entries()){let Me=me+Se*Y,_e=`${Ce.edgeIdx}:${oe}`;L.set(_e,Me)}}let O=s(re=>!!i[re]?.labelNodeId,"edgeHasLabelNode"),$=s((re,ue)=>re?(C.get(`${re}:${ue}:src`)??[]).some(({edgeIdx:le})=>O(le))||(C.get(`${re}:${ue}:dst`)??[]).some(({edgeIdx:le})=>O(le)):!1,"faceHasLabelNode"),W=s((re,ue,le)=>ue==="top"||ue==="bottom"?{x:re.x+le,y:re.y}:{x:re.x,y:re.y+le},"applyPortOffset"),V=s((re,ue,le)=>{let he=R.get(re),Te={x:le.x??0,y:le.y??0},oe={x:ue.x??0,y:ue.y??0},G=he?.srcSide??k(ue,Te),X=he?.dstSide??k(le,oe),ee=he?p(ue,he.srcSide):m(ue,Te,!0),q=he?p(le,he.dstSide):m(le,oe,!1),ie=L.get(`${re}:src`),j=L.get(`${re}:dst`);return ie!==void 0&&(ee=W(ee,G,ie)),j!==void 0&&(q=W(q,X,j)),{pSrcPort:ee,pDstPort:q,srcSide:G,dstSide:X}},"portsForEdge");for(let re of T){let ue=i[re];if(y[re]=[],!ue.start||!ue.end||ue.points&&ue.points.length>0||ue.start===ue.end)continue;let le=a.get(ue.start),he=a.get(ue.end);if(!le||!he)continue;let{pSrcPort:Te,pDstPort:oe,srcSide:G,dstSide:X}=V(re,le,he),ee={...Te},q={...oe},ie=G==="top"||G==="bottom",j=X==="top"||X==="bottom";if(ie){let et=Te.y>(le.y??0);ee.y=et?Te.y+El:Te.y-El}else{let et=Te.x>(le.x??0);ee.x=et?Te.x+El:Te.x-El}if(j){let et=oe.y>(he.y??0);q.y=et?oe.y+El:oe.y-El}else{let et=oe.x>(he.x??0);q.x=et?oe.x+El:oe.x-El}let U=s((et,pt)=>{for(let kt of d)if(!pt.includes(kt.nodeId)&&et.x>kt.minX&&et.xkt.minY&&et.y{if(tr){let zr=et.y>(pt.y??0);return{x:(kt.x??0)>=et.x?vr.maxX+Ym:vr.minX-Ym,y:zr?vr.maxY+v1:vr.minY-v1,leavesPositiveSide:zr}}let Ur=et.x>(pt.x??0),on=(kt.y??0)>=et.y;return{x:Ur?vr.maxX+Ym:vr.minX-Ym,y:on?vr.maxY+v1:vr.minY-v1,leavesPositiveSide:Ur}},"obstacleDetour"),Ae=[],me=[ue.start,ue.end],Se=U(ee,me);if(Se.inside&&Se.obstacle){let et=Se.obstacle;if(ie){let pt=Y(Te,le,he,et,!0);ee.x=pt.x,ee.y=pt.y;let kt=pt.leavesPositiveSide?Math.min(et.minY-2,Te.y+El):Math.max(et.maxY+2,Te.y-El);Ae=[{x:Te.x,y:kt},{x:pt.x,y:kt},{x:pt.x,y:pt.y}]}else{let pt=Y(Te,le,he,et,!1),kt=pt.leavesPositiveSide?Math.min(et.minX-2,Te.x+El):Math.max(et.maxX+2,Te.x-El);ee.x=pt.x,ee.y=pt.y,Ae=[{x:kt,y:Te.y},{x:kt,y:pt.y},{x:pt.x,y:pt.y}]}}let Ce=[],Me=U(q,me);if(Me.inside&&Me.obstacle){let et=Me.obstacle;if(j){let pt=Y(oe,he,le,et,!0);q.x=pt.x,q.y=pt.y,Ce=[{x:pt.x,y:pt.y},{x:oe.x,y:pt.y}]}else{let pt=Y(oe,he,le,et,!1);q.x=pt.x,q.y=pt.y,Ce=[{x:pt.x,y:pt.y},{x:pt.x,y:oe.y}]}}if(Ae.length===0&&Ce.length===0){let et=Ym,pt=Math.abs(ee.x-q.x)1||Ur>1,zr=S.get(ue.start??"")??0,Pt=S.get(ue.end??"")??0,Et=tr>1&&$(ue.start,G)||Ur>1&&$(ue.end,X),Ot=tr<=1||zr<=2,zt=Ur<=1||Pt<=2;if((pt||kt)&&!vr&&(!on||on&&!Et&&Ot&&zt)&&!w(Te,oe,ue.start,ue.end)){ue.points=[{...Te},{...ee},{...q},{...oe}],v.add(re);let Re=kt?"horizontal":"vertical",ln=kt?Te.y:Te.x,Ge=kt?Math.min(Te.x,oe.x):Math.min(Te.y,oe.y),_r=kt?Math.max(Te.x,oe.x):Math.max(Te.y,oe.y),Yi={id:`fast-path-${Re}-${ln.toFixed(0)}-${re}`,orientation:Re,coord:ln,spanMin:Ge,spanMax:_r,tracks:[]};g.push({edgeIndex:re,segmentIndex:0,orientation:Re,pipe:Yi,trackIndex:0,from:Ge,to:_r});continue}}let _e=f("vertical",ee.x,ee.y,ee.y);ee.x=_e.coord;let ze=f("vertical",q.x,q.y,q.y);q.x=ze.coord;let Le=Math.min(ee.x,q.x)-50,qe=Math.max(ee.x,q.x)+50,ve=Math.min(ee.y,q.y)-50,lt=Math.max(ee.y,q.y)+50;for(let et of d){let pt=Math.min(ee.x,q.x),kt=Math.max(ee.x,q.x),vr=Math.min(ee.y,q.y),tr=Math.max(ee.y,q.y);et.minXpt&&et.minYvr&&(Le=Math.min(Le,et.minX-c5),qe=Math.max(qe,et.maxX+c5),ve=Math.min(ve,et.minY-c5),lt=Math.max(lt,et.maxY+c5))}for(let et of d){if(et.maxXqe||et.maxYlt)continue;let pt=Ym;f("horizontal",et.minY-pt,Le,qe),f("horizontal",et.maxY+pt,Le,qe);let kt=v1;f("vertical",et.minX-kt,ve,lt),f("vertical",et.maxX+kt,ve,lt)}f("horizontal",ee.y,Le,qe),f("horizontal",q.y,Le,qe);let Oe=l.filter(et=>et.orientation==="horizontal"&&et.coord>=ve&&et.coord<=lt),mt=l.filter(et=>et.orientation==="vertical"&&et.coord>=Le&&et.coord<=qe),At=s((et,pt)=>`${et.toFixed(1)},${pt.toFixed(1)}`,"getKey"),Gt=At(ee.x,ee.y),Ct=At(q.x,q.y),Rt=new Map,gt=new Map,be=new Map,ct=new Set,xt=[];Rt.set(Gt,0),be.set(Gt,"n"),xt.push({key:Gt,f:Math.hypot(q.x-ee.x,q.y-ee.y),pt:ee}),ct.add(Gt);let Ke=[],De=s((et,pt)=>w(et,pt,ue.start,ue.end),"checkSegmentBlocked"),tt={x:q.x,y:ee.y},Ze=De(ee,tt),dt=De(tt,q),Ut=Ze||dt,$t={x:ee.x,y:q.y},Yt=De(ee,$t),Sr=De($t,q);if(Ut?Yt||Sr||(Math.abs(ee.x-q.x)0;){xt.sort((Pt,Et)=>Pt.f-Et.f);let et=xt.shift();if(ct.delete(et.key),et.key===Ct){let Pt=Ct,Et=q;for(Ke=[Et];gt.has(Pt);){let Ot=gt.get(Pt);Ke.unshift(Ot),Et=Ot,Pt=At(Ot.x,Ot.y)}break}let pt=et.pt.x,kt=et.pt.y,vr=mt.sort((Pt,Et)=>Pt.coord-Et.coord),tr=vr.findIndex(Pt=>Math.abs(Pt.coord-pt)<1),Ur=Oe.sort((Pt,Et)=>Pt.coord-Et.coord),on=Ur.findIndex(Pt=>Math.abs(Pt.coord-kt)<1),zr=[];tr>0&&zr.push({x:vr[tr-1].coord,y:kt}),tr>=0&&tr0&&zr.push({x:pt,y:Ur[on-1].coord}),on>=0&&on$e.nodeId===ue.start||$e.nodeId===ue.end?!1:Et!==Ot?$e.minYkt&&$e.maxX>Et&&$e.minXpt&&$e.maxY>zt&&$e.minY10&&Qu<-5||ll<-10&&Qu>5)&&(_r=Math.abs(Qu)*100),(Yi>10&&Cd<-5||Yi<-10&&Cd>5)&&(_r+=Math.abs(Cd)*50);let O0=0,bi=be.get(et.key)??"n",No=Math.abs(Cd)>Jr?"h":"v";bi!=="n"&&bi!==No&&(O0=50);let Dc=ln+Ge+_r+O0,cl=(Rt.get(et.key)??1/0)+Dc,Bt=Math.abs(q.x-Pt.x)+Math.abs(q.y-Pt.y);if(cl<(Rt.get(Re)??1/0))if(gt.set(Re,et.pt),Rt.set(Re,cl),be.set(Re,No),!ct.has(Re))xt.push({key:Re,f:cl+Bt,pt:Pt}),ct.add(Re);else{let $e=xt.findIndex(nt=>nt.key===Re);$e!==-1&&(xt[$e].f=cl+Bt)}}}if(Ke.length===0&&(Ke=[ee,{x:ee.x,y:q.y},q]),Ke.length>4){let et=Ke[0],pt=Ke[Ke.length-1],kt=Math.min(et.x,pt.x),vr=Math.max(et.x,pt.x),tr=Math.min(et.y,pt.y),Ur=Math.max(et.y,pt.y);for(let zt of Ke)kt=Math.min(kt,zt.x),vr=Math.max(vr,zt.x),tr=Math.min(tr,zt.y),Ur=Math.max(Ur,zt.y);let on=vr>Math.max(et.x,pt.x),zr=ktGe.minXwt&&Ge.minYcr);if(ln.length>0){let Ge=Math.max(et.x,pt.x);for(let _r of ln){let Yi=(_r.minX+_r.maxX)/2;if(_r.visualXHalfExtent===void 0||isNaN(_r.visualXHalfExtent))continue;let ll=Yi+_r.visualXHalfExtent+zt;Ge=Math.max(Ge,ll)}isNaN(Ge)||(vr=Ge)}}if(zr){let wt=d.filter(cr=>cr.minXMath.min(et.y,pt.y));if(wt.length>0){let cr=Math.min(et.x,pt.x);for(let Re of wt){let Ge=(Re.minX+Re.maxX)/2-Re.visualXHalfExtent-zt;cr=Math.min(cr,Ge)}kt=cr}}}let Pt=s(zt=>{let wt=pt.y>et.y,cr=d.filter(Ge=>{let _r=Math.min(et.x,pt.x)Ge.minX,Yi=Math.min(et.y,pt.y)Ge.minY;return _r&&Yi}),Re=cr;if(u&&cr.length>0){let Ge=cr.filter(_r=>_r.minXzt);Ge.length>0&&(Re=Ge)}if(Re.length===0)return pt.y;let ln=Ym;if(wt){let _r=Math.max(...Re.map(Yi=>Yi.maxY))+ln;if(_rYi.minY))-ln;if(_r>pt.y+Jr)return _r}return pt.y},"findBestReturnY"),Et=s(zt=>{let wt=Pt(zt),cr={x:zt,y:et.y},Re={x:zt,y:wt},ln={x:pt.x,y:wt},Ge=De(et,cr),_r=De(cr,Re),Yi=De(Re,ln),ll=wt!==pt.y?De(ln,pt):!1;return!Ge&&!_r&&!Yi&&!ll?Math.abs(wt-pt.y)=3){let et=Wt[Wt.length-1],pt=Wt[Wt.length-2],kt=Wt[Wt.length-3],vr=Math.abs(kt.y-pt.y)Math.abs(et.x-kt.x)&&Wt.splice(-2,1)}else if(tr){let Ur=Math.sign(pt.y-kt.y),on=Math.sign(et.y-kt.y);Ur!==0&&Ur===on&&Math.abs(pt.y-kt.y)>Math.abs(et.y-kt.y)&&Wt.splice(-2,1)}}let ar=[Wt[0]];for(let et=1;etpt.x,Ur=vr.x>kt.x;if(tr!==Ur){ar.push(kt);continue}continue}if(Math.abs(pt.x-kt.x)pt.y,Ur=vr.y>kt.y;if(tr!==Ur){ar.push(kt);continue}continue}ar.push(kt)}ar.push(Wt[Wt.length-1]);for(let et=0;etre.from{let Te=!he.segments.some(G=>(G.edgeIndex!==ue.edgeIndex||G.segmentIndex!==ue.segmentIndex)&&z(G,re)),oe=!le.segments.some(G=>(G.edgeIndex!==re.edgeIndex||G.segmentIndex!==re.segmentIndex)&&z(G,ue));return Te&&oe?(re.trackIndex=he.index,ue.trackIndex=le.index,le.segments=[...le.segments.filter(G=>G.edgeIndex!==re.edgeIndex||G.segmentIndex!==re.segmentIndex),{edgeIndex:ue.edgeIndex,segmentIndex:ue.segmentIndex,from:ue.from,to:ue.to}],he.segments=[...he.segments.filter(G=>G.edgeIndex!==ue.edgeIndex||G.segmentIndex!==ue.segmentIndex),{edgeIndex:re.edgeIndex,segmentIndex:re.segmentIndex,from:re.from,to:re.to}],!0):!1},"trySwapSegmentsAcrossTracks"),K=s(re=>{let ue=re.tracks.length;return re.tracks[ue]={index:ue,coord:re.coord,segments:[]},ue},"createNewTrack"),J=s((re,ue)=>{let le=re.pipe.tracks[re.trackIndex];le.segments=le.segments.filter(Te=>Te.edgeIndex!==re.edgeIndex||Te.segmentIndex!==re.segmentIndex),re.trackIndex=ue,re.pipe.tracks[ue].segments.push({edgeIndex:re.edgeIndex,segmentIndex:re.segmentIndex,from:re.from,to:re.to})},"moveSegmentToTrack"),ne=s((re,ue)=>{let le=y[re.edgeIndex];for(let he of le){let Te=g[he];Te.pipe===re.pipe&&J(Te,ue)}},"moveSegmentChainToTrack"),Z=s(re=>{let ue=y[re.edgeIndex],le=ue.indexOf(g.indexOf(re)),he=[];return le>0&&he.push(g[ue[le-1]]),le{if(re.orientation===ue.orientation)return!1;let le=re.orientation==="horizontal"?re:ue,he=re.orientation==="horizontal"?ue:re;return he.pipe.coord>le.from&&he.pipe.coordhe.from&&le.pipe.coord{for(let le of re.tracks)if(!le.segments.some(Te=>(Te.edgeIndex!==ue.edgeIndex||Te.segmentIndex!==ue.segmentIndex)&&z(Te,ue)))return le.index;return-1},"findAvailableTrack"),fe=s((re,ue)=>{if(re.trackIndex===ue.trackIndex)return z(re,ue);let le=Z(re),he=Z(ue);return le.some(Te=>he.some(oe=>pe(Te,oe)))},"segmentsConflict"),ce=s((re,ue,le)=>{if(H(re,ue,re.pipe.tracks[re.trackIndex],ue.pipe.tracks[ue.trackIndex]))return;let he=te(re.pipe,ue);le(ue,he!==-1?he:K(re.pipe))},"resolveTrackConflict"),de=s(re=>{let ue=0;for(let le=0;le{if(Ee.has(re))return Ee.get(re);let ue=y[re];if(ue.length===0){let X={dest:0,deviation:0,base:0,delta:0};return Ee.set(re,X),X}let he=g[ue[0]].pipe.coord,Te=he;for(let X=1;XMath.abs(ie-he)?q:ie;break}}let oe=Math.abs(Te-he),G={dest:Te,deviation:oe,base:he,delta:Te-he};return Ee.set(re,G),G},"getDestInfo"),Fe=s(()=>{let re=0,ue=new Map;for(let[he,Te]of i.entries())y[he].length!==0&&Te.start&&(ue.has(Te.start)||ue.set(Te.start,[]),ue.get(Te.start).push(he));let le=s(he=>{let Te=i[he];if(!Te.start||!Te.end)return 0;let oe=a.get(Te.start),G=a.get(Te.end);if(!oe||!G)return 0;let X=(G.x??0)-(oe.x??0),ee=(G.y??0)-(oe.y??0);return Math.abs(X)+Math.abs(ee)},"getEdgeDistance");for(let he of ue.values()){he.sort((oe,G)=>{let X=we(oe),ee=we(G);if(Math.abs(X.deviation-ee.deviation)>1)return X.deviation-ee.deviation;if(Math.abs(X.dest-ee.dest)>1)return X.dest-ee.dest;let q=le(oe),ie=le(G);if(Math.abs(q-ie)>1)return ie-q;let j=y[oe].length,U=y[G].length;if(j!==U)return j-U;if(j===1){let Y=y[oe][0],Ae=y[G][0];if(g[Y]&&g[Ae]){let me=g[Y],Se=g[Ae],Ce=Math.abs(me.to-me.from),Me=Math.abs(Se.to-Se.from);if(Math.abs(Ce-Me)>1)return Ce-Me}}return 0});let Te=he.map(oe=>g[y[oe][0]]);re+=de(Te)}return re},"fixSourceHandleCrossings"),Ye=s(()=>{let re=0,ue=new Map;for(let[le,he]of i.entries())y[le].length!==0&&he.end&&(ue.has(he.end)||ue.set(he.end,[]),ue.get(he.end).push(le));for(let le of ue.values()){le.sort((Te,oe)=>{let G=s(q=>{let ie=y[q];if(ie.length<2)return 0;let j=g[ie[ie.length-2]];return Math.abs(j.to-j.from)},"getDist"),X=G(Te),ee=G(oe);return Math.abs(X-ee)>.1?X-ee:Te-oe});let he=le.map(Te=>g[y[Te][y[Te].length-1]]);re+=de(he)}return re},"fixTargetHandleCrossings"),He=s(()=>{let re=0;for(let ue of l){let le=[];for(let he of ue.tracks)for(let Te of he.segments){let oe=y[Te.edgeIndex].find(G=>g[G].segmentIndex===Te.segmentIndex);oe!==void 0&&le.push(g[oe])}le.sort((he,Te)=>he.edgeIndex-Te.edgeIndex||he.segmentIndex-Te.segmentIndex);for(let he=0;he{he.segments.forEach(Te=>{ue.push({edgeIndex:Te.edgeIndex,segmentIndex:Te.segmentIndex,trackIndex:he.index,from:Te.from,to:Te.to})})}),ue.sort((he,Te)=>he.from-Te.from);let le=[];if(ue.length>0){let he=[ue[0]],Te=ue[0].to;for(let oe=1;oeTe.add(Y.trackIndex));let oe=new Map;he.forEach(Y=>{let Ae=we(Y.edgeIndex);oe.set(Y.trackIndex,(oe.get(Y.trackIndex)??0)+Ae.delta)});let G=[...Te].filter(Y=>(oe.get(Y)??0)<-1),X=[...Te].filter(Y=>(oe.get(Y)??0)>1),ee=[...Te].filter(Y=>Math.abs(oe.get(Y)??0)<=1);G.sort((Y,Ae)=>(oe.get(Ae)??0)-(oe.get(Y)??0)),X.sort((Y,Ae)=>(oe.get(Y)??0)-(oe.get(Ae)??0));let q=s((Y,Ae)=>{he.filter(me=>me.trackIndex===Y).forEach(me=>{let Se=v.has(me.edgeIndex)?re.coord:Ae;Ie.set(`${me.edgeIndex}-${me.segmentIndex}`,Se)})},"assignCoord"),ie=0;for(let Y of G)ie++,q(Y,re.coord-ie*EB);if(ee.length===0&&Te.size>0){let Y=[...Te].sort((Se,Ce)=>Math.abs(oe.get(Se)??0)-Math.abs(oe.get(Ce)??0))[0],Ae=G.indexOf(Y);Ae!==-1&&G.splice(Ae,1);let me=X.indexOf(Y);me!==-1&&X.splice(me,1),ee.push(Y)}let j=0;for(let Y of ee){if(j===0)q(Y,re.coord);else{let Ae=j%2===1?1:-1,me=Math.ceil(j/2);q(Y,re.coord+Ae*me*EB*.5)}j++}let U=0;for(let Y of X)U++,q(Y,re.coord+U*EB)}}for(let[re,ue]of i.entries()){let le=y[re]??[];if(le.length===0)continue;let he=[],Te=a.get(ue.start),oe=a.get(ue.end),{pSrcPort:G,pDstPort:X}=V(re,Te,oe),ee=le.map(j=>{let U=g[j],Y=Ie.get(`${U.edgeIndex}-${U.segmentIndex}`)??U.pipe.coord;return{orient:U.orientation,coord:Y,from:U.from,to:U.to}});he.push(G);for(let j=0;jJr&&he.push(x1(U,Ae)),Ce&&Se.orient===U.orient)if(Math.abs(U.coord-Se.coord)>Jr){let Me=U.orient==="vertical"?(Ae+Se.from)/2:vve(U,Se);he.push(x1(U,Me),x1(Se,Me))}else(j===0||j===ee.length-2)&&he.push(x1(U,vve(U,Se)));else if(Ce)he.push(x1(U,Se.coord));else{let Me=Math.abs(U.from-Ae)Jr||Math.abs(q.y-X.y)>Jr)&&he.push(X);let ie=[];he.length>0&&ie.push(he[0]);for(let j=1;jJr||Math.abs(U.y-Y.y)>Jr)&&ie.push(U)}ue.points=ie}for(let re of i){let ue=re.__originalEdge;ue&&re.points&&(ue.points=re.points)}e.edges=(e.edges??[]).filter(re=>!re.isLayoutOnly);let Ne=s((re,ue)=>{let le=ue.x??0,he=ue.y??0,Te=ue.width??0,oe=ue.height??0;if(Te<=0||oe<=0)return re;let G=le-Te/2,X=le+Te/2,ee=he-oe/2,q=he+oe/2;if(re.xX||re.yq)return re;let ie=re.x-G,j=X-re.x,U=re.y-ee,Y=q-re.y,Ae=Math.min(ie,j,U,Y);return Ae===ie?{x:G,y:re.y}:Ae===j?{x:X,y:re.y}:Ae===U?{x:re.x,y:ee}:{x:re.x,y:q}},"nodeBoundaryClamp");for(let re of e.edges){let ue=re.points;if(!ue||ue.length<2)continue;let le=re.start,he=re.end,Te=le?a.get(le):void 0,oe=he?a.get(he):void 0;Te&&(ue[0]=Ne(ue[0],Te)),oe&&(ue[ue.length-1]=Ne(ue[ue.length-1],oe))}return e}var Jr,hct,Ym,v1,c5,El,EB,bve=F(()=>{"use strict";y1();Jr=N1e.EPSILON,hct=8,Ym=15,v1=15,c5=25,El=20,EB=10;s(yve,"chooseOrthogonalSide");s(vve,"sharedLineEndpointCoord");s(x1,"pointOnLine");s(xve,"routeEdgesOrthogonal")});function dct(e){return e.direction??"TB"}function Tve(e){let t=Iye(e),r=e.config.flowchart?.nodeSpacing??40,n=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,l=dct(e),{ordered:u,coordinates:h}=mve(t,{nodeGap:r,layerGap:n,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:l});Mye(t,u,h,{nodeGap:r,layerGap:n});for(let d of e.edges??[])delete d.points;xve(e,l);for(let d of e.edges??[])(!d.curve||d.curve==="basis")&&(d.curve="rounded");return L1e(e,l),yB(e),l}var Cve=F(()=>{"use strict";D1e();nB();gve();bve();s(dct,"getSwimlaneDirection");s(Tve,"runSwimlaneLayoutCore")});var Sve={};sr(Sve,{render:()=>pct});function fct(e){Dye(e);let t=Nye(e);e.nodes=t.nodes,e.edges=t.edges}var pct,wve=F(()=>{"use strict";H3();_ye();nB();Pye();Cve();s(fct,"prepareSwimlaneLayout");pct=f1({prepareLayout:fct,runLayoutCore:Tve,afterPaint:Rye})});function nF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},"n"),e:s(function(u){throw u},"e"),f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. @@ -995,7 +995,7 @@ Expecting `+dw.join(", ")+", got '"+(this.terminals_[bt]||bt)+"'":cD="Parse erro fill: ${e.arrowheadColor}; } - .edgePath .path { + .edgePaths .path { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth??2}px; } @@ -1758,7 +1758,7 @@ Expecting `+he.join(", ")+", got '"+(this.terminals_[Fe]||Fe)+"'":Te="Parse erro fill: ${e.titleColor||e.textColor}; font-family: ${e.fontFamily}; } -`,"getStyles"),TIe=O3t});var SIe={};sr(SIe,{diagram:()=>B3t});var B3t,wIe=F(()=>{"use strict";j7e();mIe();bIe();CIe();B3t={parser:Y7e,db:fIe,renderer:xIe,styles:TIe}});var AIe,RIe=F(()=>{"use strict";ls();St();AIe={parse:s(async e=>{let t=await Li("info",e);se.debug(t)},"parse")}});var z3t,V3t,_Ie,LIe=F(()=>{"use strict";z3t={version:"11.17.1"},V3t=s(()=>z3t.version,"getVersion"),_Ie={getVersion:V3t}});var wn,cs=F(()=>{"use strict";Wr();Jt();wn=s(e=>{let{securityLevel:t}=Pe(),r=ut("body");if(t==="sandbox"){let a=ut(`#i${e}`).node()?.contentDocument??document;r=ut(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var W3t,DIe,IIe=F(()=>{"use strict";St();cs();Vn();W3t=s((e,t,r)=>{se.debug(`rendering info diagram +`,"getStyles"),TIe=O3t});var SIe={};sr(SIe,{diagram:()=>B3t});var B3t,wIe=F(()=>{"use strict";j7e();mIe();bIe();CIe();B3t={parser:Y7e,db:fIe,renderer:xIe,styles:TIe}});var AIe,RIe=F(()=>{"use strict";ls();St();AIe={parse:s(async e=>{let t=await Li("info",e);se.debug(t)},"parse")}});var z3t,V3t,_Ie,LIe=F(()=>{"use strict";z3t={version:"11.17.2"},V3t=s(()=>z3t.version,"getVersion"),_Ie={getVersion:V3t}});var wn,cs=F(()=>{"use strict";Wr();Jt();wn=s(e=>{let{securityLevel:t}=Pe(),r=ut("body");if(t==="sandbox"){let a=ut(`#i${e}`).node()?.contentDocument??document;r=ut(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var W3t,DIe,IIe=F(()=>{"use strict";St();cs();Vn();W3t=s((e,t,r)=>{se.debug(`rendering info diagram `+e);let n=wn(t);jr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),DIe={draw:W3t}});var MIe={};sr(MIe,{diagram:()=>q3t});var q3t,NIe=F(()=>{"use strict";RIe();LIe();IIe();q3t={parser:AIe,db:_Ie,renderer:DIe}});var BIe,jU,U_,XU,Y3t,j3t,X3t,K3t,Z3t,Q3t,J3t,Y_,KU=F(()=>{"use strict";St();$n();Qi();BIe=mr.pie,jU={sections:new Map,showData:!1,config:BIe},U_=jU.sections,XU=jU.showData,Y3t=structuredClone(BIe),j3t=s(()=>structuredClone(Y3t),"getConfig"),X3t=s(()=>{U_=new Map,XU=jU.showData,Tr()},"clear"),K3t=s(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);U_.has(e)||(U_.set(e,t),se.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),Z3t=s(()=>U_,"getSections"),Q3t=s(e=>{XU=e},"setShowData"),J3t=s(()=>XU,"getShowData"),Y_={getConfig:j3t,clear:X3t,setDiagramTitle:Gr,getDiagramTitle:Pr,setAccTitle:Lr,getAccTitle:Ir,setAccDescription:Mr,getAccDescription:Nr,addSection:K3t,getSections:Z3t,setShowData:Q3t,getShowData:J3t}});var e5t,$Ie,FIe=F(()=>{"use strict";ls();St();to();KU();e5t=s((e,t)=>{Hn(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),$Ie={parse:s(async e=>{let t=await Li("pie",e);se.debug(t),e5t(t,Y_)},"parse")}});var t5t,GIe,zIe=F(()=>{"use strict";t5t=s(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; @@ -2543,7 +2543,7 @@ Expecting `+Z.join(", ")+", got '"+(this.terminals_[B]||B)+"'":pe="Parse error o fill: ${e.arrowheadColor}; } - .edgePath .path { + .edgePaths .path { stroke: ${e.lineColor}; stroke-width: 1.5px; } @@ -3083,7 +3083,7 @@ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Ye="Parse error fill: ${e.arrowheadColor}; } - .edgePath .path { + .edgePaths .path { stroke: ${e.lineColor}; stroke-width: 2.0px; } @@ -3583,7 +3583,7 @@ A`,o,o,0,a.large?1:0,a.sweep?1:0,n(a.p1.x),n(a.p1.y))}return i.join(" ")}functio `}else n+=`${e.themeCSS} `;return n+Z7(r)},"createCssStyles"),tNt=s((e,t)=>oD(nGe(`${e}{${t}}`),aGe([s(function(n,i,a,o){if(n.type==="rule"&&Array.isArray(n.props)){if(n.parent&&n.parent.type===cw)return;n.props=n.props.map(l=>l===e&&Array.isArray(n.children)&&n.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(l.startsWith(`${e} `)||l.startsWith(`${e}>`))&&!l.startsWith(`${e} ||`)?l:`${e} ${l}`)}else n.type.startsWith("@")&&([...[GFe,VFe,JL,qFe,"@container","@starting-style"],cw].includes(n.type)||(se.warn(`Removing unsupported at-rule ${n.type} from CSS`),n.type=kx))},"addNamespace"),iGe])),"compileCSS"),rNt=s((e,t,r,n)=>{let i=eNt(e,r),a=xJ(t,i,{...e.themeVariables,theme:e.theme,look:e.look},n);return tNt(n,a)},"createUserStyles"),nNt=s((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=lo(n),n=n.replace(/
/g,"
"),n},"cleanUpSvgCode"),iNt=s((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":UMt,n=dGe(`${e}`);return``},"putIntoIFrame"),pGe=s((e,t,r,n,i)=>{let a=e.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",VMt);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function mGe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(mGe,"sandboxedIframe");var aNt=s((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),sNt=s(async function(e,t,r){wx();let n=gGe(t);t=n.code;let i=Lt();se.debug(i),t.length>(i?.maxTextSize??$Mt)&&(t=FMt);let a=`#${e}`,o="i"+e,l="#"+o,u="d"+e,h="#"+u,d=s(()=>{let I=ut(p?l:h).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=ut(document.body),p=i.securityLevel===GMt,m=i.securityLevel===zMt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let A=mGe(ut(r),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut(r);pGe(f,e,u,`font-family: ${g}`,WMt)}else{if(aNt(document,e,u,o),p){let A=mGe(ut(document.body),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut("body");pGe(f,e,u)}let y,v;try{y=await Dx.fromText(t,{title:n.title})}catch(A){if(i.suppressErrorRendering)throw d(),A;y=await Dx.fromText("error"),v=A}let x=f.select(h).node(),b=y.type,T=x.firstChild,w=T.firstChild,C=y.renderer.getClasses?.(t,y),S=rNt(i,b,C,a),k=document.createElement("style");k.innerHTML=S,T.insertBefore(k,w);try{await y.renderer.draw(t,e,"11.17.1",y)}catch(A){throw i.suppressErrorRendering?d():SNe.draw(t,e,"11.17.1"),A}let R=f.select(`${h} svg`),M=y.db.getAccTitle?.(),P=y.db.getAccDescription?.();lNt(b,R,M,P);let _=s(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",qMt);let A=f.select(h).node().innerHTML;if(se.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),A=nNt(A,p,Aa(i.arrowMarkerAbsolute)),p){let I=f.select(h+" svg").node();A=iNt(A,I)}else m||(A=ao.sanitize(A,{ADD_TAGS:ZMt,ADD_ATTR:QMt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return cGe(),A},"serializeSvg")();if(v)throw v;return d(),{diagramType:b,svg:_,bindFunctions:y.db.bindFunctions}},"render");function oNt(e={}){let t=ii({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),rZ(t),t?.theme&&t.theme in dl?t.themeVariables=dl[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=dl.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?GD(t):zD();Mx(r.logLevel),wx()}s(oNt,"initialize");var yGe=s((e,t={})=>{let{code:r}=NX(e);return Dx.fromText(r,t)},"getDiagramFromText");function lNt(e,t,r,n){sGe(t,e),oGe(t,r,n,t.attr("id"))}s(lNt,"addA11yInfo");var $p=Object.freeze({render:sNt,parse:JMt,getDiagramFromText:yGe,initialize:oNt,getConfig:Lt,setConfig:kw,getSiteConfig:zD,updateSiteConfig:nZ,reset:s(()=>{Gx()},"reset"),globalReset:s(()=>{Gx(wd)},"globalReset"),defaultConfig:wd});Mx(Lt().logLevel);Gx(Lt());ep();er();H3();var cNt=s((e,t,r)=>{se.warn(e),XN(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),vGe=s(async function(e={querySelector:".mermaid"}){try{await uNt(e)}catch(t){if(XN(t)&&se.error(t.str),Td.parseError&&Td.parseError(t),!e.suppressErrors)throw se.error("Use the suppressErrors option to suppress these errors"),t}},"run"),uNt=s(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=$p.getConfig();se.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");se.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(se.debug("Start On Load: "+n?.startOnLoad),$p.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new or.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){se.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=ck(or.entityDecode(o)).trim().replace(//gi,"
");let d=or.detectInit(o);d&&se.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await CGe(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){cNt(f,l,Td.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),xGe=s(function(e){$p.initialize(e)},"initialize"),hNt=s(async function(e,t,r){se.warn("mermaid.init is deprecated. Please use run instead."),e&&xGe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await vGe(n)},"init"),dNt=s(async(e,{lazyLoad:t=!0}={})=>{wx(),tb(...e),t===!1&&await FFe()},"registerExternalDiagrams"),bGe=s(function(){if(Td.startOnLoad){let{startOnLoad:e}=$p.getConfig();e&&Td.run().catch(t=>se.error("Mermaid failed to initialize",t))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",bGe,!1)}var fNt=s(function(e){Td.parseError=e},"setParseErrorHandler"),lD=[],PX=!1,TGe=s(async()=>{if(!PX){for(PX=!0;lD.length>0;){let e=lD.shift();if(e)try{await e()}catch(t){se.error("Error executing queue",t)}}PX=!1}},"executeQueue"),pNt=s(async(e,t)=>new Promise((r,n)=>{let i=s(()=>new Promise((a,o)=>{$p.parse(e,t).then(l=>{a(l),r(l)},l=>{se.error("Error parsing",l),Td.parseError?.(l),o(l),n(l)})}),"performCall");lD.push(i),TGe().catch(n)}),"parse"),CGe=s((e,t,r)=>new Promise((n,i)=>{let a=s(()=>new Promise((o,l)=>{$p.render(e,t,r).then(u=>{o(u),n(u)},u=>{se.error("Error parsing",u),Td.parseError?.(u),l(u),i(u)})}),"performCall");lD.push(a),TGe().catch(i)}),"render"),mNt=s(()=>Object.keys(ch).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Td={startOnLoad:!0,mermaidAPI:$p,parse:pNt,render:CGe,init:hNt,run:vGe,registerExternalDiagrams:dNt,registerLayoutLoaders:eG,initialize:xGe,parseError:void 0,contentLoaded:bGe,setParseErrorHandler:fNt,detectType:ry,registerIconPacks:ey,getRegisteredDiagramsMetadata:mNt},gNt=Td;return RGe(yNt);})(); +`},"putIntoIFrame"),pGe=s((e,t,r,n,i)=>{let a=e.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",VMt);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function mGe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(mGe,"sandboxedIframe");var aNt=s((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),sNt=s(async function(e,t,r){wx();let n=gGe(t);t=n.code;let i=Lt();se.debug(i),t.length>(i?.maxTextSize??$Mt)&&(t=FMt);let a=`#${e}`,o="i"+e,l="#"+o,u="d"+e,h="#"+u,d=s(()=>{let I=ut(p?l:h).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=ut(document.body),p=i.securityLevel===GMt,m=i.securityLevel===zMt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let A=mGe(ut(r),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut(r);pGe(f,e,u,`font-family: ${g}`,WMt)}else{if(aNt(document,e,u,o),p){let A=mGe(ut(document.body),o);f=ut(A.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=ut("body");pGe(f,e,u)}let y,v;try{y=await Dx.fromText(t,{title:n.title})}catch(A){if(i.suppressErrorRendering)throw d(),A;y=await Dx.fromText("error"),v=A}let x=f.select(h).node(),b=y.type,T=x.firstChild,w=T.firstChild,C=y.renderer.getClasses?.(t,y),S=rNt(i,b,C,a),k=document.createElement("style");k.innerHTML=S,T.insertBefore(k,w);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(A){throw i.suppressErrorRendering?d():SNe.draw(t,e,"11.17.2"),A}let R=f.select(`${h} svg`),M=y.db.getAccTitle?.(),P=y.db.getAccDescription?.();lNt(b,R,M,P);let _=s(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",qMt);let A=f.select(h).node().innerHTML;if(se.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),A=nNt(A,p,Aa(i.arrowMarkerAbsolute)),p){let I=f.select(h+" svg").node();A=iNt(A,I)}else m||(A=ao.sanitize(A,{ADD_TAGS:ZMt,ADD_ATTR:QMt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return cGe(),A},"serializeSvg")();if(v)throw v;return d(),{diagramType:b,svg:_,bindFunctions:y.db.bindFunctions}},"render");function oNt(e={}){let t=ii({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),rZ(t),t?.theme&&t.theme in dl?t.themeVariables=dl[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=dl.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?GD(t):zD();Mx(r.logLevel),wx()}s(oNt,"initialize");var yGe=s((e,t={})=>{let{code:r}=NX(e);return Dx.fromText(r,t)},"getDiagramFromText");function lNt(e,t,r,n){sGe(t,e),oGe(t,r,n,t.attr("id"))}s(lNt,"addA11yInfo");var $p=Object.freeze({render:sNt,parse:JMt,getDiagramFromText:yGe,initialize:oNt,getConfig:Lt,setConfig:kw,getSiteConfig:zD,updateSiteConfig:nZ,reset:s(()=>{Gx()},"reset"),globalReset:s(()=>{Gx(wd)},"globalReset"),defaultConfig:wd});Mx(Lt().logLevel);Gx(Lt());ep();er();H3();var cNt=s((e,t,r)=>{se.warn(e),XN(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),vGe=s(async function(e={querySelector:".mermaid"}){try{await uNt(e)}catch(t){if(XN(t)&&se.error(t.str),Td.parseError&&Td.parseError(t),!e.suppressErrors)throw se.error("Use the suppressErrors option to suppress these errors"),t}},"run"),uNt=s(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=$p.getConfig();se.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");se.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(se.debug("Start On Load: "+n?.startOnLoad),$p.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new or.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){se.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=ck(or.entityDecode(o)).trim().replace(//gi,"
");let d=or.detectInit(o);d&&se.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await CGe(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){cNt(f,l,Td.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),xGe=s(function(e){$p.initialize(e)},"initialize"),hNt=s(async function(e,t,r){se.warn("mermaid.init is deprecated. Please use run instead."),e&&xGe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await vGe(n)},"init"),dNt=s(async(e,{lazyLoad:t=!0}={})=>{wx(),tb(...e),t===!1&&await FFe()},"registerExternalDiagrams"),bGe=s(function(){if(Td.startOnLoad){let{startOnLoad:e}=$p.getConfig();e&&Td.run().catch(t=>se.error("Mermaid failed to initialize",t))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",bGe,!1)}var fNt=s(function(e){Td.parseError=e},"setParseErrorHandler"),lD=[],PX=!1,TGe=s(async()=>{if(!PX){for(PX=!0;lD.length>0;){let e=lD.shift();if(e)try{await e()}catch(t){se.error("Error executing queue",t)}}PX=!1}},"executeQueue"),pNt=s(async(e,t)=>new Promise((r,n)=>{let i=s(()=>new Promise((a,o)=>{$p.parse(e,t).then(l=>{a(l),r(l)},l=>{se.error("Error parsing",l),Td.parseError?.(l),o(l),n(l)})}),"performCall");lD.push(i),TGe().catch(n)}),"parse"),CGe=s((e,t,r)=>new Promise((n,i)=>{let a=s(()=>new Promise((o,l)=>{$p.render(e,t,r).then(u=>{o(u),n(u)},u=>{se.error("Error parsing",u),Td.parseError?.(u),l(u),i(u)})}),"performCall");lD.push(a),TGe().catch(i)}),"render"),mNt=s(()=>Object.keys(ch).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Td={startOnLoad:!0,mermaidAPI:$p,parse:pNt,render:CGe,init:hNt,run:vGe,registerExternalDiagrams:dNt,registerLayoutLoaders:eG,initialize:xGe,parseError:void 0,contentLoaded:bGe,setParseErrorHandler:fNt,detectType:ry,registerIconPacks:ey,getRegisteredDiagramsMetadata:mNt},gNt=Td;return RGe(yNt);})(); /*! Bundled license information: lodash-es/lodash.js: diff --git a/nightly/nightly-release/index.html b/nightly/nightly-release/index.html index 91db147c..1dbbbea3 100644 --- a/nightly/nightly-release/index.html +++ b/nightly/nightly-release/index.html @@ -4,11 +4,11 @@ Redirecting... - - - + + + -You're being redirected to a new destination. +You're being redirected to a new destination. diff --git a/nightly/sitemap.xml b/nightly/sitemap.xml index d9bf4655..5436f933 100644 --- a/nightly/sitemap.xml +++ b/nightly/sitemap.xml @@ -2,150 +2,150 @@ https://bottom.pages.dev/stable/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/troubleshooting/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/command-line-options/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/cpu-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/disk-io-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/disk-table/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/flags/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/layout/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/memory-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/network-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/processes/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/styling/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/temperature-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/configuration/config-file/temperature-table/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/documentation/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/issues-and-pull-requests/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/packaging-and-distribution/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/development/build_process/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/development/deploy_process/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/development/dev_env/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/development/logging/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/contribution/development/testing/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/support/official/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/support/unofficial/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/autocomplete/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/basic-mode/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/general-usage/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/battery/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/cpu-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/disk-io-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/disk/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/memory-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/network-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/process/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/temperature-graph/ - 2026-08-25 + 2026-08-26 https://bottom.pages.dev/stable/usage/widgets/temperature-table/ - 2026-08-25 + 2026-08-26 \ No newline at end of file diff --git a/nightly/sitemap.xml.gz b/nightly/sitemap.xml.gz index a1f55010fc68f78098119a48c5f323b652e1eeca..fd650350dcd0c3de5969b3dcb6e3a3cbe356dd5d 100644 GIT binary patch delta 490 zcmVhwZC}uy3)yBAA+o56RI>d2A9&3+7H(Q}%rblL++Gu|)P&>jw z6PwugSj zi#LiiO(u-Wy8sH~tRs1*SyEdk;h*~`L(Ix16L&R1jgI!pVWnU~XY4-J)*D+@e0y`k z%ry~BFkw2?7f=ECh-qIRSWJI701;FbSHve@MS1x^D&;yt(dPv9Iq@@`T-M^``g~>^ zamW({zL3hYIHC-s=4(RC-m3)Pi_9d970s|WwgmZ^tkj#2SHix719*(H`*fe3AK$Mj zq9U#lqQ_H}V25`Ihl+?iS}T=G|4hW?^obBrju8`U+-}|AjF%(GL5^A>Q_*OX8B6yR zJupZy^oHD^icK*B3!#)vuP%}h#L&R|JW9sCj#z%0{J#MQpxi7lapX=u;sD= zqjZr;%hWSSk>dLK$K)3WNaQeVn#Xq8EFcUxx?nfW>&rLw)I4_&>zq6RFUsOTn`Xxx zziNFv9$Rt@lZn(~vYLin5lCN^df9$yx`#y>vw_Rgd8|DS-E4)5nI4&OYNLO#KBA(dadVGA3rk06OP?#x%#Y@Pipn4EV=3~yXarr{LO}(FqfHjh+O{v{{svdw$A2c zxOk&T(`3S^ybGW(&N`B3nkBV$68^c5GQ_NGGI3WE)aYoh999Y@bjI#eZN0Ho#kV&n z%v=-E1QVuHeE}7KkC^uLfyIA>0}w$~aYcOcRg{-^q*AUU6n#!mpA$dA$z?50uFq$- z5r;fM;0viNizCWFYQ84K?7d3xy~s?$SkVl7V@r^q$x6L>e?V+b~iw;;mJ;qNfg46?n=EsJnJ ga|