mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-09 13:44:53 +08:00
97 lines
275 KiB
JavaScript
97 lines
275 KiB
JavaScript
import{a as xc,b as yc,f as _c,h as Cc}from"./chunk-2YVZDWG7.js";var Dc=_c(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.sanitizeUrl=void 0;var Fg=/^([^\w]*)(javascript|data|vbscript)/im,Ag=/&#(\w+)(^\w|;)?/g,Lg=/&(newline|tab);/gi,Eg=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Og=/^.+(:|:)/gim,Ig=[".","/"];function Dg(t){return Ig.indexOf(t[0])>-1}function Ng(t){return t.replace(Ag,function(e,r){return String.fromCharCode(r)})}function $g(t){var e=Ng(t||"").replace(Lg,"").replace(Eg,"").trim();if(!e)return"about:blank";if(Dg(e))return e;var r=e.match(Og);if(!r)return e;var i=r[0];return Fg.test(i)?"about:blank":e}Fn.sanitizeUrl=$g});var op=_c((fl,pl)=>{(function(t,e){typeof fl=="object"&&typeof pl!="undefined"?pl.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.DOMPurify=e())})(fl,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:n}=Object,{freeze:o,seal:a,create:s}=Object,{apply:l,construct:c}=typeof Reflect!="undefined"&&Reflect;l||(l=function(O,Y,j){return O.apply(Y,j)}),o||(o=function(O){return O}),a||(a=function(O){return O}),c||(c=function(O,Y){return new O(...Y)});let u=B(Array.prototype.forEach),h=B(Array.prototype.pop),f=B(Array.prototype.push),p=B(String.prototype.toLowerCase),g=B(String.prototype.toString),y=B(String.prototype.match),T=B(String.prototype.replace),S=B(String.prototype.indexOf),x=B(String.prototype.trim),v=B(RegExp.prototype.test),L=k(TypeError);function B(W){return function(O){for(var Y=arguments.length,j=new Array(Y>1?Y-1:0),mt=1;mt<Y;mt++)j[mt-1]=arguments[mt];return l(W,O,j)}}function k(W){return function(){for(var O=arguments.length,Y=new Array(O),j=0;j<O;j++)Y[j]=arguments[j];return c(W,Y)}}function _(W,O,Y){var j;Y=(j=Y)!==null&&j!==void 0?j:p,e&&e(W,null);let mt=O.length;for(;mt--;){let Xt=O[mt];if(typeof Xt=="string"){let ee=Y(Xt);ee!==Xt&&(r(O)||(O[mt]=ee),Xt=ee)}W[Xt]=!0}return W}function G(W){let O=s(null);for(let[Y,j]of t(W))O[Y]=j;return O}function it(W,O){for(;W!==null;){let j=n(W,O);if(j){if(j.get)return B(j.get);if(typeof j.value=="function")return B(j.value)}W=i(W)}function Y(j){return console.warn("fallback value for",j),null}return Y}let Q=o(["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"]),I=o(["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"]),U=o(["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"]),E=o(["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"]),P=o(["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"]),Lt=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=o(["#text"]),ut=o(["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"]),X=o(["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"]),at=o(["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"]),Rt=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ae=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Le=a(/<%[\w\W]*|[\w\W]*%>/gm),Je=a(/\${[\w\W]*}/gm),tr=a(/^data-[\-\w.\u00B7-\uFFFF]/),zt=a(/^aria-[\-\w]+$/),Ee=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),er=a(/^(?:\w+script|data):/i),rr=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),F=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ae,ERB_EXPR:Le,TMPLIT_EXPR:Je,DATA_ATTR:tr,ARIA_ATTR:zt,IS_ALLOWED_URI:Ee,IS_SCRIPT_OR_DATA:er,ATTR_WHITESPACE:rr,DOCTYPE_NAME:F});let H=()=>typeof window=="undefined"?null:window,C=function(O,Y){if(typeof O!="object"||typeof O.createPolicy!="function")return null;let j=null,mt="data-tt-policy-suffix";Y&&Y.hasAttribute(mt)&&(j=Y.getAttribute(mt));let Xt="dompurify"+(j?"#"+j:"");try{return O.createPolicy(Xt,{createHTML(ee){return ee},createScriptURL(ee){return ee}})}catch(ee){return console.warn("TrustedTypes policy "+Xt+" could not be created."),null}};function vt(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H(),O=$=>vt($);if(O.version="3.0.3",O.removed=[],!W||!W.document||W.document.nodeType!==9)return O.isSupported=!1,O;let Y=W.document,j=Y.currentScript,{document:mt}=W,{DocumentFragment:Xt,HTMLTemplateElement:ee,Node:Ta,Element:Vl,NodeFilter:va,NamedNodeMap:Jm=W.NamedNodeMap||W.MozNamedAttrMap,HTMLFormElement:tg,DOMParser:eg,trustedTypes:xn}=W,yn=Vl.prototype,rg=it(yn,"cloneNode"),ig=it(yn,"nextSibling"),ng=it(yn,"childNodes"),Sa=it(yn,"parentNode");if(typeof ee=="function"){let $=mt.createElement("template");$.content&&$.content.ownerDocument&&(mt=$.content.ownerDocument)}let Et,Si="",{implementation:ka,createNodeIterator:og,createDocumentFragment:ag,getElementsByTagName:sg}=mt,{importNode:lg}=Y,re={};O.isSupported=typeof t=="function"&&typeof Sa=="function"&&ka&&ka.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:wa,ERB_EXPR:Ba,TMPLIT_EXPR:Ma,DATA_ATTR:cg,ARIA_ATTR:ug,IS_SCRIPT_OR_DATA:hg,ATTR_WHITESPACE:Gl}=q,{IS_ALLOWED_URI:Xl}=q,gt=null,Kl=_({},[...Q,...I,...U,...P,...dt]),xt=null,Zl=_({},[...ut,...X,...at,...Rt]),st=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}})),ki=null,Fa=null,Ql=!0,Aa=!0,Jl=!1,tc=!0,Dr=!1,ir=!1,La=!1,Ea=!1,Nr=!1,_n=!1,Cn=!1,ec=!0,rc=!1,fg="user-content-",Oa=!0,wi=!1,$r={},Rr=null,ic=_({},["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"]),nc=null,oc=_({},["audio","video","img","source","image","track"]),Ia=null,ac=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bn="http://www.w3.org/1998/Math/MathML",Tn="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",zr=pe,Da=!1,Na=null,pg=_({},[bn,Tn,pe],g),nr,dg=["application/xhtml+xml","text/html"],mg="text/html",yt,Pr=null,gg=mt.createElement("form"),sc=function(d){return d instanceof RegExp||d instanceof Function},$a=function(d){if(!(Pr&&Pr===d)){if((!d||typeof d!="object")&&(d={}),d=G(d),nr=dg.indexOf(d.PARSER_MEDIA_TYPE)===-1?nr=mg:nr=d.PARSER_MEDIA_TYPE,yt=nr==="application/xhtml+xml"?g:p,gt="ALLOWED_TAGS"in d?_({},d.ALLOWED_TAGS,yt):Kl,xt="ALLOWED_ATTR"in d?_({},d.ALLOWED_ATTR,yt):Zl,Na="ALLOWED_NAMESPACES"in d?_({},d.ALLOWED_NAMESPACES,g):pg,Ia="ADD_URI_SAFE_ATTR"in d?_(G(ac),d.ADD_URI_SAFE_ATTR,yt):ac,nc="ADD_DATA_URI_TAGS"in d?_(G(oc),d.ADD_DATA_URI_TAGS,yt):oc,Rr="FORBID_CONTENTS"in d?_({},d.FORBID_CONTENTS,yt):ic,ki="FORBID_TAGS"in d?_({},d.FORBID_TAGS,yt):{},Fa="FORBID_ATTR"in d?_({},d.FORBID_ATTR,yt):{},$r="USE_PROFILES"in d?d.USE_PROFILES:!1,Ql=d.ALLOW_ARIA_ATTR!==!1,Aa=d.ALLOW_DATA_ATTR!==!1,Jl=d.ALLOW_UNKNOWN_PROTOCOLS||!1,tc=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Dr=d.SAFE_FOR_TEMPLATES||!1,ir=d.WHOLE_DOCUMENT||!1,Nr=d.RETURN_DOM||!1,_n=d.RETURN_DOM_FRAGMENT||!1,Cn=d.RETURN_TRUSTED_TYPE||!1,Ea=d.FORCE_BODY||!1,ec=d.SANITIZE_DOM!==!1,rc=d.SANITIZE_NAMED_PROPS||!1,Oa=d.KEEP_CONTENT!==!1,wi=d.IN_PLACE||!1,Xl=d.ALLOWED_URI_REGEXP||Ee,zr=d.NAMESPACE||pe,st=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&sc(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&sc(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Dr&&(Aa=!1),_n&&(Nr=!0),$r&&(gt=_({},[...dt]),xt=[],$r.html===!0&&(_(gt,Q),_(xt,ut)),$r.svg===!0&&(_(gt,I),_(xt,X),_(xt,Rt)),$r.svgFilters===!0&&(_(gt,U),_(xt,X),_(xt,Rt)),$r.mathMl===!0&&(_(gt,P),_(xt,at),_(xt,Rt))),d.ADD_TAGS&&(gt===Kl&&(gt=G(gt)),_(gt,d.ADD_TAGS,yt)),d.ADD_ATTR&&(xt===Zl&&(xt=G(xt)),_(xt,d.ADD_ATTR,yt)),d.ADD_URI_SAFE_ATTR&&_(Ia,d.ADD_URI_SAFE_ATTR,yt),d.FORBID_CONTENTS&&(Rr===ic&&(Rr=G(Rr)),_(Rr,d.FORBID_CONTENTS,yt)),Oa&&(gt["#text"]=!0),ir&&_(gt,["html","head","body"]),gt.table&&(_(gt,["tbody"]),delete ki.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw L('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw L('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Et=d.TRUSTED_TYPES_POLICY,Si=Et.createHTML("")}else Et===void 0&&(Et=C(xn,j)),Et!==null&&typeof Si=="string"&&(Si=Et.createHTML(""));o&&o(d),Pr=d}},lc=_({},["mi","mo","mn","ms","mtext"]),cc=_({},["foreignobject","desc","title","annotation-xml"]),xg=_({},["title","style","font","a","script"]),vn=_({},I);_(vn,U),_(vn,E);let Ra=_({},P);_(Ra,Lt);let yg=function(d){let b=Sa(d);(!b||!b.tagName)&&(b={namespaceURI:zr,tagName:"template"});let M=p(d.tagName),Z=p(b.tagName);return Na[d.namespaceURI]?d.namespaceURI===Tn?b.namespaceURI===pe?M==="svg":b.namespaceURI===bn?M==="svg"&&(Z==="annotation-xml"||lc[Z]):!!vn[M]:d.namespaceURI===bn?b.namespaceURI===pe?M==="math":b.namespaceURI===Tn?M==="math"&&cc[Z]:!!Ra[M]:d.namespaceURI===pe?b.namespaceURI===Tn&&!cc[Z]||b.namespaceURI===bn&&!lc[Z]?!1:!Ra[M]&&(xg[M]||!vn[M]):!!(nr==="application/xhtml+xml"&&Na[d.namespaceURI]):!1},or=function(d){f(O.removed,{element:d});try{d.parentNode.removeChild(d)}catch(b){d.remove()}},za=function(d,b){try{f(O.removed,{attribute:b.getAttributeNode(d),from:b})}catch(M){f(O.removed,{attribute:null,from:b})}if(b.removeAttribute(d),d==="is"&&!xt[d])if(Nr||_n)try{or(b)}catch(M){}else try{b.setAttribute(d,"")}catch(M){}},uc=function(d){let b,M;if(Ea)d="<remove></remove>"+d;else{let Wt=y(d,/^[\r\n\t ]+/);M=Wt&&Wt[0]}nr==="application/xhtml+xml"&&zr===pe&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");let Z=Et?Et.createHTML(d):d;if(zr===pe)try{b=new eg().parseFromString(Z,nr)}catch(Wt){}if(!b||!b.documentElement){b=ka.createDocument(zr,"template",null);try{b.documentElement.innerHTML=Da?Si:Z}catch(Wt){}}let _t=b.body||b.documentElement;return d&&M&&_t.insertBefore(mt.createTextNode(M),_t.childNodes[0]||null),zr===pe?sg.call(b,ir?"html":"body")[0]:ir?b.documentElement:_t},hc=function(d){return og.call(d.ownerDocument||d,d,va.SHOW_ELEMENT|va.SHOW_COMMENT|va.SHOW_TEXT,null,!1)},_g=function(d){return d instanceof tg&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof Jm)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Sn=function(d){return typeof Ta=="object"?d instanceof Ta:d&&typeof d=="object"&&typeof d.nodeType=="number"&&typeof d.nodeName=="string"},de=function(d,b,M){re[d]&&u(re[d],Z=>{Z.call(O,b,M,Pr)})},fc=function(d){let b;if(de("beforeSanitizeElements",d,null),_g(d))return or(d),!0;let M=yt(d.nodeName);if(de("uponSanitizeElement",d,{tagName:M,allowedTags:gt}),d.hasChildNodes()&&!Sn(d.firstElementChild)&&(!Sn(d.content)||!Sn(d.content.firstElementChild))&&v(/<[/\w]/g,d.innerHTML)&&v(/<[/\w]/g,d.textContent))return or(d),!0;if(!gt[M]||ki[M]){if(!ki[M]&&dc(M)&&(st.tagNameCheck instanceof RegExp&&v(st.tagNameCheck,M)||st.tagNameCheck instanceof Function&&st.tagNameCheck(M)))return!1;if(Oa&&!Rr[M]){let Z=Sa(d)||d.parentNode,_t=ng(d)||d.childNodes;if(_t&&Z){let Wt=_t.length;for(let ot=Wt-1;ot>=0;--ot)Z.insertBefore(rg(_t[ot],!0),ig(d))}}return or(d),!0}return d instanceof Vl&&!yg(d)||(M==="noscript"||M==="noembed")&&v(/<\/no(script|embed)/i,d.innerHTML)?(or(d),!0):(Dr&&d.nodeType===3&&(b=d.textContent,b=T(b,wa," "),b=T(b,Ba," "),b=T(b,Ma," "),d.textContent!==b&&(f(O.removed,{element:d.cloneNode()}),d.textContent=b)),de("afterSanitizeElements",d,null),!1)},pc=function(d,b,M){if(ec&&(b==="id"||b==="name")&&(M in mt||M in gg))return!1;if(!(Aa&&!Fa[b]&&v(cg,b))){if(!(Ql&&v(ug,b))){if(!xt[b]||Fa[b]){if(!(dc(d)&&(st.tagNameCheck instanceof RegExp&&v(st.tagNameCheck,d)||st.tagNameCheck instanceof Function&&st.tagNameCheck(d))&&(st.attributeNameCheck instanceof RegExp&&v(st.attributeNameCheck,b)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(b))||b==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&v(st.tagNameCheck,M)||st.tagNameCheck instanceof Function&&st.tagNameCheck(M))))return!1}else if(!Ia[b]){if(!v(Xl,T(M,Gl,""))){if(!((b==="src"||b==="xlink:href"||b==="href")&&d!=="script"&&S(M,"data:")===0&&nc[d])){if(!(Jl&&!v(hg,T(M,Gl,"")))){if(M)return!1}}}}}}return!0},dc=function(d){return d.indexOf("-")>0},mc=function(d){let b,M,Z,_t;de("beforeSanitizeAttributes",d,null);let{attributes:Wt}=d;if(!Wt)return;let ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xt};for(_t=Wt.length;_t--;){b=Wt[_t];let{name:ie,namespaceURI:Pa}=b;if(M=ie==="value"?b.value:x(b.value),Z=yt(ie),ot.attrName=Z,ot.attrValue=M,ot.keepAttr=!0,ot.forceKeepAttr=void 0,de("uponSanitizeAttribute",d,ot),M=ot.attrValue,ot.forceKeepAttr||(za(ie,d),!ot.keepAttr))continue;if(!tc&&v(/\/>/i,M)){za(ie,d);continue}Dr&&(M=T(M,wa," "),M=T(M,Ba," "),M=T(M,Ma," "));let gc=yt(d.nodeName);if(pc(gc,Z,M)){if(rc&&(Z==="id"||Z==="name")&&(za(ie,d),M=fg+M),Et&&typeof xn=="object"&&typeof xn.getAttributeType=="function"&&!Pa)switch(xn.getAttributeType(gc,Z)){case"TrustedHTML":{M=Et.createHTML(M);break}case"TrustedScriptURL":{M=Et.createScriptURL(M);break}}try{Pa?d.setAttributeNS(Pa,ie,M):d.setAttribute(ie,M),h(O.removed)}catch(iB){}}}de("afterSanitizeAttributes",d,null)},Cg=function $(d){let b,M=hc(d);for(de("beforeSanitizeShadowDOM",d,null);b=M.nextNode();)de("uponSanitizeShadowNode",b,null),!fc(b)&&(b.content instanceof Xt&&$(b.content),mc(b));de("afterSanitizeShadowDOM",d,null)};return O.sanitize=function($){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b,M,Z,_t;if(Da=!$,Da&&($="<!-->"),typeof $!="string"&&!Sn($))if(typeof $.toString=="function"){if($=$.toString(),typeof $!="string")throw L("dirty is not a string, aborting")}else throw L("toString is not a function");if(!O.isSupported)return $;if(La||$a(d),O.removed=[],typeof $=="string"&&(wi=!1),wi){if($.nodeName){let ie=yt($.nodeName);if(!gt[ie]||ki[ie])throw L("root node is forbidden and cannot be sanitized in-place")}}else if($ instanceof Ta)b=uc("<!---->"),M=b.ownerDocument.importNode($,!0),M.nodeType===1&&M.nodeName==="BODY"||M.nodeName==="HTML"?b=M:b.appendChild(M);else{if(!Nr&&!Dr&&!ir&&$.indexOf("<")===-1)return Et&&Cn?Et.createHTML($):$;if(b=uc($),!b)return Nr?null:Cn?Si:""}b&&Ea&&or(b.firstChild);let Wt=hc(wi?$:b);for(;Z=Wt.nextNode();)fc(Z)||(Z.content instanceof Xt&&Cg(Z.content),mc(Z));if(wi)return $;if(Nr){if(_n)for(_t=ag.call(b.ownerDocument);b.firstChild;)_t.appendChild(b.firstChild);else _t=b;return(xt.shadowroot||xt.shadowrootmod)&&(_t=lg.call(Y,_t,!0)),_t}let ot=ir?b.outerHTML:b.innerHTML;return ir&>["!doctype"]&&b.ownerDocument&&b.ownerDocument.doctype&&b.ownerDocument.doctype.name&&v(F,b.ownerDocument.doctype.name)&&(ot="<!DOCTYPE "+b.ownerDocument.doctype.name+`>
|
|
`+ot),Dr&&(ot=T(ot,wa," "),ot=T(ot,Ba," "),ot=T(ot,Ma," ")),Et&&Cn?Et.createHTML(ot):ot},O.setConfig=function($){$a($),La=!0},O.clearConfig=function(){Pr=null,La=!1},O.isValidAttribute=function($,d,b){Pr||$a({});let M=yt($),Z=yt(d);return pc(M,Z,b)},O.addHook=function($,d){typeof d=="function"&&(re[$]=re[$]||[],f(re[$],d))},O.removeHook=function($){if(re[$])return h(re[$])},O.removeHooks=function($){re[$]&&(re[$]=[])},O.removeAllHooks=function(){re={}},O}var K=vt();return K})});function bc(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from(typeof t=="string"?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(s,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?s.concat(c.map(function(u){var h,f;return(f=(h=u.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0})):s},[]);if(n.length){var o=new RegExp(`
|
|
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(s){return s.replace(o,`
|
|
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(s,l){var c=a.match(/(?:^|\n)( *)$/),u=c?c[1]:"",h=s;typeof s=="string"&&s.includes(`
|
|
`)&&(h=String(s).split(`
|
|
`).map(function(f,p){return p===0?f:""+u+f}).join(`
|
|
`)),a+=h+i[l+1]}),a}var Tc=60,vc=Tc*60,Sc=vc*24,bg=Sc*7,ar=1e3,kn=Tc*ar,qa=vc*ar,kc=Sc*ar,wc=bg*ar,Bi="millisecond",Oe="second",Ie="minute",De="hour",ne="day",qr="week",Pt="month",wn="quarter",oe="year",Ne="date",Bc="YYYY-MM-DDTHH:mm:ssZ",Wa="Invalid Date",Mc=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Fc=/\[([^\]]+)]|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;var Lc={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(e){var r=["th","st","nd","rd"],i=e%100;return"["+e+(r[(i-20)%10]||r[i]||r[0])+"]"}};var Ua=function(e,r,i){var n=String(e);return!n||n.length>=r?e:""+Array(r+1-n.length).join(i)+e},Tg=function(e){var r=-e.utcOffset(),i=Math.abs(r),n=Math.floor(i/60),o=i%60;return(r<=0?"+":"-")+Ua(n,2,"0")+":"+Ua(o,2,"0")},vg=function t(e,r){if(e.date()<r.date())return-t(r,e);var i=(r.year()-e.year())*12+(r.month()-e.month()),n=e.clone().add(i,Pt),o=r-n<0,a=e.clone().add(i+(o?-1:1),Pt);return+(-(i+(r-n)/(o?n-a:a-n))||0)},Sg=function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},kg=function(e){var r={M:Pt,y:oe,w:qr,d:ne,D:Ne,h:De,m:Ie,s:Oe,ms:Bi,Q:wn};return r[e]||String(e||"").toLowerCase().replace(/s$/,"")},wg=function(e){return e===void 0},Ec={s:Ua,z:Tg,m:vg,a:Sg,p:kg,u:wg};var Mi="en",sr={};sr[Mi]=Lc;var Ha=function(e){return e instanceof Mn},Bn=function t(e,r,i){var n;if(!e)return Mi;if(typeof e=="string"){var o=e.toLowerCase();sr[o]&&(n=o),r&&(sr[o]=r,n=o);var a=e.split("-");if(!n&&a.length>1)return t(a[0])}else{var s=e.name;sr[s]=e,n=s}return!i&&n&&(Mi=n),n||!i&&Mi},Ct=function(e,r){if(Ha(e))return e.clone();var i=typeof r=="object"?r:{};return i.date=e,i.args=arguments,new Mn(i)},Bg=function(e,r){return Ct(e,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})},J=Ec;J.l=Bn;J.i=Ha;J.w=Bg;var Mg=function(e){var r=e.date,i=e.utc;if(r===null)return new Date(NaN);if(J.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var n=r.match(Mc);if(n){var o=n[2]-1||0,a=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(r)},Mn=function(){function t(r){this.$L=Bn(r.locale,null,!0),this.parse(r)}var e=t.prototype;return e.parse=function(i){this.$d=Mg(i),this.$x=i.x||{},this.init()},e.init=function(){var i=this.$d;this.$y=i.getFullYear(),this.$M=i.getMonth(),this.$D=i.getDate(),this.$W=i.getDay(),this.$H=i.getHours(),this.$m=i.getMinutes(),this.$s=i.getSeconds(),this.$ms=i.getMilliseconds()},e.$utils=function(){return J},e.isValid=function(){return this.$d.toString()!==Wa},e.isSame=function(i,n){var o=Ct(i);return this.startOf(n)<=o&&o<=this.endOf(n)},e.isAfter=function(i,n){return Ct(i)<this.startOf(n)},e.isBefore=function(i,n){return this.endOf(n)<Ct(i)},e.$g=function(i,n,o){return J.u(i)?this[n]:this.set(o,i)},e.unix=function(){return Math.floor(this.valueOf()/1e3)},e.valueOf=function(){return this.$d.getTime()},e.startOf=function(i,n){var o=this,a=J.u(n)?!0:n,s=J.p(i),l=function(S,x){var v=J.w(o.$u?Date.UTC(o.$y,x,S):new Date(o.$y,x,S),o);return a?v:v.endOf(ne)},c=function(S,x){var v=[0,0,0,0],L=[23,59,59,999];return J.w(o.toDate()[S].apply(o.toDate("s"),(a?v:L).slice(x)),o)},u=this.$W,h=this.$M,f=this.$D,p="set"+(this.$u?"UTC":"");switch(s){case oe:return a?l(1,0):l(31,11);case Pt:return a?l(1,h):l(0,h+1);case qr:{var g=this.$locale().weekStart||0,y=(u<g?u+7:u)-g;return l(a?f-y:f+(6-y),h)}case ne:case Ne:return c(p+"Hours",0);case De:return c(p+"Minutes",1);case Ie:return c(p+"Seconds",2);case Oe:return c(p+"Milliseconds",3);default:return this.clone()}},e.endOf=function(i){return this.startOf(i,!1)},e.$set=function(i,n){var o,a=J.p(i),s="set"+(this.$u?"UTC":""),l=(o={},o[ne]=s+"Date",o[Ne]=s+"Date",o[Pt]=s+"Month",o[oe]=s+"FullYear",o[De]=s+"Hours",o[Ie]=s+"Minutes",o[Oe]=s+"Seconds",o[Bi]=s+"Milliseconds",o)[a],c=a===ne?this.$D+(n-this.$W):n;if(a===Pt||a===oe){var u=this.clone().set(Ne,1);u.$d[l](c),u.init(),this.$d=u.set(Ne,Math.min(this.$D,u.daysInMonth())).$d}else l&&this.$d[l](c);return this.init(),this},e.set=function(i,n){return this.clone().$set(i,n)},e.get=function(i){return this[J.p(i)]()},e.add=function(i,n){var o=this,a;i=Number(i);var s=J.p(n),l=function(f){var p=Ct(o);return J.w(p.date(p.date()+Math.round(f*i)),o)};if(s===Pt)return this.set(Pt,this.$M+i);if(s===oe)return this.set(oe,this.$y+i);if(s===ne)return l(1);if(s===qr)return l(7);var c=(a={},a[Ie]=kn,a[De]=qa,a[Oe]=ar,a)[s]||1,u=this.$d.getTime()+i*c;return J.w(u,this)},e.subtract=function(i,n){return this.add(i*-1,n)},e.format=function(i){var n=this,o=this.$locale();if(!this.isValid())return o.invalidDate||Wa;var a=i||Bc,s=J.z(this),l=this.$H,c=this.$m,u=this.$M,h=o.weekdays,f=o.months,p=o.meridiem,g=function(v,L,B,k){return v&&(v[L]||v(n,a))||B[L].slice(0,k)},y=function(v){return J.s(l%12||12,v,"0")},T=p||function(x,v,L){var B=x<12?"AM":"PM";return L?B.toLowerCase():B},S={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:J.s(u+1,2,"0"),MMM:g(o.monthsShort,u,f,3),MMMM:g(f,u),D:this.$D,DD:J.s(this.$D,2,"0"),d:String(this.$W),dd:g(o.weekdaysMin,this.$W,h,2),ddd:g(o.weekdaysShort,this.$W,h,3),dddd:h[this.$W],H:String(l),HH:J.s(l,2,"0"),h:y(1),hh:y(2),a:T(l,c,!0),A:T(l,c,!1),m:String(c),mm:J.s(c,2,"0"),s:String(this.$s),ss:J.s(this.$s,2,"0"),SSS:J.s(this.$ms,3,"0"),Z:s};return a.replace(Fc,function(x,v){return v||S[x]||s.replace(":","")})},e.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},e.diff=function(i,n,o){var a,s=J.p(n),l=Ct(i),c=(l.utcOffset()-this.utcOffset())*kn,u=this-l,h=J.m(this,l);return h=(a={},a[oe]=h/12,a[Pt]=h,a[wn]=h/3,a[qr]=(u-c)/wc,a[ne]=(u-c)/kc,a[De]=u/qa,a[Ie]=u/kn,a[Oe]=u/ar,a)[s]||u,o?h:J.a(h)},e.daysInMonth=function(){return this.endOf(Pt).$D},e.$locale=function(){return sr[this.$L]},e.locale=function(i,n){if(!i)return this.$L;var o=this.clone(),a=Bn(i,n,!0);return a&&(o.$L=a),o},e.clone=function(){return J.w(this.$d,this)},e.toDate=function(){return new Date(this.valueOf())},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toISOString=function(){return this.$d.toISOString()},e.toString=function(){return this.$d.toUTCString()},t}(),Oc=Mn.prototype;Ct.prototype=Oc;[["$ms",Bi],["$s",Oe],["$m",Ie],["$H",De],["$W",ne],["$M",Pt],["$y",oe],["$D",Ne]].forEach(function(t){Oc[t[1]]=function(e){return this.$g(e,t[0],t[1])}});Ct.extend=function(t,e){return t.$i||(t(e,Mn,Ct),t.$i=!0),Ct};Ct.locale=Bn;Ct.isDayjs=Ha;Ct.unix=function(t){return Ct(t*1e3)};Ct.en=sr[Mi];Ct.Ls=sr;Ct.p={};var Ic=Ct;function Nc(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function $c(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function lr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ya(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function cr(t){let e,r,i;t.length!==2?(e=lr,r=(s,l)=>lr(t(s),l),i=(s,l)=>t(s)-l):(e=t===lr||t===Ya?t:Rg,r=t,i=t);function n(s,l,c=0,u=s.length){if(c<u){if(e(l,l)!==0)return u;do{let h=c+u>>>1;r(s[h],l)<0?c=h+1:u=h}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(e(l,l)!==0)return u;do{let h=c+u>>>1;r(s[h],l)<=0?c=h+1:u=h}while(c<u)}return c}function a(s,l,c=0,u=s.length){let h=n(s,l,c,u-1);return h>c&&i(s[h-1],l)>-i(s[h],l)?h-1:h}return{left:n,center:a,right:o}}function Rg(){return 0}function ja(t){return t===null?NaN:+t}var Rc=cr(lr),zc=Rc.right,zg=Rc.left,Pg=cr(ja).center,Va=zc;var Wr=class extends Map{constructor(e,r=Ug){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,n]of e)this.set(i,n)}get(e){return super.get(Pc(this,e))}has(e){return super.has(Pc(this,e))}set(e,r){return super.set(qg(this,e),r)}delete(e){return super.delete(Wg(this,e))}};function Pc({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function qg({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function Wg({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Ug(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Hg=Math.sqrt(50),Yg=Math.sqrt(10),jg=Math.sqrt(2);function An(t,e,r){let i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),o=i/Math.pow(10,n),a=o>=Hg?10:o>=Yg?5:o>=jg?2:1,s,l,c;return n<0?(c=Math.pow(10,-n)/a,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,n)*a,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=r&&r<2?An(t,e,r*2):[s,l,c]}function Ln(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let i=e<t,[n,o,a]=i?An(e,t,r):An(t,e,r);if(!(o>=n))return[];let s=o-n+1,l=new Array(s);if(i)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(n+c)/-a;else for(let c=0;c<s;++c)l[c]=(n+c)*a;return l}function Fi(t,e,r){return e=+e,t=+t,r=+r,An(t,e,r)[2]}function Ur(t,e,r){e=+e,t=+t,r=+r;let i=e<t,n=i?Fi(e,t,r):Fi(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function qc(t){return t}var On=1,Ga=2,Xa=3,En=4,Wc=1e-6;function Vg(t){return"translate("+t+",0)"}function Gg(t){return"translate(0,"+t+")"}function Xg(t){return e=>+t(e)}function Kg(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Zg(){return!this.__axis}function Uc(t,e){var r=[],i=null,n=null,o=6,a=6,s=3,l=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,c=t===On||t===En?-1:1,u=t===En||t===Ga?"x":"y",h=t===On||t===Xa?Vg:Gg;function f(p){var g=i==null?e.ticks?e.ticks.apply(e,r):e.domain():i,y=n==null?e.tickFormat?e.tickFormat.apply(e,r):qc:n,T=Math.max(o,0)+s,S=e.range(),x=+S[0]+l,v=+S[S.length-1]+l,L=(e.bandwidth?Kg:Xg)(e.copy(),l),B=p.selection?p.selection():p,k=B.selectAll(".domain").data([null]),_=B.selectAll(".tick").data(g,e).order(),G=_.exit(),it=_.enter().append("g").attr("class","tick"),Q=_.select("line"),I=_.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(it),Q=Q.merge(it.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),I=I.merge(it.append("text").attr("fill","currentColor").attr(u,c*T).attr("dy",t===On?"0em":t===Xa?"0.71em":"0.32em")),p!==B&&(k=k.transition(p),_=_.transition(p),Q=Q.transition(p),I=I.transition(p),G=G.transition(p).attr("opacity",Wc).attr("transform",function(U){return isFinite(U=L(U))?h(U+l):this.getAttribute("transform")}),it.attr("opacity",Wc).attr("transform",function(U){var E=this.parentNode.__axis;return h((E&&isFinite(E=E(U))?E:L(U))+l)})),G.remove(),k.attr("d",t===En||t===Ga?a?"M"+c*a+","+x+"H"+l+"V"+v+"H"+c*a:"M"+l+","+x+"V"+v:a?"M"+x+","+c*a+"V"+l+"H"+v+"V"+c*a:"M"+x+","+l+"H"+v),_.attr("opacity",1).attr("transform",function(U){return h(L(U)+l)}),Q.attr(u+"2",c*o),I.attr(u,c*T).text(y),B.filter(Zg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ga?"start":t===En?"end":"middle"),B.each(function(){this.__axis=L})}return f.scale=function(p){return arguments.length?(e=p,f):e},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),f):r.slice()},f.tickValues=function(p){return arguments.length?(i=p==null?null:Array.from(p),f):i&&i.slice()},f.tickFormat=function(p){return arguments.length?(n=p,f):n},f.tickSize=function(p){return arguments.length?(o=a=+p,f):o},f.tickSizeInner=function(p){return arguments.length?(o=+p,f):o},f.tickSizeOuter=function(p){return arguments.length?(a=+p,f):a},f.tickPadding=function(p){return arguments.length?(s=+p,f):s},f.offset=function(p){return arguments.length?(l=+p,f):l},f}function Qg(t){return Uc(On,t)}function Jg(t){return Uc(Xa,t)}function t0(){}function ur(t){return t==null?t0:function(){return this.querySelector(t)}}function Hc(t){typeof t!="function"&&(t=ur(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o=e[n],a=o.length,s=i[n]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=t.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new et(i,this._parents)}function Ai(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function e0(){return[]}function Li(t){return t==null?e0:function(){return this.querySelectorAll(t)}}function r0(t){return function(){return Ai(t.apply(this,arguments))}}function Yc(t){typeof t=="function"?t=r0(t):t=Li(t);for(var e=this._groups,r=e.length,i=[],n=[],o=0;o<r;++o)for(var a=e[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(i.push(t.call(l,l.__data__,c,a)),n.push(l));return new et(i,n)}function Ei(t){return function(){return this.matches(t)}}function In(t){return function(e){return e.matches(t)}}var i0=Array.prototype.find;function n0(t){return function(){return i0.call(this.children,t)}}function o0(){return this.firstElementChild}function jc(t){return this.select(t==null?o0:n0(typeof t=="function"?t:In(t)))}var a0=Array.prototype.filter;function s0(){return Array.from(this.children)}function l0(t){return function(){return a0.call(this.children,t)}}function Vc(t){return this.selectAll(t==null?s0:l0(typeof t=="function"?t:In(t)))}function Gc(t){typeof t!="function"&&(t=Ei(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o=e[n],a=o.length,s=i[n]=[],l,c=0;c<a;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&s.push(l);return new et(i,this._parents)}function Dn(t){return new Array(t.length)}function Xc(){return new et(this._enter||this._groups.map(Dn),this._parents)}function Oi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Oi.prototype={constructor:Oi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Kc(t){return function(){return t}}function c0(t,e,r,i,n,o){for(var a=0,s,l=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],i[a]=s):r[a]=new Oi(t,o[a]);for(;a<l;++a)(s=e[a])&&(n[a]=s)}function u0(t,e,r,i,n,o,a){var s,l,c=new Map,u=e.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=e[s])&&(f[s]=p=a.call(l,l.__data__,s,e)+"",c.has(p)?n[s]=l:c.set(p,l));for(s=0;s<h;++s)p=a.call(t,o[s],s,o)+"",(l=c.get(p))?(i[s]=l,l.__data__=o[s],c.delete(p)):r[s]=new Oi(t,o[s]);for(s=0;s<u;++s)(l=e[s])&&c.get(f[s])===l&&(n[s]=l)}function h0(t){return t.__data__}function Zc(t,e){if(!arguments.length)return Array.from(this,h0);var r=e?u0:c0,i=this._parents,n=this._groups;typeof t!="function"&&(t=Kc(t));for(var o=n.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=i[c],h=n[c],f=h.length,p=f0(t.call(u,u&&u.__data__,c,i)),g=p.length,y=s[c]=new Array(g),T=a[c]=new Array(g),S=l[c]=new Array(f);r(u,h,y,T,S,p,e);for(var x=0,v=0,L,B;x<g;++x)if(L=y[x]){for(x>=v&&(v=x+1);!(B=T[v])&&++v<g;);L._next=B||null}}return a=new et(a,i),a._enter=s,a._exit=l,a}function f0(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Qc(){return new et(this._exit||this._groups.map(Dn),this._parents)}function Jc(t,e,r){var i=this.enter(),n=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?o.remove():r(o),i&&n?i.merge(n).order():n}function tu(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,o=i.length,a=Math.min(n,o),s=new Array(n),l=0;l<a;++l)for(var c=r[l],u=i[l],h=c.length,f=s[l]=new Array(h),p,g=0;g<h;++g)(p=c[g]||u[g])&&(f[g]=p);for(;l<n;++l)s[l]=r[l];return new et(s,this._parents)}function eu(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,o=i[n],a;--n>=0;)(a=i[n])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function ru(t){t||(t=p0);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var r=this._groups,i=r.length,n=new Array(i),o=0;o<i;++o){for(var a=r[o],s=a.length,l=n[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(e)}return new et(n,this._parents).order()}function p0(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function iu(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nu(){return Array.from(this)}function ou(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,o=i.length;n<o;++n){var a=i[n];if(a)return a}return null}function au(){let t=0;for(let e of this)++t;return t}function su(){return!this.node()}function lu(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],o=0,a=n.length,s;o<a;++o)(s=n[o])&&t.call(s,s.__data__,o,n);return this}var Nn="http://www.w3.org/1999/xhtml",Ka={svg:"http://www.w3.org/2000/svg",xhtml:Nn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function me(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Ka.hasOwnProperty(e)?{space:Ka[e],local:t}:t}function d0(t){return function(){this.removeAttribute(t)}}function m0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function g0(t,e){return function(){this.setAttribute(t,e)}}function x0(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function y0(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function _0(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function cu(t,e){var r=me(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?m0:d0:typeof e=="function"?r.local?_0:y0:r.local?x0:g0)(r,e))}function $n(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function C0(t){return function(){this.style.removeProperty(t)}}function b0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function T0(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function uu(t,e,r){return arguments.length>1?this.each((e==null?C0:typeof e=="function"?T0:b0)(t,e,r==null?"":r)):$e(this.node(),t)}function $e(t,e){return t.style.getPropertyValue(e)||$n(t).getComputedStyle(t,null).getPropertyValue(e)}function v0(t){return function(){delete this[t]}}function S0(t,e){return function(){this[t]=e}}function k0(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function hu(t,e){return arguments.length>1?this.each((e==null?v0:typeof e=="function"?k0:S0)(t,e)):this.node()[t]}function fu(t){return t.trim().split(/^|\s+/)}function Za(t){return t.classList||new pu(t)}function pu(t){this._node=t,this._names=fu(t.getAttribute("class")||"")}pu.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function du(t,e){for(var r=Za(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function mu(t,e){for(var r=Za(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function w0(t){return function(){du(this,t)}}function B0(t){return function(){mu(this,t)}}function M0(t,e){return function(){(e.apply(this,arguments)?du:mu)(this,t)}}function gu(t,e){var r=fu(t+"");if(arguments.length<2){for(var i=Za(this.node()),n=-1,o=r.length;++n<o;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?M0:e?w0:B0)(r,e))}function F0(){this.textContent=""}function A0(t){return function(){this.textContent=t}}function L0(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function xu(t){return arguments.length?this.each(t==null?F0:(typeof t=="function"?L0:A0)(t)):this.node().textContent}function E0(){this.innerHTML=""}function O0(t){return function(){this.innerHTML=t}}function I0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function yu(t){return arguments.length?this.each(t==null?E0:(typeof t=="function"?I0:O0)(t)):this.node().innerHTML}function D0(){this.nextSibling&&this.parentNode.appendChild(this)}function _u(){return this.each(D0)}function N0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cu(){return this.each(N0)}function $0(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Nn&&e.documentElement.namespaceURI===Nn?e.createElement(t):e.createElementNS(r,t)}}function R0(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Rn(t){var e=me(t);return(e.local?R0:$0)(e)}function bu(t){var e=typeof t=="function"?t:Rn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function z0(){return null}function Tu(t,e){var r=typeof t=="function"?t:Rn(t),i=e==null?z0:typeof e=="function"?e:ur(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function P0(){var t=this.parentNode;t&&t.removeChild(this)}function vu(){return this.each(P0)}function q0(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function W0(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Su(t){return this.select(t?W0:q0)}function ku(t){return arguments.length?this.property("__data__",t):this.node().__data__}function U0(t){return function(e){t.call(this,e,this.__data__)}}function H0(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function Y0(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,o;r<n;++r)o=e[r],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function j0(t,e,r){return function(){var i=this.__on,n,o=U0(e);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),n.value=e;return}}this.addEventListener(t.type,o,r),n={type:t.type,name:t.name,value:e,listener:o,options:r},i?i.push(n):this.__on=[n]}}function wu(t,e,r){var i=H0(t+""),n,o=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(n=0,u=s[l];n<o;++n)if((a=i[n]).type===u.type&&a.name===u.name)return u.value}return}for(s=e?j0:Y0,n=0;n<o;++n)this.each(s(i[n],e,r));return this}function Bu(t,e,r){var i=$n(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function V0(t,e){return function(){return Bu(this,t,e)}}function G0(t,e){return function(){return Bu(this,t,e.apply(this,arguments))}}function Mu(t,e){return this.each((typeof e=="function"?G0:V0)(t,e))}function*Fu(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,o=i.length,a;n<o;++n)(a=i[n])&&(yield a)}var Ii=[null];function et(t,e){this._groups=t,this._parents=e}function Au(){return new et([[document.documentElement]],Ii)}function X0(){return this}et.prototype=Au.prototype={constructor:et,select:Hc,selectAll:Yc,selectChild:jc,selectChildren:Vc,filter:Gc,data:Zc,enter:Xc,exit:Qc,join:Jc,merge:tu,selection:X0,order:eu,sort:ru,call:iu,nodes:nu,node:ou,size:au,empty:su,each:lu,attr:cu,style:uu,property:hu,classed:gu,text:xu,html:yu,raise:_u,lower:Cu,append:bu,insert:Tu,remove:vu,clone:Su,datum:ku,on:wu,dispatch:Mu,[Symbol.iterator]:Fu};var ge=Au;function Ut(t){return typeof t=="string"?new et([[document.querySelector(t)]],[document.documentElement]):new et([[t]],Ii)}function K0(t){return typeof t=="string"?new et([document.querySelectorAll(t)],[document.documentElement]):new et([Ai(t)],Ii)}function hr(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Hr(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Re(){}var Di=.7,qn=1/Di,Yr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ae="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Z0=/^#([0-9a-f]{3,8})$/,Q0=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),J0=new RegExp(`^rgb\\(${ae},${ae},${ae}\\)$`),tx=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Ni}\\)$`),ex=new RegExp(`^rgba\\(${ae},${ae},${ae},${Ni}\\)$`),rx=new RegExp(`^hsl\\(${Ni},${ae},${ae}\\)$`),ix=new RegExp(`^hsla\\(${Ni},${ae},${ae},${Ni}\\)$`),Lu={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};hr(Re,Zt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Eu,formatHex:Eu,formatHex8:nx,formatHsl:ox,formatRgb:Ou,toString:Ou});function Eu(){return this.rgb().formatHex()}function nx(){return this.rgb().formatHex8()}function ox(){return zu(this).formatHsl()}function Ou(){return this.rgb().formatRgb()}function Zt(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Z0.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Iu(e):r===3?new St(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?zn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?zn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Q0.exec(t))?new St(e[1],e[2],e[3],1):(e=J0.exec(t))?new St(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tx.exec(t))?zn(e[1],e[2],e[3],e[4]):(e=ex.exec(t))?zn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rx.exec(t))?$u(e[1],e[2]/100,e[3]/100,1):(e=ix.exec(t))?$u(e[1],e[2]/100,e[3]/100,e[4]):Lu.hasOwnProperty(t)?Iu(Lu[t]):t==="transparent"?new St(NaN,NaN,NaN,0):null}function Iu(t){return new St(t>>16&255,t>>8&255,t&255,1)}function zn(t,e,r,i){return i<=0&&(t=e=r=NaN),new St(t,e,r,i)}function Ja(t){return t instanceof Re||(t=Zt(t)),t?(t=t.rgb(),new St(t.r,t.g,t.b,t.opacity)):new St}function jr(t,e,r,i){return arguments.length===1?Ja(t):new St(t,e,r,i==null?1:i)}function St(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}hr(St,jr,Hr(Re,{brighter(t){return t=t==null?qn:Math.pow(qn,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new St(pr(this.r),pr(this.g),pr(this.b),Wn(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:Du,formatHex:Du,formatHex8:ax,formatRgb:Nu,toString:Nu}));function Du(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}`}function ax(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}${fr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nu(){let t=Wn(this.opacity);return`${t===1?"rgb(":"rgba("}${pr(this.r)}, ${pr(this.g)}, ${pr(this.b)}${t===1?")":`, ${t})`}`}function Wn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function fr(t){return t=pr(t),(t<16?"0":"")+t.toString(16)}function $u(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Kt(t,e,r,i)}function zu(t){if(t instanceof Kt)return new Kt(t.h,t.s,t.l,t.opacity);if(t instanceof Re||(t=Zt(t)),!t)return new Kt;if(t instanceof Kt)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),o=Math.max(e,r,i),a=NaN,s=o-n,l=(o+n)/2;return s?(e===o?a=(r-i)/s+(r<i)*6:r===o?a=(i-e)/s+2:a=(e-r)/s+4,s/=l<.5?o+n:2-o-n,a*=60):s=l>0&&l<1?0:a,new Kt(a,s,l,t.opacity)}function Pu(t,e,r,i){return arguments.length===1?zu(t):new Kt(t,e,r,i==null?1:i)}function Kt(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}hr(Kt,Pu,Hr(Re,{brighter(t){return t=t==null?qn:Math.pow(qn,t),new Kt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new Kt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new St(Qa(t>=240?t-240:t+120,n,i),Qa(t,n,i),Qa(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Kt(Ru(this.h),Pn(this.s),Pn(this.l),Wn(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(){let t=Wn(this.opacity);return`${t===1?"hsl(":"hsla("}${Ru(this.h)}, ${Pn(this.s)*100}%, ${Pn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ru(t){return t=(t||0)%360,t<0?t+360:t}function Pn(t){return Math.max(0,Math.min(1,t||0))}function Qa(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var qu=Math.PI/180,Wu=180/Math.PI;var Un=18,Uu=.96422,Hu=1,Yu=.82521,ju=4/29,Vr=6/29,Vu=3*Vr*Vr,sx=Vr*Vr*Vr;function Gu(t){if(t instanceof se)return new se(t.l,t.a,t.b,t.opacity);if(t instanceof xe)return Xu(t);t instanceof St||(t=Ja(t));var e=is(t.r),r=is(t.g),i=is(t.b),n=ts((.2225045*e+.7168786*r+.0606169*i)/Hu),o,a;return e===r&&r===i?o=a=n:(o=ts((.4360747*e+.3850649*r+.1430804*i)/Uu),a=ts((.0139322*e+.0971045*r+.7141733*i)/Yu)),new se(116*n-16,500*(o-n),200*(n-a),t.opacity)}function ns(t,e,r,i){return arguments.length===1?Gu(t):new se(t,e,r,i==null?1:i)}function se(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}hr(se,ns,Hr(Re,{brighter(t){return new se(this.l+Un*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new se(this.l-Un*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Uu*es(e),t=Hu*es(t),r=Yu*es(r),new St(rs(3.1338561*e-1.6168667*t-.4906146*r),rs(-.9787684*e+1.9161415*t+.033454*r),rs(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function ts(t){return t>sx?Math.pow(t,1/3):t/Vu+ju}function es(t){return t>Vr?t*t*t:Vu*(t-ju)}function rs(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function is(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function lx(t){if(t instanceof xe)return new xe(t.h,t.c,t.l,t.opacity);if(t instanceof se||(t=Gu(t)),t.a===0&&t.b===0)return new xe(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Wu;return new xe(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function $i(t,e,r,i){return arguments.length===1?lx(t):new xe(t,e,r,i==null?1:i)}function xe(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function Xu(t){if(isNaN(t.h))return new se(t.l,0,0,t.opacity);var e=t.h*qu;return new se(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}hr(xe,$i,Hr(Re,{brighter(t){return new xe(this.h,this.c,this.l+Un*(t==null?1:t),this.opacity)},darker(t){return new xe(this.h,this.c,this.l-Un*(t==null?1:t),this.opacity)},rgb(){return Xu(this).rgb()}}));var Gr=t=>()=>t;function Ku(t,e){return function(r){return t+r*e}}function cx(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function Zu(t,e){var r=e-t;return r?Ku(t,r>180||r<-180?r-360*Math.round(r/360):r):Gr(isNaN(t)?e:t)}function Qu(t){return(t=+t)==1?ye:function(e,r){return r-e?cx(e,r,t):Gr(isNaN(e)?r:e)}}function ye(t,e){var r=e-t;return r?Ku(t,r):Gr(isNaN(t)?e:t)}function Ju(t){return function(e,r){var i=t((e=$i(e)).h,(r=$i(r)).h),n=ye(e.c,r.c),o=ye(e.l,r.l),a=ye(e.opacity,r.opacity);return function(s){return e.h=i(s),e.c=n(s),e.l=o(s),e.opacity=a(s),e+""}}}var ux=Ju(Zu),hx=Ju(ye);function os(t,e,r,i,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*i+a*n)/6}function th(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),n=t[i],o=t[i+1],a=i>0?t[i-1]:2*n-o,s=i<e-1?t[i+2]:2*o-n;return os((r-i/e)*e,a,n,o,s)}}function eh(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),n=t[(i+e-1)%e],o=t[i%e],a=t[(i+1)%e],s=t[(i+2)%e];return os((r-i/e)*e,n,o,a,s)}}var dr=function t(e){var r=Qu(e);function i(n,o){var a=r((n=jr(n)).r,(o=jr(o)).r),s=r(n.g,o.g),l=r(n.b,o.b),c=ye(n.opacity,o.opacity);return function(u){return n.r=a(u),n.g=s(u),n.b=l(u),n.opacity=c(u),n+""}}return i.gamma=t,i}(1);function rh(t){return function(e){var r=e.length,i=new Array(r),n=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=jr(e[a]),i[a]=s.r||0,n[a]=s.g||0,o[a]=s.b||0;return i=t(i),n=t(n),o=t(o),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=o(l),s+""}}}var fx=rh(th),px=rh(eh);function ih(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function nh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function oh(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),o=new Array(r),a;for(a=0;a<i;++a)n[a]=mr(t[a],e[a]);for(;a<r;++a)o[a]=e[a];return function(s){for(a=0;a<i;++a)o[a]=n[a](s);return o}}function ah(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function kt(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function sh(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=mr(t[n],e[n]):i[n]=e[n];return function(o){for(n in r)i[n]=r[n](o);return i}}var ss=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,as=new RegExp(ss.source,"g");function dx(t){return function(){return t}}function mx(t){return function(e){return t(e)+""}}function Ri(t,e){var r=ss.lastIndex=as.lastIndex=0,i,n,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(i=ss.exec(t))&&(n=as.exec(e));)(o=n.index)>r&&(o=e.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:kt(i,n)})),r=as.lastIndex;return r<e.length&&(o=e.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?mx(l[0].x):dx(e):(e=l.length,function(c){for(var u=0,h;u<e;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}function mr(t,e){var r=typeof e,i;return e==null||r==="boolean"?Gr(e):(r==="number"?kt:r==="string"?(i=Zt(e))?(e=i,dr):Ri:e instanceof Zt?dr:e instanceof Date?ah:nh(e)?ih:Array.isArray(e)?oh:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?sh:kt)(t,e)}function ls(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var lh=180/Math.PI,Hn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cs(t,e,r,i,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:o,rotate:Math.atan2(e,t)*lh,skewX:Math.atan(l)*lh,scaleX:a,scaleY:s}}var Yn;function ch(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Hn:cs(e.a,e.b,e.c,e.d,e.e,e.f)}function uh(t){return t==null?Hn:(Yn||(Yn=document.createElementNS("http://www.w3.org/2000/svg","g")),Yn.setAttribute("transform",t),(t=Yn.transform.baseVal.consolidate())?(t=t.matrix,cs(t.a,t.b,t.c,t.d,t.e,t.f)):Hn)}function hh(t,e,r,i){function n(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,g){if(c!==h||u!==f){var y=p.push("translate(",null,e,null,r);g.push({i:y-4,x:kt(c,h)},{i:y-2,x:kt(u,f)})}else(h||f)&&p.push("translate("+h+e+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(n(h)+"rotate(",null,i)-2,x:kt(c,u)})):u&&h.push(n(h)+"rotate("+u+i)}function s(c,u,h,f){c!==u?f.push({i:h.push(n(h)+"skewX(",null,i)-2,x:kt(c,u)}):u&&h.push(n(h)+"skewX("+u+i)}function l(c,u,h,f,p,g){if(c!==h||u!==f){var y=p.push(n(p)+"scale(",null,",",null,")");g.push({i:y-4,x:kt(c,h)},{i:y-2,x:kt(u,f)})}else(h!==1||f!==1)&&p.push(n(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=t(c),u=t(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var g=-1,y=f.length,T;++g<y;)h[(T=f[g]).i]=T.x(p);return h.join("")}}}var us=hh(ch,"px, ","px)","deg)"),hs=hh(uh,", ",")",")");function Xr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var fs=Symbol("implicit");function ps(){var t=new Wr,e=[],r=[],i=fs;function n(o){let a=t.get(o);if(a===void 0){if(i!==fs)return i;t.set(o,a=e.push(o)-1)}return r[a%r.length]}return n.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Wr;for(let a of o)t.has(a)||t.set(a,e.push(a)-1);return n},n.range=function(o){return arguments.length?(r=Array.from(o),n):r.slice()},n.unknown=function(o){return arguments.length?(i=o,n):i},n.copy=function(){return ps(e,r).unknown(i)},Xr.apply(n,arguments),n}function ds(t){return function(){return t}}function ms(t){return+t}var fh=[0,1];function Kr(t){return t}function gs(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:ds(isNaN(e)?NaN:.5)}function gx(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function xx(t,e,r){var i=t[0],n=t[1],o=e[0],a=e[1];return n<i?(i=gs(n,i),o=r(a,o)):(i=gs(i,n),o=r(o,a)),function(s){return o(i(s))}}function yx(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),o=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=gs(t[a],t[a+1]),o[a]=r(e[a],e[a+1]);return function(s){var l=Va(t,s,1,i)-1;return o[l](n[l](s))}}function jn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function _x(){var t=fh,e=fh,r=mr,i,n,o,a=Kr,s,l,c;function u(){var f=Math.min(t.length,e.length);return a!==Kr&&(a=gx(t[0],t[f-1])),s=f>2?yx:xx,l=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(l||(l=s(t.map(i),e,r)))(i(a(f)))}return h.invert=function(f){return a(n((c||(c=s(e,t.map(i),kt)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,ms),u()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),u()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),r=ls,u()},h.clamp=function(f){return arguments.length?(a=f?!0:Kr,u()):a!==Kr},h.interpolate=function(f){return arguments.length?(r=f,u()):r},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return i=f,n=p,u()}}function zi(){return _x()(Kr,Kr)}function ph(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function gr(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function le(t){return t=gr(Math.abs(t)),t?t[1]:NaN}function dh(t,e){return function(r,i){for(var n=r.length,o=[],a=0,s=t[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(r.substring(n-=s,n+s)),!((l+=s+1)>i));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function mh(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var Cx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ze(t){if(!(e=Cx.exec(t)))throw new Error("invalid format: "+t);var e;return new Vn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ze.prototype=Vn.prototype;function Vn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Vn.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 gh(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var xs;function xh(t,e){var r=gr(t,e);if(!r)return t+"";var i=r[0],n=r[1],o=n-(xs=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+gr(t,Math.max(0,e+o-1))[0]}function ys(t,e){var r=gr(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var _s={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ph,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ys(t*100,e),r:ys,s:xh,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Cs(t){return t}var yh=Array.prototype.map,_h=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Ch(t){var e=t.grouping===void 0||t.thousands===void 0?Cs:dh(yh.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Cs:mh(yh.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(h){h=ze(h);var f=h.fill,p=h.align,g=h.sign,y=h.symbol,T=h.zero,S=h.width,x=h.comma,v=h.precision,L=h.trim,B=h.type;B==="n"?(x=!0,B="g"):_s[B]||(v===void 0&&(v=12),L=!0,B="g"),(T||f==="0"&&p==="=")&&(T=!0,f="0",p="=");var k=y==="$"?r:y==="#"&&/[boxX]/.test(B)?"0"+B.toLowerCase():"",_=y==="$"?i:/[%p]/.test(B)?a:"",G=_s[B],it=/[defgprs%]/.test(B);v=v===void 0?6:/[gprs]/.test(B)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function Q(I){var U=k,E=_,P,Lt,dt;if(B==="c")E=G(I)+E,I="";else{I=+I;var ut=I<0||1/I<0;if(I=isNaN(I)?l:G(Math.abs(I),v),L&&(I=gh(I)),ut&&+I==0&&g!=="+"&&(ut=!1),U=(ut?g==="("?g:s:g==="-"||g==="("?"":g)+U,E=(B==="s"?_h[8+xs/3]:"")+E+(ut&&g==="("?")":""),it){for(P=-1,Lt=I.length;++P<Lt;)if(dt=I.charCodeAt(P),48>dt||dt>57){E=(dt===46?n+I.slice(P+1):I.slice(P))+E,I=I.slice(0,P);break}}}x&&!T&&(I=e(I,1/0));var X=U.length+I.length+E.length,at=X<S?new Array(S-X+1).join(f):"";switch(x&&T&&(I=e(at+I,at.length?S-E.length:1/0),at=""),p){case"<":I=U+I+E+at;break;case"=":I=U+at+I+E;break;case"^":I=at.slice(0,X=at.length>>1)+U+I+E+at.slice(X);break;default:I=at+U+I+E;break}return o(I)}return Q.toString=function(){return h+""},Q}function u(h,f){var p=c((h=ze(h),h.type="f",h)),g=Math.max(-8,Math.min(8,Math.floor(le(f)/3)))*3,y=Math.pow(10,-g),T=_h[8+g/3];return function(S){return p(y*S)+T}}return{format:c,formatPrefix:u}}var Gn,Xn,Kn;bs({thousands:",",grouping:[3],currency:["$",""]});function bs(t){return Gn=Ch(t),Xn=Gn.format,Kn=Gn.formatPrefix,Gn}function Ts(t){return Math.max(0,-le(Math.abs(t)))}function vs(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(le(e)/3)))*3-le(Math.abs(t)))}function Ss(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,le(e)-le(t))+1}function ks(t,e,r,i){var n=Ur(t,e,r),o;switch(i=ze(i==null?",f":i),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=vs(n,a))&&(i.precision=o),Kn(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=Ss(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=Ts(n))&&(i.precision=o-(i.type==="%")*2);break}}return Xn(i)}function bx(t){var e=t.domain;return t.ticks=function(r){var i=e();return Ln(i[0],i[i.length-1],r==null?10:r)},t.tickFormat=function(r,i){var n=e();return ks(n[0],n[n.length-1],r==null?10:r,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,o=i.length-1,a=i[n],s=i[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=n,n=o,o=c);u-- >0;){if(c=Fi(a,s,r),c===l)return i[n]=a,i[o]=s,e(i);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return t},t}function ws(){var t=zi();return t.copy=function(){return jn(t,ws())},Xr.apply(t,arguments),bx(t)}var Bs=new Date,Ms=new Date;function tt(t,e,r,i){function n(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return n.floor=o=>(t(o=new Date(+o)),o),n.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),n.round=o=>{let a=n(o),s=n.ceil(o);return o-a<s-o?a:s},n.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),n.range=(o,a,s)=>{let l=[];if(o=n.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return l},n.filter=o=>tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),r&&(n.count=(o,a)=>(Bs.setTime(+o),Ms.setTime(+a),t(Bs),t(Ms),Math.floor(r(Bs,Ms))),n.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?n.filter(i?a=>i(a)%o===0:a=>n.count(0,a)%o===0):n)),n}var Zr=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),Tx=Zr.range,Zn=tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),vx=Zn.range;var Qr=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),Sx=Qr.range,Qn=tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),kx=Qn.range;var _e=tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),wx=_e.range,qi=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),Bx=qi.range,Jn=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),Mx=Jn.range;function _r(t){return tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}var Ce=_r(0),Jr=_r(1),Th=_r(2),vh=_r(3),Pe=_r(4),Sh=_r(5),kh=_r(6),wh=Ce.range,Fx=Jr.range,Ax=Th.range,Lx=vh.range,Ex=Pe.range,Ox=Sh.range,Ix=kh.range;function Cr(t){return tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var br=Cr(0),ti=Cr(1),Bh=Cr(2),Mh=Cr(3),qe=Cr(4),Fh=Cr(5),Ah=Cr(6),Lh=br.range,Dx=ti.range,Nx=Bh.range,$x=Mh.range,Rx=qe.range,zx=Fh.range,Px=Ah.range;var ei=tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),qx=ei.range,to=tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),Wx=to.range;var Wi=tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Wi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Wi);var bE=Wi.range;var ue=tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),Eh=ue.range;var qt=tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());qt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});var Ux=qt.range,Qt=tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Qt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});var Hx=Qt.range;function Ih(t,e,r,i,n,o){let a=[[ue,1,1e3],[ue,5,5*1e3],[ue,15,15*1e3],[ue,30,30*1e3],[o,1,6e4],[o,5,5*6e4],[o,15,15*6e4],[o,30,30*6e4],[n,1,36e5],[n,3,3*36e5],[n,6,6*36e5],[n,12,12*36e5],[i,1,864e5],[i,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function s(c,u,h){let f=u<c;f&&([c,u]=[u,c]);let p=h&&typeof h.range=="function"?h:l(c,u,h),g=p?p.range(c,+u+1):[];return f?g.reverse():g}function l(c,u,h){let f=Math.abs(u-c)/h,p=cr(([,,T])=>T).right(a,f);if(p===a.length)return t.every(Ur(c/31536e6,u/31536e6,h));if(p===0)return Wi.every(Math.max(Ur(c,u,h),1));let[g,y]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return g.every(y)}return[s,l]}var[jx,Vx]=Ih(Qt,to,br,Jn,Qn,Zn),[Fs,As]=Ih(qt,ei,Ce,_e,Qr,Zr);function Ls(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Es(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ui(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Os(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,c=Hi(n),u=Yi(n),h=Hi(o),f=Yi(o),p=Hi(a),g=Yi(a),y=Hi(s),T=Yi(s),S=Hi(l),x=Yi(l),v={a:ut,A:X,b:at,B:Rt,c:null,d:Ph,e:Ph,f:gy,g:wy,G:My,H:py,I:dy,j:my,L:Yh,m:xy,M:yy,p:Ae,q:Le,Q:Uh,s:Hh,S:_y,u:Cy,U:by,V:Ty,w:vy,W:Sy,x:null,X:null,y:ky,Y:By,Z:Fy,"%":Wh},L={a:Je,A:tr,b:zt,B:Ee,c:null,d:qh,e:qh,f:Oy,g:Uy,G:Yy,H:Ay,I:Ly,j:Ey,L:Vh,m:Iy,M:Dy,p:er,q:rr,Q:Uh,s:Hh,S:Ny,u:$y,U:Ry,V:zy,w:Py,W:qy,x:null,X:null,y:Wy,Y:Hy,Z:jy,"%":Wh},B={a:Q,A:I,b:U,B:E,c:P,d:Rh,e:Rh,f:cy,g:$h,G:Nh,H:zh,I:zh,j:oy,L:ly,m:ny,M:ay,p:it,q:iy,Q:hy,s:fy,S:sy,u:Qx,U:Jx,V:ty,w:Zx,W:ey,x:Lt,X:dt,y:$h,Y:Nh,Z:ry,"%":uy};v.x=k(r,v),v.X=k(i,v),v.c=k(e,v),L.x=k(r,L),L.X=k(i,L),L.c=k(e,L);function k(F,q){return function(H){var C=[],vt=-1,K=0,W=F.length,O,Y,j;for(H instanceof Date||(H=new Date(+H));++vt<W;)F.charCodeAt(vt)===37&&(C.push(F.slice(K,vt)),(Y=Dh[O=F.charAt(++vt)])!=null?O=F.charAt(++vt):Y=O==="e"?" ":"0",(j=q[O])&&(O=j(H,Y)),C.push(O),K=vt+1);return C.push(F.slice(K,vt)),C.join("")}}function _(F,q){return function(H){var C=Ui(1900,void 0,1),vt=G(C,F,H+="",0),K,W;if(vt!=H.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(q&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(K=Es(Ui(C.y,0,1)),W=K.getUTCDay(),K=W>4||W===0?ti.ceil(K):ti(K),K=qi.offset(K,(C.V-1)*7),C.y=K.getUTCFullYear(),C.m=K.getUTCMonth(),C.d=K.getUTCDate()+(C.w+6)%7):(K=Ls(Ui(C.y,0,1)),W=K.getDay(),K=W>4||W===0?Jr.ceil(K):Jr(K),K=_e.offset(K,(C.V-1)*7),C.y=K.getFullYear(),C.m=K.getMonth(),C.d=K.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),W="Z"in C?Es(Ui(C.y,0,1)).getUTCDay():Ls(Ui(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(W+5)%7:C.w+C.U*7-(W+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Es(C)):Ls(C)}}function G(F,q,H,C){for(var vt=0,K=q.length,W=H.length,O,Y;vt<K;){if(C>=W)return-1;if(O=q.charCodeAt(vt++),O===37){if(O=q.charAt(vt++),Y=B[O in Dh?q.charAt(vt++):O],!Y||(C=Y(F,H,C))<0)return-1}else if(O!=H.charCodeAt(C++))return-1}return C}function it(F,q,H){var C=c.exec(q.slice(H));return C?(F.p=u.get(C[0].toLowerCase()),H+C[0].length):-1}function Q(F,q,H){var C=p.exec(q.slice(H));return C?(F.w=g.get(C[0].toLowerCase()),H+C[0].length):-1}function I(F,q,H){var C=h.exec(q.slice(H));return C?(F.w=f.get(C[0].toLowerCase()),H+C[0].length):-1}function U(F,q,H){var C=S.exec(q.slice(H));return C?(F.m=x.get(C[0].toLowerCase()),H+C[0].length):-1}function E(F,q,H){var C=y.exec(q.slice(H));return C?(F.m=T.get(C[0].toLowerCase()),H+C[0].length):-1}function P(F,q,H){return G(F,e,q,H)}function Lt(F,q,H){return G(F,r,q,H)}function dt(F,q,H){return G(F,i,q,H)}function ut(F){return a[F.getDay()]}function X(F){return o[F.getDay()]}function at(F){return l[F.getMonth()]}function Rt(F){return s[F.getMonth()]}function Ae(F){return n[+(F.getHours()>=12)]}function Le(F){return 1+~~(F.getMonth()/3)}function Je(F){return a[F.getUTCDay()]}function tr(F){return o[F.getUTCDay()]}function zt(F){return l[F.getUTCMonth()]}function Ee(F){return s[F.getUTCMonth()]}function er(F){return n[+(F.getUTCHours()>=12)]}function rr(F){return 1+~~(F.getUTCMonth()/3)}return{format:function(F){var q=k(F+="",v);return q.toString=function(){return F},q},parse:function(F){var q=_(F+="",!1);return q.toString=function(){return F},q},utcFormat:function(F){var q=k(F+="",L);return q.toString=function(){return F},q},utcParse:function(F){var q=_(F+="",!0);return q.toString=function(){return F},q}}}var Dh={"-":"",_:" ",0:"0"},bt=/^\s*\d+/,Gx=/^%/,Xx=/[\\^$*+?|[\]().{}]/g;function V(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",o=n.length;return i+(o<r?new Array(r-o+1).join(e)+n:n)}function Kx(t){return t.replace(Xx,"\\$&")}function Hi(t){return new RegExp("^(?:"+t.map(Kx).join("|")+")","i")}function Yi(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Zx(t,e,r){var i=bt.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Qx(t,e,r){var i=bt.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Jx(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ty(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function ey(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function Nh(t,e,r){var i=bt.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function $h(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function ry(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function iy(t,e,r){var i=bt.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function ny(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function Rh(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function oy(t,e,r){var i=bt.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function zh(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function ay(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function sy(t,e,r){var i=bt.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function ly(t,e,r){var i=bt.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function cy(t,e,r){var i=bt.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function uy(t,e,r){var i=Gx.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function hy(t,e,r){var i=bt.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function fy(t,e,r){var i=bt.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Ph(t,e){return V(t.getDate(),e,2)}function py(t,e){return V(t.getHours(),e,2)}function dy(t,e){return V(t.getHours()%12||12,e,2)}function my(t,e){return V(1+_e.count(qt(t),t),e,3)}function Yh(t,e){return V(t.getMilliseconds(),e,3)}function gy(t,e){return Yh(t,e)+"000"}function xy(t,e){return V(t.getMonth()+1,e,2)}function yy(t,e){return V(t.getMinutes(),e,2)}function _y(t,e){return V(t.getSeconds(),e,2)}function Cy(t){var e=t.getDay();return e===0?7:e}function by(t,e){return V(Ce.count(qt(t)-1,t),e,2)}function jh(t){var e=t.getDay();return e>=4||e===0?Pe(t):Pe.ceil(t)}function Ty(t,e){return t=jh(t),V(Pe.count(qt(t),t)+(qt(t).getDay()===4),e,2)}function vy(t){return t.getDay()}function Sy(t,e){return V(Jr.count(qt(t)-1,t),e,2)}function ky(t,e){return V(t.getFullYear()%100,e,2)}function wy(t,e){return t=jh(t),V(t.getFullYear()%100,e,2)}function By(t,e){return V(t.getFullYear()%1e4,e,4)}function My(t,e){var r=t.getDay();return t=r>=4||r===0?Pe(t):Pe.ceil(t),V(t.getFullYear()%1e4,e,4)}function Fy(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+V(e/60|0,"0",2)+V(e%60,"0",2)}function qh(t,e){return V(t.getUTCDate(),e,2)}function Ay(t,e){return V(t.getUTCHours(),e,2)}function Ly(t,e){return V(t.getUTCHours()%12||12,e,2)}function Ey(t,e){return V(1+qi.count(Qt(t),t),e,3)}function Vh(t,e){return V(t.getUTCMilliseconds(),e,3)}function Oy(t,e){return Vh(t,e)+"000"}function Iy(t,e){return V(t.getUTCMonth()+1,e,2)}function Dy(t,e){return V(t.getUTCMinutes(),e,2)}function Ny(t,e){return V(t.getUTCSeconds(),e,2)}function $y(t){var e=t.getUTCDay();return e===0?7:e}function Ry(t,e){return V(br.count(Qt(t)-1,t),e,2)}function Gh(t){var e=t.getUTCDay();return e>=4||e===0?qe(t):qe.ceil(t)}function zy(t,e){return t=Gh(t),V(qe.count(Qt(t),t)+(Qt(t).getUTCDay()===4),e,2)}function Py(t){return t.getUTCDay()}function qy(t,e){return V(ti.count(Qt(t)-1,t),e,2)}function Wy(t,e){return V(t.getUTCFullYear()%100,e,2)}function Uy(t,e){return t=Gh(t),V(t.getUTCFullYear()%100,e,2)}function Hy(t,e){return V(t.getUTCFullYear()%1e4,e,4)}function Yy(t,e){var r=t.getUTCDay();return t=r>=4||r===0?qe(t):qe.ceil(t),V(t.getUTCFullYear()%1e4,e,4)}function jy(){return"+0000"}function Wh(){return"%"}function Uh(t){return+t}function Hh(t){return Math.floor(+t/1e3)}var ri,eo,Xh,Kh,Zh;Is({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 Is(t){return ri=Os(t),eo=ri.format,Xh=ri.parse,Kh=ri.utcFormat,Zh=ri.utcParse,ri}function Ds(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],o=t[i],a;return o<n&&(a=r,r=i,i=a,a=n,n=o,o=a),t[r]=e.floor(n),t[i]=e.ceil(o),t}function Vy(t){return new Date(t)}function Gy(t){return t instanceof Date?+t:+new Date(+t)}function Qh(t,e,r,i,n,o,a,s,l,c){var u=zi(),h=u.invert,f=u.domain,p=c(".%L"),g=c(":%S"),y=c("%I:%M"),T=c("%I %p"),S=c("%a %d"),x=c("%b %d"),v=c("%B"),L=c("%Y");function B(k){return(l(k)<k?p:s(k)<k?g:a(k)<k?y:o(k)<k?T:i(k)<k?n(k)<k?S:x:r(k)<k?v:L)(k)}return u.invert=function(k){return new Date(h(k))},u.domain=function(k){return arguments.length?f(Array.from(k,Gy)):f().map(Vy)},u.ticks=function(k){var _=f();return t(_[0],_[_.length-1],k==null?10:k)},u.tickFormat=function(k,_){return _==null?B:c(_)},u.nice=function(k){var _=f();return(!k||typeof k.range!="function")&&(k=e(_[0],_[_.length-1],k==null?10:k)),k?f(Ds(_,k)):u},u.copy=function(){return jn(u,Qh(t,e,r,i,n,o,a,s,l,c))},u}function Jh(){return Xr.apply(Qh(Fs,As,qt,ei,Ce,_e,Qr,Zr,ue,eo).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function nt(t){return function(){return t}}var Ns=Math.abs,wt=Math.atan2,We=Math.cos,tf=Math.max,ro=Math.min,Jt=Math.sin,Tr=Math.sqrt,Tt=1e-12,ii=Math.PI,ji=ii/2,ni=2*ii;function ef(t){return t>1?0:t<-1?ii:Math.acos(t)}function $s(t){return t>=1?ji:t<=-1?-ji:Math.asin(t)}var Rs=Math.PI,zs=2*Rs,vr=1e-6,Xy=zs-vr;function rf(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Ky(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return rf;let r=10**e;return function(i){this._+=i[0];for(let n=1,o=i.length;n<o;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}var Sr=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?rf:Ky(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,o,a){this._append`C${+e},${+r},${+i},${+n},${this._x1=+o},${this._y1=+a}`}arcTo(e,r,i,n,o){if(e=+e,r=+r,i=+i,n=+n,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=i-e,c=n-r,u=a-e,h=s-r,f=u*u+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(f>vr)if(!(Math.abs(h*l-c*u)>vr)||!o)this._append`L${this._x1=e},${this._y1=r}`;else{let p=i-a,g=n-s,y=l*l+c*c,T=p*p+g*g,S=Math.sqrt(y),x=Math.sqrt(f),v=o*Math.tan((Rs-Math.acos((y+f-T)/(2*S*x)))/2),L=v/x,B=v/S;Math.abs(L-1)>vr&&this._append`L${e+L*u},${r+L*h}`,this._append`A${o},${o},0,0,${+(h*p>u*g)},${this._x1=e+B*l},${this._y1=r+B*c}`}}arc(e,r,i,n,o,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=e+s,u=r+l,h=1^a,f=a?n-o:o-n;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>vr||Math.abs(this._y1-u)>vr)&&this._append`L${c},${u}`,i&&(f<0&&(f=f%zs+zs),f>Xy?this._append`A${i},${i},0,1,${h},${e-s},${r-l}A${i},${i},0,1,${h},${this._x1=c},${this._y1=u}`:f>vr&&this._append`A${i},${i},0,${+(f>=Rs)},${h},${this._x1=e+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function nf(){return new Sr}nf.prototype=Sr.prototype;function io(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new Sr(e)}function Zy(t){return t.innerRadius}function Qy(t){return t.outerRadius}function Jy(t){return t.startAngle}function t_(t){return t.endAngle}function e_(t){return t&&t.padAngle}function r_(t,e,r,i,n,o,a,s){var l=r-t,c=i-e,u=a-n,h=s-o,f=h*l-u*c;if(!(f*f<Tt))return f=(u*(e-o)-h*(t-n))/f,[t+f*l,e+f*c]}function no(t,e,r,i,n,o,a){var s=t-r,l=e-i,c=(a?o:-o)/Tr(s*s+l*l),u=c*l,h=-c*s,f=t+u,p=e+h,g=r+u,y=i+h,T=(f+g)/2,S=(p+y)/2,x=g-f,v=y-p,L=x*x+v*v,B=n-o,k=f*y-g*p,_=(v<0?-1:1)*Tr(tf(0,B*B*L-k*k)),G=(k*v-x*_)/L,it=(-k*x-v*_)/L,Q=(k*v+x*_)/L,I=(-k*x+v*_)/L,U=G-T,E=it-S,P=Q-T,Lt=I-S;return U*U+E*E>P*P+Lt*Lt&&(G=Q,it=I),{cx:G,cy:it,x01:-u,y01:-h,x11:G*(n/B-1),y11:it*(n/B-1)}}function i_(){var t=Zy,e=Qy,r=nt(0),i=null,n=Jy,o=t_,a=e_,s=null,l=io(c);function c(){var u,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=n.apply(this,arguments)-ji,y=o.apply(this,arguments)-ji,T=Ns(y-g),S=y>g;if(s||(s=u=l()),p<f&&(h=p,p=f,f=h),!(p>Tt))s.moveTo(0,0);else if(T>ni-Tt)s.moveTo(p*We(g),p*Jt(g)),s.arc(0,0,p,g,y,!S),f>Tt&&(s.moveTo(f*We(y),f*Jt(y)),s.arc(0,0,f,y,g,S));else{var x=g,v=y,L=g,B=y,k=T,_=T,G=a.apply(this,arguments)/2,it=G>Tt&&(i?+i.apply(this,arguments):Tr(f*f+p*p)),Q=ro(Ns(p-f)/2,+r.apply(this,arguments)),I=Q,U=Q,E,P;if(it>Tt){var Lt=$s(it/f*Jt(G)),dt=$s(it/p*Jt(G));(k-=Lt*2)>Tt?(Lt*=S?1:-1,L+=Lt,B-=Lt):(k=0,L=B=(g+y)/2),(_-=dt*2)>Tt?(dt*=S?1:-1,x+=dt,v-=dt):(_=0,x=v=(g+y)/2)}var ut=p*We(x),X=p*Jt(x),at=f*We(B),Rt=f*Jt(B);if(Q>Tt){var Ae=p*We(v),Le=p*Jt(v),Je=f*We(L),tr=f*Jt(L),zt;if(T<ii)if(zt=r_(ut,X,Je,tr,Ae,Le,at,Rt)){var Ee=ut-zt[0],er=X-zt[1],rr=Ae-zt[0],F=Le-zt[1],q=1/Jt(ef((Ee*rr+er*F)/(Tr(Ee*Ee+er*er)*Tr(rr*rr+F*F)))/2),H=Tr(zt[0]*zt[0]+zt[1]*zt[1]);I=ro(Q,(f-H)/(q-1)),U=ro(Q,(p-H)/(q+1))}else I=U=0}_>Tt?U>Tt?(E=no(Je,tr,ut,X,p,U,S),P=no(Ae,Le,at,Rt,p,U,S),s.moveTo(E.cx+E.x01,E.cy+E.y01),U<Q?s.arc(E.cx,E.cy,U,wt(E.y01,E.x01),wt(P.y01,P.x01),!S):(s.arc(E.cx,E.cy,U,wt(E.y01,E.x01),wt(E.y11,E.x11),!S),s.arc(0,0,p,wt(E.cy+E.y11,E.cx+E.x11),wt(P.cy+P.y11,P.cx+P.x11),!S),s.arc(P.cx,P.cy,U,wt(P.y11,P.x11),wt(P.y01,P.x01),!S))):(s.moveTo(ut,X),s.arc(0,0,p,x,v,!S)):s.moveTo(ut,X),!(f>Tt)||!(k>Tt)?s.lineTo(at,Rt):I>Tt?(E=no(at,Rt,Ae,Le,f,-I,S),P=no(ut,X,Je,tr,f,-I,S),s.lineTo(E.cx+E.x01,E.cy+E.y01),I<Q?s.arc(E.cx,E.cy,I,wt(E.y01,E.x01),wt(P.y01,P.x01),!S):(s.arc(E.cx,E.cy,I,wt(E.y01,E.x01),wt(E.y11,E.x11),!S),s.arc(0,0,f,wt(E.cy+E.y11,E.cx+E.x11),wt(P.cy+P.y11,P.cx+P.x11),S),s.arc(P.cx,P.cy,I,wt(P.y11,P.x11),wt(P.y01,P.x01),!S))):s.arc(0,0,f,B,L,S)}if(s.closePath(),u)return s=null,u+""||null}return c.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+n.apply(this,arguments)+ +o.apply(this,arguments))/2-ii/2;return[We(h)*u,Jt(h)*u]},c.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:nt(+u),c):t},c.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:nt(+u),c):e},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:nt(+u),c):r},c.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:nt(+u),c):i},c.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:nt(+u),c):n},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:nt(+u),c):o},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:nt(+u),c):a},c.context=function(u){return arguments.length?(s=u==null?null:u,c):s},c}function of(t){this._context=t}of.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Vi(t){return new of(t)}var T5=Array.prototype.slice;function oo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function af(t){return t[0]}function sf(t){return t[1]}function n_(t,e){var r=nt(!0),i=null,n=Vi,o=null,a=io(s);t=typeof t=="function"?t:t===void 0?af:nt(t),e=typeof e=="function"?e:e===void 0?sf:nt(e);function s(l){var c,u=(l=oo(l)).length,h,f=!1,p;for(i==null&&(o=n(p=a())),c=0;c<=u;++c)!(c<u&&r(h=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,l),+e(h,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:nt(+l),s):t},s.y=function(l){return arguments.length?(e=typeof l=="function"?l:nt(+l),s):e},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:nt(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,i!=null&&(o=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=o=null:o=n(i=l),s):i},s}function lf(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function cf(t){return t}function o_(){var t=cf,e=lf,r=null,i=nt(0),n=nt(ni),o=nt(0);function a(s){var l,c=(s=oo(s)).length,u,h,f=0,p=new Array(c),g=new Array(c),y=+i.apply(this,arguments),T=Math.min(ni,Math.max(-ni,n.apply(this,arguments)-y)),S,x=Math.min(Math.abs(T)/c,o.apply(this,arguments)),v=x*(T<0?-1:1),L;for(l=0;l<c;++l)(L=g[p[l]=l]=+t(s[l],l,s))>0&&(f+=L);for(e!=null?p.sort(function(B,k){return e(g[B],g[k])}):r!=null&&p.sort(function(B,k){return r(s[B],s[k])}),l=0,h=f?(T-c*v)/f:0;l<c;++l,y=S)u=p[l],L=g[u],S=y+(L>0?L*h:0)+v,g[u]={data:s[u],index:l,value:L,startAngle:y,endAngle:S,padAngle:x};return g}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:nt(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,r=null,a):e},a.sort=function(s){return arguments.length?(r=s,e=null,a):r},a.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:nt(+s),a):i},a.endAngle=function(s){return arguments.length?(n=typeof s=="function"?s:nt(+s),a):n},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:nt(+s),a):o},a}function oi(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Gi(t){this._context=t}Gi.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:oi(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:oi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ps(t){return new Gi(t)}var ao=class{constructor(e,r){this._context=e,this._x=r}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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}};function qs(t){return new ao(t,!0)}function Ws(t){return new ao(t,!1)}function Ht(){}function uf(t){this._context=t}uf.prototype={areaStart:Ht,areaEnd:Ht,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:oi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Us(t){return new uf(t)}function hf(t){this._context=t}hf.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:oi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hs(t){return new hf(t)}function ff(t,e){this._basis=new Gi(t),this._beta=e}ff.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],n=e[0],o=t[r]-i,a=e[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+l*o),this._beta*e[s]+(1-this._beta)*(n+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Ys=function t(e){function r(i){return e===1?new Gi(i):new ff(i,e)}return r.beta=function(i){return t(+i)},r}(.85);function ai(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function so(t,e){this._context=t,this._k=(1-e)/6}so.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:ai(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ai(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var js=function t(e){function r(i){return new so(i,e)}return r.tension=function(i){return t(+i)},r}(0);function lo(t,e){this._context=t,this._k=(1-e)/6}lo.prototype={areaStart:Ht,areaEnd:Ht,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ai(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Vs=function t(e){function r(i){return new lo(i,e)}return r.tension=function(i){return t(+i)},r}(0);function co(t,e){this._context=t,this._k=(1-e)/6}co.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(t,e){switch(t=+t,e=+e,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:ai(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Gs=function t(e){function r(i){return new co(i,e)}return r.tension=function(i){return t(+i)},r}(0);function Xi(t,e,r){var i=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Tt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Tt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,n,o,a,t._x2,t._y2)}function pf(t,e){this._context=t,this._alpha=e}pf.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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Xi(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Xs=function t(e){function r(i){return e?new pf(i,e):new so(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function df(t,e){this._context=t,this._alpha=e}df.prototype={areaStart:Ht,areaEnd:Ht,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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Xi(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ks=function t(e){function r(i){return e?new df(i,e):new lo(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function mf(t,e){this._context=t,this._alpha=e}mf.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(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:Xi(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Zs=function t(e){function r(i){return e?new mf(i,e):new co(i,0)}return r.alpha=function(i){return t(+i)},r}(.5);function gf(t){this._context=t}gf.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Qs(t){return new gf(t)}function xf(t){return t<0?-1:1}function yf(t,e,r){var i=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),s=(o*n+a*i)/(i+n);return(xf(o)+xf(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function _f(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Js(t,e,r){var i=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,n+s*e,o-s,a-s*r,o,a)}function uo(t){this._context=t}uo.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:Js(this,this._t0,_f(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Js(this,_f(this,r=yf(this,t,e)),r);break;default:Js(this,this._t0,r=yf(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Cf(t){this._context=new bf(t)}(Cf.prototype=Object.create(uo.prototype)).point=function(t,e){uo.prototype.point.call(this,e,t)};function bf(t){this._context=t}bf.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,o){this._context.bezierCurveTo(e,t,i,r,o,n)}};function tl(t){return new uo(t)}function el(t){return new Cf(t)}function vf(t){this._context=t}vf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=Tf(t),n=Tf(e),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],n[0][o],i[1][o],n[1][o],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Tf(t){var e,r=t.length-1,i,n=new Array(r),o=new Array(r),a=new Array(r);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/o[e-1],o[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-n[e+1];return[n,o]}function rl(t){return new vf(t)}function ho(t,e){this._context=t,this._t=e}ho.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function il(t){return new ho(t,.5)}function nl(t){return new ho(t,0)}function ol(t){return new ho(t,1)}var a_={value:()=>{}};function kf(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new fo(r)}function fo(t){this._=t}function s_(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}fo.prototype=kf.prototype={constructor:fo,on:function(t,e){var r=this._,i=s_(t+"",r),n,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=l_(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Sf(r[n],t.name,e);else if(e==null)for(n in r)r[n]=Sf(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new fo(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,o;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,n=o.length;i<n;++i)o[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,o=i.length;n<o;++n)i[n].value.apply(e,r)}};function l_(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function Sf(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=a_,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var al=kf;var si=0,Zi=0,Ki=0,Bf=1e3,po,Qi,mo=0,kr=0,go=0,Ji=typeof performance=="object"&&performance.now?performance:Date,Mf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function en(){return kr||(Mf(c_),kr=Ji.now()+go)}function c_(){kr=0}function tn(){this._call=this._time=this._next=null}tn.prototype=xo.prototype={constructor:tn,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?en():+r)+(e==null?0:+e),!this._next&&Qi!==this&&(Qi?Qi._next=this:po=this,Qi=this),this._call=t,this._time=r,sl()},stop:function(){this._call&&(this._call=null,this._time=1/0,sl())}};function xo(t,e,r){var i=new tn;return i.restart(t,e,r),i}function Ff(){en(),++si;for(var t=po,e;t;)(e=kr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--si}function wf(){kr=(mo=Ji.now())+go,si=Zi=0;try{Ff()}finally{si=0,h_(),kr=0}}function u_(){var t=Ji.now(),e=t-mo;e>Bf&&(go-=e,mo=t)}function h_(){for(var t,e=po,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:po=r);Qi=t,sl(i)}function sl(t){if(!si){Zi&&(Zi=clearTimeout(Zi));var e=t-kr;e>24?(t<1/0&&(Zi=setTimeout(wf,t-Ji.now()-go)),Ki&&(Ki=clearInterval(Ki))):(Ki||(mo=Ji.now(),Ki=setInterval(u_,Bf)),si=1,Mf(wf))}}function yo(t,e,r){var i=new tn;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var f_=al("start","end","cancel","interrupt"),p_=[],Ef=0,Af=1,Co=2,_o=3,Lf=4,bo=5,rn=6;function Ue(t,e,r,i,n,o){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;d_(t,r,{name:e,index:i,group:n,on:f_,tween:p_,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ef})}function nn(t,e){var r=ht(t,e);if(r.state>Ef)throw new Error("too late; already scheduled");return r}function Bt(t,e){var r=ht(t,e);if(r.state>_o)throw new Error("too late; already running");return r}function ht(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function d_(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=xo(o,0,r.time);function o(c){r.state=Af,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==Af)return l();for(u in i)if(p=i[u],p.name===r.name){if(p.state===_o)return yo(a);p.state===Lf?(p.state=rn,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete i[u]):+u<e&&(p.state=rn,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete i[u])}if(yo(function(){r.state===_o&&(r.state=Lf,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=Co,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Co){for(r.state=_o,n=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(n[++h]=p);n.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=bo,1),h=-1,f=n.length;++h<f;)n[h].call(t,u);r.state===bo&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=rn,r.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function To(t,e){var r=t.__transition,i,n,o=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((i=r[a]).name!==e){o=!1;continue}n=i.state>Co&&i.state<bo,i.state=rn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}o&&delete t.__transition}}function Of(t){return this.each(function(){To(this,t)})}function m_(t,e){var r,i;return function(){var n=Bt(this,t),o=n.tween;if(o!==r){i=r=o;for(var a=0,s=i.length;a<s;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function g_(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var o=Bt(this,t),a=o.tween;if(a!==i){n=(i=a).slice();for(var s={name:e,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===e){n[l]=s;break}l===c&&n.push(s)}o.tween=n}}function If(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=ht(this.node(),r).tween,n=0,o=i.length,a;n<o;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((e==null?m_:g_)(r,t,e))}function li(t,e,r){var i=t._id;return t.each(function(){var n=Bt(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return ht(n,i).value[e]}}function vo(t,e){var r;return(typeof e=="number"?kt:e instanceof Zt?dr:(r=Zt(e))?(e=r,dr):Ri)(t,e)}function x_(t){return function(){this.removeAttribute(t)}}function y_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function __(t,e,r){var i,n=r+"",o;return function(){var a=this.getAttribute(t);return a===n?null:a===i?o:o=e(i=a,r)}}function C_(t,e,r){var i,n=r+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?o:o=e(i=a,r)}}function b_(t,e,r){var i,n,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s)))}}function T_(t,e,r){var i,n,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s)))}}function Df(t,e){var r=me(t),i=r==="transform"?hs:vo;return this.attrTween(t,typeof e=="function"?(r.local?T_:b_)(r,i,li(this,"attr."+t,e)):e==null?(r.local?y_:x_)(r):(r.local?C_:__)(r,i,e))}function v_(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function S_(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function k_(t,e){var r,i;function n(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&S_(t,o)),r}return n._value=e,n}function w_(t,e){var r,i;function n(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&v_(t,o)),r}return n._value=e,n}function Nf(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=me(t);return this.tween(r,(i.local?k_:w_)(i,e))}function B_(t,e){return function(){nn(this,t).delay=+e.apply(this,arguments)}}function M_(t,e){return e=+e,function(){nn(this,t).delay=e}}function $f(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?B_:M_)(e,t)):ht(this.node(),e).delay}function F_(t,e){return function(){Bt(this,t).duration=+e.apply(this,arguments)}}function A_(t,e){return e=+e,function(){Bt(this,t).duration=e}}function Rf(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?F_:A_)(e,t)):ht(this.node(),e).duration}function L_(t,e){if(typeof e!="function")throw new Error;return function(){Bt(this,t).ease=e}}function zf(t){var e=this._id;return arguments.length?this.each(L_(e,t)):ht(this.node(),e).ease}function E_(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Bt(this,t).ease=r}}function Pf(t){if(typeof t!="function")throw new Error;return this.each(E_(this._id,t))}function qf(t){typeof t!="function"&&(t=Ei(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o=e[n],a=o.length,s=i[n]=[],l,c=0;c<a;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&s.push(l);return new Ot(i,this._parents,this._name,this._id)}function Wf(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,o=Math.min(i,n),a=new Array(i),s=0;s<o;++s)for(var l=e[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<i;++s)a[s]=e[s];return new Ot(a,this._parents,this._name,this._id)}function O_(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function I_(t,e,r){var i,n,o=O_(e)?nn:Bt;return function(){var a=o(this,t),s=a.on;s!==i&&(n=(i=s).copy()).on(e,r),a.on=n}}function Uf(t,e){var r=this._id;return arguments.length<2?ht(this.node(),r).on.on(t):this.each(I_(r,t,e))}function D_(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Hf(){return this.on("end.remove",D_(this._id))}function Yf(t){var e=this._name,r=this._id;typeof t!="function"&&(t=ur(t));for(var i=this._groups,n=i.length,o=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=t.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Ue(c[f],e,r,f,c,ht(u,r)));return new Ot(o,this._parents,e,r)}function jf(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Li(t));for(var i=this._groups,n=i.length,o=[],a=[],s=0;s<n;++s)for(var l=i[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=t.call(u,u.__data__,h,l),p,g=ht(u,r),y=0,T=f.length;y<T;++y)(p=f[y])&&Ue(p,e,r,y,f,g);o.push(f),a.push(u)}return new Ot(o,a,e,r)}var N_=ge.prototype.constructor;function Vf(){return new N_(this._groups,this._parents)}function $_(t,e){var r,i,n;return function(){var o=$e(this,t),a=(this.style.removeProperty(t),$e(this,t));return o===a?null:o===r&&a===i?n:n=e(r=o,i=a)}}function Gf(t){return function(){this.style.removeProperty(t)}}function R_(t,e,r){var i,n=r+"",o;return function(){var a=$e(this,t);return a===n?null:a===i?o:o=e(i=a,r)}}function z_(t,e,r){var i,n,o;return function(){var a=$e(this,t),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),$e(this,t))),a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s))}}function P_(t,e){var r,i,n,o="style."+e,a="end."+o,s;return function(){var l=Bt(this,t),c=l.on,u=l.value[o]==null?s||(s=Gf(e)):void 0;(c!==r||n!==u)&&(i=(r=c).copy()).on(a,n=u),l.on=i}}function Xf(t,e,r){var i=(t+="")=="transform"?us:vo;return e==null?this.styleTween(t,$_(t,i)).on("end.style."+t,Gf(t)):typeof e=="function"?this.styleTween(t,z_(t,i,li(this,"style."+t,e))).each(P_(this._id,t)):this.styleTween(t,R_(t,i,e),r).on("end.style."+t,null)}function q_(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function W_(t,e,r){var i,n;function o(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&q_(t,a,r)),i}return o._value=e,o}function Kf(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,W_(t,e,r==null?"":r))}function U_(t){return function(){this.textContent=t}}function H_(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function Zf(t){return this.tween("text",typeof t=="function"?H_(li(this,"text",t)):U_(t==null?"":t+""))}function Y_(t){return function(e){this.textContent=t.call(this,e)}}function j_(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&Y_(n)),e}return i._value=t,i}function Qf(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,j_(t))}function Jf(){for(var t=this._name,e=this._id,r=So(),i=this._groups,n=i.length,o=0;o<n;++o)for(var a=i[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=ht(l,e);Ue(l,t,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Ot(i,this._parents,t,r)}function tp(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--n===0&&o()}};r.each(function(){var c=Bt(this,i),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),c.on=e}),n===0&&o()})}var V_=0;function Ot(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function ep(t){return ge().transition(t)}function So(){return++V_}var be=ge.prototype;Ot.prototype=ep.prototype={constructor:Ot,select:Yf,selectAll:jf,selectChild:be.selectChild,selectChildren:be.selectChildren,filter:qf,merge:Wf,selection:Vf,transition:Jf,call:be.call,nodes:be.nodes,node:be.node,size:be.size,empty:be.empty,each:be.each,on:Uf,attr:Df,attrTween:Nf,style:Xf,styleTween:Kf,text:Zf,textTween:Qf,remove:Hf,tween:If,delay:$f,duration:Rf,ease:zf,easeVarying:Pf,end:tp,[Symbol.iterator]:be[Symbol.iterator]};function ko(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var G_={time:null,delay:0,duration:250,ease:ko};function X_(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function rp(t){var e,r;t instanceof Ot?(e=t._id,t=t._name):(e=So(),(r=G_).time=en(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,o=0;o<n;++o)for(var a=i[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Ue(l,t,e,c,a,r||X_(l,e));return new Ot(i,this._parents,t,e)}ge.prototype.interrupt=Of;ge.prototype.transition=rp;var{abs:YO,max:jO,min:VO}=Math;function ip(t){return[+t[0],+t[1]]}function K_(t){return[ip(t[0]),ip(t[1])]}var GO={name:"x",handles:["w","e"].map(ll),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},XO={name:"y",handles:["n","s"].map(ll),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},KO={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(ll),input:function(t){return t==null?null:K_(t)},output:function(t){return t}};function ll(t){return{type:t}}function Z_(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function np(t,e){return fetch(t,e).then(Z_)}function cl(t){return(e,r)=>np(e,r).then(i=>new DOMParser().parseFromString(i,t))}var Q_=cl("application/xml"),J_=cl("text/html"),t1=cl("image/svg+xml");function He(t,e,r){this.k=t,this.x=e,this.y=r}He.prototype={constructor:He,scale:function(t){return t===1?this:new He(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new He(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ul=new He(1,0,0);hl.prototype=He.prototype;function hl(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ul;return t.__zoom}var wo={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let n=r<.5?r*(1+e):r+e-r*e,o=2*r-n;switch(i){case"r":return wo.hue2rgb(o,n,t+.3333333333333333)*255;case"g":return wo.hue2rgb(o,n,t)*255;case"b":return wo.hue2rgb(o,n,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;let n=Math.max(t,e,r),o=Math.min(t,e,r),a=(n+o)/2;if(i==="l")return a*100;if(n===o)return 0;let s=n-o,l=a>.5?s/(2-n-o):s/(n+o);if(i==="s")return l*100;switch(n){case t:return((e-r)/s+(e<r?6:0))*60;case e:return((r-t)/s+2)*60;case r:return((t-e)/s+4)*60;default:return-1}}},ap=wo;var e1={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},sp=e1;var r1={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},lp=r1;var i1={channel:ap,lang:sp,unit:lp},N=i1;var Te={};for(let t=0;t<=255;t++)Te[t]=N.unit.dec2hex(t);var ft={ALL:0,RGB:1,HSL:2};var dl=class{constructor(){this.type=ft.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ft.ALL}is(e){return this.type===e}},cp=dl;var ml=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new cp}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ft.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=N.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=N.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=N.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=N.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=N.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=N.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(ft.HSL)&&r!==void 0?r:(this._ensureHSL(),N.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(ft.HSL)&&r!==void 0?r:(this._ensureHSL(),N.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(ft.HSL)&&r!==void 0?r:(this._ensureHSL(),N.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(ft.RGB)&&r!==void 0?r:(this._ensureRGB(),N.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(ft.RGB)&&r!==void 0?r:(this._ensureRGB(),N.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(ft.RGB)&&r!==void 0?r:(this._ensureRGB(),N.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ft.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ft.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ft.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ft.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ft.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ft.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},up=ml;var n1=new up({r:0,g:0,b:0,a:0},"transparent"),Ye=n1;var hp={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(hp.re);if(!e)return;let r=e[1],i=parseInt(r,16),n=r.length,o=n%4===0,a=n>4,s=a?1:17,l=a?8:4,c=o?0:-1,u=a?255:15;return Ye.set({r:(i>>l*(c+3)&u)*s,g:(i>>l*(c+2)&u)*s,b:(i>>l*(c+1)&u)*s,a:o?(i&u)*s/255:1},t)},stringify:t=>{let{r:e,g:r,b:i,a:n}=t;return n<1?`#${Te[Math.round(e)]}${Te[Math.round(r)]}${Te[Math.round(i)]}${Te[Math.round(n*255)]}`:`#${Te[Math.round(e)]}${Te[Math.round(r)]}${Te[Math.round(i)]}`}},wr=hp;var Bo={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{let e=t.match(Bo.hueRe);if(e){let[,r,i]=e;switch(i){case"grad":return N.channel.clamp.h(parseFloat(r)*.9);case"rad":return N.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return N.channel.clamp.h(parseFloat(r)*360)}}return N.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Bo.re);if(!r)return;let[,i,n,o,a,s]=r;return Ye.set({h:Bo._hue2deg(i),s:N.channel.clamp.s(parseFloat(n)),l:N.channel.clamp.l(parseFloat(o)),a:a?N.channel.clamp.a(s?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{let{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${N.lang.round(e)}, ${N.lang.round(r)}%, ${N.lang.round(i)}%, ${n})`:`hsl(${N.lang.round(e)}, ${N.lang.round(r)}%, ${N.lang.round(i)}%)`}},on=Bo;var Mo={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();let e=Mo.colors[t];if(e)return wr.parse(e)},stringify:t=>{let e=wr.stringify(t);for(let r in Mo.colors)if(Mo.colors[r]===e)return r}},gl=Mo;var fp={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(fp.re);if(!r)return;let[,i,n,o,a,s,l,c,u]=r;return Ye.set({r:N.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:N.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:N.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?N.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{let{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${N.lang.round(e)}, ${N.lang.round(r)}, ${N.lang.round(i)}, ${N.lang.round(n)})`:`rgb(${N.lang.round(e)}, ${N.lang.round(r)}, ${N.lang.round(i)})`}},an=fp;var o1={format:{keyword:gl,hex:wr,rgb:an,rgba:an,hsl:on,hsla:on},parse:t=>{if(typeof t!="string")return t;let e=wr.parse(t)||an.parse(t)||on.parse(t)||gl.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(ft.HSL)||t.data.r===void 0?on.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?an.stringify(t):wr.stringify(t)},pt=o1;var a1=t=>{let{r:e,g:r,b:i}=pt.parse(t),n=.2126*N.channel.toLinear(e)+.7152*N.channel.toLinear(r)+.0722*N.channel.toLinear(i);return N.lang.round(n)},pp=a1;var s1=t=>pp(t)>=.5,dp=s1;var l1=t=>!dp(t),Br=l1;var c1=(t,e,r)=>{let i=pt.parse(t),n=i[e],o=N.channel.clamp[e](n+r);return n!==o&&(i[e]=o),pt.stringify(i)},Fo=c1;var u1=(t,e)=>Fo(t,"l",e),D=u1;var h1=(t,e)=>Fo(t,"l",-e),z=h1;var f1=(t,e)=>{let r=pt.parse(t);for(let i in e)r[i]=N.channel.clamp[i](e[i]);return pt.stringify(r)},Ao=f1;var p1=(t,e,r=0,i=1)=>{if(typeof t!="number")return Ao(t,{a:e});let n=Ye.set({r:N.channel.clamp.r(t),g:N.channel.clamp.g(e),b:N.channel.clamp.b(r),a:N.channel.clamp.a(i)});return pt.stringify(n)},je=p1;var d1=(t,e)=>N.lang.round(pt.parse(t)[e]),m1=d1;var g1=(t,e)=>{let r=pt.parse(t),i={};for(let n in e)e[n]&&(i[n]=r[n]+e[n]);return Ao(t,i)},m=g1;var x1=(t,e,r=50)=>{let{r:i,g:n,b:o,a}=pt.parse(t),{r:s,g:l,b:c,a:u}=pt.parse(e),h=r/100,f=h*2-1,p=a-u,y=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,T=1-y,S=i*y+s*T,x=n*y+l*T,v=o*y+c*T,L=a*h+u*(1-h);return je(S,x,v,L)},mp=x1;var y1=(t,e=100)=>{let r=pt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,mp(r,t,e)},w=y1;var _1=typeof global=="object"&&global&&global.Object===Object&&global,Lo=_1;var C1=typeof self=="object"&&self&&self.Object===Object&&self,b1=Lo||C1||Function("return this")(),Mt=b1;var T1=Mt.Symbol,ci=T1;var gp=Object.prototype,v1=gp.hasOwnProperty,S1=gp.toString,sn=ci?ci.toStringTag:void 0;function k1(t){var e=v1.call(t,sn),r=t[sn];try{t[sn]=void 0;var i=!0}catch(o){}var n=S1.call(t);return i&&(e?t[sn]=r:delete t[sn]),n}var xp=k1;var w1=Object.prototype,B1=w1.toString;function M1(t){return B1.call(t)}var yp=M1;var F1="[object Null]",A1="[object Undefined]",_p=ci?ci.toStringTag:void 0;function L1(t){return t==null?t===void 0?A1:F1:_p&&_p in Object(t)?xp(t):yp(t)}var ve=L1;function E1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Eo=E1;var O1="[object AsyncFunction]",I1="[object Function]",D1="[object GeneratorFunction]",N1="[object Proxy]";function $1(t){if(!Eo(t))return!1;var e=ve(t);return e==I1||e==D1||e==O1||e==N1}var Oo=$1;var R1=Mt["__core-js_shared__"],Io=R1;var Cp=function(){var t=/[^.]+$/.exec(Io&&Io.keys&&Io.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function z1(t){return!!Cp&&Cp in t}var bp=z1;var P1=Function.prototype,q1=P1.toString;function W1(t){if(t!=null){try{return q1.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Se=W1;var U1=/[\\^$.*+?()[\]{}|]/g,H1=/^\[object .+?Constructor\]$/,Y1=Function.prototype,j1=Object.prototype,V1=Y1.toString,G1=j1.hasOwnProperty,X1=RegExp("^"+V1.call(G1).replace(U1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function K1(t){if(!Eo(t)||bp(t))return!1;var e=Oo(t)?X1:H1;return e.test(Se(t))}var Tp=K1;function Z1(t,e){return t==null?void 0:t[e]}var vp=Z1;function Q1(t,e){var r=vp(t,e);return Tp(r)?r:void 0}var Yt=Q1;var J1=Yt(Object,"create"),ke=J1;function tC(){this.__data__=ke?ke(null):{},this.size=0}var Sp=tC;function eC(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var kp=eC;var rC="__lodash_hash_undefined__",iC=Object.prototype,nC=iC.hasOwnProperty;function oC(t){var e=this.__data__;if(ke){var r=e[t];return r===rC?void 0:r}return nC.call(e,t)?e[t]:void 0}var wp=oC;var aC=Object.prototype,sC=aC.hasOwnProperty;function lC(t){var e=this.__data__;return ke?e[t]!==void 0:sC.call(e,t)}var Bp=lC;var cC="__lodash_hash_undefined__";function uC(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ke&&e===void 0?cC:e,this}var Mp=uC;function ui(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ui.prototype.clear=Sp;ui.prototype.delete=kp;ui.prototype.get=wp;ui.prototype.has=Bp;ui.prototype.set=Mp;var xl=ui;function hC(){this.__data__=[],this.size=0}var Fp=hC;function fC(t,e){return t===e||t!==t&&e!==e}var Ap=fC;function pC(t,e){for(var r=t.length;r--;)if(Ap(t[r][0],e))return r;return-1}var Ve=pC;var dC=Array.prototype,mC=dC.splice;function gC(t){var e=this.__data__,r=Ve(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():mC.call(e,r,1),--this.size,!0}var Lp=gC;function xC(t){var e=this.__data__,r=Ve(e,t);return r<0?void 0:e[r][1]}var Ep=xC;function yC(t){return Ve(this.__data__,t)>-1}var Op=yC;function _C(t,e){var r=this.__data__,i=Ve(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}var Ip=_C;function hi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}hi.prototype.clear=Fp;hi.prototype.delete=Lp;hi.prototype.get=Ep;hi.prototype.has=Op;hi.prototype.set=Ip;var Dp=hi;var CC=Yt(Mt,"Map"),fi=CC;function bC(){this.size=0,this.__data__={hash:new xl,map:new(fi||Dp),string:new xl}}var Np=bC;function TC(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var $p=TC;function vC(t,e){var r=t.__data__;return $p(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ge=vC;function SC(t){var e=Ge(this,t).delete(t);return this.size-=e?1:0,e}var Rp=SC;function kC(t){return Ge(this,t).get(t)}var zp=kC;function wC(t){return Ge(this,t).has(t)}var Pp=wC;function BC(t,e){var r=Ge(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}var qp=BC;function pi(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}pi.prototype.clear=Np;pi.prototype.delete=Rp;pi.prototype.get=zp;pi.prototype.has=Pp;pi.prototype.set=qp;var yl=pi;var MC="Expected a function";function _l(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(MC);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(_l.Cache||yl),r}_l.Cache=yl;var Do=_l;var FC=Object.prototype;function AC(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||FC;return t===r}var No=AC;function LC(t,e){return function(r){return t(e(r))}}var Wp=LC;var EC=Wp(Object.keys,Object),Up=EC;var OC=Object.prototype,IC=OC.hasOwnProperty;function DC(t){if(!No(t))return Up(t);var e=[];for(var r in Object(t))IC.call(t,r)&&r!="constructor"&&e.push(r);return e}var Hp=DC;var NC=Yt(Mt,"DataView"),$o=NC;var $C=Yt(Mt,"Promise"),Ro=$C;var RC=Yt(Mt,"Set"),zo=RC;var zC=Yt(Mt,"WeakMap"),Po=zC;var Yp="[object Map]",PC="[object Object]",jp="[object Promise]",Vp="[object Set]",Gp="[object WeakMap]",Xp="[object DataView]",qC=Se($o),WC=Se(fi),UC=Se(Ro),HC=Se(zo),YC=Se(Po),Mr=ve;($o&&Mr(new $o(new ArrayBuffer(1)))!=Xp||fi&&Mr(new fi)!=Yp||Ro&&Mr(Ro.resolve())!=jp||zo&&Mr(new zo)!=Vp||Po&&Mr(new Po)!=Gp)&&(Mr=function(t){var e=ve(t),r=e==PC?t.constructor:void 0,i=r?Se(r):"";if(i)switch(i){case qC:return Xp;case WC:return Yp;case UC:return jp;case HC:return Vp;case YC:return Gp}return e});var Kp=Mr;function jC(t){return t!=null&&typeof t=="object"}var di=jC;var VC="[object Arguments]";function GC(t){return di(t)&&ve(t)==VC}var Cl=GC;var Zp=Object.prototype,XC=Zp.hasOwnProperty,KC=Zp.propertyIsEnumerable,ZC=Cl(function(){return arguments}())?Cl:function(t){return di(t)&&XC.call(t,"callee")&&!KC.call(t,"callee")},Qp=ZC;var QC=Array.isArray,Jp=QC;var JC=9007199254740991;function tb(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=JC}var qo=tb;function eb(t){return t!=null&&qo(t.length)&&!Oo(t)}var td=eb;function rb(){return!1}var ed=rb;var nd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rd=nd&&typeof module=="object"&&module&&!module.nodeType&&module,ib=rd&&rd.exports===nd,id=ib?Mt.Buffer:void 0,nb=id?id.isBuffer:void 0,ob=nb||ed,od=ob;var ab="[object Arguments]",sb="[object Array]",lb="[object Boolean]",cb="[object Date]",ub="[object Error]",hb="[object Function]",fb="[object Map]",pb="[object Number]",db="[object Object]",mb="[object RegExp]",gb="[object Set]",xb="[object String]",yb="[object WeakMap]",_b="[object ArrayBuffer]",Cb="[object DataView]",bb="[object Float32Array]",Tb="[object Float64Array]",vb="[object Int8Array]",Sb="[object Int16Array]",kb="[object Int32Array]",wb="[object Uint8Array]",Bb="[object Uint8ClampedArray]",Mb="[object Uint16Array]",Fb="[object Uint32Array]",rt={};rt[bb]=rt[Tb]=rt[vb]=rt[Sb]=rt[kb]=rt[wb]=rt[Bb]=rt[Mb]=rt[Fb]=!0;rt[ab]=rt[sb]=rt[_b]=rt[lb]=rt[Cb]=rt[cb]=rt[ub]=rt[hb]=rt[fb]=rt[pb]=rt[db]=rt[mb]=rt[gb]=rt[xb]=rt[yb]=!1;function Ab(t){return di(t)&&qo(t.length)&&!!rt[ve(t)]}var ad=Ab;function Lb(t){return function(e){return t(e)}}var sd=Lb;var ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ln=ld&&typeof module=="object"&&module&&!module.nodeType&&module,Eb=ln&&ln.exports===ld,bl=Eb&&Lo.process,Ob=function(){try{var t=ln&&ln.require&&ln.require("util").types;return t||bl&&bl.binding&&bl.binding("util")}catch(e){}}(),Tl=Ob;var cd=Tl&&Tl.isTypedArray,Ib=cd?sd(cd):ad,ud=Ib;var Db="[object Map]",Nb="[object Set]",$b=Object.prototype,Rb=$b.hasOwnProperty;function zb(t){if(t==null)return!0;if(td(t)&&(Jp(t)||typeof t=="string"||typeof t.splice=="function"||od(t)||ud(t)||Qp(t)))return!t.length;var e=Kp(t);if(e==Db||e==Nb)return!t.size;if(No(t))return!Hp(t).length;for(var r in t)if(Rb.call(t,r))return!1;return!0}var cn=zb;var Ud=Cc(Dc(),1);var pn=Cc(op(),1);var Wo="comm",Uo="rule",Ho="decl";var hd="@import";var fd="@keyframes";var pd=Math.abs,un=String.fromCharCode;function Yo(t){return t.trim()}function jo(t,e,r){return t.replace(e,r)}function dd(t,e){return t.indexOf(e)}function Fr(t,e){return t.charCodeAt(e)|0}function Ar(t,e,r){return t.slice(e,r)}function te(t){return t.length}function Vo(t){return t.length}function mi(t,e){return e.push(t),t}var Go=1,gi=1,md=0,jt=0,lt=0,xi="";function Xo(t,e,r,i,n,o,a){return{value:t,root:e,parent:r,type:i,props:n,children:o,line:Go,column:gi,length:a,return:""}}function gd(){return lt}function xd(){return lt=jt>0?Fr(xi,--jt):0,gi--,lt===10&&(gi=1,Go--),lt}function Vt(){return lt=jt<md?Fr(xi,jt++):0,gi++,lt===10&&(gi=1,Go++),lt}function Xe(){return Fr(xi,jt)}function hn(){return jt}function Ko(t,e){return Ar(xi,t,e)}function vl(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yd(t){return Go=gi=1,md=te(xi=t),jt=0,[]}function _d(t){return xi="",t}function Zo(t){return Yo(Ko(jt-1,Sl(t===91?t+2:t===40?t+1:t)))}function Cd(t){for(;(lt=Xe())&<<33;)Vt();return vl(t)>2||vl(lt)>3?"":" "}function bd(t,e){for(;--e&&Vt()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return Ko(t,hn()+(e<6&&Xe()==32&&Vt()==32))}function Sl(t){for(;Vt();)switch(lt){case t:return jt;case 34:case 39:t!==34&&t!==39&&Sl(lt);break;case 40:t===41&&Sl(t);break;case 92:Vt();break}return jt}function Td(t,e){for(;Vt()&&t+lt!==47+10;)if(t+lt===42+42&&Xe()===47)break;return"/*"+Ko(e,jt-1)+"*"+un(t===47?t:Vt())}function vd(t){for(;!vl(Xe());)Vt();return Ko(t,jt)}function wd(t){return _d(Qo("",null,null,null,[""],t=yd(t),0,[0],t))}function Qo(t,e,r,i,n,o,a,s,l){for(var c=0,u=0,h=a,f=0,p=0,g=0,y=1,T=1,S=1,x=0,v="",L=n,B=o,k=i,_=v;T;)switch(g=x,x=Vt()){case 40:if(g!=108&&Fr(_,h-1)==58){dd(_+=jo(Zo(x),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:_+=Zo(x);break;case 9:case 10:case 13:case 32:_+=Cd(g);break;case 92:_+=bd(hn()-1,7);continue;case 47:switch(Xe()){case 42:case 47:mi(Pb(Td(Vt(),hn()),e,r),l);break;default:_+="/"}break;case 123*y:s[c++]=te(_)*S;case 125*y:case 59:case 0:switch(x){case 0:case 125:T=0;case 59+u:p>0&&te(_)-h&&mi(p>32?kd(_+";",i,r,h-1):kd(jo(_," ","")+";",i,r,h-2),l);break;case 59:_+=";";default:if(mi(k=Sd(_,e,r,c,u,n,s,v,L=[],B=[],h),o),x===123)if(u===0)Qo(_,e,k,k,L,o,h,s,B);else switch(f===99&&Fr(_,3)===110?100:f){case 100:case 109:case 115:Qo(t,k,k,i&&mi(Sd(t,k,k,0,0,n,s,v,n,L=[],h),B),n,B,h,s,i?L:B);break;default:Qo(_,k,k,k,[""],B,0,s,B)}}c=u=p=0,y=S=1,v=_="",h=a;break;case 58:h=1+te(_),p=g;default:if(y<1){if(x==123)--y;else if(x==125&&y++==0&&xd()==125)continue}switch(_+=un(x),x*y){case 38:S=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(te(_)-1)*S,S=1;break;case 64:Xe()===45&&(_+=Zo(Vt())),f=Xe(),u=h=te(v=_+=vd(hn())),x++;break;case 45:g===45&&te(_)==2&&(y=0)}}return o}function Sd(t,e,r,i,n,o,a,s,l,c,u){for(var h=n-1,f=n===0?o:[""],p=Vo(f),g=0,y=0,T=0;g<i;++g)for(var S=0,x=Ar(t,h+1,h=pd(y=a[g])),v=t;S<p;++S)(v=Yo(y>0?f[S]+" "+x:jo(x,/&\f/g,f[S])))&&(l[T++]=v);return Xo(t,e,r,n===0?Uo:s,l,c,u)}function Pb(t,e,r){return Xo(t,e,r,Wo,un(gd()),Ar(t,2,-2),0)}function kd(t,e,r,i){return Xo(t,e,r,Ho,Ar(t,0,i),Ar(t,i+1,-1),i)}function Jo(t,e){for(var r="",i=Vo(t),n=0;n<i;n++)r+=e(t[n],n,t,e)||"";return r}function Bd(t,e,r,i){switch(t.type){case hd:case Ho:return t.return=t.return||t.value;case Wo:return"";case fd:return t.return=t.value+"{"+Jo(t.children,i)+"}";case Uo:t.value=t.props.join(",")}return te(r=Jo(t.children,i))?t.return=t.value+"{"+r+"}":""}var we={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Il=function(t="fatal"){let e=we.fatal;typeof t=="string"?(t=t.toLowerCase(),t in we&&(e=we[t])):typeof t=="number"&&(e=t),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},e<=we.fatal&&(A.fatal=console.error?console.error.bind(console,Gt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Gt("FATAL"))),e<=we.error&&(A.error=console.error?console.error.bind(console,Gt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Gt("ERROR"))),e<=we.warn&&(A.warn=console.warn?console.warn.bind(console,Gt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Gt("WARN"))),e<=we.info&&(A.info=console.info?console.info.bind(console,Gt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Gt("INFO"))),e<=we.debug&&(A.debug=console.debug?console.debug.bind(console,Gt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gt("DEBUG"))),e<=we.trace&&(A.trace=console.debug?console.debug.bind(console,Gt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Gt("TRACE")))},Gt=t=>`%c${Ic().format("ss.SSS")} : ${t} : `,ma=/<br\s*\/?>/gi,qb=t=>t?Yd(t).replace(/\\n/g,"#br#").split("#br#"):[""],Hd=t=>pn.default.sanitize(t),Md=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){let i=e.securityLevel;i==="antiscript"||i==="strict"?t=Hd(t):i!=="loose"&&(t=Yd(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=Yb(t))}return t},dn=(t,e)=>t&&(e.dompurifyConfig?t=pn.default.sanitize(Md(t,e),e.dompurifyConfig).toString():t=pn.default.sanitize(Md(t,e),{FORBID_TAGS:["style"]}).toString(),t),Wb=(t,e)=>typeof t=="string"?dn(t,e):t.flat().map(r=>dn(r,e)),Ub=t=>ma.test(t),Hb=t=>t.split(ma),Yb=t=>t.replace(/#br#/g,"<br/>"),Yd=t=>t.replace(ma,"#br#"),jb=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},jd=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Vb=function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},Gb=function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},Xb=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return Xb(r)}else return e},Dl={getRows:qb,sanitizeText:dn,sanitizeTextOrArray:Wb,hasBreaks:Ub,splitBreaks:Hb,lineBreakRegex:ma,removeScript:Hd,getUrl:jb,evaluate:jd,getMax:Vb,getMin:Gb},Dt=(t,e)=>e?m(t,{s:-40,l:10}):m(t,{s:-40,l:-10}),ga="#ffffff",xa="#f2f2f2",Kb=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||m(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||m(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||D(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||w(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||D(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||m(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||m(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||m(this.primaryColor,{h:64}),this.fillType3=this.fillType3||m(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||m(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||m(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||m(this.primaryColor,{h:128}),this.fillType7=this.fillType7||m(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||m(this.primaryColor,{l:-10}),this.pie5=this.pie5||m(this.secondaryColor,{l:-10}),this.pie6=this.pie6||m(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||m(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||m(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||m(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||m(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||m(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||m(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?D(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||m(this.primaryColor,{h:-30}),this.git4=this.git4||m(this.primaryColor,{h:-60}),this.git5=this.git5||m(this.primaryColor,{h:-90}),this.git6=this.git6||m(this.primaryColor,{h:60}),this.git7=this.git7||m(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||w(this.git0),this.gitInv1=this.gitInv1||w(this.git1),this.gitInv2=this.gitInv2||w(this.git2),this.gitInv3=this.gitInv3||w(this.git3),this.gitInv4=this.gitInv4||w(this.git4),this.gitInv5=this.gitInv5||w(this.git5),this.gitInv6=this.gitInv6||w(this.git6),this.gitInv7=this.gitInv7||w(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ga,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},Zb=t=>{let e=new Kb;return e.calculate(t),e},Qb=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=D(this.primaryColor,16),this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=w(this.background),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=D(w("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=je(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=z(this.sectionBkgColor,10),this.taskBorderColor=je(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=je(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=D(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=D(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=D(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||w(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?D(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=D(this.secondaryColor,20),this.git1=D(this.pie2||this.secondaryColor,20),this.git2=D(this.pie3||this.tertiaryColor,20),this.git3=D(this.pie4||m(this.primaryColor,{h:-30}),20),this.git4=D(this.pie5||m(this.primaryColor,{h:-60}),20),this.git5=D(this.pie6||m(this.primaryColor,{h:-90}),10),this.git6=D(this.pie7||m(this.primaryColor,{h:60}),10),this.git7=D(this.pie8||m(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||w(this.git0),this.gitInv1=this.gitInv1||w(this.git1),this.gitInv2=this.gitInv2||w(this.git2),this.gitInv3=this.gitInv3||w(this.git3),this.gitInv4=this.gitInv4||w(this.git4),this.gitInv5=this.gitInv5||w(this.git5),this.gitInv6=this.gitInv6||w(this.git6),this.gitInv7=this.gitInv7||w(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||w(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||w(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||D(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||D(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},Jb=t=>{let e=new Qb;return e.calculate(t),e},tT=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=m(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=je(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||m(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||w(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||w(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=D(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||m(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||m(this.primaryColor,{l:-10}),this.pie5=this.pie5||m(this.secondaryColor,{l:-30}),this.pie6=this.pie6||m(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||m(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||m(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||m(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||m(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||m(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||m(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?D(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||m(this.primaryColor,{h:-30}),this.git4=this.git4||m(this.primaryColor,{h:-60}),this.git5=this.git5||m(this.primaryColor,{h:-90}),this.git6=this.git6||m(this.primaryColor,{h:60}),this.git7=this.git7||m(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||z(w(this.git0),25),this.gitInv1=this.gitInv1||w(this.git1),this.gitInv2=this.gitInv2||w(this.git2),this.gitInv3=this.gitInv3||w(this.git3),this.gitInv4=this.gitInv4||w(this.git4),this.gitInv5=this.gitInv5||w(this.git5),this.gitInv6=this.gitInv6||w(this.git6),this.gitInv7=this.gitInv7||w(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||w(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||w(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ga,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},eT=t=>{let e=new tT;return e.calculate(t),e},rT=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=D("#cde498",10),this.primaryBorderColor=Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.primaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=z(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||m(this.primaryColor,{h:30}),this.cScale4=this.cScale4||m(this.primaryColor,{h:60}),this.cScale5=this.cScale5||m(this.primaryColor,{h:90}),this.cScale6=this.cScale6||m(this.primaryColor,{h:120}),this.cScale7=this.cScale7||m(this.primaryColor,{h:150}),this.cScale8=this.cScale8||m(this.primaryColor,{h:210}),this.cScale9=this.cScale9||m(this.primaryColor,{h:270}),this.cScale10=this.cScale10||m(this.primaryColor,{h:300}),this.cScale11=this.cScale11||m(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=z(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||m(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||m(this.primaryColor,{l:-30}),this.pie5=this.pie5||m(this.secondaryColor,{l:-30}),this.pie6=this.pie6||m(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||m(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||m(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||m(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||m(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||m(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||m(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?D(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||m(this.primaryColor,{h:-30}),this.git4=this.git4||m(this.primaryColor,{h:-60}),this.git5=this.git5||m(this.primaryColor,{h:-90}),this.git6=this.git6||m(this.primaryColor,{h:60}),this.git7=this.git7||m(this.primaryColor,{h:120}),this.darkMode?(this.git0=D(this.git0,25),this.git1=D(this.git1,25),this.git2=D(this.git2,25),this.git3=D(this.git3,25),this.git4=D(this.git4,25),this.git5=D(this.git5,25),this.git6=D(this.git6,25),this.git7=D(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||w(this.git0),this.gitInv1=this.gitInv1||w(this.git1),this.gitInv2=this.gitInv2||w(this.git2),this.gitInv3=this.gitInv3||w(this.git3),this.gitInv4=this.gitInv4||w(this.git4),this.gitInv5=this.gitInv5||w(this.git5),this.gitInv6=this.gitInv6||w(this.git6),this.gitInv7=this.gitInv7||w(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||w(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||w(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ga,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},iT=t=>{let e=new rT;return e.calculate(t),e},Al=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=D(this.contrast,55),this.background="#ffffff",this.tertiaryColor=m(this.primaryColor,{h:-160}),this.primaryBorderColor=Dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=D(this.contrast,55),this.border2=this.contrast,this.actorBorder=D(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||w(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||D(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||m(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||m(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=D(this.contrast,30),this.sectionBkgColor2=D(this.contrast,30),this.taskBorderColor=z(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=D(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=m(this.primaryColor,{h:64}),this.fillType3=m(this.secondaryColor,{h:64}),this.fillType4=m(this.primaryColor,{h:-64}),this.fillType5=m(this.secondaryColor,{h:-64}),this.fillType6=m(this.primaryColor,{h:128}),this.fillType7=m(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||m(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||m(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||m(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||m(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||m(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||m(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Br(this.quadrant1Fill)?D(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||m(this.primaryColor,{h:-30}),this.git4=this.pie5||m(this.primaryColor,{h:-60}),this.git5=this.pie6||m(this.primaryColor,{h:-90}),this.git6=this.pie7||m(this.primaryColor,{h:60}),this.git7=this.pie8||m(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||w(this.git0),this.gitInv1=this.gitInv1||w(this.git1),this.gitInv2=this.gitInv2||w(this.git2),this.gitInv3=this.gitInv3||w(this.git3),this.gitInv4=this.gitInv4||w(this.git4),this.gitInv5=this.gitInv5||w(this.git5),this.gitInv6=this.gitInv6||w(this.git6),this.gitInv7=this.gitInv7||w(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ga,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xa}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},nT=t=>{let e=new Al;return e.calculate(t),e},Me={base:{getThemeVariables:Zb},dark:{getThemeVariables:Jb},default:{getThemeVariables:eT},forest:{getThemeVariables:iT},neutral:{getThemeVariables:nT}},Ke={theme:"default",themeVariables:Me.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,displayMode:"",axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0,textPosition:.75},quadrantChart:{chartWidth:500,chartHeight:500,titlePadding:10,titleFontSize:20,quadrantPadding:5,quadrantTextTopPadding:5,quadrantLabelFontSize:16,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2,xAxisLabelPadding:5,xAxisLabelFontSize:16,xAxisPosition:"top",yAxisLabelPadding:5,yAxisLabelFontSize:16,yAxisPosition:"left",pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Ke.class&&(Ke.class.arrowMarkerAbsolute=Ke.arrowMarkerAbsolute);Ke.gitGraph&&(Ke.gitGraph.arrowMarkerAbsolute=Ke.arrowMarkerAbsolute);var Vd=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...Vd(t[i],"")]:[...r,e+i],[]),oT=Vd(Ke,""),aT=Ke;function Gd(t){return typeof t=="undefined"||t===null}function sT(t){return typeof t=="object"&&t!==null}function lT(t){return Array.isArray(t)?t:Gd(t)?[]:[t]}function cT(t,e){var r,i,n,o;if(e)for(o=Object.keys(e),r=0,i=o.length;r<i;r+=1)n=o[r],t[n]=e[n];return t}function uT(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function hT(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var fT=Gd,pT=sT,dT=lT,mT=uT,gT=hT,xT=cT,It={isNothing:fT,isObject:pT,toArray:dT,repeat:mT,isNegativeZero:gT,extend:xT};function Xd(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
|
|
`+t.mark.snippet),i+" "+r):i}function mn(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Xd(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}mn.prototype=Object.create(Error.prototype);mn.prototype.constructor=mn;mn.prototype.toString=function(e){return this.name+": "+Xd(this,e)};var Be=mn;function kl(t,e,r,i,n){var o="",a="",s=Math.floor(n/2)-1;return i-e>s&&(o=" ... ",e=i-s+o.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:o+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:i-e+o.length}}function wl(t,e){return It.repeat(" ",e-t.length)+t}function yT(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],o,a=-1;o=r.exec(t.buffer);)n.push(o.index),i.push(o.index+o[0].length),t.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s="",l,c,u=Math.min(t.line+e.linesAfter,n.length).toString().length,h=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)c=kl(t.buffer,i[a-l],n[a-l],t.position-(i[a]-i[a-l]),h),s=It.repeat(" ",e.indent)+wl((t.line-l+1).toString(),u)+" | "+c.str+`
|
|
`+s;for(c=kl(t.buffer,i[a],n[a],t.position,h),s+=It.repeat(" ",e.indent)+wl((t.line+1).toString(),u)+" | "+c.str+`
|
|
`,s+=It.repeat("-",e.indent+u+3+c.pos)+`^
|
|
`,l=1;l<=e.linesAfter&&!(a+l>=n.length);l++)c=kl(t.buffer,i[a+l],n[a+l],t.position-(i[a]-i[a+l]),h),s+=It.repeat(" ",e.indent)+wl((t.line+l+1).toString(),u)+" | "+c.str+`
|
|
`;return s.replace(/\n$/,"")}var _T=yT,CT=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bT=["scalar","sequence","mapping"];function TT(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function vT(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(CT.indexOf(r)===-1)throw new Be('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=TT(e.styleAliases||null),bT.indexOf(this.kind)===-1)throw new Be('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var At=vT;function Fd(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(n=a)}),r[n]=i}),r}function ST(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Ll(t){return this.extend(t)}Ll.prototype.extend=function(e){var r=[],i=[];if(e instanceof At)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new Be("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof At))throw new Be("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Be("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Be("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof At))throw new Be("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ll.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Fd(n,"implicit"),n.compiledExplicit=Fd(n,"explicit"),n.compiledTypeMap=ST(n.compiledImplicit,n.compiledExplicit),n};var kT=Ll,wT=new At("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),BT=new At("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),MT=new At("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Kd=new kT({explicit:[wT,BT,MT]});function FT(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function AT(){return null}function LT(t){return t===null}var ET=new At("tag:yaml.org,2002:null",{kind:"scalar",resolve:FT,construct:AT,predicate:LT,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function OT(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function IT(t){return t==="true"||t==="True"||t==="TRUE"}function DT(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var NT=new At("tag:yaml.org,2002:bool",{kind:"scalar",resolve:OT,construct:IT,predicate:DT,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function $T(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function RT(t){return 48<=t&&t<=55}function zT(t){return 48<=t&&t<=57}function PT(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!$T(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!RT(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!zT(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function qT(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function WT(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!It.isNegativeZero(t)}var UT=new At("tag:yaml.org,2002:int",{kind:"scalar",resolve:PT,construct:qT,predicate:WT,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),HT=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function YT(t){return!(t===null||!HT.test(t)||t[t.length-1]==="_")}function jT(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var VT=/^[-+]?[0-9]+e/;function GT(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(It.isNegativeZero(t))return"-0.0";return r=t.toString(10),VT.test(r)?r.replace("e",".e"):r}function XT(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||It.isNegativeZero(t))}var KT=new At("tag:yaml.org,2002:float",{kind:"scalar",resolve:YT,construct:jT,predicate:XT,represent:GT,defaultStyle:"lowercase"}),ZT=Kd.extend({implicit:[ET,NT,UT,KT]}),QT=ZT,Zd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Qd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function JT(t){return t===null?!1:Zd.exec(t)!==null||Qd.exec(t)!==null}function tv(t){var e,r,i,n,o,a,s,l=0,c=null,u,h,f;if(e=Zd.exec(t),e===null&&(e=Qd.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],h=+(e[11]||0),c=(u*60+h)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,o,a,s,l)),c&&f.setTime(f.getTime()-c),f}function ev(t){return t.toISOString()}var rv=new At("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:JT,construct:tv,instanceOf:Date,represent:ev});function iv(t){return t==="<<"||t===null}var nv=new At("tag:yaml.org,2002:merge",{kind:"scalar",resolve:iv}),Nl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
\r`;function ov(t){if(t===null)return!1;var e,r,i=0,n=t.length,o=Nl;for(r=0;r<n;r++)if(e=o.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function av(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,o=Nl,a=0,s=[];for(e=0;e<n;e++)e%4===0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|o.indexOf(i.charAt(e));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function sv(t){var e="",r=0,i,n,o=t.length,a=Nl;for(i=0;i<o;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return n=o%3,n===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):n===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):n===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function lv(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var cv=new At("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ov,construct:av,predicate:lv,represent:sv}),uv=Object.prototype.hasOwnProperty,hv=Object.prototype.toString;function fv(t){if(t===null)return!0;var e=[],r,i,n,o,a,s=t;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],a=!1,hv.call(n)!=="[object Object]")return!1;for(o in n)if(uv.call(n,o))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function pv(t){return t!==null?t:[]}var dv=new At("tag:yaml.org,2002:omap",{kind:"sequence",resolve:fv,construct:pv}),mv=Object.prototype.toString;function gv(t){if(t===null)return!0;var e,r,i,n,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],mv.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[e]=[n[0],i[n[0]]]}return!0}function xv(t){if(t===null)return[];var e,r,i,n,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],n=Object.keys(i),o[e]=[n[0],i[n[0]]];return o}var yv=new At("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:gv,construct:xv}),_v=Object.prototype.hasOwnProperty;function Cv(t){if(t===null)return!0;var e,r=t;for(e in r)if(_v.call(r,e)&&r[e]!==null)return!1;return!0}function bv(t){return t!==null?t:{}}var Tv=new At("tag:yaml.org,2002:set",{kind:"mapping",resolve:Cv,construct:bv}),vv=QT.extend({implicit:[rv,nv],explicit:[cv,dv,yv,Tv]}),Qe=Object.prototype.hasOwnProperty,na=1,Jd=2,tm=3,oa=4,Bl=1,Sv=2,Ad=3,kv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,wv=/[\x85\u2028\u2029]/,Bv=/[,\[\]\{\}]/,em=/^(?:!|!!|![a-z\-]+!)$/i,rm=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ld(t){return Object.prototype.toString.call(t)}function he(t){return t===10||t===13}function Or(t){return t===9||t===32}function $t(t){return t===9||t===32||t===10||t===13}function yi(t){return t===44||t===91||t===93||t===123||t===125}function Mv(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Fv(t){return t===120?2:t===117?4:t===85?8:0}function Av(t){return 48<=t&&t<=57?t-48:-1}function Ed(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function Lv(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var im=new Array(256),nm=new Array(256);for(Lr=0;Lr<256;Lr++)im[Lr]=Ed(Lr)?1:0,nm[Lr]=Ed(Lr);var Lr;function Ev(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vv,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function om(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=_T(r),new Be(e,r)}function R(t,e){throw om(t,e)}function aa(t,e){t.onWarning&&t.onWarning.call(null,om(t,e))}var Od={YAML:function(e,r,i){var n,o,a;e.version!==null&&R(e,"duplication of %YAML directive"),i.length!==1&&R(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&R(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),a=parseInt(n[2],10),o!==1&&R(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&aa(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,o;i.length!==2&&R(e,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],em.test(n)||R(e,"ill-formed tag handle (first argument) of the TAG directive"),Qe.call(e.tagMap,n)&&R(e,'there is a previously declared suffix for "'+n+'" tag handle'),rm.test(o)||R(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(a){R(e,"tag prefix is malformed: "+o)}e.tagMap[n]=o}};function Ze(t,e,r,i){var n,o,a,s;if(e<r){if(s=t.input.slice(e,r),i)for(n=0,o=s.length;n<o;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||R(t,"expected valid JSON character");else kv.test(s)&&R(t,"the stream contains non-printable characters");t.result+=s}}function Id(t,e,r,i){var n,o,a,s;for(It.isObject(r)||R(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)o=n[a],Qe.call(e,o)||(e[o]=r[o],i[o]=!0)}function _i(t,e,r,i,n,o,a,s,l){var c,u;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,u=n.length;c<u;c+=1)Array.isArray(n[c])&&R(t,"nested arrays are not supported inside keys"),typeof n=="object"&&Ld(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Ld(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,u=o.length;c<u;c+=1)Id(t,e,o[c],r);else Id(t,e,o,r);else!t.json&&!Qe.call(r,n)&&Qe.call(e,n)&&(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,R(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[n]=o,delete r[n];return e}function $l(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):R(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function ct(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Or(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(he(n))for($l(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&aa(t,"deficient indentation"),i}function ya(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||$t(r)))}function Rl(t,e){e===1?t.result+=" ":e>1&&(t.result+=It.repeat(`
|
|
`,e-1))}function Ov(t,e,r){var i,n,o,a,s,l,c,u,h=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),$t(p)||yi(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=t.input.charCodeAt(t.position+1),$t(n)||r&&yi(n)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;p!==0;){if(p===58){if(n=t.input.charCodeAt(t.position+1),$t(n)||r&&yi(n))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),$t(i))break}else{if(t.position===t.lineStart&&ya(t)||r&&yi(p))break;if(he(p))if(l=t.line,c=t.lineStart,u=t.lineIndent,ct(t,!1,-1),t.lineIndent>=e){s=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=c,t.lineIndent=u;break}}s&&(Ze(t,o,a,!1),Rl(t,t.line-l),o=a=t.position,s=!1),Or(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return Ze(t,o,a,!1),t.result?!0:(t.kind=h,t.result=f,!1)}function Iv(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Ze(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else he(r)?(Ze(t,i,n,!0),Rl(t,ct(t,!1,e)),i=n=t.position):t.position===t.lineStart&&ya(t)?R(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);R(t,"unexpected end of the stream within a single quoted scalar")}function Dv(t,e){var r,i,n,o,a,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return Ze(t,r,t.position,!0),t.position++,!0;if(s===92){if(Ze(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),he(s))ct(t,!1,e);else if(s<256&&im[s])t.result+=nm[s],t.position++;else if((a=Fv(s))>0){for(n=a,o=0;n>0;n--)s=t.input.charCodeAt(++t.position),(a=Mv(s))>=0?o=(o<<4)+a:R(t,"expected hexadecimal character");t.result+=Lv(o),t.position++}else R(t,"unknown escape sequence");r=i=t.position}else he(s)?(Ze(t,r,i,!0),Rl(t,ct(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ya(t)?R(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}R(t,"unexpected end of the stream within a double quoted scalar")}function Nv(t,e){var r=!0,i,n,o,a=t.tag,s,l=t.anchor,c,u,h,f,p,g=Object.create(null),y,T,S,x;if(x=t.input.charCodeAt(t.position),x===91)u=93,p=!1,s=[];else if(x===123)u=125,p=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),x=t.input.charCodeAt(++t.position);x!==0;){if(ct(t,!0,e),x=t.input.charCodeAt(t.position),x===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=s,!0;r?x===44&&R(t,"expected the node content, but found ','"):R(t,"missed comma between flow collection entries"),T=y=S=null,h=f=!1,x===63&&(c=t.input.charCodeAt(t.position+1),$t(c)&&(h=f=!0,t.position++,ct(t,!0,e))),i=t.line,n=t.lineStart,o=t.position,Ci(t,e,na,!1,!0),T=t.tag,y=t.result,ct(t,!0,e),x=t.input.charCodeAt(t.position),(f||t.line===i)&&x===58&&(h=!0,x=t.input.charCodeAt(++t.position),ct(t,!0,e),Ci(t,e,na,!1,!0),S=t.result),p?_i(t,s,g,T,y,S,i,n,o):h?s.push(_i(t,null,g,T,y,S,i,n,o)):s.push(y),ct(t,!0,e),x=t.input.charCodeAt(t.position),x===44?(r=!0,x=t.input.charCodeAt(++t.position)):r=!1}R(t,"unexpected end of the stream within a flow collection")}function $v(t,e){var r,i,n=Bl,o=!1,a=!1,s=e,l=0,c=!1,u,h;if(h=t.input.charCodeAt(t.position),h===124)i=!1;else if(h===62)i=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)Bl===n?n=h===43?Ad:Sv:R(t,"repeat of a chomping mode identifier");else if((u=Av(h))>=0)u===0?R(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?R(t,"repeat of an indentation width identifier"):(s=e+u-1,a=!0);else break;if(Or(h)){do h=t.input.charCodeAt(++t.position);while(Or(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!he(h)&&h!==0)}for(;h!==0;){for($l(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!a||t.lineIndent<s)&&h===32;)t.lineIndent++,h=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>s&&(s=t.lineIndent),he(h)){l++;continue}if(t.lineIndent<s){n===Ad?t.result+=It.repeat(`
|
|
`,o?1+l:l):n===Bl&&o&&(t.result+=`
|
|
`);break}for(i?Or(h)?(c=!0,t.result+=It.repeat(`
|
|
`,o?1+l:l)):c?(c=!1,t.result+=It.repeat(`
|
|
`,l+1)):l===0?o&&(t.result+=" "):t.result+=It.repeat(`
|
|
`,l):t.result+=It.repeat(`
|
|
`,o?1+l:l),o=!0,a=!0,l=0,r=t.position;!he(h)&&h!==0;)h=t.input.charCodeAt(++t.position);Ze(t,r,t.position,!1)}return!0}function Dd(t,e){var r,i=t.tag,n=t.anchor,o=[],a,s=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,R(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!$t(a))));){if(s=!0,t.position++,ct(t,!0,-1)&&t.lineIndent<=e){o.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Ci(t,e,tm,!1,!0),o.push(t.result),ct(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)R(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return s?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=o,!0):!1}function Rv(t,e,r){var i,n,o,a,s,l,c=t.tag,u=t.anchor,h={},f=Object.create(null),p=null,g=null,y=null,T=!1,S=!1,x;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),x=t.input.charCodeAt(t.position);x!==0;){if(!T&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,R(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),o=t.line,(x===63||x===58)&&$t(i))x===63?(T&&(_i(t,h,f,p,g,null,a,s,l),p=g=y=null),S=!0,T=!0,n=!0):T?(T=!1,n=!0):R(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,x=i;else{if(a=t.line,s=t.lineStart,l=t.position,!Ci(t,r,Jd,!1,!0))break;if(t.line===o){for(x=t.input.charCodeAt(t.position);Or(x);)x=t.input.charCodeAt(++t.position);if(x===58)x=t.input.charCodeAt(++t.position),$t(x)||R(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(_i(t,h,f,p,g,null,a,s,l),p=g=y=null),S=!0,T=!1,n=!1,p=t.tag,g=t.result;else if(S)R(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=u,!0}else if(S)R(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(T&&(a=t.line,s=t.lineStart,l=t.position),Ci(t,e,oa,!0,n)&&(T?g=t.result:y=t.result),T||(_i(t,h,f,p,g,y,a,s,l),p=g=y=null),ct(t,!0,-1),x=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&x!==0)R(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return T&&_i(t,h,f,p,g,null,a,s,l),S&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=h),S}function zv(t){var e,r=!1,i=!1,n,o,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&R(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(o=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):R(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!$t(a);)a===33&&(i?R(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),em.test(n)||R(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),Bv.test(o)&&R(t,"tag suffix cannot contain flow indicator characters")}o&&!rm.test(o)&&R(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch(s){R(t,"tag name is malformed: "+o)}return r?t.tag=o:Qe.call(t.tagMap,n)?t.tag=t.tagMap[n]+o:n==="!"?t.tag="!"+o:n==="!!"?t.tag="tag:yaml.org,2002:"+o:R(t,'undeclared tag handle "'+n+'"'),!0}function Pv(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&R(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!$t(r)&&!yi(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&R(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function qv(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!$t(i)&&!yi(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&R(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Qe.call(t.anchorMap,r)||R(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],ct(t,!0,-1),!0}function Ci(t,e,r,i,n){var o,a,s,l=1,c=!1,u=!1,h,f,p,g,y,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=s=oa===r||tm===r,i&&ct(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;zv(t)||Pv(t);)ct(t,!0,-1)?(c=!0,s=o,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):s=!1;if(s&&(s=c||n),(l===1||oa===r)&&(na===r||Jd===r?y=e:y=e+1,T=t.position-t.lineStart,l===1?s&&(Dd(t,T)||Rv(t,T,y))||Nv(t,y)?u=!0:(a&&$v(t,y)||Iv(t,y)||Dv(t,y)?u=!0:qv(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&R(t,"alias node should not have any properties")):Ov(t,y,na===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=s&&Dd(t,T))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&R(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),h=0,f=t.implicitTypes.length;h<f;h+=1)if(g=t.implicitTypes[h],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Qe.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,p=t.typeMap.multi[t.kind||"fallback"],h=0,f=p.length;h<f;h+=1)if(t.tag.slice(0,p[h].tag.length)===p[h].tag){g=p[h];break}g||R(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&R(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):R(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function Wv(t){var e=t.position,r,i,n,o=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(ct(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(o=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!$t(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&R(t,"directive name must not be less than one character in length");a!==0;){for(;Or(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!he(a));break}if(he(a))break;for(r=t.position;a!==0&&!$t(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&$l(t),Qe.call(Od,i)?Od[i](t,i,n):aa(t,'unknown document directive "'+i+'"')}if(ct(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,ct(t,!0,-1)):o&&R(t,"directives end mark is expected"),Ci(t,t.lineIndent-1,oa,!1,!0),ct(t,!0,-1),t.checkLineBreaks&&wv.test(t.input.slice(e,t.position))&&aa(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ya(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ct(t,!0,-1));return}if(t.position<t.length-1)R(t,"end of the stream or a document separator is expected");else return}function am(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Ev(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,R(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Wv(r);return r.documents}function Uv(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var i=am(t,r);if(typeof e!="function")return i;for(var n=0,o=i.length;n<o;n+=1)e(i[n])}function Hv(t,e){var r=am(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Be("expected a single document in the stream, but found more")}}var Yv=Uv,jv=Hv,Vv={loadAll:Yv,load:jv},Gv=Kd,Xv=Vv.load,sm=new RegExp("^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+","s");function Kv(t,e){var r,i;let n=t.match(sm);if(n){let o=Xv(n[1],{schema:Gv});return o!=null&&o.title&&((r=e.setDiagramTitle)==null||r.call(e,o.title)),o!=null&&o.displayMode&&((i=e.setDisplayMode)==null||i.call(e,o.displayMode)),t.slice(n[0].length)}else return t}var El=function(t,e,r){let{depth:i,clobber:n}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(o=>El(t,o,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(o=>{t.includes(o)||t.push(o)}),t):t===void 0||i<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(o=>{typeof e[o]=="object"&&(t[o]===void 0||typeof t[o]=="object")?(t[o]===void 0&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=El(t[o],e[o],{depth:i-1,clobber:n})):(n||typeof t[o]!="object"&&typeof e[o]!="object")&&(t[o]=e[o])}),t)},Ft=El,gn=Object.freeze(aT),Nt=Ft({},gn),lm,bi=[],fn=Ft({},gn),_a=(t,e)=>{let r=Ft({},t),i={};for(let n of e)um(n),i=Ft(i,n);if(r=Ft(r,i),i.theme&&i.theme in Me){let n=Ft({},lm),o=Ft(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Me&&(r.themeVariables=Me[r.theme].getThemeVariables(o))}return fn=r,pm(fn),fn},Zv=t=>(Nt=Ft({},gn),Nt=Ft(Nt,t),t.theme&&Me[t.theme]&&(Nt.themeVariables=Me[t.theme].getThemeVariables(t.themeVariables)),_a(Nt,bi),Nt),Qv=t=>{lm=Ft({},t)},Jv=t=>(Nt=Ft(Nt,t),_a(Nt,bi),Nt),cm=()=>Ft({},Nt),tS=t=>(pm(t),Ft(fn,t),Fe()),Fe=()=>Ft({},fn),um=t=>{var e;["secure",...(e=Nt.secure)!=null?e:[]].forEach(r=>{t[r]!==void 0&&(A.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&um(t[r])})},hm=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),bi.push(t),_a(Nt,bi)},sa=(t=Nt)=>{bi=[],_a(t,bi)},fm=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(fm||{}),Nd={},eS=t=>{Nd[t]||(A.warn(fm[t]),Nd[t]=!0)},pm=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&eS("LAZY_LOAD_DEPRECATED")},rS=function(t,e){for(let r of e)t.attr(r[0],r[1])},iS=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},nS=function(t,e,r,i){let n=iS(e,r,i);rS(t,n)},oS=function(t,e,r,i){let n=e.node().getBBox(),o=n.width,a=n.height;A.info(`SVG bounds: ${o}x${a}`,n);let s=0,l=0;A.info(`Graph bounds: ${s}x${l}`,t),s=o+r*2,l=a+r*2,A.info(`Calculated bounds: ${s}x${l}`),nS(e,l,s,i);let c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},ea={},aS=(t,e,r)=>{let i="";return t in ea&&ea[t]?i=ea[t](r):A.warn(`No theme found for ${t}`),` & {
|
|
font-family: ${r.fontFamily};
|
|
font-size: ${r.fontSize};
|
|
fill: ${r.textColor}
|
|
}
|
|
|
|
/* Classes common for multiple diagrams */
|
|
|
|
& .error-icon {
|
|
fill: ${r.errorBkgColor};
|
|
}
|
|
& .error-text {
|
|
fill: ${r.errorTextColor};
|
|
stroke: ${r.errorTextColor};
|
|
}
|
|
|
|
& .edge-thickness-normal {
|
|
stroke-width: 2px;
|
|
}
|
|
& .edge-thickness-thick {
|
|
stroke-width: 3.5px
|
|
}
|
|
& .edge-pattern-solid {
|
|
stroke-dasharray: 0;
|
|
}
|
|
|
|
& .edge-pattern-dashed{
|
|
stroke-dasharray: 3;
|
|
}
|
|
.edge-pattern-dotted {
|
|
stroke-dasharray: 2;
|
|
}
|
|
|
|
& .marker {
|
|
fill: ${r.lineColor};
|
|
stroke: ${r.lineColor};
|
|
}
|
|
& .marker.cross {
|
|
stroke: ${r.lineColor};
|
|
}
|
|
|
|
& svg {
|
|
font-family: ${r.fontFamily};
|
|
font-size: ${r.fontSize};
|
|
}
|
|
|
|
${i}
|
|
|
|
${e}
|
|
`},sS=(t,e)=>{ea[t]=e},lS=aS,zl="",Ca="",Pl="",ql=t=>dn(t,Fe()),dm=function(){zl="",Pl="",Ca=""},mm=function(t){zl=ql(t).replace(/^\s+/g,"")},gm=function(){return zl||Ca},xm=function(t){Pl=ql(t).replace(/\n\s+/g,`
|
|
`)},ym=function(){return Pl},_m=function(t){Ca=ql(t)},Cm=function(){return Ca},cS={getAccTitle:gm,setAccTitle:mm,getDiagramTitle:Cm,setDiagramTitle:_m,getAccDescription:ym,setAccDescription:xm,clear:dm},uS=Object.freeze(Object.defineProperty({__proto__:null,clear:dm,default:cS,getAccDescription:ym,getAccTitle:gm,getDiagramTitle:Cm,setAccDescription:xm,setAccTitle:mm,setDiagramTitle:_m},Symbol.toStringTag,{value:"Module"})),Er={},bm=function(t,e,r,i){A.debug("parseDirective is being called",e,r,i);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Er={};break;case"type_directive":if(!Er)throw new Error("currentDirective is undefined");Er.type=e.toLowerCase();break;case"arg_directive":if(!Er)throw new Error("currentDirective is undefined");Er.args=JSON.parse(e);break;case"close_directive":hS(t,Er,i),Er=void 0;break}}catch(n){A.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),A.error(n.message)}},hS=function(t,e,r){switch(A.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(i=>{e.args[i]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[i],delete e.args[i])}),A.info("sanitize in handleDirective",e.args),vi(e.args),A.info("sanitize in handleDirective (done)",e.args),hm(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":A.warn("themeCss encountered");break;default:A.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},fS=A,pS=Il,Tm=Fe,dS=t=>dn(t,Tm()),mS=oS,gS=()=>uS,xS=(t,e,r,i)=>bm(t,e,r,i),la={},ca=(t,e,r)=>{if(la[t])throw new Error(`Diagram ${t} already registered.`);la[t]=e,r&&Sm(t,r),sS(t,e.styles),e.injectUtils&&e.injectUtils(fS,pS,Tm,dS,mS,gS(),xS)},Wl=t=>{if(t in la)return la[t];throw new Error(`Diagram ${t} not found.`)},ua=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},yS=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_S=/\s*%%.*\n/gm,Ti={},ba=function(t,e){t=t.replace(sm,"").replace(yS,"").replace(_S,`
|
|
`);for(let[r,{detector:i}]of Object.entries(Ti))if(i(t,e))return r;throw new ua(`No diagram type detected matching given configuration for text: ${t}`)},vm=(...t)=>{for(let{id:e,detector:r,loader:i}of t)Sm(e,r,i)},CS=async()=>{A.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Ti).map(async([r,{detector:i,loader:n}])=>{if(n)try{Wl(r)}catch(o){try{let{diagram:a,id:s}=await n();ca(s,a,i)}catch(a){throw A.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ti[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){A.error(`Failed to load ${e.length} external diagrams`);for(let r of e)A.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},Sm=(t,e,r)=>{Ti[t]?A.error(`Detector with key ${t} already exists`):Ti[t]={detector:e,loader:r},A.debug(`Detector with key ${t} added${r?" with loader":""}`)},bS=t=>Ti[t].loader,TS={curveBasis:Ps,curveBasisClosed:Us,curveBasisOpen:Hs,curveBumpX:qs,curveBumpY:Ws,curveBundle:Ys,curveCardinalClosed:Vs,curveCardinalOpen:Gs,curveCardinal:js,curveCatmullRomClosed:Ks,curveCatmullRomOpen:Zs,curveCatmullRom:Xs,curveLinear:Vi,curveLinearClosed:Qs,curveMonotoneX:tl,curveMonotoneY:el,curveNatural:rl,curveStep:il,curveStepAfter:ol,curveStepBefore:nl},Ml=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vS=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,SS=function(t,e){let r=km(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let n=r.map(o=>o.args);vi(n),i=Ft(i,[...n])}else i=r.args;if(i){let n=ba(t,e);["config"].forEach(o=>{i[o]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[o],delete i[o])})}return i},km=function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${vS.source})(?=[}][%]{2}).*
|
|
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i,n=[];for(;(i=Ml.exec(t))!==null;)if(i.index===Ml.lastIndex&&Ml.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){let o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:o,args:a})}return n.length===0&&n.push({type:t,args:null}),n.length===1?n[0]:n}catch(r){return A.error(`ERROR: ${r.message} - Unable to parse directive
|
|
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},kS=function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return-1};function wS(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return TS[r]||e}function BS(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,Ud.sanitizeUrl)(r):r}var MS=(t,...e)=>{let r=t.split("."),i=r.length-1,n=r[i],o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o)return;o[n](...e)};function ha(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function FS(t){let e,r=0;t.forEach(o=>{r+=ha(o,e),e=o});let i=r/2,n;return e=void 0,t.forEach(o=>{if(e&&!n){let a=ha(o,e);if(a<i)i-=a;else{let s=i/a;s<=0&&(n=e),s>=1&&(n={x:o.x,y:o.y}),s>0&&s<1&&(n={x:(1-s)*e.x+s*o.x,y:(1-s)*e.y+s*o.y})}}e=o}),n}function AS(t){return t.length===1?t[0]:FS(t)}var LS=(t,e,r)=>{let i;A.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let o=25,a;i=void 0,e.forEach(u=>{if(i&&!a){let h=ha(u,i);if(h<o)o-=h;else{let f=o/h;f<=0&&(a=i),f>=1&&(a={x:u.x,y:u.y}),f>0&&f<1&&(a={x:(1-f)*i.x+f*u.x,y:(1-f)*i.y+f*u.y})}}i=u});let s=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),c={x:0,y:0};return c.x=Math.sin(l)*s+(e[0].x+a.x)/2,c.y=-Math.cos(l)*s+(e[0].y+a.y)/2,c};function ES(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;A.info("our points",i),e!=="start_left"&&e!=="start_right"&&(i=i.reverse()),i.forEach(h=>{n=h});let a=25+t,s;n=void 0,i.forEach(h=>{if(n&&!s){let f=ha(h,n);if(f<a)a-=f;else{let p=a/f;p<=0&&(s=n),p>=1&&(s={x:h.x,y:h.y}),p>0&&p<1&&(s={x:(1-p)*n.x+p*h.x,y:(1-p)*n.y+p*h.y})}}n=h});let l=10+t*.5,c=Math.atan2(i[0].y-s.y,i[0].x-s.x),u={x:0,y:0};return u.x=Math.sin(c)*l+(i[0].x+s.x)/2,u.y=-Math.cos(c)*l+(i[0].y+s.y)/2,e==="start_left"&&(u.x=Math.sin(c+Math.PI)*l+(i[0].x+s.x)/2,u.y=-Math.cos(c+Math.PI)*l+(i[0].y+s.y)/2),e==="end_right"&&(u.x=Math.sin(c-Math.PI)*l+(i[0].x+s.x)/2-5,u.y=-Math.cos(c-Math.PI)*l+(i[0].y+s.y)/2-5),e==="end_left"&&(u.x=Math.sin(c)*l+(i[0].x+s.x)/2-5,u.y=-Math.cos(c)*l+(i[0].y+s.y)/2-5),u}function OS(t){let e="",r="";for(let i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}var $d=0,IS=()=>($d++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$d);function DS(t){let e="",r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}var NS=t=>DS(t.length),$S=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},RS=function(t,e){let r=e.text.replace(Dl.lineBreakRegex," "),[,i]=Hl(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",i),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);let o=n.append("tspan");return o.attr("x",e.x+e.textMargin*2),o.attr("fill",e.fill),o.text(r),n},zS=Do((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Dl.lineBreakRegex.test(t)))return t;let i=t.split(" "),n=[],o="";return i.forEach((a,s)=>{let l=fa(`${a} `,r),c=fa(o,r);if(l>e){let{hyphenatedStrings:f,remainingWord:p}=PS(a,e,"-",r);n.push(o,...f),o=p}else c+l>=e?(n.push(o),o=a):o=[o,a].filter(Boolean).join(" ");s+1===i.length&&n.push(o)}),n.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),PS=Do((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let n=[...t],o=[],a="";return n.forEach((s,l)=>{let c=`${a}${s}`;if(fa(c,i)>=e){let h=l+1,f=n.length===h,p=`${c}${r}`;o.push(f?c:p),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function qS(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),Ul(t,e).height}function fa(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),Ul(t,e).width}var Ul=Do((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);let{fontSize:r,fontFamily:i,fontWeight:n}=e;if(!t)return{width:0,height:0};let[,o]=Hl(r),a=["sans-serif",i],s=t.split(Dl.lineBreakRegex),l=[],c=Ut("body");if(!c.remove)return{width:0,height:0,lineHeight:0};let u=c.append("svg");for(let f of a){let p=0,g={width:0,height:0,lineHeight:0};for(let y of s){let T=$S();T.text=y;let S=RS(u,T).style("font-size",o).style("font-weight",n).style("font-family",f),x=(S._groups||S)[0][0].getBBox();if(x.width===0&&x.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,x.width)),p=Math.round(x.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}u.remove();let h=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),WS=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}},ta,US=function(t){return ta=ta||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ta.innerHTML=t,unescape(ta.textContent)},vi=t=>{if(A.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>vi(e)):Object.keys(t).forEach(e=>{A.debug("Checking key",e),e.startsWith("__")&&(A.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(A.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(A.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(A.debug("sanitizing themeCss option"),t[e]=ra(t[e])),e.includes("fontFamily")&&(A.debug("sanitizing fontFamily option"),t[e]=ra(t[e])),e.includes("altFontFamily")&&(A.debug("sanitizing altFontFamily option"),t[e]=ra(t[e])),oT.includes(e)?typeof t[e]=="object"&&(A.debug("sanitize deleting object",e),vi(t[e])):(A.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){let e=Object.keys(t.themeVariables);for(let r of e){let i=t.themeVariables[r];i&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}A.debug("After sanitization",t)},ra=t=>{let e=0,r=0;for(let i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function wm(t){return"str"in t}function HS(t){return t instanceof Error?t.message:String(t)}var YS=(t,e,r,i)=>{if(!i)return;let n=t.node().getBBox();t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},Hl=t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},ia={assignWithDepth:Ft,wrapLabel:zS,calculateTextHeight:qS,calculateTextWidth:fa,calculateTextDimensions:Ul,detectInit:SS,detectDirective:km,isSubstringInArray:kS,interpolateToCurve:wS,calcLabelPosition:AS,calcCardinalityPosition:LS,calcTerminalLabelPosition:ES,formatUrl:BS,getStylesFromArray:OS,generateId:IS,random:NS,runFunc:MS,entityDecode:US,initIdGenerator:WS,directiveSanitizer:vi,sanitizeCss:ra,insertTitle:YS,parseFontSize:Hl},Rd="10.2.0",Bm="c4",jS=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null,VS=async()=>{let{diagram:t}=await import("./c4Diagram-4a1de0c4-QAVAVRDA.js");return{id:Bm,diagram:t}},GS={id:Bm,detector:jS,loader:VS},XS=GS,Mm="flowchart",KS=(t,e)=>{var r,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},ZS=async()=>{let{diagram:t}=await import("./flowDiagram-702318ad-D3DYEJJT.js");return{id:Mm,diagram:t}},QS={id:Mm,detector:KS,loader:ZS},JS=QS,Fm="flowchart-v2",tk=(t,e)=>{var r,i,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*flowchart/)!==null},ek=async()=>{let{diagram:t}=await import("./flowDiagram-v2-8716a26e-IMUMDGM2.js");return{id:Fm,diagram:t}},rk={id:Fm,detector:tk,loader:ek},ik=rk,Am="er",nk=t=>t.match(/^\s*erDiagram/)!==null,ok=async()=>{let{diagram:t}=await import("./erDiagram-5e907343-RHSEGWJS.js");return{id:Am,diagram:t}},ak={id:Am,detector:nk,loader:ok},sk=ak,Lm="gitGraph",lk=t=>t.match(/^\s*gitGraph/)!==null,ck=async()=>{let{diagram:t}=await import("./gitGraphDiagram-127727f3-ULZS75IL.js");return{id:Lm,diagram:t}},uk={id:Lm,detector:lk,loader:ck},hk=uk,Em="gantt",fk=t=>t.match(/^\s*gantt/)!==null,pk=async()=>{let{diagram:t}=await import("./ganttDiagram-3bc7fa50-Y254BGBM.js");return{id:Em,diagram:t}},dk={id:Em,detector:fk,loader:pk},mk=dk,Om="info",gk=t=>t.match(/^\s*info/)!==null,xk=async()=>{let{diagram:t}=await import("./infoDiagram-4374b389-FBR7JDHV.js");return{id:Om,diagram:t}},yk={id:Om,detector:gk,loader:xk},_k=yk,Im="pie",Ck=t=>t.match(/^\s*pie/)!==null,bk=async()=>{let{diagram:t}=await import("./pieDiagram-f5e05a25-R4RCCSYE.js");return{id:Im,diagram:t}},Tk={id:Im,detector:Ck,loader:bk},vk=Tk,Dm="quadrantChart",Sk=t=>t.match(/^\s*quadrantChart/)!==null,kk=async()=>{let{diagram:t}=await import("./quadrantDiagram-652558cb-4M3GKHH6.js");return{id:Dm,diagram:t}},wk={id:Dm,detector:Sk,loader:kk},Bk=wk,Nm="requirement",Mk=t=>t.match(/^\s*requirement(Diagram)?/)!==null,Fk=async()=>{let{diagram:t}=await import("./requirementDiagram-730b4d6e-DHDZADGM.js");return{id:Nm,diagram:t}},Ak={id:Nm,detector:Mk,loader:Fk},Lk=Ak,$m="sequence",Ek=t=>t.match(/^\s*sequenceDiagram/)!==null,Ok=async()=>{let{diagram:t}=await import("./sequenceDiagram-edd7e28f-PKF3RPXX.js");return{id:$m,diagram:t}},Ik={id:$m,detector:Ek,loader:Ok},Dk=Ik,Rm="class",Nk=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},$k=async()=>{let{diagram:t}=await import("./classDiagram-62cfb02d-IMYFNWI4.js");return{id:Rm,diagram:t}},Rk={id:Rm,detector:Nk,loader:$k},zk=Rk,zm="classDiagram",Pk=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},qk=async()=>{let{diagram:t}=await import("./classDiagram-v2-c1dfb0e0-RTHQXVLO.js");return{id:zm,diagram:t}},Wk={id:zm,detector:Pk,loader:qk},Uk=Wk,Pm="state",Hk=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},Yk=async()=>{let{diagram:t}=await import("./stateDiagram-d766d74d-VOT4IMPE.js");return{id:Pm,diagram:t}},jk={id:Pm,detector:Hk,loader:Yk},Vk=jk,qm="stateDiagram",Gk=(t,e)=>{var r,i;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||t.match(/^\s*stateDiagram/)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},Xk=async()=>{let{diagram:t}=await import("./stateDiagram-v2-978d1189-5DTBHK2L.js");return{id:qm,diagram:t}},Kk={id:qm,detector:Gk,loader:Xk},Zk=Kk,Wm="journey",Qk=t=>t.match(/^\s*journey/)!==null,Jk=async()=>{let{diagram:t}=await import("./journeyDiagram-ccf0174b-AA4HCMRO.js");return{id:Wm,diagram:t}},tw={id:Wm,detector:Qk,loader:Jk},ew=tw,rw=()=>"",iw=rw,nw=function(){},ow=(t,e,r)=>{try{A.debug(`Renering svg for syntax error
|
|
`);let i=Ut("#"+e),n=i.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){A.error("Error while rendering info diagram"),A.error(HS(i))}},Um={setConf:nw,draw:ow},aw={db:{clear:()=>{}},styles:iw,renderer:Um,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},sw=aw,Hm="flowchart-elk",lw=(t,e)=>{var r;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},cw=async()=>{let{diagram:t}=await import("./flowchart-elk-definition-206a7d68-YP2UND35.js");return{id:Hm,diagram:t}},uw={id:Hm,detector:lw,loader:cw},hw=uw,Ym="timeline",fw=t=>t.match(/^\s*timeline/)!==null,pw=async()=>{let{diagram:t}=await import("./timeline-definition-d53f6d76-CSAWQ3BQ.js");return{id:Ym,diagram:t}},dw={id:Ym,detector:fw,loader:pw},mw=dw,jm="mindmap",gw=t=>t.match(/^\s*mindmap/)!==null,xw=async()=>{let{diagram:t}=await import("./mindmap-definition-74e4e806-655WJD33.js");return{id:jm,diagram:t}},yw={id:jm,detector:gw,loader:xw},_w=yw,zd=!1,Yl=()=>{zd||(zd=!0,ca("error",sw,t=>t.toLowerCase().trim()==="error"),ca("---",{db:{clear:()=>{}},styles:{},renderer:{},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),vm(XS,Uk,zk,sk,mk,_k,vk,Lk,Dk,hw,ik,JS,_w,mw,hk,Zk,Vk,ew,Bk))},Cw=t=>t.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,""),pa=class{constructor(e){var r,i;this.text=e,this.type="graph",this.text+=`
|
|
`;let n=Fe();try{this.type=ba(e,n)}catch(s){this.type="error",this.detectError=s}let o=Wl(this.type);A.debug("Type "+this.type),this.db=o.db,(i=(r=this.db).clear)==null||i.call(r),this.renderer=o.renderer,this.parser=o.parser;let a=this.parser.parse.bind(this.parser);this.parser.parse=s=>a(Cw(Kv(s,this.db))),this.parser.parser.yy=this.db,o.init&&(o.init(n),A.info("Initialized diagram "+this.type,n)),this.parse()}parse(){var e,r;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},jl=async t=>{let e=ba(t,Fe());try{Wl(e)}catch(r){let i=bS(e);if(!i)throw new ua(`Diagram ${e} not found.`);let{id:n,diagram:o}=await i();ca(n,o)}return new pa(t)},Ol=[],W$=t=>{Ol.push(t)},bw=()=>{Ol.forEach(t=>{t()}),Ol=[]},Tw="graphics-document document";function vw(t,e){t.attr("role",Tw),cn(e)||t.attr("aria-roledescription",e)}function Sw(t,e,r,i){if(t.insert!==void 0)if(e||r){if(r){let n="chart-desc-"+i;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){let n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}var Vm=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],kw=5e4,ww="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Bw="sandbox",Mw="loose",Fw="http://www.w3.org/2000/svg",Aw="http://www.w3.org/1999/xlink",Lw="http://www.w3.org/1999/xhtml",Ew="100%",Ow="100%",Iw="border:0;margin:0;",Dw="margin:0",Nw="allow-top-navigation-by-user-activation allow-popups",$w='The "iframe" tag is not supported by your browser.',Rw=["foreignobject"],zw=["dominant-baseline"];async function Pw(t,e){Yl();try{(await jl(t)).parse()}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}var qw=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),e},Ww=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},Pd=(t,e,r=[])=>`
|
|
.${t} ${e} { ${r.join(" !important; ")} !important; }`,Uw=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
|
|
${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
|
|
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
|
|
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!cn(r)&&Vm.includes(e)){let l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(let c in r){let u=r[c];cn(u.styles)||l.forEach(h=>{n+=Pd(u.id,h,u.styles)}),cn(u.textStyles)||(n+=Pd(u.id,"tspan",u.textStyles))}}return n},Hw=(t,e,r,i)=>{let n=Uw(t,e,r),o=lS(e,n,t.themeVariables);return Jo(wd(`${i}{${o}}`),Bd)},Yw=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=Ww(i),i=i.replace(/<br>/g,"<br/>"),i},jw=(t="",e)=>{let r=e?e.viewBox.baseVal.height+"px":Ow,i=btoa('<body style="'+Dw+'">'+t+"</body>");return`<iframe style="width:${Ew};height:${r};${Iw}" src="data:text/html;base64,${i}" sandbox="${Nw}">
|
|
${$w}
|
|
</iframe>`},qd=(t,e,r,i,n)=>{let o=t.append("div");o.attr("id",r),i&&o.attr("style",i);let a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Fw);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function Wd(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}var Vw=(t,e,r,i)=>{var n,o,a;(n=t.getElementById(e))==null||n.remove(),(o=t.getElementById(r))==null||o.remove(),(a=t.getElementById(i))==null||a.remove()},Gw=async function(t,e,r){var ut;var i,n,o,a;Yl(),sa();let s=ia.detectInit(e);s&&(vi(s),hm(s));let l=Fe();A.debug(l),e.length>((ut=l==null?void 0:l.maxTextSize)!=null?ut:kw)&&(e=ww),e=e.replace(/\r\n?/g,`
|
|
`),e=e.replace(/<(\w+)([^>]*)>/g,(X,at,Rt)=>"<"+at+Rt.replace(/="([^"]*)"/g,"='$1'")+">");let c="#"+t,u="i"+t,h="#"+u,f="d"+t,p="#"+f,g=Ut("body"),y=l.securityLevel===Bw,T=l.securityLevel===Mw,S=l.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),y){let X=Wd(Ut(r),u);g=Ut(X.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Ut(r);qd(g,t,f,`font-family: ${S}`,Aw)}else{if(Vw(document,t,f,u),y){let X=Wd(Ut("body"),u);g=Ut(X.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=Ut("body");qd(g,t,f)}e=qw(e);let x,v;try{x=await jl(e)}catch(X){x=new pa("error"),v=X}let L=g.select(p).node(),B=x.type,k=L.firstChild,_=k.firstChild,G=Vm.includes(B)?x.renderer.getClasses(e,x):{},it=Hw(l,B,G,c),Q=document.createElement("style");Q.innerHTML=it,k.insertBefore(Q,_);try{await x.renderer.draw(e,t,Rd,x)}catch(X){throw Um.draw(e,t,Rd),X}let I=g.select(`${p} svg`),U=(n=(i=x.db).getAccTitle)==null?void 0:n.call(i),E=(a=(o=x.db).getAccDescription)==null?void 0:a.call(o);Kw(B,I,U,E),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Lw);let P=g.select(p).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",l.arrowMarkerAbsolute),P=Yw(P,y,jd(l.arrowMarkerAbsolute)),y){let X=g.select(p+" svg").node();P=jw(P,X)}else T||(P=pn.default.sanitize(P,{ADD_TAGS:Rw,ADD_ATTR:zw}));if(bw(),v)throw v;let dt=Ut(y?h:p).node();return dt&&"remove"in dt&&dt.remove(),{svg:P,bindFunctions:x.db.bindFunctions}};function Xw(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Qv(t),t!=null&&t.theme&&t.theme in Me?t.themeVariables=Me[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Me.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?Zv(t):cm();Il(r.logLevel),Yl()}function Kw(t,e,r,i){vw(e,t),Sw(e,r,i,e.attr("id"))}var Ir=Object.freeze({render:Gw,parse:Pw,parseDirective:bm,getDiagramFromText:jl,initialize:Xw,getConfig:Fe,setConfig:tS,getSiteConfig:cm,updateSiteConfig:Jv,reset:()=>{sa()},globalReset:()=>{sa(gn)},defaultConfig:gn});Il(Fe().logLevel);sa(Fe());var Zw=(t,e,r)=>{A.warn(t),wm(t)?(r&&r(t.str,t.hash),e.push(yc(xc({},t),{message:t.str,error:t}))):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Gm=async function(t={querySelector:".mermaid"}){try{await Qw(t)}catch(e){if(wm(e)&&A.error(e.str),fe.parseError&&fe.parseError(e),!t.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),e}},Qw=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i=Ir.getConfig();A.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(A.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ir.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));let o=new ia.initIdGenerator(i.deterministicIds,i.deterministicIDSeed),a,s=[];for(let l of Array.from(n)){A.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let c=`mermaid-${o.next()}`;a=l.innerHTML,a=bc(ia.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");let u=ia.detectInit(a);u&&A.debug("Detected early reinit: ",u);try{let{svg:h,bindFunctions:f}=await Qm(c,a,l);l.innerHTML=h,t&&await t(c),f&&f(l)}catch(h){Zw(h,s,fe.parseError)}}if(s.length>0)throw s[0]},Xm=function(t){Ir.initialize(t)},Jw=async function(t,e,r){A.warn("mermaid.init is deprecated. Please use run instead."),t&&Xm(t);let i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Gm(i)},tB=async(t,{lazyLoad:e=!0}={})=>{vm(...t),e===!1&&await CS()},Km=function(){if(fe.startOnLoad){let{startOnLoad:t}=Ir.getConfig();t&&fe.run().catch(e=>A.error("Mermaid failed to initialize",e))}};if(typeof document!="undefined"){window.addEventListener("load",Km,!1)}var eB=function(t){fe.parseError=t},da=[],Fl=!1,Zm=async()=>{if(!Fl){for(Fl=!0;da.length>0;){let t=da.shift();if(t)try{await t()}catch(e){A.error("Error executing queue",e)}}Fl=!1}},rB=async(t,e)=>new Promise((r,i)=>{let n=()=>new Promise((o,a)=>{Ir.parse(t,e).then(s=>{o(s),r(s)},s=>{var l;A.error("Error parsing",s),(l=fe.parseError)==null||l.call(fe,s),a(s),i(s)})});da.push(n),Zm().catch(i)}),Qm=(t,e,r)=>new Promise((i,n)=>{let o=()=>new Promise((a,s)=>{Ir.render(t,e,r).then(l=>{a(l),i(l)},l=>{var c;A.error("Error parsing",l),(c=fe.parseError)==null||c.call(fe,l),s(l),n(l)})});da.push(o),Zm().catch(n)}),fe={startOnLoad:!0,mermaidAPI:Ir,parse:rB,render:Qm,init:Jw,run:Gm,registerExternalDiagrams:tB,initialize:Xm,parseError:void 0,contentLoaded:Km,setParseErrorHandler:eB,detectType:ba};export{bc as a,ne as b,qr as c,oe as d,Bc as e,Ic as f,Dc as g,Nc as h,$c as i,Qg as j,Jg as k,Ut as l,K0 as m,ux as n,t1 as o,ps as p,ws as q,Zr as r,Qr as s,_e as t,Ce as u,ei as v,eo as w,Jh as x,i_ as y,Vi as z,n_ as A,o_ as B,Ps as C,op as D,je as E,m1 as F,Br as G,D as H,z as I,Mt as J,ci as K,ve as L,Eo as M,Oo as N,Yt as O,Ap as P,Dp as Q,fi as R,yl as S,Do as T,No as U,Wp as V,Hp as W,zo as X,Kp as Y,di as Z,Qp as _,Jp as $,qo as aa,td as ba,od as ca,sd as da,Tl as ea,ud as fa,cn as ga,A as ha,dn as ia,jd as ja,Xb as ka,Dl as la,eT as ma,aT as na,Ft as oa,gn as pa,tS as qa,Fe as ra,nS as sa,oS as ta,dm as ua,mm as va,gm as wa,xm as xa,ym as ya,_m as za,Cm as Aa,uS as Ba,bm as Ca,Tm as Da,mS as Ea,wS as Fa,OS as Ga,IS as Ha,NS as Ia,zS as Ja,qS as Ka,fa as La,Hl as Ma,ia as Na,W$ as Oa,Ww as Pa,Ir as Qa,fe as Ra};
|
|
/*! Bundled license information:
|
|
|
|
dompurify/dist/purify.js:
|
|
(*! @license DOMPurify 3.0.3 | (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.3/LICENSE *)
|
|
|
|
mermaid/dist/mermaid-a953d906.js:
|
|
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
(*! Check if previously processed *)
|
|
(*!
|
|
* Wait for document loaded before starting the execution
|
|
*)
|
|
*/
|