Lines Matching refs:matches

6 `)),b+=F+g[S+1]}),b}var Z0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e9(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var yOt={exports:{}};(function(i,a){(function(f,g){i.exports=g()})(Z0,function(){var f=1e3,g=6e4,w=36e5,v="millisecond",b="second",E="minute",S="hour",_="day",M="week",F="month",R="quarter",B="year",z="date",Y="Invalid Date",nt=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ot=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ft={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var Ot=["th","st","nd","rd"],It=V%100;return"["+V+(Ot[(It-20)%10]||Ot[It]||Ot[0])+"]"}},wt=function(V,Ot,It){var jt=String(V);return!jt||jt.length>=Ot?V:""+Array(Ot+1-jt.length).join(It)+V},mt={s:wt,z:function(V){var Ot=-V.utcOffset(),It=Math.abs(Ot),jt=Math.floor(It/60),xt=It%60;return(Ot<=0?"+":"-")+wt(jt,2,"0")+":"+wt(xt,2,"0")},m:function V(Ot,It){if(Ot.date()<It.date())return-V(It,Ot);var jt=12*(It.year()-Ot.year())+(It.month()-Ot.month()),xt=Ot.clone().add(jt,F),Ft=It-xt<0,Ct=Ot.clone().add(jt+(Ft?-1:1),F);return+(-(jt+(It-xt)/(Ft?xt-Ct:Ct-xt))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:F,y:B,w:M,d:_,D:z,h:S,m:E,s:b,ms:v,Q:R}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},ct="en",rt={};rt[ct]=ft;var it=function(V){return V instanceof K},gt=function V(Ot,It,jt){var xt;if(!Ot)return ct;if(typeof Ot=="string"){var Ft=Ot.toLowerCase();rt[Ft]&&(xt=Ft),It&&(rt[Ft]=It,xt=Ft);var Ct=Ot.split("-");if(!xt&&Ct.length>1)return V(Ct[0])}else{var kt=Ot.name;rt[kt]=Ot,xt=kt}return!jt&&xt&&(ct=xt),xt||!jt&&ct},Q=function(V,Ot){if(it(V))return V.clone();var It=typeof Ot=="object"?Ot:{};return It.date=V,It.args=arguments,new K(It)},dt=mt;dt.l=gt,dt.i=it,dt.w=function(V,Ot){return Q(V,{locale:Ot.$L,utc:Ot.$u,x:Ot.$x,$offset:Ot.$offset})};var K=function(){function V(It){this.$L=gt(It.locale,null,!0),this.parse(It)}var Ot=V.prototype;return Ot.parse=function(It){this.$d=function(jt){var xt=jt.date,Ft=jt.utc;if(xt===null)return new Date(NaN);if(dt.u(xt))return new Date;if(xt instanceof Date)return new Date(xt);if(typeof xt=="string"&&!/Z$/i.test(xt)){var Ct=xt.match(nt);if(Ct){var kt=Ct[2]-1||0,Gt=(Ct[7]||"0").substring(0,3);return Ft?new Date(Date.UTC(Ct[1],kt,Ct[3]||1,Ct[4]||0,Ct[5]||0,Ct[6]||0,Gt)):new Date(Ct[1],kt,Ct[3]||1,Ct[4]||0,Ct[5]||0,Ct[6]||0,Gt)}}return new Date(xt)}(It),this.$x=It.x||{},this.init()},Ot.init=function(){var It=this.$d;this.$y=It.getFullYear(),this.$M=It.getMonth(),this.$D=It.getDate(),this.$W=It.getDay(),this.$H=It.getHours(),this.$m=It.getMinutes(),this.$s=It.getSeconds(),this.$ms=It.getMilliseconds()},Ot.$utils=function(){return dt},Ot.isValid=function(){return this.$d.toString()!==Y},Ot.isSame=function(It,jt){var xt=Q(It);return this.startOf(jt)<=xt&&xt<=this.endOf(jt)},Ot.isAfter=function(It,jt){return Q(It)<this.startOf(jt)},Ot.isBefore=function(It,jt){return this.endOf(jt)<Q(It)},Ot.$g=function(It,jt,xt){return dt.u(It)?this[jt]:this.set(xt,It)},Ot.unix=function(){return Math.floor(this.valueOf()/1e3)},Ot.valueOf=function(){return this.$d.getTime()},Ot.startOf=function(It,jt){var xt=this,Ft=!!dt.u(jt)||jt,Ct=dt.p(It),kt=function(sn,be){var Ne=dt.w(xt.$u?Date.UTC(xt.$y,be,sn):new Date(xt.$y,be,sn),xt);return Ft?Ne:Ne.endOf(_)},Gt=function(sn,be){return dt.w(xt.toDate()[sn].apply(xt.toDate("s"),(Ft?[0,0,0,0]:[23,59,59,999]).slice(be)),xt)},Fe=this.$W,Mt=this.$M,pn=this.$D,Ae="set"+(this.$u?"UTC":"");switch(Ct){case B:return Ft?kt(1,0):kt(31,11);case F:return Ft?kt(1,Mt):kt(0,Mt+1);case M:var ye=this.$locale().weekStart||0,tn=(Fe<ye?Fe+7:Fe)-ye;return kt(Ft?pn-tn:pn+(6-tn),Mt);case _:case z:return Gt(Ae+"Hours",0);case S:return Gt(Ae+"Minutes",1);case E:return Gt(Ae+"Seconds",2);case b:return Gt(Ae+"Milliseconds",3);default:return this.clone()}},Ot.endOf=function(It){return this.startOf(It,!1)},Ot.$set=function(It,jt){var xt,Ft=dt.p(It),Ct="set"+(this.$u?"UTC":""),kt=(xt={},xt[_]=Ct+"Date",xt[z]=Ct+"Date",xt[F]=Ct+"Month",xt[B]=Ct+"FullYear",xt[S]=Ct+"Hours",xt[E]=Ct+"Minutes",xt[b]=Ct+"Seconds",xt[v]=Ct+"Milliseconds",xt)[Ft],Gt=Ft===_?this.$D+(jt-this.$W):jt;if(Ft===F||Ft===B){var Fe=this.clone().set(z,1);Fe.$d[kt](Gt),Fe.init(),this.$d=Fe.set(z,Math.min(this.$D,Fe.daysInMonth())).$d}else kt&&this.$d[kt](Gt);return this.init(),this},Ot.set=function(It,jt){return this.clone().$set(It,jt)},Ot.get=function(It){return this[dt.p(It)]()},Ot.add=function(It,jt){var xt,Ft=this;It=Number(It);var Ct=dt.p(jt),kt=function(Mt){var pn=Q(Ft);return dt.w(pn.date(pn.date()+Math.round(Mt*It)),Ft)};if(Ct===F)return this.set(F,this.$M+It);if(Ct===B)return this.set(B,this.$y+It);if(Ct===_)return kt(1);if(Ct===M)return kt(7);var Gt=(xt={},xt[E]=g,xt[S]=w,xt[b]=f,xt)[Ct]||1,Fe=this.$d.getTime()+It*Gt;return dt.w(Fe,this)},Ot.subtract=function(It,jt){return this.add(-1*It,jt)},Ot.format=function(It){var jt=this,xt=this.$locale();if(!this.isValid())return xt.invalidDate||Y;var Ft=It||"YYYY-MM-DDTHH:mm:ssZ",Ct=dt.z(this),kt=this.$H,Gt=this.$m,Fe=this.$M,Mt=xt.weekdays,pn=xt.months,Ae=function(be,Ne,Xt,_e){return be&&(be[Ne]||be(jt,Ft))||Xt[Ne].slice(0,_e)},ye=function(be){return dt.s(kt%12||12,be,"0")},tn=xt.meridiem||function(be,Ne,Xt){var _e=be<12?"AM":"PM";return Xt?_e.toLowerCase():_e},sn={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Fe+1,MM:dt.s(Fe+1,2,"0"),MMM:Ae(xt.monthsShort,Fe,pn,3),MMMM:Ae(pn,Fe),D:this.$D,DD:dt.s(this.$D,2,"0"),d:String(this.$W),dd:Ae(xt.weekdaysMin,this.$W,Mt,2),ddd:Ae(xt.weekdaysShort,this.$W,Mt,3),dddd:Mt[this.$W],H:String(kt),HH:dt.s(kt,2,"0"),h:ye(1),hh:ye(2),a:tn(kt,Gt,!0),A:tn(kt,Gt,!1),m:String(Gt),mm:dt.s(Gt,2,"0"),s:String(this.$s),ss:dt.s(this.$s,2,"0"),SSS:dt.s(this.$ms,3,"0"),Z:Ct};return Ft.replace(ot,function(be,Ne){return Ne||sn[be]||Ct.replace(":","")})},Ot.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Ot.diff=function(It,jt,xt){var Ft,Ct=dt.p(jt),kt=Q(It),Gt=(kt.utcOffset()-this.utcOffset())*g,Fe=this-kt,Mt=dt.m(this,kt);return Mt=(Ft={},Ft[B]=Mt/12,Ft[F]=Mt,Ft[R]=Mt/3,Ft[M]=(Fe-Gt)/6048e5,Ft[_]=(Fe-Gt)/864e5,Ft[S]=Fe/w,Ft[E]=Fe/g,Ft[b]=Fe/f,Ft)[Ct]||Fe,xt?Mt:dt.a(Mt)},Ot.daysInMonth=function(){return this.endOf(F).$D},Ot.$locale=function(){return rt[this.$L]},Ot.locale=function(It,jt){if(!It)return this.$L;var xt=this.clone(),Ft=gt(It,jt,!0);return Ft&&(xt.$L=Ft),xt},Ot.clone=function(){return dt.w(this.$d,this)},Ot.toDate=function(){return new Date(this.valueOf())},Ot.toJSON=function(){return this.isValid()?this.toISOString():null},Ot.toISOString=function(){return this.$d.toISOString()},Ot.toString=function(){return this.$d.toUTCString()},V}(),yt=K.prototype;return Q.prototype=yt,[["$ms",v],["$s",b],["$m",E],["$H",S],["$W",_],["$M",F],["$y",B],["$D",z]].forEach(function(V){yt[V[1]]=function(Ot){return this.$g(Ot,V[0],V[1])}}),Q.extend=function(V,Ot){return V.$i||(V(Ot,K,Q),V.$i=!0),Q},Q.locale=gt,Q.isDayjs=it,Q.unix=function(V){return Q(1e3*V)},Q.en=rt[ct],Q.Ls=rt,Q.p={},Q})})(yOt);var g9e=yOt.exports;const tg=e9(g9e),yx={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Kt={trace:(...i)=>{},debug:(...i)=>{},info:(...i)=>{},warn:(...i)=>{},error:(...i)=>{},fatal:(...i)=>{}},d0t=function(i="fatal"){let a=yx.fatal;typeof i=="string"?(i=i.toLowerCase(),i in yx&&(a=yx[i])):typeof i=="number"&&(a=i),Kt.trace=()=>{},Kt.debug=()=>{},Kt.info=()=>{},Kt.warn=()=>{},Kt.error=()=>{},Kt.fatal=()=>{},a<=yx.fatal&&(Kt.fatal=console.error?console.error.bind(console,Gw("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Gw("FATAL"))),a<=yx.error&&(Kt.error=console.error?console.error.bind(console,Gw("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Gw("ERROR"))),a<=yx.warn&&(Kt.warn=console.warn?console.warn.bind(console,Gw("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Gw("WARN"))),a<=yx.info&&(Kt.info=console.info?console.info.bind(console,Gw("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Gw("INFO"))),a<=yx.debug&&(Kt.debug=console.debug?console.debug.bind(console,Gw("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gw("DEBUG"))),a<=yx.trace&&(Kt.trace=console.debug?console.debug.bind(console,Gw("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gw("TRACE")))},Gw=i=>`%c${tg().format("ss.SSS")} : ${i} : `;var g0t={};Object.defineProperty(g0t,"__esModule",{value:!0});var h8=g0t.sanitizeUrl=void 0,p9e=/^([^\w]*)(javascript|data|vbscript)/im,b9e=/&#(\w+)(^\w|;)?/g,w9e=/&(newline|tab);/gi,m9e=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,v9e=/^.+(:|&colon;)/gim,y9e=[".","/"];function x9e(i){return y9e.indexOf(i[0])>-1}function k9e(i){return i.replace(b9e,function(a,f){return String.fromCharCode(f)})}function E9e(i){var a=k9e(i||"").replace(w9e,"").replace(m9e,"").trim();if(!a)return"about:blank";if(x9e(a))return a;var f=a.match(v9e);if(!f)return a;var g=f[0];return p9e.test(g)?"about:blank":a}h8=g0t.sanitizeUrl=E9e;function nW(i,a){return i==null||a==null?NaN:i<a?-1:i>a?1:i>=a?0:NaN}function T9e(i,a){return i==null||a==null?NaN:a<i?-1:a>i?1:a>=i?0:NaN}function p0t(i){let a,f,g;i.length!==2?(a=nW,f=(E,S)=>nW(i(E),S),g=(E,S)=>i(E)-S):(a=i===nW||i===T9e?i:C9e,f=i,g=i);function w(E,S,_=0,M=E.length){if(_<M){if(a(S,S)!==0)return M;do{const F=_+M>>>1;f(E[F],S)<0?_=F+1:M=F}while(_<M)}return _}function v(E,S,_=0,M=E.length){if(_<M){if(a(S,S)!==0)return M;do{const F=_+M>>>1;f(E[F],S)<=0?_=F+1:M=F}while(_<M)}return _}function b(E,S,_=0,M=E.length){const F=w(E,S,_,M-1);return F>_&&g(E[F-1],S)>-g(E[F],S)?F-1:F}return{left:w,center:b,right:v}}function C9e(){return 0}function S9e(i){return i===null?NaN:+i}const _9e=p0t(nW).right;p0t(S9e).center;const A9e=_9e;class xOt extends Map{constructor(a,f=M9e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:f}}),a!=null)for(const[g,w]of a)this.set(g,w)}get(a){return super.get(kOt(this,a))}has(a){return super.has(kOt(this,a))}set(a,f){return super.set(L9e(this,a),f)}delete(a){return super.delete(D9e(this,a))}}function kOt({_intern:i,_key:a},f){const g=a(f);return i.has(g)?i.get(g):f}function L9e({_intern:i,_key:a},f){const g=a(f);return i.has(g)?i.get(g):(i.set(g,f),f)}function D9e({_intern:i,_key:a},f){const g=a(f);return i.has(g)&&(f=i.get(g),i.delete(g)),f}function M9e(i){return i!==null&&typeof i=="object"?i.valueOf():i}const I9e=Math.sqrt(50),O9e=Math.sqrt(10),N9e=Math.sqrt(2);function rW(i,a,f){const g=(a-i)/Math.max(0,f),w=Math.floor(Math.log10(g)),v=g/Math.pow(10,w),b=v>=I9e?10:v>=O9e?5:v>=N9e?2:1;let E,S,_;return w<0?(_=Math.pow(10,-w)/b,E=Math.round(i*_),S=Math.round(a*_),E/_<i&&++E,S/_>a&&--S,_=-_):(_=Math.pow(10,w)*b,E=Math.round(i/_),S=Math.round(a/_),E*_<i&&++E,S*_>a&&--S),S<E&&.5<=f&&f<2?rW(i,a,f*2):[E,S,_]}function P9e(i,a,f){if(a=+a,i=+i,f=+f,!(f>0))return[];if(i===a)return[i];const g=a<i,[w,v,b]=g?rW(a,i,f):rW(i,a,f);if(!(v>=w))return[];const E=v-w+1,S=new Array(E);if(g)if(b<0)for(let _=0;_<E;++_)S[_]=(v-_)/-b;else for(let _=0;_<E;++_)S[_]=(v-_)*b;else if(b<0)for(let _=0;_<E;++_)S[_]=(w+_)/-b;else for(let _=0;_<E;++_)S[_]=(w+_)*b;return S}function b0t(i,a,f){return a=+a,i=+i,f=+f,rW(i,a,f)[2]}function w0t(i,a,f){a=+a,i=+i,f=+f;const g=a<i,w=g?b0t(a,i,f):b0t(i,a,f);return(g?-1:1)*(w<0?1/-w:w)}function F9e(i,a){let f;if(a===void 0)for(const g of i)g!=null&&(f<g||f===void 0&&g>=g)&&(f=g);else{let g=-1;for(let w of i)(w=a(w,++g,i))!=null&&(f<w||f===void 0&&w>=w)&&(f=w)}return f}function B9e(i,a){let f;if(a===void 0)for(const g of i)g!=null&&(f>g||f===void 0&&g>=g)&&(f=g);else{let g=-1;for(let w of i)(w=a(w,++g,i))!=null&&(f>w||f===void 0&&w>=w)&&(f=w)}return f}function R9e(i,a,f){i=+i,a=+a,f=(w=arguments.length)<2?(a=i,i=0,1):w<3?1:+f;for(var g=-1,w=Math.max(0,Math.ceil((a-i)/f))|0,v=new Array(w);++g<w;)v[g]=i+g*f;return v}function j9e(i){return i}var iW=1,m0t=2,v0t=3,sW=4,EOt=1e-6;function $9e(i){return"translate("+i+",0)"}function z9e(i){return"translate(0,"+i+")"}function q9e(i){return a=>+i(a)}function H9e(i,a){return a=Math.max(0,i.bandwidth()-a*2)/2,i.round()&&(a=Math.round(a)),f=>+i(f)+a}function V9e(){return!this.__axis}function TOt(i,a){var f=[],g=null,w=null,v=6,b=6,E=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,_=i===iW||i===sW?-1:1,M=i===sW||i===m0t?"x":"y",F=i===iW||i===v0t?$9e:z9e;function R(B){var z=g??(a.ticks?a.ticks.apply(a,f):a.domain()),Y=w??(a.tickFormat?a.tickFormat.apply(a,f):j9e),nt=Math.max(v,0)+E,ot=a.range(),ft=+ot[0]+S,wt=+ot[ot.length-1]+S,mt=(a.bandwidth?H9e:q9e)(a.copy(),S),ct=B.selection?B.selection():B,rt=ct.selectAll(".domain").data([null]),it=ct.selectAll(".tick").data(z,a).order(),gt=it.exit(),Q=it.enter().append("g").attr("class","tick"),dt=it.select("line"),K=it.select("text");rt=rt.merge(rt.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),it=it.merge(Q),dt=dt.merge(Q.append("line").attr("stroke","currentColor").attr(M+"2",_*v)),K=K.merge(Q.append("text").attr("fill","currentColor").attr(M,_*nt).attr("dy",i===iW?"0em":i===v0t?"0.71em":"0.32em")),B!==ct&&(rt=rt.transition(B),it=it.transition(B),dt=dt.transition(B),K=K.transition(B),gt=gt.transition(B).attr("opacity",EOt).attr("transform",function(yt){return isFinite(yt=mt(yt))?F(yt+S):this.getAttribute("transform")}),Q.attr("opacity",EOt).attr("transform",function(yt){var V=this.parentNode.__axis;return F((V&&isFinite(V=V(yt))?V:mt(yt))+S)})),gt.remove(),rt.attr("d",i===sW||i===m0t?b?"M"+_*b+","+ft+"H"+S+"V"+wt+"H"+_*b:"M"+S+","+ft+"V"+wt:b?"M"+ft+","+_*b+"V"+S+"H"+wt+"V"+_*b:"M"+ft+","+S+"H"+wt),it.attr("opacity",1).attr("transform",function(yt){return F(mt(yt)+S)}),dt.attr(M+"2",_*v),K.attr(M,_*nt).text(Y),ct.filter(V9e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",i===m0t?"start":i===sW?"end":"middle"),ct.each(function(){this.__axis=mt})}return R.scale=function(B){return arguments.length?(a=B,R):a},R.ticks=function(){return f=Array.from(arguments),R},R.tickArguments=function(B){return arguments.length?(f=B==null?[]:Array.from(B),R):f.slice()},R.tickValues=function(B){return arguments.length?(g=B==null?null:Array.from(B),R):g&&g.slice()},R.tickFormat=function(B){return arguments.length?(w=B,R):w},R.tickSize=function(B){return arguments.length?(v=b=+B,R):v},R.tickSizeInner=function(B){return arguments.length?(v=+B,R):v},R.tickSizeOuter=function(B){return arguments.length?(b=+B,R):b},R.tickPadding=function(B){return arguments.length?(E=+B,R):E},R.offset=function(B){return arguments.length?(S=+B,R):S},R}function U9e(i){return TOt(iW,i)}function G9e(i){return TOt(v0t,i)}var K9e={value:()=>{}};function COt(){for(var i=0,a=arguments.length,f={},g;i<a;++i){if(!(g=arguments[i]+"")||g in f||/[\s.]/.test(g))throw new Error("illegal type: "+g);f[g]=[]}return new aW(f)}function aW(i){this._=i}function W9e(i,a){return i.trim().split(/^|\s+/).map(function(f){var g="",w=f.indexOf(".");if(w>=0&&(g=f.slice(w+1),f=f.slice(0,w)),f&&!a.hasOwnProperty(f))throw new Error("unknown type: "+f);return{type:f,name:g}})}aW.prototype=COt.prototype={constructor:aW,on:function(i,a){var f=this._,g=W9e(i+"",f),w,v=-1,b=g.length;if(arguments.length<2){for(;++v<b;)if((w=(i=g[v]).type)&&(w=Y9e(f[w],i.name)))return w;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++v<b;)if(w=(i=g[v]).type)f[w]=SOt(f[w],i.name,a);else if(a==null)for(w in f)f[w]=SOt(f[w],i.name,null);return this},copy:function(){var i={},a=this._;for(var f in a)i[f]=a[f].slice();return new aW(i)},call:function(i,a){if((w=arguments.length-2)>0)for(var f=new Array(w),g=0,w,v;g<w;++g)f[g]=arguments[g+2];if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(v=this._[i],g=0,w=v.length;g<w;++g)v[g].value.apply(a,f)},apply:function(i,a,f){if(!this._.hasOwnProperty(i))throw new Error("unknown type: "+i);for(var g=this._[i],w=0,v=g.length;w<v;++w)g[w].value.apply(a,f)}};function Y9e(i,a){for(var f=0,g=i.length,w;f<g;++f)if((w=i[f]).name===a)return w.value}function SOt(i,a,f){for(var g=0,w=i.length;g<w;++g)if(i[g].name===a){i[g]=K9e,i=i.slice(0,g).concat(i.slice(g+1));break}return f!=null&&i.push({name:a,value:f}),i}var y0t="http://www.w3.org/1999/xhtml";const _Ot={svg:"http://www.w3.org/2000/svg",xhtml:y0t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function oW(i){var a=i+="",f=a.indexOf(":");return f>=0&&(a=i.slice(0,f))!=="xmlns"&&(i=i.slice(f+1)),_Ot.hasOwnProperty(a)?{space:_Ot[a],local:i}:i}function X9e(i){return function(){var a=this.ownerDocument,f=this.namespaceURI;return f===y0t&&a.documentElement.namespaceURI===y0t?a.createElement(i):a.createElementNS(f,i)}}function Q9e(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function AOt(i){var a=oW(i);return(a.local?Q9e:X9e)(a)}function J9e(){}function x0t(i){return i==null?J9e:function(){return this.querySelector(i)}}function Z9e(i){typeof i!="function"&&(i=x0t(i));for(var a=this._groups,f=a.length,g=new Array(f),w=0;w<f;++w)for(var v=a[w],b=v.length,E=g[w]=new Array(b),S,_,M=0;M<b;++M)(S=v[M])&&(_=i.call(S,S.__data__,M,v))&&("__data__"in S&&(_.__data__=S.__data__),E[M]=_);return new Gg(g,this._parents)}function LOt(i){return i==null?[]:Array.isArray(i)?i:Array.from(i)}function tCe(){return[]}function DOt(i){return i==null?tCe:function(){return this.querySelectorAll(i)}}function eCe(i){return function(){return LOt(i.apply(this,arguments))}}function nCe(i){typeof i=="function"?i=eCe(i):i=DOt(i);for(var a=this._groups,f=a.length,g=[],w=[],v=0;v<f;++v)for(var b=a[v],E=b.length,S,_=0;_<E;++_)(S=b[_])&&(g.push(i.call(S,S.__data__,_,b)),w.push(S));return new Gg(g,w)}function MOt(i){return function(){return this.matches(i)}}function IOt(i){return function(a){return a.matches(i)}}var rCe=Array.prototype.find;function iCe(i){return function(){return rCe.call(this.children,i)}}function sCe(){return this.firstElementChild}function aCe(i){return this.select(i==null?sCe:iCe(typeof i=="function"?i:IOt(i)))}var oCe=Array.prototype.filter;function cCe(){return Array.from(this.children)}function uCe(i){return function(){return oCe.call(this.children,i)}}function lCe(i){return this.selectAll(i==null?cCe:uCe(typeof i=="function"?i:IOt(i)))}function hCe(i){typeof i!="function"&&(i=MOt(i));for(var a=this._groups,f=a.length,g=new Array(f),w=0;w<f;++w)for(var v=a[w],b=v.length,E=g[w]=[],S,_=0;_<b;++_)(S=v[_])&&i.call(S,S.__data__,_,v)&&E.push(S);return new Gg(g,this._parents)}function OOt(i){return new Array(i.length)}function fCe(){return new Gg(this._enter||this._groups.map(OOt),this._parents)}function cW(i,a){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=a}cW.prototype={constructor:cW,appendChild:function(i){return this._parent.insertBefore(i,this._next)},insertBefore:function(i,a){return this._parent.insertBefore(i,a)},querySelector:function(i){return this._parent.querySelector(i)},querySelectorAll:function(i){return this._parent.querySelectorAll(i)}};function dCe(i){return function(){return i}}function gCe(i,a,f,g,w,v){for(var b=0,E,S=a.length,_=v.length;b<_;++b)(E=a[b])?(E.__data__=v[b],g[b]=E):f[b]=new cW(i,v[b]);for(;b<S;++b)(E=a[b])&&(w[b]=E)}function pCe(i,a,f,g,w,v,b){var E,S,_=new Map,M=a.length,F=v.length,R=new Array(M),B;for(E=0;E<M;++E)(S=a[E])&&(R[E]=B=b.call(S,S.__data__,E,a)+"",_.has(B)?w[E]=S:_.set(B,S));for(E=0;E<F;++E)B=b.call(i,v[E],E,v)+"",(S=_.get(B))?(g[E]=S,S.__data__=v[E],_.delete(B)):f[E]=new cW(i,v[E]);for(E=0;E<M;++E)(S=a[E])&&_.get(R[E])===S&&(w[E]=S)}function bCe(i){return i.__data__}function wCe(i,a){if(!arguments.length)return Array.from(this,bCe);var f=a?pCe:gCe,g=this._parents,w=this._groups;typeof i!="function"&&(i=dCe(i));for(var v=w.length,b=new Array(v),E=new Array(v),S=new Array(v),_=0;_<v;++_){var M=g[_],F=w[_],R=F.length,B=mCe(i.call(M,M&&M.__data__,_,g)),z=B.length,Y=E[_]=new Array(z),nt=b[_]=new Array(z),ot=S[_]=new Array(R);f(M,F,Y,nt,ot,B,a);for(var ft=0,wt=0,mt,ct;ft<z;++ft)if(mt=Y[ft]){for(ft>=wt&&(wt=ft+1);!(ct=nt[wt])&&++wt<z;);mt._next=ct||null}}return b=new Gg(b,g),b._enter=E,b._exit=S,b}function mCe(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function vCe(){return new Gg(this._exit||this._groups.map(OOt),this._parents)}function yCe(i,a,f){var g=this.enter(),w=this,v=this.exit();return typeof i=="function"?(g=i(g),g&&(g=g.selection())):g=g.append(i+""),a!=null&&(w=a(w),w&&(w=w.selection())),f==null?v.remove():f(v),g&&w?g.merge(w).order():w}function xCe(i){for(var a=i.selection?i.selection():i,f=this._groups,g=a._groups,w=f.length,v=g.length,b=Math.min(w,v),E=new Array(w),S=0;S<b;++S)for(var _=f[S],M=g[S],F=_.length,R=E[S]=new Array(F),B,z=0;z<F;++z)(B=_[z]||M[z])&&(R[z]=B);for(;S<w;++S)E[S]=f[S];return new Gg(E,this._parents)}function kCe(){for(var i=this._groups,a=-1,f=i.length;++a<f;)for(var g=i[a],w=g.length-1,v=g[w],b;--w>=0;)(b=g[w])&&(v&&b.compareDocumentPosition(v)^4&&v.parentNode.insertBefore(b,v),v=b);return this}function ECe(i){i||(i=TCe);function a(F,R){return F&&R?i(F.__data__,R.__data__):!F-!R}for(var f=this._groups,g=f.length,w=new Array(g),v=0;v<g;++v){for(var b=f[v],E=b.length,S=w[v]=new Array(E),_,M=0;M<E;++M)(_=b[M])&&(S[M]=_);S.sort(a)}return new Gg(w,this._parents).order()}function TCe(i,a){return i<a?-1:i>a?1:i>=a?0:NaN}function CCe(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function SCe(){return Array.from(this)}function _Ce(){for(var i=this._groups,a=0,f=i.length;a<f;++a)for(var g=i[a],w=0,v=g.length;w<v;++w){var b=g[w];if(b)return b}return null}function ACe(){let i=0;for(const a of this)++i;return i}function LCe(){return!this.node()}function DCe(i){for(var a=this._groups,f=0,g=a.length;f<g;++f)for(var w=a[f],v=0,b=w.length,E;v<b;++v)(E=w[v])&&i.call(E,E.__data__,v,w);return this}function MCe(i){return function(){this.removeAttribute(i)}}function ICe(i){return function(){this.removeAttributeNS(i.space,i.local)}}function OCe(i,a){return function(){this.setAttribute(i,a)}}function NCe(i,a){return function(){this.setAttributeNS(i.space,i.local,a)}}function PCe(i,a){return function(){var f=a.apply(this,arguments);f==null?this.removeAttribute(i):this.setAttribute(i,f)}}function FCe(i,a){return function(){var f=a.apply(this,arguments);f==null?this.removeAttributeNS(i.space,i.local):this.setAttributeNS(i.space,i.local,f)}}function BCe(i,a){var f=oW(i);if(arguments.length<2){var g=this.node();return f.local?g.getAttributeNS(f.space,f.local):g.getAttribute(f)}return this.each((a==null?f.local?ICe:MCe:typeof a=="function"?f.local?FCe:PCe:f.local?NCe:OCe)(f,a))}function NOt(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function RCe(i){return function(){this.style.removeProperty(i)}}function jCe(i,a,f){return function(){this.style.setProperty(i,a,f)}}function $Ce(i,a,f){return function(){var g=a.apply(this,arguments);g==null?this.style.removeProperty(i):this.style.setProperty(i,g,f)}}function zCe(i,a,f){return arguments.length>1?this.each((a==null?RCe:typeof a=="function"?$Ce:jCe)(i,a,f??"")):RL(this.node(),i)}function RL(i,a){return i.style.getPropertyValue(a)||NOt(i).getComputedStyle(i,null).getPropertyValue(a)}function qCe(i){return function(){delete this[i]}}function HCe(i,a){return function(){this[i]=a}}function VCe(i,a){return function(){var f=a.apply(this,arguments);f==null?delete this[i]:this[i]=f}}function UCe(i,a){return arguments.length>1?this.each((a==null?qCe:typeof a=="function"?VCe:HCe)(i,a)):this.node()[i]}function POt(i){return i.trim().split(/^|\s+/)}function k0t(i){return i.classList||new FOt(i)}function FOt(i){this._node=i,this._names=POt(i.getAttribute("class")||"")}FOt.prototype={add:function(i){var a=this._names.indexOf(i);a<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var a=this._names.indexOf(i);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function BOt(i,a){for(var f=k0t(i),g=-1,w=a.length;++g<w;)f.add(a[g])}function ROt(i,a){for(var f=k0t(i),g=-1,w=a.length;++g<w;)f.remove(a[g])}function GCe(i){return function(){BOt(this,i)}}function KCe(i){return function(){ROt(this,i)}}function WCe(i,a){return function(){(a.apply(this,arguments)?BOt:ROt)(this,i)}}function YCe(i,a){var f=POt(i+"");if(arguments.length<2){for(var g=k0t(this.node()),w=-1,v=f.length;++w<v;)if(!g.contains(f[w]))return!1;return!0}return this.each((typeof a=="function"?WCe:a?GCe:KCe)(f,a))}function XCe(){this.textContent=""}function QCe(i){return function(){this.textContent=i}}function JCe(i){return function(){var a=i.apply(this,arguments);this.textContent=a??""}}function ZCe(i){return arguments.length?this.each(i==null?XCe:(typeof i=="function"?JCe:QCe)(i)):this.node().textContent}function tSe(){this.innerHTML=""}function eSe(i){return function(){this.innerHTML=i}}function nSe(i){return function(){var a=i.apply(this,arguments);this.innerHTML=a??""}}function rSe(i){return arguments.length?this.each(i==null?tSe:(typeof i=="function"?nSe:eSe)(i)):this.node().innerHTML}function iSe(){this.nextSibling&&this.parentNode.appendChild(this)}function sSe(){return this.each(iSe)}function aSe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oSe(){return this.each(aSe)}function cSe(i){var a=typeof i=="function"?i:AOt(i);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function uSe(){return null}function lSe(i,a){var f=typeof i=="function"?i:AOt(i),g=a==null?uSe:typeof a=="function"?a:x0t(a);return this.select(function(){return this.insertBefore(f.apply(this,arguments),g.apply(this,arguments)||null)})}function hSe(){var i=this.parentNode;i&&i.removeChild(this)}function fSe(){return this.each(hSe)}function dSe(){var i=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(i,this.nextSibling):i}function gSe(){var i=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(i,this.nextSibling):i}function pSe(i){return this.select(i?gSe:dSe)}function bSe(i){return arguments.length?this.property("__data__",i):this.node().__data__}function wSe(i){return function(a){i.call(this,a,this.__data__)}}function mSe(i){return i.trim().split(/^|\s+/).map(function(a){var f="",g=a.indexOf(".");return g>=0&&(f=a.slice(g+1),a=a.slice(0,g)),{type:a,name:f}})}function vSe(i){return function(){var a=this.__on;if(a){for(var f=0,g=-1,w=a.length,v;f<w;++f)v=a[f],(!i.type||v.type===i.type)&&v.name===i.name?this.removeEventListener(v.type,v.listener,v.options):a[++g]=v;++g?a.length=g:delete this.__on}}}function ySe(i,a,f){return function(){var g=this.__on,w,v=wSe(a);if(g){for(var b=0,E=g.length;b<E;++b)if((w=g[b]).type===i.type&&w.name===i.name){this.removeEventListener(w.type,w.listener,w.options),this.addEventListener(w.type,w.listener=v,w.options=f),w.value=a;return}}this.addEventListener(i.type,v,f),w={type:i.type,name:i.name,value:a,listener:v,options:f},g?g.push(w):this.__on=[w]}}function xSe(i,a,f){var g=mSe(i+""),w,v=g.length,b;if(arguments.length<2){var E=this.node().__on;if(E){for(var S=0,_=E.length,M;S<_;++S)for(w=0,M=E[S];w<v;++w)if((b=g[w]).type===M.type&&b.name===M.name)return M.value}return}for(E=a?ySe:vSe,w=0;w<v;++w)this.each(E(g[w],a,f));return this}function jOt(i,a,f){var g=NOt(i),w=g.CustomEvent;typeof w=="function"?w=new w(a,f):(w=g.document.createEvent("Event"),f?(w.initEvent(a,f.bubbles,f.cancelable),w.detail=f.detail):w.initEvent(a,!1,!1)),i.dispatchEvent(w)}function kSe(i,a){return function(){return jOt(this,i,a)}}function ESe(i,a){return function(){return jOt(this,i,a.apply(this,arguments))}}function TSe(i,a){return this.each((typeof a=="function"?ESe:kSe)(i,a))}function*CSe(){for(var i=this._groups,a=0,f=i.length;a<f;++a)for(var g=i[a],w=0,v=g.length,b;w<v;++w)(b=g[w])&&(yield b)}var E0t=[null];function Gg(i,a){this._groups=i,this._parents=a}function JP(){return new Gg([[document.documentElement]],E0t)}function SSe(){return this}Gg.prototype=JP.prototype={constructor:Gg,select:Z9e,selectAll:nCe,selectChild:aCe,selectChildren:lCe,filter:hCe,data:wCe,enter:fCe,exit:vCe,join:yCe,merge:xCe,selection:SSe,order:kCe,sort:ECe,call:CCe,nodes:SCe,node:_Ce,size:ACe,empty:LCe,each:DCe,attr:BCe,style:zCe,property:UCe,classed:YCe,text:ZCe,html:rSe,raise:sSe,lower:oSe,append:cSe,insert:lSe,remove:fSe,clone:pSe,datum:bSe,on:xSe,dispatch:TSe,[Symbol.iterator]:CSe};function Tr(i){return typeof i=="string"?new Gg([[document.querySelector(i)]],[document.documentElement]):new Gg([[i]],E0t)}function $Ot(i){return typeof i=="string"?new Gg([document.querySelectorAll(i)],[document.documentElement]):new Gg([LOt(i)],E0t)}function ZP(i,a,f){i.prototype=a.prototype=f,f.constructor=i}function uW(i,a){var f=Object.create(i.prototype);for(var g in a)f[g]=a[g];return f}function n9(){}var tF=.7,lW=1/tF,jL="\\s*([+-]?\\d+)\\s*",eF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_Se=/^#([0-9a-f]{3,8})$/,ASe=new RegExp(`^rgb\\(${jL},${jL},${jL}\\)$`),LSe=new RegExp(`^rgb\\(${Q3},${Q3},${Q3}\\)$`),DSe=new RegExp(`^rgba\\(${jL},${jL},${jL},${eF}\\)$`),MSe=new RegExp(`^rgba\\(${Q3},${Q3},${Q3},${eF}\\)$`),ISe=new RegExp(`^hsl\\(${eF},${Q3},${Q3}\\)$`),OSe=new RegExp(`^hsla\\(${eF},${Q3},${Q3},${eF}\\)$`),zOt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ZP(n9,r9,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:qOt,formatHex:qOt,formatHex8:NSe,formatHsl:PSe,formatRgb:HOt,toString:HOt});function qOt(){return this.rgb().formatHex()}function NSe(){return this.rgb().formatHex8()}function PSe(){return YOt(this).formatHsl()}function HOt(){return this.rgb().formatRgb()}function r9(i){var a,f;return i=(i+"").trim().toLowerCase(),(a=_Se.exec(i))?(f=a[1].length,a=parseInt(a[1],16),f===6?VOt(a):f===3?new eg(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):f===8?hW(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):f===4?hW(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=ASe.exec(i))?new eg(a[1],a[2],a[3],1):(a=LSe.exec(i))?new eg(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=DSe.exec(i))?hW(a[1],a[2],a[3],a[4]):(a=MSe.exec(i))?hW(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=ISe.exec(i))?WOt(a[1],a[2]/100,a[3]/100,1):(a=OSe.exec(i))?WOt(a[1],a[2]/100,a[3]/100,a[4]):zOt.hasOwnProperty(i)?VOt(zOt[i]):i==="transparent"?new eg(NaN,NaN,NaN,0):null}function VOt(i){return new eg(i>>16&255,i>>8&255,i&255,1)}function hW(i,a,f,g){return g<=0&&(i=a=f=NaN),new eg(i,a,f,g)}function UOt(i){return i instanceof n9||(i=r9(i)),i?(i=i.rgb(),new eg(i.r,i.g,i.b,i.opacity)):new eg}function T0t(i,a,f,g){return arguments.length===1?UOt(i):new eg(i,a,f,g??1)}function eg(i,a,f,g){this.r=+i,this.g=+a,this.b=+f,this.opacity=+g}ZP(eg,T0t,uW(n9,{brighter(i){return i=i==null?lW:Math.pow(lW,i),new eg(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=i==null?tF:Math.pow(tF,i),new eg(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new eg(i9(this.r),i9(this.g),i9(this.b),fW(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:GOt,formatHex:GOt,formatHex8:FSe,formatRgb:KOt,toString:KOt}));function GOt(){return`#${s9(this.r)}${s9(this.g)}${s9(this.b)}`}function FSe(){return`#${s9(this.r)}${s9(this.g)}${s9(this.b)}${s9((isNaN(this.opacity)?1:this.opacity)*255)}`}function KOt(){const i=fW(this.opacity);return`${i===1?"rgb(":"rgba("}${i9(this.r)}, ${i9(this.g)}, ${i9(this.b)}${i===1?")":`, ${i})`}`}function fW(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function i9(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function s9(i){return i=i9(i),(i<16?"0":"")+i.toString(16)}function WOt(i,a,f,g){return g<=0?i=a=f=NaN:f<=0||f>=1?i=a=NaN:a<=0&&(i=NaN),new jv(i,a,f,g)}function YOt(i){if(i instanceof jv)return new jv(i.h,i.s,i.l,i.opacity);if(i instanceof n9||(i=r9(i)),!i)return new jv;if(i instanceof jv)return i;i=i.rgb();var a=i.r/255,f=i.g/255,g=i.b/255,w=Math.min(a,f,g),v=Math.max(a,f,g),b=NaN,E=v-w,S=(v+w)/2;return E?(a===v?b=(f-g)/E+(f<g)*6:f===v?b=(g-a)/E+2:b=(a-f)/E+4,E/=S<.5?v+w:2-v-w,b*=60):E=S>0&&S<1?0:b,new jv(b,E,S,i.opacity)}function BSe(i,a,f,g){return arguments.length===1?YOt(i):new jv(i,a,f,g??1)}function jv(i,a,f,g){this.h=+i,this.s=+a,this.l=+f,this.opacity=+g}ZP(jv,BSe,uW(n9,{brighter(i){return i=i==null?lW:Math.pow(lW,i),new jv(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=i==null?tF:Math.pow(tF,i),new jv(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+(this.h<0)*360,a=isNaN(i)||isNaN(this.s)?0:this.s,f=this.l,g=f+(f<.5?f:1-f)*a,w=2*f-g;return new eg(C0t(i>=240?i-240:i+120,w,g),C0t(i,w,g),C0t(i<120?i+240:i-120,w,g),this.opacity)},clamp(){return new jv(XOt(this.h),dW(this.s),dW(this.l),fW(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=fW(this.opacity);return`${i===1?"hsl(":"hsla("}${XOt(this.h)}, ${dW(this.s)*100}%, ${dW(this.l)*100}%${i===1?")":`, ${i})`}`}}));function XOt(i){return i=(i||0)%360,i<0?i+360:i}function dW(i){return Math.max(0,Math.min(1,i||0))}function C0t(i,a,f){return(i<60?a+(f-a)*i/60:i<180?f:i<240?a+(f-a)*(240-i)/60:a)*255}const RSe=Math.PI/180,jSe=180/Math.PI,gW=18,QOt=.96422,JOt=1,ZOt=.82521,tNt=4/29,$L=6/29,eNt=3*$L*$L,$Se=$L*$L*$L;function nNt(i){if(i instanceof J3)return new J3(i.l,i.a,i.b,i.opacity);if(i instanceof xx)return rNt(i);i instanceof eg||(i=UOt(i));var a=L0t(i.r),f=L0t(i.g),g=L0t(i.b),w=S0t((.2225045*a+.7168786*f+.0606169*g)/JOt),v,b;return a===f&&f===g?v=b=w:(v=S0t((.4360747*a+.3850649*f+.1430804*g)/QOt),b=S0t((.0139322*a+.0971045*f+.7141733*g)/ZOt)),new J3(116*w-16,500*(v-w),200*(w-b),i.opacity)}function zSe(i,a,f,g){return arguments.length===1?nNt(i):new J3(i,a,f,g??1)}function J3(i,a,f,g){this.l=+i,this.a=+a,this.b=+f,this.opacity=+g}ZP(J3,zSe,uW(n9,{brighter(i){return new J3(this.l+gW*(i??1),this.a,this.b,this.opacity)},darker(i){return new J3(this.l-gW*(i??1),this.a,this.b,this.opacity)},rgb(){var i=(this.l+16)/116,a=isNaN(this.a)?i:i+this.a/500,f=isNaN(this.b)?i:i-this.b/200;return a=QOt*_0t(a),i=JOt*_0t(i),f=ZOt*_0t(f),new eg(A0t(3.1338561*a-1.6168667*i-.4906146*f),A0t(-.9787684*a+1.9161415*i+.033454*f),A0t(.0719453*a-.2289914*i+1.4052427*f),this.opacity)}}));function S0t(i){return i>$Se?Math.pow(i,1/3):i/eNt+tNt}function _0t(i){return i>$L?i*i*i:eNt*(i-tNt)}function A0t(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function L0t(i){return(i/=255)<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function qSe(i){if(i instanceof xx)return new xx(i.h,i.c,i.l,i.opacity);if(i instanceof J3||(i=nNt(i)),i.a===0&&i.b===0)return new xx(NaN,0<i.l&&i.l<100?0:NaN,i.l,i.opacity);var a=Math.atan2(i.b,i.a)*jSe;return new xx(a<0?a+360:a,Math.sqrt(i.a*i.a+i.b*i.b),i.l,i.opacity)}function D0t(i,a,f,g){return arguments.length===1?qSe(i):new xx(i,a,f,g??1)}function xx(i,a,f,g){this.h=+i,this.c=+a,this.l=+f,this.opacity=+g}function rNt(i){if(isNaN(i.h))return new J3(i.l,0,0,i.opacity);var a=i.h*RSe;return new J3(i.l,Math.cos(a)*i.c,Math.sin(a)*i.c,i.opacity)}ZP(xx,D0t,uW(n9,{brighter(i){return new xx(this.h,this.c,this.l+gW*(i??1),this.opacity)},darker(i){return new xx(this.h,this.c,this.l-gW*(i??1),this.opacity)},rgb(){return rNt(this).rgb()}}));const pW=i=>()=>i;function iNt(i,a){return function(f){return i+f*a}}function HSe(i,a,f){return i=Math.pow(i,f),a=Math.pow(a,f)-i,f=1/f,function(g){return Math.pow(i+g*a,f)}}function VSe(i,a){var f=a-i;return f?iNt(i,f>180||f<-180?f-360*Math.round(f/360):f):pW(isNaN(i)?a:i)}function USe(i){return(i=+i)==1?nF:function(a,f){return f-a?HSe(a,f,i):pW(isNaN(a)?f:a)}}function nF(i,a){var f=a-i;return f?iNt(i,f):pW(isNaN(i)?a:i)}const bW=function i(a){var f=USe(a);function g(w,v){var b=f((w=T0t(w)).r,(v=T0t(v)).r),E=f(w.g,v.g),S=f(w.b,v.b),_=nF(w.opacity,v.opacity);return function(M){return w.r=b(M),w.g=E(M),w.b=S(M),w.opacity=_(M),w+""}}return g.gamma=i,g}(1);function GSe(i,a){a||(a=[]);var f=i?Math.min(a.length,i.length):0,g=a.slice(),w;return function(v){for(w=0;w<f;++w)g[w]=i[w]*(1-v)+a[w]*v;return g}}function KSe(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function WSe(i,a){var f=a?a.length:0,g=i?Math.min(f,i.length):0,w=new Array(g),v=new Array(f),b;for(b=0;b<g;++b)w[b]=O0t(i[b],a[b]);for(;b<f;++b)v[b]=a[b];return function(E){for(b=0;b<g;++b)v[b]=w[b](E);return v}}function YSe(i,a){var f=new Date;return i=+i,a=+a,function(g){return f.setTime(i*(1-g)+a*g),f}}function $v(i,a){return i=+i,a=+a,function(f){return i*(1-f)+a*f}}function XSe(i,a){var f={},g={},w;(i===null||typeof i!="object")&&(i={}),(a===null||typeof a!="object")&&(a={});for(w in a)w in i?f[w]=O0t(i[w],a[w]):g[w]=a[w];return function(v){for(w in f)g[w]=f[w](v);return g}}var M0t=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,I0t=new RegExp(M0t.source,"g");function QSe(i){return function(){return i}}function JSe(i){return function(a){return i(a)+""}}function sNt(i,a){var f=M0t.lastIndex=I0t.lastIndex=0,g,w,v,b=-1,E=[],S=[];for(i=i+"",a=a+"";(g=M0t.exec(i))&&(w=I0t.exec(a));)(v=w.index)>f&&(v=a.slice(f,v),E[b]?E[b]+=v:E[++b]=v),(g=g[0])===(w=w[0])?E[b]?E[b]+=w:E[++b]=w:(E[++b]=null,S.push({i:b,x:$v(g,w)})),f=I0t.lastIndex;return f<a.length&&(v=a.slice(f),E[b]?E[b]+=v:E[++b]=v),E.length<2?S[0]?JSe(S[0].x):QSe(a):(a=S.length,function(_){for(var M=0,F;M<a;++M)E[(F=S[M]).i]=F.x(_);return E.join("")})}function O0t(i,a){var f=typeof a,g;return a==null||f==="boolean"?pW(a):(f==="number"?$v:f==="string"?(g=r9(a))?(a=g,bW):sNt:a instanceof r9?bW:a instanceof Date?YSe:KSe(a)?GSe:Array.isArray(a)?WSe:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?XSe:$v)(i,a)}function ZSe(i,a){return i=+i,a=+a,function(f){return Math.round(i*(1-f)+a*f)}}var aNt=180/Math.PI,N0t={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function oNt(i,a,f,g,w,v){var b,E,S;return(b=Math.sqrt(i*i+a*a))&&(i/=b,a/=b),(S=i*f+a*g)&&(f-=i*S,g-=a*S),(E=Math.sqrt(f*f+g*g))&&(f/=E,g/=E,S/=E),i*g<a*f&&(i=-i,a=-a,S=-S,b=-b),{translateX:w,translateY:v,rotate:Math.atan2(a,i)*aNt,skewX:Math.atan(S)*aNt,scaleX:b,scaleY:E}}var wW;function t_e(i){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(i+"");return a.isIdentity?N0t:oNt(a.a,a.b,a.c,a.d,a.e,a.f)}function e_e(i){return i==null||(wW||(wW=document.createElementNS("http://www.w3.org/2000/svg","g")),wW.setAttribute("transform",i),!(i=wW.transform.baseVal.consolidate()))?N0t:(i=i.matrix,oNt(i.a,i.b,i.c,i.d,i.e,i.f))}function cNt(i,a,f,g){function w(_){return _.length?_.pop()+" ":""}function v(_,M,F,R,B,z){if(_!==F||M!==R){var Y=B.push("translate(",null,a,null,f);z.push({i:Y-4,x:$v(_,F)},{i:Y-2,x:$v(M,R)})}else(F||R)&&B.push("translate("+F+a+R+f)}function b(_,M,F,R){_!==M?(_-M>180?M+=360:M-_>180&&(_+=360),R.push({i:F.push(w(F)+"rotate(",null,g)-2,x:$v(_,M)})):M&&F.push(w(F)+"rotate("+M+g)}function E(_,M,F,R){_!==M?R.push({i:F.push(w(F)+"skewX(",null,g)-2,x:$v(_,M)}):M&&F.push(w(F)+"skewX("+M+g)}function S(_,M,F,R,B,z){if(_!==F||M!==R){var Y=B.push(w(B)+"scale(",null,",",null,")");z.push({i:Y-4,x:$v(_,F)},{i:Y-2,x:$v(M,R)})}else(F!==1||R!==1)&&B.push(w(B)+"scale("+F+","+R+")")}return function(_,M){var F=[],R=[];return _=i(_),M=i(M),v(_.translateX,_.translateY,M.translateX,M.translateY,F,R),b(_.rotate,M.rotate,F,R),E(_.skewX,M.skewX,F,R),S(_.scaleX,_.scaleY,M.scaleX,M.scaleY,F,R),_=M=null,function(B){for(var z=-1,Y=R.length,nt;++z<Y;)F[(nt=R[z]).i]=nt.x(B);return F.join("")}}}var n_e=cNt(t_e,"px, ","px)","deg)"),r_e=cNt(e_e,", ",")",")");function i_e(i){return function(a,f){var g=i((a=D0t(a)).h,(f=D0t(f)).h),w=nF(a.c,f.c),v=nF(a.l,f.l),b=nF(a.opacity,f.opacity);return function(E){return a.h=g(E),a.c=w(E),a.l=v(E),a.opacity=b(E),a+""}}}const s_e=i_e(VSe);var zL=0,rF=0,iF=0,uNt=1e3,mW,sF,vW=0,a9=0,yW=0,aF=typeof performance=="object"&&performance.now?performance:Date,lNt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function P0t(){return a9||(lNt(a_e),a9=aF.now()+yW)}function a_e(){a9=0}function xW(){this._call=this._time=this._next=null}xW.prototype=hNt.prototype={constructor:xW,restart:function(i,a,f){if(typeof i!="function")throw new TypeError("callback is not a function");f=(f==null?P0t():+f)+(a==null?0:+a),!this._next&&sF!==this&&(sF?sF._next=this:mW=this,sF=this),this._call=i,this._time=f,F0t()},stop:function(){this._call&&(this._call=null,this._time=1/0,F0t())}};function hNt(i,a,f){var g=new xW;return g.restart(i,a,f),g}function o_e(){P0t(),++zL;for(var i=mW,a;i;)(a=a9-i._time)>=0&&i._call.call(void 0,a),i=i._next;--zL}function fNt(){a9=(vW=aF.now())+yW,zL=rF=0;try{o_e()}finally{zL=0,u_e(),a9=0}}function c_e(){var i=aF.now(),a=i-vW;a>uNt&&(yW-=a,vW=i)}function u_e(){for(var i,a=mW,f,g=1/0;a;)a._call?(g>a._time&&(g=a._time),i=a,a=a._next):(f=a._next,a._next=null,a=i?i._next=f:mW=f);sF=i,F0t(g)}function F0t(i){if(!zL){rF&&(rF=clearTimeout(rF));var a=i-a9;a>24?(i<1/0&&(rF=setTimeout(fNt,i-aF.now()-yW)),iF&&(iF=clearInterval(iF))):(iF||(vW=aF.now(),iF=setInterval(c_e,uNt)),zL=1,lNt(fNt))}}function dNt(i,a,f){var g=new xW;return a=a==null?0:+a,g.restart(w=>{g.stop(),i(w+a)},a,f),g}var l_e=COt("start","end","cancel","interrupt"),h_e=[],gNt=0,pNt=1,B0t=2,kW=3,bNt=4,R0t=5,EW=6;function TW(i,a,f,g,w,v){var b=i.__transition;if(!b)i.__transition={};else if(f in b)return;f_e(i,f,{name:a,index:g,group:w,on:l_e,tween:h_e,time:v.time,delay:v.delay,duration:v.duration,ease:v.ease,timer:null,state:gNt})}function j0t(i,a){var f=zv(i,a);if(f.state>gNt)throw new Error("too late; already scheduled");return f}function Z3(i,a){var f=zv(i,a);if(f.state>kW)throw new Error("too late; already running");return f}function zv(i,a){var f=i.__transition;if(!f||!(f=f[a]))throw new Error("transition not found");return f}function f_e(i,a,f){var g=i.__transition,w;g[a]=f,f.timer=hNt(v,0,f.time);function v(_){f.state=pNt,f.timer.restart(b,f.delay,f.time),f.delay<=_&&b(_-f.delay)}function b(_){var M,F,R,B;if(f.state!==pNt)return S();for(M in g)if(B=g[M],B.name===f.name){if(B.state===kW)return dNt(b);B.state===bNt?(B.state=EW,B.timer.stop(),B.on.call("interrupt",i,i.__data__,B.index,B.group),delete g[M]):+M<a&&(B.state=EW,B.timer.stop(),B.on.call("cancel",i,i.__data__,B.index,B.group),delete g[M])}if(dNt(function(){f.state===kW&&(f.state=bNt,f.timer.restart(E,f.delay,f.time),E(_))}),f.state=B0t,f.on.call("start",i,i.__data__,f.index,f.group),f.state===B0t){for(f.state=kW,w=new Array(R=f.tween.length),M=0,F=-1;M<R;++M)(B=f.tween[M].value.call(i,i.__data__,f.index,f.group))&&(w[++F]=B);w.length=F+1}}function E(_){for(var M=_<f.duration?f.ease.call(null,_/f.duration):(f.timer.restart(S),f.state=R0t,1),F=-1,R=w.length;++F<R;)w[F].call(i,M);f.state===R0t&&(f.on.call("end",i,i.__data__,f.index,f.group),S())}function S(){f.state=EW,f.timer.stop(),delete g[a];for(var _ in g)return;delete i.__transition}}function d_e(i,a){var f=i.__transition,g,w,v=!0,b;if(f){a=a==null?null:a+"";for(b in f){if((g=f[b]).name!==a){v=!1;continue}w=g.state>B0t&&g.state<R0t,g.state=EW,g.timer.stop(),g.on.call(w?"interrupt":"cancel",i,i.__data__,g.index,g.group),delete f[b]}v&&delete i.__transition}}function g_e(i){return this.each(function(){d_e(this,i)})}function p_e(i,a){var f,g;return function(){var w=Z3(this,i),v=w.tween;if(v!==f){g=f=v;for(var b=0,E=g.length;b<E;++b)if(g[b].name===a){g=g.slice(),g.splice(b,1);break}}w.tween=g}}function b_e(i,a,f){var g,w;if(typeof f!="function")throw new Error;return function(){var v=Z3(this,i),b=v.tween;if(b!==g){w=(g=b).slice();for(var E={name:a,value:f},S=0,_=w.length;S<_;++S)if(w[S].name===a){w[S]=E;break}S===_&&w.push(E)}v.tween=w}}function w_e(i,a){var f=this._id;if(i+="",arguments.length<2){for(var g=zv(this.node(),f).tween,w=0,v=g.length,b;w<v;++w)if((b=g[w]).name===i)return b.value;return null}return this.each((a==null?p_e:b_e)(f,i,a))}function $0t(i,a,f){var g=i._id;return i.each(function(){var w=Z3(this,g);(w.value||(w.value={}))[a]=f.apply(this,arguments)}),function(w){return zv(w,g).value[a]}}function wNt(i,a){var f;return(typeof a=="number"?$v:a instanceof r9?bW:(f=r9(a))?(a=f,bW):sNt)(i,a)}function m_e(i){return function(){this.removeAttribute(i)}}function v_e(i){return function(){this.removeAttributeNS(i.space,i.local)}}function y_e(i,a,f){var g,w=f+"",v;return function(){var b=this.getAttribute(i);return b===w?null:b===g?v:v=a(g=b,f)}}function x_e(i,a,f){var g,w=f+"",v;return function(){var b=this.getAttributeNS(i.space,i.local);return b===w?null:b===g?v:v=a(g=b,f)}}function k_e(i,a,f){var g,w,v;return function(){var b,E=f(this),S;return E==null?void this.removeAttribute(i):(b=this.getAttribute(i),S=E+"",b===S?null:b===g&&S===w?v:(w=S,v=a(g=b,E)))}}function E_e(i,a,f){var g,w,v;return function(){var b,E=f(this),S;return E==null?void this.removeAttributeNS(i.space,i.local):(b=this.getAttributeNS(i.space,i.local),S=E+"",b===S?null:b===g&&S===w?v:(w=S,v=a(g=b,E)))}}function T_e(i,a){var f=oW(i),g=f==="transform"?r_e:wNt;return this.attrTween(i,typeof a=="function"?(f.local?E_e:k_e)(f,g,$0t(this,"attr."+i,a)):a==null?(f.local?v_e:m_e)(f):(f.local?x_e:y_e)(f,g,a))}function C_e(i,a){return function(f){this.setAttribute(i,a.call(this,f))}}function S_e(i,a){return function(f){this.setAttributeNS(i.space,i.local,a.call(this,f))}}function __e(i,a){var f,g;function w(){var v=a.apply(this,arguments);return v!==g&&(f=(g=v)&&S_e(i,v)),f}return w._value=a,w}function A_e(i,a){var f,g;function w(){var v=a.apply(this,arguments);return v!==g&&(f=(g=v)&&C_e(i,v)),f}return w._value=a,w}function L_e(i,a){var f="attr."+i;if(arguments.length<2)return(f=this.tween(f))&&f._value;if(a==null)return this.tween(f,null);if(typeof a!="function")throw new Error;var g=oW(i);return this.tween(f,(g.local?__e:A_e)(g,a))}function D_e(i,a){return function(){j0t(this,i).delay=+a.apply(this,arguments)}}function M_e(i,a){return a=+a,function(){j0t(this,i).delay=a}}function I_e(i){var a=this._id;return arguments.length?this.each((typeof i=="function"?D_e:M_e)(a,i)):zv(this.node(),a).delay}function O_e(i,a){return function(){Z3(this,i).duration=+a.apply(this,arguments)}}function N_e(i,a){return a=+a,function(){Z3(this,i).duration=a}}function P_e(i){var a=this._id;return arguments.length?this.each((typeof i=="function"?O_e:N_e)(a,i)):zv(this.node(),a).duration}function F_e(i,a){if(typeof a!="function")throw new Error;return function(){Z3(this,i).ease=a}}function B_e(i){var a=this._id;return arguments.length?this.each(F_e(a,i)):zv(this.node(),a).ease}function R_e(i,a){return function(){var f=a.apply(this,arguments);if(typeof f!="function")throw new Error;Z3(this,i).ease=f}}function j_e(i){if(typeof i!="function")throw new Error;return this.each(R_e(this._id,i))}function $_e(i){typeof i!="function"&&(i=MOt(i));for(var a=this._groups,f=a.length,g=new Array(f),w=0;w<f;++w)for(var v=a[w],b=v.length,E=g[w]=[],S,_=0;_<b;++_)(S=v[_])&&i.call(S,S.__data__,_,v)&&E.push(S);return new kx(g,this._parents,this._name,this._id)}function z_e(i){if(i._id!==this._id)throw new Error;for(var a=this._groups,f=i._groups,g=a.length,w=f.length,v=Math.min(g,w),b=new Array(g),E=0;E<v;++E)for(var S=a[E],_=f[E],M=S.length,F=b[E]=new Array(M),R,B=0;B<M;++B)(R=S[B]||_[B])&&(F[B]=R);for(;E<g;++E)b[E]=a[E];return new kx(b,this._parents,this._name,this._id)}function q_e(i){return(i+"").trim().split(/^|\s+/).every(function(a){var f=a.indexOf(".");return f>=0&&(a=a.slice(0,f)),!a||a==="start"})}function H_e(i,a,f){var g,w,v=q_e(a)?j0t:Z3;return function(){var b=v(this,i),E=b.on;E!==g&&(w=(g=E).copy()).on(a,f),b.on=w}}function V_e(i,a){var f=this._id;return arguments.length<2?zv(this.node(),f).on.on(i):this.each(H_e(f,i,a))}function U_e(i){return function(){var a=this.parentNode;for(var f in this.__transition)if(+f!==i)return;a&&a.removeChild(this)}}function G_e(){return this.on("end.remove",U_e(this._id))}function K_e(i){var a=this._name,f=this._id;typeof i!="function"&&(i=x0t(i));for(var g=this._groups,w=g.length,v=new Array(w),b=0;b<w;++b)for(var E=g[b],S=E.length,_=v[b]=new Array(S),M,F,R=0;R<S;++R)(M=E[R])&&(F=i.call(M,M.__data__,R,E))&&("__data__"in M&&(F.__data__=M.__data__),_[R]=F,TW(_[R],a,f,R,_,zv(M,f)));return new kx(v,this._parents,a,f)}function W_e(i){var a=this._name,f=this._id;typeof i!="function"&&(i=DOt(i));for(var g=this._groups,w=g.length,v=[],b=[],E=0;E<w;++E)for(var S=g[E],_=S.length,M,F=0;F<_;++F)if(M=S[F]){for(var R=i.call(M,M.__data__,F,S),B,z=zv(M,f),Y=0,nt=R.length;Y<nt;++Y)(B=R[Y])&&TW(B,a,f,Y,R,z);v.push(R),b.push(M)}return new kx(v,b,a,f)}var Y_e=JP.prototype.constructor;function X_e(){return new Y_e(this._groups,this._parents)}function Q_e(i,a){var f,g,w;return function(){var v=RL(this,i),b=(this.style.removeProperty(i),RL(this,i));return v===b?null:v===f&&b===g?w:w=a(f=v,g=b)}}function mNt(i){return function(){this.style.removeProperty(i)}}function J_e(i,a,f){var g,w=f+"",v;return function(){var b=RL(this,i);return b===w?null:b===g?v:v=a(g=b,f)}}function Z_e(i,a,f){var g,w,v;return function(){var b=RL(this,i),E=f(this),S=E+"";return E==null&&(S=E=(this.style.removeProperty(i),RL(this,i))),b===S?null:b===g&&S===w?v:(w=S,v=a(g=b,E))}}function tAe(i,a){var f,g,w,v="style."+a,b="end."+v,E;return function(){var S=Z3(this,i),_=S.on,M=S.value[v]==null?E||(E=mNt(a)):void 0;(_!==f||w!==M)&&(g=(f=_).copy()).on(b,w=M),S.on=g}}function eAe(i,a,f){var g=(i+="")=="transform"?n_e:wNt;return a==null?this.styleTween(i,Q_e(i,g)).on("end.style."+i,mNt(i)):typeof a=="function"?this.styleTween(i,Z_e(i,g,$0t(this,"style."+i,a))).each(tAe(this._id,i)):this.styleTween(i,J_e(i,g,a),f).on("end.style."+i,null)}function nAe(i,a,f){return function(g){this.style.setProperty(i,a.call(this,g),f)}}function rAe(i,a,f){var g,w;function v(){var b=a.apply(this,arguments);return b!==w&&(g=(w=b)&&nAe(i,b,f)),g}return v._value=a,v}function iAe(i,a,f){var g="style."+(i+="");if(arguments.length<2)return(g=this.tween(g))&&g._value;if(a==null)return this.tween(g,null);if(typeof a!="function")throw new Error;return this.tween(g,rAe(i,a,f??""))}function sAe(i){return function(){this.textContent=i}}function aAe(i){return function(){var a=i(this);this.textContent=a??""}}function oAe(i){return this.tween("text",typeof i=="function"?aAe($0t(this,"text",i)):sAe(i==null?"":i+""))}function cAe(i){return function(a){this.textContent=i.call(this,a)}}function uAe(i){var a,f;function g(){var w=i.apply(this,arguments);return w!==f&&(a=(f=w)&&cAe(w)),a}return g._value=i,g}function lAe(i){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;return this.tween(a,uAe(i))}function hAe(){for(var i=this._name,a=this._id,f=vNt(),g=this._groups,w=g.length,v=0;v<w;++v)for(var b=g[v],E=b.length,S,_=0;_<E;++_)if(S=b[_]){var M=zv(S,a);TW(S,i,f,_,b,{time:M.time+M.delay+M.duration,delay:0,duration:M.duration,ease:M.ease})}return new kx(g,this._parents,i,f)}function fAe(){var i,a,f=this,g=f._id,w=f.size();return new Promise(function(v,b){var E={value:b},S={value:function(){--w===0&&v()}};f.each(function(){var _=Z3(this,g),M=_.on;M!==i&&(a=(i=M).copy(),a._.cancel.push(E),a._.interrupt.push(E),a._.end.push(S)),_.on=a}),w===0&&v()})}var dAe=0;function kx(i,a,f,g){this._groups=i,this._parents=a,this._name=f,this._id=g}function vNt(){return++dAe}var Ex=JP.prototype;kx.prototype={constructor:kx,select:K_e,selectAll:W_e,selectChild:Ex.selectChild,selectChildren:Ex.selectChildren,filter:$_e,merge:z_e,selection:X_e,transition:hAe,call:Ex.call,nodes:Ex.nodes,node:Ex.node,size:Ex.size,empty:Ex.empty,each:Ex.each,on:V_e,attr:T_e,attrTween:L_e,style:eAe,styleTween:iAe,text:oAe,textTween:lAe,remove:G_e,tween:w_e,delay:I_e,duration:P_e,ease:B_e,easeVarying:j_e,end:fAe,[Symbol.iterator]:Ex[Symbol.iterator]};function gAe(i){return((i*=2)<=1?i*i*i:(i-=2)*i*i+2)/2}var pAe={time:null,delay:0,duration:250,ease:gAe};function bAe(i,a){for(var f;!(f=i.__transition)||!(f=f[a]);)if(!(i=i.parentNode))throw new Error(`transition ${a} not found`);return f}function wAe(i){var a,f;i instanceof kx?(a=i._id,i=i._name):(a=vNt(),(f=pAe).time=P0t(),i=i==null?null:i+"");for(var g=this._groups,w=g.length,v=0;v<w;++v)for(var b=g[v],E=b.length,S,_=0;_<E;++_)(S=b[_])&&TW(S,i,a,_,b,f||bAe(S,a));return new kx(g,this._parents,i,a)}JP.prototype.interrupt=g_e,JP.prototype.transition=wAe;const z0t=Math.PI,q0t=2*z0t,o9=1e-6,mAe=q0t-o9;function yNt(i){this._+=i[0];for(let a=1,f=i.length;a<f;++a)this._+=arguments[a]+i[a]}function vAe(i){let a=Math.floor(i);if(!(a>=0))throw new Error(`invalid digits: ${i}`);if(a>15)return yNt;const f=10**a;return function(g){this._+=g[0];for(let w=1,v=g.length;w<v;++w)this._+=Math.round(arguments[w]*f)/f+g[w]}}let yAe=class{constructor(a){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=a==null?yNt:vAe(a)}moveTo(a,f){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+f}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(a,f){this._append`L${this._x1=+a},${this._y1=+f}`}quadraticCurveTo(a,f,g,w){this._append`Q${+a},${+f},${this._x1=+g},${this._y1=+w}`}bezierCurveTo(a,f,g,w,v,b){this._append`C${+a},${+f},${+g},${+w},${this._x1=+v},${this._y1=+b}`}arcTo(a,f,g,w,v){if(a=+a,f=+f,g=+g,w=+w,v=+v,v<0)throw new Error(`negative radius: ${v}`);let b=this._x1,E=this._y1,S=g-a,_=w-f,M=b-a,F=E-f,R=M*M+F*F;if(this._x1===null)this._append`M${this._x1=a},${this._y1=f}`;else if(R>o9)if(!(Math.abs(F*S-_*M)>o9)||!v)this._append`L${this._x1=a},${this._y1=f}`;else{let B=g-b,z=w-E,Y=S*S+_*_,nt=B*B+z*z,ot=Math.sqrt(Y),ft=Math.sqrt(R),wt=v*Math.tan((z0t-Math.acos((Y+R-nt)/(2*ot*ft)))/2),mt=wt/ft,ct=wt/ot;Math.abs(mt-1)>o9&&this._append`L${a+mt*M},${f+mt*F}`,this._append`A${v},${v},0,0,${+(F*B>M*z)},${this._x1=a+ct*S},${this._y1=f+ct*_}`}}arc(a,f,g,w,v,b){if(a=+a,f=+f,g=+g,b=!!b,g<0)throw new Error(`negative radius: ${g}`);let E=g*Math.cos(w),S=g*Math.sin(w),_=a+E,M=f+S,F=1^b,R=b?w-v:v-w;this._x1===null?this._append`M${_},${M}`:(Math.abs(this._x1-_)>o9||Math.abs(this._y1-M)>o9)&&this._append`L${_},${M}`,g&&(R<0&&(R=R%q0t+q0t),R>mAe?this._append`A${g},${g},0,1,${F},${a-E},${f-S}A${g},${g},0,1,${F},${this._x1=_},${this._y1=M}`:R>o9&&this._append`A${g},${g},0,${+(R>=z0t)},${F},${this._x1=a+g*Math.cos(v)},${this._y1=f+g*Math.sin(v)}`)}rect(a,f,g,w){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+f}h${g=+g}v${+w}h${-g}Z`}toString(){return this._}};function xAe(i){if(!i.ok)throw new Error(i.status+" "+i.statusText);return i.text()}function kAe(i,a){return fetch(i,a).then(xAe)}function EAe(i){return(a,f)=>kAe(a,f).then(g=>new DOMParser().parseFromString(g,i))}var TAe=EAe("image/svg+xml");function CAe(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function CW(i,a){if((f=(i=a?i.toExponential(a-1):i.toExponential()).indexOf("e"))<0)return null;var f,g=i.slice(0,f);return[g.length>1?g[0]+g.slice(2):g,+i.slice(f+1)]}function qL(i){return i=CW(Math.abs(i)),i?i[1]:NaN}function SAe(i,a){return function(f,g){for(var w=f.length,v=[],b=0,E=i[0],S=0;w>0&&E>0&&(S+E+1>g&&(E=Math.max(1,g-S)),v.push(f.substring(w-=E,w+E)),!((S+=E+1)>g));)E=i[b=(b+1)%i.length];return v.reverse().join(a)}}function _Ae(i){return function(a){return a.replace(/[0-9]/g,function(f){return i[+f]})}}var AAe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function SW(i){if(!(a=AAe.exec(i)))throw new Error("invalid format: "+i);var a;return new H0t({fill:a[1],align:a[2],sign:a[3],symbol:a[4],zero:a[5],width:a[6],comma:a[7],precision:a[8]&&a[8].slice(1),trim:a[9],type:a[10]})}SW.prototype=H0t.prototype;function H0t(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}H0t.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function LAe(i){t:for(var a=i.length,f=1,g=-1,w;f<a;++f)switch(i[f]){case".":g=w=f;break;case"0":g===0&&(g=f),w=f;break;default:if(!+i[f])break t;g>0&&(g=0);break}return g>0?i.slice(0,g)+i.slice(w+1):i}var xNt;function DAe(i,a){var f=CW(i,a);if(!f)return i+"";var g=f[0],w=f[1],v=w-(xNt=Math.max(-8,Math.min(8,Math.floor(w/3)))*3)+1,b=g.length;return v===b?g:v>b?g+new Array(v-b+1).join("0"):v>0?g.slice(0,v)+"."+g.slice(v):"0."+new Array(1-v).join("0")+CW(i,Math.max(0,a+v-1))[0]}function kNt(i,a){var f=CW(i,a);if(!f)return i+"";var g=f[0],w=f[1];return w<0?"0."+new Array(-w).join("0")+g:g.length>w+1?g.slice(0,w+1)+"."+g.slice(w+1):g+new Array(w-g.length+2).join("0")}const ENt={"%":(i,a)=>(i*100).toFixed(a),b:i=>Math.round(i).toString(2),c:i=>i+"",d:CAe,e:(i,a)=>i.toExponential(a),f:(i,a)=>i.toFixed(a),g:(i,a)=>i.toPrecision(a),o:i=>Math.round(i).toString(8),p:(i,a)=>kNt(i*100,a),r:kNt,s:DAe,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function TNt(i){return i}var CNt=Array.prototype.map,SNt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MAe(i){var a=i.grouping===void 0||i.thousands===void 0?TNt:SAe(CNt.call(i.grouping,Number),i.thousands+""),f=i.currency===void 0?"":i.currency[0]+"",g=i.currency===void 0?"":i.currency[1]+"",w=i.decimal===void 0?".":i.decimal+"",v=i.numerals===void 0?TNt:_Ae(CNt.call(i.numerals,String)),b=i.percent===void 0?"%":i.percent+"",E=i.minus===void 0?"−":i.minus+"",S=i.nan===void 0?"NaN":i.nan+"";function _(F){F=SW(F);var R=F.fill,B=F.align,z=F.sign,Y=F.symbol,nt=F.zero,ot=F.width,ft=F.comma,wt=F.precision,mt=F.trim,ct=F.type;ct==="n"?(ft=!0,ct="g"):ENt[ct]||(wt===void 0&&(wt=12),mt=!0,ct="g"),(nt||R==="0"&&B==="=")&&(nt=!0,R="0",B="=");var rt=Y==="$"?f:Y==="#"&&/[boxX]/.test(ct)?"0"+ct.toLowerCase():"",it=Y==="$"?g:/[%p]/.test(ct)?b:"",gt=ENt[ct],Q=/[defgprs%]/.test(ct);wt=wt===void 0?6:/[gprs]/.test(ct)?Math.max(1,Math.min(21,wt)):Math.max(0,Math.min(20,wt));function dt(K){var yt=rt,V=it,Ot,It,jt;if(ct==="c")V=gt(K)+V,K="";else{K=+K;var xt=K<0||1/K<0;if(K=isNaN(K)?S:gt(Math.abs(K),wt),mt&&(K=LAe(K)),xt&&+K==0&&z!=="+"&&(xt=!1),yt=(xt?z==="("?z:E:z==="-"||z==="("?"":z)+yt,V=(ct==="s"?SNt[8+xNt/3]:"")+V+(xt&&z==="("?")":""),Q){for(Ot=-1,It=K.length;++Ot<It;)if(jt=K.charCodeAt(Ot),48>jt||jt>57){V=(jt===46?w+K.slice(Ot+1):K.slice(Ot))+V,K=K.slice(0,Ot);break}}}ft&&!nt&&(K=a(K,1/0));var Ft=yt.length+K.length+V.length,Ct=Ft<ot?new Array(ot-Ft+1).join(R):"";switch(ft&&nt&&(K=a(Ct+K,Ct.length?ot-V.length:1/0),Ct=""),B){case"<":K=yt+K+V+Ct;break;case"=":K=yt+Ct+K+V;break;case"^":K=Ct.slice(0,Ft=Ct.length>>1)+yt+K+V+Ct.slice(Ft);break;default:K=Ct+yt+K+V;break}return v(K)}return dt.toString=function(){return F+""},dt}function M(F,R){var B=_((F=SW(F),F.type="f",F)),z=Math.max(-8,Math.min(8,Math.floor(qL(R)/3)))*3,Y=Math.pow(10,-z),nt=SNt[8+z/3];return function(ot){return B(Y*ot)+nt}}return{format:_,formatPrefix:M}}var _W,_Nt,ANt;IAe({thousands:",",grouping:[3],currency:["$",""]});function IAe(i){return _W=MAe(i),_Nt=_W.format,ANt=_W.formatPrefix,_W}function OAe(i){return Math.max(0,-qL(Math.abs(i)))}function NAe(i,a){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qL(a)/3)))*3-qL(Math.abs(i)))}function PAe(i,a){return i=Math.abs(i),a=Math.abs(a)-i,Math.max(0,qL(a)-qL(i))+1}function AW(i,a){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(a).domain(i);break}return this}const LNt=Symbol("implicit");function oF(){var i=new xOt,a=[],f=[],g=LNt;function w(v){let b=i.get(v);if(b===void 0){if(g!==LNt)return g;i.set(v,b=a.push(v)-1)}return f[b%f.length]}return w.domain=function(v){if(!arguments.length)return a.slice();a=[],i=new xOt;for(const b of v)i.has(b)||i.set(b,a.push(b)-1);return w},w.range=function(v){return arguments.length?(f=Array.from(v),w):f.slice()},w.unknown=function(v){return arguments.length?(g=v,w):g},w.copy=function(){return oF(a,f).unknown(g)},AW.apply(w,arguments),w}function V0t(){var i=oF().unknown(void 0),a=i.domain,f=i.range,g=0,w=1,v,b,E=!1,S=0,_=0,M=.5;delete i.unknown;function F(){var R=a().length,B=w<g,z=B?w:g,Y=B?g:w;v=(Y-z)/Math.max(1,R-S+_*2),E&&(v=Math.floor(v)),z+=(Y-z-v*(R-S))*M,b=v*(1-S),E&&(z=Math.round(z),b=Math.round(b));var nt=R9e(R).map(function(ot){return z+v*ot});return f(B?nt.reverse():nt)}return i.domain=function(R){return arguments.length?(a(R),F()):a()},i.range=function(R){return arguments.length?([g,w]=R,g=+g,w=+w,F()):[g,w]},i.rangeRound=function(R){return[g,w]=R,g=+g,w=+w,E=!0,F()},i.bandwidth=function(){return b},i.step=function(){return v},i.round=function(R){return arguments.length?(E=!!R,F()):E},i.padding=function(R){return arguments.length?(S=Math.min(1,_=+R),F()):S},i.paddingInner=function(R){return arguments.length?(S=Math.min(1,R),F()):S},i.paddingOuter=function(R){return arguments.length?(_=+R,F()):_},i.align=function(R){return arguments.length?(M=Math.max(0,Math.min(1,R)),F()):M},i.copy=function(){return V0t(a(),[g,w]).round(E).paddingInner(S).paddingOuter(_).align(M)},AW.apply(F(),arguments)}function FAe(i){return function(){return i}}function BAe(i){return+i}var DNt=[0,1];function HL(i){return i}function U0t(i,a){return(a-=i=+i)?function(f){return(f-i)/a}:FAe(isNaN(a)?NaN:.5)}function RAe(i,a){var f;return i>a&&(f=i,i=a,a=f),function(g){return Math.max(i,Math.min(a,g))}}function jAe(i,a,f){var g=i[0],w=i[1],v=a[0],b=a[1];return w<g?(g=U0t(w,g),v=f(b,v)):(g=U0t(g,w),v=f(v,b)),function(E){return v(g(E))}}function $Ae(i,a,f){var g=Math.min(i.length,a.length)-1,w=new Array(g),v=new Array(g),b=-1;for(i[g]<i[0]&&(i=i.slice().reverse(),a=a.slice().reverse());++b<g;)w[b]=U0t(i[b],i[b+1]),v[b]=f(a[b],a[b+1]);return function(E){var S=A9e(i,E,1,g)-1;return v[S](w[S](E))}}function MNt(i,a){return a.domain(i.domain()).range(i.range()).interpolate(i.interpolate()).clamp(i.clamp()).unknown(i.unknown())}function zAe(){var i=DNt,a=DNt,f=O0t,g,w,v,b=HL,E,S,_;function M(){var R=Math.min(i.length,a.length);return b!==HL&&(b=RAe(i[0],i[R-1])),E=R>2?$Ae:jAe,S=_=null,F}function F(R){return R==null||isNaN(R=+R)?v:(S||(S=E(i.map(g),a,f)))(g(b(R)))}return F.invert=function(R){return b(w((_||(_=E(a,i.map(g),$v)))(R)))},F.domain=function(R){return arguments.length?(i=Array.from(R,BAe),M()):i.slice()},F.range=function(R){return arguments.length?(a=Array.from(R),M()):a.slice()},F.rangeRound=function(R){return a=Array.from(R),f=ZSe,M()},F.clamp=function(R){return arguments.length?(b=R?!0:HL,M()):b!==HL},F.interpolate=function(R){return arguments.length?(f=R,M()):f},F.unknown=function(R){return arguments.length?(v=R,F):v},function(R,B){return g=R,w=B,M()}}function INt(){return zAe()(HL,HL)}function qAe(i,a,f,g){var w=w0t(i,a,f),v;switch(g=SW(g??",f"),g.type){case"s":{var b=Math.max(Math.abs(i),Math.abs(a));return g.precision==null&&!isNaN(v=NAe(w,b))&&(g.precision=v),ANt(g,b)}case"":case"e":case"g":case"p":case"r":{g.precision==null&&!isNaN(v=PAe(w,Math.max(Math.abs(i),Math.abs(a))))&&(g.precision=v-(g.type==="e"));break}case"f":case"%":{g.precision==null&&!isNaN(v=OAe(w))&&(g.precision=v-(g.type==="%")*2);break}}return _Nt(g)}function HAe(i){var a=i.domain;return i.ticks=function(f){var g=a();return P9e(g[0],g[g.length-1],f??10)},i.tickFormat=function(f,g){var w=a();return qAe(w[0],w[w.length-1],f??10,g)},i.nice=function(f){f==null&&(f=10);var g=a(),w=0,v=g.length-1,b=g[w],E=g[v],S,_,M=10;for(E<b&&(_=b,b=E,E=_,_=w,w=v,v=_);M-- >0;){if(_=b0t(b,E,f),_===S)return g[w]=b,g[v]=E,a(g);if(_>0)b=Math.floor(b/_)*_,E=Math.ceil(E/_)*_;else if(_<0)b=Math.ceil(b*_)/_,E=Math.floor(E*_)/_;else break;S=_}return i},i}function VL(){var i=INt();return i.copy=function(){return MNt(i,VL())},AW.apply(i,arguments),HAe(i)}function VAe(i,a){i=i.slice();var f=0,g=i.length-1,w=i[f],v=i[g],b;return v<w&&(b=f,f=g,g=b,b=w,w=v,v=b),i[f]=a.floor(w),i[g]=a.ceil(v),i}const G0t=new Date,K0t=new Date;function R1(i,a,f,g){function w(v){return i(v=arguments.length===0?new Date:new Date(+v)),v}return w.floor=v=>(i(v=new Date(+v)),v),w.ceil=v=>(i(v=new Date(v-1)),a(v,1),i(v),v),w.round=v=>{const b=w(v),E=w.ceil(v);return v-b<E-v?b:E},w.offset=(v,b)=>(a(v=new Date(+v),b==null?1:Math.floor(b)),v),w.range=(v,b,E)=>{const S=[];if(v=w.ceil(v),E=E==null?1:Math.floor(E),!(v<b)||!(E>0))return S;let _;do S.push(_=new Date(+v)),a(v,E),i(v);while(_<v&&v<b);return S},w.filter=v=>R1(b=>{if(b>=b)for(;i(b),!v(b);)b.setTime(b-1)},(b,E)=>{if(b>=b)if(E<0)for(;++E<=0;)for(;a(b,-1),!v(b););else for(;--E>=0;)for(;a(b,1),!v(b););}),f&&(w.count=(v,b)=>(G0t.setTime(+v),K0t.setTime(+b),i(G0t),i(K0t),Math.floor(f(G0t,K0t))),w.every=v=>(v=Math.floor(v),!isFinite(v)||!(v>0)?null:v>1?w.filter(g?b=>g(b)%v===0:b=>w.count(0,b)%v===0):w)),w}const UL=R1(()=>{},(i,a)=>{i.setTime(+i+a)},(i,a)=>a-i);UL.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?R1(a=>{a.setTime(Math.floor(a/i)*i)},(a,f)=>{a.setTime(+a+f*i)},(a,f)=>(f-a)/i):UL),UL.range;const Tx=1e3,Kw=Tx*60,Cx=Kw*60,Sx=Cx*24,W0t=Sx*7,ONt=Sx*30,Y0t=Sx*365,f8=R1(i=>{i.setTime(i-i.getMilliseconds())},(i,a)=>{i.setTime(+i+a*Tx)},(i,a)=>(a-i)/Tx,i=>i.getUTCSeconds());f8.range;const cF=R1(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*Tx)},(i,a)=>{i.setTime(+i+a*Kw)},(i,a)=>(a-i)/Kw,i=>i.getMinutes());cF.range,R1(i=>{i.setUTCSeconds(0,0)},(i,a)=>{i.setTime(+i+a*Kw)},(i,a)=>(a-i)/Kw,i=>i.getUTCMinutes()).range;const uF=R1(i=>{i.setTime(i-i.getMilliseconds()-i.getSeconds()*Tx-i.getMinutes()*Kw)},(i,a)=>{i.setTime(+i+a*Cx)},(i,a)=>(a-i)/Cx,i=>i.getHours());uF.range,R1(i=>{i.setUTCMinutes(0,0,0)},(i,a)=>{i.setTime(+i+a*Cx)},(i,a)=>(a-i)/Cx,i=>i.getUTCHours()).range;const c9=R1(i=>i.setHours(0,0,0,0),(i,a)=>i.setDate(i.getDate()+a),(i,a)=>(a-i-(a.getTimezoneOffset()-i.getTimezoneOffset())*Kw)/Sx,i=>i.getDate()-1);c9.range;const X0t=R1(i=>{i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCDate(i.getUTCDate()+a)},(i,a)=>(a-i)/Sx,i=>i.getUTCDate()-1);X0t.range,R1(i=>{i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCDate(i.getUTCDate()+a)},(i,a)=>(a-i)/Sx,i=>Math.floor(i/Sx)).range;function u9(i){return R1(a=>{a.setDate(a.getDate()-(a.getDay()+7-i)%7),a.setHours(0,0,0,0)},(a,f)=>{a.setDate(a.getDate()+f*7)},(a,f)=>(f-a-(f.getTimezoneOffset()-a.getTimezoneOffset())*Kw)/W0t)}const lF=u9(0),hF=u9(1),NNt=u9(2),PNt=u9(3),l9=u9(4),FNt=u9(5),BNt=u9(6);lF.range,hF.range,NNt.range,PNt.range,l9.range,FNt.range,BNt.range;function h9(i){return R1(a=>{a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+7-i)%7),a.setUTCHours(0,0,0,0)},(a,f)=>{a.setUTCDate(a.getUTCDate()+f*7)},(a,f)=>(f-a)/W0t)}const RNt=h9(0),LW=h9(1),UAe=h9(2),GAe=h9(3),GL=h9(4),KAe=h9(5),WAe=h9(6);RNt.range,LW.range,UAe.range,GAe.range,GL.range,KAe.range,WAe.range;const fF=R1(i=>{i.setDate(1),i.setHours(0,0,0,0)},(i,a)=>{i.setMonth(i.getMonth()+a)},(i,a)=>a.getMonth()-i.getMonth()+(a.getFullYear()-i.getFullYear())*12,i=>i.getMonth());fF.range,R1(i=>{i.setUTCDate(1),i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCMonth(i.getUTCMonth()+a)},(i,a)=>a.getUTCMonth()-i.getUTCMonth()+(a.getUTCFullYear()-i.getUTCFullYear())*12,i=>i.getUTCMonth()).range;const _x=R1(i=>{i.setMonth(0,1),i.setHours(0,0,0,0)},(i,a)=>{i.setFullYear(i.getFullYear()+a)},(i,a)=>a.getFullYear()-i.getFullYear(),i=>i.getFullYear());_x.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:R1(a=>{a.setFullYear(Math.floor(a.getFullYear()/i)*i),a.setMonth(0,1),a.setHours(0,0,0,0)},(a,f)=>{a.setFullYear(a.getFullYear()+f*i)}),_x.range;const f9=R1(i=>{i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},(i,a)=>{i.setUTCFullYear(i.getUTCFullYear()+a)},(i,a)=>a.getUTCFullYear()-i.getUTCFullYear(),i=>i.getUTCFullYear());f9.every=i=>!isFinite(i=Math.floor(i))||!(i>0)?null:R1(a=>{a.setUTCFullYear(Math.floor(a.getUTCFullYear()/i)*i),a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},(a,f)=>{a.setUTCFullYear(a.getUTCFullYear()+f*i)}),f9.range;function YAe(i,a,f,g,w,v){const b=[[f8,1,Tx],[f8,5,5*Tx],[f8,15,15*Tx],[f8,30,30*Tx],[v,1,Kw],[v,5,5*Kw],[v,15,15*Kw],[v,30,30*Kw],[w,1,Cx],[w,3,3*Cx],[w,6,6*Cx],[w,12,12*Cx],[g,1,Sx],[g,2,2*Sx],[f,1,W0t],[a,1,ONt],[a,3,3*ONt],[i,1,Y0t]];function E(_,M,F){const R=M<_;R&&([_,M]=[M,_]);const B=F&&typeof F.range=="function"?F:S(_,M,F),z=B?B.range(_,+M+1):[];return R?z.reverse():z}function S(_,M,F){const R=Math.abs(M-_)/F,B=p0t(([,,nt])=>nt).right(b,R);if(B===b.length)return i.every(w0t(_/Y0t,M/Y0t,F));if(B===0)return UL.every(Math.max(w0t(_,M,F),1));const[z,Y]=b[R/b[B-1][2]<b[B][2]/R?B-1:B];return z.every(Y)}return[E,S]}const[XAe,QAe]=YAe(_x,fF,lF,c9,uF,cF);function Q0t(i){if(0<=i.y&&i.y<100){var a=new Date(-1,i.m,i.d,i.H,i.M,i.S,i.L);return a.setFullYear(i.y),a}return new Date(i.y,i.m,i.d,i.H,i.M,i.S,i.L)}function J0t(i){if(0<=i.y&&i.y<100){var a=new Date(Date.UTC(-1,i.m,i.d,i.H,i.M,i.S,i.L));return a.setUTCFullYear(i.y),a}return new Date(Date.UTC(i.y,i.m,i.d,i.H,i.M,i.S,i.L))}function dF(i,a,f){return{y:i,m:a,d:f,H:0,M:0,S:0,L:0}}function JAe(i){var a=i.dateTime,f=i.date,g=i.time,w=i.periods,v=i.days,b=i.shortDays,E=i.months,S=i.shortMonths,_=gF(w),M=pF(w),F=gF(v),R=pF(v),B=gF(b),z=pF(b),Y=gF(E),nt=pF(E),ot=gF(S),ft=pF(S),wt={a:xt,A:Ft,b:Ct,B:kt,c:null,d:VNt,e:VNt,f:xLe,g:MLe,G:OLe,H:mLe,I:vLe,j:yLe,L:UNt,m:kLe,M:ELe,p:Gt,q:Fe,Q:QNt,s:JNt,S:TLe,u:CLe,U:SLe,V:_Le,w:ALe,W:LLe,x:null,X:null,y:DLe,Y:ILe,Z:NLe,"%":XNt},mt={a:Mt,A:pn,b:Ae,B:ye,c:null,d:KNt,e:KNt,f:RLe,g:WLe,G:XLe,H:PLe,I:FLe,j:BLe,L:WNt,m:jLe,M:$Le,p:tn,q:sn,Q:QNt,s:JNt,S:zLe,u:qLe,U:HLe,V:VLe,w:ULe,W:GLe,x:null,X:null,y:KLe,Y:YLe,Z:QLe,"%":XNt},ct={a:dt,A:K,b:yt,B:V,c:Ot,d:qNt,e:qNt,f:gLe,g:zNt,G:$Nt,H:HNt,I:HNt,j:lLe,L:dLe,m:uLe,M:hLe,p:Q,q:cLe,Q:bLe,s:wLe,S:fLe,u:rLe,U:iLe,V:sLe,w:nLe,W:aLe,x:It,X:jt,y:zNt,Y:$Nt,Z:oLe,"%":pLe};wt.x=rt(f,wt),wt.X=rt(g,wt),wt.c=rt(a,wt),mt.x=rt(f,mt),mt.X=rt(g,mt),mt.c=rt(a,mt);function rt(be,Ne){return function(Xt){var _e=[],xe=-1,Mn=0,ce=be.length,Br,we,Fi;for(Xt instanceof Date||(Xt=new Date(+Xt));++xe<ce;)be.charCodeAt(xe)===37&&(_e.push(be.slice(Mn,xe)),(we=jNt[Br=be.charAt(++xe)])!=null?Br=be.charAt(++xe):we=Br==="e"?" ":"0",(Fi=Ne[Br])&&(Br=Fi(Xt,we)),_e.push(Br),Mn=xe+1);return _e.push(be.slice(Mn,xe)),_e.join("")}}function it(be,Ne){return function(Xt){var _e=dF(1900,void 0,1),xe=gt(_e,be,Xt+="",0),Mn,ce;if(xe!=Xt.length)return null;if("Q"in _e)return new Date(_e.Q);if("s"in _e)return new Date(_e.s*1e3+("L"in _e?_e.L:0));if(Ne&&!("Z"in _e)&&(_e.Z=0),"p"in _e&&(_e.H=_e.H%12+_e.p*12),_e.m===void 0&&(_e.m="q"in _e?_e.q:0),"V"in _e){if(_e.V<1||_e.V>53)return null;"w"in _e||(_e.w=1),"Z"in _e?(Mn=J0t(dF(_e.y,0,1)),ce=Mn.getUTCDay(),Mn=ce>4||ce===0?LW.ceil(Mn):LW(Mn),Mn=X0t.offset(Mn,(_e.V-1)*7),_e.y=Mn.getUTCFullYear(),_e.m=Mn.getUTCMonth(),_e.d=Mn.getUTCDate()+(_e.w+6)%7):(Mn=Q0t(dF(_e.y,0,1)),ce=Mn.getDay(),Mn=ce>4||ce===0?hF.ceil(Mn):hF(Mn),Mn=c9.offset(Mn,(_e.V-1)*7),_e.y=Mn.getFullYear(),_e.m=Mn.getMonth(),_e.d=Mn.getDate()+(_e.w+6)%7)}else("W"in _e||"U"in _e)&&("w"in _e||(_e.w="u"in _e?_e.u%7:"W"in _e?1:0),ce="Z"in _e?J0t(dF(_e.y,0,1)).getUTCDay():Q0t(dF(_e.y,0,1)).getDay(),_e.m=0,_e.d="W"in _e?(_e.w+6)%7+_e.W*7-(ce+5)%7:_e.w+_e.U*7-(ce+6)%7);return"Z"in _e?(_e.H+=_e.Z/100|0,_e.M+=_e.Z%100,J0t(_e)):Q0t(_e)}}function gt(be,Ne,Xt,_e){for(var xe=0,Mn=Ne.length,ce=Xt.length,Br,we;xe<Mn;){if(_e>=ce)return-1;if(Br=Ne.charCodeAt(xe++),Br===37){if(Br=Ne.charAt(xe++),we=ct[Br in jNt?Ne.charAt(xe++):Br],!we||(_e=we(be,Xt,_e))<0)return-1}else if(Br!=Xt.charCodeAt(_e++))return-1}return _e}function Q(be,Ne,Xt){var _e=_.exec(Ne.slice(Xt));return _e?(be.p=M.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function dt(be,Ne,Xt){var _e=B.exec(Ne.slice(Xt));return _e?(be.w=z.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function K(be,Ne,Xt){var _e=F.exec(Ne.slice(Xt));return _e?(be.w=R.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function yt(be,Ne,Xt){var _e=ot.exec(Ne.slice(Xt));return _e?(be.m=ft.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function V(be,Ne,Xt){var _e=Y.exec(Ne.slice(Xt));return _e?(be.m=nt.get(_e[0].toLowerCase()),Xt+_e[0].length):-1}function Ot(be,Ne,Xt){return gt(be,a,Ne,Xt)}function It(be,Ne,Xt){return gt(be,f,Ne,Xt)}function jt(be,Ne,Xt){return gt(be,g,Ne,Xt)}function xt(be){return b[be.getDay()]}function Ft(be){return v[be.getDay()]}function Ct(be){return S[be.getMonth()]}function kt(be){return E[be.getMonth()]}function Gt(be){return w[+(be.getHours()>=12)]}function Fe(be){return 1+~~(be.getMonth()/3)}function Mt(be){return b[be.getUTCDay()]}function pn(be){return v[be.getUTCDay()]}function Ae(be){return S[be.getUTCMonth()]}function ye(be){return E[be.getUTCMonth()]}function tn(be){return w[+(be.getUTCHours()>=12)]}function sn(be){return 1+~~(be.getUTCMonth()/3)}return{format:function(be){var Ne=rt(be+="",wt);return Ne.toString=function(){return be},Ne},parse:function(be){var Ne=it(be+="",!1);return Ne.toString=function(){return be},Ne},utcFormat:function(be){var Ne=rt(be+="",mt);return Ne.toString=function(){return be},Ne},utcParse:function(be){var Ne=it(be+="",!0);return Ne.toString=function(){return be},Ne}}}var jNt={"-":"",_:" ",0:"0"},Ad=/^\s*\d+/,ZAe=/^%/,tLe=/[\\^$*+?|[\]().{}]/g;function Jc(i,a,f){var g=i<0?"-":"",w=(g?-i:i)+"",v=w.length;return g+(v<f?new Array(f-v+1).join(a)+w:w)}function eLe(i){return i.replace(tLe,"\\$&")}function gF(i){return new RegExp("^(?:"+i.map(eLe).join("|")+")","i")}function pF(i){return new Map(i.map((a,f)=>[a.toLowerCase(),f]))}function nLe(i,a,f){var g=Ad.exec(a.slice(f,f+1));return g?(i.w=+g[0],f+g[0].length):-1}function rLe(i,a,f){var g=Ad.exec(a.slice(f,f+1));return g?(i.u=+g[0],f+g[0].length):-1}function iLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.U=+g[0],f+g[0].length):-1}function sLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.V=+g[0],f+g[0].length):-1}function aLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.W=+g[0],f+g[0].length):-1}function $Nt(i,a,f){var g=Ad.exec(a.slice(f,f+4));return g?(i.y=+g[0],f+g[0].length):-1}function zNt(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.y=+g[0]+(+g[0]>68?1900:2e3),f+g[0].length):-1}function oLe(i,a,f){var g=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(a.slice(f,f+6));return g?(i.Z=g[1]?0:-(g[2]+(g[3]||"00")),f+g[0].length):-1}function cLe(i,a,f){var g=Ad.exec(a.slice(f,f+1));return g?(i.q=g[0]*3-3,f+g[0].length):-1}function uLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.m=g[0]-1,f+g[0].length):-1}function qNt(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.d=+g[0],f+g[0].length):-1}function lLe(i,a,f){var g=Ad.exec(a.slice(f,f+3));return g?(i.m=0,i.d=+g[0],f+g[0].length):-1}function HNt(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.H=+g[0],f+g[0].length):-1}function hLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.M=+g[0],f+g[0].length):-1}function fLe(i,a,f){var g=Ad.exec(a.slice(f,f+2));return g?(i.S=+g[0],f+g[0].length):-1}function dLe(i,a,f){var g=Ad.exec(a.slice(f,f+3));return g?(i.L=+g[0],f+g[0].length):-1}function gLe(i,a,f){var g=Ad.exec(a.slice(f,f+6));return g?(i.L=Math.floor(g[0]/1e3),f+g[0].length):-1}function pLe(i,a,f){var g=ZAe.exec(a.slice(f,f+1));return g?f+g[0].length:-1}function bLe(i,a,f){var g=Ad.exec(a.slice(f));return g?(i.Q=+g[0],f+g[0].length):-1}function wLe(i,a,f){var g=Ad.exec(a.slice(f));return g?(i.s=+g[0],f+g[0].length):-1}function VNt(i,a){return Jc(i.getDate(),a,2)}function mLe(i,a){return Jc(i.getHours(),a,2)}function vLe(i,a){return Jc(i.getHours()%12||12,a,2)}function yLe(i,a){return Jc(1+c9.count(_x(i),i),a,3)}function UNt(i,a){return Jc(i.getMilliseconds(),a,3)}function xLe(i,a){return UNt(i,a)+"000"}function kLe(i,a){return Jc(i.getMonth()+1,a,2)}function ELe(i,a){return Jc(i.getMinutes(),a,2)}function TLe(i,a){return Jc(i.getSeconds(),a,2)}function CLe(i){var a=i.getDay();return a===0?7:a}function SLe(i,a){return Jc(lF.count(_x(i)-1,i),a,2)}function GNt(i){var a=i.getDay();return a>=4||a===0?l9(i):l9.ceil(i)}function _Le(i,a){return i=GNt(i),Jc(l9.count(_x(i),i)+(_x(i).getDay()===4),a,2)}function ALe(i){return i.getDay()}function LLe(i,a){return Jc(hF.count(_x(i)-1,i),a,2)}function DLe(i,a){return Jc(i.getFullYear()%100,a,2)}function MLe(i,a){return i=GNt(i),Jc(i.getFullYear()%100,a,2)}function ILe(i,a){return Jc(i.getFullYear()%1e4,a,4)}function OLe(i,a){var f=i.getDay();return i=f>=4||f===0?l9(i):l9.ceil(i),Jc(i.getFullYear()%1e4,a,4)}function NLe(i){var a=i.getTimezoneOffset();return(a>0?"-":(a*=-1,"+"))+Jc(a/60|0,"0",2)+Jc(a%60,"0",2)}function KNt(i,a){return Jc(i.getUTCDate(),a,2)}function PLe(i,a){return Jc(i.getUTCHours(),a,2)}function FLe(i,a){return Jc(i.getUTCHours()%12||12,a,2)}function BLe(i,a){return Jc(1+X0t.count(f9(i),i),a,3)}function WNt(i,a){return Jc(i.getUTCMilliseconds(),a,3)}function RLe(i,a){return WNt(i,a)+"000"}function jLe(i,a){return Jc(i.getUTCMonth()+1,a,2)}function $Le(i,a){return Jc(i.getUTCMinutes(),a,2)}function zLe(i,a){return Jc(i.getUTCSeconds(),a,2)}function qLe(i){var a=i.getUTCDay();return a===0?7:a}function HLe(i,a){return Jc(RNt.count(f9(i)-1,i),a,2)}function YNt(i){var a=i.getUTCDay();return a>=4||a===0?GL(i):GL.ceil(i)}function VLe(i,a){return i=YNt(i),Jc(GL.count(f9(i),i)+(f9(i).getUTCDay()===4),a,2)}function ULe(i){return i.getUTCDay()}function GLe(i,a){return Jc(LW.count(f9(i)-1,i),a,2)}function KLe(i,a){return Jc(i.getUTCFullYear()%100,a,2)}function WLe(i,a){return i=YNt(i),Jc(i.getUTCFullYear()%100,a,2)}function YLe(i,a){return Jc(i.getUTCFullYear()%1e4,a,4)}function XLe(i,a){var f=i.getUTCDay();return i=f>=4||f===0?GL(i):GL.ceil(i),Jc(i.getUTCFullYear()%1e4,a,4)}function QLe(){return"+0000"}function XNt(){return"%"}function QNt(i){return+i}function JNt(i){return Math.floor(+i/1e3)}var KL,DW;JLe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function JLe(i){return KL=JAe(i),DW=KL.format,KL.parse,KL.utcFormat,KL.utcParse,KL}function ZLe(i){return new Date(i)}function tDe(i){return i instanceof Date?+i:+new Date(+i)}function ZNt(i,a,f,g,w,v,b,E,S,_){var M=INt(),F=M.invert,R=M.domain,B=_(".%L"),z=_(":%S"),Y=_("%I:%M"),nt=_("%I %p"),ot=_("%a %d"),ft=_("%b %d"),wt=_("%B"),mt=_("%Y");function ct(rt){return(S(rt)<rt?B:E(rt)<rt?z:b(rt)<rt?Y:v(rt)<rt?nt:g(rt)<rt?w(rt)<rt?ot:ft:f(rt)<rt?wt:mt)(rt)}return M.invert=function(rt){return new Date(F(rt))},M.domain=function(rt){return arguments.length?R(Array.from(rt,tDe)):R().map(ZLe)},M.ticks=function(rt){var it=R();return i(it[0],it[it.length-1],rt??10)},M.tickFormat=function(rt,it){return it==null?ct:_(it)},M.nice=function(rt){var it=R();return(!rt||typeof rt.range!="function")&&(rt=a(it[0],it[it.length-1],rt??10)),rt?R(VAe(it,rt)):M},M.copy=function(){return MNt(M,ZNt(i,a,f,g,w,v,b,E,S,_))},M}function eDe(){return AW.apply(ZNt(XAe,QAe,_x,fF,lF,c9,uF,cF,f8,DW).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function nDe(i){for(var a=i.length/6|0,f=new Array(a),g=0;g<a;)f[g]="#"+i.slice(g*6,++g*6);return f}const tPt=nDe("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function kf(i){return function(){return i}}const ePt=Math.abs,ng=Math.atan2,d9=Math.cos,rDe=Math.max,Z0t=Math.min,t4=Math.sin,WL=Math.sqrt,rg=1e-12,bF=Math.PI,MW=bF/2,IW=2*bF;function iDe(i){return i>1?0:i<-1?bF:Math.acos(i)}function nPt(i){return i>=1?MW:i<=-1?-MW:Math.asin(i)}function rPt(i){let a=3;return i.digits=function(f){if(!arguments.length)return a;if(f==null)a=null;else{const g=Math.floor(f);if(!(g>=0))throw new RangeError(`invalid digits: ${f}`);a=g}return i},()=>new yAe(a)}function sDe(i){return i.innerRadius}function aDe(i){return i.outerRadius}function oDe(i){return i.startAngle}function cDe(i){return i.endAngle}function uDe(i){return i&&i.padAngle}function lDe(i,a,f,g,w,v,b,E){var S=f-i,_=g-a,M=b-w,F=E-v,R=F*S-M*_;if(!(R*R<rg))return R=(M*(a-v)-F*(i-w))/R,[i+R*S,a+R*_]}function OW(i,a,f,g,w,v,b){var E=i-f,S=a-g,_=(b?v:-v)/WL(E*E+S*S),M=_*S,F=-_*E,R=i+M,B=a+F,z=f+M,Y=g+F,nt=(R+z)/2,ot=(B+Y)/2,ft=z-R,wt=Y-B,mt=ft*ft+wt*wt,ct=w-v,rt=R*Y-z*B,it=(wt<0?-1:1)*WL(rDe(0,ct*ct*mt-rt*rt)),gt=(rt*wt-ft*it)/mt,Q=(-rt*ft-wt*it)/mt,dt=(rt*wt+ft*it)/mt,K=(-rt*ft+wt*it)/mt,yt=gt-nt,V=Q-ot,Ot=dt-nt,It=K-ot;return yt*yt+V*V>Ot*Ot+It*It&&(gt=dt,Q=K),{cx:gt,cy:Q,x01:-M,y01:-F,x11:gt*(w/ct-1),y11:Q*(w/ct-1)}}function YL(){var i=sDe,a=aDe,f=kf(0),g=null,w=oDe,v=cDe,b=uDe,E=null,S=rPt(_);function _(){var M,F,R=+i.apply(this,arguments),B=+a.apply(this,arguments),z=w.apply(this,arguments)-MW,Y=v.apply(this,arguments)-MW,nt=ePt(Y-z),ot=Y>z;if(E||(E=M=S()),B<R&&(F=B,B=R,R=F),!(B>rg))E.moveTo(0,0);else if(nt>IW-rg)E.moveTo(B*d9(z),B*t4(z)),E.arc(0,0,B,z,Y,!ot),R>rg&&(E.moveTo(R*d9(Y),R*t4(Y)),E.arc(0,0,R,Y,z,ot));else{var ft=z,wt=Y,mt=z,ct=Y,rt=nt,it=nt,gt=b.apply(this,arguments)/2,Q=gt>rg&&(g?+g.apply(this,arguments):WL(R*R+B*B)),dt=Z0t(ePt(B-R)/2,+f.apply(this,arguments)),K=dt,yt=dt,V,Ot;if(Q>rg){var It=nPt(Q/R*t4(gt)),jt=nPt(Q/B*t4(gt));(rt-=It*2)>rg?(It*=ot?1:-1,mt+=It,ct-=It):(rt=0,mt=ct=(z+Y)/2),(it-=jt*2)>rg?(jt*=ot?1:-1,ft+=jt,wt-=jt):(it=0,ft=wt=(z+Y)/2)}var xt=B*d9(ft),Ft=B*t4(ft),Ct=R*d9(ct),kt=R*t4(ct);if(dt>rg){var Gt=B*d9(wt),Fe=B*t4(wt),Mt=R*d9(mt),pn=R*t4(mt),Ae;if(nt<bF)if(Ae=lDe(xt,Ft,Mt,pn,Gt,Fe,Ct,kt)){var ye=xt-Ae[0],tn=Ft-Ae[1],sn=Gt-Ae[0],be=Fe-Ae[1],Ne=1/t4(iDe((ye*sn+tn*be)/(WL(ye*ye+tn*tn)*WL(sn*sn+be*be)))/2),Xt=WL(Ae[0]*Ae[0]+Ae[1]*Ae[1]);K=Z0t(dt,(R-Xt)/(Ne-1)),yt=Z0t(dt,(B-Xt)/(Ne+1))}else K=yt=0}it>rg?yt>rg?(V=OW(Mt,pn,xt,Ft,B,yt,ot),Ot=OW(Gt,Fe,Ct,kt,B,yt,ot),E.moveTo(V.cx+V.x01,V.cy+V.y01),yt<dt?E.arc(V.cx,V.cy,yt,ng(V.y01,V.x01),ng(Ot.y01,Ot.x01),!ot):(E.arc(V.cx,V.cy,yt,ng(V.y01,V.x01),ng(V.y11,V.x11),!ot),E.arc(0,0,B,ng(V.cy+V.y11,V.cx+V.x11),ng(Ot.cy+Ot.y11,Ot.cx+Ot.x11),!ot),E.arc(Ot.cx,Ot.cy,yt,ng(Ot.y11,Ot.x11),ng(Ot.y01,Ot.x01),!ot))):(E.moveTo(xt,Ft),E.arc(0,0,B,ft,wt,!ot)):E.moveTo(xt,Ft),!(R>rg)||!(rt>rg)?E.lineTo(Ct,kt):K>rg?(V=OW(Ct,kt,Gt,Fe,R,-K,ot),Ot=OW(xt,Ft,Mt,pn,R,-K,ot),E.lineTo(V.cx+V.x01,V.cy+V.y01),K<dt?E.arc(V.cx,V.cy,K,ng(V.y01,V.x01),ng(Ot.y01,Ot.x01),!ot):(E.arc(V.cx,V.cy,K,ng(V.y01,V.x01),ng(V.y11,V.x11),!ot),E.arc(0,0,R,ng(V.cy+V.y11,V.cx+V.x11),ng(Ot.cy+Ot.y11,Ot.cx+Ot.x11),ot),E.arc(Ot.cx,Ot.cy,K,ng(Ot.y11,Ot.x11),ng(Ot.y01,Ot.x01),!ot))):E.arc(0,0,R,ct,mt,ot)}if(E.closePath(),M)return E=null,M+""||null}return _.centroid=function(){var M=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2,F=(+w.apply(this,arguments)+ +v.apply(this,arguments))/2-bF/2;return[d9(F)*M,t4(F)*M]},_.innerRadius=function(M){return arguments.length?(i=typeof M=="function"?M:kf(+M),_):i},_.outerRadius=function(M){return arguments.length?(a=typeof M=="function"?M:kf(+M),_):a},_.cornerRadius=function(M){return arguments.length?(f=typeof M=="function"?M:kf(+M),_):f},_.padRadius=function(M){return arguments.length?(g=M==null?null:typeof M=="function"?M:kf(+M),_):g},_.startAngle=function(M){return arguments.length?(w=typeof M=="function"?M:kf(+M),_):w},_.endAngle=function(M){return arguments.length?(v=typeof M=="function"?M:kf(+M),_):v},_.padAngle=function(M){return arguments.length?(b=typeof M=="function"?M:kf(+M),_):b},_.context=function(M){return arguments.length?(E=M??null,_):E},_}function iPt(i){return typeof i=="object"&&"length"in i?i:Array.from(i)}function sPt(i){this._context=i}sPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;default:this._context.lineTo(i,a);break}}};function Kg(i){return new sPt(i)}function hDe(i){return i[0]}function fDe(i){return i[1]}function Ax(i,a){var f=kf(!0),g=null,w=Kg,v=null,b=rPt(E);i=typeof i=="function"?i:i===void 0?hDe:kf(i),a=typeof a=="function"?a:a===void 0?fDe:kf(a);function E(S){var _,M=(S=iPt(S)).length,F,R=!1,B;for(g==null&&(v=w(B=b())),_=0;_<=M;++_)!(_<M&&f(F=S[_],_,S))===R&&((R=!R)?v.lineStart():v.lineEnd()),R&&v.point(+i(F,_,S),+a(F,_,S));if(B)return v=null,B+""||null}return E.x=function(S){return arguments.length?(i=typeof S=="function"?S:kf(+S),E):i},E.y=function(S){return arguments.length?(a=typeof S=="function"?S:kf(+S),E):a},E.defined=function(S){return arguments.length?(f=typeof S=="function"?S:kf(!!S),E):f},E.curve=function(S){return arguments.length?(w=S,g!=null&&(v=w(g)),E):w},E.context=function(S){return arguments.length?(S==null?g=v=null:v=w(g=S),E):g},E}function dDe(i,a){return a<i?-1:a>i?1:a>=i?0:NaN}function gDe(i){return i}function pDe(){var i=gDe,a=dDe,f=null,g=kf(0),w=kf(IW),v=kf(0);function b(E){var S,_=(E=iPt(E)).length,M,F,R=0,B=new Array(_),z=new Array(_),Y=+g.apply(this,arguments),nt=Math.min(IW,Math.max(-IW,w.apply(this,arguments)-Y)),ot,ft=Math.min(Math.abs(nt)/_,v.apply(this,arguments)),wt=ft*(nt<0?-1:1),mt;for(S=0;S<_;++S)(mt=z[B[S]=S]=+i(E[S],S,E))>0&&(R+=mt);for(a!=null?B.sort(function(ct,rt){return a(z[ct],z[rt])}):f!=null&&B.sort(function(ct,rt){return f(E[ct],E[rt])}),S=0,F=R?(nt-_*wt)/R:0;S<_;++S,Y=ot)M=B[S],mt=z[M],ot=Y+(mt>0?mt*F:0)+wt,z[M]={data:E[M],index:S,value:mt,startAngle:Y,endAngle:ot,padAngle:ft};return z}return b.value=function(E){return arguments.length?(i=typeof E=="function"?E:kf(+E),b):i},b.sortValues=function(E){return arguments.length?(a=E,f=null,b):a},b.sort=function(E){return arguments.length?(f=E,a=null,b):f},b.startAngle=function(E){return arguments.length?(g=typeof E=="function"?E:kf(+E),b):g},b.endAngle=function(E){return arguments.length?(w=typeof E=="function"?E:kf(+E),b):w},b.padAngle=function(E){return arguments.length?(v=typeof E=="function"?E:kf(+E),b):v},b}class aPt{constructor(a,f){this._context=a,this._x=f}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(a,f){switch(a=+a,f=+f,this._point){case 0:{this._point=1,this._line?this._context.lineTo(a,f):this._context.moveTo(a,f);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,f,a,f):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+f)/2,a,this._y0,a,f);break}}this._x0=a,this._y0=f}}function bDe(i){return new aPt(i,!0)}function wDe(i){return new aPt(i,!1)}function d8(){}function NW(i,a,f){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+a)/6,(i._y0+4*i._y1+f)/6)}function PW(i){this._context=i}PW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:NW(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:NW(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function wF(i){return new PW(i)}function oPt(i){this._context=i}oPt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._x2=i,this._y2=a;break;case 1:this._point=2,this._x3=i,this._y3=a;break;case 2:this._point=3,this._x4=i,this._y4=a,this._context.moveTo((this._x0+4*this._x1+i)/6,(this._y0+4*this._y1+a)/6);break;default:NW(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function mDe(i){return new oPt(i)}function cPt(i){this._context=i}cPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var f=(this._x0+4*this._x1+i)/6,g=(this._y0+4*this._y1+a)/6;this._line?this._context.lineTo(f,g):this._context.moveTo(f,g);break;case 3:this._point=4;default:NW(this,i,a);break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a}};function vDe(i){return new cPt(i)}function uPt(i,a){this._basis=new PW(i),this._beta=a}uPt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var i=this._x,a=this._y,f=i.length-1;if(f>0)for(var g=i[0],w=a[0],v=i[f]-g,b=a[f]-w,E=-1,S;++E<=f;)S=E/f,this._basis.point(this._beta*i[E]+(1-this._beta)*(g+S*v),this._beta*a[E]+(1-this._beta)*(w+S*b));this._x=this._y=null,this._basis.lineEnd()},point:function(i,a){this._x.push(+i),this._y.push(+a)}};const yDe=function i(a){function f(g){return a===1?new PW(g):new uPt(g,a)}return f.beta=function(g){return i(+g)},f}(.85);function FW(i,a,f){i._context.bezierCurveTo(i._x1+i._k*(i._x2-i._x0),i._y1+i._k*(i._y2-i._y0),i._x2+i._k*(i._x1-a),i._y2+i._k*(i._y1-f),i._x2,i._y2)}function tgt(i,a){this._context=i,this._k=(1-a)/6}tgt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:FW(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2,this._x1=i,this._y1=a;break;case 2:this._point=3;default:FW(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const xDe=function i(a){function f(g){return new tgt(g,a)}return f.tension=function(g){return i(+g)},f}(0);function egt(i,a){this._context=i,this._k=(1-a)/6}egt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._x3=i,this._y3=a;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=a);break;case 2:this._point=3,this._x5=i,this._y5=a;break;default:FW(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const kDe=function i(a){function f(g){return new egt(g,a)}return f.tension=function(g){return i(+g)},f}(0);function ngt(i,a){this._context=i,this._k=(1-a)/6}ngt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:FW(this,i,a);break}this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const EDe=function i(a){function f(g){return new ngt(g,a)}return f.tension=function(g){return i(+g)},f}(0);function rgt(i,a,f){var g=i._x1,w=i._y1,v=i._x2,b=i._y2;if(i._l01_a>rg){var E=2*i._l01_2a+3*i._l01_a*i._l12_a+i._l12_2a,S=3*i._l01_a*(i._l01_a+i._l12_a);g=(g*E-i._x0*i._l12_2a+i._x2*i._l01_2a)/S,w=(w*E-i._y0*i._l12_2a+i._y2*i._l01_2a)/S}if(i._l23_a>rg){var _=2*i._l23_2a+3*i._l23_a*i._l12_a+i._l12_2a,M=3*i._l23_a*(i._l23_a+i._l12_a);v=(v*_+i._x1*i._l23_2a-a*i._l12_2a)/M,b=(b*_+i._y1*i._l23_2a-f*i._l12_2a)/M}i._context.bezierCurveTo(g,w,v,b,i._x2,i._y2)}function lPt(i,a){this._context=i,this._alpha=a}lPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,g=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+g*g,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3;default:rgt(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const TDe=function i(a){function f(g){return a?new lPt(g,a):new tgt(g,0)}return f.alpha=function(g){return i(+g)},f}(.5);function hPt(i,a){this._context=i,this._alpha=a}hPt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,g=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+g*g,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=i,this._y3=a;break;case 1:this._point=2,this._context.moveTo(this._x4=i,this._y4=a);break;case 2:this._point=3,this._x5=i,this._y5=a;break;default:rgt(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const CDe=function i(a){function f(g){return a?new hPt(g,a):new egt(g,0)}return f.alpha=function(g){return i(+g)},f}(.5);function fPt(i,a){this._context=i,this._alpha=a}fPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){if(i=+i,a=+a,this._point){var f=this._x2-i,g=this._y2-a;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(f*f+g*g,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rgt(this,i,a);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=i,this._y0=this._y1,this._y1=this._y2,this._y2=a}};const SDe=function i(a){function f(g){return a?new fPt(g,a):new ngt(g,0)}return f.alpha=function(g){return i(+g)},f}(.5);function dPt(i){this._context=i}dPt.prototype={areaStart:d8,areaEnd:d8,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(i,a){i=+i,a=+a,this._point?this._context.lineTo(i,a):(this._point=1,this._context.moveTo(i,a))}};function _De(i){return new dPt(i)}function gPt(i){return i<0?-1:1}function pPt(i,a,f){var g=i._x1-i._x0,w=a-i._x1,v=(i._y1-i._y0)/(g||w<0&&-0),b=(f-i._y1)/(w||g<0&&-0),E=(v*w+b*g)/(g+w);return(gPt(v)+gPt(b))*Math.min(Math.abs(v),Math.abs(b),.5*Math.abs(E))||0}function bPt(i,a){var f=i._x1-i._x0;return f?(3*(i._y1-i._y0)/f-a)/2:a}function igt(i,a,f){var g=i._x0,w=i._y0,v=i._x1,b=i._y1,E=(v-g)/3;i._context.bezierCurveTo(g+E,w+E*a,v-E,b-E*f,v,b)}function BW(i){this._context=i}BW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:igt(this,this._t0,bPt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(i,a){var f=NaN;if(i=+i,a=+a,!(i===this._x1&&a===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;break;case 2:this._point=3,igt(this,bPt(this,f=pPt(this,i,a)),f);break;default:igt(this,this._t0,f=pPt(this,i,a));break}this._x0=this._x1,this._x1=i,this._y0=this._y1,this._y1=a,this._t0=f}}};function wPt(i){this._context=new mPt(i)}(wPt.prototype=Object.create(BW.prototype)).point=function(i,a){BW.prototype.point.call(this,a,i)};function mPt(i){this._context=i}mPt.prototype={moveTo:function(i,a){this._context.moveTo(a,i)},closePath:function(){this._context.closePath()},lineTo:function(i,a){this._context.lineTo(a,i)},bezierCurveTo:function(i,a,f,g,w,v){this._context.bezierCurveTo(a,i,g,f,v,w)}};function ADe(i){return new BW(i)}function LDe(i){return new wPt(i)}function vPt(i){this._context=i}vPt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var i=this._x,a=this._y,f=i.length;if(f)if(this._line?this._context.lineTo(i[0],a[0]):this._context.moveTo(i[0],a[0]),f===2)this._context.lineTo(i[1],a[1]);else for(var g=yPt(i),w=yPt(a),v=0,b=1;b<f;++v,++b)this._context.bezierCurveTo(g[0][v],w[0][v],g[1][v],w[1][v],i[b],a[b]);(this._line||this._line!==0&&f===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(i,a){this._x.push(+i),this._y.push(+a)}};function yPt(i){var a,f=i.length-1,g,w=new Array(f),v=new Array(f),b=new Array(f);for(w[0]=0,v[0]=2,b[0]=i[0]+2*i[1],a=1;a<f-1;++a)w[a]=1,v[a]=4,b[a]=4*i[a]+2*i[a+1];for(w[f-1]=2,v[f-1]=7,b[f-1]=8*i[f-1]+i[f],a=1;a<f;++a)g=w[a]/v[a-1],v[a]-=g,b[a]-=g*b[a-1];for(w[f-1]=b[f-1]/v[f-1],a=f-2;a>=0;--a)w[a]=(b[a]-w[a+1])/v[a];for(v[f-1]=(i[f]+w[f-1])/2,a=0;a<f-1;++a)v[a]=2*i[a+1]-w[a+1];return[w,v]}function DDe(i){return new vPt(i)}function RW(i,a){this._context=i,this._t=a}RW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,a){switch(i=+i,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,a):this._context.moveTo(i,a);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,a),this._context.lineTo(i,a);else{var f=this._x*(1-this._t)+i*this._t;this._context.lineTo(f,this._y),this._context.lineTo(f,a)}break}}this._x=i,this._y=a}};function MDe(i){return new RW(i,.5)}function IDe(i){return new RW(i,0)}function ODe(i){return new RW(i,1)}function mF(i,a,f){this.k=i,this.x=a,this.y=f}mF.prototype={constructor:mF,scale:function(i){return i===1?this:new mF(this.k*i,this.x,this.y)},translate:function(i,a){return i===0&a===0?this:new mF(this.k,this.x+this.k*i,this.y+this.k*a)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},mF.prototype;/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:xPt,setPrototypeOf:kPt,isFrozen:NDe,getPrototypeOf:PDe,getOwnPropertyDescriptor:FDe}=Object;let{freeze:Wg,seal:qv,create:BDe}=Object,{apply:sgt,construct:agt}=typeof Reflect<"u"&&Reflect;sgt||(sgt=function(a,f,g){return a.apply(f,g)}),Wg||(Wg=function(a){return a}),qv||(qv=function(a){return a}),agt||(agt=function(a,f){return new a(...f)});const RDe=Ww(Array.prototype.forEach),EPt=Ww(Array.prototype.pop),vF=Ww(Array.prototype.push),jW=Ww(String.prototype.toLowerCase),ogt=Ww(String.prototype.toString),jDe=Ww(String.prototype.match),Hv=Ww(String.prototype.replace),$De=Ww(String.prototype.indexOf),zDe=Ww(String.prototype.trim),E2=Ww(RegExp.prototype.test),yF=qDe(TypeError);function Ww(i){return function(a){for(var f=arguments.length,g=new Array(f>1?f-1:0),w=1;w<f;w++)g[w-1]=arguments[w];return sgt(i,a,g)}}function qDe(i){return function(){for(var a=arguments.length,f=new Array(a),g=0;g<a;g++)f[g]=arguments[g];return agt(i,f)}}function Fo(i,a,f){var g;f=(g=f)!==null&&g!==void 0?g:jW,kPt&&kPt(i,null);let w=a.length;for(;w--;){let v=a[w];if(typeof v=="string"){const b=f(v);b!==v&&(NDe(a)||(a[w]=b),v=b)}i[v]=!0}return i}function XL(i){const a=BDe(null);for(const[f,g]of xPt(i))a[f]=g;return a}function $W(i,a){for(;i!==null;){const g=FDe(i,a);if(g){if(g.get)return Ww(g.get);if(typeof g.value=="function")return Ww(g.value)}i=PDe(i)}function f(g){return console.warn("fallback value for",g),null}return f}const TPt=Wg(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cgt=Wg(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ugt=Wg(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),HDe=Wg(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lgt=Wg(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),VDe=Wg(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),CPt=Wg(["#text"]),SPt=Wg(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),hgt=Wg(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_Pt=Wg(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zW=Wg(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),UDe=qv(/\{\{[\w\W]*|[\w\W]*\}\}/gm),GDe=qv(/<%[\w\W]*|[\w\W]*%>/gm),KDe=qv(/\${[\w\W]*}/gm),WDe=qv(/^data-[\-\w.\u00B7-\uFFFF]/),YDe=qv(/^aria-[\-\w]+$/),APt=qv(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),XDe=qv(/^(?:\w+script|data):/i),QDe=qv(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),LPt=qv(/^html$/i);var DPt=Object.freeze({__proto__:null,MUSTACHE_EXPR:UDe,ERB_EXPR:GDe,TMPLIT_EXPR:KDe,DATA_ATTR:WDe,ARIA_ATTR:YDe,IS_ALLOWED_URI:APt,IS_SCRIPT_OR_DATA:XDe,ATTR_WHITESPACE:QDe,DOCTYPE_NAME:LPt});const JDe=()=>typeof window>"u"?null:window,ZDe=function(a,f){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let g=null;const w="data-tt-policy-suffix";f&&f.hasAttribute(w)&&(g=f.getAttribute(w));const v="dompurify"+(g?"#"+g:"");try{return a.createPolicy(v,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+v+" could not be created."),null}};function MPt(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:JDe();const a=Gi=>MPt(Gi);if(a.version="3.0.5",a.removed=[],!i||!i.document||i.document.nodeType!==9)return a.isSupported=!1,a;const f=i.document,g=f.currentScript;let{document:w}=i;const{DocumentFragment:v,HTMLTemplateElement:b,Node:E,Element:S,NodeFilter:_,NamedNodeMap:M=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:F,DOMParser:R,trustedTypes:B}=i,z=S.prototype,Y=$W(z,"cloneNode"),nt=$W(z,"nextSibling"),ot=$W(z,"childNodes"),ft=$W(z,"parentNode");if(typeof b=="function"){const Gi=w.createElement("template");Gi.content&&Gi.content.ownerDocument&&(w=Gi.content.ownerDocument)}let wt,mt="";const{implementation:ct,createNodeIterator:rt,createDocumentFragment:it,getElementsByTagName:gt}=w,{importNode:Q}=f;let dt={};a.isSupported=typeof xPt=="function"&&typeof ft=="function"&&ct&&ct.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:K,ERB_EXPR:yt,TMPLIT_EXPR:V,DATA_ATTR:Ot,ARIA_ATTR:It,IS_SCRIPT_OR_DATA:jt,ATTR_WHITESPACE:xt}=DPt;let{IS_ALLOWED_URI:Ft}=DPt,Ct=null;const kt=Fo({},[...TPt,...cgt,...ugt,...lgt,...CPt]);let Gt=null;const Fe=Fo({},[...SPt,...hgt,..._Pt,...zW]);let Mt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pn=null,Ae=null,ye=!0,tn=!0,sn=!1,be=!0,Ne=!1,Xt=!1,_e=!1,xe=!1,Mn=!1,ce=!1,Br=!1,we=!0,Fi=!1;const mi="user-content-";let ga=!0,Ss=!1,za={},br=null;const An=Fo({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Nn=null;const Bn=Fo({},["audio","video","img","source","image","track"]);let ke=null;const pe=Fo({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",an="http://www.w3.org/2000/svg",xn="http://www.w3.org/1999/xhtml";let qa=xn,xo=!1,ko=null;const va=Fo({},[Je,an,xn],ogt);let Ha;const ds=["application/xhtml+xml","text/html"],Fu="text/html";let Zs,d1=null;const I2=w.createElement("form"),ll=function(cn){return cn instanceof RegExp||cn instanceof Function},Ic=function(cn){if(!(d1&&d1===cn)){if((!cn||typeof cn!="object")&&(cn={}),cn=XL(cn),Ha=ds.indexOf(cn.PARSER_MEDIA_TYPE)===-1?Ha=Fu:Ha=cn.PARSER_MEDIA_TYPE,Zs=Ha==="application/xhtml+xml"?ogt:jW,Ct="ALLOWED_TAGS"in cn?Fo({},cn.ALLOWED_TAGS,Zs):kt,Gt="ALLOWED_ATTR"in cn?Fo({},cn.ALLOWED_ATTR,Zs):Fe,ko="ALLOWED_NAMESPACES"in cn?Fo({},cn.ALLOWED_NAMESPACES,ogt):va,ke="ADD_URI_SAFE_ATTR"in cn?Fo(XL(pe),cn.ADD_URI_SAFE_ATTR,Zs):pe,Nn="ADD_DATA_URI_TAGS"in cn?Fo(XL(Bn),cn.ADD_DATA_URI_TAGS,Zs):Bn,br="FORBID_CONTENTS"in cn?Fo({},cn.FORBID_CONTENTS,Zs):An,pn="FORBID_TAGS"in cn?Fo({},cn.FORBID_TAGS,Zs):{},Ae="FORBID_ATTR"in cn?Fo({},cn.FORBID_ATTR,Zs):{},za="USE_PROFILES"in cn?cn.USE_PROFILES:!1,ye=cn.ALLOW_ARIA_ATTR!==!1,tn=cn.ALLOW_DATA_ATTR!==!1,sn=cn.ALLOW_UNKNOWN_PROTOCOLS||!1,be=cn.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=cn.SAFE_FOR_TEMPLATES||!1,Xt=cn.WHOLE_DOCUMENT||!1,Mn=cn.RETURN_DOM||!1,ce=cn.RETURN_DOM_FRAGMENT||!1,Br=cn.RETURN_TRUSTED_TYPE||!1,xe=cn.FORCE_BODY||!1,we=cn.SANITIZE_DOM!==!1,Fi=cn.SANITIZE_NAMED_PROPS||!1,ga=cn.KEEP_CONTENT!==!1,Ss=cn.IN_PLACE||!1,Ft=cn.ALLOWED_URI_REGEXP||APt,qa=cn.NAMESPACE||xn,Mt=cn.CUSTOM_ELEMENT_HANDLING||{},cn.CUSTOM_ELEMENT_HANDLING&&ll(cn.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Mt.tagNameCheck=cn.CUSTOM_ELEMENT_HANDLING.tagNameCheck),cn.CUSTOM_ELEMENT_HANDLING&&ll(cn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Mt.attributeNameCheck=cn.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),cn.CUSTOM_ELEMENT_HANDLING&&typeof cn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Mt.allowCustomizedBuiltInElements=cn.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(tn=!1),ce&&(Mn=!0),za&&(Ct=Fo({},[...CPt]),Gt=[],za.html===!0&&(Fo(Ct,TPt),Fo(Gt,SPt)),za.svg===!0&&(Fo(Ct,cgt),Fo(Gt,hgt),Fo(Gt,zW)),za.svgFilters===!0&&(Fo(Ct,ugt),Fo(Gt,hgt),Fo(Gt,zW)),za.mathMl===!0&&(Fo(Ct,lgt),Fo(Gt,_Pt),Fo(Gt,zW))),cn.ADD_TAGS&&(Ct===kt&&(Ct=XL(Ct)),Fo(Ct,cn.ADD_TAGS,Zs)),cn.ADD_ATTR&&(Gt===Fe&&(Gt=XL(Gt)),Fo(Gt,cn.ADD_ATTR,Zs)),cn.ADD_URI_SAFE_ATTR&&Fo(ke,cn.ADD_URI_SAFE_ATTR,Zs),cn.FORBID_CONTENTS&&(br===An&&(br=XL(br)),Fo(br,cn.FORBID_CONTENTS,Zs)),ga&&(Ct["#text"]=!0),Xt&&Fo(Ct,["html","head","body"]),Ct.table&&(Fo(Ct,["tbody"]),delete pn.tbody),cn.TRUSTED_TYPES_POLICY){if(typeof cn.TRUSTED_TYPES_POLICY.createHTML!="function")throw yF('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof cn.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yF('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');wt=cn.TRUSTED_TYPES_POLICY,mt=wt.createHTML("")}else wt===void 0&&(wt=ZDe(B,g)),wt!==null&&typeof mt=="string"&&(mt=wt.createHTML(""));Wg&&Wg(cn),d1=cn}},wc=Fo({},["mi","mo","mn","ms","mtext"]),Ea=Fo({},["foreignobject","desc","title","annotation-xml"]),gu=Fo({},["title","style","font","a","script"]),ta=Fo({},cgt);Fo(ta,ugt),Fo(ta,HDe);const fo=Fo({},lgt);Fo(fo,VDe);const mc=function(cn){let Nr=ft(cn);(!Nr||!Nr.tagName)&&(Nr={namespaceURI:qa,tagName:"template"});const Si=jW(cn.tagName),vc=jW(Nr.tagName);return ko[cn.namespaceURI]?cn.namespaceURI===an?Nr.namespaceURI===xn?Si==="svg":Nr.namespaceURI===Je?Si==="svg"&&(vc==="annotation-xml"||wc[vc]):!!ta[Si]:cn.namespaceURI===Je?Nr.namespaceURI===xn?Si==="math":Nr.namespaceURI===an?Si==="math"&&Ea[vc]:!!fo[Si]:cn.namespaceURI===xn?Nr.namespaceURI===an&&!Ea[vc]||Nr.namespaceURI===Je&&!wc[vc]?!1:!fo[Si]&&(gu[Si]||!ta[Si]):!!(Ha==="application/xhtml+xml"&&ko[cn.namespaceURI]):!1},ca=function(cn){vF(a.removed,{element:cn});try{cn.parentNode.removeChild(cn)}catch{cn.remove()}},ya=function(cn,Nr){try{vF(a.removed,{attribute:Nr.getAttributeNode(cn),from:Nr})}catch{vF(a.removed,{attribute:null,from:Nr})}if(Nr.removeAttribute(cn),cn==="is"&&!Gt[cn])if(Mn||ce)try{ca(Nr)}catch{}else try{Nr.setAttribute(cn,"")}catch{}},ea=function(cn){let Nr,Si;if(xe)cn="<remove></remove>"+cn;else{const Eh=jDe(cn,/^[\r\n\t ]+/);Si=Eh&&Eh[0]}Ha==="application/xhtml+xml"&&qa===xn&&(cn='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+cn+"</body></html>");const vc=wt?wt.createHTML(cn):cn;if(qa===xn)try{Nr=new R().parseFromString(vc,Ha)}catch{}if(!Nr||!Nr.documentElement){Nr=ct.createDocument(qa,"template",null);try{Nr.documentElement.innerHTML=xo?mt:vc}catch{}}const Rc=Nr.body||Nr.documentElement;return cn&&Si&&Rc.insertBefore(w.createTextNode(Si),Rc.childNodes[0]||null),qa===xn?gt.call(Nr,Xt?"html":"body")[0]:Xt?Nr.documentElement:Rc},Zl=function(cn){return rt.call(cn.ownerDocument||cn,cn,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT,null,!1)},Uc=function(cn){return cn instanceof F&&(typeof cn.nodeName!="string"||typeof cn.textContent!="string"||typeof cn.removeChild!="function"||!(cn.attributes instanceof M)||typeof cn.removeAttribute!="function"||typeof cn.setAttribute!="function"||typeof cn.namespaceURI!="string"||typeof cn.insertBefore!="function"||typeof cn.hasChildNodes!="function")},rm=function(cn){return typeof E=="object"?cn instanceof E:cn&&typeof cn=="object"&&typeof cn.nodeType=="number"&&typeof cn.nodeName=="string"},kh=function(cn,Nr,Si){dt[cn]&&RDe(dt[cn],vc=>{vc.call(a,Nr,Si,d1)})},Md=function(cn){let Nr;if(kh("beforeSanitizeElements",cn,null),Uc(cn))return ca(cn),!0;const Si=Zs(cn.nodeName);if(kh("uponSanitizeElement",cn,{tagName:Si,allowedTags:Ct}),cn.hasChildNodes()&&!rm(cn.firstElementChild)&&(!rm(cn.content)||!rm(cn.content.firstElementChild))&&E2(/<[/\w]/g,cn.innerHTML)&&E2(/<[/\w]/g,cn.textContent))return ca(cn),!0;if(!Ct[Si]||pn[Si]){if(!pn[Si]&&Id(Si)&&(Mt.tagNameCheck instanceof RegExp&&E2(Mt.tagNameCheck,Si)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(Si)))return!1;if(ga&&!br[Si]){const vc=ft(cn)||cn.parentNode,Rc=ot(cn)||cn.childNodes;if(Rc&&vc){const Eh=Rc.length;for(let Zc=Eh-1;Zc>=0;--Zc)vc.insertBefore(Y(Rc[Zc],!0),nt(cn))}}return ca(cn),!0}return cn instanceof S&&!mc(cn)||(Si==="noscript"||Si==="noembed"||Si==="noframes")&&E2(/<\/no(script|embed|frames)/i,cn.innerHTML)?(ca(cn),!0):(Ne&&cn.nodeType===3&&(Nr=cn.textContent,Nr=Hv(Nr,K," "),Nr=Hv(Nr,yt," "),Nr=Hv(Nr,V," "),cn.textContent!==Nr&&(vF(a.removed,{element:cn.cloneNode()}),cn.textContent=Nr)),kh("afterSanitizeElements",cn,null),!1)},w0=function(cn,Nr,Si){if(we&&(Nr==="id"||Nr==="name")&&(Si in w||Si in I2))return!1;if(!(tn&&!Ae[Nr]&&E2(Ot,Nr))){if(!(ye&&E2(It,Nr))){if(!Gt[Nr]||Ae[Nr]){if(!(Id(cn)&&(Mt.tagNameCheck instanceof RegExp&&E2(Mt.tagNameCheck,cn)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(cn))&&(Mt.attributeNameCheck instanceof RegExp&&E2(Mt.attributeNameCheck,Nr)||Mt.attributeNameCheck instanceof Function&&Mt.attributeNameCheck(Nr))||Nr==="is"&&Mt.allowCustomizedBuiltInElements&&(Mt.tagNameCheck instanceof RegExp&&E2(Mt.tagNameCheck,Si)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(Si))))return!1}else if(!ke[Nr]){if(!E2(Ft,Hv(Si,xt,""))){if(!((Nr==="src"||Nr==="xlink:href"||Nr==="href")&&cn!=="script"&&$De(Si,"data:")===0&&Nn[cn])){if(!(sn&&!E2(jt,Hv(Si,xt,"")))){if(Si)return!1}}}}}}return!0},Id=function(cn){return cn.indexOf("-")>0},m0=function(cn){let Nr,Si,vc,Rc;kh("beforeSanitizeAttributes",cn,null);const{attributes:Eh}=cn;if(!Eh)return;const Zc={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Gt};for(Rc=Eh.length;Rc--;){Nr=Eh[Rc];const{name:Qh,namespaceURI:Od}=Nr;if(Si=Qh==="value"?Nr.value:zDe(Nr.value),vc=Zs(Qh),Zc.attrName=vc,Zc.attrValue=Si,Zc.keepAttr=!0,Zc.forceKeepAttr=void 0,kh("uponSanitizeAttribute",cn,Zc),Si=Zc.attrValue,Zc.forceKeepAttr||(ya(Qh,cn),!Zc.keepAttr))continue;if(!be&&E2(/\/>/i,Si)){ya(Qh,cn);continue}Ne&&(Si=Hv(Si,K," "),Si=Hv(Si,yt," "),Si=Hv(Si,V," "));const cs=Zs(cn.nodeName);if(w0(cs,vc,Si)){if(Fi&&(vc==="id"||vc==="name")&&(ya(Qh,cn),Si=mi+Si),wt&&typeof B=="object"&&typeof B.getAttributeType=="function"&&!Od)switch(B.getAttributeType(cs,vc)){case"TrustedHTML":{Si=wt.createHTML(Si);break}case"TrustedScriptURL":{Si=wt.createScriptURL(Si);break}}try{Od?cn.setAttributeNS(Od,Qh,Si):cn.setAttribute(Qh,Si),EPt(a.removed)}catch{}}}kh("afterSanitizeAttributes",cn,null)},hg=function Gi(cn){let Nr;const Si=Zl(cn);for(kh("beforeSanitizeShadowDOM",cn,null);Nr=Si.nextNode();)kh("uponSanitizeShadowNode",Nr,null),!Md(Nr)&&(Nr.content instanceof v&&Gi(Nr.content),m0(Nr));kh("afterSanitizeShadowDOM",cn,null)};return a.sanitize=function(Gi){let cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nr,Si,vc,Rc;if(xo=!Gi,xo&&(Gi="<!-->"),typeof Gi!="string"&&!rm(Gi))if(typeof Gi.toString=="function"){if(Gi=Gi.toString(),typeof Gi!="string")throw yF("dirty is not a string, aborting")}else throw yF("toString is not a function");if(!a.isSupported)return Gi;if(_e||Ic(cn),a.removed=[],typeof Gi=="string"&&(Ss=!1),Ss){if(Gi.nodeName){const Qh=Zs(Gi.nodeName);if(!Ct[Qh]||pn[Qh])throw yF("root node is forbidden and cannot be sanitized in-place")}}else if(Gi instanceof E)Nr=ea("<!---->"),Si=Nr.ownerDocument.importNode(Gi,!0),Si.nodeType===1&&Si.nodeName==="BODY"||Si.nodeName==="HTML"?Nr=Si:Nr.appendChild(Si);else{if(!Mn&&!Ne&&!Xt&&Gi.indexOf("<")===-1)return wt&&Br?wt.createHTML(Gi):Gi;if(Nr=ea(Gi),!Nr)return Mn?null:Br?mt:""}Nr&&xe&&ca(Nr.firstChild);const Eh=Zl(Ss?Gi:Nr);for(;vc=Eh.nextNode();)Md(vc)||(vc.content instanceof v&&hg(vc.content),m0(vc));if(Ss)return Gi;if(Mn){if(ce)for(Rc=it.call(Nr.ownerDocument);Nr.firstChild;)Rc.appendChild(Nr.firstChild);else Rc=Nr;return(Gt.shadowroot||Gt.shadowrootmode)&&(Rc=Q.call(f,Rc,!0)),Rc}let Zc=Xt?Nr.outerHTML:Nr.innerHTML;return Xt&&Ct["!doctype"]&&Nr.ownerDocument&&Nr.ownerDocument.doctype&&Nr.ownerDocument.doctype.name&&E2(LPt,Nr.ownerDocument.doctype.name)&&(Zc="<!DOCTYPE "+Nr.ownerDocument.doctype.name+`>

91 `+Nn+"^"},test_match:function(An,Nn){var Bn,ke,pe;if(this.options.backtrack_lexer&&(pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pe.yylloc.range=this.yylloc.range.slice(0))),ke=An[0].match(/(?:\r\n?|\n).*/g),ke&&(this.yylineno+=ke.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ke?ke[ke.length-1].length-ke[ke.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+An[0].length},this.yytext+=An[0],this.match+=An[0],this.matches=An,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(An[0].length),this.matched+=An[0],Bn=this.performAction.call(this,this.yy,this,Nn,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Bn)return Bn;if(this._backtrack){for(var Je in pe)this[Je]=pe[Je];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var An,Nn,Bn,ke;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),Je=0;Je<pe.length;Je++)if(Bn=this._input.match(this.rules[pe[Je]]),Bn&&(!Nn||Bn[0].length>Nn[0].length)){if(Nn=Bn,ke=Je,this.options.backtrack_lexer){if(An=this.test_match(Bn,pe[Je]),An!==!1)return An;if(this._backtrack){Nn=!1;continue}else return!1}else if(!this.options.flex)break}return Nn?(An=this.test_match(Nn,pe[ke]),An!==!1?An:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
100 `+As+"^"},test_match:function(cs,As){var to,Ci,pu;if(this.options.backtrack_lexer&&(pu={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pu.yylloc.range=this.yylloc.range.slice(0))),Ci=cs[0].match(/(?:\r\n?|\n).*/g),Ci&&(this.yylineno+=Ci.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ci?Ci[Ci.length-1].length-Ci[Ci.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+cs[0].length},this.yytext+=cs[0],this.match+=cs[0],this.matches=cs,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(cs[0].length),this.matched+=cs[0],to=this.performAction.call(this,this.yy,this,As,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),to)return to;if(this._backtrack){for(var Le in pu)this[Le]=pu[Le];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var cs,As,to,Ci;this._more||(this.yytext="",this.match="");for(var pu=this._currentRules(),Le=0;Le<pu.length;Le++)if(to=this._input.match(this.rules[pu[Le]]),to&&(!As||to[0].length>As[0].length)){if(As=to,Ci=Le,this.options.backtrack_lexer){if(cs=this.test_match(to,pu[Le]),cs!==!1)return cs;if(this._backtrack){As=!1;continue}else return!1}else if(!this.options.flex)break}return As?(cs=this.test_match(As,pu[Ci]),cs!==!1?cs:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
230 `+dt+"^"},test_match:function(Q,dt){var K,yt,V;if(this.options.backtrack_lexer&&(V={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(V.yylloc.range=this.yylloc.range.slice(0))),yt=Q[0].match(/(?:\r\n?|\n).*/g),yt&&(this.yylineno+=yt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:yt?yt[yt.length-1].length-yt[yt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Q[0].length},this.yytext+=Q[0],this.match+=Q[0],this.matches=Q,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Q[0].length),this.matched+=Q[0],K=this.performAction.call(this,this.yy,this,dt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),K)return K;if(this._backtrack){for(var Ot in V)this[Ot]=V[Ot];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Q,dt,K,yt;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),Ot=0;Ot<V.length;Ot++)if(K=this._input.match(this.rules[V[Ot]]),K&&(!dt||K[0].length>dt[0].length)){if(dt=K,yt=Ot,this.options.backtrack_lexer){if(Q=this.test_match(K,V[Ot]),Q!==!1)return Q;if(this._backtrack){dt=!1;continue}else return!1}else if(!this.options.flex)break}return dt?(Q=this.test_match(dt,V[yt]),Q!==!1?Q:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
280 `+it+"^"},test_match:function(rt,it){var gt,Q,dt;if(this.options.backtrack_lexer&&(dt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(dt.yylloc.range=this.yylloc.range.slice(0))),Q=rt[0].match(/(?:\r\n?|\n).*/g),Q&&(this.yylineno+=Q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Q?Q[Q.length-1].length-Q[Q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+rt[0].length},this.yytext+=rt[0],this.match+=rt[0],this.matches=rt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(rt[0].length),this.matched+=rt[0],gt=this.performAction.call(this,this.yy,this,it,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),gt)return gt;if(this._backtrack){for(var K in dt)this[K]=dt[K];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var rt,it,gt,Q;this._more||(this.yytext="",this.match="");for(var dt=this._currentRules(),K=0;K<dt.length;K++)if(gt=this._input.match(this.rules[dt[K]]),gt&&(!it||gt[0].length>it[0].length)){if(it=gt,Q=K,this.options.backtrack_lexer){if(rt=this.test_match(gt,dt[K]),rt!==!1)return rt;if(this._backtrack){it=!1;continue}else return!1}else if(!this.options.flex)break}return it?(rt=this.test_match(it,dt[Q]),rt!==!1?rt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
349 `+V+"^"},test_match:function(yt,V){var Ot,It,jt;if(this.options.backtrack_lexer&&(jt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(jt.yylloc.range=this.yylloc.range.slice(0))),It=yt[0].match(/(?:\r\n?|\n).*/g),It&&(this.yylineno+=It.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:It?It[It.length-1].length-It[It.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+yt[0].length},this.yytext+=yt[0],this.match+=yt[0],this.matches=yt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(yt[0].length),this.matched+=yt[0],Ot=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ot)return Ot;if(this._backtrack){for(var xt in jt)this[xt]=jt[xt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var yt,V,Ot,It;this._more||(this.yytext="",this.match="");for(var jt=this._currentRules(),xt=0;xt<jt.length;xt++)if(Ot=this._input.match(this.rules[jt[xt]]),Ot&&(!V||Ot[0].length>V[0].length)){if(V=Ot,It=xt,this.options.backtrack_lexer){if(yt=this.test_match(Ot,jt[xt]),yt!==!1)return yt;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(yt=this.test_match(V,jt[It]),yt!==!1?yt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
605 `+E+"^"},test_match:function(b,E){var S,_,M;if(this.options.backtrack_lexer&&(M={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(M.yylloc.range=this.yylloc.range.slice(0))),_=b[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],S=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var F in M)this[F]=M[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,E,S,_;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),F=0;F<M.length;F++)if(S=this._input.match(this.rules[M[F]]),S&&(!E||S[0].length>E[0].length)){if(E=S,_=F,this.options.backtrack_lexer){if(b=this.test_match(S,M[F]),b!==!1)return b;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(b=this.test_match(E,M[_]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
611 `+ct+"^"},test_match:function(mt,ct){var rt,it,gt;if(this.options.backtrack_lexer&&(gt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(gt.yylloc.range=this.yylloc.range.slice(0))),it=mt[0].match(/(?:\r\n?|\n).*/g),it&&(this.yylineno+=it.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:it?it[it.length-1].length-it[it.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+mt[0].length},this.yytext+=mt[0],this.match+=mt[0],this.matches=mt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(mt[0].length),this.matched+=mt[0],rt=this.performAction.call(this,this.yy,this,ct,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),rt)return rt;if(this._backtrack){for(var Q in gt)this[Q]=gt[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var mt,ct,rt,it;this._more||(this.yytext="",this.match="");for(var gt=this._currentRules(),Q=0;Q<gt.length;Q++)if(rt=this._input.match(this.rules[gt[Q]]),rt&&(!ct||rt[0].length>ct[0].length)){if(ct=rt,it=Q,this.options.backtrack_lexer){if(mt=this.test_match(rt,gt[Q]),mt!==!1)return mt;if(this._backtrack){ct=!1;continue}else return!1}else if(!this.options.flex)break}return ct?(mt=this.test_match(ct,gt[it]),mt!==!1?mt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
645 `+tn+"^"},test_match:function(ye,tn){var sn,be,Ne;if(this.options.backtrack_lexer&&(Ne={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ne.yylloc.range=this.yylloc.range.slice(0))),be=ye[0].match(/(?:\r\n?|\n).*/g),be&&(this.yylineno+=be.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:be?be[be.length-1].length-be[be.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ye[0].length},this.yytext+=ye[0],this.match+=ye[0],this.matches=ye,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ye[0].length),this.matched+=ye[0],sn=this.performAction.call(this,this.yy,this,tn,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),sn)return sn;if(this._backtrack){for(var Xt in Ne)this[Xt]=Ne[Xt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ye,tn,sn,be;this._more||(this.yytext="",this.match="");for(var Ne=this._currentRules(),Xt=0;Xt<Ne.length;Xt++)if(sn=this._input.match(this.rules[Ne[Xt]]),sn&&(!tn||sn[0].length>tn[0].length)){if(tn=sn,be=Xt,this.options.backtrack_lexer){if(ye=this.test_match(sn,Ne[Xt]),ye!==!1)return ye;if(this._backtrack){tn=!1;continue}else return!1}else if(!this.options.flex)break}return tn?(ye=this.test_match(tn,Ne[be]),ye!==!1?ye:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
651 `+xt+"^"},test_match:function(jt,xt){var Ft,Ct,kt;if(this.options.backtrack_lexer&&(kt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(kt.yylloc.range=this.yylloc.range.slice(0))),Ct=jt[0].match(/(?:\r\n?|\n).*/g),Ct&&(this.yylineno+=Ct.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ct?Ct[Ct.length-1].length-Ct[Ct.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+jt[0].length},this.yytext+=jt[0],this.match+=jt[0],this.matches=jt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(jt[0].length),this.matched+=jt[0],Ft=this.performAction.call(this,this.yy,this,xt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ft)return Ft;if(this._backtrack){for(var Gt in kt)this[Gt]=kt[Gt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var jt,xt,Ft,Ct;this._more||(this.yytext="",this.match="");for(var kt=this._currentRules(),Gt=0;Gt<kt.length;Gt++)if(Ft=this._input.match(this.rules[kt[Gt]]),Ft&&(!xt||Ft[0].length>xt[0].length)){if(xt=Ft,Ct=Gt,this.options.backtrack_lexer){if(jt=this.test_match(Ft,kt[Gt]),jt!==!1)return jt;if(this._backtrack){xt=!1;continue}else return!1}else if(!this.options.flex)break}return xt?(jt=this.test_match(xt,kt[Ct]),jt!==!1?jt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
657 `+tn+"^"},test_match:function(ye,tn){var sn,be,Ne;if(this.options.backtrack_lexer&&(Ne={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ne.yylloc.range=this.yylloc.range.slice(0))),be=ye[0].match(/(?:\r\n?|\n).*/g),be&&(this.yylineno+=be.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:be?be[be.length-1].length-be[be.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ye[0].length},this.yytext+=ye[0],this.match+=ye[0],this.matches=ye,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ye[0].length),this.matched+=ye[0],sn=this.performAction.call(this,this.yy,this,tn,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),sn)return sn;if(this._backtrack){for(var Xt in Ne)this[Xt]=Ne[Xt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ye,tn,sn,be;this._more||(this.yytext="",this.match="");for(var Ne=this._currentRules(),Xt=0;Xt<Ne.length;Xt++)if(sn=this._input.match(this.rules[Ne[Xt]]),sn&&(!tn||sn[0].length>tn[0].length)){if(tn=sn,be=Xt,this.options.backtrack_lexer){if(ye=this.test_match(sn,Ne[Xt]),ye!==!1)return ye;if(this._backtrack){tn=!1;continue}else return!1}else if(!this.options.flex)break}return tn?(ye=this.test_match(tn,Ne[be]),ye!==!1?ye:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
708 `+Xt+"^"},test_match:function(Ne,Xt){var _e,xe,Mn;if(this.options.backtrack_lexer&&(Mn={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Mn.yylloc.range=this.yylloc.range.slice(0))),xe=Ne[0].match(/(?:\r\n?|\n).*/g),xe&&(this.yylineno+=xe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:xe?xe[xe.length-1].length-xe[xe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ne[0].length},this.yytext+=Ne[0],this.match+=Ne[0],this.matches=Ne,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ne[0].length),this.matched+=Ne[0],_e=this.performAction.call(this,this.yy,this,Xt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_e)return _e;if(this._backtrack){for(var ce in Mn)this[ce]=Mn[ce];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ne,Xt,_e,xe;this._more||(this.yytext="",this.match="");for(var Mn=this._currentRules(),ce=0;ce<Mn.length;ce++)if(_e=this._input.match(this.rules[Mn[ce]]),_e&&(!Xt||_e[0].length>Xt[0].length)){if(Xt=_e,xe=ce,this.options.backtrack_lexer){if(Ne=this.test_match(_e,Mn[ce]),Ne!==!1)return Ne;if(this._backtrack){Xt=!1;continue}else return!1}else if(!this.options.flex)break}return Xt?(Ne=this.test_match(Xt,Mn[xe]),Ne!==!1?Ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
829 `+An+"^"},test_match:function(br,An){var Nn,Bn,ke;if(this.options.backtrack_lexer&&(ke={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ke.yylloc.range=this.yylloc.range.slice(0))),Bn=br[0].match(/(?:\r\n?|\n).*/g),Bn&&(this.yylineno+=Bn.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Bn?Bn[Bn.length-1].length-Bn[Bn.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+br[0].length},this.yytext+=br[0],this.match+=br[0],this.matches=br,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(br[0].length),this.matched+=br[0],Nn=this.performAction.call(this,this.yy,this,An,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Nn)return Nn;if(this._backtrack){for(var pe in ke)this[pe]=ke[pe];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var br,An,Nn,Bn;this._more||(this.yytext="",this.match="");for(var ke=this._currentRules(),pe=0;pe<ke.length;pe++)if(Nn=this._input.match(this.rules[ke[pe]]),Nn&&(!An||Nn[0].length>An[0].length)){if(An=Nn,Bn=pe,this.options.backtrack_lexer){if(br=this.test_match(Nn,ke[pe]),br!==!1)return br;if(this._backtrack){An=!1;continue}else return!1}else if(!this.options.flex)break}return An?(br=this.test_match(An,ke[Bn]),br!==!1?br:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
990 `+Ct+"^"},test_match:function(Ft,Ct){var kt,Gt,Fe;if(this.options.backtrack_lexer&&(Fe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Fe.yylloc.range=this.yylloc.range.slice(0))),Gt=Ft[0].match(/(?:\r\n?|\n).*/g),Gt&&(this.yylineno+=Gt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Gt?Gt[Gt.length-1].length-Gt[Gt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ft[0].length},this.yytext+=Ft[0],this.match+=Ft[0],this.matches=Ft,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ft[0].length),this.matched+=Ft[0],kt=this.performAction.call(this,this.yy,this,Ct,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),kt)return kt;if(this._backtrack){for(var Mt in Fe)this[Mt]=Fe[Mt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ft,Ct,kt,Gt;this._more||(this.yytext="",this.match="");for(var Fe=this._currentRules(),Mt=0;Mt<Fe.length;Mt++)if(kt=this._input.match(this.rules[Fe[Mt]]),kt&&(!Ct||kt[0].length>Ct[0].length)){if(Ct=kt,Gt=Mt,this.options.backtrack_lexer){if(Ft=this.test_match(kt,Fe[Mt]),Ft!==!1)return Ft;if(this._backtrack){Ct=!1;continue}else return!1}else if(!this.options.flex)break}return Ct?(Ft=this.test_match(Ct,Fe[Gt]),Ft!==!1?Ft:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1196 `+B+"^"},test_match:function(R,B){var z,Y,nt;if(this.options.backtrack_lexer&&(nt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(nt.yylloc.range=this.yylloc.range.slice(0))),Y=R[0].match(/(?:\r\n?|\n).*/g),Y&&(this.yylineno+=Y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Y?Y[Y.length-1].length-Y[Y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],z=this.performAction.call(this,this.yy,this,B,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var ot in nt)this[ot]=nt[ot];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,B,z,Y;this._more||(this.yytext="",this.match="");for(var nt=this._currentRules(),ot=0;ot<nt.length;ot++)if(z=this._input.match(this.rules[nt[ot]]),z&&(!B||z[0].length>B[0].length)){if(B=z,Y=ot,this.options.backtrack_lexer){if(R=this.test_match(z,nt[ot]),R!==!1)return R;if(this._backtrack){B=!1;continue}else return!1}else if(!this.options.flex)break}return B?(R=this.test_match(B,nt[Y]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1472 `+z+"^"},test_match:function(B,z){var Y,nt,ot;if(this.options.backtrack_lexer&&(ot={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ot.yylloc.range=this.yylloc.range.slice(0))),nt=B[0].match(/(?:\r\n?|\n).*/g),nt&&(this.yylineno+=nt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:nt?nt[nt.length-1].length-nt[nt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(B[0].length),this.matched+=B[0],Y=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Y)return Y;if(this._backtrack){for(var ft in ot)this[ft]=ot[ft];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,z,Y,nt;this._more||(this.yytext="",this.match="");for(var ot=this._currentRules(),ft=0;ft<ot.length;ft++)if(Y=this._input.match(this.rules[ot[ft]]),Y&&(!z||Y[0].length>z[0].length)){if(z=Y,nt=ft,this.options.backtrack_lexer){if(B=this.test_match(Y,ot[ft]),B!==!1)return B;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(B=this.test_match(z,ot[nt]),B!==!1?B:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1532 `+rt+"^"},test_match:function(ct,rt){var it,gt,Q;if(this.options.backtrack_lexer&&(Q={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Q.yylloc.range=this.yylloc.range.slice(0))),gt=ct[0].match(/(?:\r\n?|\n).*/g),gt&&(this.yylineno+=gt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:gt?gt[gt.length-1].length-gt[gt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ct[0].length},this.yytext+=ct[0],this.match+=ct[0],this.matches=ct,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ct[0].length),this.matched+=ct[0],it=this.performAction.call(this,this.yy,this,rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),it)return it;if(this._backtrack){for(var dt in Q)this[dt]=Q[dt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ct,rt,it,gt;this._more||(this.yytext="",this.match="");for(var Q=this._currentRules(),dt=0;dt<Q.length;dt++)if(it=this._input.match(this.rules[Q[dt]]),it&&(!rt||it[0].length>rt[0].length)){if(rt=it,gt=dt,this.options.backtrack_lexer){if(ct=this.test_match(it,Q[dt]),ct!==!1)return ct;if(this._backtrack){rt=!1;continue}else return!1}else if(!this.options.flex)break}return rt?(ct=this.test_match(rt,Q[gt]),ct!==!1?ct:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1538 */var oR=0,cR=1,uR=2,am=function y(p){if(!(this instanceof y))return new y(p);this.id="Thenable/1.0.7",this.state=oR,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof p=="function"&&p.call(this,this.fulfill.bind(this),this.reject.bind(this))};am.prototype={fulfill:function(p){return lR(this,cR,"fulfillValue",p)},reject:function(p){return lR(this,uR,"rejectReason",p)},then:function(p,x){var C=this,L=new am;return C.onFulfilled.push(dR(p,L,"fulfill")),C.onRejected.push(dR(x,L,"reject")),hR(C),L.proxy}};var lR=function(p,x,C,L){return p.state===oR&&(p.state=x,p[C]=L,hR(p)),p},hR=function(p){p.state===cR?fR(p,"onFulfilled",p.fulfillValue):p.state===uR&&fR(p,"onRejected",p.rejectReason)},fR=function(p,x,C){if(p[x].length!==0){var L=p[x];p[x]=[];var O=function(){for(var j=0;j<L.length;j++)L[j](C)};typeof setImmediate=="function"?setImmediate(O):setTimeout(O,0)}},dR=function(p,x,C){return function(L){if(typeof p!="function")x[C].call(x,L);else{var O;try{O=p(L)}catch(N){x.reject(N);return}mJ(x,O)}}},mJ=function y(p,x){if(p===x||p.proxy===x){p.reject(new TypeError("cannot resolve promise with itself"));return}var C;if(f(x)==="object"&&x!==null||typeof x=="function")try{C=x.then}catch(O){p.reject(O);return}if(typeof C=="function"){var L=!1;try{C.call(x,function(O){L||(L=!0,O===x?p.reject(new TypeError("circular thenable chain")):y(p,O))},function(O){L||(L=!0,p.reject(O))})}catch(O){L||p.reject(O)}return}p.fulfill(x)};am.all=function(y){return new am(function(p,x){for(var C=new Array(y.length),L=0,O=function(H,q){C[H]=q,L++,L===y.length&&p(C)},N=0;N<y.length;N++)(function(j){var H=y[j],q=H!=null&&H.then!=null;if(q)H.then(function(Z){O(j,Z)},function(Z){x(Z)});else{var W=H;O(j,W)}})(N)})},am.resolve=function(y){return new am(function(p,x){p(y)})},am.reject=function(y){return new am(function(p,x){x(y)})};var e6=typeof Promise<"u"?Promise:am,WD=function(p,x,C){var L=It(p),O=!L,N=this._private=we({duration:1e3},x,C);if(N.target=p,N.style=N.style||N.css,N.started=!1,N.playing=!1,N.hooked=!1,N.applying=!1,N.progress=0,N.completes=[],N.frames=[],N.complete&&ct(N.complete)&&N.completes.push(N.complete),O){var j=p.position();N.startPosition=N.startPosition||{x:j.x,y:j.y},N.startStyle=N.startStyle||p.cy().style().getAnimationStartStyle(p,N.style)}if(L){var H=p.pan();N.startPan={x:H.x,y:H.y},N.startZoom=p.zoom()}this.length=1,this[0]=this},y4=WD.prototype;we(y4,{instanceString:function(){return"animation"},hook:function(){var p=this._private;if(!p.hooked){var x,C=p.target._private.animation;p.queue?x=C.queue:x=C.current,x.push(this),yt(p.target)&&p.target.cy().addToAnimationPool(p.target),p.hooked=!0}return this},play:function(){var p=this._private;return p.progress===1&&(p.progress=0),p.playing=!0,p.started=!1,p.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var p=this._private;return p.applying=!0,p.started=!1,p.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var p=this._private;return p.playing=!1,p.started=!1,this},stop:function(){var p=this._private;return p.playing=!1,p.started=!1,p.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(p){var x=this._private;return p===void 0?x.progress*x.duration:this.progress(p/x.duration)},progress:function(p){var x=this._private,C=x.playing;return p===void 0?x.progress:(C&&this.pause(),x.progress=p,x.started=!1,C&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var p=this._private,x=p.playing;x&&this.pause(),p.progress=1-p.progress,p.started=!1;var C=function(q,W){var Z=p[q];Z!=null&&(p[q]=p[W],p[W]=Z)};if(C("zoom","startZoom"),C("pan","startPan"),C("position","startPosition"),p.style)for(var L=0;L<p.style.length;L++){var O=p.style[L],N=O.name,j=p.startStyle[N];p.startStyle[N]=O,p.style[L]=j}return x&&this.play(),this},promise:function(p){var x=this._private,C;switch(p){case"frame":C=x.frames;break;default:case"complete":case"completed":C=x.completes}return new e6(function(L,O){C.push(function(){L()})})}}),y4.complete=y4.completed,y4.run=y4.play,y4.running=y4.playing;var vJ={animated:function(){return function(){var x=this,C=x.length!==void 0,L=C?x:[x],O=this._private.cy||this;if(!O.styleEnabled())return!1;var N=L[0];if(N)return N._private.animation.current.length>0}},clearQueue:function(){return function(){var x=this,C=x.length!==void 0,L=C?x:[x],O=this._private.cy||this;if(!O.styleEnabled())return this;for(var N=0;N<L.length;N++){var j=L[N];j._private.animation.queue=[]}return this}},delay:function(){return function(x,C){var L=this._private.cy||this;return L.styleEnabled()?this.animate({delay:x,duration:x,complete:C}):this}},delayAnimation:function(){return function(x,C){var L=this._private.cy||this;return L.styleEnabled()?this.animation({delay:x,duration:x,complete:C}):this}},animation:function(){return function(x,C){var L=this,O=L.length!==void 0,N=O?L:[L],j=this._private.cy||this,H=!O,q=!H;if(!j.styleEnabled())return this;var W=j.style();x=we({},x,C);var Z=Object.keys(x).length===0;if(Z)return new WD(N[0],x);switch(x.duration===void 0&&(x.duration=400),x.duration){case"slow":x.duration=600;break;case"fast":x.duration=200;break}if(q&&(x.style=W.getPropsList(x.style||x.css),x.css=void 0),q&&x.renderedPosition!=null){var st=x.renderedPosition,bt=j.pan(),pt=j.zoom();x.position=PB(st,pt,bt)}if(H&&x.panBy!=null){var _t=x.panBy,St=j.pan();x.pan={x:St.x+_t.x,y:St.y+_t.y}}var Et=x.center||x.centre;if(H&&Et!=null){var Nt=j.getCenterPan(Et.eles,x.zoom);Nt!=null&&(x.pan=Nt)}if(H&&x.fit!=null){var Pt=x.fit,qt=j.getFitViewport(Pt.eles||Pt.boundingBox,Pt.padding);qt!=null&&(x.pan=qt.pan,x.zoom=qt.zoom)}if(H&&it(x.zoom)){var re=j.getZoomedViewport(x.zoom);re!=null?(re.zoomed&&(x.zoom=re.zoom),re.panned&&(x.pan=re.pan)):x.zoom=null}return new WD(N[0],x)}},animate:function(){return function(x,C){var L=this,O=L.length!==void 0,N=O?L:[L],j=this._private.cy||this;if(!j.styleEnabled())return this;C&&(x=we({},x,C));for(var H=0;H<N.length;H++){var q=N[H],W=q.animated()&&(x.queue===void 0||x.queue),Z=q.animation(x,W?{queue:!0}:void 0);Z.play()}return this}},stop:function(){return function(x,C){var L=this,O=L.length!==void 0,N=O?L:[L],j=this._private.cy||this;if(!j.styleEnabled())return this;for(var H=0;H<N.length;H++){for(var q=N[H],W=q._private,Z=W.animation.current,st=0;st<Z.length;st++){var bt=Z[st],pt=bt._private;C&&(pt.duration=0)}x&&(W.animation.queue=[]),C||(W.animation.current=[])}return j.notify("draw"),this}}},yJ=Array.isArray,aC=yJ,gR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xJ=/^\w*$/;function kJ(y,p){if(aC(y))return!1;var x=typeof y;return x=="number"||x=="symbol"||x=="boolean"||y==null||Nr(y)?!0:xJ.test(y)||!gR.test(y)||p!=null&&y in Object(p)}var EJ=kJ,TJ="[object AsyncFunction]",CJ="[object Function]",SJ="[object GeneratorFunction]",_J="[object Proxy]";function AJ(y){if(!ke(y))return!1;var p=Id(y);return p==CJ||p==SJ||p==TJ||p==_J}var LJ=AJ,DJ=ko["__core-js_shared__"],oC=DJ,pR=function(){var y=/[^.]+$/.exec(oC&&oC.keys&&oC.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}();function MJ(y){return!!pR&&pR in y}var IJ=MJ,OJ=Function.prototype,NJ=OJ.toString;function PJ(y){if(y!=null){try{return NJ.call(y)}catch{}try{return y+""}catch{}}return""}var bR=PJ,wR=/[\\^$.*+?()[\]{}|]/g,FJ=/^\[object .+?Constructor\]$/,mR=Function.prototype,vR=Object.prototype,BJ=mR.toString,RJ=vR.hasOwnProperty,jJ=RegExp("^"+BJ.call(RJ).replace(wR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $J(y){if(!ke(y)||IJ(y))return!1;var p=LJ(y)?jJ:FJ;return p.test(bR(y))}var zJ=$J;function qJ(y,p){return y==null?void 0:y[p]}var HJ=qJ;function VJ(y,p){var x=HJ(y,p);return zJ(x)?x:void 0}var YD=VJ,UJ=YD(Object,"create"),$8=UJ;function yR(){this.__data__=$8?$8(null):{},this.size=0}var GJ=yR;function KJ(y){var p=this.has(y)&&delete this.__data__[y];return this.size-=p?1:0,p}var WJ=KJ,YJ="__lodash_hash_undefined__",XJ=Object.prototype,QJ=XJ.hasOwnProperty;function JJ(y){var p=this.__data__;if($8){var x=p[y];return x===YJ?void 0:x}return QJ.call(p,y)?p[y]:void 0}var ZJ=JJ,tZ=Object.prototype,eZ=tZ.hasOwnProperty;function nZ(y){var p=this.__data__;return $8?p[y]!==void 0:eZ.call(p,y)}var rZ=nZ,iZ="__lodash_hash_undefined__";function sZ(y,p){var x=this.__data__;return this.size+=this.has(y)?0:1,x[y]=$8&&p===void 0?iZ:p,this}var aZ=sZ;function n6(y){var p=-1,x=y==null?0:y.length;for(this.clear();++p<x;){var C=y[p];this.set(C[0],C[1])}}n6.prototype.clear=GJ,n6.prototype.delete=WJ,n6.prototype.get=ZJ,n6.prototype.has=rZ,n6.prototype.set=aZ;var xR=n6;function oZ(){this.__data__=[],this.size=0}var cZ=oZ;function uZ(y,p){return y===p||y!==y&&p!==p}var kR=uZ;function lZ(y,p){for(var x=y.length;x--;)if(kR(y[x][0],p))return x;return-1}var cC=lZ,hZ=Array.prototype,fZ=hZ.splice;function dZ(y){var p=this.__data__,x=cC(p,y);if(x<0)return!1;var C=p.length-1;return x==C?p.pop():fZ.call(p,x,1),--this.size,!0}var gZ=dZ;function pZ(y){var p=this.__data__,x=cC(p,y);return x<0?void 0:p[x][1]}var bZ=pZ;function wZ(y){return cC(this.__data__,y)>-1}var mZ=wZ;function vZ(y,p){var x=this.__data__,C=cC(x,y);return C<0?(++this.size,x.push([y,p])):x[C][1]=p,this}var yZ=vZ;function r6(y){var p=-1,x=y==null?0:y.length;for(this.clear();++p<x;){var C=y[p];this.set(C[0],C[1])}}r6.prototype.clear=cZ,r6.prototype.delete=gZ,r6.prototype.get=bZ,r6.prototype.has=mZ,r6.prototype.set=yZ;var xZ=r6,kZ=YD(ko,"Map"),EZ=kZ;function TZ(){this.size=0,this.__data__={hash:new xR,map:new(EZ||xZ),string:new xR}}var CZ=TZ;function SZ(y){var p=typeof y;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?y!=="__proto__":y===null}var _Z=SZ;function AZ(y,p){var x=y.__data__;return _Z(p)?x[typeof p=="string"?"string":"hash"]:x.map}var uC=AZ;function LZ(y){var p=uC(this,y).delete(y);return this.size-=p?1:0,p}var DZ=LZ;function MZ(y){return uC(this,y).get(y)}var IZ=MZ;function OZ(y){return uC(this,y).has(y)}var NZ=OZ;function PZ(y,p){var x=uC(this,y),C=x.size;return x.set(y,p),this.size+=x.size==C?0:1,this}var FZ=PZ;function i6(y){var p=-1,x=y==null?0:y.length;for(this.clear();++p<x;){var C=y[p];this.set(C[0],C[1])}}i6.prototype.clear=CZ,i6.prototype.delete=DZ,i6.prototype.get=IZ,i6.prototype.has=NZ,i6.prototype.set=FZ;var ER=i6,BZ="Expected a function";function XD(y,p){if(typeof y!="function"||p!=null&&typeof p!="function")throw new TypeError(BZ);var x=function(){var C=arguments,L=p?p.apply(this,C):C[0],O=x.cache;if(O.has(L))return O.get(L);var N=y.apply(this,C);return x.cache=O.set(L,N)||O,N};return x.cache=new(XD.Cache||ER),x}XD.Cache=ER;var RZ=XD,jZ=500;function $Z(y){var p=RZ(y,function(C){return x.size===jZ&&x.clear(),C}),x=p.cache;return p}var zZ=$Z,qZ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HZ=/\\(\\)?/g,VZ=zZ(function(y){var p=[];return y.charCodeAt(0)===46&&p.push(""),y.replace(qZ,function(x,C,L,O){p.push(L?O.replace(HZ,"$1"):C||x)}),p}),TR=VZ;function UZ(y,p){for(var x=-1,C=y==null?0:y.length,L=Array(C);++x<C;)L[x]=p(y[x],x,y);return L}var CR=UZ,GZ=1/0,SR=wc?wc.prototype:void 0,_R=SR?SR.toString:void 0;function AR(y){if(typeof y=="string")return y;if(aC(y))return CR(y,AR)+"";if(Nr(y))return _R?_R.call(y):"";var p=y+"";return p=="0"&&1/y==-GZ?"-0":p}var KZ=AR;function WZ(y){return y==null?"":KZ(y)}var LR=WZ;function YZ(y,p){return aC(y)?y:EJ(y,p)?[y]:TR(LR(y))}var DR=YZ,XZ=1/0;function QZ(y){if(typeof y=="string"||Nr(y))return y;var p=y+"";return p=="0"&&1/y==-XZ?"-0":p}var QD=QZ;function JZ(y,p){p=DR(p,y);for(var x=0,C=p.length;y!=null&&x<C;)y=y[QD(p[x++])];return x&&x==C?y:void 0}var ZZ=JZ;function ttt(y,p,x){var C=y==null?void 0:ZZ(y,p);return C===void 0?x:C}var ett=ttt,ntt=function(){try{var y=YD(Object,"defineProperty");return y({},"",{}),y}catch{}}(),MR=ntt;function rtt(y,p,x){p=="__proto__"&&MR?MR(y,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):y[p]=x}var itt=rtt,stt=Object.prototype,A2t=stt.hasOwnProperty;function att(y,p,x){var C=y[p];(!(A2t.call(y,p)&&kR(C,x))||x===void 0&&!(p in y))&&itt(y,p,x)}var ott=att,ctt=9007199254740991,utt=/^(?:0|[1-9]\d*)$/;function ltt(y,p){var x=typeof y;return p=p??ctt,!!p&&(x=="number"||x!="symbol"&&utt.test(y))&&y>-1&&y%1==0&&y<p}var htt=ltt;function ftt(y,p,x,C){if(!ke(y))return y;p=DR(p,y);for(var L=-1,O=p.length,N=O-1,j=y;j!=null&&++L<O;){var H=QD(p[L]),q=x;if(H==="__proto__"||H==="constructor"||H==="prototype")return y;if(L!=N){var W=j[H];q=C?C(W,H,j):void 0,q===void 0&&(q=ke(W)?W:htt(p[L+1])?[]:{})}ott(j,H,q),j=j[H]}return y}var dtt=ftt;function gtt(y,p,x){return y==null?y:dtt(y,p,x)}var ptt=gtt;function btt(y,p){var x=-1,C=y.length;for(p||(p=Array(C));++x<C;)p[x]=y[x];return p}var wtt=btt;function mtt(y){return aC(y)?CR(y,QD):Nr(y)?[y]:wtt(TR(LR(y)))}var vtt=mtt,ytt={data:function(p){var x={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(L){},beforeSet:function(L,O){},onSet:function(L){},canSet:function(L){return!0}};return p=we({},x,p),function(L,O){var N=p,j=this,H=j.length!==void 0,q=H?j:[j],W=H?j[0]:j;if(mt(L)){var Z=L.indexOf(".")!==-1,st=Z&&vtt(L);if(N.allowGetting&&O===void 0){var bt;return W&&(N.beforeGet(W),st&&W._private[N.field][L]===void 0?bt=ett(W._private[N.field],st):bt=W._private[N.field][L]),bt}else if(N.allowSetting&&O!==void 0){var pt=!N.immutableKeys[L];if(pt){var _t=b({},L,O);N.beforeSet(j,_t);for(var St=0,Et=q.length;St<Et;St++){var Nt=q[St];N.canSet(Nt)&&(st&&W._private[N.field][L]===void 0?ptt(Nt._private[N.field],st,O):Nt._private[N.field][L]=O)}N.updateStyle&&j.updateStyle(),N.onSet(j),N.settingTriggersEvent&&j[N.triggerFnName](N.settingEvent)}}}else if(N.allowSetting&&it(L)){var Pt=L,qt,re,ee=Object.keys(Pt);N.beforeSet(j,Pt);for(var Ut=0;Ut<ee.length;Ut++){qt=ee[Ut],re=Pt[qt];var de=!N.immutableKeys[qt];if(de)for(var Yt=0;Yt<q.length;Yt++){var Ee=q[Yt];N.canSet(Ee)&&(Ee._private[N.field][qt]=re)}}N.updateStyle&&j.updateStyle(),N.onSet(j),N.settingTriggersEvent&&j[N.triggerFnName](N.settingEvent)}else if(N.allowBinding&&ct(L)){var Te=L;j.on(N.bindingEvent,Te)}else if(N.allowGetting&&L===void 0){var ie;return W&&(N.beforeGet(W),ie=W._private[N.field]),ie}return j}},removeData:function(p){var x={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return p=we({},x,p),function(L){var O=p,N=this,j=N.length!==void 0,H=j?N:[N];if(mt(L)){for(var q=L.split(/\s+/),W=q.length,Z=0;Z<W;Z++){var st=q[Z];if(!Ft(st)){var bt=!O.immutableKeys[st];if(bt)for(var pt=0,_t=H.length;pt<_t;pt++)H[pt]._private[O.field][st]=void 0}}O.triggerEvent&&N[O.triggerFnName](O.event)}else if(L===void 0){for(var St=0,Et=H.length;St<Et;St++)for(var Nt=H[St]._private[O.field],Pt=Object.keys(Nt),qt=0;qt<Pt.length;qt++){var re=Pt[qt],ee=!O.immutableKeys[re];ee&&(Nt[re]=void 0)}O.triggerEvent&&N[O.triggerFnName](O.event)}return N}}},xtt={eventAliasesOn:function(p){var x=p;x.addListener=x.listen=x.bind=x.on,x.unlisten=x.unbind=x.off=x.removeListener,x.trigger=x.emit,x.pon=x.promiseOn=function(C,L){var O=this,N=Array.prototype.slice.call(arguments,0);return new e6(function(j,H){var q=function(bt){O.off.apply(O,Z),j(bt)},W=N.concat([q]),Z=W.concat([]);O.on.apply(O,W)})}}},Kc={};[vJ,ytt,xtt].forEach(function(y){we(Kc,y)});var ktt={animate:Kc.animate(),animation:Kc.animation(),animated:Kc.animated(),clearQueue:Kc.clearQueue(),delay:Kc.delay(),delayAnimation:Kc.delayAnimation(),stop:Kc.stop()},lC={classes:function(p){var x=this;if(p===void 0){var C=[];return x[0]._private.classes.forEach(function(pt){return C.push(pt)}),C}else rt(p)||(p=(p||"").match(/\S+/g)||[]);for(var L=[],O=new Wx(p),N=0;N<x.length;N++){for(var j=x[N],H=j._private,q=H.classes,W=!1,Z=0;Z<p.length;Z++){var st=p[Z],bt=q.has(st);if(!bt){W=!0;break}}W||(W=q.size!==p.length),W&&(H.classes=O,L.push(j))}return L.length>0&&this.spawn(L).updateStyle().emit("class"),x},addClass:function(p){return this.toggleClass(p,!0)},hasClass:function(p){var x=this[0];return x!=null&&x._private.classes.has(p)},toggleClass:function(p,x){rt(p)||(p=p.match(/\S+/g)||[]);for(var C=this,L=x===void 0,O=[],N=0,j=C.length;N<j;N++)for(var H=C[N],q=H._private.classes,W=!1,Z=0;Z<p.length;Z++){var st=p[Z],bt=q.has(st),pt=!1;x||L&&!bt?(q.add(st),pt=!0):(!x||L&&bt)&&(q.delete(st),pt=!0),!W&&pt&&(O.push(H),W=!0)}return O.length>0&&this.spawn(O).updateStyle().emit("class"),C},removeClass:function(p){return this.toggleClass(p,!1)},flashClass:function(p,x){var C=this;if(x==null)x=250;else if(x===0)return C;return C.addClass(p),setTimeout(function(){C.removeClass(p)},x),C}};lC.className=lC.classNames=lC.classes;var yc={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:sn,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};yc.variable="(?:[\\w-.]|(?:\\\\"+yc.metaChar+"))+",yc.className="(?:[\\w-]|(?:\\\\"+yc.metaChar+"))+",yc.value=yc.string+"|"+yc.number,yc.id=yc.variable,function(){var y,p,x;for(y=yc.comparatorOp.split("|"),x=0;x<y.length;x++)p=y[x],yc.comparatorOp+="|@"+p;for(y=yc.comparatorOp.split("|"),x=0;x<y.length;x++)p=y[x],!(p.indexOf("!")>=0)&&p!=="="&&(yc.comparatorOp+="|\\!"+p)}();var bu=function(){return{checks:[]}},Xi={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},JD=[{selector:":selected",matches:function(p){return p.selected()}},{selector:":unselected",matches:function(p){return!p.selected()}},{selector:":selectable",matches:function(p){return p.selectable()}},{selector:":unselectable",matches:function(p){return!p.selectable()}},{selector:":locked",matches:function(p){return p.locked()}},{selector:":unlocked",matches:function(p){return!p.locked()}},{selector:":visible",matches:function(p){return p.visible()}},{selector:":hidden",matches:function(p){return!p.visible()}},{selector:":transparent",matches:function(p){return p.transparent()}},{selector:":grabbed",matches:function(p){return p.grabbed()}},{selector:":free",matches:function(p){return!p.grabbed()}},{selector:":removed",matches:function(p){return p.removed()}},{selector:":inside",matches:function(p){return!p.removed()}},{selector:":grabbable",matches:function(p){return p.grabbable()}},{selector:":ungrabbable",matches:function(p){return!p.grabbable()}},{selector:":animated",matches:function(p){return p.animated()}},{selector:":unanimated",matches:function(p){return!p.animated()}},{selector:":parent",matches:function(p){return p.isParent()}},{selector:":childless",matches:function(p){return p.isChildless()}},{selector:":child",matches:function(p){return p.isChild()}},{selector:":orphan",matches:function(p){return p.isOrphan()}},{selector:":nonorphan",matches:function(p){return p.isChild()}},{selector:":compound",matches:function(p){return p.isNode()?p.isParent():p.source().isParent()||p.target().isParent()}},{selector:":loop",matches:function(p){return p.isLoop()}},{selector:":simple",matches:function(p){return p.isSimple()}},{selector:":active",matches:function(p){return p.active()}},{selector:":inactive",matches:function(p){return!p.active()}},{selector:":backgrounding",matches:function(p){return p.backgrounding()}},{selector:":nonbackgrounding",matches:function(p){return!p.backgrounding()}}].sort(function(y,p){return Br(y.selector,p.selector)}),Ett=function(){for(var y={},p,x=0;x<JD.length;x++)p=JD[x],y[p.selector]=p.matches;return y}(),Ttt=function(p,x){return Ett[p](x)},Ctt="("+JD.map(function(y){return y.selector}).join("|")+")",s6=function(p){return p.replace(new RegExp("\\\\("+yc.metaChar+")","g"),function(x,C){return C})},B2=function(p,x,C){p[p.length-1]=C},z8=[{name:"group",query:!0,regex:"("+yc.group+")",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.GROUP,value:O==="*"?O:O+"s"})}},{name:"state",query:!0,regex:Ctt,populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.STATE,value:O})}},{name:"id",query:!0,regex:"\\#("+yc.id+")",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.ID,value:s6(O)})}},{name:"className",query:!0,regex:"\\.("+yc.className+")",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.CLASS,value:s6(O)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+yc.variable+")\\s*\\]",populate:function(p,x,C){var L=E(C,1),O=L[0];x.checks.push({type:Xi.DATA_EXIST,field:s6(O)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+yc.variable+")\\s*("+yc.comparatorOp+")\\s*("+yc.value+")\\s*\\]",populate:function(p,x,C){var L=E(C,3),O=L[0],N=L[1],j=L[2],H=new RegExp("^"+yc.string+"$").exec(j)!=null;H?j=j.substring(1,j.length-1):j=parseFloat(j),x.checks.push({type:Xi.DATA_COMPARE,field:s6(O),operator:N,value:j})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+yc.boolOp+")\\s*("+yc.variable+")\\s*\\]",populate:function(p,x,C){var L=E(C,2),O=L[0],N=L[1];x.checks.push({type:Xi.DATA_BOOL,field:s6(N),operator:O})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+yc.meta+")\\s*("+yc.comparatorOp+")\\s*("+yc.number+")\\s*\\]\\]",populate:function(p,x,C){var L=E(C,3),O=L[0],N=L[1],j=L[2];x.checks.push({type:Xi.META_COMPARE,field:s6(O),operator:N,value:parseFloat(j)})}},{name:"nextQuery",separator:!0,regex:yc.separator,populate:function(p,x){var C=p.currentSubject,L=p.edgeCount,O=p.compoundCount,N=p[p.length-1];C!=null&&(N.subject=C,p.currentSubject=null),N.edgeCount=L,N.compoundCount=O,p.edgeCount=0,p.compoundCount=0;var j=p[p.length++]=bu();return j}},{name:"directedEdge",separator:!0,regex:yc.directedEdge,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=x,O=bu();return C.checks.push({type:Xi.DIRECTED_EDGE,source:L,target:O}),B2(p,x,C),p.edgeCount++,O}else{var N=bu(),j=x,H=bu();return N.checks.push({type:Xi.NODE_SOURCE,source:j,target:H}),B2(p,x,N),p.edgeCount++,H}}},{name:"undirectedEdge",separator:!0,regex:yc.undirectedEdge,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=x,O=bu();return C.checks.push({type:Xi.UNDIRECTED_EDGE,nodes:[L,O]}),B2(p,x,C),p.edgeCount++,O}else{var N=bu(),j=x,H=bu();return N.checks.push({type:Xi.NODE_NEIGHBOR,node:j,neighbor:H}),B2(p,x,N),H}}},{name:"child",separator:!0,regex:yc.child,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=bu(),O=p[p.length-1];return C.checks.push({type:Xi.CHILD,parent:O,child:L}),B2(p,x,C),p.compoundCount++,L}else if(p.currentSubject===x){var N=bu(),j=p[p.length-1],H=bu(),q=bu(),W=bu(),Z=bu();return N.checks.push({type:Xi.COMPOUND_SPLIT,left:j,right:H,subject:q}),q.checks=x.checks,x.checks=[{type:Xi.TRUE}],Z.checks.push({type:Xi.TRUE}),H.checks.push({type:Xi.PARENT,parent:Z,child:W}),B2(p,j,N),p.currentSubject=q,p.compoundCount++,W}else{var st=bu(),bt=bu(),pt=[{type:Xi.PARENT,parent:st,child:bt}];return st.checks=x.checks,x.checks=pt,p.compoundCount++,bt}}},{name:"descendant",separator:!0,regex:yc.descendant,populate:function(p,x){if(p.currentSubject==null){var C=bu(),L=bu(),O=p[p.length-1];return C.checks.push({type:Xi.DESCENDANT,ancestor:O,descendant:L}),B2(p,x,C),p.compoundCount++,L}else if(p.currentSubject===x){var N=bu(),j=p[p.length-1],H=bu(),q=bu(),W=bu(),Z=bu();return N.checks.push({type:Xi.COMPOUND_SPLIT,left:j,right:H,subject:q}),q.checks=x.checks,x.checks=[{type:Xi.TRUE}],Z.checks.push({type:Xi.TRUE}),H.checks.push({type:Xi.ANCESTOR,ancestor:Z,descendant:W}),B2(p,j,N),p.currentSubject=q,p.compoundCount++,W}else{var st=bu(),bt=bu(),pt=[{type:Xi.ANCESTOR,ancestor:st,descendant:bt}];return st.checks=x.checks,x.checks=pt,p.compoundCount++,bt}}},{name:"subject",modifier:!0,regex:yc.subject,populate:function(p,x){if(p.currentSubject!=null&&p.currentSubject!==x)return Gc("Redefinition of subject in selector `"+p.toString()+"`"),!1;p.currentSubject=x;var C=p[p.length-1],L=C.checks[0],O=L==null?null:L.type;O===Xi.DIRECTED_EDGE?L.type=Xi.NODE_TARGET:O===Xi.UNDIRECTED_EDGE&&(L.type=Xi.NODE_NEIGHBOR,L.node=L.nodes[1],L.neighbor=L.nodes[0],L.nodes=null)}}];z8.forEach(function(y){return y.regexObj=new RegExp("^"+y.regex)});var Stt=function(p){for(var x,C,L,O=0;O<z8.length;O++){var N=z8[O],j=N.name,H=p.match(N.regexObj);if(H!=null){C=H,x=N,L=j;var q=H[0];p=p.substring(q.length);break}}return{expr:x,match:C,name:L,remaining:p}},ZD=function(p){var x=p.match(/^\s+/);if(x){var C=x[0];p=p.substring(C.length)}return p},_tt=function(p){var x=this,C=x.inputText=p,L=x[0]=bu();for(x.length=1,C=ZD(C);;){var O=Stt(C);if(O.expr==null)return Gc("The selector `"+p+"`is invalid"),!1;var N=O.match.slice(1),j=O.expr.populate(x,L,N);if(j===!1)return!1;if(j!=null&&(L=j),C=O.remaining,C.match(/^\s*$/))break}var H=x[x.length-1];x.currentSubject!=null&&(H.subject=x.currentSubject),H.edgeCount=x.edgeCount,H.compoundCount=x.compoundCount;for(var q=0;q<x.length;q++){var W=x[q];if(W.compoundCount>0&&W.edgeCount>0)return Gc("The selector `"+p+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(W.edgeCount>1)return Gc("The selector `"+p+"` is invalid because it uses multiple edge selectors"),!1;W.edgeCount===1&&Gc("The selector `"+p+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Att=function(){if(this.toStringCache!=null)return this.toStringCache;for(var p=function(W){return W??""},x=function(W){return mt(W)?'"'+W+'"':p(W)},C=function(W){return" "+W+" "},L=function(W,Z){var st=W.type,bt=W.value;switch(st){case Xi.GROUP:{var pt=p(bt);return pt.substring(0,pt.length-1)}case Xi.DATA_COMPARE:{var _t=W.field,St=W.operator;return"["+_t+C(p(St))+x(bt)+"]"}case Xi.DATA_BOOL:{var Et=W.operator,Nt=W.field;return"["+p(Et)+Nt+"]"}case Xi.DATA_EXIST:{var Pt=W.field;return"["+Pt+"]"}case Xi.META_COMPARE:{var qt=W.operator,re=W.field;return"[["+re+C(p(qt))+x(bt)+"]]"}case Xi.STATE:return bt;case Xi.ID:return"#"+bt;case Xi.CLASS:return"."+bt;case Xi.PARENT:case Xi.CHILD:return O(W.parent,Z)+C(">")+O(W.child,Z);case Xi.ANCESTOR:case Xi.DESCENDANT:return O(W.ancestor,Z)+" "+O(W.descendant,Z);case Xi.COMPOUND_SPLIT:{var ee=O(W.left,Z),Ut=O(W.subject,Z),de=O(W.right,Z);return ee+(ee.length>0?" ":"")+Ut+de}case Xi.TRUE:return""}},O=function(W,Z){return W.checks.reduce(function(st,bt,pt){return st+(Z===W&&pt===0?"$":"")+L(bt,Z)},"")},N="",j=0;j<this.length;j++){var H=this[j];N+=O(H,H.subject),this.length>1&&j<this.length-1&&(N+=", ")}return this.toStringCache=N,N},Ltt={parse:_tt,toString:Att},IR=function(p,x,C){var L,O=mt(p),N=Q(p),j=mt(C),H,q,W=!1,Z=!1,st=!1;switch(x.indexOf("!")>=0&&(x=x.replace("!",""),Z=!0),x.indexOf("@")>=0&&(x=x.replace("@",""),W=!0),(O||j||W)&&(H=!O&&!N?"":""+p,q=""+C),W&&(p=H=H.toLowerCase(),C=q=q.toLowerCase()),x){case"*=":L=H.indexOf(q)>=0;break;case"$=":L=H.indexOf(q,H.length-q.length)>=0;break;case"^=":L=H.indexOf(q)===0;break;case"=":L=p===C;break;case">":st=!0,L=p>C;break;case">=":st=!0,L=p>=C;break;case"<":st=!0,L=p<C;break;case"<=":st=!0,L=p<=C;break;default:L=!1;break}return Z&&(p!=null||!st)&&(L=!L),L},Dtt=function(p,x){switch(x){case"?":return!!p;case"!":return!p;case"^":return p===void 0}},Mtt=function(p){return p!==void 0},tM=function(p,x){return p.data(x)},Itt=function(p,x){return p[x]()},zl=[],Yu=function(p,x){return p.checks.every(function(C){return zl[C.type](C,x)})};zl[Xi.GROUP]=function(y,p){var x=y.value;return x==="*"||x===p.group()},zl[Xi.STATE]=function(y,p){var x=y.value;return Ttt(x,p)},zl[Xi.ID]=function(y,p){var x=y.value;return p.id()===x},zl[Xi.CLASS]=function(y,p){var x=y.value;return p.hasClass(x)},zl[Xi.META_COMPARE]=function(y,p){var x=y.field,C=y.operator,L=y.value;return IR(Itt(p,x),C,L)},zl[Xi.DATA_COMPARE]=function(y,p){var x=y.field,C=y.operator,L=y.value;return IR(tM(p,x),C,L)},zl[Xi.DATA_BOOL]=function(y,p){var x=y.field,C=y.operator;return Dtt(tM(p,x),C)},zl[Xi.DATA_EXIST]=function(y,p){var x=y.field;return y.operator,Mtt(tM(p,x))},zl[Xi.UNDIRECTED_EDGE]=function(y,p){var x=y.nodes[0],C=y.nodes[1],L=p.source(),O=p.target();return Yu(x,L)&&Yu(C,O)||Yu(C,L)&&Yu(x,O)},zl[Xi.NODE_NEIGHBOR]=function(y,p){return Yu(y.node,p)&&p.neighborhood().some(function(x){return x.isNode()&&Yu(y.neighbor,x)})},zl[Xi.DIRECTED_EDGE]=function(y,p){return Yu(y.source,p.source())&&Yu(y.target,p.target())},zl[Xi.NODE_SOURCE]=function(y,p){return Yu(y.source,p)&&p.outgoers().some(function(x){return x.isNode()&&Yu(y.target,x)})},zl[Xi.NODE_TARGET]=function(y,p){return Yu(y.target,p)&&p.incomers().some(function(x){return x.isNode()&&Yu(y.source,x)})},zl[Xi.CHILD]=function(y,p){return Yu(y.child,p)&&Yu(y.parent,p.parent())},zl[Xi.PARENT]=function(y,p){return Yu(y.parent,p)&&p.children().some(function(x){return Yu(y.child,x)})},zl[Xi.DESCENDANT]=function(y,p){return Yu(y.descendant,p)&&p.ancestors().some(function(x){return Yu(y.ancestor,x)})},zl[Xi.ANCESTOR]=function(y,p){return Yu(y.ancestor,p)&&p.descendants().some(function(x){return Yu(y.descendant,x)})},zl[Xi.COMPOUND_SPLIT]=function(y,p){return Yu(y.subject,p)&&Yu(y.left,p)&&Yu(y.right,p)},zl[Xi.TRUE]=function(){return!0},zl[Xi.COLLECTION]=function(y,p){var x=y.value;return x.has(p)},zl[Xi.FILTER]=function(y,p){var x=y.value;return x(p)};var OR=function(p){var x=this;if(x.length===1&&x[0].checks.length===1&&x[0].checks[0].type===Xi.ID)return p.getElementById(x[0].checks[0].value).collection();var C=function(O){for(var N=0;N<x.length;N++){var j=x[N];if(Yu(j,O))return!0}return!1};return x.text()==null&&(C=function(){return!0}),p.filter(C)},Ott=function(p){for(var x=this,C=0;C<x.length;C++){var L=x[C];if(Yu(L,p))return!0}return!1},Ntt={matches:Ott,filter:OR},ly=function(p){this.inputText=p,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,p==null||mt(p)&&p.match(/^\s*$/)||(yt(p)?this.addQuery({checks:[{type:Xi.COLLECTION,value:p.collection()}]}):ct(p)?this.addQuery({checks:[{type:Xi.FILTER,value:p}]}):mt(p)?this.parse(p)||(this.invalid=!0):$l("A selector must be created from a string; found "))},x4=ly.prototype;[Ltt,Ntt].forEach(function(y){return we(x4,y)}),x4.text=function(){return this.inputText},x4.size=function(){return this.length},x4.eq=function(y){return this[y]},x4.sameText=function(y){return!this.invalid&&!y.invalid&&this.text()===y.text()},x4.addQuery=function(y){this[this.length++]=y},x4.selector=x4.toString;var hy={allAre:function(p){var x=new ly(p);return this.every(function(C){return x.matches(C)})},is:function(p){var x=new ly(p);return this.some(function(C){return x.matches(C)})},some:function(p,x){for(var C=0;C<this.length;C++){var L=x?p.apply(x,[this[C],C,this]):p(this[C],C,this);if(L)return!0}return!1},every:function(p,x){for(var C=0;C<this.length;C++){var L=x?p.apply(x,[this[C],C,this]):p(this[C],C,this);if(!L)return!1}return!0},same:function(p){if(this===p)return!0;p=this.cy().collection(p);var x=this.length,C=p.length;return x!==C?!1:x===1?this[0]===p[0]:this.every(function(L){return p.hasElementWithId(L.id())})},anySame:function(p){return p=this.cy().collection(p),this.some(function(x){return p.hasElementWithId(x.id())})},allAreNeighbors:function(p){p=this.cy().collection(p);var x=this.neighborhood();return p.every(function(C){return x.hasElementWithId(C.id())})},contains:function(p){p=this.cy().collection(p);var x=this;return p.every(function(C){return x.hasElementWithId(C.id())})}};hy.allAreNeighbours=hy.allAreNeighbors,hy.has=hy.contains,hy.equal=hy.equals=hy.same;var ap=function(p,x){return function(L,O,N,j){var H=L,q=this,W;if(H==null?W="":yt(H)&&H.length===1&&(W=H.id()),q.length===1&&W){var Z=q[0]._private,st=Z.traversalCache=Z.traversalCache||{},bt=st[x]=st[x]||[],pt=Nd(W),_t=bt[pt];return _t||(bt[pt]=p.call(q,L,O,N,j))}else return p.call(q,L,O,N,j)}},a6={parent:function(p){var x=[];if(this.length===1){var C=this[0]._private.parent;if(C)return C}for(var L=0;L<this.length;L++){var O=this[L],N=O._private.parent;N&&x.push(N)}return this.spawn(x,!0).filter(p)},parents:function(p){for(var x=[],C=this.parent();C.nonempty();){for(var L=0;L<C.length;L++){var O=C[L];x.push(O)}C=C.parent()}return this.spawn(x,!0).filter(p)},commonAncestors:function(p){for(var x,C=0;C<this.length;C++){var L=this[C],O=L.parents();x=x||O,x=x.intersect(O)}return x.filter(p)},orphans:function(p){return this.stdFilter(function(x){return x.isOrphan()}).filter(p)},nonorphans:function(p){return this.stdFilter(function(x){return x.isChild()}).filter(p)},children:ap(function(y){for(var p=[],x=0;x<this.length;x++)for(var C=this[x],L=C._private.children,O=0;O<L.length;O++)p.push(L[O]);return this.spawn(p,!0).filter(y)},"children"),siblings:function(p){return this.parent().children().not(this).filter(p)},isParent:function(){var p=this[0];if(p)return p.isNode()&&p._private.children.length!==0},isChildless:function(){var p=this[0];if(p)return p.isNode()&&p._private.children.length===0},isChild:function(){var p=this[0];if(p)return p.isNode()&&p._private.parent!=null},isOrphan:function(){var p=this[0];if(p)return p.isNode()&&p._private.parent==null},descendants:function(p){var x=[];function C(L){for(var O=0;O<L.length;O++){var N=L[O];x.push(N),N.children().nonempty()&&C(N.children())}}return C(this.children()),this.spawn(x,!0).filter(p)}};function eM(y,p,x,C){for(var L=[],O=new Wx,N=y.cy(),j=N.hasCompoundNodes(),H=0;H<y.length;H++){var q=y[H];x?L.push(q):j&&C(L,O,q)}for(;L.length>0;){var W=L.shift();p(W),O.add(W.id()),j&&C(L,O,W)}return y}function NR(y,p,x){if(x.isParent())for(var C=x._private.children,L=0;L<C.length;L++){var O=C[L];p.has(O.id())||y.push(O)}}a6.forEachDown=function(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return eM(this,y,p,NR)};function PR(y,p,x){if(x.isChild()){var C=x._private.parent;p.has(C.id())||y.push(C)}}a6.forEachUp=function(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return eM(this,y,p,PR)};function Ptt(y,p,x){PR(y,p,x),NR(y,p,x)}a6.forEachUpAndDown=function(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return eM(this,y,p,Ptt)},a6.ancestors=a6.parents;var G1,FR;G1=FR={data:Kc.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Kc.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Kc.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Kc.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Kc.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Kc.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var p=this[0];if(p)return p._private.data.id}},G1.attr=G1.data,G1.removeAttr=G1.removeData;var fy=FR,q8={};function nM(y){return function(p){var x=this;if(p===void 0&&(p=!0),x.length!==0)if(x.isNode()&&!x.removed()){for(var C=0,L=x[0],O=L._private.edges,N=0;N<O.length;N++){var j=O[N];!p&&j.isLoop()||(C+=y(L,j))}return C}else return}}we(q8,{degree:nM(function(y,p){return p.source().same(p.target())?2:1}),indegree:nM(function(y,p){return p.target().same(y)?1:0}),outdegree:nM(function(y,p){return p.source().same(y)?1:0})});function o6(y,p){return function(x){for(var C,L=this.nodes(),O=0;O<L.length;O++){var N=L[O],j=N[y](x);j!==void 0&&(C===void 0||p(j,C))&&(C=j)}return C}}we(q8,{minDegree:o6("degree",function(y,p){return y<p}),maxDegree:o6("degree",function(y,p){return y>p}),minIndegree:o6("indegree",function(y,p){return y<p}),maxIndegree:o6("indegree",function(y,p){return y>p}),minOutdegree:o6("outdegree",function(y,p){return y<p}),maxOutdegree:o6("outdegree",function(y,p){return y>p})}),we(q8,{totalDegree:function(p){for(var x=0,C=this.nodes(),L=0;L<C.length;L++)x+=C[L].degree(p);return x}});var db,BR,RR=function(p,x,C){for(var L=0;L<p.length;L++){var O=p[L];if(!O.locked()){var N=O._private.position,j={x:x.x!=null?x.x-N.x:0,y:x.y!=null?x.y-N.y:0};O.isParent()&&!(j.x===0&&j.y===0)&&O.children().shift(j,C),O.dirtyBoundingBoxCache()}}},jR={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(p){p.updateCompoundBounds()},beforeSet:function(p,x){RR(p,x,!1)},onSet:function(p){p.dirtyCompoundBoundsCache()},canSet:function(p){return!p.locked()}};db=BR={position:Kc.data(jR),silentPosition:Kc.data(we({},jR,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(p,x){RR(p,x,!0)},onSet:function(p){p.dirtyCompoundBoundsCache()}})),positions:function(p,x){if(it(p))x?this.silentPosition(p):this.position(p);else if(ct(p)){var C=p,L=this.cy();L.startBatch();for(var O=0;O<this.length;O++){var N=this[O],j=void 0;(j=C(N,O))&&(x?N.silentPosition(j):N.position(j))}L.endBatch()}return this},silentPositions:function(p){return this.positions(p,!0)},shift:function(p,x,C){var L;if(it(p)?(L={x:Q(p.x)?p.x:0,y:Q(p.y)?p.y:0},C=x):mt(p)&&Q(x)&&(L={x:0,y:0},L[p]=x),L!=null){var O=this.cy();O.startBatch();for(var N=0;N<this.length;N++){var j=this[N];if(!(O.hasCompoundNodes()&&j.isChild()&&j.ancestors().anySame(this))){var H=j.position(),q={x:H.x+L.x,y:H.y+L.y};C?j.silentPosition(q):j.position(q)}}O.endBatch()}return this},silentShift:function(p,x){return it(p)?this.shift(p,!0):mt(p)&&Q(x)&&this.shift(p,x,!0),this},renderedPosition:function(p,x){var C=this[0],L=this.cy(),O=L.zoom(),N=L.pan(),j=it(p)?p:void 0,H=j!==void 0||x!==void 0&&mt(p);if(C&&C.isNode())if(H)for(var q=0;q<this.length;q++){var W=this[q];x!==void 0?W.position(p,(x-N[p])/O):j!==void 0&&W.position(PB(j,O,N))}else{var Z=C.position();return j=W9(Z,O,N),p===void 0?j:j[p]}else if(!H)return;return this},relativePosition:function(p,x){var C=this[0],L=this.cy(),O=it(p)?p:void 0,N=O!==void 0||x!==void 0&&mt(p),j=L.hasCompoundNodes();if(C&&C.isNode())if(N)for(var H=0;H<this.length;H++){var q=this[H],W=j?q.parent():null,Z=W&&W.length>0,st=Z;Z&&(W=W[0]);var bt=st?W.position():{x:0,y:0};x!==void 0?q.position(p,x+bt[p]):O!==void 0&&q.position({x:O.x+bt.x,y:O.y+bt.y})}else{var pt=C.position(),_t=j?C.parent():null,St=_t&&_t.length>0,Et=St;St&&(_t=_t[0]);var Nt=Et?_t.position():{x:0,y:0};return O={x:pt.x-Nt.x,y:pt.y-Nt.y},p===void 0?O:O[p]}else if(!N)return;return this}},db.modelPosition=db.point=db.position,db.modelPositions=db.points=db.positions,db.renderedPoint=db.renderedPosition,db.relativePoint=db.relativePosition;var Ftt=BR,c6,dy;c6=dy={},dy.renderedBoundingBox=function(y){var p=this.boundingBox(y),x=this.cy(),C=x.zoom(),L=x.pan(),O=p.x1*C+L.x,N=p.x2*C+L.x,j=p.y1*C+L.y,H=p.y2*C+L.y;return{x1:O,x2:N,y1:j,y2:H,w:N-O,h:H-j}},dy.dirtyCompoundBoundsCache=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=this.cy();return!p.styleEnabled()||!p.hasCompoundNodes()?this:(this.forEachUp(function(x){if(x.isParent()){var C=x._private;C.compoundBoundsClean=!1,C.bbCache=null,y||x.emitAndNotify("bounds")}}),this)},dy.updateCompoundBounds=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=this.cy();if(!p.styleEnabled()||!p.hasCompoundNodes())return this;if(!y&&p.batching())return this;function x(N){if(!N.isParent())return;var j=N._private,H=N.children(),q=N.pstyle("compound-sizing-wrt-labels").value==="include",W={width:{val:N.pstyle("min-width").pfValue,left:N.pstyle("min-width-bias-left"),right:N.pstyle("min-width-bias-right")},height:{val:N.pstyle("min-height").pfValue,top:N.pstyle("min-height-bias-top"),bottom:N.pstyle("min-height-bias-bottom")}},Z=H.boundingBox({includeLabels:q,includeOverlays:!1,useCache:!1}),st=j.position;(Z.w===0||Z.h===0)&&(Z={w:N.pstyle("width").pfValue,h:N.pstyle("height").pfValue},Z.x1=st.x-Z.w/2,Z.x2=st.x+Z.w/2,Z.y1=st.y-Z.h/2,Z.y2=st.y+Z.h/2);function bt(Yt,Ee,Te){var ie=0,ze=0,me=Ee+Te;return Yt>0&&me>0&&(ie=Ee/me*Yt,ze=Te/me*Yt),{biasDiff:ie,biasComplementDiff:ze}}function pt(Yt,Ee,Te,ie){if(Te.units==="%")switch(ie){case"width":return Yt>0?Te.pfValue*Yt:0;case"height":return Ee>0?Te.pfValue*Ee:0;case"average":return Yt>0&&Ee>0?Te.pfValue*(Yt+Ee)/2:0;case"min":return Yt>0&&Ee>0?Yt>Ee?Te.pfValue*Ee:Te.pfValue*Yt:0;case"max":return Yt>0&&Ee>0?Yt>Ee?Te.pfValue*Yt:Te.pfValue*Ee:0;default:return 0}else return Te.units==="px"?Te.pfValue:0}var _t=W.width.left.value;W.width.left.units==="px"&&W.width.val>0&&(_t=_t*100/W.width.val);var St=W.width.right.value;W.width.right.units==="px"&&W.width.val>0&&(St=St*100/W.width.val);var Et=W.height.top.value;W.height.top.units==="px"&&W.height.val>0&&(Et=Et*100/W.height.val);var Nt=W.height.bottom.value;W.height.bottom.units==="px"&&W.height.val>0&&(Nt=Nt*100/W.height.val);var Pt=bt(W.width.val-Z.w,_t,St),qt=Pt.biasDiff,re=Pt.biasComplementDiff,ee=bt(W.height.val-Z.h,Et,Nt),Ut=ee.biasDiff,de=ee.biasComplementDiff;j.autoPadding=pt(Z.w,Z.h,N.pstyle("padding"),N.pstyle("padding-relative-to").value),j.autoWidth=Math.max(Z.w,W.width.val),st.x=(-qt+Z.x1+Z.x2+re)/2,j.autoHeight=Math.max(Z.h,W.height.val),st.y=(-Ut+Z.y1+Z.y2+de)/2}for(var C=0;C<this.length;C++){var L=this[C],O=L._private;(!O.compoundBoundsClean||y)&&(x(L),p.batching()||(O.compoundBoundsClean=!0))}return this};var op=function(p){return p===1/0||p===-1/0?0:p},gb=function(p,x,C,L,O){L-x===0||O-C===0||x==null||C==null||L==null||O==null||(p.x1=x<p.x1?x:p.x1,p.x2=L>p.x2?L:p.x2,p.y1=C<p.y1?C:p.y1,p.y2=O>p.y2?O:p.y2,p.w=p.x2-p.x1,p.h=p.y2-p.y1)},k4=function(p,x){return x==null?p:gb(p,x.x1,x.y1,x.x2,x.y2)},H8=function(p,x,C){return fb(p,x,C)},hC=function(p,x,C){if(!x.cy().headless()){var L=x._private,O=L.rstyle,N=O.arrowWidth/2,j=x.pstyle(C+"-arrow-shape").value,H,q;if(j!=="none"){C==="source"?(H=O.srcX,q=O.srcY):C==="target"?(H=O.tgtX,q=O.tgtY):(H=O.midX,q=O.midY);var W=L.arrowBounds=L.arrowBounds||{},Z=W[C]=W[C]||{};Z.x1=H-N,Z.y1=q-N,Z.x2=H+N,Z.y2=q+N,Z.w=Z.x2-Z.x1,Z.h=Z.y2-Z.y1,X9(Z,1),gb(p,Z.x1,Z.y1,Z.x2,Z.y2)}}},rM=function(p,x,C){if(!x.cy().headless()){var L;C?L=C+"-":L="";var O=x._private,N=O.rstyle,j=x.pstyle(L+"label").strValue;if(j){var H=x.pstyle("text-halign"),q=x.pstyle("text-valign"),W=H8(N,"labelWidth",C),Z=H8(N,"labelHeight",C),st=H8(N,"labelX",C),bt=H8(N,"labelY",C),pt=x.pstyle(L+"text-margin-x").pfValue,_t=x.pstyle(L+"text-margin-y").pfValue,St=x.isEdge(),Et=x.pstyle(L+"text-rotation"),Nt=x.pstyle("text-outline-width").pfValue,Pt=x.pstyle("text-border-width").pfValue,qt=Pt/2,re=x.pstyle("text-background-padding").pfValue,ee=2,Ut=Z,de=W,Yt=de/2,Ee=Ut/2,Te,ie,ze,me;if(St)Te=st-Yt,ie=st+Yt,ze=bt-Ee,me=bt+Ee;else{switch(H.value){case"left":Te=st-de,ie=st;break;case"center":Te=st-Yt,ie=st+Yt;break;case"right":Te=st,ie=st+de;break}switch(q.value){case"top":ze=bt-Ut,me=bt;break;case"center":ze=bt-Ee,me=bt+Ee;break;case"bottom":ze=bt,me=bt+Ut;break}}Te+=pt-Math.max(Nt,qt)-re-ee,ie+=pt+Math.max(Nt,qt)+re+ee,ze+=_t-Math.max(Nt,qt)-re-ee,me+=_t+Math.max(Nt,qt)+re+ee;var yn=C||"main",nn=O.labelBounds,qe=nn[yn]=nn[yn]||{};qe.x1=Te,qe.y1=ze,qe.x2=ie,qe.y2=me,qe.w=ie-Te,qe.h=me-ze;var Tn=St&&Et.strValue==="autorotate",Xn=Et.pfValue!=null&&Et.pfValue!==0;if(Tn||Xn){var lr=Tn?H8(O.rstyle,"labelAngle",C):Et.pfValue,Sn=Math.cos(lr),or=Math.sin(lr),pr=(Te+ie)/2,kr=(ze+me)/2;if(!St){switch(H.value){case"left":pr=ie;break;case"right":pr=Te;break}switch(q.value){case"top":kr=me;break;case"bottom":kr=ze;break}}var wr=function(na,vi){return na=na-pr,vi=vi-kr,{x:na*Sn-vi*or+pr,y:na*or+vi*Sn+kr}},Cr=wr(Te,ze),$n=wr(Te,me),cr=wr(ie,ze),mr=wr(ie,me);Te=Math.min(Cr.x,$n.x,cr.x,mr.x),ie=Math.max(Cr.x,$n.x,cr.x,mr.x),ze=Math.min(Cr.y,$n.y,cr.y,mr.y),me=Math.max(Cr.y,$n.y,cr.y,mr.y)}var Sr=yn+"Rot",gi=nn[Sr]=nn[Sr]||{};gi.x1=Te,gi.y1=ze,gi.x2=ie,gi.y2=me,gi.w=ie-Te,gi.h=me-ze,gb(p,Te,ze,ie,me),gb(O.labelBounds.all,Te,ze,ie,me)}return p}},Btt=function(p,x){if(!x.cy().headless()){var C=x.pstyle("outline-opacity").value,L=x.pstyle("outline-width").value;if(C>0&&L>0){var O=x.pstyle("outline-offset").value,N=x.pstyle("shape").value,j=L+O,H=(p.w+j*2)/p.w,q=(p.h+j*2)/p.h,W=0,Z=0;["diamond","pentagon","round-triangle"].includes(N)?(H=(p.w+j*2.4)/p.w,Z=-j/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(N)?H=(p.w+j*2.4)/p.w:N==="star"?(H=(p.w+j*2.8)/p.w,q=(p.h+j*2.6)/p.h,Z=-j/3.8):N==="triangle"?(H=(p.w+j*2.8)/p.w,q=(p.h+j*2.4)/p.h,Z=-j/1.4):N==="vee"&&(H=(p.w+j*4.4)/p.w,q=(p.h+j*3.8)/p.h,Z=-j*.5);var st=p.h*q-p.h,bt=p.w*H-p.w;if(Q9(p,[Math.ceil(st/2),Math.ceil(bt/2)]),W!=0||Z!==0){var pt=pQ(p,W,Z);BB(p,pt)}}}},Rtt=function(p,x){var C=p._private.cy,L=C.styleEnabled(),O=C.headless(),N=v0(),j=p._private,H=p.isNode(),q=p.isEdge(),W,Z,st,bt,pt,_t,St=j.rstyle,Et=H&&L?p.pstyle("bounds-expansion").pfValue:[0],Nt=function(Qi){return Qi.pstyle("display").value!=="none"},Pt=!L||Nt(p)&&(!q||Nt(p.source())&&Nt(p.target()));if(Pt){var qt=0,re=0;L&&x.includeOverlays&&(qt=p.pstyle("overlay-opacity").value,qt!==0&&(re=p.pstyle("overlay-padding").value));var ee=0,Ut=0;L&&x.includeUnderlays&&(ee=p.pstyle("underlay-opacity").value,ee!==0&&(Ut=p.pstyle("underlay-padding").value));var de=Math.max(re,Ut),Yt=0,Ee=0;if(L&&(Yt=p.pstyle("width").pfValue,Ee=Yt/2),H&&x.includeNodes){var Te=p.position();pt=Te.x,_t=Te.y;var ie=p.outerWidth(),ze=ie/2,me=p.outerHeight(),yn=me/2;W=pt-ze,Z=pt+ze,st=_t-yn,bt=_t+yn,gb(N,W,st,Z,bt),L&&x.includeOutlines&&Btt(N,p)}else if(q&&x.includeEdges)if(L&&!O){var nn=p.pstyle("curve-style").strValue;if(W=Math.min(St.srcX,St.midX,St.tgtX),Z=Math.max(St.srcX,St.midX,St.tgtX),st=Math.min(St.srcY,St.midY,St.tgtY),bt=Math.max(St.srcY,St.midY,St.tgtY),W-=Ee,Z+=Ee,st-=Ee,bt+=Ee,gb(N,W,st,Z,bt),nn==="haystack"){var qe=St.haystackPts;if(qe&&qe.length===2){if(W=qe[0].x,st=qe[0].y,Z=qe[1].x,bt=qe[1].y,W>Z){var Tn=W;W=Z,Z=Tn}if(st>bt){var Xn=st;st=bt,bt=Xn}gb(N,W-Ee,st-Ee,Z+Ee,bt+Ee)}}else if(nn==="bezier"||nn==="unbundled-bezier"||nn==="segments"||nn==="taxi"){var lr;switch(nn){case"bezier":case"unbundled-bezier":lr=St.bezierPts;break;case"segments":case"taxi":lr=St.linePts;break}if(lr!=null)for(var Sn=0;Sn<lr.length;Sn++){var or=lr[Sn];W=or.x-Ee,Z=or.x+Ee,st=or.y-Ee,bt=or.y+Ee,gb(N,W,st,Z,bt)}}}else{var pr=p.source(),kr=pr.position(),wr=p.target(),Cr=wr.position();if(W=kr.x,Z=Cr.x,st=kr.y,bt=Cr.y,W>Z){var $n=W;W=Z,Z=$n}if(st>bt){var cr=st;st=bt,bt=cr}W-=Ee,Z+=Ee,st-=Ee,bt+=Ee,gb(N,W,st,Z,bt)}if(L&&x.includeEdges&&q&&(hC(N,p,"mid-source"),hC(N,p,"mid-target"),hC(N,p,"source"),hC(N,p,"target")),L){var mr=p.pstyle("ghost").value==="yes";if(mr){var Sr=p.pstyle("ghost-offset-x").pfValue,gi=p.pstyle("ghost-offset-y").pfValue;gb(N,N.x1+Sr,N.y1+gi,N.x2+Sr,N.y2+gi)}}var ss=j.bodyBounds=j.bodyBounds||{};RB(ss,N),Q9(ss,Et),X9(ss,1),L&&(W=N.x1,Z=N.x2,st=N.y1,bt=N.y2,gb(N,W-de,st-de,Z+de,bt+de));var na=j.overlayBounds=j.overlayBounds||{};RB(na,N),Q9(na,Et),X9(na,1);var vi=j.labelBounds=j.labelBounds||{};vi.all!=null?gQ(vi.all):vi.all=v0(),L&&x.includeLabels&&(x.includeMainLabels&&rM(N,p,null),q&&(x.includeSourceLabels&&rM(N,p,"source"),x.includeTargetLabels&&rM(N,p,"target")))}return N.x1=op(N.x1),N.y1=op(N.y1),N.x2=op(N.x2),N.y2=op(N.y2),N.w=op(N.x2-N.x1),N.h=op(N.y2-N.y1),N.w>0&&N.h>0&&Pt&&(Q9(N,Et),X9(N,1)),N},$R=function(p){var x=0,C=function(N){return(N?1:0)<<x++},L=0;return L+=C(p.incudeNodes),L+=C(p.includeEdges),L+=C(p.includeLabels),L+=C(p.includeMainLabels),L+=C(p.includeSourceLabels),L+=C(p.includeTargetLabels),L+=C(p.includeOverlays),L+=C(p.includeOutlines),L},zR=function(p){if(p.isEdge()){var x=p.source().position(),C=p.target().position(),L=function(N){return Math.round(N)};return U1([L(x.x),L(x.y),L(C.x),L(C.y)])}else return 0},je=function(p,x){var C=p._private,L,O=p.isEdge(),N=x==null?qR:$R(x),j=N===qR,H=zR(p),q=C.bbCachePosKey===H,W=x.useCache&&q,Z=function(_t){return _t._private.bbCache==null||_t._private.styleDirty},st=!W||Z(p)||O&&Z(p.source())||Z(p.target());if(st?(q||p.recalculateRenderedStyle(W),L=Rtt(p,V8),C.bbCache=L,C.bbCachePosKey=H):L=C.bbCache,!j){var bt=p.isNode();L=v0(),(x.includeNodes&&bt||x.includeEdges&&!bt)&&(x.includeOverlays?k4(L,C.overlayBounds):k4(L,C.bodyBounds)),x.includeLabels&&(x.includeMainLabels&&(!O||x.includeSourceLabels&&x.includeTargetLabels)?k4(L,C.labelBounds.all):(x.includeMainLabels&&k4(L,C.labelBounds.mainRot),x.includeSourceLabels&&k4(L,C.labelBounds.sourceRot),x.includeTargetLabels&&k4(L,C.labelBounds.targetRot))),L.w=L.x2-L.x1,L.h=L.y2-L.y1}return L},V8={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},qR=$R(V8),HR=p1(V8);dy.boundingBox=function(y){var p;if(this.length===1&&this[0]._private.bbCache!=null&&!this[0]._private.styleDirty&&(y===void 0||y.useCache===void 0||y.useCache===!0))y===void 0?y=V8:y=HR(y),p=je(this[0],y);else{p=v0(),y=y||V8;var x=HR(y),C=this,L=C.cy(),O=L.styleEnabled();if(O)for(var N=0;N<C.length;N++){var j=C[N],H=j._private,q=zR(j),W=H.bbCachePosKey===q,Z=x.useCache&&W&&!H.styleDirty;j.recalculateRenderedStyle(Z)}this.updateCompoundBounds(!y.useCache);for(var st=0;st<C.length;st++){var bt=C[st];k4(p,je(bt,x))}}return p.x1=op(p.x1),p.y1=op(p.y1),p.x2=op(p.x2),p.y2=op(p.y2),p.w=op(p.x2-p.x1),p.h=op(p.y2-p.y1),p},dy.dirtyBoundingBoxCache=function(){for(var y=0;y<this.length;y++){var p=this[y]._private;p.bbCache=null,p.bbCachePosKey=null,p.bodyBounds=null,p.overlayBounds=null,p.labelBounds.all=null,p.labelBounds.source=null,p.labelBounds.target=null,p.labelBounds.main=null,p.labelBounds.sourceRot=null,p.labelBounds.targetRot=null,p.labelBounds.mainRot=null,p.arrowBounds.source=null,p.arrowBounds.target=null,p.arrowBounds["mid-source"]=null,p.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},dy.boundingBoxAt=function(y){var p=this.nodes(),x=this.cy(),C=x.hasCompoundNodes(),L=x.collection();if(C&&(L=p.filter(function(q){return q.isParent()}),p=p.not(L)),it(y)){var O=y;y=function(){return O}}var N=function(W,Z){return W._private.bbAtOldPos=y(W,Z)},j=function(W){return W._private.bbAtOldPos};x.startBatch(),p.forEach(N).silentPositions(y),C&&(L.dirtyCompoundBoundsCache(),L.dirtyBoundingBoxCache(),L.updateCompoundBounds(!0));var H=dQ(this.boundingBox({useCache:!1}));return p.silentPositions(j),C&&(L.dirtyCompoundBoundsCache(),L.dirtyBoundingBoxCache(),L.updateCompoundBounds(!0)),x.endBatch(),H},c6.boundingbox=c6.bb=c6.boundingBox,c6.renderedBoundingbox=c6.renderedBoundingBox;var jtt=dy,U8,G8;U8=G8={};var VR=function(p){p.uppercaseName=tn(p.name),p.autoName="auto"+p.uppercaseName,p.labelName="label"+p.uppercaseName,p.outerName="outer"+p.uppercaseName,p.uppercaseOuterName=tn(p.outerName),U8[p.name]=function(){var C=this[0],L=C._private,O=L.cy,N=O._private.styleEnabled;if(C)if(N){if(C.isParent())return C.updateCompoundBounds(),L[p.autoName]||0;var j=C.pstyle(p.name);switch(j.strValue){case"label":return C.recalculateRenderedStyle(),L.rstyle[p.labelName]||0;default:return j.pfValue}}else return 1},U8["outer"+p.uppercaseName]=function(){var C=this[0],L=C._private,O=L.cy,N=O._private.styleEnabled;if(C)if(N){var j=C[p.name](),H=C.pstyle("border-width").pfValue,q=2*C.padding();return j+H+q}else return 1},U8["rendered"+p.uppercaseName]=function(){var C=this[0];if(C){var L=C[p.name]();return L*this.cy().zoom()}},U8["rendered"+p.uppercaseOuterName]=function(){var C=this[0];if(C){var L=C[p.outerName]();return L*this.cy().zoom()}}};VR({name:"width"}),VR({name:"height"}),G8.padding=function(){var y=this[0],p=y._private;return y.isParent()?(y.updateCompoundBounds(),p.autoPadding!==void 0?p.autoPadding:y.pstyle("padding").pfValue):y.pstyle("padding").pfValue},G8.paddedHeight=function(){var y=this[0];return y.height()+2*y.padding()},G8.paddedWidth=function(){var y=this[0];return y.width()+2*y.padding()};var $tt=G8,ztt=function(p,x){if(p.isEdge())return x(p)},qtt=function(p,x){if(p.isEdge()){var C=p.cy();return W9(x(p),C.zoom(),C.pan())}},Htt=function(p,x){if(p.isEdge()){var C=p.cy(),L=C.pan(),O=C.zoom();return x(p).map(function(N){return W9(N,O,L)})}},Vtt=function(p){return p.renderer().getControlPoints(p)},Utt=function(p){return p.renderer().getSegmentPoints(p)},iM=function(p){return p.renderer().getSourceEndpoint(p)},Gtt=function(p){return p.renderer().getTargetEndpoint(p)},Ktt=function(p){return p.renderer().getEdgeMidpoint(p)},UR={controlPoints:{get:Vtt,mult:!0},segmentPoints:{get:Utt,mult:!0},sourceEndpoint:{get:iM},targetEndpoint:{get:Gtt},midpoint:{get:Ktt}},fC=function(p){return"rendered"+p[0].toUpperCase()+p.substr(1)},Wtt=Object.keys(UR).reduce(function(y,p){var x=UR[p],C=fC(p);return y[p]=function(){return ztt(this,x.get)},x.mult?y[C]=function(){return Htt(this,x.get)}:y[C]=function(){return qtt(this,x.get)},y},{}),sM=we({},Ftt,jtt,$tt,Wtt);/*!
1544 */var K8=function(p,x){this.recycle(p,x)};function W8(){return!1}function Y8(){return!0}K8.prototype={instanceString:function(){return"event"},recycle:function(p,x){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=W8,p!=null&&p.preventDefault?(this.type=p.type,this.isDefaultPrevented=p.defaultPrevented?Y8:W8):p!=null&&p.type?x=p:this.type=p,x!=null&&(this.originalEvent=x.originalEvent,this.type=x.type!=null?x.type:this.type,this.cy=x.cy,this.target=x.target,this.position=x.position,this.renderedPosition=x.renderedPosition,this.namespace=x.namespace,this.layout=x.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var C=this.position,L=this.cy.zoom(),O=this.cy.pan();this.renderedPosition={x:C.x*L+O.x,y:C.y*L+O.y}}this.timeStamp=p&&p.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Y8;var p=this.originalEvent;p&&p.preventDefault&&p.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Y8;var p=this.originalEvent;p&&p.stopPropagation&&p.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Y8,this.stopPropagation()},isDefaultPrevented:W8,isPropagationStopped:W8,isImmediatePropagationStopped:W8};var GR=/^([^.]+)(\.(?:[^.]+))?$/,Ytt=".*",KR={qualifierCompare:function(p,x){return p===x},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(p){return p},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},WR=Object.keys(KR),Xtt={};function dC(){for(var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xtt,p=arguments.length>1?arguments[1]:void 0,x=0;x<WR.length;x++){var C=WR[x];this[C]=y[C]||KR[C]}this.context=p||this.context,this.listeners=[],this.emitting=0}var pb=dC.prototype,YR=function(p,x,C,L,O,N,j){ct(L)&&(O=L,L=null),j&&(N==null?N=j:N=we({},N,j));for(var H=rt(C)?C:C.split(/\s+/),q=0;q<H.length;q++){var W=H[q];if(!Ft(W)){var Z=W.match(GR);if(Z){var st=Z[1],bt=Z[2]?Z[2]:null,pt=x(p,W,st,bt,L,O,N);if(pt===!1)break}}}},XR=function(p,x){return p.addEventFields(p.context,x),new K8(x.type,x)},gC=function(p,x,C){if(xt(C)){x(p,C);return}else if(it(C)){x(p,XR(p,C));return}for(var L=rt(C)?C:C.split(/\s+/),O=0;O<L.length;O++){var N=L[O];if(!Ft(N)){var j=N.match(GR);if(j){var H=j[1],q=j[2]?j[2]:null,W=XR(p,{type:H,namespace:q,target:p.context});x(p,W)}}}};pb.on=pb.addListener=function(y,p,x,C,L){return YR(this,function(O,N,j,H,q,W,Z){ct(W)&&O.listeners.push({event:N,callback:W,type:j,namespace:H,qualifier:q,conf:Z})},y,p,x,C,L),this},pb.one=function(y,p,x,C){return this.on(y,p,x,C,{one:!0})},pb.removeListener=pb.off=function(y,p,x,C){var L=this;this.emitting!==0&&(this.listeners=zX(this.listeners));for(var O=this.listeners,N=function(q){var W=O[q];YR(L,function(Z,st,bt,pt,_t,St){if((W.type===bt||y==="*")&&(!pt&&W.namespace!==".*"||W.namespace===pt)&&(!_t||Z.qualifierCompare(W.qualifier,_t))&&(!St||W.callback===St))return O.splice(q,1),!1},y,p,x,C)},j=O.length-1;j>=0;j--)N(j);return this},pb.removeAllListeners=function(){return this.removeListener("*")},pb.emit=pb.trigger=function(y,p,x){var C=this.listeners,L=C.length;return this.emitting++,rt(p)||(p=[p]),gC(this,function(O,N){x!=null&&(C=[{event:N.event,type:N.type,namespace:N.namespace,callback:x}],L=C.length);for(var j=function(W){var Z=C[W];if(Z.type===N.type&&(!Z.namespace||Z.namespace===N.namespace||Z.namespace===Ytt)&&O.eventMatches(O.context,Z,N)){var st=[N];p!=null&&OB(st,p),O.beforeEmit(O.context,Z,N),Z.conf&&Z.conf.one&&(O.listeners=O.listeners.filter(function(_t){return _t!==Z}));var bt=O.callbackContext(O.context,Z,N),pt=Z.callback.apply(bt,st);O.afterEmit(O.context,Z,N),pt===!1&&(N.stopPropagation(),N.preventDefault())}},H=0;H<L;H++)j(H);O.bubble(O.context)&&!N.isPropagationStopped()&&O.parent(O.context).emit(N,p)},y),this.emitting--,this};var Qtt={qualifierCompare:function(p,x){return p==null||x==null?p==null&&x==null:p.sameText(x)},eventMatches:function(p,x,C){var L=x.qualifier;return L!=null?p!==C.target&&V(C.target)&&L.matches(C.target):!0},addEventFields:function(p,x){x.cy=p.cy(),x.target=p},callbackContext:function(p,x,C){return x.qualifier!=null?C.target:p},beforeEmit:function(p,x){x.conf&&x.conf.once&&x.conf.onceCollection.removeListener(x.event,x.qualifier,x.callback)},bubble:function(){return!0},parent:function(p){return p.isChild()?p.parent():p.cy()}},E4=function(p){return mt(p)?new ly(p):p},QR={createEmitter:function(){for(var p=0;p<this.length;p++){var x=this[p],C=x._private;C.emitter||(C.emitter=new dC(Qtt,x))}return this},emitter:function(){return this._private.emitter},on:function(p,x,C){for(var L=E4(x),O=0;O<this.length;O++){var N=this[O];N.emitter().on(p,L,C)}return this},removeListener:function(p,x,C){for(var L=E4(x),O=0;O<this.length;O++){var N=this[O];N.emitter().removeListener(p,L,C)}return this},removeAllListeners:function(){for(var p=0;p<this.length;p++){var x=this[p];x.emitter().removeAllListeners()}return this},one:function(p,x,C){for(var L=E4(x),O=0;O<this.length;O++){var N=this[O];N.emitter().one(p,L,C)}return this},once:function(p,x,C){for(var L=E4(x),O=0;O<this.length;O++){var N=this[O];N.emitter().on(p,L,C,{once:!0,onceCollection:this})}},emit:function(p,x){for(var C=0;C<this.length;C++){var L=this[C];L.emitter().emit(p,x)}return this},emitAndNotify:function(p,x){if(this.length!==0)return this.cy().notify(p,this),this.emit(p,x),this}};Kc.eventAliasesOn(QR);var aM={nodes:function(p){return this.filter(function(x){return x.isNode()}).filter(p)},edges:function(p){return this.filter(function(x){return x.isEdge()}).filter(p)},byGroup:function(){for(var p=this.spawn(),x=this.spawn(),C=0;C<this.length;C++){var L=this[C];L.isNode()?p.push(L):x.push(L)}return{nodes:p,edges:x}},filter:function(p,x){if(p===void 0)return this;if(mt(p)||yt(p))return new ly(p).filter(this);if(ct(p)){for(var C=this.spawn(),L=this,O=0;O<L.length;O++){var N=L[O],j=x?p.apply(x,[N,O,L]):p(N,O,L);j&&C.push(N)}return C}return this.spawn()},not:function(p){if(p){mt(p)&&(p=this.filter(p));for(var x=this.spawn(),C=0;C<this.length;C++){var L=this[C],O=p.has(L);O||x.push(L)}return x}else return this},absoluteComplement:function(){var p=this.cy();return p.mutableElements().not(this)},intersect:function(p){if(mt(p)){var x=p;return this.filter(x)}for(var C=this.spawn(),L=this,O=p,N=this.length<p.length,j=N?L:O,H=N?O:L,q=0;q<j.length;q++){var W=j[q];H.has(W)&&C.push(W)}return C},xor:function(p){var x=this._private.cy;mt(p)&&(p=x.$(p));var C=this.spawn(),L=this,O=p,N=function(H,q){for(var W=0;W<H.length;W++){var Z=H[W],st=Z._private.data.id,bt=q.hasElementWithId(st);bt||C.push(Z)}};return N(L,O),N(O,L),C},diff:function(p){var x=this._private.cy;mt(p)&&(p=x.$(p));var C=this.spawn(),L=this.spawn(),O=this.spawn(),N=this,j=p,H=function(W,Z,st){for(var bt=0;bt<W.length;bt++){var pt=W[bt],_t=pt._private.data.id,St=Z.hasElementWithId(_t);St?O.merge(pt):st.push(pt)}};return H(N,j,C),H(j,N,L),{left:C,right:L,both:O}},add:function(p){var x=this._private.cy;if(!p)return this;if(mt(p)){var C=p;p=x.mutableElements().filter(C)}for(var L=this.spawnSelf(),O=0;O<p.length;O++){var N=p[O],j=!this.has(N);j&&L.push(N)}return L},merge:function(p){var x=this._private,C=x.cy;if(!p)return this;if(p&&mt(p)){var L=p;p=C.mutableElements().filter(L)}for(var O=x.map,N=0;N<p.length;N++){var j=p[N],H=j._private.data.id,q=!O.has(H);if(q){var W=this.length++;this[W]=j,O.set(H,{ele:j,index:W})}}return this},unmergeAt:function(p){var x=this[p],C=x.id(),L=this._private,O=L.map;this[p]=void 0,O.delete(C);var N=p===this.length-1;if(this.length>1&&!N){var j=this.length-1,H=this[j],q=H._private.data.id;this[j]=void 0,this[p]=H,O.set(q,{ele:H,index:p})}return this.length--,this},unmergeOne:function(p){p=p[0];var x=this._private,C=p._private.data.id,L=x.map,O=L.get(C);if(!O)return this;var N=O.index;return this.unmergeAt(N),this},unmerge:function(p){var x=this._private.cy;if(!p)return this;if(p&&mt(p)){var C=p;p=x.mutableElements().filter(C)}for(var L=0;L<p.length;L++)this.unmergeOne(p[L]);return this},unmergeBy:function(p){for(var x=this.length-1;x>=0;x--){var C=this[x];p(C)&&this.unmergeAt(x)}return this},map:function(p,x){for(var C=[],L=this,O=0;O<L.length;O++){var N=L[O],j=x?p.apply(x,[N,O,L]):p(N,O,L);C.push(j)}return C},reduce:function(p,x){for(var C=x,L=this,O=0;O<L.length;O++)C=p(C,L[O],O,L);return C},max:function(p,x){for(var C=-1/0,L,O=this,N=0;N<O.length;N++){var j=O[N],H=x?p.apply(x,[j,N,O]):p(j,N,O);H>C&&(C=H,L=j)}return{value:C,ele:L}},min:function(p,x){for(var C=1/0,L,O=this,N=0;N<O.length;N++){var j=O[N],H=x?p.apply(x,[j,N,O]):p(j,N,O);H<C&&(C=H,L=j)}return{value:C,ele:L}}},Oc=aM;Oc.u=Oc["|"]=Oc["+"]=Oc.union=Oc.or=Oc.add,Oc["\\"]=Oc["!"]=Oc["-"]=Oc.difference=Oc.relativeComplement=Oc.subtract=Oc.not,Oc.n=Oc["&"]=Oc["."]=Oc.and=Oc.intersection=Oc.intersect,Oc["^"]=Oc["(+)"]=Oc["(-)"]=Oc.symmetricDifference=Oc.symdiff=Oc.xor,Oc.fnFilter=Oc.filterFn=Oc.stdFilter=Oc.filter,Oc.complement=Oc.abscomp=Oc.absoluteComplement;var oM={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var p=this[0];if(p)return p._private.group}},cM=function(p,x){var C=p.cy(),L=C.hasCompoundNodes();function O(W){var Z=W.pstyle("z-compound-depth");return Z.value==="auto"?L?W.zDepth():0:Z.value==="bottom"?-1:Z.value==="top"?Kx:0}var N=O(p)-O(x);if(N!==0)return N;function j(W){var Z=W.pstyle("z-index-compare");return Z.value==="auto"&&W.isNode()?1:0}var H=j(p)-j(x);if(H!==0)return H;var q=p.pstyle("z-index").value-x.pstyle("z-index").value;return q!==0?q:p.poolIndex()-x.poolIndex()},pC={forEach:function(p,x){if(ct(p))for(var C=this.length,L=0;L<C;L++){var O=this[L],N=x?p.apply(x,[O,L,this]):p(O,L,this);if(N===!1)break}return this},toArray:function(){for(var p=[],x=0;x<this.length;x++)p.push(this[x]);return p},slice:function(p,x){var C=[],L=this.length;x==null&&(x=L),p==null&&(p=0),p<0&&(p=L+p),x<0&&(x=L+x);for(var O=p;O>=0&&O<x&&O<L;O++)C.push(this[O]);return this.spawn(C)},size:function(){return this.length},eq:function(p){return this[p]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(p){if(!ct(p))return this;var x=this.toArray().sort(p);return this.spawn(x)},sortByZIndex:function(){return this.sort(cM)},zDepth:function(){var p=this[0];if(p){var x=p._private,C=x.group;if(C==="nodes"){var L=x.data.parent?p.parents().size():0;return p.isParent()?L:Kx-1}else{var O=x.source,N=x.target,j=O.zDepth(),H=N.zDepth();return Math.max(j,H,0)}}}};pC.each=pC.forEach;var Jtt=function(){var p="undefined",x=(typeof Symbol>"u"?"undefined":f(Symbol))!=p&&f(Symbol.iterator)!=p;x&&(pC[Symbol.iterator]=function(){var C=this,L={value:void 0,done:!1},O=0,N=this.length;return b({next:function(){return O<N?L.value=C[O++]:(L.value=void 0,L.done=!0),L}},Symbol.iterator,function(){return this})})};Jtt();var Ztt=p1({nodeDimensionsIncludeLabels:!1}),bC={layoutDimensions:function(p){p=Ztt(p);var x;if(!this.takesUpSpace())x={w:0,h:0};else if(p.nodeDimensionsIncludeLabels){var C=this.boundingBox();x={w:C.w,h:C.h}}else x={w:this.outerWidth(),h:this.outerHeight()};return(x.w===0||x.h===0)&&(x.w=x.h=1),x},layoutPositions:function(p,x,C){var L=this.nodes().filter(function(re){return!re.isParent()}),O=this.cy(),N=x.eles,j=function(ee){return ee.id()},H=Mt(C,j);p.emit({type:"layoutstart",layout:p}),p.animations=[];var q=function(ee,Ut,de){var Yt={x:Ut.x1+Ut.w/2,y:Ut.y1+Ut.h/2},Ee={x:(de.x-Yt.x)*ee,y:(de.y-Yt.y)*ee};return{x:Yt.x+Ee.x,y:Yt.y+Ee.y}},W=x.spacingFactor&&x.spacingFactor!==1,Z=function(){if(!W)return null;for(var ee=v0(),Ut=0;Ut<L.length;Ut++){var de=L[Ut],Yt=H(de,Ut);bQ(ee,Yt.x,Yt.y)}return ee},st=Z(),bt=Mt(function(re,ee){var Ut=H(re,ee);if(W){var de=Math.abs(x.spacingFactor);Ut=q(de,st,Ut)}return x.transform!=null&&(Ut=x.transform(re,Ut)),Ut},j);if(x.animate){for(var pt=0;pt<L.length;pt++){var _t=L[pt],St=bt(_t,pt),Et=x.animateFilter==null||x.animateFilter(_t,pt);if(Et){var Nt=_t.animation({position:St,duration:x.animationDuration,easing:x.animationEasing});p.animations.push(Nt)}else _t.position(St)}if(x.fit){var Pt=O.animation({fit:{boundingBox:N.boundingBoxAt(bt),padding:x.padding},duration:x.animationDuration,easing:x.animationEasing});p.animations.push(Pt)}else if(x.zoom!==void 0&&x.pan!==void 0){var qt=O.animation({zoom:x.zoom,pan:x.pan,duration:x.animationDuration,easing:x.animationEasing});p.animations.push(qt)}p.animations.forEach(function(re){return re.play()}),p.one("layoutready",x.ready),p.emit({type:"layoutready",layout:p}),e6.all(p.animations.map(function(re){return re.promise()})).then(function(){p.one("layoutstop",x.stop),p.emit({type:"layoutstop",layout:p})})}else L.positions(bt),x.fit&&O.fit(x.eles,x.padding),x.zoom!=null&&O.zoom(x.zoom),x.pan&&O.pan(x.pan),p.one("layoutready",x.ready),p.emit({type:"layoutready",layout:p}),p.one("layoutstop",x.stop),p.emit({type:"layoutstop",layout:p});return this},layout:function(p){var x=this.cy();return x.makeLayout(we({},p,{eles:this}))}};bC.createLayout=bC.makeLayout=bC.layout;function tet(y,p,x){var C=x._private,L=C.styleCache=C.styleCache||[],O;return(O=L[y])!=null||(O=L[y]=p(x)),O}function wC(y,p){return y=Nd(y),function(C){return tet(y,p,C)}}function mC(y,p){y=Nd(y);var x=function(L){return p.call(L)};return function(){var L=this[0];if(L)return tet(y,x,L)}}var b1={recalculateRenderedStyle:function(p){var x=this.cy(),C=x.renderer(),L=x.styleEnabled();return C&&L&&C.recalculateRenderedStyle(this,p),this},dirtyStyleCache:function(){var p=this.cy(),x=function(O){return O._private.styleCache=null};if(p.hasCompoundNodes()){var C;C=this.spawnSelf().merge(this.descendants()).merge(this.parents()),C.merge(C.connectedEdges()),C.forEach(x)}else this.forEach(function(L){x(L),L.connectedEdges().forEach(x)});return this},updateStyle:function(p){var x=this._private.cy;if(!x.styleEnabled())return this;if(x.batching()){var C=x._private.batchStyleEles;return C.merge(this),this}var L=x.hasCompoundNodes(),O=this;p=!!(p||p===void 0),L&&(O=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var N=O;return p?N.emitAndNotify("style"):N.emit("style"),O.forEach(function(j){return j._private.styleDirty=!0}),this},cleanStyle:function(){var p=this.cy();if(p.styleEnabled())for(var x=0;x<this.length;x++){var C=this[x];C._private.styleDirty&&(C._private.styleDirty=!1,p.style().apply(C))}},parsedStyle:function(p){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,C=this[0],L=C.cy();if(L.styleEnabled()&&C){this.cleanStyle();var O=C._private.style[p];return O??(x?L.style().getDefaultProperty(p):null)}},numericStyle:function(p){var x=this[0];if(x.cy().styleEnabled()&&x){var C=x.pstyle(p);return C.pfValue!==void 0?C.pfValue:C.value}},numericStyleUnits:function(p){var x=this[0];if(x.cy().styleEnabled()&&x)return x.pstyle(p).units},renderedStyle:function(p){var x=this.cy();if(!x.styleEnabled())return this;var C=this[0];if(C)return x.style().getRenderedStyle(C,p)},style:function(p,x){var C=this.cy();if(!C.styleEnabled())return this;var L=!1,O=C.style();if(it(p)){var N=p;O.applyBypass(this,N,L),this.emitAndNotify("style")}else if(mt(p))if(x===void 0){var j=this[0];return j?O.getStylePropertyValue(j,p):void 0}else O.applyBypass(this,p,x,L),this.emitAndNotify("style");else if(p===void 0){var H=this[0];return H?O.getRawStyle(H):void 0}return this},removeStyle:function(p){var x=this.cy();if(!x.styleEnabled())return this;var C=!1,L=x.style(),O=this;if(p===void 0)for(var N=0;N<O.length;N++){var j=O[N];L.removeAllBypasses(j,C)}else{p=p.split(/\s+/);for(var H=0;H<O.length;H++){var q=O[H];L.removeBypasses(q,p,C)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var p=this.cy();if(!p.styleEnabled())return 1;var x=p.hasCompoundNodes(),C=this[0];if(C){var L=C._private,O=C.pstyle("opacity").value;if(!x)return O;var N=L.data.parent?C.parents():null;if(N)for(var j=0;j<N.length;j++){var H=N[j],q=H.pstyle("opacity").value;O=q*O}return O}},transparent:function(){var p=this.cy();if(!p.styleEnabled())return!1;var x=this[0],C=x.cy().hasCompoundNodes();if(x)return C?x.effectiveOpacity()===0:x.pstyle("opacity").value===0},backgrounding:function(){var p=this.cy();if(!p.styleEnabled())return!1;var x=this[0];return!!x._private.backgrounding}};function uM(y,p){var x=y._private,C=x.data.parent?y.parents():null;if(C)for(var L=0;L<C.length;L++){var O=C[L];if(!p(O))return!1}return!0}function lM(y){var p=y.ok,x=y.edgeOkViaNode||y.ok,C=y.parentOk||y.ok;return function(){var L=this.cy();if(!L.styleEnabled())return!0;var O=this[0],N=L.hasCompoundNodes();if(O){var j=O._private;if(!p(O))return!1;if(O.isNode())return!N||uM(O,C);var H=j.source,q=j.target;return x(H)&&(!N||uM(H,x))&&(H===q||x(q)&&(!N||uM(q,x)))}}}var u6=wC("eleTakesUpSpace",function(y){return y.pstyle("display").value==="element"&&y.width()!==0&&(y.isNode()?y.height()!==0:!0)});b1.takesUpSpace=mC("takesUpSpace",lM({ok:u6}));var eet=wC("eleInteractive",function(y){return y.pstyle("events").value==="yes"&&y.pstyle("visibility").value==="visible"&&u6(y)}),net=wC("parentInteractive",function(y){return y.pstyle("visibility").value==="visible"&&u6(y)});b1.interactive=mC("interactive",lM({ok:eet,parentOk:net,edgeOkViaNode:u6})),b1.noninteractive=function(){var y=this[0];if(y)return!y.interactive()};var ret=wC("eleVisible",function(y){return y.pstyle("visibility").value==="visible"&&y.pstyle("opacity").pfValue!==0&&u6(y)}),iet=u6;b1.visible=mC("visible",lM({ok:ret,edgeOkViaNode:iet})),b1.hidden=function(){var y=this[0];if(y)return!y.visible()},b1.isBundledBezier=mC("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),b1.bypass=b1.css=b1.style,b1.renderedCss=b1.renderedStyle,b1.removeBypass=b1.removeCss=b1.removeStyle,b1.pstyle=b1.parsedStyle;var x0={};function vC(y){return function(){var p=arguments,x=[];if(p.length===2){var C=p[0],L=p[1];this.on(y.event,C,L)}else if(p.length===1&&ct(p[0])){var O=p[0];this.on(y.event,O)}else if(p.length===0||p.length===1&&rt(p[0])){for(var N=p.length===1?p[0]:null,j=0;j<this.length;j++){var H=this[j],q=!y.ableField||H._private[y.ableField],W=H._private[y.field]!=y.value;if(y.overrideAble){var Z=y.overrideAble(H);if(Z!==void 0&&(q=Z,!Z))return this}q&&(H._private[y.field]=y.value,W&&x.push(H))}var st=this.spawn(x);st.updateStyle(),st.emit(y.event),N&&st.emit(N)}return this}}function l6(y){x0[y.field]=function(){var p=this[0];if(p){if(y.overrideField){var x=y.overrideField(p);if(x!==void 0)return x}return p._private[y.field]}},x0[y.on]=vC({event:y.on,field:y.field,ableField:y.ableField,overrideAble:y.overrideAble,value:!0}),x0[y.off]=vC({event:y.off,field:y.field,ableField:y.ableField,overrideAble:y.overrideAble,value:!1})}l6({field:"locked",overrideField:function(p){return p.cy().autolock()?!0:void 0},on:"lock",off:"unlock"}),l6({field:"grabbable",overrideField:function(p){return p.cy().autoungrabify()||p.pannable()?!1:void 0},on:"grabify",off:"ungrabify"}),l6({field:"selected",ableField:"selectable",overrideAble:function(p){return p.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"}),l6({field:"selectable",overrideField:function(p){return p.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"}),x0.deselect=x0.unselect,x0.grabbed=function(){var y=this[0];if(y)return y._private.grabbed},l6({field:"active",on:"activate",off:"unactivate"}),l6({field:"pannable",on:"panify",off:"unpanify"}),x0.inactive=function(){var y=this[0];if(y)return!y._private.active};var K1={},JR=function(p){return function(C){for(var L=this,O=[],N=0;N<L.length;N++){var j=L[N];if(j.isNode()){for(var H=!1,q=j.connectedEdges(),W=0;W<q.length;W++){var Z=q[W],st=Z.source(),bt=Z.target();if(p.noIncomingEdges&&bt===j&&st!==j||p.noOutgoingEdges&&st===j&&bt!==j){H=!0;break}}H||O.push(j)}}return this.spawn(O,!0).filter(C)}},ZR=function(p){return function(x){for(var C=this,L=[],O=0;O<C.length;O++){var N=C[O];if(N.isNode())for(var j=N.connectedEdges(),H=0;H<j.length;H++){var q=j[H],W=q.source(),Z=q.target();p.outgoing&&W===N?(L.push(q),L.push(Z)):p.incoming&&Z===N&&(L.push(q),L.push(W))}}return this.spawn(L,!0).filter(x)}},tj=function(p){return function(x){for(var C=this,L=[],O={};;){var N=p.outgoing?C.outgoers():C.incomers();if(N.length===0)break;for(var j=!1,H=0;H<N.length;H++){var q=N[H],W=q.id();O[W]||(O[W]=!0,L.push(q),j=!0)}if(!j)break;C=N}return this.spawn(L,!0).filter(x)}};K1.clearTraversalCache=function(){for(var y=0;y<this.length;y++)this[y]._private.traversalCache=null},we(K1,{roots:JR({noIncomingEdges:!0}),leaves:JR({noOutgoingEdges:!0}),outgoers:ap(ZR({outgoing:!0}),"outgoers"),successors:tj({outgoing:!0}),incomers:ap(ZR({incoming:!0}),"incomers"),predecessors:tj({incoming:!0})}),we(K1,{neighborhood:ap(function(y){for(var p=[],x=this.nodes(),C=0;C<x.length;C++)for(var L=x[C],O=L.connectedEdges(),N=0;N<O.length;N++){var j=O[N],H=j.source(),q=j.target(),W=L===H?q:H;W.length>0&&p.push(W[0]),p.push(j[0])}return this.spawn(p,!0).filter(y)},"neighborhood"),closedNeighborhood:function(p){return this.neighborhood().add(this).filter(p)},openNeighborhood:function(p){return this.neighborhood(p)}}),K1.neighbourhood=K1.neighborhood,K1.closedNeighbourhood=K1.closedNeighborhood,K1.openNeighbourhood=K1.openNeighborhood,we(K1,{source:ap(function(p){var x=this[0],C;return x&&(C=x._private.source||x.cy().collection()),C&&p?C.filter(p):C},"source"),target:ap(function(p){var x=this[0],C;return x&&(C=x._private.target||x.cy().collection()),C&&p?C.filter(p):C},"target"),sources:ej({attr:"source"}),targets:ej({attr:"target"})});function ej(y){return function(x){for(var C=[],L=0;L<this.length;L++){var O=this[L],N=O._private[y.attr];N&&C.push(N)}return this.spawn(C,!0).filter(x)}}we(K1,{edgesWith:ap(nj(),"edgesWith"),edgesTo:ap(nj({thisIsSrc:!0}),"edgesTo")});function nj(y){return function(x){var C=[],L=this._private.cy,O=y||{};mt(x)&&(x=L.$(x));for(var N=0;N<x.length;N++)for(var j=x[N]._private.edges,H=0;H<j.length;H++){var q=j[H],W=q._private.data,Z=this.hasElementWithId(W.source)&&x.hasElementWithId(W.target),st=x.hasElementWithId(W.source)&&this.hasElementWithId(W.target),bt=Z||st;bt&&((O.thisIsSrc||O.thisIsTgt)&&(O.thisIsSrc&&!Z||O.thisIsTgt&&!st)||C.push(q))}return this.spawn(C,!0)}}we(K1,{connectedEdges:ap(function(y){for(var p=[],x=this,C=0;C<x.length;C++){var L=x[C];if(L.isNode())for(var O=L._private.edges,N=0;N<O.length;N++){var j=O[N];p.push(j)}}return this.spawn(p,!0).filter(y)},"connectedEdges"),connectedNodes:ap(function(y){for(var p=[],x=this,C=0;C<x.length;C++){var L=x[C];L.isEdge()&&(p.push(L.source()[0]),p.push(L.target()[0]))}return this.spawn(p,!0).filter(y)},"connectedNodes"),parallelEdges:ap(rj(),"parallelEdges"),codirectedEdges:ap(rj({codirected:!0}),"codirectedEdges")});function rj(y){var p={codirected:!1};return y=we({},p,y),function(C){for(var L=[],O=this.edges(),N=y,j=0;j<O.length;j++)for(var H=O[j],q=H._private,W=q.source,Z=W._private.data.id,st=q.data.target,bt=W._private.edges,pt=0;pt<bt.length;pt++){var _t=bt[pt],St=_t._private.data,Et=St.target,Nt=St.source,Pt=Et===st&&Nt===Z,qt=Z===Et&&st===Nt;(N.codirected&&Pt||!N.codirected&&(Pt||qt))&&L.push(_t)}return this.spawn(L,!0).filter(C)}}we(K1,{components:function(p){var x=this,C=x.cy(),L=C.collection(),O=p==null?x.nodes():p.nodes(),N=[];p!=null&&O.empty()&&(O=p.sources());var j=function(W,Z){L.merge(W),O.unmerge(W),Z.merge(W)};if(O.empty())return x.spawn();var H=function(){var W=C.collection();N.push(W);var Z=O[0];j(Z,W),x.bfs({directed:!1,roots:Z,visit:function(bt){return j(bt,W)}}),W.forEach(function(st){st.connectedEdges().forEach(function(bt){x.has(bt)&&W.has(bt.source())&&W.has(bt.target())&&W.merge(bt)})})};do H();while(O.length>0);return N},component:function(){var p=this[0];return p.cy().mutableElements().components(p)[0]}}),K1.componentsOf=K1.components;var w1=function(p,x){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(p===void 0){$l("A collection must have a reference to the core");return}var O=new F2,N=!1;if(!x)x=[];else if(x.length>0&&it(x[0])&&!V(x[0])){N=!0;for(var j=[],H=new Wx,q=0,W=x.length;q<W;q++){var Z=x[q];Z.data==null&&(Z.data={});var st=Z.data;if(st.id==null)st.id=MB();else if(p.hasElementWithId(st.id)||H.has(st.id))continue;var bt=new K9(p,Z,!1);j.push(bt),H.add(st.id)}x=j}this.length=0;for(var pt=0,_t=x.length;pt<_t;pt++){var St=x[pt][0];if(St!=null){var Et=St._private.data.id;(!C||!O.has(Et))&&(C&&O.set(Et,{index:this.length,ele:St}),this[this.length]=St,this.length++)}}this._private={eles:this,cy:p,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(Nt){this.lazyMap=Nt},rebuildMap:function(){for(var Pt=this.lazyMap=new F2,qt=this.eles,re=0;re<qt.length;re++){var ee=qt[re];Pt.set(ee.id(),{index:re,ele:ee})}}},C&&(this._private.map=O),N&&!L&&this.restore()},Bu=K9.prototype=w1.prototype=Object.create(Array.prototype);Bu.instanceString=function(){return"collection"},Bu.spawn=function(y,p){return new w1(this.cy(),y,p)},Bu.spawnSelf=function(){return this.spawn(this)},Bu.cy=function(){return this._private.cy},Bu.renderer=function(){return this._private.cy.renderer()},Bu.element=function(){return this[0]},Bu.collection=function(){return Ot(this)?this:new w1(this._private.cy,[this])},Bu.unique=function(){return new w1(this._private.cy,this,!0)},Bu.hasElementWithId=function(y){return y=""+y,this._private.map.has(y)},Bu.getElementById=function(y){y=""+y;var p=this._private.cy,x=this._private.map.get(y);return x?x.ele:new w1(p)},Bu.$id=Bu.getElementById,Bu.poolIndex=function(){var y=this._private.cy,p=y._private.elements,x=this[0]._private.data.id;return p._private.map.get(x).index},Bu.indexOf=function(y){var p=y[0]._private.data.id;return this._private.map.get(p).index},Bu.indexOfId=function(y){return y=""+y,this._private.map.get(y).index},Bu.json=function(y){var p=this.element(),x=this.cy();if(p==null&&y)return this;if(p!=null){var C=p._private;if(it(y)){if(x.startBatch(),y.data){p.data(y.data);var L=C.data;if(p.isEdge()){var O=!1,N={},j=y.data.source,H=y.data.target;j!=null&&j!=L.source&&(N.source=""+j,O=!0),H!=null&&H!=L.target&&(N.target=""+H,O=!0),O&&(p=p.move(N))}else{var q="parent"in y.data,W=y.data.parent;q&&(W!=null||L.parent!=null)&&W!=L.parent&&(W===void 0&&(W=null),W!=null&&(W=""+W),p=p.move({parent:W}))}}y.position&&p.position(y.position);var Z=function(_t,St,Et){var Nt=y[_t];Nt!=null&&Nt!==C[_t]&&(Nt?p[St]():p[Et]())};return Z("removed","remove","restore"),Z("selected","select","unselect"),Z("selectable","selectify","unselectify"),Z("locked","lock","unlock"),Z("grabbable","grabify","ungrabify"),Z("pannable","panify","unpanify"),y.classes!=null&&p.classes(y.classes),x.endBatch(),this}else if(y===void 0){var st={data:P2(C.data),position:P2(C.position),group:C.group,removed:C.removed,selected:C.selected,selectable:C.selectable,locked:C.locked,grabbable:C.grabbable,pannable:C.pannable,classes:null};st.classes="";var bt=0;return C.classes.forEach(function(pt){return st.classes+=bt++===0?pt:" "+pt}),st}}},Bu.jsons=function(){for(var y=[],p=0;p<this.length;p++){var x=this[p],C=x.json();y.push(C)}return y},Bu.clone=function(){for(var y=this.cy(),p=[],x=0;x<this.length;x++){var C=this[x],L=C.json(),O=new K9(y,L,!1);p.push(O)}return new w1(y,p)},Bu.copy=Bu.clone,Bu.restore=function(){for(var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,x=this,C=x.cy(),L=C._private,O=[],N=[],j,H=0,q=x.length;H<q;H++){var W=x[H];p&&!W.removed()||(W.isNode()?O.push(W):N.push(W))}j=O.concat(N);var Z,st=function(){j.splice(Z,1),Z--};for(Z=0;Z<j.length;Z++){var bt=j[Z],pt=bt._private,_t=pt.data;if(bt.clearTraversalCache(),!(!p&&!pt.removed)){if(_t.id===void 0)_t.id=MB();else if(Q(_t.id))_t.id=""+_t.id;else if(Ft(_t.id)||!mt(_t.id)){$l("Can not create element with invalid string ID `"+_t.id+"`"),st();continue}else if(C.hasElementWithId(_t.id)){$l("Can not create second element with ID `"+_t.id+"`"),st();continue}}var St=_t.id;if(bt.isNode()){var Et=pt.position;Et.x==null&&(Et.x=0),Et.y==null&&(Et.y=0)}if(bt.isEdge()){for(var Nt=bt,Pt=["source","target"],qt=Pt.length,re=!1,ee=0;ee<qt;ee++){var Ut=Pt[ee],de=_t[Ut];Q(de)&&(de=_t[Ut]=""+_t[Ut]),de==null||de===""?($l("Can not create edge `"+St+"` with unspecified "+Ut),re=!0):C.hasElementWithId(de)||($l("Can not create edge `"+St+"` with nonexistant "+Ut+" `"+de+"`"),re=!0)}if(re){st();continue}var Yt=C.getElementById(_t.source),Ee=C.getElementById(_t.target);Yt.same(Ee)?Yt._private.edges.push(Nt):(Yt._private.edges.push(Nt),Ee._private.edges.push(Nt)),Nt._private.source=Yt,Nt._private.target=Ee}pt.map=new F2,pt.map.set(St,{ele:bt,index:0}),pt.removed=!1,p&&C.addToPool(bt)}for(var Te=0;Te<O.length;Te++){var ie=O[Te],ze=ie._private.data;Q(ze.parent)&&(ze.parent=""+ze.parent);var me=ze.parent,yn=me!=null;if(yn||ie._private.parent){var nn=ie._private.parent?C.collection().merge(ie._private.parent):C.getElementById(me);if(nn.empty())ze.parent=void 0;else if(nn[0].removed())Gc("Node added with missing parent, reference to parent removed"),ze.parent=void 0,ie._private.parent=null;else{for(var qe=!1,Tn=nn;!Tn.empty();){if(ie.same(Tn)){qe=!0,ze.parent=void 0;break}Tn=Tn.parent()}qe||(nn[0]._private.children.push(ie),ie._private.parent=nn[0],L.hasCompoundNodes=!0)}}}if(j.length>0){for(var Xn=j.length===x.length?x:new w1(C,j),lr=0;lr<Xn.length;lr++){var Sn=Xn[lr];Sn.isNode()||(Sn.parallelEdges().clearTraversalCache(),Sn.source().clearTraversalCache(),Sn.target().clearTraversalCache())}var or;L.hasCompoundNodes?or=C.collection().merge(Xn).merge(Xn.connectedNodes()).merge(Xn.parent()):or=Xn,or.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(y),y?Xn.emitAndNotify("add"):p&&Xn.emit("add")}return x},Bu.removed=function(){var y=this[0];return y&&y._private.removed},Bu.inside=function(){var y=this[0];return y&&!y._private.removed},Bu.remove=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,x=this,C=[],L={},O=x._private.cy;function N(me){for(var yn=me._private.edges,nn=0;nn<yn.length;nn++)H(yn[nn])}function j(me){for(var yn=me._private.children,nn=0;nn<yn.length;nn++)H(yn[nn])}function H(me){var yn=L[me.id()];p&&me.removed()||yn||(L[me.id()]=!0,me.isNode()?(C.push(me),N(me),j(me)):C.unshift(me))}for(var q=0,W=x.length;q<W;q++){var Z=x[q];H(Z)}function st(me,yn){var nn=me._private.edges;oy(nn,yn),me.clearTraversalCache()}function bt(me){me.clearTraversalCache()}var pt=[];pt.ids={};function _t(me,yn){yn=yn[0],me=me[0];var nn=me._private.children,qe=me.id();oy(nn,yn),yn._private.parent=null,pt.ids[qe]||(pt.ids[qe]=!0,pt.push(me))}x.dirtyCompoundBoundsCache(),p&&O.removeFromPool(C);for(var St=0;St<C.length;St++){var Et=C[St];if(Et.isEdge()){var Nt=Et.source()[0],Pt=Et.target()[0];st(Nt,Et),st(Pt,Et);for(var qt=Et.parallelEdges(),re=0;re<qt.length;re++){var ee=qt[re];bt(ee),ee.isBundledBezier()&&ee.dirtyBoundingBoxCache()}}else{var Ut=Et.parent();Ut.length!==0&&_t(Ut,Et)}p&&(Et._private.removed=!0)}var de=O._private.elements;O._private.hasCompoundNodes=!1;for(var Yt=0;Yt<de.length;Yt++){var Ee=de[Yt];if(Ee.isParent()){O._private.hasCompoundNodes=!0;break}}var Te=new w1(this.cy(),C);Te.size()>0&&(y?Te.emitAndNotify("remove"):p&&Te.emit("remove"));for(var ie=0;ie<pt.length;ie++){var ze=pt[ie];(!p||!ze.removed())&&ze.updateStyle()}return Te},Bu.move=function(y){var p=this._private.cy,x=this,C=!1,L=!1,O=function(pt){return pt==null?pt:""+pt};if(y.source!==void 0||y.target!==void 0){var N=O(y.source),j=O(y.target),H=N!=null&&p.hasElementWithId(N),q=j!=null&&p.hasElementWithId(j);(H||q)&&(p.batch(function(){x.remove(C,L),x.emitAndNotify("moveout");for(var bt=0;bt<x.length;bt++){var pt=x[bt],_t=pt._private.data;pt.isEdge()&&(H&&(_t.source=N),q&&(_t.target=j))}x.restore(C,L)}),x.emitAndNotify("move"))}else if(y.parent!==void 0){var W=O(y.parent),Z=W===null||p.hasElementWithId(W);if(Z){var st=W===null?void 0:W;p.batch(function(){var bt=x.remove(C,L);bt.emitAndNotify("moveout");for(var pt=0;pt<x.length;pt++){var _t=x[pt],St=_t._private.data;_t.isNode()&&(St.parent=st)}bt.restore(C,L)}),x.emitAndNotify("move")}}return this},[aR,ktt,lC,hy,a6,fy,q8,sM,QR,aM,oM,pC,bC,b1,x0,K1].forEach(function(y){we(Bu,y)});var set={add:function(p){var x,C=this;if(yt(p)){var L=p;if(L._private.cy===C)x=L.restore();else{for(var O=[],N=0;N<L.length;N++){var j=L[N];O.push(j.json())}x=new w1(C,O)}}else if(rt(p)){var H=p;x=new w1(C,H)}else if(it(p)&&(rt(p.nodes)||rt(p.edges))){for(var q=p,W=[],Z=["nodes","edges"],st=0,bt=Z.length;st<bt;st++){var pt=Z[st],_t=q[pt];if(rt(_t))for(var St=0,Et=_t.length;St<Et;St++){var Nt=we({group:pt},_t[St]);W.push(Nt)}}x=new w1(C,W)}else{var Pt=p;x=new K9(C,Pt).collection()}return x},remove:function(p){if(!yt(p)){if(mt(p)){var x=p;p=this.$(x)}}return p.remove()}};/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function aet(y,p,x,C){var L=4,O=.001,N=1e-7,j=10,H=11,q=1/(H-1),W=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var Z=0;Z<4;++Z)if(typeof arguments[Z]!="number"||isNaN(arguments[Z])||!isFinite(arguments[Z]))return!1;y=Math.min(y,1),x=Math.min(x,1),y=Math.max(y,0),x=Math.max(x,0);var st=W?new Float32Array(H):new Array(H);function bt(Ee,Te){return 1-3*Te+3*Ee}function pt(Ee,Te){return 3*Te-6*Ee}function _t(Ee){return 3*Ee}function St(Ee,Te,ie){return((bt(Te,ie)*Ee+pt(Te,ie))*Ee+_t(Te))*Ee}function Et(Ee,Te,ie){return 3*bt(Te,ie)*Ee*Ee+2*pt(Te,ie)*Ee+_t(Te)}function Nt(Ee,Te){for(var ie=0;ie<L;++ie){var ze=Et(Te,y,x);if(ze===0)return Te;var me=St(Te,y,x)-Ee;Te-=me/ze}return Te}function Pt(){for(var Ee=0;Ee<H;++Ee)st[Ee]=St(Ee*q,y,x)}function qt(Ee,Te,ie){var ze,me,yn=0;do me=Te+(ie-Te)/2,ze=St(me,y,x)-Ee,ze>0?ie=me:Te=me;while(Math.abs(ze)>N&&++yn<j);return me}function re(Ee){for(var Te=0,ie=1,ze=H-1;ie!==ze&&st[ie]<=Ee;++ie)Te+=q;--ie;var me=(Ee-st[ie])/(st[ie+1]-st[ie]),yn=Te+me*q,nn=Et(yn,y,x);return nn>=O?Nt(Ee,yn):nn===0?yn:qt(Ee,Te,Te+q)}var ee=!1;function Ut(){ee=!0,(y!==p||x!==C)&&Pt()}var de=function(Te){return ee||Ut(),y===p&&x===C?Te:Te===0?0:Te===1?1:St(re(Te),p,C)};de.getControlPoints=function(){return[{x:y,y:p},{x,y:C}]};var Yt="generateBezier("+[y,p,x,C]+")";return de.toString=function(){return Yt},de}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var oet=function(){function y(C){return-C.tension*C.x-C.friction*C.v}function p(C,L,O){var N={x:C.x+O.dx*L,v:C.v+O.dv*L,tension:C.tension,friction:C.friction};return{dx:N.v,dv:y(N)}}function x(C,L){var O={dx:C.v,dv:y(C)},N=p(C,L*.5,O),j=p(C,L*.5,N),H=p(C,L,j),q=1/6*(O.dx+2*(N.dx+j.dx)+H.dx),W=1/6*(O.dv+2*(N.dv+j.dv)+H.dv);return C.x=C.x+q*L,C.v=C.v+W*L,C}return function C(L,O,N){var j={x:-1,v:0,tension:null,friction:null},H=[0],q=0,W=1/1e4,Z=16/1e3,st,bt,pt;for(L=parseFloat(L)||500,O=parseFloat(O)||20,N=N||null,j.tension=L,j.friction=O,st=N!==null,st?(q=C(L,O),bt=q/N*Z):bt=Z;pt=x(pt||j,bt),H.push(1+pt.x),q+=16,Math.abs(pt.x)>W&&Math.abs(pt.v)>W;);return st?function(_t){return H[_t*(H.length-1)|0]}:q}}(),Ru=function(p,x,C,L){var O=aet(p,x,C,L);return function(N,j,H){return N+(j-N)*O(H)}},yC={linear:function(p,x,C){return p+(x-p)*C},ease:Ru(.25,.1,.25,1),"ease-in":Ru(.42,0,1,1),"ease-out":Ru(0,0,.58,1),"ease-in-out":Ru(.42,0,.58,1),"ease-in-sine":Ru(.47,0,.745,.715),"ease-out-sine":Ru(.39,.575,.565,1),"ease-in-out-sine":Ru(.445,.05,.55,.95),"ease-in-quad":Ru(.55,.085,.68,.53),"ease-out-quad":Ru(.25,.46,.45,.94),"ease-in-out-quad":Ru(.455,.03,.515,.955),"ease-in-cubic":Ru(.55,.055,.675,.19),"ease-out-cubic":Ru(.215,.61,.355,1),"ease-in-out-cubic":Ru(.645,.045,.355,1),"ease-in-quart":Ru(.895,.03,.685,.22),"ease-out-quart":Ru(.165,.84,.44,1),"ease-in-out-quart":Ru(.77,0,.175,1),"ease-in-quint":Ru(.755,.05,.855,.06),"ease-out-quint":Ru(.23,1,.32,1),"ease-in-out-quint":Ru(.86,0,.07,1),"ease-in-expo":Ru(.95,.05,.795,.035),"ease-out-expo":Ru(.19,1,.22,1),"ease-in-out-expo":Ru(1,0,0,1),"ease-in-circ":Ru(.6,.04,.98,.335),"ease-out-circ":Ru(.075,.82,.165,1),"ease-in-out-circ":Ru(.785,.135,.15,.86),spring:function(p,x,C){if(C===0)return yC.linear;var L=oet(p,x,C);return function(O,N,j){return O+(N-O)*L(j)}},"cubic-bezier":Ru};function ij(y,p,x,C,L){if(C===1||p===x)return x;var O=L(p,x,C);return y==null||((y.roundValue||y.color)&&(O=Math.round(O)),y.min!==void 0&&(O=Math.max(O,y.min)),y.max!==void 0&&(O=Math.min(O,y.max))),O}function sj(y,p){return y.pfValue!=null||y.value!=null?y.pfValue!=null&&(p==null||p.type.units!=="%")?y.pfValue:y.value:y}function h6(y,p,x,C,L){var O=L!=null?L.type:null;x<0?x=0:x>1&&(x=1);var N=sj(y,L),j=sj(p,L);if(Q(N)&&Q(j))return ij(O,N,j,x,C);if(rt(N)&&rt(j)){for(var H=[],q=0;q<j.length;q++){var W=N[q],Z=j[q];if(W!=null&&Z!=null){var st=ij(O,W,Z,x,C);H.push(st)}else H.push(Z)}return H}}function cet(y,p,x,C){var L=!C,O=y._private,N=p._private,j=N.easing,H=N.startTime,q=C?y:y.cy(),W=q.style();if(!N.easingImpl)if(j==null)N.easingImpl=yC.linear;else{var Z;if(mt(j)){var st=W.parse("transition-timing-function",j);Z=st.value}else Z=j;var bt,pt;mt(Z)?(bt=Z,pt=[]):(bt=Z[1],pt=Z.slice(2).map(function(Xn){return+Xn})),pt.length>0?(bt==="spring"&&pt.push(N.duration),N.easingImpl=yC[bt].apply(null,pt)):N.easingImpl=yC[bt]}var _t=N.easingImpl,St;if(N.duration===0?St=1:St=(x-H)/N.duration,N.applying&&(St=N.progress),St<0?St=0:St>1&&(St=1),N.delay==null){var Et=N.startPosition,Nt=N.position;if(Nt&&L&&!y.locked()){var Pt={};X8(Et.x,Nt.x)&&(Pt.x=h6(Et.x,Nt.x,St,_t)),X8(Et.y,Nt.y)&&(Pt.y=h6(Et.y,Nt.y,St,_t)),y.position(Pt)}var qt=N.startPan,re=N.pan,ee=O.pan,Ut=re!=null&&C;Ut&&(X8(qt.x,re.x)&&(ee.x=h6(qt.x,re.x,St,_t)),X8(qt.y,re.y)&&(ee.y=h6(qt.y,re.y,St,_t)),y.emit("pan"));var de=N.startZoom,Yt=N.zoom,Ee=Yt!=null&&C;Ee&&(X8(de,Yt)&&(O.zoom=P8(O.minZoom,h6(de,Yt,St,_t),O.maxZoom)),y.emit("zoom")),(Ut||Ee)&&y.emit("viewport");var Te=N.style;if(Te&&Te.length>0&&L){for(var ie=0;ie<Te.length;ie++){var ze=Te[ie],me=ze.name,yn=ze,nn=N.startStyle[me],qe=W.properties[nn.name],Tn=h6(nn,yn,St,_t,qe);W.overrideBypass(y,me,Tn)}y.emit("style")}}return N.progress=St,St}function X8(y,p){return y==null||p==null?!1:Q(y)&&Q(p)?!0:!!(y&&p)}function uet(y,p,x,C){var L=p._private;L.started=!0,L.startTime=x-L.progress*L.duration}function aj(y,p){var x=p._private.aniEles,C=[];function L(W,Z){var st=W._private,bt=st.animation.current,pt=st.animation.queue,_t=!1;if(bt.length===0){var St=pt.shift();St&&bt.push(St)}for(var Et=function(ee){for(var Ut=ee.length-1;Ut>=0;Ut--){var de=ee[Ut];de()}ee.splice(0,ee.length)},Nt=bt.length-1;Nt>=0;Nt--){var Pt=bt[Nt],qt=Pt._private;if(qt.stopped){bt.splice(Nt,1),qt.hooked=!1,qt.playing=!1,qt.started=!1,Et(qt.frames);continue}!qt.playing&&!qt.applying||(qt.playing&&qt.applying&&(qt.applying=!1),qt.started||uet(W,Pt,y),cet(W,Pt,y,Z),qt.applying&&(qt.applying=!1),Et(qt.frames),qt.step!=null&&qt.step(y),Pt.completed()&&(bt.splice(Nt,1),qt.hooked=!1,qt.playing=!1,qt.started=!1,Et(qt.completes)),_t=!0)}return!Z&&bt.length===0&&pt.length===0&&C.push(W),_t}for(var O=!1,N=0;N<x.length;N++){var j=x[N],H=L(j);O=O||H}var q=L(p,!0);(O||q)&&(x.length>0?p.notify("draw",x):p.notify("draw")),x.unmerge(C),p.emit("step")}var het={animate:Kc.animate(),animation:Kc.animation(),animated:Kc.animated(),clearQueue:Kc.clearQueue(),delay:Kc.delay(),delayAnimation:Kc.delayAnimation(),stop:Kc.stop(),addToAnimationPool:function(p){var x=this;x.styleEnabled()&&x._private.aniEles.merge(p)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var p=this;if(p._private.animationsRunning=!0,!p.styleEnabled())return;function x(){p._private.animationsRunning&&g1(function(O){aj(O,p),x()})}var C=p.renderer();C&&C.beforeRender?C.beforeRender(function(O,N){aj(N,p)},C.beforeRenderPriorities.animations):x()}},fet={qualifierCompare:function(p,x){return p==null||x==null?p==null&&x==null:p.sameText(x)},eventMatches:function(p,x,C){var L=x.qualifier;return L!=null?p!==C.target&&V(C.target)&&L.matches(C.target):!0},addEventFields:function(p,x){x.cy=p,x.target=p},callbackContext:function(p,x,C){return x.qualifier!=null?C.target:p}},xC=function(p){return mt(p)?new ly(p):p},oj={createEmitter:function(){var p=this._private;return p.emitter||(p.emitter=new dC(fet,this)),this},emitter:function(){return this._private.emitter},on:function(p,x,C){return this.emitter().on(p,xC(x),C),this},removeListener:function(p,x,C){return this.emitter().removeListener(p,xC(x),C),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(p,x,C){return this.emitter().one(p,xC(x),C),this},once:function(p,x,C){return this.emitter().one(p,xC(x),C),this},emit:function(p,x){return this.emitter().emit(p,x),this},emitAndNotify:function(p,x){return this.emit(p),this.notify(p,x),this}};Kc.eventAliasesOn(oj);var hM={png:function(p){var x=this._private.renderer;return p=p||{},x.png(p)},jpg:function(p){var x=this._private.renderer;return p=p||{},p.bg=p.bg||"#fff",x.jpg(p)}};hM.jpeg=hM.jpg;var kC={layout:function(p){var x=this;if(p==null){$l("Layout options must be specified to make a layout");return}if(p.name==null){$l("A `name` must be specified to make a layout");return}var C=p.name,L=x.extension("layout",C);if(L==null){$l("No such layout `"+C+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var O;mt(p.eles)?O=x.$(p.eles):O=p.eles!=null?p.eles:x.$();var N=new L(we({},p,{cy:x,eles:O}));return N}};kC.createLayout=kC.makeLayout=kC.layout;var det={notify:function(p,x){var C=this._private;if(this.batching()){C.batchNotifications=C.batchNotifications||{};var L=C.batchNotifications[p]=C.batchNotifications[p]||this.collection();x!=null&&L.merge(x);return}if(C.notificationsEnabled){var O=this.renderer();this.destroyed()||!O||O.notify(p,x)}},notifications:function(p){var x=this._private;return p===void 0?x.notificationsEnabled:(x.notificationsEnabled=!!p,this)},noNotifications:function(p){this.notifications(!1),p(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var p=this._private;return p.batchCount==null&&(p.batchCount=0),p.batchCount===0&&(p.batchStyleEles=this.collection(),p.batchNotifications={}),p.batchCount++,this},endBatch:function(){var p=this._private;if(p.batchCount===0)return this;if(p.batchCount--,p.batchCount===0){p.batchStyleEles.updateStyle();var x=this.renderer();Object.keys(p.batchNotifications).forEach(function(C){var L=p.batchNotifications[C];L.empty()?x.notify(C):x.notify(C,L)})}return this},batch:function(p){return this.startBatch(),p(),this.endBatch(),this},batchData:function(p){var x=this;return this.batch(function(){for(var C=Object.keys(p),L=0;L<C.length;L++){var O=C[L],N=p[O],j=x.getElementById(O);j.data(N)}})}},get=p1({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),fM={renderTo:function(p,x,C,L){var O=this._private.renderer;return O.renderTo(p,x,C,L),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(p){var x=this,C=x.extension("renderer",p.name);if(C==null){$l("Can not initialise: No such renderer `".concat(p.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}p.wheelSensitivity!==void 0&&Gc("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var L=get(p);L.cy=x,x._private.renderer=new C(L),this.notify("init")},destroyRenderer:function(){var p=this;p.notify("destroy");var x=p.container();if(x)for(x._cyreg=null;x.childNodes.length>0;)x.removeChild(x.childNodes[0]);p._private.renderer=null,p.mutableElements().forEach(function(C){var L=C._private;L.rscratch={},L.rstyle={},L.animation.current=[],L.animation.queue=[]})},onRender:function(p){return this.on("render",p)},offRender:function(p){return this.off("render",p)}};fM.invalidateDimensions=fM.resize;var EC={collection:function(p,x){return mt(p)?this.$(p):yt(p)?p.collection():rt(p)?(x||(x={}),new w1(this,p,x.unique,x.removed)):new w1(this)},nodes:function(p){var x=this.$(function(C){return C.isNode()});return p?x.filter(p):x},edges:function(p){var x=this.$(function(C){return C.isEdge()});return p?x.filter(p):x},$:function(p){var x=this._private.elements;return p?x.filter(p):x.spawnSelf()},mutableElements:function(){return this._private.elements}};EC.elements=EC.filter=EC.$;var W1={},Q8="t",pet="f";W1.apply=function(y){for(var p=this,x=p._private,C=x.cy,L=C.collection(),O=0;O<y.length;O++){var N=y[O],j=p.getContextMeta(N);if(!j.empty){var H=p.getContextStyle(j),q=p.applyContextStyle(j,H,N);N._private.appliedInitStyle?p.updateTransitions(N,q.diffProps):N._private.appliedInitStyle=!0;var W=p.updateStyleHints(N);W&&L.push(N)}}return L},W1.getPropertiesDiff=function(y,p){var x=this,C=x._private.propDiffs=x._private.propDiffs||{},L=y+"-"+p,O=C[L];if(O)return O;for(var N=[],j={},H=0;H<x.length;H++){var q=x[H],W=y[H]===Q8,Z=p[H]===Q8,st=W!==Z,bt=q.mappedProperties.length>0;if(st||Z&&bt){var pt=void 0;st&&bt||st?pt=q.properties:bt&&(pt=q.mappedProperties);for(var _t=0;_t<pt.length;_t++){for(var St=pt[_t],Et=St.name,Nt=!1,Pt=H+1;Pt<x.length;Pt++){var qt=x[Pt],re=p[Pt]===Q8;if(re&&(Nt=qt.properties[St.name]!=null,Nt))break}!j[Et]&&!Nt&&(j[Et]=!0,N.push(Et))}}}return C[L]=N,N},W1.getContextMeta=function(y){for(var p=this,x="",C,L=y._private.styleCxtKey||"",O=0;O<p.length;O++){var N=p[O],j=N.selector&&N.selector.matches(y);j?x+=Q8:x+=pet}return C=p.getPropertiesDiff(L,x),y._private.styleCxtKey=x,{key:x,diffPropNames:C,empty:C.length===0}},W1.getContextStyle=function(y){var p=y.key,x=this,C=this._private.contextStyles=this._private.contextStyles||{};if(C[p])return C[p];for(var L={_private:{key:p}},O=0;O<x.length;O++){var N=x[O],j=p[O]===Q8;if(j)for(var H=0;H<N.properties.length;H++){var q=N.properties[H];L[q.name]=q}}return C[p]=L,L},W1.applyContextStyle=function(y,p,x){for(var C=this,L=y.diffPropNames,O={},N=C.types,j=0;j<L.length;j++){var H=L[j],q=p[H],W=x.pstyle(H);if(!q)if(W)W.bypass?q={name:H,deleteBypassed:!0}:q={name:H,delete:!0};else continue;if(W!==q){if(q.mapped===N.fn&&W!=null&&W.mapping!=null&&W.mapping.value===q.value){var Z=W.mapping,st=Z.fnValue=q.value(x);if(st===Z.prevFnValue)continue}var bt=O[H]={prev:W};C.applyParsedProperty(x,q),bt.next=x.pstyle(H),bt.next&&bt.next.bypass&&(bt.next=bt.next.bypassed)}}return{diffProps:O}},W1.updateStyleHints=function(y){var p=y._private,x=this,C=x.propertyGroupNames,L=x.propertyGroupKeys,O=function(gi,ss,na){return x.getPropertiesHash(gi,ss,na)},N=p.styleKey;if(y.removed())return!1;var j=p.group==="nodes",H=y._private.style;C=Object.keys(H);for(var q=0;q<L.length;q++){var W=L[q];p.styleKeys[W]=[sy,g4]}for(var Z=function(gi,ss){return p.styleKeys[ss][0]=fg(gi,p.styleKeys[ss][0])},st=function(gi,ss){return p.styleKeys[ss][1]=O2(gi,p.styleKeys[ss][1])},bt=function(gi,ss){Z(gi,ss),st(gi,ss)},pt=function(gi,ss){for(var na=0;na<gi.length;na++){var vi=gi.charCodeAt(na);Z(vi,ss),st(vi,ss)}},_t=2e9,St=function(gi){return-128<gi&&gi<128&&Math.floor(gi)!==gi?_t-(gi*1024|0):gi},Et=0;Et<C.length;Et++){var Nt=C[Et],Pt=H[Nt];if(Pt!=null){var qt=this.properties[Nt],re=qt.type,ee=qt.groupKey,Ut=void 0;qt.hashOverride!=null?Ut=qt.hashOverride(y,Pt):Pt.pfValue!=null&&(Ut=Pt.pfValue);var de=qt.enums==null?Pt.value:null,Yt=Ut!=null,Ee=de!=null,Te=Yt||Ee,ie=Pt.units;if(re.number&&Te&&!re.multiple){var ze=Yt?Ut:de;bt(St(ze),ee),!Yt&&ie!=null&&pt(ie,ee)}else pt(Pt.strValue,ee)}}for(var me=[sy,g4],yn=0;yn<L.length;yn++){var nn=L[yn],qe=p.styleKeys[nn];me[0]=fg(qe[0],me[0]),me[1]=O2(qe[1],me[1])}p.styleKey=M8(me[0],me[1]);var Tn=p.styleKeys;p.labelDimsKey=N2(Tn.labelDimensions);var Xn=O(y,["label"],Tn.labelDimensions);if(p.labelKey=N2(Xn),p.labelStyleKey=N2(p4(Tn.commonLabel,Xn)),!j){var lr=O(y,["source-label"],Tn.labelDimensions);p.sourceLabelKey=N2(lr),p.sourceLabelStyleKey=N2(p4(Tn.commonLabel,lr));var Sn=O(y,["target-label"],Tn.labelDimensions);p.targetLabelKey=N2(Sn),p.targetLabelStyleKey=N2(p4(Tn.commonLabel,Sn))}if(j){var or=p.styleKeys,pr=or.nodeBody,kr=or.nodeBorder,wr=or.nodeOutline,Cr=or.backgroundImage,$n=or.compound,cr=or.pie,mr=[pr,kr,wr,Cr,$n,cr].filter(function(Sr){return Sr!=null}).reduce(p4,[sy,g4]);p.nodeKey=N2(mr),p.hasPie=cr!=null&&cr[0]!==sy&&cr[1]!==g4}return N!==p.styleKey},W1.clearStyleHints=function(y){var p=y._private;p.styleCxtKey="",p.styleKeys={},p.styleKey=null,p.labelKey=null,p.labelStyleKey=null,p.sourceLabelKey=null,p.sourceLabelStyleKey=null,p.targetLabelKey=null,p.targetLabelStyleKey=null,p.nodeKey=null,p.hasPie=null},W1.applyParsedProperty=function(y,p){var x=this,C=p,L=y._private.style,O,N=x.types,j=x.properties[C.name].type,H=C.bypass,q=L[C.name],W=q&&q.bypass,Z=y._private,st="mapping",bt=function(pr){return pr==null?null:pr.pfValue!=null?pr.pfValue:pr.value},pt=function(){var pr=bt(q),kr=bt(C);x.checkTriggers(y,C.name,pr,kr)};if(p.name==="curve-style"&&y.isEdge()&&(p.value!=="bezier"&&y.isLoop()||p.value==="haystack"&&(y.source().isParent()||y.target().isParent()))&&(C=p=this.parse(p.name,"bezier",H)),C.delete)return L[C.name]=void 0,pt(),!0;if(C.deleteBypassed)return q?q.bypass?(q.bypassed=void 0,pt(),!0):!1:(pt(),!0);if(C.deleteBypass)return q?q.bypass?(L[C.name]=q.bypassed,pt(),!0):!1:(pt(),!0);var _t=function(){Gc("Do not assign mappings to elements without corresponding data (i.e. ele `"+y.id()+"` has no mapping for property `"+C.name+"` with data field `"+C.field+"`); try a `["+C.field+"]` selector to limit scope to elements with `"+C.field+"` defined")};switch(C.mapped){case N.mapData:{for(var St=C.field.split("."),Et=Z.data,Nt=0;Nt<St.length&&Et;Nt++){var Pt=St[Nt];Et=Et[Pt]}if(Et==null)return _t(),!1;var qt;if(Q(Et)){var re=C.fieldMax-C.fieldMin;re===0?qt=0:qt=(Et-C.fieldMin)/re}else return Gc("Do not use continuous mappers without specifying numeric data (i.e. `"+C.field+": "+Et+"` for `"+y.id()+"` is non-numeric)"),!1;if(qt<0?qt=0:qt>1&&(qt=1),j.color){var ee=C.valueMin[0],Ut=C.valueMax[0],de=C.valueMin[1],Yt=C.valueMax[1],Ee=C.valueMin[2],Te=C.valueMax[2],ie=C.valueMin[3]==null?1:C.valueMin[3],ze=C.valueMax[3]==null?1:C.valueMax[3],me=[Math.round(ee+(Ut-ee)*qt),Math.round(de+(Yt-de)*qt),Math.round(Ee+(Te-Ee)*qt),Math.round(ie+(ze-ie)*qt)];O={bypass:C.bypass,name:C.name,value:me,strValue:"rgb("+me[0]+", "+me[1]+", "+me[2]+")"}}else if(j.number){var yn=C.valueMin+(C.valueMax-C.valueMin)*qt;O=this.parse(C.name,yn,C.bypass,st)}else return!1;if(!O)return _t(),!1;O.mapping=C,C=O;break}case N.data:{for(var nn=C.field.split("."),qe=Z.data,Tn=0;Tn<nn.length&&qe;Tn++){var Xn=nn[Tn];qe=qe[Xn]}if(qe!=null&&(O=this.parse(C.name,qe,C.bypass,st)),!O)return _t(),!1;O.mapping=C,C=O;break}case N.fn:{var lr=C.value,Sn=C.fnValue!=null?C.fnValue:lr(y);if(C.prevFnValue=Sn,Sn==null)return Gc("Custom function mappers may not return null (i.e. `"+C.name+"` for ele `"+y.id()+"` is null)"),!1;if(O=this.parse(C.name,Sn,C.bypass,st),!O)return Gc("Custom function mappers may not return invalid values for the property type (i.e. `"+C.name+"` for ele `"+y.id()+"` is invalid)"),!1;O.mapping=P2(C),C=O;break}case void 0:break;default:return!1}return H?(W?C.bypassed=q.bypassed:C.bypassed=q,L[C.name]=C):W?q.bypassed=C:L[C.name]=C,pt(),!0},W1.cleanElements=function(y,p){for(var x=0;x<y.length;x++){var C=y[x];if(this.clearStyleHints(C),C.dirtyCompoundBoundsCache(),C.dirtyBoundingBoxCache(),!p)C._private.style={};else for(var L=C._private.style,O=Object.keys(L),N=0;N<O.length;N++){var j=O[N],H=L[j];H!=null&&(H.bypass?H.bypassed=null:L[j]=null)}}},W1.update=function(){var y=this._private.cy,p=y.mutableElements();p.updateStyle()},W1.updateTransitions=function(y,p){var x=this,C=y._private,L=y.pstyle("transition-property").value,O=y.pstyle("transition-duration").pfValue,N=y.pstyle("transition-delay").pfValue;if(L.length>0&&O>0){for(var j={},H=!1,q=0;q<L.length;q++){var W=L[q],Z=y.pstyle(W),st=p[W];if(st){var bt=st.prev,pt=bt,_t=st.next!=null?st.next:Z,St=!1,Et=void 0,Nt=1e-6;pt&&(Q(pt.pfValue)&&Q(_t.pfValue)?(St=_t.pfValue-pt.pfValue,Et=pt.pfValue+Nt*St):Q(pt.value)&&Q(_t.value)?(St=_t.value-pt.value,Et=pt.value+Nt*St):rt(pt.value)&&rt(_t.value)&&(St=pt.value[0]!==_t.value[0]||pt.value[1]!==_t.value[1]||pt.value[2]!==_t.value[2],Et=pt.strValue),St&&(j[W]=_t.strValue,this.applyBypass(y,W,Et),H=!0))}}if(!H)return;C.transitioning=!0,new e6(function(Pt){N>0?y.delayAnimation(N).play().promise().then(Pt):Pt()}).then(function(){return y.animation({style:j,duration:O,easing:y.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){x.removeBypasses(y,L),y.emitAndNotify("style"),C.transitioning=!1})}else C.transitioning&&(this.removeBypasses(y,L),y.emitAndNotify("style"),C.transitioning=!1)},W1.checkTrigger=function(y,p,x,C,L,O){var N=this.properties[p],j=L(N);j!=null&&j(x,C)&&O(N)},W1.checkZOrderTrigger=function(y,p,x,C){var L=this;this.checkTrigger(y,p,x,C,function(O){return O.triggersZOrder},function(){L._private.cy.notify("zorder",y)})},W1.checkBoundsTrigger=function(y,p,x,C){this.checkTrigger(y,p,x,C,function(L){return L.triggersBounds},function(L){y.dirtyCompoundBoundsCache(),y.dirtyBoundingBoxCache(),L.triggersBoundsOfParallelBeziers&&p==="curve-style"&&(x==="bezier"||C==="bezier")&&y.parallelEdges().forEach(function(O){O.isBundledBezier()&&O.dirtyBoundingBoxCache()}),L.triggersBoundsOfConnectedEdges&&p==="display"&&(x==="none"||C==="none")&&y.connectedEdges().forEach(function(O){O.dirtyBoundingBoxCache()})})},W1.checkTriggers=function(y,p,x,C){y.dirtyStyleCache(),this.checkZOrderTrigger(y,p,x,C),this.checkBoundsTrigger(y,p,x,C)};var J8={};J8.applyBypass=function(y,p,x,C){var L=this,O=[],N=!0;if(p==="*"||p==="**"){if(x!==void 0)for(var j=0;j<L.properties.length;j++){var H=L.properties[j],q=H.name,W=this.parse(q,x,!0);W&&O.push(W)}}else if(mt(p)){var Z=this.parse(p,x,!0);Z&&O.push(Z)}else if(it(p)){var st=p;C=x;for(var bt=Object.keys(st),pt=0;pt<bt.length;pt++){var _t=bt[pt],St=st[_t];if(St===void 0&&(St=st[Ae(_t)]),St!==void 0){var Et=this.parse(_t,St,!0);Et&&O.push(Et)}}}else return!1;if(O.length===0)return!1;for(var Nt=!1,Pt=0;Pt<y.length;Pt++){for(var qt=y[Pt],re={},ee=void 0,Ut=0;Ut<O.length;Ut++){var de=O[Ut];if(C){var Yt=qt.pstyle(de.name);ee=re[de.name]={prev:Yt}}Nt=this.applyParsedProperty(qt,P2(de))||Nt,C&&(ee.next=qt.pstyle(de.name))}Nt&&this.updateStyleHints(qt),C&&this.updateTransitions(qt,re,N)}return Nt},J8.overrideBypass=function(y,p,x){p=pn(p);for(var C=0;C<y.length;C++){var L=y[C],O=L._private.style[p],N=this.properties[p].type,j=N.color,H=N.mutiple,q=O?O.pfValue!=null?O.pfValue:O.value:null;!O||!O.bypass?this.applyBypass(L,p,x):(O.value=x,O.pfValue!=null&&(O.pfValue=x),j?O.strValue="rgb("+x.join(",")+")":H?O.strValue=x.join(" "):O.strValue=""+x,this.updateStyleHints(L)),this.checkTriggers(L,p,q,x)}},J8.removeAllBypasses=function(y,p){return this.removeBypasses(y,this.propertyNames,p)},J8.removeBypasses=function(y,p,x){for(var C=!0,L=0;L<y.length;L++){for(var O=y[L],N={},j=0;j<p.length;j++){var H=p[j],q=this.properties[H],W=O.pstyle(q.name);if(!(!W||!W.bypass)){var Z="",st=this.parse(H,Z,!0),bt=N[q.name]={prev:W};this.applyParsedProperty(O,st),bt.next=O.pstyle(q.name)}}this.updateStyleHints(O),x&&this.updateTransitions(O,N,C)}};var dM={};dM.getEmSizeInPixels=function(){var y=this.containerCss("font-size");return y!=null?parseFloat(y):1},dM.containerCss=function(y){var p=this._private.cy,x=p.container(),C=p.window();if(C&&x&&C.getComputedStyle)return C.getComputedStyle(x).getPropertyValue(y)};var R2={};R2.getRenderedStyle=function(y,p){return p?this.getStylePropertyValue(y,p,!0):this.getRawStyle(y,!0)},R2.getRawStyle=function(y,p){var x=this;if(y=y[0],y){for(var C={},L=0;L<x.properties.length;L++){var O=x.properties[L],N=x.getStylePropertyValue(y,O.name,p);N!=null&&(C[O.name]=N,C[Ae(O.name)]=N)}return C}},R2.getIndexedStyle=function(y,p,x,C){var L=y.pstyle(p)[x][C];return L??y.cy().style().getDefaultProperty(p)[x][0]},R2.getStylePropertyValue=function(y,p,x){var C=this;if(y=y[0],y){var L=C.properties[p];L.alias&&(L=L.pointsTo);var O=L.type,N=y.pstyle(L.name);if(N){var j=N.value,H=N.units,q=N.strValue;if(x&&O.number&&j!=null&&Q(j)){var W=y.cy().zoom(),Z=function(St){return St*W},st=function(St,Et){return Z(St)+Et},bt=rt(j),pt=bt?H.every(function(_t){return _t!=null}):H!=null;return pt?bt?j.map(function(_t,St){return st(_t,H[St])}).join(" "):st(j,H):bt?j.map(function(_t){return mt(_t)?_t:""+Z(_t)}).join(" "):""+Z(j)}else if(q!=null)return q}return null}},R2.getAnimationStartStyle=function(y,p){for(var x={},C=0;C<p.length;C++){var L=p[C],O=L.name,N=y.pstyle(O);N!==void 0&&(it(N)?N=this.parse(O,N.strValue):N=this.parse(O,N)),N&&(x[O]=N)}return x},R2.getPropsList=function(y){var p=this,x=[],C=y,L=p.properties;if(C)for(var O=Object.keys(C),N=0;N<O.length;N++){var j=O[N],H=C[j],q=L[j]||L[pn(j)],W=this.parse(q.name,H);W&&x.push(W)}return x},R2.getNonDefaultPropertiesHash=function(y,p,x){var C=x.slice(),L,O,N,j,H,q;for(H=0;H<p.length;H++)if(L=p[H],O=y.pstyle(L,!1),O!=null)if(O.pfValue!=null)C[0]=fg(j,C[0]),C[1]=O2(j,C[1]);else for(N=O.strValue,q=0;q<N.length;q++)j=N.charCodeAt(q),C[0]=fg(j,C[0]),C[1]=O2(j,C[1]);return C},R2.getPropertiesHash=R2.getNonDefaultPropertiesHash;var TC={};TC.appendFromJson=function(y){for(var p=this,x=0;x<y.length;x++){var C=y[x],L=C.selector,O=C.style||C.css,N=Object.keys(O);p.selector(L);for(var j=0;j<N.length;j++){var H=N[j],q=O[H];p.css(H,q)}}return p},TC.fromJson=function(y){var p=this;return p.resetToDefault(),p.appendFromJson(y),p},TC.json=function(){for(var y=[],p=this.defaultLength;p<this.length;p++){for(var x=this[p],C=x.selector,L=x.properties,O={},N=0;N<L.length;N++){var j=L[N];O[j.name]=j.strValue}y.push({selector:C?C.toString():"core",style:O})}return y};var gM={};gM.appendFromString=function(y){var p=this,x=this,C=""+y,L,O,N;C=C.replace(/[/][*](\s|.)+?[*][/]/g,"");function j(){C.length>L.length?C=C.substr(L.length):C=""}function H(){O.length>N.length?O=O.substr(N.length):O=""}for(;;){var q=C.match(/^\s*$/);if(q)break;var W=C.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!W){Gc("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+C);break}L=W[0];var Z=W[1];if(Z!=="core"){var st=new ly(Z);if(st.invalid){Gc("Skipping parsing of block: Invalid selector found in string stylesheet: "+Z),j();continue}}var bt=W[2],pt=!1;O=bt;for(var _t=[];;){var St=O.match(/^\s*$/);if(St)break;var Et=O.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!Et){Gc("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+bt),pt=!0;break}N=Et[0];var Nt=Et[1],Pt=Et[2],qt=p.properties[Nt];if(!qt){Gc("Skipping property: Invalid property name in: "+N),H();continue}var re=x.parse(Nt,Pt);if(!re){Gc("Skipping property: Invalid property definition in: "+N),H();continue}_t.push({name:Nt,val:Pt}),H()}if(pt){j();break}x.selector(Z);for(var ee=0;ee<_t.length;ee++){var Ut=_t[ee];x.css(Ut.name,Ut.val)}j()}return x},gM.fromString=function(y){var p=this;return p.resetToDefault(),p.appendFromString(y),p};var m1={};(function(){var y=sn,p=Ne,x=_e,C=xe,L=Mn,O=function(mr){return"^"+mr+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},N=function(mr){var Sr=y+"|\\w+|"+p+"|"+x+"|"+C+"|"+L;return"^"+mr+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+y+")\\s*\\,\\s*("+y+")\\s*,\\s*("+Sr+")\\s*\\,\\s*("+Sr+")\\)$"},j=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];m1.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:O("data")},layoutData:{mapping:!0,regex:O("layoutData")},scratch:{mapping:!0,regex:O("scratch")},mapData:{mapping:!0,regex:N("mapData")},mapLayoutData:{mapping:!0,regex:N("mapLayoutData")},mapScratch:{mapping:!0,regex:N("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:j,singleRegexMatchValue:!0},urls:{regexes:j,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(mr,Sr){switch(mr.length){case 2:return Sr[0]!=="deg"&&Sr[0]!=="rad"&&Sr[1]!=="deg"&&Sr[1]!=="rad";case 1:return mt(mr[0])||Sr[0]==="deg"||Sr[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+y+")\\s*,\\s*("+y+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+y+")\\s*,\\s*("+y+")\\s*,\\s*("+y+")\\s*,\\s*("+y+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(mr){var Sr=mr.length;return Sr===1||Sr===2||Sr===4}}};var H={zeroNonZero:function(mr,Sr){return(mr==null||Sr==null)&&mr!==Sr||mr==0&&Sr!=0?!0:mr!=0&&Sr==0},any:function(mr,Sr){return mr!=Sr},emptyNonEmpty:function(mr,Sr){var gi=Ft(mr),ss=Ft(Sr);return gi&&!ss||!gi&&ss}},q=m1.types,W=[{name:"label",type:q.text,triggersBounds:H.any,triggersZOrder:H.emptyNonEmpty},{name:"text-rotation",type:q.textRotation,triggersBounds:H.any},{name:"text-margin-x",type:q.bidirectionalSize,triggersBounds:H.any},{name:"text-margin-y",type:q.bidirectionalSize,triggersBounds:H.any}],Z=[{name:"source-label",type:q.text,triggersBounds:H.any},{name:"source-text-rotation",type:q.textRotation,triggersBounds:H.any},{name:"source-text-margin-x",type:q.bidirectionalSize,triggersBounds:H.any},{name:"source-text-margin-y",type:q.bidirectionalSize,triggersBounds:H.any},{name:"source-text-offset",type:q.size,triggersBounds:H.any}],st=[{name:"target-label",type:q.text,triggersBounds:H.any},{name:"target-text-rotation",type:q.textRotation,triggersBounds:H.any},{name:"target-text-margin-x",type:q.bidirectionalSize,triggersBounds:H.any},{name:"target-text-margin-y",type:q.bidirectionalSize,triggersBounds:H.any},{name:"target-text-offset",type:q.size,triggersBounds:H.any}],bt=[{name:"font-family",type:q.fontFamily,triggersBounds:H.any},{name:"font-style",type:q.fontStyle,triggersBounds:H.any},{name:"font-weight",type:q.fontWeight,triggersBounds:H.any},{name:"font-size",type:q.size,triggersBounds:H.any},{name:"text-transform",type:q.textTransform,triggersBounds:H.any},{name:"text-wrap",type:q.textWrap,triggersBounds:H.any},{name:"text-overflow-wrap",type:q.textOverflowWrap,triggersBounds:H.any},{name:"text-max-width",type:q.size,triggersBounds:H.any},{name:"text-outline-width",type:q.size,triggersBounds:H.any},{name:"line-height",type:q.positiveNumber,triggersBounds:H.any}],pt=[{name:"text-valign",type:q.valign,triggersBounds:H.any},{name:"text-halign",type:q.halign,triggersBounds:H.any},{name:"color",type:q.color},{name:"text-outline-color",type:q.color},{name:"text-outline-opacity",type:q.zeroOneNumber},{name:"text-background-color",type:q.color},{name:"text-background-opacity",type:q.zeroOneNumber},{name:"text-background-padding",type:q.size,triggersBounds:H.any},{name:"text-border-opacity",type:q.zeroOneNumber},{name:"text-border-color",type:q.color},{name:"text-border-width",type:q.size,triggersBounds:H.any},{name:"text-border-style",type:q.borderStyle,triggersBounds:H.any},{name:"text-background-shape",type:q.textBackgroundShape,triggersBounds:H.any},{name:"text-justification",type:q.justification}],_t=[{name:"events",type:q.bool,triggersZOrder:H.any},{name:"text-events",type:q.bool,triggersZOrder:H.any}],St=[{name:"display",type:q.display,triggersZOrder:H.any,triggersBounds:H.any,triggersBoundsOfConnectedEdges:!0},{name:"visibility",type:q.visibility,triggersZOrder:H.any},{name:"opacity",type:q.zeroOneNumber,triggersZOrder:H.zeroNonZero},{name:"text-opacity",type:q.zeroOneNumber},{name:"min-zoomed-font-size",type:q.size},{name:"z-compound-depth",type:q.zCompoundDepth,triggersZOrder:H.any},{name:"z-index-compare",type:q.zIndexCompare,triggersZOrder:H.any},{name:"z-index",type:q.number,triggersZOrder:H.any}],Et=[{name:"overlay-padding",type:q.size,triggersBounds:H.any},{name:"overlay-color",type:q.color},{name:"overlay-opacity",type:q.zeroOneNumber,triggersBounds:H.zeroNonZero},{name:"overlay-shape",type:q.overlayShape,triggersBounds:H.any}],Nt=[{name:"underlay-padding",type:q.size,triggersBounds:H.any},{name:"underlay-color",type:q.color},{name:"underlay-opacity",type:q.zeroOneNumber,triggersBounds:H.zeroNonZero},{name:"underlay-shape",type:q.overlayShape,triggersBounds:H.any}],Pt=[{name:"transition-property",type:q.propList},{name:"transition-duration",type:q.time},{name:"transition-delay",type:q.time},{name:"transition-timing-function",type:q.easing}],qt=function(mr,Sr){return Sr.value==="label"?-mr.poolIndex():Sr.pfValue},re=[{name:"height",type:q.nodeSize,triggersBounds:H.any,hashOverride:qt},{name:"width",type:q.nodeSize,triggersBounds:H.any,hashOverride:qt},{name:"shape",type:q.nodeShape,triggersBounds:H.any},{name:"shape-polygon-points",type:q.polygonPointList,triggersBounds:H.any},{name:"background-color",type:q.color},{name:"background-fill",type:q.fill},{name:"background-opacity",type:q.zeroOneNumber},{name:"background-blacken",type:q.nOneOneNumber},{name:"background-gradient-stop-colors",type:q.colors},{name:"background-gradient-stop-positions",type:q.percentages},{name:"background-gradient-direction",type:q.gradientDirection},{name:"padding",type:q.sizeMaybePercent,triggersBounds:H.any},{name:"padding-relative-to",type:q.paddingRelativeTo,triggersBounds:H.any},{name:"bounds-expansion",type:q.boundsExpansion,triggersBounds:H.any}],ee=[{name:"border-color",type:q.color},{name:"border-opacity",type:q.zeroOneNumber},{name:"border-width",type:q.size,triggersBounds:H.any},{name:"border-style",type:q.borderStyle}],Ut=[{name:"outline-color",type:q.color},{name:"outline-opacity",type:q.zeroOneNumber},{name:"outline-width",type:q.size,triggersBounds:H.any},{name:"outline-style",type:q.borderStyle},{name:"outline-offset",type:q.size,triggersBounds:H.any}],de=[{name:"background-image",type:q.urls},{name:"background-image-crossorigin",type:q.bgCrossOrigin},{name:"background-image-opacity",type:q.zeroOneNumbers},{name:"background-image-containment",type:q.bgContainment},{name:"background-image-smoothing",type:q.bools},{name:"background-position-x",type:q.bgPos},{name:"background-position-y",type:q.bgPos},{name:"background-width-relative-to",type:q.bgRelativeTo},{name:"background-height-relative-to",type:q.bgRelativeTo},{name:"background-repeat",type:q.bgRepeat},{name:"background-fit",type:q.bgFit},{name:"background-clip",type:q.bgClip},{name:"background-width",type:q.bgWH},{name:"background-height",type:q.bgWH},{name:"background-offset-x",type:q.bgPos},{name:"background-offset-y",type:q.bgPos}],Yt=[{name:"position",type:q.position,triggersBounds:H.any},{name:"compound-sizing-wrt-labels",type:q.compoundIncludeLabels,triggersBounds:H.any},{name:"min-width",type:q.size,triggersBounds:H.any},{name:"min-width-bias-left",type:q.sizeMaybePercent,triggersBounds:H.any},{name:"min-width-bias-right",type:q.sizeMaybePercent,triggersBounds:H.any},{name:"min-height",type:q.size,triggersBounds:H.any},{name:"min-height-bias-top",type:q.sizeMaybePercent,triggersBounds:H.any},{name:"min-height-bias-bottom",type:q.sizeMaybePercent,triggersBounds:H.any}],Ee=[{name:"line-style",type:q.lineStyle},{name:"line-color",type:q.color},{name:"line-fill",type:q.fill},{name:"line-cap",type:q.lineCap},{name:"line-opacity",type:q.zeroOneNumber},{name:"line-dash-pattern",type:q.numbers},{name:"line-dash-offset",type:q.number},{name:"line-gradient-stop-colors",type:q.colors},{name:"line-gradient-stop-positions",type:q.percentages},{name:"curve-style",type:q.curveStyle,triggersBounds:H.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:q.zeroOneNumber,triggersBounds:H.any},{name:"source-endpoint",type:q.edgeEndpoint,triggersBounds:H.any},{name:"target-endpoint",type:q.edgeEndpoint,triggersBounds:H.any},{name:"control-point-step-size",type:q.size,triggersBounds:H.any},{name:"control-point-distances",type:q.bidirectionalSizes,triggersBounds:H.any},{name:"control-point-weights",type:q.numbers,triggersBounds:H.any},{name:"segment-distances",type:q.bidirectionalSizes,triggersBounds:H.any},{name:"segment-weights",type:q.numbers,triggersBounds:H.any},{name:"taxi-turn",type:q.bidirectionalSizeMaybePercent,triggersBounds:H.any},{name:"taxi-turn-min-distance",type:q.size,triggersBounds:H.any},{name:"taxi-direction",type:q.axisDirection,triggersBounds:H.any},{name:"edge-distances",type:q.edgeDistances,triggersBounds:H.any},{name:"arrow-scale",type:q.positiveNumber,triggersBounds:H.any},{name:"loop-direction",type:q.angle,triggersBounds:H.any},{name:"loop-sweep",type:q.angle,triggersBounds:H.any},{name:"source-distance-from-node",type:q.size,triggersBounds:H.any},{name:"target-distance-from-node",type:q.size,triggersBounds:H.any}],Te=[{name:"ghost",type:q.bool,triggersBounds:H.any},{name:"ghost-offset-x",type:q.bidirectionalSize,triggersBounds:H.any},{name:"ghost-offset-y",type:q.bidirectionalSize,triggersBounds:H.any},{name:"ghost-opacity",type:q.zeroOneNumber}],ie=[{name:"selection-box-color",type:q.color},{name:"selection-box-opacity",type:q.zeroOneNumber},{name:"selection-box-border-color",type:q.color},{name:"selection-box-border-width",type:q.size},{name:"active-bg-color",type:q.color},{name:"active-bg-opacity",type:q.zeroOneNumber},{name:"active-bg-size",type:q.size},{name:"outside-texture-bg-color",type:q.color},{name:"outside-texture-bg-opacity",type:q.zeroOneNumber}],ze=[];m1.pieBackgroundN=16,ze.push({name:"pie-size",type:q.sizeMaybePercent});for(var me=1;me<=m1.pieBackgroundN;me++)ze.push({name:"pie-"+me+"-background-color",type:q.color}),ze.push({name:"pie-"+me+"-background-size",type:q.percent}),ze.push({name:"pie-"+me+"-background-opacity",type:q.zeroOneNumber});var yn=[],nn=m1.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:q.arrowShape,triggersBounds:H.any},{name:"arrow-color",type:q.color},{name:"arrow-fill",type:q.arrowFill},{name:"arrow-width",type:q.arrowWidth}].forEach(function(cr){nn.forEach(function(mr){var Sr=mr+"-"+cr.name,gi=cr.type,ss=cr.triggersBounds;yn.push({name:Sr,type:gi,triggersBounds:ss})})},{});var qe=m1.properties=[].concat(_t,Pt,St,Et,Nt,Te,pt,bt,W,Z,st,re,ee,Ut,de,ze,Yt,Ee,yn,ie),Tn=m1.propertyGroups={behavior:_t,transition:Pt,visibility:St,overlay:Et,underlay:Nt,ghost:Te,commonLabel:pt,labelDimensions:bt,mainLabel:W,sourceLabel:Z,targetLabel:st,nodeBody:re,nodeBorder:ee,nodeOutline:Ut,backgroundImage:de,pie:ze,compound:Yt,edgeLine:Ee,edgeArrow:yn,core:ie},Xn=m1.propertyGroupNames={},lr=m1.propertyGroupKeys=Object.keys(Tn);lr.forEach(function(cr){Xn[cr]=Tn[cr].map(function(mr){return mr.name}),Tn[cr].forEach(function(mr){return mr.groupKey=cr})});var Sn=m1.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];m1.propertyNames=qe.map(function(cr){return cr.name});for(var or=0;or<qe.length;or++){var pr=qe[or];qe[pr.name]=pr}for(var kr=0;kr<Sn.length;kr++){var wr=Sn[kr],Cr=qe[wr.pointsTo],$n={name:wr.name,alias:!0,pointsTo:Cr};qe.push($n),qe[wr.name]=$n}})(),m1.getDefaultProperty=function(y){return this.getDefaultProperties()[y]},m1.getDefaultProperties=function(){var y=this._private;if(y.defaultProperties!=null)return y.defaultProperties;for(var p=we({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(H,q){for(var W=1;W<=m1.pieBackgroundN;W++){var Z=q.name.replace("{{i}}",W),st=q.value;H[Z]=st}return H},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"taxi-turn":"50%","taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(H,q){return m1.arrowPrefixes.forEach(function(W){var Z=W+"-"+q.name,st=q.value;H[Z]=st}),H},{})),x={},C=0;C<this.properties.length;C++){var L=this.properties[C];if(!L.pointsTo){var O=L.name,N=p[O],j=this.parse(O,N);x[O]=j}}return y.defaultProperties=x,y.defaultProperties},m1.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var CC={};CC.parse=function(y,p,x,C){var L=this;if(ct(p))return L.parseImplWarn(y,p,x,C);var O=C==="mapping"||C===!0||C===!1||C==null?"dontcare":C,N=x?"t":"f",j=""+p,H=Pd(y,j,N,O),q=L.propCache=L.propCache||[],W;return(W=q[H])||(W=q[H]=L.parseImplWarn(y,p,x,C)),(x||C==="mapping")&&(W=P2(W),W&&(W.value=P2(W.value))),W},CC.parseImplWarn=function(y,p,x,C){var L=this.parseImpl(y,p,x,C);return!L&&p!=null&&Gc("The style property `".concat(y,": ").concat(p,"` is invalid")),L&&(L.name==="width"||L.name==="height")&&p==="label"&&Gc("The style value of `label` is deprecated for `"+L.name+"`"),L},CC.parseImpl=function(y,p,x,C){var L=this;y=pn(y);var O=L.properties[y],N=p,j=L.types;if(!O||p===void 0)return null;O.alias&&(O=O.pointsTo,y=O.name);var H=mt(p);H&&(p=p.trim());var q=O.type;if(!q)return null;if(x&&(p===""||p===null))return{name:y,value:p,bypass:!0,deleteBypass:!0};if(ct(p))return{name:y,value:p,strValue:"fn",mapped:j.fn,bypass:x};var W,Z;if(!(!H||C||p.length<7||p[1]!=="a")){if(p.length>=7&&p[0]==="d"&&(W=new RegExp(j.data.regex).exec(p))){if(x)return!1;var st=j.data;return{name:y,value:W,strValue:""+p,mapped:st,field:W[1],bypass:x}}else if(p.length>=10&&p[0]==="m"&&(Z=new RegExp(j.mapData.regex).exec(p))){if(x||q.multiple)return!1;var bt=j.mapData;if(!(q.color||q.number))return!1;var pt=this.parse(y,Z[4]);if(!pt||pt.mapped)return!1;var _t=this.parse(y,Z[5]);if(!_t||_t.mapped)return!1;if(pt.pfValue===_t.pfValue||pt.strValue===_t.strValue)return Gc("`"+y+": "+p+"` is not a valid mapper because the output range is zero; converting to `"+y+": "+pt.strValue+"`"),this.parse(y,pt.strValue);if(q.color){var St=pt.value,Et=_t.value,Nt=St[0]===Et[0]&&St[1]===Et[1]&&St[2]===Et[2]&&(St[3]===Et[3]||(St[3]==null||St[3]===1)&&(Et[3]==null||Et[3]===1));if(Nt)return!1}return{name:y,value:Z,strValue:""+p,mapped:bt,field:Z[1],fieldMin:parseFloat(Z[2]),fieldMax:parseFloat(Z[3]),valueMin:pt.value,valueMax:_t.value,bypass:x}}}if(q.multiple&&C!=="multiple"){var Pt;if(H?Pt=p.split(/\s+/):rt(p)?Pt=p:Pt=[p],q.evenMultiple&&Pt.length%2!==0)return null;for(var qt=[],re=[],ee=[],Ut="",de=!1,Yt=0;Yt<Pt.length;Yt++){var Ee=L.parse(y,Pt[Yt],x,"multiple");de=de||mt(Ee.value),qt.push(Ee.value),ee.push(Ee.pfValue!=null?Ee.pfValue:Ee.value),re.push(Ee.units),Ut+=(Yt>0?" ":"")+Ee.strValue}return q.validate&&!q.validate(qt,re)?null:q.singleEnum&&de?qt.length===1&&mt(qt[0])?{name:y,value:qt[0],strValue:qt[0],bypass:x}:null:{name:y,value:qt,pfValue:ee,strValue:Ut,bypass:x,units:re}}var Te=function(){for(var mr=0;mr<q.enums.length;mr++){var Sr=q.enums[mr];if(Sr===p)return{name:y,value:p,strValue:""+p,bypass:x}}return null};if(q.number){var ie,ze="px";if(q.units&&(ie=q.units),q.implicitUnits&&(ze=q.implicitUnits),!q.unitless)if(H){var me="px|em"+(q.allowPercent?"|\\%":"");ie&&(me=ie);var yn=p.match("^("+sn+")("+me+")?$");yn&&(p=yn[1],ie=yn[2]||ze)}else(!ie||q.implicitUnits)&&(ie=ze);if(p=parseFloat(p),isNaN(p)&&q.enums===void 0)return null;if(isNaN(p)&&q.enums!==void 0)return p=N,Te();if(q.integer&&!dt(p)||q.min!==void 0&&(p<q.min||q.strictMin&&p===q.min)||q.max!==void 0&&(p>q.max||q.strictMax&&p===q.max))return null;var nn={name:y,value:p,strValue:""+p+(ie||""),units:ie,bypass:x};return q.unitless||ie!=="px"&&ie!=="em"?nn.pfValue=p:nn.pfValue=ie==="px"||!ie?p:this.getEmSizeInPixels()*p,(ie==="ms"||ie==="s")&&(nn.pfValue=ie==="ms"?p:1e3*p),(ie==="deg"||ie==="rad")&&(nn.pfValue=ie==="rad"?p:lQ(p)),ie==="%"&&(nn.pfValue=p/100),nn}else if(q.propList){var qe=[],Tn=""+p;if(Tn!=="none"){for(var Xn=Tn.split(/\s*,\s*|\s+/),lr=0;lr<Xn.length;lr++){var Sn=Xn[lr].trim();L.properties[Sn]?qe.push(Sn):Gc("`"+Sn+"` is not a valid property name")}if(qe.length===0)return null}return{name:y,value:qe,strValue:qe.length===0?"none":qe.join(" "),bypass:x}}else if(q.color){var or=za(p);return or?{name:y,value:or,pfValue:or,strValue:"rgb("+or[0]+","+or[1]+","+or[2]+")",bypass:x}:null}else if(q.regex||q.regexes){if(q.enums){var pr=Te();if(pr)return pr}for(var kr=q.regexes?q.regexes:[q.regex],wr=0;wr<kr.length;wr++){var Cr=new RegExp(kr[wr]),$n=Cr.exec(p);if($n)return{name:y,value:q.singleRegexMatchValue?$n[1]:$n,strValue:""+p,bypass:x}}return null}else return q.string?{name:y,value:""+p,strValue:""+p,bypass:x}:q.enums?Te():null};var Y1=function y(p){if(!(this instanceof y))return new y(p);if(!It(p)){$l("A style must have a core reference");return}this._private={cy:p,coreStyle:{}},this.length=0,this.resetToDefault()},X1=Y1.prototype;X1.instanceString=function(){return"style"},X1.clear=function(){for(var y=this._private,p=y.cy,x=p.elements(),C=0;C<this.length;C++)this[C]=void 0;return this.length=0,y.contextStyles={},y.propDiffs={},this.cleanElements(x,!0),x.forEach(function(L){var O=L[0]._private;O.styleDirty=!0,O.appliedInitStyle=!1}),this},X1.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},X1.core=function(y){return this._private.coreStyle[y]||this.getDefaultProperty(y)},X1.selector=function(y){var p=y==="core"?null:new ly(y),x=this.length++;return this[x]={selector:p,properties:[],mappedProperties:[],index:x},this},X1.css=function(){var y=this,p=arguments;if(p.length===1)for(var x=p[0],C=0;C<y.properties.length;C++){var L=y.properties[C],O=x[L.name];O===void 0&&(O=x[Ae(L.name)]),O!==void 0&&this.cssRule(L.name,O)}else p.length===2&&this.cssRule(p[0],p[1]);return this},X1.style=X1.css,X1.cssRule=function(y,p){var x=this.parse(y,p);if(x){var C=this.length-1;this[C].properties.push(x),this[C].properties[x.name]=x,x.name.match(/pie-(\d+)-background-size/)&&x.value&&(this._private.hasPie=!0),x.mapped&&this[C].mappedProperties.push(x);var L=!this[C].selector;L&&(this._private.coreStyle[x.name]=x)}return this},X1.append=function(y){return jt(y)?y.appendToStyle(this):rt(y)?this.appendFromJson(y):mt(y)&&this.appendFromString(y),this},Y1.fromJson=function(y,p){var x=new Y1(y);return x.fromJson(p),x},Y1.fromString=function(y,p){return new Y1(y).fromString(p)},[W1,J8,dM,R2,TC,gM,m1,CC].forEach(function(y){we(X1,y)}),Y1.types=X1.types,Y1.properties=X1.properties,Y1.propertyGroups=X1.propertyGroups,Y1.propertyGroupNames=X1.propertyGroupNames,Y1.propertyGroupKeys=X1.propertyGroupKeys;var bet={style:function(p){if(p){var x=this.setStyle(p);x.update()}return this._private.style},setStyle:function(p){var x=this._private;return jt(p)?x.style=p.generateStyle(this):rt(p)?x.style=Y1.fromJson(this,p):mt(p)?x.style=Y1.fromString(this,p):x.style=Y1(this),x.style},updateStyle:function(){this.mutableElements().updateStyle()}},wet="single",T4={autolock:function(p){if(p!==void 0)this._private.autolock=!!p;else return this._private.autolock;return this},autoungrabify:function(p){if(p!==void 0)this._private.autoungrabify=!!p;else return this._private.autoungrabify;return this},autounselectify:function(p){if(p!==void 0)this._private.autounselectify=!!p;else return this._private.autounselectify;return this},selectionType:function(p){var x=this._private;if(x.selectionType==null&&(x.selectionType=wet),p!==void 0)(p==="additive"||p==="single")&&(x.selectionType=p);else return x.selectionType;return this},panningEnabled:function(p){if(p!==void 0)this._private.panningEnabled=!!p;else return this._private.panningEnabled;return this},userPanningEnabled:function(p){if(p!==void 0)this._private.userPanningEnabled=!!p;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(p){if(p!==void 0)this._private.zoomingEnabled=!!p;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(p){if(p!==void 0)this._private.userZoomingEnabled=!!p;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(p){if(p!==void 0)this._private.boxSelectionEnabled=!!p;else return this._private.boxSelectionEnabled;return this},pan:function(){var p=arguments,x=this._private.pan,C,L,O,N,j;switch(p.length){case 0:return x;case 1:if(mt(p[0]))return C=p[0],x[C];if(it(p[0])){if(!this._private.panningEnabled)return this;O=p[0],N=O.x,j=O.y,Q(N)&&(x.x=N),Q(j)&&(x.y=j),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;C=p[0],L=p[1],(C==="x"||C==="y")&&Q(L)&&(x[C]=L),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(p,x){var C=arguments,L=this._private.pan,O,N,j,H,q;if(!this._private.panningEnabled)return this;switch(C.length){case 1:it(p)&&(j=C[0],H=j.x,q=j.y,Q(H)&&(L.x+=H),Q(q)&&(L.y+=q),this.emit("pan viewport"));break;case 2:O=p,N=x,(O==="x"||O==="y")&&Q(N)&&(L[O]+=N),this.emit("pan viewport");break}return this.notify("viewport"),this},fit:function(p,x){var C=this.getFitViewport(p,x);if(C){var L=this._private;L.zoom=C.zoom,L.pan=C.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(p,x){if(Q(p)&&x===void 0&&(x=p,p=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var C;if(mt(p)){var L=p;p=this.$(L)}else if(kt(p)){var O=p;C={x1:O.x1,y1:O.y1,x2:O.x2,y2:O.y2},C.w=C.x2-C.x1,C.h=C.y2-C.y1}else yt(p)||(p=this.mutableElements());if(!(yt(p)&&p.empty())){C=C||p.boundingBox();var N=this.width(),j=this.height(),H;if(x=Q(x)?x:0,!isNaN(N)&&!isNaN(j)&&N>0&&j>0&&!isNaN(C.w)&&!isNaN(C.h)&&C.w>0&&C.h>0){H=Math.min((N-2*x)/C.w,(j-2*x)/C.h),H=H>this._private.maxZoom?this._private.maxZoom:H,H=H<this._private.minZoom?this._private.minZoom:H;var q={x:(N-H*(C.x1+C.x2))/2,y:(j-H*(C.y1+C.y2))/2};return{zoom:H,pan:q}}}}},zoomRange:function(p,x){var C=this._private;if(x==null){var L=p;p=L.min,x=L.max}return Q(p)&&Q(x)&&p<=x?(C.minZoom=p,C.maxZoom=x):Q(p)&&x===void 0&&p<=C.maxZoom?C.minZoom=p:Q(x)&&p===void 0&&x>=C.minZoom&&(C.maxZoom=x),this},minZoom:function(p){return p===void 0?this._private.minZoom:this.zoomRange({min:p})},maxZoom:function(p){return p===void 0?this._private.maxZoom:this.zoomRange({max:p})},getZoomedViewport:function(p){var x=this._private,C=x.pan,L=x.zoom,O,N,j=!1;if(x.zoomingEnabled||(j=!0),Q(p)?N=p:it(p)&&(N=p.level,p.position!=null?O=W9(p.position,L,C):p.renderedPosition!=null&&(O=p.renderedPosition),O!=null&&!x.panningEnabled&&(j=!0)),N=N>x.maxZoom?x.maxZoom:N,N=N<x.minZoom?x.minZoom:N,j||!Q(N)||N===L||O!=null&&(!Q(O.x)||!Q(O.y)))return null;if(O!=null){var H=C,q=L,W=N,Z={x:-W/q*(O.x-H.x)+O.x,y:-W/q*(O.y-H.y)+O.y};return{zoomed:!0,panned:!0,zoom:W,pan:Z}}else return{zoomed:!0,panned:!1,zoom:N,pan:C}},zoom:function(p){if(p===void 0)return this._private.zoom;var x=this.getZoomedViewport(p),C=this._private;return x==null||!x.zoomed?this:(C.zoom=x.zoom,x.panned&&(C.pan.x=x.pan.x,C.pan.y=x.pan.y),this.emit("zoom"+(x.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(p){var x=this._private,C=!0,L=!0,O=[],N=!1,j=!1;if(!p)return this;if(Q(p.zoom)||(C=!1),it(p.pan)||(L=!1),!C&&!L)return this;if(C){var H=p.zoom;H<x.minZoom||H>x.maxZoom||!x.zoomingEnabled?N=!0:(x.zoom=H,O.push("zoom"))}if(L&&(!N||!p.cancelOnFailedZoom)&&x.panningEnabled){var q=p.pan;Q(q.x)&&(x.pan.x=q.x,j=!1),Q(q.y)&&(x.pan.y=q.y,j=!1),j||O.push("pan")}return O.length>0&&(O.push("viewport"),this.emit(O.join(" ")),this.notify("viewport")),this},center:function(p){var x=this.getCenterPan(p);return x&&(this._private.pan=x,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(p,x){if(this._private.panningEnabled){if(mt(p)){var C=p;p=this.mutableElements().filter(C)}else yt(p)||(p=this.mutableElements());if(p.length!==0){var L=p.boundingBox(),O=this.width(),N=this.height();x=x===void 0?this._private.zoom:x;var j={x:(O-x*(L.x1+L.x2))/2,y:(N-x*(L.y1+L.y2))/2};return j}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var p=this._private,x=p.container,C=this;return p.sizeCache=p.sizeCache||(x?function(){var L=C.window().getComputedStyle(x),O=function(j){return parseFloat(L.getPropertyValue(j))};return{width:x.clientWidth-O("padding-left")-O("padding-right"),height:x.clientHeight-O("padding-top")-O("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var p=this._private.pan,x=this._private.zoom,C=this.renderedExtent(),L={x1:(C.x1-p.x)/x,x2:(C.x2-p.x)/x,y1:(C.y1-p.y)/x,y2:(C.y2-p.y)/x};return L.w=L.x2-L.x1,L.h=L.y2-L.y1,L},renderedExtent:function(){var p=this.width(),x=this.height();return{x1:0,y1:0,x2:p,y2:x,w:p,h:x}},multiClickDebounceTime:function(p){if(p)this._private.multiClickDebounceTime=p;else return this._private.multiClickDebounceTime;return this}};T4.centre=T4.center,T4.autolockNodes=T4.autolock,T4.autoungrabifyNodes=T4.autoungrabify;var Z8={data:Kc.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Kc.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Kc.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Kc.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Z8.attr=Z8.data,Z8.removeAttr=Z8.removeData;var tE=function(p){var x=this;p=we({},p);var C=p.container;C&&!K(C)&&K(C[0])&&(C=C[0]);var L=C?C._cyreg:null;L=L||{},L&&L.cy&&(L.cy.destroy(),L={});var O=L.readies=L.readies||[];C&&(C._cyreg=L),L.cy=x;var N=B!==void 0&&C!==void 0&&!p.headless,j=p;j.layout=we({name:N?"grid":"null"},j.layout),j.renderer=we({name:N?"canvas":"null"},j.renderer);var H=function(pt,_t,St){return _t!==void 0?_t:St!==void 0?St:pt},q=this._private={container:C,ready:!1,options:j,elements:new w1(this),listeners:[],aniEles:new w1(this),data:j.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:H(!0,j.zoomingEnabled),userZoomingEnabled:H(!0,j.userZoomingEnabled),panningEnabled:H(!0,j.panningEnabled),userPanningEnabled:H(!0,j.userPanningEnabled),boxSelectionEnabled:H(!0,j.boxSelectionEnabled),autolock:H(!1,j.autolock,j.autolockNodes),autoungrabify:H(!1,j.autoungrabify,j.autoungrabifyNodes),autounselectify:H(!1,j.autounselectify),styleEnabled:j.styleEnabled===void 0?N:j.styleEnabled,zoom:Q(j.zoom)?j.zoom:1,pan:{x:it(j.pan)&&Q(j.pan.x)?j.pan.x:0,y:it(j.pan)&&Q(j.pan.y)?j.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:H(250,j.multiClickDebounceTime)};this.createEmitter(),this.selectionType(j.selectionType),this.zoomRange({min:j.minZoom,max:j.maxZoom});var W=function(pt,_t){var St=pt.some(Gt);if(St)return e6.all(pt).then(_t);_t(pt)};q.styleEnabled&&x.setStyle([]);var Z=we({},j,j.renderer);x.initRenderer(Z);var st=function(pt,_t,St){x.notifications(!1);var Et=x.mutableElements();Et.length>0&&Et.remove(),pt!=null&&(it(pt)||rt(pt))&&x.add(pt),x.one("layoutready",function(Pt){x.notifications(!0),x.emit(Pt),x.one("load",_t),x.emitAndNotify("load")}).one("layoutstop",function(){x.one("done",St),x.emit("done")});var Nt=we({},x._private.options.layout);Nt.eles=x.elements(),x.layout(Nt).run()};W([j.style,j.elements],function(bt){var pt=bt[0],_t=bt[1];q.styleEnabled&&x.style().append(pt),st(_t,function(){x.startAnimationLoop(),q.ready=!0,ct(j.ready)&&x.on("ready",j.ready);for(var St=0;St<O.length;St++){var Et=O[St];x.on("ready",Et)}L&&(L.readies=[]),x.emit("ready")},j.done)})},SC=tE.prototype;we(SC,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(p){return this.isReady()?this.emitter().emit("ready",[],p):this.on("ready",p),this},destroy:function(){var p=this;if(!p.destroyed())return p.stopAnimationLoop(),p.destroyRenderer(),this.emit("destroy"),p._private.destroyed=!0,p},hasElementWithId:function(p){return this._private.elements.hasElementWithId(p)},getElementById:function(p){return this._private.elements.getElementById(p)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(p){return this._private.elements.merge(p),this},removeFromPool:function(p){return this._private.elements.unmerge(p),this},container:function(){return this._private.container||null},window:function(){var p=this._private.container;if(p==null)return B;var x=this._private.container.ownerDocument;return x===void 0||x==null?B:x.defaultView||B},mount:function(p){if(p!=null){var x=this,C=x._private,L=C.options;return!K(p)&&K(p[0])&&(p=p[0]),x.stopAnimationLoop(),x.destroyRenderer(),C.container=p,C.styleEnabled=!0,x.invalidateSize(),x.initRenderer(we({},L,L.renderer,{name:L.renderer.name==="null"?"canvas":L.renderer.name})),x.startAnimationLoop(),x.style(L.style),x.emit("mount"),x}},unmount:function(){var p=this;return p.stopAnimationLoop(),p.destroyRenderer(),p.initRenderer({name:"null"}),p.emit("unmount"),p},options:function(){return P2(this._private.options)},json:function(p){var x=this,C=x._private,L=x.mutableElements(),O=function(qt){return x.getElementById(qt.id())};if(it(p)){if(x.startBatch(),p.elements){var N={},j=function(qt,re){for(var ee=[],Ut=[],de=0;de<qt.length;de++){var Yt=qt[de];if(!Yt.data.id){Gc("cy.json() cannot handle elements without an ID attribute");continue}var Ee=""+Yt.data.id,Te=x.getElementById(Ee);N[Ee]=!0,Te.length!==0?Ut.push({ele:Te,json:Yt}):(re&&(Yt.group=re),ee.push(Yt))}x.add(ee);for(var ie=0;ie<Ut.length;ie++){var ze=Ut[ie],me=ze.ele,yn=ze.json;me.json(yn)}};if(rt(p.elements))j(p.elements);else for(var H=["nodes","edges"],q=0;q<H.length;q++){var W=H[q],Z=p.elements[W];rt(Z)&&j(Z,W)}var st=x.collection();L.filter(function(Pt){return!N[Pt.id()]}).forEach(function(Pt){Pt.isParent()?st.merge(Pt):Pt.remove()}),st.forEach(function(Pt){return Pt.children().move({parent:null})}),st.forEach(function(Pt){return O(Pt).remove()})}p.style&&x.style(p.style),p.zoom!=null&&p.zoom!==C.zoom&&x.zoom(p.zoom),p.pan&&(p.pan.x!==C.pan.x||p.pan.y!==C.pan.y)&&x.pan(p.pan),p.data&&x.data(p.data);for(var bt=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],pt=0;pt<bt.length;pt++){var _t=bt[pt];p[_t]!=null&&x[_t](p[_t])}return x.endBatch(),this}else{var St=!!p,Et={};St?Et.elements=this.elements().map(function(Pt){return Pt.json()}):(Et.elements={},L.forEach(function(Pt){var qt=Pt.group();Et.elements[qt]||(Et.elements[qt]=[]),Et.elements[qt].push(Pt.json())})),this._private.styleEnabled&&(Et.style=x.style().json()),Et.data=P2(x.data());var Nt=C.options;return Et.zoomingEnabled=C.zoomingEnabled,Et.userZoomingEnabled=C.userZoomingEnabled,Et.zoom=C.zoom,Et.minZoom=C.minZoom,Et.maxZoom=C.maxZoom,Et.panningEnabled=C.panningEnabled,Et.userPanningEnabled=C.userPanningEnabled,Et.pan=P2(C.pan),Et.boxSelectionEnabled=C.boxSelectionEnabled,Et.renderer=P2(Nt.renderer),Et.hideEdgesOnViewport=Nt.hideEdgesOnViewport,Et.textureOnViewport=Nt.textureOnViewport,Et.wheelSensitivity=Nt.wheelSensitivity,Et.motionBlur=Nt.motionBlur,Et.multiClickDebounceTime=Nt.multiClickDebounceTime,Et}}}),SC.$id=SC.getElementById,[set,het,oj,hM,kC,det,fM,EC,bet,T4,Z8].forEach(function(y){we(SC,y)});var met={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(p,x){return!0},ready:void 0,stop:void 0,transform:function(p,x){return x}},vet={maximal:!1,acyclic:!1},f6=function(p){return p.scratch("breadthfirst")},cj=function(p,x){return p.scratch("breadthfirst",x)};function uj(y){this.options=we({},met,vet,y)}uj.prototype.run=function(){var y=this.options,p=y,x=y.cy,C=p.eles,L=C.nodes().filter(function(vi){return!vi.isParent()}),O=C,N=p.directed,j=p.acyclic||p.maximal||p.maximalAdjustments>0,H=v0(p.boundingBox?p.boundingBox:{x1:0,y1:0,w:x.width(),h:x.height()}),q;if(yt(p.roots))q=p.roots;else if(rt(p.roots)){for(var W=[],Z=0;Z<p.roots.length;Z++){var st=p.roots[Z],bt=x.getElementById(st);W.push(bt)}q=x.collection(W)}else if(mt(p.roots))q=x.$(p.roots);else if(N)q=L.roots();else{var pt=C.components();q=x.collection();for(var _t=function(si){var Qi=pt[si],ks=Qi.maxDegree(!1),as=Qi.filter(function(Es){return Es.degree(!1)===ks});q=q.add(as)},St=0;St<pt.length;St++)_t(St)}var Et=[],Nt={},Pt=function(si,Qi){Et[Qi]==null&&(Et[Qi]=[]);var ks=Et[Qi].length;Et[Qi].push(si),cj(si,{index:ks,depth:Qi})},qt=function(si,Qi){var ks=f6(si),as=ks.depth,Es=ks.index;Et[as][Es]=null,Pt(si,Qi)};O.bfs({roots:q,directed:p.directed,visit:function(si,Qi,ks,as,Es){var eo=si[0],Ta=eo.id();Pt(eo,Es),Nt[Ta]=!0}});for(var re=[],ee=0;ee<L.length;ee++){var Ut=L[ee];Nt[Ut.id()]||re.push(Ut)}var de=function(si){for(var Qi=Et[si],ks=0;ks<Qi.length;ks++){var as=Qi[ks];if(as==null){Qi.splice(ks,1),ks--;continue}cj(as,{depth:si,index:ks})}},Yt=function(){for(var si=0;si<Et.length;si++)de(si)},Ee=function(si,Qi){for(var ks=f6(si),as=si.incomers().filter(function(G){return G.isNode()&&C.has(G)}),Es=-1,eo=si.id(),Ta=0;Ta<as.length;Ta++){var pa=as[Ta],mo=f6(pa);Es=Math.max(Es,mo.depth)}if(ks.depth<=Es){if(!p.acyclic&&Qi[eo])return null;var Kn=Es+1;return qt(si,Kn),Qi[eo]=Kn,!0}return!1};if(N&&j){var Te=[],ie={},ze=function(si){return Te.push(si)},me=function(){return Te.shift()};for(L.forEach(function(vi){return Te.push(vi)});Te.length>0;){var yn=me(),nn=Ee(yn,ie);if(nn)yn.outgoers().filter(function(vi){return vi.isNode()&&C.has(vi)}).forEach(ze);else if(nn===null){Gc("Detected double maximal shift for node `"+yn.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}Yt();var qe=0;if(p.avoidOverlap)for(var Tn=0;Tn<L.length;Tn++){var Xn=L[Tn],lr=Xn.layoutDimensions(p),Sn=lr.w,or=lr.h;qe=Math.max(qe,Sn,or)}var pr={},kr=function(si){if(pr[si.id()])return pr[si.id()];for(var Qi=f6(si).depth,ks=si.neighborhood(),as=0,Es=0,eo=0;eo<ks.length;eo++){var Ta=ks[eo];if(!(Ta.isEdge()||Ta.isParent()||!L.has(Ta))){var pa=f6(Ta);if(pa!=null){var mo=pa.index,Kn=pa.depth;if(!(mo==null||Kn==null)){var G=Et[Kn].length;Kn<Qi&&(as+=mo/G,Es++)}}}}return Es=Math.max(1,Es),as=as/Es,Es===0&&(as=0),pr[si.id()]=as,as},wr=function(si,Qi){var ks=kr(si),as=kr(Qi),Es=ks-as;return Es===0?ce(si.id(),Qi.id()):Es};p.depthSort!==void 0&&(wr=p.depthSort);for(var Cr=0;Cr<Et.length;Cr++)Et[Cr].sort(wr),de(Cr);for(var $n=[],cr=0;cr<re.length;cr++)$n.push(re[cr]);Et.unshift($n),Yt();for(var mr=0,Sr=0;Sr<Et.length;Sr++)mr=Math.max(Et[Sr].length,mr);var gi={x:H.x1+H.w/2,y:H.x1+H.h/2},ss=Et.reduce(function(vi,si){return Math.max(vi,si.length)},0),na=function(si){var Qi=f6(si),ks=Qi.depth,as=Qi.index,Es=Et[ks].length,eo=Math.max(H.w/((p.grid?ss:Es)+1),qe),Ta=Math.max(H.h/(Et.length+1),qe),pa=Math.min(H.w/2/Et.length,H.h/2/Et.length);if(pa=Math.max(pa,qe),p.circle){var Kn=pa*ks+pa-(Et.length>0&&Et[0].length<=3?pa/2:0),G=2*Math.PI/Et[ks].length*as;return ks===0&&Et[0].length===1&&(Kn=1),{x:gi.x+Kn*Math.cos(G),y:gi.y+Kn*Math.sin(G)}}else{var mo={x:gi.x+(as+1-(Es+1)/2)*eo,y:(ks+1)*Ta};return mo}};return C.nodes().layoutPositions(this,p,na),this};var yet={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(p,x){return!0},ready:void 0,stop:void 0,transform:function(p,x){return x}};function lj(y){this.options=we({},yet,y)}lj.prototype.run=function(){var y=this.options,p=y,x=y.cy,C=p.eles,L=p.counterclockwise!==void 0?!p.counterclockwise:p.clockwise,O=C.nodes().not(":parent");p.sort&&(O=O.sort(p.sort));for(var N=v0(p.boundingBox?p.boundingBox:{x1:0,y1:0,w:x.width(),h:x.height()}),j={x:N.x1+N.w/2,y:N.y1+N.h/2},H=p.sweep===void 0?2*Math.PI-2*Math.PI/O.length:p.sweep,q=H/Math.max(1,O.length-1),W,Z=0,st=0;st<O.length;st++){var bt=O[st],pt=bt.layoutDimensions(p),_t=pt.w,St=pt.h;Z=Math.max(Z,_t,St)}if(Q(p.radius)?W=p.radius:O.length<=1?W=0:W=Math.min(N.h,N.w)/2-Z,O.length>1&&p.avoidOverlap){Z*=1.75;var Et=Math.cos(q)-Math.cos(0),Nt=Math.sin(q)-Math.sin(0),Pt=Math.sqrt(Z*Z/(Et*Et+Nt*Nt));W=Math.max(Pt,W)}var qt=function(ee,Ut){var de=p.startAngle+Ut*q*(L?1:-1),Yt=W*Math.cos(de),Ee=W*Math.sin(de),Te={x:j.x+Yt,y:j.y+Ee};return Te};return C.nodes().layoutPositions(this,p,qt),this};var xet={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(p){return p.degree()},levelWidth:function(p){return p.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(p,x){return!0},ready:void 0,stop:void 0,transform:function(p,x){return x}};function hj(y){this.options=we({},xet,y)}hj.prototype.run=function(){for(var y=this.options,p=y,x=p.counterclockwise!==void 0?!p.counterclockwise:p.clockwise,C=y.cy,L=p.eles,O=L.nodes().not(":parent"),N=v0(p.boundingBox?p.boundingBox:{x1:0,y1:0,w:C.width(),h:C.height()}),j={x:N.x1+N.w/2,y:N.y1+N.h/2},H=[],q=0,W=0;W<O.length;W++){var Z=O[W],st=void 0;st=p.concentric(Z),H.push({value:st,node:Z}),Z._private.scratch.concentric=st}O.updateStyle();for(var bt=0;bt<O.length;bt++){var pt=O[bt],_t=pt.layoutDimensions(p);q=Math.max(q,_t.w,_t.h)}H.sort(function(vi,si){return si.value-vi.value});for(var St=p.levelWidth(O),Et=[[]],Nt=Et[0],Pt=0;Pt<H.length;Pt++){var qt=H[Pt];if(Nt.length>0){var re=Math.abs(Nt[0].value-qt.value);re>=St&&(Nt=[],Et.push(Nt))}Nt.push(qt)}var ee=q+p.minNodeSpacing;if(!p.avoidOverlap){var Ut=Et.length>0&&Et[0].length>1,de=Math.min(N.w,N.h)/2-ee,Yt=de/(Et.length+Ut?1:0);ee=Math.min(ee,Yt)}for(var Ee=0,Te=0;Te<Et.length;Te++){var ie=Et[Te],ze=p.sweep===void 0?2*Math.PI-2*Math.PI/ie.length:p.sweep,me=ie.dTheta=ze/Math.max(1,ie.length-1);if(ie.length>1&&p.avoidOverlap){var yn=Math.cos(me)-Math.cos(0),nn=Math.sin(me)-Math.sin(0),qe=Math.sqrt(ee*ee/(yn*yn+nn*nn));Ee=Math.max(qe,Ee)}ie.r=Ee,Ee+=ee}if(p.equidistant){for(var Tn=0,Xn=0,lr=0;lr<Et.length;lr++){var Sn=Et[lr],or=Sn.r-Xn;Tn=Math.max(Tn,or)}Xn=0;for(var pr=0;pr<Et.length;pr++){var kr=Et[pr];pr===0&&(Xn=kr.r),kr.r=Xn,Xn+=Tn}}for(var wr={},Cr=0;Cr<Et.length;Cr++)for(var $n=Et[Cr],cr=$n.dTheta,mr=$n.r,Sr=0;Sr<$n.length;Sr++){var gi=$n[Sr],ss=p.startAngle+(x?1:-1)*cr*Sr,na={x:j.x+mr*Math.cos(ss),y:j.y+mr*Math.sin(ss)};wr[gi.node.id()]=na}return L.nodes().layoutPositions(this,p,function(vi){var si=vi.id();return wr[si]}),this};var pM,ket={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(p,x){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(p){return 2048},nodeOverlap:4,idealEdgeLength:function(p){return 32},edgeElasticity:function(p){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function _C(y){this.options=we({},ket,y),this.options.layout=this;var p=this.options.eles.nodes(),x=this.options.eles.edges(),C=x.filter(function(L){var O=L.source().data("id"),N=L.target().data("id"),j=p.some(function(q){return q.data("id")===O}),H=p.some(function(q){return q.data("id")===N});return!j||!H});this.options.eles=this.options.eles.not(C)}_C.prototype.run=function(){var y=this.options,p=y.cy,x=this;x.stopped=!1,(y.animate===!0||y.animate===!1)&&x.emit({type:"layoutstart",layout:x}),y.debug===!0?pM=!0:pM=!1;var C=Eet(p,x,y);pM&&_et(C),y.randomize&&Aet(C);var L=ip(),O=function(){Let(C,p,y),y.fit===!0&&p.fit(y.padding)},N=function(st){return!(x.stopped||st>=y.numIter||(Det(C,y),C.temperature=C.temperature*y.coolingFactor,C.temperature<y.minTemp))},j=function(){if(y.animate===!0||y.animate===!1)O(),x.one("layoutstop",y.stop),x.emit({type:"layoutstop",layout:x});else{var st=y.eles.nodes(),bt=fj(C,y,st);st.layoutPositions(x,y,bt)}},H=0,q=!0;if(y.animate===!0){var W=function Z(){for(var st=0;q&&st<y.refresh;)q=N(H),H++,st++;if(!q)gj(C,y),j();else{var bt=ip();bt-L>=y.animationThreshold&&O(),g1(Z)}};W()}else{for(;q;)q=N(H),H++;gj(C,y),j()}return this},_C.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},_C.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Eet=function(p,x,C){for(var L=C.eles.edges(),O=C.eles.nodes(),N=v0(C.boundingBox?C.boundingBox:{x1:0,y1:0,w:p.width(),h:p.height()}),j={isCompound:p.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:O.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:L.size(),temperature:C.initialTemp,clientWidth:N.w,clientHeight:N.h,boundingBox:N},H=C.eles.components(),q={},W=0;W<H.length;W++)for(var Z=H[W],st=0;st<Z.length;st++){var bt=Z[st];q[bt.id()]=W}for(var W=0;W<j.nodeSize;W++){var pt=O[W],_t=pt.layoutDimensions(C),St={};St.isLocked=pt.locked(),St.id=pt.data("id"),St.parentId=pt.data("parent"),St.cmptId=q[pt.id()],St.children=[],St.positionX=pt.position("x"),St.positionY=pt.position("y"),St.offsetX=0,St.offsetY=0,St.height=_t.w,St.width=_t.h,St.maxX=St.positionX+St.width/2,St.minX=St.positionX-St.width/2,St.maxY=St.positionY+St.height/2,St.minY=St.positionY-St.height/2,St.padLeft=parseFloat(pt.style("padding")),St.padRight=parseFloat(pt.style("padding")),St.padTop=parseFloat(pt.style("padding")),St.padBottom=parseFloat(pt.style("padding")),St.nodeRepulsion=ct(C.nodeRepulsion)?C.nodeRepulsion(pt):C.nodeRepulsion,j.layoutNodes.push(St),j.idToIndex[St.id]=W}for(var Et=[],Nt=0,Pt=-1,qt=[],W=0;W<j.nodeSize;W++){var pt=j.layoutNodes[W],re=pt.parentId;re!=null?j.layoutNodes[j.idToIndex[re]].children.push(pt.id):(Et[++Pt]=pt.id,qt.push(pt.id))}for(j.graphSet.push(qt);Nt<=Pt;){var ee=Et[Nt++],Ut=j.idToIndex[ee],bt=j.layoutNodes[Ut],de=bt.children;if(de.length>0){j.graphSet.push(de);for(var W=0;W<de.length;W++)Et[++Pt]=de[W]}}for(var W=0;W<j.graphSet.length;W++)for(var Yt=j.graphSet[W],st=0;st<Yt.length;st++){var Ee=j.idToIndex[Yt[st]];j.indexToGraph[Ee]=W}for(var W=0;W<j.edgeSize;W++){var Te=L[W],ie={};ie.id=Te.data("id"),ie.sourceId=Te.data("source"),ie.targetId=Te.data("target");var ze=ct(C.idealEdgeLength)?C.idealEdgeLength(Te):C.idealEdgeLength,me=ct(C.edgeElasticity)?C.edgeElasticity(Te):C.edgeElasticity,yn=j.idToIndex[ie.sourceId],nn=j.idToIndex[ie.targetId],qe=j.indexToGraph[yn],Tn=j.indexToGraph[nn];if(qe!=Tn){for(var Xn=Tet(ie.sourceId,ie.targetId,j),lr=j.graphSet[Xn],Sn=0,St=j.layoutNodes[yn];lr.indexOf(St.id)===-1;)St=j.layoutNodes[j.idToIndex[St.parentId]],Sn++;for(St=j.layoutNodes[nn];lr.indexOf(St.id)===-1;)St=j.layoutNodes[j.idToIndex[St.parentId]],Sn++;ze*=Sn*C.nestingFactor}ie.idealLength=ze,ie.elasticity=me,j.layoutEdges.push(ie)}return j},Tet=function(p,x,C){var L=Cet(p,x,0,C);return 2>L.count?0:L.graph},Cet=function y(p,x,C,L){var O=L.graphSet[C];if(-1<O.indexOf(p)&&-1<O.indexOf(x))return{count:2,graph:C};for(var N=0,j=0;j<O.length;j++){var H=O[j],q=L.idToIndex[H],W=L.layoutNodes[q].children;if(W.length!==0){var Z=L.indexToGraph[L.idToIndex[W[0]]],st=y(p,x,Z,L);if(st.count!==0)if(st.count===1){if(N++,N===2)break}else return st}}return{count:N,graph:C}},_et,Aet=function(p,x){for(var C=p.clientWidth,L=p.clientHeight,O=0;O<p.nodeSize;O++){var N=p.layoutNodes[O];N.children.length===0&&!N.isLocked&&(N.positionX=Math.random()*C,N.positionY=Math.random()*L)}},fj=function(p,x,C){var L=p.boundingBox,O={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return x.boundingBox&&(C.forEach(function(N){var j=p.layoutNodes[p.idToIndex[N.data("id")]];O.x1=Math.min(O.x1,j.positionX),O.x2=Math.max(O.x2,j.positionX),O.y1=Math.min(O.y1,j.positionY),O.y2=Math.max(O.y2,j.positionY)}),O.w=O.x2-O.x1,O.h=O.y2-O.y1),function(N,j){var H=p.layoutNodes[p.idToIndex[N.data("id")]];if(x.boundingBox){var q=(H.positionX-O.x1)/O.w,W=(H.positionY-O.y1)/O.h;return{x:L.x1+q*L.w,y:L.y1+W*L.h}}else return{x:H.positionX,y:H.positionY}}},Let=function(p,x,C){var L=C.layout,O=C.eles.nodes(),N=fj(p,C,O);O.positions(N),p.ready!==!0&&(p.ready=!0,L.one("layoutready",C.ready),L.emit({type:"layoutready",layout:this}))},Det=function(p,x,C){Met(p,x),Net(p),Pet(p,x),Fet(p),Bet(p)},Met=function(p,x){for(var C=0;C<p.graphSet.length;C++)for(var L=p.graphSet[C],O=L.length,N=0;N<O;N++)for(var j=p.layoutNodes[p.idToIndex[L[N]]],H=N+1;H<O;H++){var q=p.layoutNodes[p.idToIndex[L[H]]];Iet(j,q,p,x)}},dj=function(p){return-p+2*p*Math.random()},Iet=function(p,x,C,L){var O=p.cmptId,N=x.cmptId;if(!(O!==N&&!C.isCompound)){var j=x.positionX-p.positionX,H=x.positionY-p.positionY,q=1;j===0&&H===0&&(j=dj(q),H=dj(q));var W=Oet(p,x,j,H);if(W>0)var Z=L.nodeOverlap*W,st=Math.sqrt(j*j+H*H),bt=Z*j/st,pt=Z*H/st;else var _t=AC(p,j,H),St=AC(x,-1*j,-1*H),Et=St.x-_t.x,Nt=St.y-_t.y,Pt=Et*Et+Nt*Nt,st=Math.sqrt(Pt),Z=(p.nodeRepulsion+x.nodeRepulsion)/Pt,bt=Z*Et/st,pt=Z*Nt/st;p.isLocked||(p.offsetX-=bt,p.offsetY-=pt),x.isLocked||(x.offsetX+=bt,x.offsetY+=pt)}},Oet=function(p,x,C,L){if(C>0)var O=p.maxX-x.minX;else var O=x.maxX-p.minX;if(L>0)var N=p.maxY-x.minY;else var N=x.maxY-p.minY;return O>=0&&N>=0?Math.sqrt(O*O+N*N):0},AC=function(p,x,C){var L=p.positionX,O=p.positionY,N=p.height||1,j=p.width||1,H=C/x,q=N/j,W={};return x===0&&0<C||x===0&&0>C?(W.x=L,W.y=O+N/2,W):0<x&&-1*q<=H&&H<=q?(W.x=L+j/2,W.y=O+j*C/2/x,W):0>x&&-1*q<=H&&H<=q?(W.x=L-j/2,W.y=O-j*C/2/x,W):0<C&&(H<=-1*q||H>=q)?(W.x=L+N*x/2/C,W.y=O+N/2,W):(0>C&&(H<=-1*q||H>=q)&&(W.x=L-N*x/2/C,W.y=O-N/2),W)},Net=function(p,x){for(var C=0;C<p.edgeSize;C++){var L=p.layoutEdges[C],O=p.idToIndex[L.sourceId],N=p.layoutNodes[O],j=p.idToIndex[L.targetId],H=p.layoutNodes[j],q=H.positionX-N.positionX,W=H.positionY-N.positionY;if(!(q===0&&W===0)){var Z=AC(N,q,W),st=AC(H,-1*q,-1*W),bt=st.x-Z.x,pt=st.y-Z.y,_t=Math.sqrt(bt*bt+pt*pt),St=Math.pow(L.idealLength-_t,2)/L.elasticity;if(_t!==0)var Et=St*bt/_t,Nt=St*pt/_t;else var Et=0,Nt=0;N.isLocked||(N.offsetX+=Et,N.offsetY+=Nt),H.isLocked||(H.offsetX-=Et,H.offsetY-=Nt)}}},Pet=function(p,x){if(x.gravity!==0)for(var C=1,L=0;L<p.graphSet.length;L++){var O=p.graphSet[L],N=O.length;if(L===0)var j=p.clientHeight/2,H=p.clientWidth/2;else var q=p.layoutNodes[p.idToIndex[O[0]]],W=p.layoutNodes[p.idToIndex[q.parentId]],j=W.positionX,H=W.positionY;for(var Z=0;Z<N;Z++){var st=p.layoutNodes[p.idToIndex[O[Z]]];if(!st.isLocked){var bt=j-st.positionX,pt=H-st.positionY,_t=Math.sqrt(bt*bt+pt*pt);if(_t>C){var St=x.gravity*bt/_t,Et=x.gravity*pt/_t;st.offsetX+=St,st.offsetY+=Et}}}}},Fet=function(p,x){var C=[],L=0,O=-1;for(C.push.apply(C,p.graphSet[0]),O+=p.graphSet[0].length;L<=O;){var N=C[L++],j=p.idToIndex[N],H=p.layoutNodes[j],q=H.children;if(0<q.length&&!H.isLocked){for(var W=H.offsetX,Z=H.offsetY,st=0;st<q.length;st++){var bt=p.layoutNodes[p.idToIndex[q[st]]];bt.offsetX+=W,bt.offsetY+=Z,C[++O]=q[st]}H.offsetX=0,H.offsetY=0}}},Bet=function(p,x){for(var C=0;C<p.nodeSize;C++){var L=p.layoutNodes[C];0<L.children.length&&(L.maxX=void 0,L.minX=void 0,L.maxY=void 0,L.minY=void 0)}for(var C=0;C<p.nodeSize;C++){var L=p.layoutNodes[C];if(!(0<L.children.length||L.isLocked)){var O=Ret(L.offsetX,L.offsetY,p.temperature);L.positionX+=O.x,L.positionY+=O.y,L.offsetX=0,L.offsetY=0,L.minX=L.positionX-L.width,L.maxX=L.positionX+L.width,L.minY=L.positionY-L.height,L.maxY=L.positionY+L.height,jet(L,p)}}for(var C=0;C<p.nodeSize;C++){var L=p.layoutNodes[C];0<L.children.length&&!L.isLocked&&(L.positionX=(L.maxX+L.minX)/2,L.positionY=(L.maxY+L.minY)/2,L.width=L.maxX-L.minX,L.height=L.maxY-L.minY)}},Ret=function(p,x,C){var L=Math.sqrt(p*p+x*x);if(L>C)var O={x:C*p/L,y:C*x/L};else var O={x:p,y:x};return O},jet=function y(p,x){var C=p.parentId;if(C!=null){var L=x.layoutNodes[x.idToIndex[C]],O=!1;if((L.maxX==null||p.maxX+L.padRight>L.maxX)&&(L.maxX=p.maxX+L.padRight,O=!0),(L.minX==null||p.minX-L.padLeft<L.minX)&&(L.minX=p.minX-L.padLeft,O=!0),(L.maxY==null||p.maxY+L.padBottom>L.maxY)&&(L.maxY=p.maxY+L.padBottom,O=!0),(L.minY==null||p.minY-L.padTop<L.minY)&&(L.minY=p.minY-L.padTop,O=!0),O)return y(L,x)}},gj=function(p,x){for(var C=p.layoutNodes,L=[],O=0;O<C.length;O++){var N=C[O],j=N.cmptId,H=L[j]=L[j]||[];H.push(N)}for(var q=0,O=0;O<L.length;O++){var W=L[O];if(W){W.x1=1/0,W.x2=-1/0,W.y1=1/0,W.y2=-1/0;for(var Z=0;Z<W.length;Z++){var st=W[Z];W.x1=Math.min(W.x1,st.positionX-st.width/2),W.x2=Math.max(W.x2,st.positionX+st.width/2),W.y1=Math.min(W.y1,st.positionY-st.height/2),W.y2=Math.max(W.y2,st.positionY+st.height/2)}W.w=W.x2-W.x1,W.h=W.y2-W.y1,q+=W.w*W.h}}L.sort(function(Nt,Pt){return Pt.w*Pt.h-Nt.w*Nt.h});for(var bt=0,pt=0,_t=0,St=0,Et=Math.sqrt(q)*p.clientWidth/p.clientHeight,O=0;O<L.length;O++){var W=L[O];if(W){for(var Z=0;Z<W.length;Z++){var st=W[Z];st.isLocked||(st.positionX+=bt-W.x1,st.positionY+=pt-W.y1)}bt+=W.w+x.componentSpacing,_t+=W.w+x.componentSpacing,St=Math.max(St,W.h),_t>Et&&(pt+=St+x.componentSpacing,bt=0,_t=0,St=0)}}},$et={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(p){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(p,x){return!0},ready:void 0,stop:void 0,transform:function(p,x){return x}};function pj(y){this.options=we({},$et,y)}pj.prototype.run=function(){var y=this.options,p=y,x=y.cy,C=p.eles,L=C.nodes().not(":parent");p.sort&&(L=L.sort(p.sort));var O=v0(p.boundingBox?p.boundingBox:{x1:0,y1:0,w:x.width(),h:x.height()});if(O.h===0||O.w===0)C.nodes().layoutPositions(this,p,function(pr){return{x:O.x1,y:O.y1}});else{var N=L.size(),j=Math.sqrt(N*O.h/O.w),H=Math.round(j),q=Math.round(O.w/O.h*j),W=function(kr){if(kr==null)return Math.min(H,q);var wr=Math.min(H,q);wr==H?H=kr:q=kr},Z=function(kr){if(kr==null)return Math.max(H,q);var wr=Math.max(H,q);wr==H?H=kr:q=kr},st=p.rows,bt=p.cols!=null?p.cols:p.columns;if(st!=null&&bt!=null)H=st,q=bt;else if(st!=null&&bt==null)H=st,q=Math.ceil(N/H);else if(st==null&&bt!=null)q=bt,H=Math.ceil(N/q);else if(q*H>N){var pt=W(),_t=Z();(pt-1)*_t>=N?W(pt-1):(_t-1)*pt>=N&&Z(_t-1)}else for(;q*H<N;){var St=W(),Et=Z();(Et+1)*St>=N?Z(Et+1):W(St+1)}var Nt=O.w/q,Pt=O.h/H;if(p.condense&&(Nt=0,Pt=0),p.avoidOverlap)for(var qt=0;qt<L.length;qt++){var re=L[qt],ee=re._private.position;(ee.x==null||ee.y==null)&&(ee.x=0,ee.y=0);var Ut=re.layoutDimensions(p),de=p.avoidOverlapPadding,Yt=Ut.w+de,Ee=Ut.h+de;Nt=Math.max(Nt,Yt),Pt=Math.max(Pt,Ee)}for(var Te={},ie=function(kr,wr){return!!Te["c-"+kr+"-"+wr]},ze=function(kr,wr){Te["c-"+kr+"-"+wr]=!0},me=0,yn=0,nn=function(){yn++,yn>=q&&(yn=0,me++)},qe={},Tn=0;Tn<L.length;Tn++){var Xn=L[Tn],lr=p.position(Xn);if(lr&&(lr.row!==void 0||lr.col!==void 0)){var Sn={row:lr.row,col:lr.col};if(Sn.col===void 0)for(Sn.col=0;ie(Sn.row,Sn.col);)Sn.col++;else if(Sn.row===void 0)for(Sn.row=0;ie(Sn.row,Sn.col);)Sn.row++;qe[Xn.id()]=Sn,ze(Sn.row,Sn.col)}}var or=function(kr,wr){var Cr,$n;if(kr.locked()||kr.isParent())return!1;var cr=qe[kr.id()];if(cr)Cr=cr.col*Nt+Nt/2+O.x1,$n=cr.row*Pt+Pt/2+O.y1;else{for(;ie(me,yn);)nn();Cr=yn*Nt+Nt/2+O.x1,$n=me*Pt+Pt/2+O.y1,ze(me,yn),nn()}return{x:Cr,y:$n}};L.layoutPositions(this,p,or)}return this};var zet={ready:function(){},stop:function(){}};function bM(y){this.options=we({},zet,y)}bM.prototype.run=function(){var y=this.options,p=y.eles,x=this;return y.cy,x.emit("layoutstart"),p.nodes().positions(function(){return{x:0,y:0}}),x.one("layoutready",y.ready),x.emit("layoutready"),x.one("layoutstop",y.stop),x.emit("layoutstop"),this},bM.prototype.stop=function(){return this};var qet={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(p,x){return!0},ready:void 0,stop:void 0,transform:function(p,x){return x}};function bj(y){this.options=we({},qet,y)}bj.prototype.run=function(){var y=this.options,p=y.eles,x=p.nodes(),C=ct(y.positions);function L(O){if(y.positions==null)return sQ(O.position());if(C)return y.positions(O);var N=y.positions[O._private.data.id];return N??null}return x.layoutPositions(this,y,function(O,N){var j=L(O);return O.locked()||j==null?!1:j}),this};var Het={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(p,x){return!0},ready:void 0,stop:void 0,transform:function(p,x){return x}};function wj(y){this.options=we({},Het,y)}wj.prototype.run=function(){var y=this.options,p=y.cy,x=y.eles,C=v0(y.boundingBox?y.boundingBox:{x1:0,y1:0,w:p.width(),h:p.height()}),L=function(N,j){return{x:C.x1+Math.round(Math.random()*C.w),y:C.y1+Math.round(Math.random()*C.h)}};return x.nodes().layoutPositions(this,y,L),this};var Vet=[{name:"breadthfirst",impl:uj},{name:"circle",impl:lj},{name:"concentric",impl:hj},{name:"cose",impl:_C},{name:"grid",impl:pj},{name:"null",impl:bM},{name:"preset",impl:bj},{name:"random",impl:wj}];function mj(y){this.options=y,this.notifications=0}var vj=function(){},yj=function(){throw new Error("A headless instance can not render images")};mj.prototype={recalculateRenderedStyle:vj,notify:function(){this.notifications++},init:vj,isHeadless:function(){return!0},png:yj,jpg:yj};var wM={};wM.arrowShapeWidth=.3,wM.registerArrowShapes=function(){var y=this.arrowShapes={},p=this,x=function(q,W,Z,st,bt,pt,_t){var St=bt.x-Z/2-_t,Et=bt.x+Z/2+_t,Nt=bt.y-Z/2-_t,Pt=bt.y+Z/2+_t,qt=St<=q&&q<=Et&&Nt<=W&&W<=Pt;return qt},C=function(q,W,Z,st,bt){var pt=q*Math.cos(st)-W*Math.sin(st),_t=q*Math.sin(st)+W*Math.cos(st),St=pt*Z,Et=_t*Z,Nt=St+bt.x,Pt=Et+bt.y;return{x:Nt,y:Pt}},L=function(q,W,Z,st){for(var bt=[],pt=0;pt<q.length;pt+=2){var _t=q[pt],St=q[pt+1];bt.push(C(_t,St,W,Z,st))}return bt},O=function(q){for(var W=[],Z=0;Z<q.length;Z++){var st=q[Z];W.push(st.x,st.y)}return W},N=function(q){return q.pstyle("width").pfValue*q.pstyle("arrow-scale").pfValue*2},j=function(q,W){mt(W)&&(W=y[W]),y[q]=we({name:q,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(st,bt,pt,_t,St,Et){var Nt=O(L(this.points,pt+2*Et,_t,St)),Pt=y0(st,bt,Nt);return Pt},roughCollide:x,draw:function(st,bt,pt,_t){var St=L(this.points,bt,pt,_t);p.arrowShapeImpl("polygon")(st,St)},spacing:function(st){return 0},gap:N},W)};j("none",{collide:ay,roughCollide:ay,draw:BD,spacing:sp,gap:sp}),j("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),j("arrow","triangle"),j("triangle-backcurve",{points:y.triangle.points,controlPoint:[0,-.15],roughCollide:x,draw:function(q,W,Z,st,bt){var pt=L(this.points,W,Z,st),_t=this.controlPoint,St=C(_t[0],_t[1],W,Z,st);p.arrowShapeImpl(this.name)(q,pt,St)},gap:function(q){return N(q)*.8}}),j("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(q,W,Z,st,bt,pt,_t){var St=O(L(this.points,Z+2*_t,st,bt)),Et=O(L(this.pointsTee,Z+2*_t,st,bt)),Nt=y0(q,W,St)||y0(q,W,Et);return Nt},draw:function(q,W,Z,st,bt){var pt=L(this.points,W,Z,st),_t=L(this.pointsTee,W,Z,st);p.arrowShapeImpl(this.name)(q,pt,_t)}}),j("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(q,W,Z,st,bt,pt,_t){var St=bt,Et=Math.pow(St.x-q,2)+Math.pow(St.y-W,2)<=Math.pow((Z+2*_t)*this.radius,2),Nt=O(L(this.points,Z+2*_t,st,bt));return y0(q,W,Nt)||Et},draw:function(q,W,Z,st,bt){var pt=L(this.pointsTr,W,Z,st);p.arrowShapeImpl(this.name)(q,pt,st.x,st.y,this.radius*W)},spacing:function(q){return p.getArrowWidth(q.pstyle("width").pfValue,q.pstyle("arrow-scale").value)*this.radius}}),j("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(q,W){var Z=this.baseCrossLinePts.slice(),st=W/q,bt=3,pt=5;return Z[bt]=Z[bt]-st,Z[pt]=Z[pt]-st,Z},collide:function(q,W,Z,st,bt,pt,_t){var St=O(L(this.points,Z+2*_t,st,bt)),Et=O(L(this.crossLinePts(Z,pt),Z+2*_t,st,bt)),Nt=y0(q,W,St)||y0(q,W,Et);return Nt},draw:function(q,W,Z,st,bt){var pt=L(this.points,W,Z,st),_t=L(this.crossLinePts(W,bt),W,Z,st);p.arrowShapeImpl(this.name)(q,pt,_t)}}),j("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(q){return N(q)*.525}}),j("circle",{radius:.15,collide:function(q,W,Z,st,bt,pt,_t){var St=bt,Et=Math.pow(St.x-q,2)+Math.pow(St.y-W,2)<=Math.pow((Z+2*_t)*this.radius,2);return Et},draw:function(q,W,Z,st,bt){p.arrowShapeImpl(this.name)(q,st.x,st.y,this.radius*W)},spacing:function(q){return p.getArrowWidth(q.pstyle("width").pfValue,q.pstyle("arrow-scale").value)*this.radius}}),j("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(q){return 1},gap:function(q){return 1}}),j("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),j("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(q){return q.pstyle("width").pfValue*q.pstyle("arrow-scale").value}}),j("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(q){return .95*q.pstyle("width").pfValue*q.pstyle("arrow-scale").value}})};var C4={};C4.projectIntoViewport=function(y,p){var x=this.cy,C=this.findContainerClientCoords(),L=C[0],O=C[1],N=C[4],j=x.pan(),H=x.zoom(),q=((y-L)/N-j.x)/H,W=((p-O)/N-j.y)/H;return[q,W]},C4.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var y=this.container,p=y.getBoundingClientRect(),x=this.cy.window().getComputedStyle(y),C=function(Et){return parseFloat(x.getPropertyValue(Et))},L={left:C("padding-left"),right:C("padding-right"),top:C("padding-top"),bottom:C("padding-bottom")},O={left:C("border-left-width"),right:C("border-right-width"),top:C("border-top-width"),bottom:C("border-bottom-width")},N=y.clientWidth,j=y.clientHeight,H=L.left+L.right,q=L.top+L.bottom,W=O.left+O.right,Z=p.width/(N+W),st=N-H,bt=j-q,pt=p.left+L.left+O.left,_t=p.top+L.top+O.top;return this.containerBB=[pt,_t,st,bt,Z]},C4.invalidateContainerClientCoordsCache=function(){this.containerBB=null},C4.findNearestElement=function(y,p,x,C){return this.findNearestElements(y,p,x,C)[0]},C4.findNearestElements=function(y,p,x,C){var L=this,O=this,N=O.getCachedZSortedEles(),j=[],H=O.cy.zoom(),q=O.cy.hasCompoundNodes(),W=(C?24:8)/H,Z=(C?8:2)/H,st=(C?8:2)/H,bt=1/0,pt,_t;x&&(N=N.interactive);function St(Ut,de){if(Ut.isNode()){if(_t)return;_t=Ut,j.push(Ut)}if(Ut.isEdge()&&(de==null||de<bt))if(pt){if(pt.pstyle("z-compound-depth").value===Ut.pstyle("z-compound-depth").value&&pt.pstyle("z-compound-depth").value===Ut.pstyle("z-compound-depth").value){for(var Yt=0;Yt<j.length;Yt++)if(j[Yt].isEdge()){j[Yt]=Ut,pt=Ut,bt=de??bt;break}}}else j.push(Ut),pt=Ut,bt=de??bt}function Et(Ut){var de=Ut.outerWidth()+2*Z,Yt=Ut.outerHeight()+2*Z,Ee=de/2,Te=Yt/2,ie=Ut.position();if(ie.x-Ee<=y&&y<=ie.x+Ee&&ie.y-Te<=p&&p<=ie.y+Te){var ze=O.nodeShapes[L.getNodeShape(Ut)];if(ze.checkPoint(y,p,0,de,Yt,ie.x,ie.y))return St(Ut,0),!0}}function Nt(Ut){var de=Ut._private,Yt=de.rscratch,Ee=Ut.pstyle("width").pfValue,Te=Ut.pstyle("arrow-scale").value,ie=Ee/2+W,ze=ie*ie,me=ie*2,Tn=de.source,Xn=de.target,yn;if(Yt.edgeType==="segments"||Yt.edgeType==="straight"||Yt.edgeType==="haystack"){for(var nn=Yt.allpts,qe=0;qe+3<nn.length;qe+=2)if(mQ(y,p,nn[qe],nn[qe+1],nn[qe+2],nn[qe+3],me)&&ze>(yn=EQ(y,p,nn[qe],nn[qe+1],nn[qe+2],nn[qe+3])))return St(Ut,yn),!0}else if(Yt.edgeType==="bezier"||Yt.edgeType==="multibezier"||Yt.edgeType==="self"||Yt.edgeType==="compound"){for(var nn=Yt.allpts,qe=0;qe+5<Yt.allpts.length;qe+=4)if(vQ(y,p,nn[qe],nn[qe+1],nn[qe+2],nn[qe+3],nn[qe+4],nn[qe+5],me)&&ze>(yn=kQ(y,p,nn[qe],nn[qe+1],nn[qe+2],nn[qe+3],nn[qe+4],nn[qe+5])))return St(Ut,yn),!0}for(var Tn=Tn||de.source,Xn=Xn||de.target,lr=L.getArrowWidth(Ee,Te),Sn=[{name:"source",x:Yt.arrowStartX,y:Yt.arrowStartY,angle:Yt.srcArrowAngle},{name:"target",x:Yt.arrowEndX,y:Yt.arrowEndY,angle:Yt.tgtArrowAngle},{name:"mid-source",x:Yt.midX,y:Yt.midY,angle:Yt.midsrcArrowAngle},{name:"mid-target",x:Yt.midX,y:Yt.midY,angle:Yt.midtgtArrowAngle}],qe=0;qe<Sn.length;qe++){var or=Sn[qe],pr=O.arrowShapes[Ut.pstyle(or.name+"-arrow-shape").value],kr=Ut.pstyle("width").pfValue;if(pr.roughCollide(y,p,lr,or.angle,{x:or.x,y:or.y},kr,W)&&pr.collide(y,p,lr,or.angle,{x:or.x,y:or.y},kr,W))return St(Ut),!0}q&&j.length>0&&(Et(Tn),Et(Xn))}function Pt(Ut,de,Yt){return fb(Ut,de,Yt)}function qt(Ut,de){var Yt=Ut._private,Ee=st,Te;de?Te=de+"-":Te="",Ut.boundingBox();var ie=Yt.labelBounds[de||"main"],ze=Ut.pstyle(Te+"label").value,me=Ut.pstyle("text-events").strValue==="yes";if(!(!me||!ze)){var yn=Pt(Yt.rscratch,"labelX",de),nn=Pt(Yt.rscratch,"labelY",de),qe=Pt(Yt.rscratch,"labelAngle",de),Tn=Ut.pstyle(Te+"text-margin-x").pfValue,Xn=Ut.pstyle(Te+"text-margin-y").pfValue,lr=ie.x1-Ee-Tn,Sn=ie.x2+Ee-Tn,or=ie.y1-Ee-Xn,pr=ie.y2+Ee-Xn;if(qe){var kr=Math.cos(qe),wr=Math.sin(qe),Cr=function(na,vi){return na=na-yn,vi=vi-nn,{x:na*kr-vi*wr+yn,y:na*wr+vi*kr+nn}},$n=Cr(lr,or),cr=Cr(lr,pr),mr=Cr(Sn,or),Sr=Cr(Sn,pr),gi=[$n.x+Tn,$n.y+Xn,mr.x+Tn,mr.y+Xn,Sr.x+Tn,Sr.y+Xn,cr.x+Tn,cr.y+Xn];if(y0(y,p,gi))return St(Ut),!0}else if(Qx(ie,y,p))return St(Ut),!0}}for(var re=N.length-1;re>=0;re--){var ee=N[re];ee.isNode()?Et(ee)||qt(ee):Nt(ee)||qt(ee)||qt(ee,"source")||qt(ee,"target")}return j},C4.getAllInBox=function(y,p,x,C){var L=this.getCachedZSortedEles().interactive,O=[],N=Math.min(y,x),j=Math.max(y,x),H=Math.min(p,C),q=Math.max(p,C);y=N,x=j,p=H,C=q;for(var W=v0({x1:y,y1:p,x2:x,y2:C}),Z=0;Z<L.length;Z++){var st=L[Z];if(st.isNode()){var bt=st,pt=bt.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});$D(W,pt)&&!jB(pt,W)&&O.push(bt)}else{var _t=st,St=_t._private,Et=St.rscratch;if(Et.startX!=null&&Et.startY!=null&&!Qx(W,Et.startX,Et.startY)||Et.endX!=null&&Et.endY!=null&&!Qx(W,Et.endX,Et.endY))continue;if(Et.edgeType==="bezier"||Et.edgeType==="multibezier"||Et.edgeType==="self"||Et.edgeType==="compound"||Et.edgeType==="segments"||Et.edgeType==="haystack"){for(var Nt=St.rstyle.bezierPts||St.rstyle.linePts||St.rstyle.haystackPts,Pt=!0,qt=0;qt<Nt.length;qt++)if(!wQ(W,Nt[qt])){Pt=!1;break}Pt&&O.push(_t)}else(Et.edgeType==="haystack"||Et.edgeType==="straight")&&O.push(_t)}}return O};var LC={};LC.calculateArrowAngles=function(y){var p=y._private.rscratch,x=p.edgeType==="haystack",C=p.edgeType==="bezier",L=p.edgeType==="multibezier",O=p.edgeType==="segments",N=p.edgeType==="compound",j=p.edgeType==="self",H,q,W,Z,st,bt,Et,Nt;if(x?(W=p.haystackPts[0],Z=p.haystackPts[1],st=p.haystackPts[2],bt=p.haystackPts[3]):(W=p.arrowStartX,Z=p.arrowStartY,st=p.arrowEndX,bt=p.arrowEndY),Et=p.midX,Nt=p.midY,O)H=W-p.segpts[0],q=Z-p.segpts[1];else if(L||N||j||C){var pt=p.allpts,_t=Lf(pt[0],pt[2],pt[4],.1),St=Lf(pt[1],pt[3],pt[5],.1);H=W-_t,q=Z-St}else H=W-Et,q=Z-Nt;p.srcArrowAngle=Y9(H,q);var Et=p.midX,Nt=p.midY;if(x&&(Et=(W+st)/2,Nt=(Z+bt)/2),H=st-W,q=bt-Z,O){var pt=p.allpts;if(pt.length/2%2===0){var Pt=pt.length/2,qt=Pt-2;H=pt[Pt]-pt[qt],q=pt[Pt+1]-pt[qt+1]}else{var Pt=pt.length/2-1,qt=Pt-2,re=Pt+2;H=pt[Pt]-pt[qt],q=pt[Pt+1]-pt[qt+1]}}else if(L||N||j){var pt=p.allpts,ee=p.ctrlpts,Ut,de,Yt,Ee;if(ee.length/2%2===0){var Te=pt.length/2-1,ie=Te+2,ze=ie+2;Ut=Lf(pt[Te],pt[ie],pt[ze],0),de=Lf(pt[Te+1],pt[ie+1],pt[ze+1],0),Yt=Lf(pt[Te],pt[ie],pt[ze],1e-4),Ee=Lf(pt[Te+1],pt[ie+1],pt[ze+1],1e-4)}else{var ie=pt.length/2-1,Te=ie-2,ze=ie+2;Ut=Lf(pt[Te],pt[ie],pt[ze],.4999),de=Lf(pt[Te+1],pt[ie+1],pt[ze+1],.4999),Yt=Lf(pt[Te],pt[ie],pt[ze],.5),Ee=Lf(pt[Te+1],pt[ie+1],pt[ze+1],.5)}H=Yt-Ut,q=Ee-de}if(p.midtgtArrowAngle=Y9(H,q),p.midDispX=H,p.midDispY=q,H*=-1,q*=-1,O){var pt=p.allpts;if(pt.length/2%2!==0){var Pt=pt.length/2-1,re=Pt+2;H=-(pt[re]-pt[Pt]),q=-(pt[re+1]-pt[Pt+1])}}if(p.midsrcArrowAngle=Y9(H,q),O)H=st-p.segpts[p.segpts.length-2],q=bt-p.segpts[p.segpts.length-1];else if(L||N||j||C){var pt=p.allpts,me=pt.length,_t=Lf(pt[me-6],pt[me-4],pt[me-2],.9),St=Lf(pt[me-5],pt[me-3],pt[me-1],.9);H=st-_t,q=bt-St}else H=st-Et,q=bt-Nt;p.tgtArrowAngle=Y9(H,q)},LC.getArrowWidth=LC.getArrowHeight=function(y,p){var x=this.arrowWidthCache=this.arrowWidthCache||{},C=x[y+", "+p];return C||(C=Math.max(Math.pow(y*13.37,.9),29)*p,x[y+", "+p]=C,C)};var Q1={};Q1.findMidptPtsEtc=function(y,p){var x=p.posPts,C=p.intersectionPts,L=p.vectorNormInverse,O,N=y.pstyle("source-endpoint"),j=y.pstyle("target-endpoint"),H=N.units!=null&&j.units!=null,q=function(re,ee,Ut,de){var Yt=de-ee,Ee=Ut-re,Te=Math.sqrt(Ee*Ee+Yt*Yt);return{x:-Yt/Te,y:Ee/Te}},W=y.pstyle("edge-distances").value;switch(W){case"node-position":O=x;break;case"intersection":O=C;break;case"endpoints":{if(H){var Z=this.manualEndptToPx(y.source()[0],N),st=E(Z,2),bt=st[0],pt=st[1],_t=this.manualEndptToPx(y.target()[0],j),St=E(_t,2),Et=St[0],Nt=St[1],Pt={x1:bt,y1:pt,x2:Et,y2:Nt};L=q(bt,pt,Et,Nt),O=Pt}else Gc("Edge ".concat(y.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),O=C;break}}return{midptPts:O,vectorNormInverse:L}},Q1.findHaystackPoints=function(y){for(var p=0;p<y.length;p++){var x=y[p],C=x._private,L=C.rscratch;if(!L.haystack){var O=Math.random()*2*Math.PI;L.source={x:Math.cos(O),y:Math.sin(O)},O=Math.random()*2*Math.PI,L.target={x:Math.cos(O),y:Math.sin(O)}}var N=C.source,j=C.target,H=N.position(),q=j.position(),W=N.width(),Z=j.width(),st=N.height(),bt=j.height(),pt=x.pstyle("haystack-radius").value,_t=pt/2;L.haystackPts=L.allpts=[L.source.x*W*_t+H.x,L.source.y*st*_t+H.y,L.target.x*Z*_t+q.x,L.target.y*bt*_t+q.y],L.midX=(L.allpts[0]+L.allpts[2])/2,L.midY=(L.allpts[1]+L.allpts[3])/2,L.edgeType="haystack",L.haystack=!0,this.storeEdgeProjections(x),this.calculateArrowAngles(x),this.recalculateEdgeLabelProjections(x),this.calculateLabelAngles(x)}},Q1.findSegmentsPoints=function(y,p){var x=y._private.rscratch,C=y.pstyle("segment-weights"),L=y.pstyle("segment-distances"),O=Math.min(C.pfValue.length,L.pfValue.length);x.edgeType="segments",x.segpts=[];for(var N=0;N<O;N++){var j=C.pfValue[N],H=L.pfValue[N],q=1-j,W=j,Z=this.findMidptPtsEtc(y,p),st=Z.midptPts,bt=Z.vectorNormInverse,pt={x:st.x1*q+st.x2*W,y:st.y1*q+st.y2*W};x.segpts.push(pt.x+bt.x*H,pt.y+bt.y*H)}},Q1.findLoopPoints=function(y,p,x,C){var L=y._private.rscratch,O=p.dirCounts,N=p.srcPos,j=y.pstyle("control-point-distances"),H=j?j.pfValue[0]:void 0,q=y.pstyle("loop-direction").pfValue,W=y.pstyle("loop-sweep").pfValue,Z=y.pstyle("control-point-step-size").pfValue;L.edgeType="self";var st=x,bt=Z;C&&(st=0,bt=H);var pt=q-Math.PI/2,_t=pt-W/2,St=pt+W/2,Et=q+"_"+W;st=O[Et]===void 0?O[Et]=0:++O[Et],L.ctrlpts=[N.x+Math.cos(_t)*1.4*bt*(st/3+1),N.y+Math.sin(_t)*1.4*bt*(st/3+1),N.x+Math.cos(St)*1.4*bt*(st/3+1),N.y+Math.sin(St)*1.4*bt*(st/3+1)]},Q1.findCompoundLoopPoints=function(y,p,x,C){var L=y._private.rscratch;L.edgeType="compound";var O=p.srcPos,N=p.tgtPos,j=p.srcW,H=p.srcH,q=p.tgtW,W=p.tgtH,Z=y.pstyle("control-point-step-size").pfValue,st=y.pstyle("control-point-distances"),bt=st?st.pfValue[0]:void 0,pt=x,_t=Z;C&&(pt=0,_t=bt);var St=50,Et={x:O.x-j/2,y:O.y-H/2},Nt={x:N.x-q/2,y:N.y-W/2},Pt={x:Math.min(Et.x,Nt.x),y:Math.min(Et.y,Nt.y)},qt=.5,re=Math.max(qt,Math.log(j*.01)),ee=Math.max(qt,Math.log(q*.01));L.ctrlpts=[Pt.x,Pt.y-(1+Math.pow(St,1.12)/100)*_t*(pt/3+1)*re,Pt.x-(1+Math.pow(St,1.12)/100)*_t*(pt/3+1)*ee,Pt.y]},Q1.findStraightEdgePoints=function(y){y._private.rscratch.edgeType="straight"},Q1.findBezierPoints=function(y,p,x,C,L){var O=y._private.rscratch,N=y.pstyle("control-point-step-size").pfValue,j=y.pstyle("control-point-distances"),H=y.pstyle("control-point-weights"),q=j&&H?Math.min(j.value.length,H.value.length):1,W=j?j.pfValue[0]:void 0,Z=H.value[0],st=C;O.edgeType=st?"multibezier":"bezier",O.ctrlpts=[];for(var bt=0;bt<q;bt++){var pt=(.5-p.eles.length/2+x)*N*(L?-1:1),_t=void 0,St=FB(pt);st&&(W=j?j.pfValue[bt]:N,Z=H.value[bt]),C?_t=W:_t=W!==void 0?St*W:void 0;var Et=_t!==void 0?_t:pt,Nt=1-Z,Pt=Z,qt=this.findMidptPtsEtc(y,p),re=qt.midptPts,ee=qt.vectorNormInverse,Ut={x:re.x1*Nt+re.x2*Pt,y:re.y1*Nt+re.y2*Pt};O.ctrlpts.push(Ut.x+ee.x*Et,Ut.y+ee.y*Et)}},Q1.findTaxiPoints=function(y,p){var x=y._private.rscratch;x.edgeType="segments";var C="vertical",L="horizontal",O="leftward",N="rightward",j="downward",H="upward",q="auto",W=p.posPts,Z=p.srcW,st=p.srcH,bt=p.tgtW,pt=p.tgtH,_t=y.pstyle("edge-distances").value,St=_t!=="node-position",Et=y.pstyle("taxi-direction").value,Nt=Et,Pt=y.pstyle("taxi-turn"),qt=Pt.units==="%",re=Pt.pfValue,ee=re<0,Ut=y.pstyle("taxi-turn-min-distance").pfValue,de=St?(Z+bt)/2:0,Yt=St?(st+pt)/2:0,Ee=W.x2-W.x1,Te=W.y2-W.y1,ie=function(hr,us){return hr>0?Math.max(hr-us,0):Math.min(hr+us,0)},ze=ie(Ee,de),me=ie(Te,Yt),yn=!1;Nt===q?Et=Math.abs(ze)>Math.abs(me)?L:C:Nt===H||Nt===j?(Et=C,yn=!0):(Nt===O||Nt===N)&&(Et=L,yn=!0);var nn=Et===C,qe=nn?me:ze,Tn=nn?Te:Ee,Xn=FB(Tn),lr=!1;!(yn&&(qt||ee))&&(Nt===j&&Tn<0||Nt===H&&Tn>0||Nt===O&&Tn>0||Nt===N&&Tn<0)&&(Xn*=-1,qe=Xn*Math.abs(qe),lr=!0);var Sn;if(qt){var or=re<0?1+re:re;Sn=or*qe}else{var pr=re<0?qe:0;Sn=pr+re*Xn}var kr=function(hr){return Math.abs(hr)<Ut||Math.abs(hr)>=Math.abs(qe)},wr=kr(Sn),Cr=kr(Math.abs(qe)-Math.abs(Sn)),$n=wr||Cr;if($n&&!lr)if(nn){var cr=Math.abs(Tn)<=st/2,mr=Math.abs(Ee)<=bt/2;if(cr){var Sr=(W.x1+W.x2)/2,gi=W.y1,ss=W.y2;x.segpts=[Sr,gi,Sr,ss]}else if(mr){var na=(W.y1+W.y2)/2,vi=W.x1,si=W.x2;x.segpts=[vi,na,si,na]}else x.segpts=[W.x1,W.y2]}else{var Qi=Math.abs(Tn)<=Z/2,ks=Math.abs(Te)<=pt/2;if(Qi){var as=(W.y1+W.y2)/2,Es=W.x1,eo=W.x2;x.segpts=[Es,as,eo,as]}else if(ks){var Ta=(W.x1+W.x2)/2,pa=W.y1,mo=W.y2;x.segpts=[Ta,pa,Ta,mo]}else x.segpts=[W.x2,W.y1]}else if(nn){var Kn=W.y1+Sn+(St?st/2*Xn:0),G=W.x1,Vn=W.x2;x.segpts=[G,Kn,Vn,Kn]}else{var gr=W.x1+Sn+(St?Z/2*Xn:0),nr=W.y1,Be=W.y2;x.segpts=[gr,nr,gr,Be]}},Q1.tryToCorrectInvalidPoints=function(y,p){var x=y._private.rscratch;if(x.edgeType==="bezier"){var C=p.srcPos,L=p.tgtPos,O=p.srcW,N=p.srcH,j=p.tgtW,H=p.tgtH,q=p.srcShape,W=p.tgtShape,Z=!Q(x.startX)||!Q(x.startY),st=!Q(x.arrowStartX)||!Q(x.arrowStartY),bt=!Q(x.endX)||!Q(x.endY),pt=!Q(x.arrowEndX)||!Q(x.arrowEndY),_t=3,St=this.getArrowWidth(y.pstyle("width").pfValue,y.pstyle("arrow-scale").value)*this.arrowShapeWidth,Et=_t*St,Nt=w4({x:x.ctrlpts[0],y:x.ctrlpts[1]},{x:x.startX,y:x.startY}),Pt=Nt<Et,qt=w4({x:x.ctrlpts[0],y:x.ctrlpts[1]},{x:x.endX,y:x.endY}),re=qt<Et,ee=!1;if(Z||st||Pt){ee=!0;var Ut={x:x.ctrlpts[0]-C.x,y:x.ctrlpts[1]-C.y},de=Math.sqrt(Ut.x*Ut.x+Ut.y*Ut.y),Yt={x:Ut.x/de,y:Ut.y/de},Ee=Math.max(O,N),Te={x:x.ctrlpts[0]+Yt.x*2*Ee,y:x.ctrlpts[1]+Yt.y*2*Ee},ie=q.intersectLine(C.x,C.y,O,N,Te.x,Te.y,0);Pt?(x.ctrlpts[0]=x.ctrlpts[0]+Yt.x*(Et-Nt),x.ctrlpts[1]=x.ctrlpts[1]+Yt.y*(Et-Nt)):(x.ctrlpts[0]=ie[0]+Yt.x*Et,x.ctrlpts[1]=ie[1]+Yt.y*Et)}if(bt||pt||re){ee=!0;var ze={x:x.ctrlpts[0]-L.x,y:x.ctrlpts[1]-L.y},me=Math.sqrt(ze.x*ze.x+ze.y*ze.y),yn={x:ze.x/me,y:ze.y/me},nn=Math.max(O,N),qe={x:x.ctrlpts[0]+yn.x*2*nn,y:x.ctrlpts[1]+yn.y*2*nn},Tn=W.intersectLine(L.x,L.y,j,H,qe.x,qe.y,0);re?(x.ctrlpts[0]=x.ctrlpts[0]+yn.x*(Et-qt),x.ctrlpts[1]=x.ctrlpts[1]+yn.y*(Et-qt)):(x.ctrlpts[0]=Tn[0]+yn.x*Et,x.ctrlpts[1]=Tn[1]+yn.y*Et)}ee&&this.findEndpoints(y)}},Q1.storeAllpts=function(y){var p=y._private.rscratch;if(p.edgeType==="multibezier"||p.edgeType==="bezier"||p.edgeType==="self"||p.edgeType==="compound"){p.allpts=[],p.allpts.push(p.startX,p.startY);for(var x=0;x+1<p.ctrlpts.length;x+=2)p.allpts.push(p.ctrlpts[x],p.ctrlpts[x+1]),x+3<p.ctrlpts.length&&p.allpts.push((p.ctrlpts[x]+p.ctrlpts[x+2])/2,(p.ctrlpts[x+1]+p.ctrlpts[x+3])/2);p.allpts.push(p.endX,p.endY);var C,L;p.ctrlpts.length/2%2===0?(C=p.allpts.length/2-1,p.midX=p.allpts[C],p.midY=p.allpts[C+1]):(C=p.allpts.length/2-3,L=.5,p.midX=Lf(p.allpts[C],p.allpts[C+2],p.allpts[C+4],L),p.midY=Lf(p.allpts[C+1],p.allpts[C+3],p.allpts[C+5],L))}else if(p.edgeType==="straight")p.allpts=[p.startX,p.startY,p.endX,p.endY],p.midX=(p.startX+p.endX+p.arrowStartX+p.arrowEndX)/4,p.midY=(p.startY+p.endY+p.arrowStartY+p.arrowEndY)/4;else if(p.edgeType==="segments")if(p.allpts=[],p.allpts.push(p.startX,p.startY),p.allpts.push.apply(p.allpts,p.segpts),p.allpts.push(p.endX,p.endY),p.segpts.length%4===0){var O=p.segpts.length/2,N=O-2;p.midX=(p.segpts[N]+p.segpts[O])/2,p.midY=(p.segpts[N+1]+p.segpts[O+1])/2}else{var j=p.segpts.length/2-1;p.midX=p.segpts[j],p.midY=p.segpts[j+1]}},Q1.checkForInvalidEdgeWarning=function(y){var p=y[0]._private.rscratch;p.nodesOverlap||Q(p.startX)&&Q(p.startY)&&Q(p.endX)&&Q(p.endY)?p.loggedErr=!1:p.loggedErr||(p.loggedErr=!0,Gc("Edge `"+y.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Q1.findEdgeControlPoints=function(y){var p=this;if(!(!y||y.length===0)){for(var x=this,C=x.cy,L=C.hasCompoundNodes(),O={map:new F2,get:function(Ut){var de=this.map.get(Ut[0]);return de!=null?de.get(Ut[1]):null},set:function(Ut,de){var Yt=this.map.get(Ut[0]);Yt==null&&(Yt=new F2,this.map.set(Ut[0],Yt)),Yt.set(Ut[1],de)}},N=[],j=[],H=0;H<y.length;H++){var q=y[H],W=q._private,Z=q.pstyle("curve-style").value;if(!(q.removed()||!q.takesUpSpace())){if(Z==="haystack"){j.push(q);continue}var st=Z==="unbundled-bezier"||Z==="segments"||Z==="straight"||Z==="straight-triangle"||Z==="taxi",bt=Z==="unbundled-bezier"||Z==="bezier",pt=W.source,_t=W.target,St=pt.poolIndex(),Et=_t.poolIndex(),Nt=[St,Et].sort(),Pt=O.get(Nt);Pt==null&&(Pt={eles:[]},O.set(Nt,Pt),N.push(Nt)),Pt.eles.push(q),st&&(Pt.hasUnbundled=!0),bt&&(Pt.hasBezier=!0)}}for(var qt=function(Ut){var de=N[Ut],Yt=O.get(de),Ee=void 0;if(!Yt.hasUnbundled){var Te=Yt.eles[0].parallelEdges().filter(function(mo){return mo.isBundledBezier()});G9(Yt.eles),Te.forEach(function(mo){return Yt.eles.push(mo)}),Yt.eles.sort(function(mo,Kn){return mo.poolIndex()-Kn.poolIndex()})}var ie=Yt.eles[0],ze=ie.source(),me=ie.target();if(ze.poolIndex()>me.poolIndex()){var yn=ze;ze=me,me=yn}var nn=Yt.srcPos=ze.position(),qe=Yt.tgtPos=me.position(),Tn=Yt.srcW=ze.outerWidth(),Xn=Yt.srcH=ze.outerHeight(),lr=Yt.tgtW=me.outerWidth(),Sn=Yt.tgtH=me.outerHeight(),or=Yt.srcShape=x.nodeShapes[p.getNodeShape(ze)],pr=Yt.tgtShape=x.nodeShapes[p.getNodeShape(me)];Yt.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var kr=0;kr<Yt.eles.length;kr++){var wr=Yt.eles[kr],Cr=wr[0]._private.rscratch,$n=wr.pstyle("curve-style").value,cr=$n==="unbundled-bezier"||$n==="segments"||$n==="taxi",mr=!ze.same(wr.source());if(!Yt.calculatedIntersection&&ze!==me&&(Yt.hasBezier||Yt.hasUnbundled)){Yt.calculatedIntersection=!0;var Sr=or.intersectLine(nn.x,nn.y,Tn,Xn,qe.x,qe.y,0),gi=Yt.srcIntn=Sr,ss=pr.intersectLine(qe.x,qe.y,lr,Sn,nn.x,nn.y,0),na=Yt.tgtIntn=ss,vi=Yt.intersectionPts={x1:Sr[0],x2:ss[0],y1:Sr[1],y2:ss[1]},si=Yt.posPts={x1:nn.x,x2:qe.x,y1:nn.y,y2:qe.y},Qi=ss[1]-Sr[1],ks=ss[0]-Sr[0],as=Math.sqrt(ks*ks+Qi*Qi),Es=Yt.vector={x:ks,y:Qi},eo=Yt.vectorNorm={x:Es.x/as,y:Es.y/as},Ta={x:-eo.y,y:eo.x};Yt.nodesOverlap=!Q(as)||pr.checkPoint(Sr[0],Sr[1],0,lr,Sn,qe.x,qe.y)||or.checkPoint(ss[0],ss[1],0,Tn,Xn,nn.x,nn.y),Yt.vectorNormInverse=Ta,Ee={nodesOverlap:Yt.nodesOverlap,dirCounts:Yt.dirCounts,calculatedIntersection:!0,hasBezier:Yt.hasBezier,hasUnbundled:Yt.hasUnbundled,eles:Yt.eles,srcPos:qe,tgtPos:nn,srcW:lr,srcH:Sn,tgtW:Tn,tgtH:Xn,srcIntn:na,tgtIntn:gi,srcShape:pr,tgtShape:or,posPts:{x1:si.x2,y1:si.y2,x2:si.x1,y2:si.y1},intersectionPts:{x1:vi.x2,y1:vi.y2,x2:vi.x1,y2:vi.y1},vector:{x:-Es.x,y:-Es.y},vectorNorm:{x:-eo.x,y:-eo.y},vectorNormInverse:{x:-Ta.x,y:-Ta.y}}}var pa=mr?Ee:Yt;Cr.nodesOverlap=pa.nodesOverlap,Cr.srcIntn=pa.srcIntn,Cr.tgtIntn=pa.tgtIntn,L&&(ze.isParent()||ze.isChild()||me.isParent()||me.isChild())&&(ze.parents().anySame(me)||me.parents().anySame(ze)||ze.same(me)&&ze.isParent())?p.findCompoundLoopPoints(wr,pa,kr,cr):ze===me?p.findLoopPoints(wr,pa,kr,cr):$n==="segments"?p.findSegmentsPoints(wr,pa):$n==="taxi"?p.findTaxiPoints(wr,pa):$n==="straight"||!cr&&Yt.eles.length%2===1&&kr===Math.floor(Yt.eles.length/2)?p.findStraightEdgePoints(wr):p.findBezierPoints(wr,pa,kr,cr,mr),p.findEndpoints(wr),p.tryToCorrectInvalidPoints(wr,pa),p.checkForInvalidEdgeWarning(wr),p.storeAllpts(wr),p.storeEdgeProjections(wr),p.calculateArrowAngles(wr),p.recalculateEdgeLabelProjections(wr),p.calculateLabelAngles(wr)}},re=0;re<N.length;re++)qt(re);this.findHaystackPoints(j)}};function xj(y){var p=[];if(y!=null){for(var x=0;x<y.length;x+=2){var C=y[x],L=y[x+1];p.push({x:C,y:L})}return p}}Q1.getSegmentPoints=function(y){var p=y[0]._private.rscratch,x=p.edgeType;if(x==="segments")return this.recalculateRenderedStyle(y),xj(p.segpts)},Q1.getControlPoints=function(y){var p=y[0]._private.rscratch,x=p.edgeType;if(x==="bezier"||x==="multibezier"||x==="self"||x==="compound")return this.recalculateRenderedStyle(y),xj(p.ctrlpts)},Q1.getEdgeMidpoint=function(y){var p=y[0]._private.rscratch;return this.recalculateRenderedStyle(y),{x:p.midX,y:p.midY}};var eE={};eE.manualEndptToPx=function(y,p){var x=this,C=y.position(),L=y.outerWidth(),O=y.outerHeight();if(p.value.length===2){var N=[p.pfValue[0],p.pfValue[1]];return p.units[0]==="%"&&(N[0]=N[0]*L),p.units[1]==="%"&&(N[1]=N[1]*O),N[0]+=C.x,N[1]+=C.y,N}else{var j=p.pfValue[0];j=-Math.PI/2+j;var H=2*Math.max(L,O),q=[C.x+Math.cos(j)*H,C.y+Math.sin(j)*H];return x.nodeShapes[this.getNodeShape(y)].intersectLine(C.x,C.y,L,O,q[0],q[1],0)}},eE.findEndpoints=function(y){var p=this,x,C=y.source()[0],L=y.target()[0],O=C.position(),N=L.position(),j=y.pstyle("target-arrow-shape").value,H=y.pstyle("source-arrow-shape").value,q=y.pstyle("target-distance-from-node").pfValue,W=y.pstyle("source-distance-from-node").pfValue,Z=y.pstyle("curve-style").value,st=y._private.rscratch,bt=st.edgeType,pt=Z==="taxi",_t=bt==="self"||bt==="compound",St=bt==="bezier"||bt==="multibezier"||_t,Et=bt!=="bezier",Nt=bt==="straight"||bt==="segments",Pt=bt==="segments",qt=St||Et||Nt,re=_t||pt,ee=y.pstyle("source-endpoint"),Ut=re?"outside-to-node":ee.value,de=y.pstyle("target-endpoint"),Yt=re?"outside-to-node":de.value;st.srcManEndpt=ee,st.tgtManEndpt=de;var Ee,Te,ie,ze;if(St){var me=[st.ctrlpts[0],st.ctrlpts[1]],yn=Et?[st.ctrlpts[st.ctrlpts.length-2],st.ctrlpts[st.ctrlpts.length-1]]:me;Ee=yn,Te=me}else if(Nt){var nn=Pt?st.segpts.slice(0,2):[N.x,N.y],qe=Pt?st.segpts.slice(st.segpts.length-2):[O.x,O.y];Ee=qe,Te=nn}if(Yt==="inside-to-node")x=[N.x,N.y];else if(de.units)x=this.manualEndptToPx(L,de);else if(Yt==="outside-to-line")x=st.tgtIntn;else if(Yt==="outside-to-node"||Yt==="outside-to-node-or-label"?ie=Ee:(Yt==="outside-to-line"||Yt==="outside-to-line-or-label")&&(ie=[O.x,O.y]),x=p.nodeShapes[this.getNodeShape(L)].intersectLine(N.x,N.y,L.outerWidth(),L.outerHeight(),ie[0],ie[1],0),Yt==="outside-to-node-or-label"||Yt==="outside-to-line-or-label"){var Tn=L._private.rscratch,Xn=Tn.labelWidth,lr=Tn.labelHeight,Sn=Tn.labelX,or=Tn.labelY,pr=Xn/2,kr=lr/2,wr=L.pstyle("text-valign").value;wr==="top"?or-=kr:wr==="bottom"&&(or+=kr);var Cr=L.pstyle("text-halign").value;Cr==="left"?Sn-=pr:Cr==="right"&&(Sn+=pr);var $n=B8(ie[0],ie[1],[Sn-pr,or-kr,Sn+pr,or-kr,Sn+pr,or+kr,Sn-pr,or+kr],N.x,N.y);if($n.length>0){var cr=O,mr=m4(cr,Yx(x)),Sr=m4(cr,Yx($n)),gi=mr;if(Sr<mr&&(x=$n,gi=Sr),$n.length>2){var ss=m4(cr,{x:$n[2],y:$n[3]});ss<gi&&(x=[$n[2],$n[3]])}}}var na=tC(x,Ee,p.arrowShapes[j].spacing(y)+q),vi=tC(x,Ee,p.arrowShapes[j].gap(y)+q);if(st.endX=vi[0],st.endY=vi[1],st.arrowEndX=na[0],st.arrowEndY=na[1],Ut==="inside-to-node")x=[O.x,O.y];else if(ee.units)x=this.manualEndptToPx(C,ee);else if(Ut==="outside-to-line")x=st.srcIntn;else if(Ut==="outside-to-node"||Ut==="outside-to-node-or-label"?ze=Te:(Ut==="outside-to-line"||Ut==="outside-to-line-or-label")&&(ze=[N.x,N.y]),x=p.nodeShapes[this.getNodeShape(C)].intersectLine(O.x,O.y,C.outerWidth(),C.outerHeight(),ze[0],ze[1],0),Ut==="outside-to-node-or-label"||Ut==="outside-to-line-or-label"){var si=C._private.rscratch,Qi=si.labelWidth,ks=si.labelHeight,as=si.labelX,Es=si.labelY,eo=Qi/2,Ta=ks/2,pa=C.pstyle("text-valign").value;pa==="top"?Es-=Ta:pa==="bottom"&&(Es+=Ta);var mo=C.pstyle("text-halign").value;mo==="left"?as-=eo:mo==="right"&&(as+=eo);var Kn=B8(ze[0],ze[1],[as-eo,Es-Ta,as+eo,Es-Ta,as+eo,Es+Ta,as-eo,Es+Ta],O.x,O.y);if(Kn.length>0){var G=N,Vn=m4(G,Yx(x)),gr=m4(G,Yx(Kn)),nr=Vn;if(gr<Vn&&(x=[Kn[0],Kn[1]],nr=gr),Kn.length>2){var Be=m4(G,{x:Kn[2],y:Kn[3]});Be<nr&&(x=[Kn[2],Kn[3]])}}}var Ls=tC(x,Te,p.arrowShapes[H].spacing(y)+W),hr=tC(x,Te,p.arrowShapes[H].gap(y)+W);st.startX=hr[0],st.startY=hr[1],st.arrowStartX=Ls[0],st.arrowStartY=Ls[1],qt&&(!Q(st.startX)||!Q(st.startY)||!Q(st.endX)||!Q(st.endY)?st.badLine=!0:st.badLine=!1)},eE.getSourceEndpoint=function(y){var p=y[0]._private.rscratch;switch(this.recalculateRenderedStyle(y),p.edgeType){case"haystack":return{x:p.haystackPts[0],y:p.haystackPts[1]};default:return{x:p.arrowStartX,y:p.arrowStartY}}},eE.getTargetEndpoint=function(y){var p=y[0]._private.rscratch;switch(this.recalculateRenderedStyle(y),p.edgeType){case"haystack":return{x:p.haystackPts[2],y:p.haystackPts[3]};default:return{x:p.arrowEndX,y:p.arrowEndY}}};var mM={};function kj(y,p,x){for(var C=function(q,W,Z,st){return Lf(q,W,Z,st)},L=p._private,O=L.rstyle.bezierPts,N=0;N<y.bezierProjPcts.length;N++){var j=y.bezierProjPcts[N];O.push({x:C(x[0],x[2],x[4],j),y:C(x[1],x[3],x[5],j)})}}mM.storeEdgeProjections=function(y){var p=y._private,x=p.rscratch,C=x.edgeType;if(p.rstyle.bezierPts=null,p.rstyle.linePts=null,p.rstyle.haystackPts=null,C==="multibezier"||C==="bezier"||C==="self"||C==="compound"){p.rstyle.bezierPts=[];for(var L=0;L+5<x.allpts.length;L+=4)kj(this,y,x.allpts.slice(L,L+6))}else if(C==="segments")for(var O=p.rstyle.linePts=[],L=0;L+1<x.allpts.length;L+=2)O.push({x:x.allpts[L],y:x.allpts[L+1]});else if(C==="haystack"){var N=x.haystackPts;p.rstyle.haystackPts=[{x:N[0],y:N[1]},{x:N[2],y:N[3]}]}p.rstyle.arrowWidth=this.getArrowWidth(y.pstyle("width").pfValue,y.pstyle("arrow-scale").value)*this.arrowShapeWidth},mM.recalculateEdgeProjections=function(y){this.findEdgeControlPoints(y)};var j2={};j2.recalculateNodeLabelProjection=function(y){var p=y.pstyle("label").strValue;if(!Ft(p)){var x,C,L=y._private,O=y.width(),N=y.height(),j=y.padding(),H=y.position(),q=y.pstyle("text-halign").strValue,W=y.pstyle("text-valign").strValue,Z=L.rscratch,st=L.rstyle;switch(q){case"left":x=H.x-O/2-j;break;case"right":x=H.x+O/2+j;break;default:x=H.x}switch(W){case"top":C=H.y-N/2-j;break;case"bottom":C=H.y+N/2+j;break;default:C=H.y}Z.labelX=x,Z.labelY=C,st.labelX=x,st.labelY=C,this.calculateLabelAngles(y),this.applyLabelDimensions(y)}};var Ej=function(p,x){var C=Math.atan(x/p);return p===0&&C<0&&(C=C*-1),C},DC=function(p,x){var C=x.x-p.x,L=x.y-p.y;return Ej(C,L)},Uet=function(p,x,C,L){var O=P8(0,L-.001,1),N=P8(0,L+.001,1),j=Xx(p,x,C,O),H=Xx(p,x,C,N);return DC(j,H)};j2.recalculateEdgeLabelProjections=function(y){var p,x=y._private,C=x.rscratch,L=this,O={mid:y.pstyle("label").strValue,source:y.pstyle("source-label").strValue,target:y.pstyle("target-label").strValue};if(O.mid||O.source||O.target){p={x:C.midX,y:C.midY};var N=function(Z,st,bt){cy(x.rscratch,Z,st,bt),cy(x.rstyle,Z,st,bt)};N("labelX",null,p.x),N("labelY",null,p.y);var j=Ej(C.midDispX,C.midDispY);N("labelAutoAngle",null,j);var H=function W(){if(W.cache)return W.cache;for(var Z=[],st=0;st+5<C.allpts.length;st+=4){var bt={x:C.allpts[st],y:C.allpts[st+1]},pt={x:C.allpts[st+2],y:C.allpts[st+3]},_t={x:C.allpts[st+4],y:C.allpts[st+5]};Z.push({p0:bt,p1:pt,p2:_t,startDist:0,length:0,segments:[]})}var St=x.rstyle.bezierPts,Et=L.bezierProjPcts.length;function Nt(Ut,de,Yt,Ee,Te){var ie=w4(de,Yt),ze=Ut.segments[Ut.segments.length-1],me={p0:de,p1:Yt,t0:Ee,t1:Te,startDist:ze?ze.startDist+ze.length:0,length:ie};Ut.segments.push(me),Ut.length+=ie}for(var Pt=0;Pt<Z.length;Pt++){var qt=Z[Pt],re=Z[Pt-1];re&&(qt.startDist=re.startDist+re.length),Nt(qt,qt.p0,St[Pt*Et],0,L.bezierProjPcts[0]);for(var ee=0;ee<Et-1;ee++)Nt(qt,St[Pt*Et+ee],St[Pt*Et+ee+1],L.bezierProjPcts[ee],L.bezierProjPcts[ee+1]);Nt(qt,St[Pt*Et+Et-1],qt.p2,L.bezierProjPcts[Et-1],1)}return W.cache=Z},q=function(Z){var st,bt=Z==="source";if(O[Z]){var pt=y.pstyle(Z+"-text-offset").pfValue;switch(C.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var _t=H(),St,Et=0,Nt=0,Pt=0;Pt<_t.length;Pt++){for(var qt=_t[bt?Pt:_t.length-1-Pt],re=0;re<qt.segments.length;re++){var ee=qt.segments[bt?re:qt.segments.length-1-re],Ut=Pt===_t.length-1&&re===qt.segments.length-1;if(Et=Nt,Nt+=ee.length,Nt>=pt||Ut){St={cp:qt,segment:ee};break}}if(St)break}var de=St.cp,Yt=St.segment,Ee=(pt-Et)/Yt.length,Te=Yt.t1-Yt.t0,ie=bt?Yt.t0+Te*Ee:Yt.t1-Te*Ee;ie=P8(0,ie,1),p=Xx(de.p0,de.p1,de.p2,ie),st=Uet(de.p0,de.p1,de.p2,ie);break}case"straight":case"segments":case"haystack":{for(var ze=0,me,yn,nn,qe,Tn=C.allpts.length,Xn=0;Xn+3<Tn&&(bt?(nn={x:C.allpts[Xn],y:C.allpts[Xn+1]},qe={x:C.allpts[Xn+2],y:C.allpts[Xn+3]}):(nn={x:C.allpts[Tn-2-Xn],y:C.allpts[Tn-1-Xn]},qe={x:C.allpts[Tn-4-Xn],y:C.allpts[Tn-3-Xn]}),me=w4(nn,qe),yn=ze,ze+=me,!(ze>=pt));Xn+=2);var lr=pt-yn,Sn=lr/me;Sn=P8(0,Sn,1),p=fQ(nn,qe,Sn),st=DC(nn,qe);break}}N("labelX",Z,p.x),N("labelY",Z,p.y),N("labelAutoAngle",Z,st)}};q("source"),q("target"),this.applyLabelDimensions(y)}},j2.applyLabelDimensions=function(y){this.applyPrefixedLabelDimensions(y),y.isEdge()&&(this.applyPrefixedLabelDimensions(y,"source"),this.applyPrefixedLabelDimensions(y,"target"))},j2.applyPrefixedLabelDimensions=function(y,p){var x=y._private,C=this.getLabelText(y,p),L=this.calculateLabelDimensions(y,C),O=y.pstyle("line-height").pfValue,N=y.pstyle("text-wrap").strValue,j=fb(x.rscratch,"labelWrapCachedLines",p)||[],H=N!=="wrap"?1:Math.max(j.length,1),q=L.height/H,W=q*O,Z=L.width,st=L.height+(H-1)*(O-1)*q;cy(x.rstyle,"labelWidth",p,Z),cy(x.rscratch,"labelWidth",p,Z),cy(x.rstyle,"labelHeight",p,st),cy(x.rscratch,"labelHeight",p,st),cy(x.rscratch,"labelLineHeight",p,W)},j2.getLabelText=function(y,p){var x=y._private,C=p?p+"-":"",L=y.pstyle(C+"label").strValue,O=y.pstyle("text-transform").value,N=function(lr,Sn){return Sn?(cy(x.rscratch,lr,p,Sn),Sn):fb(x.rscratch,lr,p)};if(!L)return"";O=="none"||(O=="uppercase"?L=L.toUpperCase():O=="lowercase"&&(L=L.toLowerCase()));var j=y.pstyle("text-wrap").value;if(j==="wrap"){var H=N("labelKey");if(H!=null&&N("labelWrapKey")===H)return N("labelWrapCachedText");for(var q="​",W=L.split(`
1640 `+_+"^"},test_match:function(S,_){var M,F,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),F=S[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],M=this.performAction.call(this,this.yy,this,_,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var B in R)this[B]=R[B];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,_,M,F;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),B=0;B<R.length;B++)if(M=this._input.match(this.rules[R[B]]),M&&(!_||M[0].length>_[0].length)){if(_=M,F=B,this.options.backtrack_lexer){if(S=this.test_match(M,R[B]),S!==!1)return S;if(this._backtrack){_=!1;continue}else return!1}else if(!this.options.flex)break}return _?(S=this.test_match(_,R[F]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
1647 `+ct+"^"},test_match:function(mt,ct){var rt,it,gt;if(this.options.backtrack_lexer&&(gt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(gt.yylloc.range=this.yylloc.range.slice(0))),it=mt[0].match(/(?:\r\n?|\n).*/g),it&&(this.yylineno+=it.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:it?it[it.length-1].length-it[it.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+mt[0].length},this.yytext+=mt[0],this.match+=mt[0],this.matches=mt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(mt[0].length),this.matched+=mt[0],rt=this.performAction.call(this,this.yy,this,ct,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),rt)return rt;if(this._backtrack){for(var Q in gt)this[Q]=gt[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var mt,ct,rt,it;this._more||(this.yytext="",this.match="");for(var gt=this._currentRules(),Q=0;Q<gt.length;Q++)if(rt=this._input.match(this.rules[gt[Q]]),rt&&(!ct||rt[0].length>ct[0].length)){if(ct=rt,it=Q,this.options.backtrack_lexer){if(mt=this.test_match(rt,gt[Q]),mt!==!1)return mt;if(this._backtrack){ct=!1;continue}else return!1}else if(!this.options.flex)break}return ct?(mt=this.test_match(ct,gt[it]),mt!==!1?mt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.