(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7293],{7371:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},31546:(t,e,r)=>{"use strict";e.J=void 0;var i=r(7371);function n(t){try{return decodeURIComponent(t)}catch(e){return t}}e.J=function(t){if(!t)return i.BLANK_URL;var e,r=n(t.trim());do e=(r=n(r=r.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)}).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex);while(e&&e.length>0)var a=r;if(!a)return i.BLANK_URL;if(i.relativeFirstCharacters.indexOf(a[0])>-1)return a;var o=a.trimStart(),s=o.match(i.urlSchemeRegex);if(!s)return a;var l=s[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(l))return i.BLANK_URL;var h=o.replace(/\\/g,"/");if("mailto:"===l||l.includes("://"))return h;if("http:"===l||"https:"===l){if(!URL.canParse(h))return i.BLANK_URL;var c=new URL(h);return c.protocol=c.protocol.toLowerCase(),c.hostname=c.hostname.toLowerCase(),c.toString()}return h}},95285:function(t){var e;e=function(){"use strict";var t="millisecond",e="second",r="minute",i="hour",n="week",a="month",o="quarter",s="year",l="date",h="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|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,d=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},p="en",f={};f[p]={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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||"th")+"]"}};var g="$isDayjsObject",y=function(t){return t instanceof C||!(!t||!t[g])},m=function t(e,r,i){var n;if(!e)return p;if("string"==typeof e){var a=e.toLowerCase();f[a]&&(n=a),r&&(f[a]=r,n=a);var o=e.split("-");if(!n&&o.length>1)return t(o[0])}else{var s=e.name;f[s]=e,n=s}return!i&&n&&(p=n),n||!i&&p},x=function(t,e){if(y(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new C(r)},b={s:d,z:function(t){var e=-t.utcOffset(),r=Math.abs(e);return(e<=0?"+":"-")+d(Math.floor(r/60),2,"0")+":"+d(r%60,2,"0")},m:function t(e,r){if(e.date()1?r-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let a=i.length;for(;a--;){let e=i[a];if("string"==typeof e){let t=n(e);t!==e&&(r(i)||(i[a]=t),e=t)}t[e]=!0}return t}function v(e){let r=s(null);for(let[i,n]of t(e))b(e,i)&&(Array.isArray(n)?r[i]=function(t){for(let e=0;e/gm),q=o(/\${[\w\W]*}/gm),N=o(/^data-[\-\w.\u00B7-\uFFFF]/),P=o(/^aria-[\-\w]+$/),K=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=o(/^(?:\w+script|data):/i),W=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U=o(/^html$/i);var H,Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:R,ERB_EXPR:z,TMPLIT_EXPR:q,DATA_ATTR:N,ARIA_ATTR:P,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:W,DOCTYPE_NAME:U,CUSTOM_ELEMENT:o(/^[a-z][.\w]*(-[.\w]+)+$/i)});let G={element:1,text:3,progressingInstruction:7,comment:8,document:9},Z=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+n+" could not be created."),null}};return function e(){let r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,n=t=>e(t);if(n.version="3.1.6",n.removed=[],!i||!i.document||i.document.nodeType!==G.document)return n.isSupported=!1,n;let{document:o}=i,l=o,h=l.currentScript,{DocumentFragment:_,HTMLTemplateElement:R,Node:z,Element:q,NodeFilter:N,NamedNodeMap:P=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:j,DOMParser:W,trustedTypes:H}=i,V=q.prototype,X=T(V,"cloneNode"),Q=T(V,"remove"),J=T(V,"nextSibling"),tt=T(V,"childNodes"),te=T(V,"parentNode");if("function"==typeof R){let t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let tr="",{implementation:ti,createNodeIterator:tn,createDocumentFragment:ta,getElementsByTagName:to}=o,{importNode:ts}=l,tl={};n.isSupported="function"==typeof t&&"function"==typeof te&&ti&&void 0!==ti.createHTMLDocument;let{MUSTACHE_EXPR:th,ERB_EXPR:tc,TMPLIT_EXPR:tu,DATA_ATTR:td,ARIA_ATTR:tp,IS_SCRIPT_OR_DATA:tf,ATTR_WHITESPACE:tg,CUSTOM_ELEMENT:ty}=Y,{IS_ALLOWED_URI:tm}=Y,tx=null,tb=w({},[...A,...S,...B,...L,...E]),tC=null,tk=w({},[...$,...O,...I,...D]),t_=Object.seal(s(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}})),tw=null,tv=null,tT=!0,tA=!0,tS=!1,tB=!0,tM=!1,tL=!0,tF=!1,tE=!1,t$=!1,tO=!1,tI=!1,tD=!1,tR=!0,tz=!1,tq=!0,tN=!1,tP={},tK=null,tj=w({},["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"]),tW=null,tU=w({},["audio","video","img","source","image","track"]),tH=null,tY=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tG="http://www.w3.org/1998/Math/MathML",tZ="http://www.w3.org/2000/svg",tV="http://www.w3.org/1999/xhtml",tX=tV,tQ=!1,tJ=null,t0=w({},[tG,tZ,tV],f),t1=null,t2=["application/xhtml+xml","text/html"],t3=null,t5=null,t6=o.createElement("form"),t4=function(t){return t instanceof RegExp||t instanceof Function},t8=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t5||t5!==t){if(t&&"object"==typeof t||(t={}),t=v(t),t3="application/xhtml+xml"===(t1=-1===t2.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE)?f:p,tx=b(t,"ALLOWED_TAGS")?w({},t.ALLOWED_TAGS,t3):tb,tC=b(t,"ALLOWED_ATTR")?w({},t.ALLOWED_ATTR,t3):tk,tJ=b(t,"ALLOWED_NAMESPACES")?w({},t.ALLOWED_NAMESPACES,f):t0,tH=b(t,"ADD_URI_SAFE_ATTR")?w(v(tY),t.ADD_URI_SAFE_ATTR,t3):tY,tW=b(t,"ADD_DATA_URI_TAGS")?w(v(tU),t.ADD_DATA_URI_TAGS,t3):tU,tK=b(t,"FORBID_CONTENTS")?w({},t.FORBID_CONTENTS,t3):tj,tw=b(t,"FORBID_TAGS")?w({},t.FORBID_TAGS,t3):{},tv=b(t,"FORBID_ATTR")?w({},t.FORBID_ATTR,t3):{},tP=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,tT=!1!==t.ALLOW_ARIA_ATTR,tA=!1!==t.ALLOW_DATA_ATTR,tS=t.ALLOW_UNKNOWN_PROTOCOLS||!1,tB=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,tM=t.SAFE_FOR_TEMPLATES||!1,tL=!1!==t.SAFE_FOR_XML,tF=t.WHOLE_DOCUMENT||!1,tO=t.RETURN_DOM||!1,tI=t.RETURN_DOM_FRAGMENT||!1,tD=t.RETURN_TRUSTED_TYPE||!1,t$=t.FORCE_BODY||!1,tR=!1!==t.SANITIZE_DOM,tz=t.SANITIZE_NAMED_PROPS||!1,tq=!1!==t.KEEP_CONTENT,tN=t.IN_PLACE||!1,tm=t.ALLOWED_URI_REGEXP||K,tX=t.NAMESPACE||tV,t_=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&t4(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(t_.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&t4(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(t_.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(t_.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),tM&&(tA=!1),tI&&(tO=!0),tP&&(tx=w({},E),tC=[],!0===tP.html&&(w(tx,A),w(tC,$)),!0===tP.svg&&(w(tx,S),w(tC,O),w(tC,D)),!0===tP.svgFilters&&(w(tx,B),w(tC,O),w(tC,D)),!0===tP.mathMl&&(w(tx,L),w(tC,I),w(tC,D))),t.ADD_TAGS&&(tx===tb&&(tx=v(tx)),w(tx,t.ADD_TAGS,t3)),t.ADD_ATTR&&(tC===tk&&(tC=v(tC)),w(tC,t.ADD_ATTR,t3)),t.ADD_URI_SAFE_ATTR&&w(tH,t.ADD_URI_SAFE_ATTR,t3),t.FORBID_CONTENTS&&(tK===tj&&(tK=v(tK)),w(tK,t.FORBID_CONTENTS,t3)),tq&&(tx["#text"]=!0),tF&&w(tx,["html","head","body"]),tx.table&&(w(tx,["tbody"]),delete tw.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');tr=(r=t.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===r&&(r=Z(H,h)),null!==r&&"string"==typeof tr&&(tr=r.createHTML(""));a&&a(t),t5=t}},t9=w({},["mi","mo","mn","ms","mtext"]),t7=w({},["foreignobject","annotation-xml"]),et=w({},["title","style","font","a","script"]),ee=w({},[...S,...B,...M]),er=w({},[...L,...F]),ei=function(t){let e=te(t);e&&e.tagName||(e={namespaceURI:tX,tagName:"template"});let r=p(t.tagName),i=p(e.tagName);return!!tJ[t.namespaceURI]&&(t.namespaceURI===tZ?e.namespaceURI===tV?"svg"===r:e.namespaceURI===tG?"svg"===r&&("annotation-xml"===i||t9[i]):!!ee[r]:t.namespaceURI===tG?e.namespaceURI===tV?"math"===r:e.namespaceURI===tZ?"math"===r&&t7[i]:!!er[r]:t.namespaceURI===tV?(e.namespaceURI!==tZ||!!t7[i])&&(e.namespaceURI!==tG||!!t9[i])&&!er[r]&&(et[r]||!ee[r]):"application/xhtml+xml"===t1&&!!tJ[t.namespaceURI])},en=function(t){d(n.removed,{element:t});try{te(t).removeChild(t)}catch(e){Q(t)}},ea=function(t,e){try{d(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!tC[t]){if(tO||tI)try{en(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}}},eo=function(t){let e=null,i=null;if(t$)t=""+t;else{let e=g(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===t1&&tX===tV&&(t=''+t+"");let n=r?r.createHTML(t):t;if(tX===tV)try{e=new W().parseFromString(n,t1)}catch(t){}if(!e||!e.documentElement){e=ti.createDocument(tX,"template",null);try{e.documentElement.innerHTML=tQ?tr:n}catch(t){}}let a=e.body||e.documentElement;return(t&&i&&a.insertBefore(o.createTextNode(i),a.childNodes[0]||null),tX===tV)?to.call(e,tF?"html":"body")[0]:tF?e.documentElement:a},es=function(t){return tn.call(t.ownerDocument||t,t,N.SHOW_ELEMENT|N.SHOW_COMMENT|N.SHOW_TEXT|N.SHOW_PROCESSING_INSTRUCTION|N.SHOW_CDATA_SECTION,null)},el=function(t){return t instanceof j&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof P)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},eh=function(t){return"function"==typeof z&&t instanceof z},ec=function(t,e,r){tl[t]&&c(tl[t],t=>{t.call(n,e,r,t5)})},eu=function(t){let e=null;if(ec("beforeSanitizeElements",t,null),el(t))return en(t),!0;let r=t3(t.nodeName);if(ec("uponSanitizeElement",t,{tagName:r,allowedTags:tx}),t.hasChildNodes()&&!eh(t.firstElementChild)&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent)||t.nodeType===G.progressingInstruction||tL&&t.nodeType===G.comment&&C(/<[/\w]/g,t.data))return en(t),!0;if(!tx[r]||tw[r]){if(!tw[r]&&ep(r)&&(t_.tagNameCheck instanceof RegExp&&C(t_.tagNameCheck,r)||t_.tagNameCheck instanceof Function&&t_.tagNameCheck(r)))return!1;if(tq&&!tK[r]){let e=te(t)||t.parentNode,r=tt(t)||t.childNodes;if(r&&e){let i=r.length;for(let n=i-1;n>=0;--n){let i=X(r[n],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,J(t))}}}return en(t),!0}return t instanceof q&&!ei(t)||("noscript"===r||"noembed"===r||"noframes"===r)&&C(/<\/no(script|embed|frames)/i,t.innerHTML)?(en(t),!0):(tM&&t.nodeType===G.text&&(e=t.textContent,c([th,tc,tu],t=>{e=y(e,t," ")}),t.textContent!==e&&(d(n.removed,{element:t.cloneNode()}),t.textContent=e)),ec("afterSanitizeElements",t,null),!1)},ed=function(t,e,r){if(tR&&("id"===e||"name"===e)&&(r in o||r in t6))return!1;if(tA&&!tv[e]&&C(td,e));else if(tT&&C(tp,e));else if(!tC[e]||tv[e]){if(!(ep(t)&&(t_.tagNameCheck instanceof RegExp&&C(t_.tagNameCheck,t)||t_.tagNameCheck instanceof Function&&t_.tagNameCheck(t))&&(t_.attributeNameCheck instanceof RegExp&&C(t_.attributeNameCheck,e)||t_.attributeNameCheck instanceof Function&&t_.attributeNameCheck(e))||"is"===e&&t_.allowCustomizedBuiltInElements&&(t_.tagNameCheck instanceof RegExp&&C(t_.tagNameCheck,r)||t_.tagNameCheck instanceof Function&&t_.tagNameCheck(r))))return!1}else if(tH[e]);else if(C(tm,y(r,tg,"")));else if(("src"===e||"xlink:href"===e||"href"===e)&&"script"!==t&&0===m(r,"data:")&&tW[t]);else if(tS&&!C(tf,y(r,tg,"")));else if(r)return!1;return!0},ep=function(t){return"annotation-xml"!==t&&g(t,ty)},ef=function(t){ec("beforeSanitizeAttributes",t,null);let{attributes:e}=t;if(!e)return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tC},a=e.length;for(;a--;){let{name:o,namespaceURI:s,value:l}=e[a],h=t3(o),d="value"===o?l:x(l);if(i.attrName=h,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,ec("uponSanitizeAttribute",t,i),d=i.attrValue,tL&&C(/((--!?|])>)|<\/(style|title)/i,d)){ea(o,t);continue}if(i.forceKeepAttr||(ea(o,t),!i.keepAttr))continue;if(!tB&&C(/\/>/i,d)){ea(o,t);continue}tM&&c([th,tc,tu],t=>{d=y(d,t," ")});let p=t3(t.nodeName);if(ed(p,h,d)){if(tz&&("id"===h||"name"===h)&&(ea(o,t),d="user-content-"+d),r&&"object"==typeof H&&"function"==typeof H.getAttributeType){if(s);else switch(H.getAttributeType(p,h)){case"TrustedHTML":d=r.createHTML(d);break;case"TrustedScriptURL":d=r.createScriptURL(d)}}try{s?t.setAttributeNS(s,o,d):t.setAttribute(o,d),el(t)?en(t):u(n.removed)}catch(t){}}}ec("afterSanitizeAttributes",t,null)},eg=function t(e){let r=null,i=es(e);for(ec("beforeSanitizeShadowDOM",e,null);r=i.nextNode();)ec("uponSanitizeShadowNode",r,null),eu(r)||(r.content instanceof _&&t(r.content),ef(r));ec("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,a=null,o=null,s=null;if((tQ=!t)&&(t=""),"string"!=typeof t&&!eh(t)){if("function"==typeof t.toString){if("string"!=typeof(t=t.toString()))throw k("dirty is not a string, aborting")}else throw k("toString is not a function")}if(!n.isSupported)return t;if(tE||t8(e),n.removed=[],"string"==typeof t&&(tN=!1),tN){if(t.nodeName){let e=t3(t.nodeName);if(!tx[e]||tw[e])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof z)(a=(i=eo("")).ownerDocument.importNode(t,!0)).nodeType===G.element&&"BODY"===a.nodeName?i=a:"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!tO&&!tM&&!tF&&-1===t.indexOf("<"))return r&&tD?r.createHTML(t):t;if(!(i=eo(t)))return tO?null:tD?tr:""}i&&t$&&en(i.firstChild);let h=es(tN?t:i);for(;o=h.nextNode();)eu(o)||(o.content instanceof _&&eg(o.content),ef(o));if(tN)return t;if(tO){if(tI)for(s=ta.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(tC.shadowroot||tC.shadowrootmode)&&(s=ts.call(l,s,!0)),s}let u=tF?i.outerHTML:i.innerHTML;return tF&&tx["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&C(U,i.ownerDocument.doctype.name)&&(u="\n"+u),tM&&c([th,tc,tu],t=>{u=y(u,t," ")}),r&&tD?r.createHTML(u):u},n.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t8(t),tE=!0},n.clearConfig=function(){t5=null,tE=!1},n.isValidAttribute=function(t,e,r){return t5||t8({}),ed(t3(t),t3(e),r)},n.addHook=function(t,e){"function"==typeof e&&(tl[t]=tl[t]||[],d(tl[t],e))},n.removeHook=function(t){if(tl[t])return u(tl[t])},n.removeHooks=function(t){tl[t]&&(tl[t]=[])},n.removeAllHooks=function(){tl={}},n}()},t.exports=e()},97597:(t,e,r)=>{"use strict";function i(t){for(var e=[],r=1;ri})},89601:(t,e,r)=>{"use strict";function i(t,e){let r;if(void 0===e)for(let e of t)null!=e&&(r=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r=n)&&(r=n)}return r}function n(t,e){let r;if(void 0===e)for(let e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function a(t){return t}function o(t){return"translate("+t+",0)"}function s(t){return"translate(0,"+t+")"}function l(){return!this.__axis}function h(t,e){var r=[],i=null,n=null,h=6,c=6,u=3,d="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,p=1===t||4===t?-1:1,f=4===t||2===t?"x":"y",g=1===t||3===t?o:s;function y(o){var s=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,y=null==n?e.tickFormat?e.tickFormat.apply(e,r):a:n,m=Math.max(h,0)+u,x=e.range(),b=+x[0]+d,C=+x[x.length-1]+d,k=(e.bandwidth?function(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}:function(t){return e=>+t(e)})(e.copy(),d),_=o.selection?o.selection():o,w=_.selectAll(".domain").data([null]),v=_.selectAll(".tick").data(s,e).order(),T=v.exit(),A=v.enter().append("g").attr("class","tick"),S=v.select("line"),B=v.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(A),S=S.merge(A.append("line").attr("stroke","currentColor").attr(f+"2",p*h)),B=B.merge(A.append("text").attr("fill","currentColor").attr(f,p*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),o!==_&&(w=w.transition(o),v=v.transition(o),S=S.transition(o),B=B.transition(o),T=T.transition(o).attr("opacity",1e-6).attr("transform",function(t){return isFinite(t=k(t))?g(t+d):this.getAttribute("transform")}),A.attr("opacity",1e-6).attr("transform",function(t){var e=this.parentNode.__axis;return g((e&&isFinite(e=e(t))?e:k(t))+d)})),T.remove(),w.attr("d",4===t||2===t?c?"M"+p*c+","+b+"H"+d+"V"+C+"H"+p*c:"M"+d+","+b+"V"+C:c?"M"+b+","+p*c+"V"+d+"H"+C+"V"+p*c:"M"+b+","+d+"H"+C),v.attr("opacity",1).attr("transform",function(t){return g(k(t)+d)}),S.attr(f+"2",p*h),B.attr(f,p*m).text(y),_.filter(l).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each(function(){this.__axis=k})}return y.scale=function(t){return arguments.length?(e=t,y):e},y.ticks=function(){return r=Array.from(arguments),y},y.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),y):r.slice()},y.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),y):i&&i.slice()},y.tickFormat=function(t){return arguments.length?(n=t,y):n},y.tickSize=function(t){return arguments.length?(h=c=+t,y):h},y.tickSizeInner=function(t){return arguments.length?(h=+t,y):h},y.tickSizeOuter=function(t){return arguments.length?(c=+t,y):c},y.tickPadding=function(t){return arguments.length?(u=+t,y):u},y.offset=function(t){return arguments.length?(d=+t,y):d},y}function c(t){return h(1,t)}function u(t){return h(3,t)}function d(){}function p(t){return null==t?d:function(){return this.querySelector(t)}}function f(){return[]}function g(t){return null==t?f:function(){return this.querySelectorAll(t)}}function y(t){return function(){return this.matches(t)}}function m(t){return function(e){return e.matches(t)}}r.d(e,{JLW:()=>nI,l78:()=>u,tlR:()=>c,qrM:()=>nG,Yu4:()=>nV,IA3:()=>nQ,Wi0:()=>n0,PGM:()=>n1,OEq:()=>n3,y8u:()=>n4,olC:()=>n9,IrU:()=>at,oDi:()=>ai,Q7f:()=>aa,cVp:()=>as,lUB:()=>nz,Lx9:()=>ah,nVG:()=>ay,uxU:()=>am,Xf2:()=>aC,GZz:()=>a_,UPb:()=>av,dyv:()=>aw,bEH:()=>eY,n8j:()=>nP,T9B:()=>i,jkA:()=>n,rLf:()=>nW,WH:()=>function t(){var e,r,i=eJ().unknown(void 0),n=i.domain,a=i.range,o=0,s=1,l=!1,h=0,c=0,u=.5;function d(){var t=n().length,i=sfunction t(){var e,r=rc();return r.copy=function(){return rh(r,t())},eG.apply(r,arguments),e=r.domain,r.ticks=function(t){var r=e();return function(t,e,r){if(e=+e,t=+t,!((r=+r)>0))return[];if(t===e)return[t];let i=e=n))return[];let s=a-n+1,l=Array(s);if(i){if(o<0)for(let t=0;t0;){if((n=e5(l,h,t))===i)return a[o]=l,a[s]=h,e(a);if(n>0)l=Math.floor(l/n)*n,h=Math.ceil(h/n)*n;else if(n<0)l=Math.ceil(l*n)/n,h=Math.floor(h*n)/n;else break;i=n}return r},r},UMr:()=>eJ,w7C:()=>nl,zt:()=>nh,Ltv:()=>nc,UAC:()=>rL,DCK:()=>th,TUC:()=>rq,Agd:()=>rB,t6C:()=>rv,wXd:()=>rA,ABi:()=>rI,Ui6:()=>rZ,rGn:()=>rN,ucG:()=>rT,YPH:()=>rO,Mol:()=>rz,PGu:()=>rD,GuW:()=>rR});var x=Array.prototype.find;function b(){return this.firstElementChild}var C=Array.prototype.filter;function k(){return Array.from(this.children)}function _(t){return Array(t.length)}function w(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function v(t,e,r,i,n,a){for(var o,s=0,l=e.length,h=a.length;se?1:t>=e?0:NaN}w.prototype={constructor:w,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)}};var B="http://www.w3.org/1999/xhtml";let M={svg:"http://www.w3.org/2000/svg",xhtml:B,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function L(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),M.hasOwnProperty(e)?{space:M[e],local:t}:t}function F(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E(t,e){return t.style.getPropertyValue(e)||F(t).getComputedStyle(t,null).getPropertyValue(e)}function $(t){return t.trim().split(/^|\s+/)}function O(t){return t.classList||new I(t)}function I(t){this._node=t,this._names=$(t.getAttribute("class")||"")}function D(t,e){for(var r=O(t),i=-1,n=e.length;++ithis._names.indexOf(t)&&(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}};var V=[null];function X(t,e){this._groups=t,this._parents=e}function Q(){return new X([[document.documentElement]],V)}X.prototype=Q.prototype={constructor:X,select:function(t){"function"!=typeof t&&(t=p(t));for(var e=this._groups,r=e.length,i=Array(r),n=0;n=_&&(_=k+1);!(C=y[_])&&++_=0;)(i=n[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=S);for(var r=this._groups,i=r.length,n=Array(i),a=0;a1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}:function(t,e,r){return function(){this.style.setProperty(t,e,r)}})(t,e,null==r?"":r)):E(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var r=$(t+"");if(arguments.length<2){for(var i=O(this.node()),n=-1,a=r.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}),o=a.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var l,h=0,c=s.length;h{}};function tt(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r,i,n=Array(r),a=0;a=0&&e._call.call(void 0,t),e=e._next;--td}()}finally{td=0,function(){for(var t,e,r=tc,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:tc=e);tu=t,tA(i)}(),ty=0}}function tT(){var t=tx.now(),e=t-tg;e>1e3&&(tm-=e,tg=t)}function tA(t){!td&&(tp&&(tp=clearTimeout(tp)),t-ty>24?(t<1/0&&(tp=setTimeout(tv,t-tx.now()-tm)),tf&&(tf=clearInterval(tf))):(tf||(tg=tx.now(),tf=setInterval(tT,1e3)),td=1,tb(tv)))}function tS(t,e,r){var i=new t_;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}t_.prototype=tw.prototype={constructor:t_,restart:function(t,e,r){if("function"!=typeof t)throw TypeError("callback is not a function");r=(null==r?tC():+r)+(null==e?0:+e),this._next||tu===this||(tu?tu._next=this:tc=this,tu=this),this._call=t,this._time=r,tA()},stop:function(){this._call&&(this._call=null,this._time=1/0,tA())}};var tB=tt("start","end","cancel","interrupt"),tM=[];function tL(t,e,r,i,n,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function a(l){var h,c,u,d;if(1!==r.state)return s();for(h in n)if((d=n[h]).name===r.name){if(3===d.state)return tS(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+h0)throw Error("too late; already scheduled");return r}function tE(t,e){var r=t$(t,e);if(r.state>3)throw Error("too late; already running");return r}function t$(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw Error("transition not found");return r}function tO(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var tI=180/Math.PI,tD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tR(t,e,r,i,n,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(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*i180?l+=360:l-s>180&&(s+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:tO(s,l)})):l&&u.push(n(u)+"rotate("+l+i),(h=a.skewX)!==(c=o.skewX)?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:tO(h,c)}):c&&u.push(n(u)+"skewX("+c+i),!function(t,e,r,i,a,o){if(t!==r||e!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:tO(t,r)},{i:s-2,x:tO(e,i)})}else(1!==r||1!==i)&&a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,d),a=o=null,function(t){for(var e,r=-1,i=d.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?t4(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?t4(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=tZ.exec(t))?new t7(e[1],e[2],e[3],1):(e=tV.exec(t))?new t7(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=tX.exec(t))?t4(e[1],e[2],e[3],e[4]):(e=tQ.exec(t))?t4(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=tJ.exec(t))?ea(e[1],e[2]/100,e[3]/100,1):(e=t0.exec(t))?ea(e[1],e[2]/100,e[3]/100,e[4]):t1.hasOwnProperty(t)?t6(t1[t]):"transparent"===t?new t7(NaN,NaN,NaN,0):null}function t6(t){return new t7(t>>16&255,t>>8&255,255&t,1)}function t4(t,e,r,i){return i<=0&&(t=e=r=NaN),new t7(t,e,r,i)}function t8(t){return(t instanceof tW||(t=t5(t)),t)?new t7((t=t.rgb()).r,t.g,t.b,t.opacity):new t7}function t9(t,e,r,i){return 1==arguments.length?t8(t):new t7(t,e,r,null==i?1:i)}function t7(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function et(){return`#${en(this.r)}${en(this.g)}${en(this.b)}`}function ee(){let t=er(this.opacity);return`${1===t?"rgb(":"rgba("}${ei(this.r)}, ${ei(this.g)}, ${ei(this.b)}${1===t?")":`, ${t})`}`}function er(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ei(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function en(t){return((t=ei(t))<16?"0":"")+t.toString(16)}function ea(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new es(t,e,r,i)}function eo(t){if(t instanceof es)return new es(t.h,t.s,t.l,t.opacity);if(t instanceof tW||(t=t5(t)),!t)return new es;if(t instanceof es)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=e===a?(r-i)/s+(r0&&l<1?0:o,new es(o,s,l,t.opacity)}function es(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function el(t){return(t=(t||0)%360)<0?t+360:t}function eh(t){return Math.max(0,Math.min(1,t||0))}function ec(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function eu(t,e,r,i,n){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*i+o*n)/6}tK(tW,t5,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:t2,formatHex:t2,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return eo(this).formatHsl()},formatRgb:t3,toString:t3}),tK(t7,t9,tj(tW,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new t7(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new t7(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new t7(ei(this.r),ei(this.g),ei(this.b),er(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:et,formatHex:et,formatHex8:function(){return`#${en(this.r)}${en(this.g)}${en(this.b)}${en((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:ee,toString:ee})),tK(es,function(t,e,r,i){return 1==arguments.length?eo(t):new es(t,e,r,null==i?1:i)},tj(tW,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new es(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new es(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 t7(ec(t>=240?t-240:t+120,n,i),ec(t,n,i),ec(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new es(el(this.h),eh(this.s),eh(this.l),er(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=er(this.opacity);return`${1===t?"hsl(":"hsla("}${el(this.h)}, ${100*eh(this.s)}%, ${100*eh(this.l)}%${1===t?")":`, ${t})`}`}}));let ed=t=>()=>t;function ep(t,e){return function(r){return t+r*e}}function ef(t,e){var r=e-t;return r?ep(t,r):ed(isNaN(t)?e:t)}let eg=function t(e){var r,i=1==(r=+(r=e))?ef:function(t,e){var i,n,a;return e-t?(i=t,n=e,i=Math.pow(i,a=r),n=Math.pow(n,a)-i,a=1/a,function(t){return Math.pow(i+t*n,a)}):ed(isNaN(t)?e:t)};function n(t,e){var r=i((t=t9(t)).r,(e=t9(e)).r),n=i(t.g,e.g),a=i(t.b,e.b),o=ef(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function ey(t){return function(e){var r,i,n=e.length,a=Array(n),o=Array(n),s=Array(n);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),n=t[i],a=t[i+1],o=i>0?t[i-1]:2*n-a,s=is&&(o=e.slice(s,o),h[l]?h[l]+=o:h[++l]=o),(n=n[0])===(a=a[0])?h[l]?h[l]+=a:h[++l]=a:(h[++l]=null,c.push({i:l,x:tO(n,a)})),s=ex.lastIndex;return s=0&&(t=t.slice(0,e)),!t||"start"===t})?tF:tE,function(){var o=n(this,a),s=o.on;s!==r&&(i=(r=s).copy()).on(t,e),o.on=i}))},attr:function(t,e){var r=L(t),i="transform"===r?tN:eC;return this.attrTween(t,"function"==typeof e?(r.local?function(t,e,r){var i,n,a;return function(){var o,s,l=r(this);return null==l?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===i&&s===n?a:(n=s,a=e(i=o,l))}}:function(t,e,r){var i,n,a;return function(){var o,s,l=r(this);return null==l?void this.removeAttribute(t):(o=this.getAttribute(t))===(s=l+"")?null:o===i&&s===n?a:(n=s,a=e(i=o,l))}})(r,i,tP(this,"attr."+t,e)):null==e?(r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(r):(r.local?function(t,e,r){var i,n,a=r+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===i?n:n=e(i=o,r)}}:function(t,e,r){var i,n,a=r+"";return function(){var o=this.getAttribute(t);return o===a?null:o===i?n:n=e(i=o,r)}})(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw Error();var i=L(t);return this.tween(r,(i.local?function(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}),r}return n._value=e,n}:function(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(e){this.setAttribute(t,n.call(this,e))}),r}return n._value=e,n})(i,e))},style:function(t,e,r){var i,n,a,o,s,l,h,c,u,d,p,f,g,y,m,x,b,C,k,_,w,v="transform"==(t+="")?tq:eC;return null==e?this.styleTween(t,(i=t,function(){var t=E(this,i),e=(this.style.removeProperty(i),E(this,i));return t===e?null:t===n&&e===a?o:o=v(n=t,a=e)})).on("end.style."+t,e_(t)):"function"==typeof e?this.styleTween(t,(s=t,l=tP(this,"style."+t,e),function(){var t=E(this,s),e=l(this),r=e+"";return null==e&&(this.style.removeProperty(s),r=e=E(this,s)),t===r?null:t===h&&r===c?u:(c=r,u=v(h=t,e))})).each((d=this._id,b="end."+(x="style."+(p=t)),function(){var t=tE(this,d),e=t.on,r=null==t.value[x]?m||(m=e_(p)):void 0;(e!==f||y!==r)&&(g=(f=e).copy()).on(b,y=r),t.on=g})):this.styleTween(t,(C=t,w=e+"",function(){var t=E(this,C);return t===w?null:t===k?_:_=v(k=t,e)}),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw Error();return this.tween(i,function(t,e,r){var i,n;function a(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&function(e){this.style.setProperty(t,a.call(this,e),r)}),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){var e,r;return this.tween("text","function"==typeof t?(e=tP(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(r=null==t?"":t+"",function(){this.textContent=r}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){this.textContent=i.call(this,t)}),e}return i._value=t,i}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=t$(this.node(),r).tween,a=0,o=n.length;a2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[n]}o&&delete t.__transition}}(this,t)})},Q.prototype.transition=function(t){var e,r;t instanceof ev?(e=t._id,t=t._name):(e=++ew,(r=eA).time=tC(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,a=0;aeD?Math.pow(t,1/3):t/eI+e$}function eN(t){return t>eO?t*t*t:eI*(t-e$)}function eP(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function eK(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ej(t,e,r,i){return 1==arguments.length?function(t){if(t instanceof eW)return new eW(t.h,t.c,t.l,t.opacity);if(t instanceof ez||(t=eR(t)),0===t.a&&0===t.b)return new eW(NaN,0180||r<-180?r-360*Math.round(r/360):r):ed(isNaN(t)?e:t)});function eG(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}eH(ef);class eZ extends Map{constructor(t,e=eX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,r]of t)this.set(e,r)}get(t){return super.get(eV(this,t))}has(t){return super.has(eV(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}(this,t))}}function eV({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}function eX(t){return null!==t&&"object"==typeof t?t.valueOf():t}let eQ=Symbol("implicit");function eJ(){var t=new eZ,e=[],r=[],i=eQ;function n(n){let a=t.get(n);if(void 0===a){if(i!==eQ)return i;t.set(n,a=e.push(n)-1)}return r[a%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();for(let i of(e=[],t=new eZ,r))t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return eJ(e,r).unknown(i)},eG.apply(n,arguments),n}let e0=Math.sqrt(50),e1=Math.sqrt(10),e2=Math.sqrt(2);function e3(t,e,r){let i,n,a;let o=(e-t)/Math.max(0,r),s=Math.floor(Math.log10(o)),l=o/Math.pow(10,s),h=l>=e0?10:l>=e1?5:l>=e2?2:1;return(s<0?(i=Math.round(t*(a=Math.pow(10,-s)/h)),n=Math.round(e*a),i/ae&&--n,a=-a):(i=Math.round(t/(a=Math.pow(10,s)*h)),n=Math.round(e/a),i*ae&&--n),ne?1:t>=e?0:NaN}function e8(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function e9(t){let e,r,i;function n(t,i,a=0,o=t.length){if(a>>1;0>r(t[e],i)?a=e+1:o=e}while(ae4(t(e),r),i=(e,r)=>t(e)-r):(e=t===e4||t===e8?t:e7,r=t,i=t),{left:n,center:function(t,e,r=0,a=t.length){let o=n(t,e,r,a-1);return o>r&&i(t[o-1],e)>-i(t[o],e)?o-1:o},right:function(t,i,n=0,a=t.length){if(n>>1;0>=r(t[e],i)?n=e+1:a=e}while(ne&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?rl:rs,n=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(o.map(t),s,l)))(t(h(e)))}return u.invert=function(r){return h(e((a||(a=i(s,o.map(t),tO)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,ri),c()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=rr,c()},u.clamp=function(t){return arguments.length?(h=!!t||ra,c()):h!==ra},u.interpolate=function(t){return arguments.length?(l=t,c()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,c()}})()(ra,ra)}var ru=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rd(t){var e;if(!(e=ru.exec(t)))throw Error("invalid format: "+t);return new rp({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]})}function rp(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function rf(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 rg(t){return(t=rf(Math.abs(t)))?t[1]:NaN}function ry(t,e){var r=rf(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+Array(n-i.length+2).join("0")}rd.prototype=rp.prototype,rp.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};let rm={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>ry(100*t,e),r:ry,s:function(t,e){var r=rf(t,e);if(!r)return t+"";var i=r[0],n=r[1],a=n-(tn=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,o=i.length;return a===o?i:a>o?i+Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+Array(1-a).join("0")+rf(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rx(t){return t}var rb=Array.prototype.map,rC=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];to=(ta=function(t){var e,r,i,n=void 0===t.grouping||void 0===t.thousands?rx:(e=rb.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?rx:(i=rb.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return i[+t]})}),h=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function d(t){var e=(t=rd(t)).fill,r=t.align,i=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,x=t.type;"n"===x?(g=!0,x="g"):rm[x]||(void 0===y&&(y=12),m=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C="$"===d?o:/[%p]/.test(x)?h:"",k=rm[x],_=/[defgprs%]/.test(x);function w(t){var a,o,h,d=b,w=C;if("c"===x)w=k(t)+w,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:k(Math.abs(t),y),m&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0==+t&&"+"!==i&&(v=!1),d=(v?"("===i?i:c:"-"===i||"("===i?"":i)+d,w=("s"===x?rC[8+tn/3]:"")+w+(v&&"("===i?")":""),_){for(a=-1,o=t.length;++a(h=t.charCodeAt(a))||h>57){w=(46===h?s+t.slice(a+1):t.slice(a))+w,t=t.slice(0,a);break}}}g&&!p&&(t=n(t,1/0));var T=d.length+t.length+w.length,A=T>1)+d+t+w+A.slice(T);break;default:t=A+d+t+w}return l(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:d,formatPrefix:function(t,e){var r=d(((t=rd(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(rg(e)/3))),n=Math.pow(10,-i),a=rC[8+i/3];return function(t){return r(n*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,ts=ta.formatPrefix;let rk=new Date,r_=new Date;function rw(t,e,r,i){function n(e){return t(e=0==arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{let e=n(t),r=n.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,a)=>{let o;let s=[];if(r=n.ceil(r),a=null==a?1:Math.floor(a),!(r0))return s;do s.push(o=new Date(+r)),e(r,a),t(r);while(orw(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t){if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}}),r&&(n.count=(e,i)=>(rk.setTime(+e),r_.setTime(+i),t(rk),t(r_),Math.floor(r(rk,r_))),n.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?n.filter(i?e=>i(e)%t==0:e=>n.count(0,e)%t==0):n:null),n}let rv=rw(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);rv.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?rw(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):rv:null,rv.range;let rT=rw(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds());rT.range;let rA=rw(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes());rA.range;let rS=rw(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes());rS.range;let rB=rw(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours());rB.range;let rM=rw(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours());rM.range;let rL=rw(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);rL.range;let rF=rw(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);rF.range;let rE=rw(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5));function r$(t){return rw(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}rE.range;let rO=r$(0),rI=r$(1),rD=r$(2),rR=r$(3),rz=r$(4),rq=r$(5),rN=r$(6);function rP(t){return rw(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}rO.range,rI.range,rD.range,rR.range,rz.range,rq.range,rN.range;let rK=rP(0),rj=rP(1),rW=rP(2),rU=rP(3),rH=rP(4),rY=rP(5),rG=rP(6);rK.range,rj.range,rW.range,rU.range,rH.range,rY.range,rG.range;let rZ=rw(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());rZ.range;let rV=rw(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());rV.range;let rX=rw(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());rX.every=t=>isFinite(t=Math.floor(t))&&t>0?rw(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)}):null,rX.range;let rQ=rw(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());function rJ(t,e,r,i,n,a){let o=[[rT,1,1e3],[rT,5,5e3],[rT,15,15e3],[rT,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,864e5],[i,2,1728e5],[r,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function s(e,r,i){let n=Math.abs(r-e)/i,a=e9(([,,t])=>t).right(o,n);if(a===o.length)return t.every(e6(e/31536e6,r/31536e6,i));if(0===a)return rv.every(Math.max(e6(e,r,i),1));let[s,l]=o[n/o[a-1][2]isFinite(t=Math.floor(t))&&t>0?rw(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)}):null,rQ.range;let[r0,r1]=rJ(rQ,rV,rK,rE,rM,rS),[r2,r3]=rJ(rX,rZ,rO,rL,rB,rA);function r5(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 r6(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 r4(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var r8={"-":"",_:" ",0:"0"},r9=/^\s*\d+/,r7=/^%/,it=/[\\^$*+?|[\]().{}]/g;function ie(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",a=n.length;return i+(a[t.toLowerCase(),e]))}function io(t,e,r){var i=r9.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function is(t,e,r){var i=r9.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function il(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function ih(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function ic(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function iu(t,e,r){var i=r9.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function id(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function ip(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 ig(t,e,r){var i=r9.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function iy(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function im(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function ix(t,e,r){var i=r9.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function ib(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function iC(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function ik(t,e,r){var i=r9.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function i_(t,e,r){var i=r9.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function iw(t,e,r){var i=r9.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function iv(t,e,r){var i=r7.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function iT(t,e,r){var i=r9.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function iA(t,e,r){var i=r9.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function iS(t,e){return ie(t.getDate(),e,2)}function iB(t,e){return ie(t.getHours(),e,2)}function iM(t,e){return ie(t.getHours()%12||12,e,2)}function iL(t,e){return ie(1+rL.count(rX(t),t),e,3)}function iF(t,e){return ie(t.getMilliseconds(),e,3)}function iE(t,e){return iF(t,e)+"000"}function i$(t,e){return ie(t.getMonth()+1,e,2)}function iO(t,e){return ie(t.getMinutes(),e,2)}function iI(t,e){return ie(t.getSeconds(),e,2)}function iD(t){var e=t.getDay();return 0===e?7:e}function iR(t,e){return ie(rO.count(rX(t)-1,t),e,2)}function iz(t){var e=t.getDay();return e>=4||0===e?rz(t):rz.ceil(t)}function iq(t,e){return t=iz(t),ie(rz.count(rX(t),t)+(4===rX(t).getDay()),e,2)}function iN(t){return t.getDay()}function iP(t,e){return ie(rI.count(rX(t)-1,t),e,2)}function iK(t,e){return ie(t.getFullYear()%100,e,2)}function ij(t,e){return ie((t=iz(t)).getFullYear()%100,e,2)}function iW(t,e){return ie(t.getFullYear()%1e4,e,4)}function iU(t,e){var r=t.getDay();return ie((t=r>=4||0===r?rz(t):rz.ceil(t)).getFullYear()%1e4,e,4)}function iH(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ie(e/60|0,"0",2)+ie(e%60,"0",2)}function iY(t,e){return ie(t.getUTCDate(),e,2)}function iG(t,e){return ie(t.getUTCHours(),e,2)}function iZ(t,e){return ie(t.getUTCHours()%12||12,e,2)}function iV(t,e){return ie(1+rF.count(rQ(t),t),e,3)}function iX(t,e){return ie(t.getUTCMilliseconds(),e,3)}function iQ(t,e){return iX(t,e)+"000"}function iJ(t,e){return ie(t.getUTCMonth()+1,e,2)}function i0(t,e){return ie(t.getUTCMinutes(),e,2)}function i1(t,e){return ie(t.getUTCSeconds(),e,2)}function i2(t){var e=t.getUTCDay();return 0===e?7:e}function i3(t,e){return ie(rK.count(rQ(t)-1,t),e,2)}function i5(t){var e=t.getUTCDay();return e>=4||0===e?rH(t):rH.ceil(t)}function i6(t,e){return t=i5(t),ie(rH.count(rQ(t),t)+(4===rQ(t).getUTCDay()),e,2)}function i4(t){return t.getUTCDay()}function i8(t,e){return ie(rj.count(rQ(t)-1,t),e,2)}function i9(t,e){return ie(t.getUTCFullYear()%100,e,2)}function i7(t,e){return ie((t=i5(t)).getUTCFullYear()%100,e,2)}function nt(t,e){return ie(t.getUTCFullYear()%1e4,e,4)}function ne(t,e){var r=t.getUTCDay();return ie((t=r>=4||0===r?rH(t):rH.ceil(t)).getUTCFullYear()%1e4,e,4)}function nr(){return"+0000"}function ni(){return"%"}function nn(t){return+t}function na(t){return Math.floor(+t/1e3)}function no(t){return new Date(t)}function ns(t){return t instanceof Date?+t:+new Date(+t)}function nl(){return eG.apply((function t(e,r,i,n,a,o,s,l,h,c){var u=rc(),d=u.invert,p=u.domain,f=c(".%L"),g=c(":%S"),y=c("%I:%M"),m=c("%I %p"),x=c("%a %d"),b=c("%b %d"),C=c("%B"),k=c("%Y");function _(t){return(h(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:nn,s:na,S:iI,u:iD,U:iR,V:iq,w:iN,W:iP,x:null,X:null,y:iK,Y:iW,Z:iH,"%":ni},C={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:iY,e:iY,f:iQ,g:i7,G:ne,H:iG,I:iZ,j:iV,L:iX,m:iJ,M:i0,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:nn,s:na,S:i1,u:i2,U:i3,V:i6,w:i4,W:i8,x:null,X:null,y:i9,Y:nt,Z:nr,"%":ni},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=f.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:im,e:im,f:iw,g:id,G:iu,H:ib,I:ib,j:ix,L:i_,m:iy,M:iC,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:ig,Q:iT,s:iA,S:ik,u:is,U:il,V:ih,w:io,W:ic,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:id,Y:iu,Z:ip,"%":iv};function _(t,e){return function(r){var i,n,a,o=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=(i=r6(r4(a.y,0,1))).getUTCDay())>4||0===n?rj.ceil(i):rj(i),i=rF.offset(i,(a.V-1)*7),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(i=(n=(i=r5(r4(a.y,0,1))).getDay())>4||0===n?rI.ceil(i):rI(i),i=rL.offset(i,(a.V-1)*7),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),n="Z"in a?r6(r4(a.y,0,1)).getUTCDay():r5(r4(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(n+5)%7:a.w+7*a.U-(n+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,r6(a)):r5(a)}}function v(t,e,r,i){for(var n,a,o=0,s=e.length,l=r.length;o=l)return -1;if(37===(n=e.charCodeAt(o++))){if(!(a=k[(n=e.charAt(o++))in r8?e.charAt(o++):n])||(i=a(t,r,i))<0)return -1}else if(n!=r.charCodeAt(i++))return -1}return i}return b.x=_(r,b),b.X=_(i,b),b.c=_(e,b),C.x=_(r,C),C.X=_(i,C),C.c=_(e,C),{format:function(t){var e=_(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=_(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}({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"]})).format,tl.parse,tl.utcFormat,tl.utcParse;let nh=function(t){for(var e=t.length/6|0,r=Array(e),i=0;i=1?nC:t<=-1?-nC:Math.asin(t)}let nw=Math.PI,nv=2*nw,nT=nv-1e-6;function nA(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw Error(`invalid digits: ${t}`);if(e>15)return nA;let r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e1e-6){if(Math.abs(c*s-l*h)>1e-6&&n){let d=r-a,p=i-o,f=s*s+l*l,g=Math.sqrt(f),y=Math.sqrt(u),m=n*Math.tan((nw-Math.acos((f+u-(d*d+p*p))/(2*g*y)))/2),x=m/y,b=m/g;Math.abs(x-1)>1e-6&&this._append`L${t+x*h},${e+x*c}`,this._append`A${n},${n},0,0,${+(c*d>h*p)},${this._x1=t+b*s},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`}}arc(t,e,r,i,n,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw Error(`negative radius: ${r}`);let o=r*Math.cos(i),s=r*Math.sin(i),l=t+o,h=e+s,c=1^a,u=a?i-n:n-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&this._append`L${l},${h}`,r&&(u<0&&(u=u%nv+nv),u>nT?this._append`A${r},${r},0,1,${c},${t-o},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:u>1e-6&&this._append`A${r},${r},0,${+(u>=nw)},${c},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function nB(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{let t=Math.floor(r);if(!(t>=0))throw RangeError(`invalid digits: ${r}`);e=t}return t},()=>new nS(e)}function nM(t){return t.innerRadius}function nL(t){return t.outerRadius}function nF(t){return t.startAngle}function nE(t){return t.endAngle}function n$(t){return t&&t.padAngle}function nO(t,e,r,i,n,a,o){var s=t-r,l=e-i,h=(o?a:-a)/nx(s*s+l*l),c=h*l,u=-h*s,d=t+c,p=e+u,f=r+c,g=i+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,C=x*x+b*b,k=n-a,_=d*g-f*p,w=(b<0?-1:1)*nx(ng(0,k*k*C-_*_)),v=(_*b-x*w)/C,T=(-_*x-b*w)/C,A=(_*b+x*w)/C,S=(-_*x+b*w)/C,B=v-y,M=T-m,L=A-y,F=S-m;return B*B+M*M>L*L+F*F&&(v=A,T=S),{cx:v,cy:T,x01:-c,y01:-u,x11:v*(n/k-1),y11:T*(n/k-1)}}function nI(){var t=nM,e=nL,r=nu(0),i=null,n=nF,a=nE,o=n$,s=null,l=nB(h);function h(){var h,c,u=+t.apply(this,arguments),d=+e.apply(this,arguments),p=n.apply(this,arguments)-nC,f=a.apply(this,arguments)-nC,g=nd(f-p),y=f>p;if(s||(s=h=l()),d1e-12){if(g>nk-1e-12)s.moveTo(d*nf(p),d*nm(p)),s.arc(0,0,d,p,f,!y),u>1e-12&&(s.moveTo(u*nf(f),u*nm(f)),s.arc(0,0,u,f,p,y));else{var m,x,b=p,C=f,k=p,_=f,w=g,v=g,T=o.apply(this,arguments)/2,A=T>1e-12&&(i?+i.apply(this,arguments):nx(u*u+d*d)),S=ny(nd(d-u)/2,+r.apply(this,arguments)),B=S,M=S;if(A>1e-12){var L=n_(A/u*nm(T)),F=n_(A/d*nm(T));(w-=2*L)>1e-12?(L*=y?1:-1,k+=L,_-=L):(w=0,k=_=(p+f)/2),(v-=2*F)>1e-12?(F*=y?1:-1,b+=F,C-=F):(v=0,b=C=(p+f)/2)}var E=d*nf(b),$=d*nm(b),O=u*nf(_),I=u*nm(_);if(S>1e-12){var D,R=d*nf(C),z=d*nm(C),q=u*nf(k),N=u*nm(k);if(g1?0:P<-1?nb:Math.acos(P))/2),Y=nx(D[0]*D[0]+D[1]*D[1]);B=ny(S,(u-Y)/(H-1)),M=ny(S,(d-Y)/(H+1))}else B=M=0}}v>1e-12?M>1e-12?(m=nO(q,N,E,$,d,M,y),x=nO(R,z,O,I,d,M,y),s.moveTo(m.cx+m.x01,m.cy+m.y01),M1e-12&&w>1e-12?B>1e-12?(m=nO(O,I,R,z,u,-B,y),x=nO(E,$,q,N,u,-B,y),s.lineTo(m.cx+m.x01,m.cy+m.y01),Bt?1:e>=t?0:NaN}function nj(t){return t}function nW(){var t=nj,e=nK,r=null,i=nu(0),n=nu(nk),a=nu(0);function o(o){var s,l,h,c,u,d=(o=nD(o)).length,p=0,f=Array(d),g=Array(d),y=+i.apply(this,arguments),m=Math.min(nk,Math.max(-nk,n.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s0&&(p+=u);for(null!=e?f.sort(function(t,r){return e(g[t],g[r])}):null!=r&&f.sort(function(t,e){return r(o[t],o[e])}),s=0,h=p?(m-d*b)/p:0;s0?u*h:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:y,endAngle:c,padAngle:x};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:nu(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:nu(+t),o):i},o.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:nu(+t),o):n},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:nu(+t),o):a},o}function nU(){}function nH(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 nY(t){this._context=t}function nG(t){return new nY(t)}function nZ(t){this._context=t}function nV(t){return new nZ(t)}function nX(t){this._context=t}function nQ(t){return new nX(t)}nS.prototype,Array.prototype.slice,nR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}},nY.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:nH(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:nH(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},nZ.prototype={areaStart:nU,areaEnd:nU,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)}},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:nH(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},nX.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||0!==this._line&&3===this._point)&&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:nH(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class nJ{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function n0(t){return new nJ(t,!0)}function n1(t){return new nJ(t,!1)}function n2(t,e){this._basis=new nY(t),this._beta=e}n2.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,n=t[0],a=e[0],o=t[r]-n,s=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*o),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};let n3=function t(e){function r(t){return 1===e?new nY(t):new n2(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function n5(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 n6(t,e){this._context=t,this._k=(1-e)/6}n6.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:n5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:n5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let n4=function t(e){function r(t){return new n6(t,e)}return r.tension=function(e){return t(+e)},r}(0);function n8(t,e){this._context=t,this._k=(1-e)/6}n8.prototype={areaStart:nU,areaEnd:nU,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)}},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:n5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let n9=function t(e){function r(t){return new n8(t,e)}return r.tension=function(e){return t(+e)},r}(0);function n7(t,e){this._context=t,this._k=(1-e)/6}n7.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||0!==this._line&&3===this._point)&&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:n5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let at=function t(e){function r(t){return new n7(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ae(t,e,r){var i=t._x1,n=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){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>1e-12){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,n,a,o,t._x2,t._y2)}function ar(t,e){this._context=t,this._alpha=e}ar.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)}(this._line||0!==this._line&&1===this._point)&&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:ae(this,t,e)}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}};let ai=function t(e){function r(t){return e?new ar(t,e):new n6(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function an(t,e){this._context=t,this._alpha=e}an.prototype={areaStart:nU,areaEnd:nU,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)}},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:ae(this,t,e)}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}};let aa=function t(e){function r(t){return e?new an(t,e):new n8(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function ao(t,e){this._context=t,this._alpha=e}ao.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||0!==this._line&&3===this._point)&&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:ae(this,t,e)}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}};let as=function t(e){function r(t){return e?new ao(t,e):new n7(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function al(t){this._context=t}function ah(t){return new al(t)}function ac(t,e,r){var i=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*n+o*i)/(i+n)))||0}function au(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ad(t,e,r){var i=t._x0,n=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,n+s*e,a-s,o-s*r,a,o)}function ap(t){this._context=t}function af(t){this._context=new ag(t)}function ag(t){this._context=t}function ay(t){return new ap(t)}function am(t){return new af(t)}function ax(t){this._context=t}function ab(t){var e,r,i=t.length-1,n=Array(i),a=Array(i),o=Array(i);for(n[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)n[e]=(o[e]-n[e+1])/a[e];for(e=0,a[i-1]=(t[i]+n[i-1])/2;e=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)}}this._x=t,this._y=e}},aT.prototype={constructor:aT,scale:function(t){return 1===t?this:new aT(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new aT(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+")"}},new aT(1,0,0),aT.prototype},50373:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(81283),n=r(70688);let a=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}},o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){let t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){let t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){let t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){let t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){let t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){let t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},112:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(50373),n=r(70688);let a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;let e=t.match(a.re);if(!e)return;let r=e[1],n=parseInt(r,16),o=r.length,s=o%4==0,l=o>4,h=l?1:17,c=l?8:4,u=s?0:-1,d=l?255:15;return i.A.set({r:(n>>c*(u+3)&d)*h,g:(n>>c*(u+2)&d)*h,b:(n>>c*(u+1)&d)*h,a:s?(n&d)*h/255:1},t)},stringify:t=>{let{r:e,g:r,b:i,a}=t;return a<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}${n.Y[Math.round(255*a)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}`}};var o=r(81283);let s={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(s.hueRe);if(e){let[,t,r]=e;switch(r){case"grad":return o.A.channel.clamp.h(.9*parseFloat(t));case"rad":return o.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return o.A.channel.clamp.h(360*parseFloat(t))}}return o.A.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(104!==e&&72!==e)return;let r=t.match(s.re);if(!r)return;let[,n,a,l,h,c]=r;return i.A.set({h:s._hue2deg(n),s:o.A.channel.clamp.s(parseFloat(a)),l:o.A.channel.clamp.l(parseFloat(l)),a:h?o.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{let{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${o.A.lang.round(e)}, ${o.A.lang.round(r)}%, ${o.A.lang.round(i)}%, ${n})`:`hsl(${o.A.lang.round(e)}, ${o.A.lang.round(r)}%, ${o.A.lang.round(i)}%)`}},l={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=l.colors[t];if(e)return a.parse(e)},stringify:t=>{let e=a.stringify(t);for(let t in l.colors)if(l.colors[t]===e)return t}},h={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(114!==e&&82!==e)return;let r=t.match(h.re);if(!r)return;let[,n,a,s,l,c,u,d,p]=r;return i.A.set({r:o.A.channel.clamp.r(a?2.55*parseFloat(n):parseFloat(n)),g:o.A.channel.clamp.g(l?2.55*parseFloat(s):parseFloat(s)),b:o.A.channel.clamp.b(u?2.55*parseFloat(c):parseFloat(c)),a:d?o.A.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},t)},stringify:t=>{let{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${o.A.lang.round(e)}, ${o.A.lang.round(r)}, ${o.A.lang.round(i)}, ${o.A.lang.round(n)})`:`rgb(${o.A.lang.round(e)}, ${o.A.lang.round(r)}, ${o.A.lang.round(i)})`}},c={format:{keyword:l,hex:a,rgb:h,rgba:h,hsl:s,hsla:s},parse:t=>{if("string"!=typeof t)return t;let e=a.parse(t)||h.parse(t)||s.parse(t)||l.parse(t);if(e)return e;throw Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?s.stringify(t):!(t.a<1)&&Number.isInteger(t.r)&&Number.isInteger(t.g)&&Number.isInteger(t.b)?a.stringify(t):h.stringify(t)}},70688:(t,e,r)=>{"use strict";r.d(e,{Y:()=>n,Z:()=>a});var i=r(81283);let n={};for(let t=0;t<=255;t++)n[t]=i.A.unit.dec2hex(t);let a={ALL:0,RGB:1,HSL:2}},95433:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(81283),n=r(112);let a=(t,e,r)=>{let a=n.A.parse(t),o=a[e],s=i.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),n.A.stringify(a)}},91946:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(81283),n=r(112);let a=(t,e)=>{let r=n.A.parse(t);for(let t in e)r[t]=i.A.channel.clamp[t](e[t]);return n.A.stringify(r)}},57721:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(95433);let n=(t,e)=>(0,i.A)(t,"l",-e)},71725:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(81283),n=r(112);let a=t=>{let{r:e,g:r,b:a}=n.A.parse(t),o=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(a);return i.A.lang.round(o)},o=t=>a(t)>=.5,s=t=>!o(t)},68459:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(95433);let n=(t,e)=>(0,i.A)(t,"l",e)},18448:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(81283),n=r(50373),a=r(112),o=r(91946);let s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.A)(t,{a:e});let l=n.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return a.A.stringify(l)}},81283:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let i={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<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t,hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;let a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return 255*i.hue2rgb(o,a,t+1/3);case"g":return 255*i.hue2rgb(o,a,t);case"b":return 255*i.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{let n=Math.max(t/=255,e/=255,r/=255),a=Math.min(t,e,r),o=(n+a)/2;if("l"===i)return 100*o;if(n===a)return 0;let s=n-a;if("s"===i)return 100*(o>.5?s/(2-n-a):s/(n+a));switch(n){case t:return((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},36821:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(65866);let n=function(t,e){for(var r=t.length;r--;)if((0,i.A)(t[r][0],e))return r;return -1};var a=Array.prototype.splice;function o(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1},o.prototype.set=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};let s=o},40029:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(69954),n=r(29283);let a=(0,i.A)(n.A,"Map")},63713:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var i=(0,r(69954).A)(Object,"create"),n=Object.prototype.hasOwnProperty,a=Object.prototype.hasOwnProperty;function o(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>a});var i=r(69954),n=r(29283);let a=(0,i.A)(n.A,"Set")},72872:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(36821),n=r(40029),a=r(63713);function o(t){var e=this.__data__=new i.A(t);this.size=e.size}o.prototype.clear=function(){this.__data__=new i.A,this.size=0},o.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},o.prototype.get=function(t){return this.__data__.get(t)},o.prototype.has=function(t){return this.__data__.has(t)},o.prototype.set=function(t,e){var r=this.__data__;if(r instanceof i.A){var o=r.__data__;if(!n.A||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new a.A(o)}return r.set(t,e),this.size=r.size,this};let s=o},70807:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=r(29283).A.Symbol},12066:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=r(29283).A.Uint8Array},78373:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});let i=function(t,e){for(var r=-1,i=Array(t);++r{"use strict";r.d(e,{A:()=>o});var i=r(46402),n=r(65866),a=Object.prototype.hasOwnProperty;let o=function(t,e,r){var o=t[e];a.call(t,e)&&(0,n.A)(o,r)&&(void 0!==r||e in t)||(0,i.A)(t,e,r)}},46402:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(6977);let n=function(t,e,r){"__proto__"==e&&i.A?(0,i.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},33240:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t,e,r){for(var i=-1,n=Object(t),a=r(t),o=a.length;o--;){var s=a[++i];if(!1===e(n[s],s,n))break}return t}},36798:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var i=r(70807),n=Object.prototype,a=n.hasOwnProperty,o=n.toString,s=i.A?i.A.toStringTag:void 0;let l=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(t){}var n=o.call(t);return i&&(e?t[s]=r:delete t[s]),n};var h=Object.prototype.toString,c=i.A?i.A.toStringTag:void 0;let u=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?l(t):h.call(t)}},88601:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(85797),n=(0,r(7865).A)(Object.keys,Object),a=Object.prototype.hasOwnProperty;let o=function(t){if(!(0,i.A)(t))return n(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},48496:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(83910),n=r(20453),a=r(1207);let o=function(t,e){return(0,a.A)((0,n.A)(t,e,i.A),t+"")}},39131:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t){return function(e){return t(e)}}},29427:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(12066);let n=function(t){var e=new t.constructor(t.byteLength);return new i.A(e).set(new i.A(t)),e}},35012:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(29283),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===n?i.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;let l=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}},33379:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(29427);let n=function(t,e){var r=e?(0,i.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},61733:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r{"use strict";r.d(e,{A:()=>a});var i=r(84805),n=r(46402);let a=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++s{"use strict";r.d(e,{A:()=>a});var i=r(48496),n=r(50174);let a=function(t){return(0,i.A)(function(e,r){var i=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&(0,n.A)(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++i{"use strict";r.d(e,{A:()=>n});var i=r(69954);let n=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},67054:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i="object"==typeof global&&global&&global.Object===Object&&global},69954:(t,e,r)=>{"use strict";r.d(e,{A:()=>f});var i,n=r(42036),a=r(29283).A["__core-js_shared__"],o=(i=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",s=r(17731),l=r(63095),h=/^\[object .+?Constructor\]$/,c=Object.prototype,u=Function.prototype.toString,d=c.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let f=function(t,e){var r,i=null==t?void 0:t[e];return(r=i,(0,s.A)(r)&&(!o||!(o in r))&&((0,n.A)(r)?p:h).test((0,l.A)(r)))?i:void 0}},30481:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=(0,r(7865).A)(Object.getPrototypeOf,Object)},86073:(t,e,r)=>{"use strict";r.d(e,{A:()=>w});var i=r(69954),n=r(29283),a=(0,i.A)(n.A,"DataView"),o=r(40029),s=(0,i.A)(n.A,"Promise"),l=r(38779),h=(0,i.A)(n.A,"WeakMap"),c=r(36798),u=r(63095),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.A)(a),x=(0,u.A)(o.A),b=(0,u.A)(s),C=(0,u.A)(l.A),k=(0,u.A)(h),_=c.A;(a&&_(new a(new ArrayBuffer(1)))!=y||o.A&&_(new o.A)!=d||s&&_(s.resolve())!=p||l.A&&_(new l.A)!=f||h&&_(new h)!=g)&&(_=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,u.A)(r):"";if(i)switch(i){case m:return y;case x:return d;case b:return p;case C:return f;case k:return g}return e});let w=_},49364:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(17731),n=Object.create,a=function(){function t(){}return function(e){if(!(0,i.A)(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),o=r(30481),s=r(85797);let l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:a((0,o.A)(t))}},49031:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=/^(?:0|[1-9]\d*)$/;let n=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&t{"use strict";r.d(e,{A:()=>s});var i=r(65866),n=r(8860),a=r(49031),o=r(17731);let s=function(t,e,r){if(!(0,o.A)(r))return!1;var s=typeof e;return("number"==s?!!((0,n.A)(r)&&(0,a.A)(e,r.length)):"string"==s&&e in r)&&(0,i.A)(r[e],t)}},85797:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Object.prototype;let n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},60027:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(67054),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===n&&i.A.process;let s=function(){try{var t=a&&a.require&&a.require("util").types;if(t)return t;return o&&o.binding&&o.binding("util")}catch(t){}}()},7865:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t,e){return function(r){return t(e(r))}}},20453:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});let i=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var n=Math.max;let a=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=n(a.length-e,0),l=Array(s);++o{"use strict";r.d(e,{A:()=>a});var i=r(67054),n="object"==typeof self&&self&&self.Object===Object&&self;let a=i.A||n||Function("return this")()},1207:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i,n,a=r(39260),o=r(6977),s=r(83910),l=o.A?function(t,e){return(0,o.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,a.A)(e),writable:!0})}:s.A,h=Date.now;let c=(i=0,n=0,function(){var t=h(),e=16-(t-n);if(n=t,e>0){if(++i>=800)return arguments[0]}else i=0;return l.apply(void 0,arguments)})},63095:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Function.prototype.toString;let n=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},39260:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t){return function(){return t}}},65866:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t,e){return t===e||t!=t&&e!=e}},83910:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t){return t}},42908:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(36798),n=r(19196);let a=function(t){return(0,n.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;let h=a(function(){return arguments}())?a:function(t){return(0,n.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},28675:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=Array.isArray},8860:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(42036),n=r(13884);let a=function(t){return null!=t&&(0,n.A)(t.length)&&!(0,i.A)(t)}},11755:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(8860),n=r(19196);let a=function(t){return(0,n.A)(t)&&(0,i.A)(t)}},38990:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(29283),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===n?i.A.Buffer:void 0;let s=(o?o.isBuffer:void 0)||function(){return!1}},77083:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var i=r(88601),n=r(86073),a=r(42908),o=r(28675),s=r(8860),l=r(38990),h=r(85797),c=r(75216),u=Object.prototype.hasOwnProperty;let d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,o.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,c.A)(t)||(0,a.A)(t)))return!t.length;var e=(0,n.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,h.A)(t))return!(0,i.A)(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},42036:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(36798),n=r(17731);let a=function(t){if(!(0,n.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},13884:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},17731:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},19196:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});let i=function(t){return null!=t&&"object"==typeof t}},75216:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(36798),n=r(13884),a=r(19196),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var s=r(39131),l=r(60027),h=l.A&&l.A.isTypedArray;let c=h?(0,s.A)(h):function(t){return(0,a.A)(t)&&(0,n.A)(t.length)&&!!o[(0,i.A)(t)]}},97937:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(78373),n=r(17731),a=r(85797);let o=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var s=Object.prototype.hasOwnProperty;let l=function(t){if(!(0,n.A)(t))return o(t);var e=(0,a.A)(t),r=[];for(var i in t)"constructor"==i&&(e||!s.call(t,i))||r.push(i);return r};var h=r(8860);let c=function(t){return(0,h.A)(t)?(0,i.A)(t,!0):l(t)}},12854:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(63713);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(n.Cache||i.A),r}n.Cache=i.A;let a=n},86023:(t,e,r)=>{"use strict";r.d(e,{A:()=>E});var i=r(72872),n=r(46402),a=r(65866);let o=function(t,e,r){(void 0===r||(0,a.A)(t[e],r))&&(void 0!==r||e in t)||(0,n.A)(t,e,r)};var s=r(33240),l=r(35012),h=r(33379),c=r(61733),u=r(49364),d=r(42908),p=r(28675),f=r(11755),g=r(38990),y=r(42036),m=r(17731),x=r(36798),b=r(30481),C=r(19196),k=Object.prototype,_=Function.prototype.toString,w=k.hasOwnProperty,v=_.call(Object);let T=function(t){if(!(0,C.A)(t)||"[object Object]"!=(0,x.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=w.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==v};var A=r(75216);let S=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var B=r(68785),M=r(97937);let L=function(t,e,r,i,n,a,s){var x=S(t,r),b=S(e,r),C=s.get(b);if(C){o(t,r,C);return}var k=a?a(x,b,r+"",t,e,s):void 0,_=void 0===k;if(_){var w=(0,p.A)(b),v=!w&&(0,g.A)(b),L=!w&&!v&&(0,A.A)(b);(k=b,w||v||L)?(0,p.A)(x)?k=x:(0,f.A)(x)?k=(0,c.A)(x):v?(_=!1,k=(0,l.A)(b,!0)):L?(_=!1,k=(0,h.A)(b,!0)):k=[]:T(b)||(0,d.A)(b)?(k=x,(0,d.A)(x))?k=(0,B.A)(x,(0,M.A)(x)):(!(0,m.A)(x)||(0,y.A)(x))&&(k=(0,u.A)(b)):_=!1}_&&(s.set(b,k),n(k,b,i,a,s),s.delete(b)),o(t,r,k)},F=function t(e,r,n,a,l){e!==r&&(0,s.A)(r,function(s,h){if(l||(l=new i.A),(0,m.A)(s))L(e,r,h,n,t,a,l);else{var c=a?a(S(e,h),s,h+"",e,r,l):void 0;void 0===c&&(c=s),o(e,h,c)}},M.A)},E=(0,r(53949).A)(function(t,e,r){F(t,e,r)})},16470:(t,e,r)=>{"use strict";r.d(e,{O:()=>n,R:()=>l});var i=r(72912),n=(0,i.K2)(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),a={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function o(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);let[r,i]=[t.x,t.y],[n,a]=[e.x,e.y],o=n-r,l=a-i;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}(0,i.K2)(o,"calculateDeltaAndAngle");var s=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),l=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let n=0;if(0===r&&Object.hasOwn(a,t.arrowTypeStart)){let{angle:e,deltaX:r}=o(i[0],i[1]);n=a[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){let{angle:e,deltaX:r}=o(i[i.length-1],i[i.length-2]);n=a[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return s(e).x+n},"x"),y:(0,i.K2)(function(e,r,i){let n=0;if(0===r&&Object.hasOwn(a,t.arrowTypeStart)){let{angle:e,deltaY:r}=o(i[0],i[1]);n=a[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){let{angle:e,deltaY:r}=o(i[i.length-1],i[i.length-2]);n=a[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return s(e).y+n},"y")}),"getLineFunctionsWithOffset")},67027:(t,e,r)=>{"use strict";r.d(e,{$C:()=>B,$t:()=>j,C4:()=>U,I5:()=>K,Ib:()=>y,Sm:()=>H,Un:()=>D,_K:()=>W,bH:()=>$,dq:()=>N,pe:()=>h,rY:()=>Y,ru:()=>I,sM:()=>A,vU:()=>f,yT:()=>L});var i,n=r(72912),a=r(31546),o=r(89601),s=r(12854),l=r(86023),h="\u200B",c={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,d=(0,n.K2)(function(t,e){let r=p(t,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let t=r.map(t=>t.args);(0,n.$i)(t),i=(0,n.hH)(i,[...t])}else i=r.args;if(!i)return;let a=(0,n.Ch)(t,e),o="config";return void 0!==i[o]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),p=(0,n.K2)(function(t,e=null){try{let r;let i=RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),n.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);let a=[];for(;null!==(r=n.DB.exec(t));)if(r.index===n.DB.lastIndex&&n.DB.lastIndex++,r&&!e||e&&r[1]?.match(e)||e&&r[2]?.match(e)){let t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;a.push({type:t,args:e})}if(0===a.length)return{type:t,args:null};return 1===a.length?a[0]:a}catch(r){return n.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),f=(0,n.K2)(function(t){return t.replace(n.DB,"")},"removeDirectives"),g=(0,n.K2)(function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return -1},"isSubstringInArray");function y(t,e){return t?c[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??e:e}function m(t,e){let r=t.trim();return r?"loose"!==e.securityLevel?(0,a.J)(r):r:void 0}(0,n.K2)(y,"interpolateToCurve"),(0,n.K2)(m,"formatUrl");var x=(0,n.K2)((t,...e)=>{let r=t.split("."),i=r.length-1,a=r[i],o=window;for(let e=0;e{r+=b(t,e),e=t}),w(t,r/2)}function k(t){return 1===t.length?t[0]:C(t)}(0,n.K2)(b,"distance"),(0,n.K2)(C,"traverseEdge"),(0,n.K2)(k,"calcLabelPosition");var _=(0,n.K2)((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),w=(0,n.K2)((t,e)=>{let r;let i=e;for(let e of t){if(r){let t=b(e,r);if(t=1)return{x:e.x,y:e.y};if(n>0&&n<1)return{x:_((1-n)*r.x+n*e.x,5),y:_((1-n)*r.y+n*e.y,5)}}}r=e}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),v=(0,n.K2)((t,e,r)=>{n.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=w(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+i.x)/2,s.y=-Math.cos(o)*a+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function T(t,e,r){let i=structuredClone(r);n.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();let a=w(i,25+t),o=10+.5*t,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}function A(t){let e="",r="";for(let i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K2)(T,"calcTerminalLabelPosition"),(0,n.K2)(A,"getStylesFromArray");var S=0,B=(0,n.K2)(()=>(S++,"id-"+Math.random().toString(36).substr(2,12)+"-"+S),"generateId");function M(t){let e="",r="0123456789abcdef",i=r.length;for(let n=0;nM(t.length),"random"),F=(0,n.K2)(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,text:""}},"getTextObj"),E=(0,n.K2)(function(t,e){let r=e.text.replace(n.Y2.lineBreakRegex," "),[,i]=K(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);let o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),$=(0,s.A)((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),n.Y2.lineBreakRegex.test(t)))return t;let i=t.split(" ").filter(Boolean),a=[],o="";return i.forEach((t,n)=>{let s=D(`${t} `,r),l=D(o,r);if(s>e){let{hyphenatedStrings:i,remainingWord:n}=O(t,e,"-",r);a.push(o,...i),o=n}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");n+1===i.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),O=(0,s.A)((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let n=[...t],a=[],o="";return n.forEach((t,s)=>{let l=`${o}${t}`;if(D(l,i)>=e){let t=n.length===s+1,e=`${l}${r}`;a.push(t?l:e),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function I(t,e){return R(t,e).height}function D(t,e){return R(t,e).width}(0,n.K2)(I,"calculateTextHeight"),(0,n.K2)(D,"calculateTextWidth");var R=(0,s.A)((t,e)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};let[,s]=K(r),l=t.split(n.Y2.lineBreakRegex),c=[],u=(0,o.Ltv)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let d=u.append("svg");for(let t of["sans-serif",i]){let e=0,r={width:0,height:0,lineHeight:0};for(let i of l){let n=F();n.text=i||h;let o=E(d,n).style("font-size",s).style("font-weight",a).style("font-family",t),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}c.push(r)}d.remove();let p=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[p]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),z=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},q=(0,n.K2)(function(t){return i=i||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),i.innerHTML=t,unescape(i.textContent)},"entityDecode");function N(t){return"str"in t}(0,n.K2)(N,"isDetailedError");var P=(0,n.K2)((t,e,r,i)=>{if(!i)return;let n=t.node()?.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),K=(0,n.K2)(t=>{if("number"==typeof t)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]},"parseFontSize");function j(t,e){return(0,l.A)({},t,e)}(0,n.K2)(j,"cleanAndMerge");var W={assignWithDepth:n.hH,wrapLabel:$,calculateTextHeight:I,calculateTextWidth:D,calculateTextDimensions:R,cleanAndMerge:j,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:y,calcLabelPosition:k,calcCardinalityPosition:v,calcTerminalLabelPosition:T,formatUrl:m,getStylesFromArray:A,generateId:B,random:L,runFunc:x,entityDecode:q,insertTitle:P,parseFontSize:K,InitIDGenerator:z},U=(0,n.K2)(function(t){let e=t;return(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){let e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\uFB02\xb0\xb0"+e+"\xb6\xdf":"\uFB02\xb0"+e+"\xb6\xdf"})},"encodeEntities"),H=(0,n.K2)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Y=(0,n.K2)((t,e,{counter:r=0,prefix:i,suffix:n})=>`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId")},27923:(t,e,r)=>{"use strict";r.d(e,{W6:()=>tB,GZ:()=>tE,hE:()=>tF});var i=r(67027),n=r(72912),a=r(89601);function o(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let s=o(),l=/[&<>"']/,h=RegExp(l.source,"g"),c=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u=RegExp(c.source,"g"),d={"&":"&","<":"<",">":">",'"':""","'":"'"},p=t=>d[t];function f(t,e){if(e){if(l.test(t))return t.replace(h,p)}else if(c.test(t))return t.replace(u,p);return t}let g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,y=/(^|[^\[])\^/g;function m(t,e){let r="string"==typeof t?t:t.source;e=e||"";let i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(y,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}function x(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}let b={exec:()=>null};function C(t,e){let r=t.replace(/\|/g,(t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(/ \|/),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e){if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:k(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e){let r=t.match(/^(\s+)(?:```)/);if(null===r)return e;let i=r[1];return e.split("\n").map(t=>{let e=t.match(/^\s+/);if(null===e)return t;let[r]=e;return r.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){let e=k(t,"#");this.options.pedantic?t=e.trim():(!e||/ $/.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:k(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=k(e[0],"\n").split("\n"),r="",i="",n=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e/.test(t[e]))o.push(t[e]),a=!0;else if(a)break;else o.push(t[e]);t=t.slice(e);let s=o.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r} ${s}`:s,i=i?`${i} ${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=h,0===t.length)break;let c=n[n.length-1];if(c?.type==="code")break;if(c?.type==="blockquote"){let e=c.raw+"\n"+t.join("\n"),a=this.blockquote(e);n[n.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,i=i.substring(0,i.length-c.text.length)+a.text;break}if(c?.type==="list"){let e=c.raw+"\n"+t.join("\n"),a=this.list(e);n[n.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,i=i.substring(0,i.length-c.raw.length)+a.raw,t=e.substring(n[n.length-1].raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),o=!1;for(;t;){let r,i=!1,s="",l="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;s=e[0],t=t.substring(s.length);let h=e[2].split("\n",1)[0].replace(/^\t+/,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],u=!h.trim(),d=0;if(this.options.pedantic?(d=2,l=h.trimStart()):u?d=e[1].length+1:(d=(d=e[2].search(/[^ ]/))>4?1:d,l=h.slice(d),d+=e[1].length),u&&/^ *$/.test(c)&&(s+=c+"\n",t=t.substring(c.length+1),i=!0),!i){let e=RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),r=RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),n=RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;t;){let a=t.split("\n",1)[0];if(c=a,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c)||n.test(c)||e.test(c)||r.test(t))break;if(c.search(/[^ ]/)>=d||!c.trim())l+="\n"+c.slice(d);else{if(u||h.search(/[^ ]/)>=4||i.test(h)||n.test(h)||r.test(h))break;l+="\n"+c}u||c.trim()||(u=!0),s+=a+"\n",t=t.substring(a.length+1),h=c.slice(d)}}!n.loose&&(o?n.loose=!0:/\n *\n *$/.test(s)&&(o=!0));let p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l))&&(r="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,"")),n.items.push({type:"list_item",raw:s,task:!!p,checked:r,loose:!1,text:l,tokens:[]}),n.raw+=s}n.items[n.items.length-1].raw=n.items[n.items.length-1].raw.trimEnd(),n.items[n.items.length-1].text=n.items[n.items.length-1].text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t"space"===t.type),r=e.length>0&&e.some(t=>/\n.*\n/.test(t.raw));n.loose=r}if(n.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;let r=C(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),n=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)/^ *-+: *$/.test(t)?a.align.push("right"):/^ *:-+: *$/.test(t)?a.align.push("center"):/^ *:-+ *$/.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:f(e[1])}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;let e=k(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(")"))return -1;let r=0;for(let e=0;e-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^$/.test(t)?r.slice(1):r.slice(1,-1)),_(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return _(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))&&(!(i[1]||i[2])||!r||this.rules.inline.punctuation.exec(r))){let r=[...i[0]].length-1,n,a,o=r,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(!(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6]))continue;if(a=[...n].length,i[3]||i[4]){o+=a;continue}if((i[5]||i[6])&&r%3&&!((r+a)%3)){s+=a;continue}if((o-=a)>0)continue;a=Math.min(a,a+o+s);let e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+a);if(Math.min(r,a)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," "),r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=f(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return r="@"===e[2]?"mailto:"+(t=f(e[1])):t=f(e[1]),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])r="mailto:"+(t=f(e[0]));else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0])t=f(e[0]),r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:f(e[0]),{type:"text",raw:e[0],text:t}}}}let v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,T=/(?:[*+-]|\d{1,9}[.)])/,A=m(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,T).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),S=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,B=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M=m(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",B).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),L=m(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,T).getRegex(),F="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",E=/|$))/,$=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",E).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O=m(S).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),I={blockquote:m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",O).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:M,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:$,lheading:A,list:L,newline:/^(?: *(?:\n|$))+/,paragraph:O,table:b,text:/^[^\n]+/},D=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),R={...I,table:D,paragraph:m(S).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",D).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()},z={...I,html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",E).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:b,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(S).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",A).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},q=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,N=/^( {2,}|\\)\n(?!\s*$)/,P="\\p{P}\\p{S}",K=m(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,P).getRegex(),j=m(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,P).getRegex(),W=m("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,P).getRegex(),U=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,P).getRegex(),H=m(/\\([punct])/,"gu").replace(/punct/g,P).getRegex(),Y=m(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),G=m(E).replace("(?:-->|$)","-->").getRegex(),Z=m("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",G).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X=m(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q=m(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",B).getRegex(),J=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",B).getRegex(),tt=m("reflink|nolink(?!\\()","g").replace("reflink",Q).replace("nolink",J).getRegex(),te={_backpedal:b,anyPunctuation:H,autolink:Y,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:N,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:b,emStrongLDelim:j,emStrongRDelimAst:W,emStrongRDelimUnd:U,escape:q,link:X,nolink:J,punctuation:K,reflink:Q,reflinkSearch:tt,tag:Z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\e+" ".repeat(r.length));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))){if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length),(n=e[e.length-1])&&("paragraph"===n.type||"text"===n.type)?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i);continue}if((i=this.tokenizer.fences(t))||(i=this.tokenizer.heading(t))||(i=this.tokenizer.hr(t))||(i=this.tokenizer.blockquote(t))||(i=this.tokenizer.list(t))||(i=this.tokenizer.html(t))){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length),(n=e[e.length-1])&&("paragraph"===n.type||"text"===n.type)?(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if((i=this.tokenizer.table(t))||(i=this.tokenizer.lheading(t))){t=t.substring(i.raw.length),e.push(i);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{"number"==typeof(e=t.call({lexer:this},i))&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(a=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){n=e[e.length-1],r&&n?.type==="paragraph"?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i),r=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length),(n=e[e.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,n,a,o,s;let l=t;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(o||(s=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),(i=e[e.length-1])&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),(i=e[e.length-1])&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if((r=this.tokenizer.emStrong(t,l,s))||(r=this.tokenizer.codespan(t))||(r=this.tokenizer.br(t))||(r=this.tokenizer.del(t))||(r=this.tokenizer.autolink(t))||!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}if(n=t,this.options.extensions&&this.options.extensions.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{"number"==typeof(e=t.call({lexer:this},i))&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),o=!0,(i=e[e.length-1])&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw Error(e)}}return e}}class tl{options;parser;constructor(t){this.options=t||s}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(/^\S*/)?.[0],n=t.replace(/\n$/,"")+"\n";return i?'
'+(r?n:f(n,!0))+"
\n":"
"+(r?n:f(n,!0))+"
\n"}blockquote({tokens:t}){let e=this.parser.parse(t);return`
${e}
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return"
\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e\n"+i+"\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    `}table(t){let e="",r="";for(let e=0;e${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return` ${t} `}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` `}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=x(t);if(null===n)return i;let a='
    "}image({href:t,title:e,text:r}){let i=x(t);if(null===i)return r;t=i;let n=`${r}{let n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];r?e.renderers[t.name]=function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new tl(this.defaults);for(let r in t.renderer){if(!(r in e))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=t.renderer[r];t.useNewRenderer||(i=this.#e(i,r,e));let n=e[r];e[r]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=n.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new w(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=t.tokenizer[r],n=e[r];e[r]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new tu;for(let r in t.hooks){if(!(r in e))throw Error(`hook '${r}' does not exist`);if("options"===r)continue;let i=t.hooks[r],n=e[r];tu.passThroughHooks.has(r)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then(t=>n.call(e,t));let r=i.call(e,t);return n.call(e,r)}:e[r]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=n.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}#e(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,r.parser.parseInline(i.tokens,r.parser.textRenderer).replace(g,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",n="";for(let t=0;t0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,a),o+=this.listitem({type:"list_item",raw:s,text:s,task:n,checked:!!i,loose:a,tokens:e.tokens})}return t.call(this,o,i,n)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"del":case"em":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"text":case"codespan":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ts.lex(t,e??this.defaults)}parser(t,e){return tc.parse(t,e??this.defaults)}#t(t,e){return(r,i)=>{let n={...i},a={...this.defaults,...n};!0===this.defaults.async&&!1===n.async&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);let o=this.#r(!!a.silent,!!a.async);if(null==r)return o(Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(e=>t(e,a)).then(t=>a.hooks?a.hooks.processAllTokens(t):t).then(t=>a.walkTokens?Promise.all(this.walkTokens(t,a.walkTokens)).then(()=>t):t).then(t=>e(t,a)).then(t=>a.hooks?a.hooks.postprocess(t):t).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let i=t(r,a);a.hooks&&(i=a.hooks.processAllTokens(i)),a.walkTokens&&this.walkTokens(i,a.walkTokens);let n=e(i,a);return a.hooks&&(n=a.hooks.postprocess(n)),n}catch(t){return o(t)}}}#r(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+f(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}}let tp=new td;function tf(t,e){return tp.parse(t,e)}tf.options=tf.setOptions=function(t){return tp.setOptions(t),tf.defaults=tp.defaults,s=tf.defaults,tf},tf.getDefaults=o,tf.defaults=s,tf.use=function(...t){return tp.use(...t),tf.defaults=tp.defaults,s=tf.defaults,tf},tf.walkTokens=function(t,e){return tp.walkTokens(t,e)},tf.parseInline=tp.parseInline,tf.Parser=tc,tf.parser=tc.parse,tf.Renderer=tl,tf.TextRenderer=th,tf.Lexer=ts,tf.lexer=ts.lex,tf.Tokenizer=w,tf.Hooks=tu,tf.parse=tf,tf.options,tf.setOptions,tf.use,tf.walkTokens,tf.parseInline,tc.parse,ts.lex;var tg=r(97597);function ty(t,{markdownAutoWrap:e}){let r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),i=(0,tg.T)(r);return!1===e?i.replace(/ /g," "):i}function tm(t,e={}){let r=ty(t,e),i=tf.lexer(r),a=[[]],o=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,a.push([])),t.split(" ").forEach(t=>{t&&a[o].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&a[o].push({content:t.text,type:"normal"})}return(0,n.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&a[o].push({content:t.text,type:"normal"})}),a}function tx(t,{markdownAutoWrap:e}={}){let r=tf.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(i).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:`Unsupported markdown: ${t.type}`}return(0,n.K2)(i,"output"),r.map(i).join("")}function tb(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(t=>t.segment):[...t]}function tC(t,e){return tk(t,[],tb(e.content),e.type)}function tk(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];let[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?tk(t,o,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function t_(t,e){if(t.some(({content:t})=>t.includes("\n")))throw Error("splitLineToFitWidth does not support newlines in the line");return tw(t,e)}function tw(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==n&&o.push({content:n,type:"normal"}),o.push(a),e(o))return tw(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){let[i,n]=tC(e,a);r.push([i]),n.content&&t.unshift(n)}return tw(t,e,r)}function tv(t,e){e&&t.attr("style",e)}async function tT(t,e,r,i,a=!1){let o=t.append("foreignObject");o.attr("width",`${10*r}px`),o.attr("height",`${10*r}px`);let s=o.append("xhtml:div"),l=e.label;e.label&&(0,n.Wi)(e.label)&&(l=await (0,n.VJ)(e.label.replace(n.Y2.lineBreakRegex,"\n"),(0,n.D7)()));let h=e.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(l),tv(c,e.labelStyle),c.attr("class",`${h} ${i}`),tv(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),o.node()}function tA(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function tS(t,e,r){let i=t.append("text"),n=tA(i,1,e);tL(n,r);let a=n.node().getComputedTextLength();return i.remove(),a}function tB(t,e,r){let i=t.append("text"),n=tA(i,1,e);tL(n,[{content:r,type:"normal"}]);let a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function tM(t,e,r,i=!1){let a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1"),l=0;for(let e of r){let r=(0,n.K2)(e=>tS(a,1.1,e)<=t,"checkWidth");for(let t of r(e)?[e]:t_(e,r))tL(tA(s,l,1.1),t),l++}if(!i)return s.node();{let t=s.node().getBBox();return o.attr("x",-2).attr("y",-2).attr("width",t.width+4).attr("height",t.height+4),a.node()}}function tL(t,e){t.text(""),e.forEach((e,r)=>{let i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)})}function tF(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}(0,n.K2)(ty,"preprocessMarkdown"),(0,n.K2)(tm,"markdownToLines"),(0,n.K2)(tx,"markdownToHTML"),(0,n.K2)(tb,"splitTextToChars"),(0,n.K2)(tC,"splitWordToFitWidth"),(0,n.K2)(tk,"splitWordToFitWidthRecursion"),(0,n.K2)(t_,"splitLineToFitWidth"),(0,n.K2)(tw,"splitLineToFitWidthRecursion"),(0,n.K2)(tv,"applyStyle"),(0,n.K2)(tT,"addHtmlSpan"),(0,n.K2)(tA,"createTspan"),(0,n.K2)(tS,"computeWidthOfText"),(0,n.K2)(tB,"computeDimensionOfText"),(0,n.K2)(tM,"createFormattedText"),(0,n.K2)(tL,"updateTextContentAndStyles"),(0,n.K2)(tF,"replaceIconSubstring");var tE=(0,n.K2)(async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:h=!0,width:c=200,addSvgBackground:u=!1}={},d)=>{if(n.Rm.debug("XYZ createText",e,r,o,s,l,h,"addSvgBackground: ",u),l){let a=tx(e,d),o=tF((0,i.Sm)(a)),l=e.replace(/\\\\/g,"\\"),p={isNode:h,label:(0,n.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await tT(t,p,c,s,u)}{let i=tM(c,t,tm(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,a.Ltv)(i).attr("style",t)}else{let t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,a.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));let e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,a.Ltv)(i).select("text").attr("style",e)}return i}},"createText")},90492:(t,e,r)=>{"use strict";r.d(e,{WY:()=>A,pC:()=>v,Gc:()=>k});var i=r(72912);let n=/^[a-z0-9]+(-[a-z0-9]+)*$/,a=(t,e,r,i="")=>{let n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){let t=n.pop(),r=n.pop(),a={provider:n.length>0?n[0]:i,prefix:r,name:t};return e&&!o(a)?null:a}let a=n[0],s=a.split("-");if(s.length>1){let t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(r&&""===i){let t={provider:i,prefix:"",name:a};return e&&!o(t,r)?null:t}return null},o=(t,e)=>!!t&&!!((""===t.provider||t.provider.match(n))&&(e&&""===t.prefix||t.prefix.match(n))&&t.name.match(n)),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function u(t,e){let r=function(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(let i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function d(t,e,r){let i=t.icons,n=t.aliases||Object.create(null),a={};function o(t){a=u(i[t]||n[t],a)}return o(e),r.forEach(o),u(t,a)}let p=Object.freeze({...Object.freeze({width:null,height:null}),...l}),f=/(-?[0-9.]*[0-9]+[0-9.]*)/g,g=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;let i=t.split(f);if(null===i||!i.length)return t;let n=[],a=i.shift(),o=g.test(a);for(;;){if(o){let t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*r)/r)}else n.push(a);if(void 0===(a=i.shift()))return n.join("");o=!o}}let m=t=>"unset"===t||"undefined"===t||"none"===t,x=/\sid="(\S+)"/g,b="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),C=0;var k={body:'?',height:80,width:80},_=new Map,w=new Map,v=(0,i.K2)(t=>{for(let e of t){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(i.Rm.debug("Registering icon pack:",e.name),"loader"in e)w.set(e.name,e.loader);else if("icons"in e)_.set(e.name,e.icons);else throw i.Rm.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),T=(0,i.K2)(async(t,e)=>{let r=a(t,!0,void 0!==e);if(!r)throw Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw Error(`Icon name must contain a prefix: ${t}`);let o=_.get(n);if(!o){let t=w.get(n);if(!t)throw Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:n},_.set(n,o)}catch(t){throw i.Rm.error(t),Error(`Failed to load icon set: ${r.prefix}`)}}let s=function(t,e){if(t.icons[e])return d(t,e,[]);let r=function(t,e){let r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;let r=i[e]&&i[e].parent,a=r&&t(r);a&&(n[e]=[r].concat(a))}return n[e]}),n}(t,[e])[e];return r?d(t,e,r):null}(o,r.name);if(!s)throw Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),A=(0,i.K2)(async(t,e)=>{let r;try{r=await T(t,e?.fallbackPrefix)}catch(t){i.Rm.error(t),r=k}let n=function(t,e){let r,i;let n={...h,...t},a={...p,...e},o={left:n.left,top:n.top,width:n.width,height:n.height},s=n.body;[n,a].forEach(t=>{let e;let r=[],i=t.hFlip,n=t.vFlip,a=t.rotate;switch(i?n?a+=2:(r.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),r.push("scale(-1 1)"),o.top=o.left=0):n&&(r.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),r.push("scale(1 -1)"),o.top=o.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4){case 1:r.unshift("rotate(90 "+(e=o.height/2+o.top).toString()+" "+e.toString()+")");break;case 2:r.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:r.unshift("rotate(-90 "+(e=o.width/2+o.left).toString()+" "+e.toString()+")")}a%2==1&&(o.left!==o.top&&(e=o.left,o.left=o.top,o.top=e),o.width!==o.height&&(e=o.width,o.width=o.height,o.height=e)),r.length&&(s=function(t,e,r){var i,n;let a=function(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;i>=0;){let n=t.indexOf(">",i),a=t.indexOf("",a);if(-1===o)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return i=a.defs,n=e+a.content+r,i?""+i+""+n:n}(s,'',""))});let l=a.width,c=a.height,u=o.width,d=o.height;null===l?r=y(i=null===c?"1em":"auto"===c?d:c,u/d):(r="auto"===l?u:l,i=null===c?y(r,d/u):"auto"===c?d:c);let f={},g=(t,e)=>{m(e)||(f[t]=e.toString())};g("width",r),g("height",i);let x=[o.left,o.top,u,d];return f.viewBox=x.join(" "),{attributes:f,viewBox:x,body:s}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let t in e)r+=" "+t+'="'+e[t]+'"';return'"+t+""}(function(t,e=b){let r;let i=[];for(;r=x.exec(t);)i.push(r[1]);if(!i.length)return t;let n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return i.forEach(r=>{let i="function"==typeof e?e(r):e+(C++).toString(),a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+i+n+"$3")}),t=t.replace(RegExp(n,"g"),"")}(n.body),n.attributes)},"getIconSVG")},93491:(t,e,r)=>{"use strict";r.d(e,{D:()=>a});var i=r(72912),n=r(89601),a=(0,i.K2)(t=>{let{securityLevel:e}=(0,i.D7)(),r=(0,n.Ltv)("body");if("sandbox"===e){let e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},72912:(t,e,r)=>{"use strict";let i;r.d(e,{C0:()=>A,VA:()=>x,K2:()=>m,xA:()=>td,hH:()=>$,Dl:()=>tP,IU:()=>t3,Wt:()=>tQ,Y2:()=>tj,a$:()=>tH,sb:()=>tt,ME:()=>er,UI:()=>X,Ch:()=>B,mW:()=>S,DB:()=>v,_3:()=>tF,EJ:()=>w,m7:()=>t8,iN:()=>t6,zj:()=>tc,D7:()=>et,Gs:()=>el,J$:()=>F,ab:()=>t7,Q2:()=>tl,P$:()=>K,Wi:()=>tN,H1:()=>tx,Rm:()=>C,QO:()=>tO,Js:()=>es,Xd:()=>M,VJ:()=>tK,cL:()=>tp,$i:()=>Q,jZ:()=>tv,wZ:()=>to,EI:()=>t4,SV:()=>t5,Nk:()=>th,XV:()=>ee,ke:()=>t9,He:()=>k,UU:()=>ta,ot:()=>tY,mj:()=>en,tM:()=>tX,H$:()=>H,B6:()=>ts});var n,a=r(95285),o=r(112),s=r(91946);let l=(t,e)=>{let r=o.A.parse(t),i={};for(let t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,s.A)(t,i)};var h=r(18448);let c=(t,e,r=50)=>{let{r:i,g:n,b:a,a:s}=o.A.parse(t),{r:l,g:c,b:u,a:d}=o.A.parse(e),p=r/100,f=2*p-1,g=s-d,y=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,m=1-y;return(0,h.A)(i*y+l*m,n*y+c*m,a*y+u*m,s*p+d*(1-p))},u=(t,e=100)=>{let r=o.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,c(r,t,e)};var d=r(57721),p=r(68459),f=r(71725),g=r(31234),y=Object.defineProperty,m=(t,e)=>y(t,"name",{value:e,configurable:!0}),x=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},b={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},C={trace:m((...t)=>{},"trace"),debug:m((...t)=>{},"debug"),info:m((...t)=>{},"info"),warn:m((...t)=>{},"warn"),error:m((...t)=>{},"error"),fatal:m((...t)=>{},"fatal")},k=m(function(t="fatal"){let e=b.fatal;"string"==typeof t?t.toLowerCase() in b&&(e=b[t]):"number"==typeof t&&(e=t),C.trace=()=>{},C.debug=()=>{},C.info=()=>{},C.warn=()=>{},C.error=()=>{},C.fatal=()=>{},e<=b.fatal&&(C.fatal=console.error?console.error.bind(console,_("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",_("FATAL"))),e<=b.error&&(C.error=console.error?console.error.bind(console,_("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",_("ERROR"))),e<=b.warn&&(C.warn=console.warn?console.warn.bind(console,_("WARN"),"color: orange"):console.log.bind(console,`\x1b[33m`,_("WARN"))),e<=b.info&&(C.info=console.info?console.info.bind(console,_("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",_("INFO"))),e<=b.debug&&(C.debug=console.debug?console.debug.bind(console,_("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",_("DEBUG"))),e<=b.trace&&(C.trace=console.debug?console.debug.bind(console,_("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",_("TRACE")))},"setLogLevel"),_=m(t=>{let e=a().format("ss.SSS");return`%c${e} : ${t} : `},"format"),w=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,v=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,T=/\s*%%.*\n/gm,A=class extends Error{static{m(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},S={},B=m(function(t,e){for(let[r,{detector:i}]of(t=t.replace(w,"").replace(v,"").replace(T,"\n"),Object.entries(S)))if(i(t,e))return r;throw new A(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),M=m((...t)=>{for(let{id:e,detector:r,loader:i}of t)L(e,r,i)},"registerLazyLoadedDiagrams"),L=m((t,e,r)=>{S[t]&&C.warn(`Detector with key ${t} already exists. Overwriting.`),S[t]={detector:e,loader:r},C.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),F=m(t=>S[t].loader,"getDiagramLoader"),E=m((t,e,{depth:r=2,clobber:i=!1}={})=>{let n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>E(t,e,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(n=>{"object"==typeof e[n]&&(void 0===t[n]||"object"==typeof t[n])?(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=E(t[n],e[n],{depth:r-1,clobber:i})):(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n])}),t)},"assignWithDepth"),$=E,O="#ffffff",I="#f2f2f2",D=m((t,e)=>e?l(t,{s:-40,l:10}):l(t,{s:-40,l:-10}),"mkBorder"),R=class{static{m(this,"Theme")}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||l(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||l(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||D(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||D(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||D(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||u(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||u(this.tertiaryColor),this.lineColor=this.lineColor||u(this.background),this.arrowheadColor=this.arrowheadColor||u(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?(0,d.A)(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||this.actorBorder,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||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||u(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||(0,p.A)(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||l(this.primaryColor,{h:30}),this.cScale4=this.cScale4||l(this.primaryColor,{h:60}),this.cScale5=this.cScale5||l(this.primaryColor,{h:90}),this.cScale6=this.cScale6||l(this.primaryColor,{h:120}),this.cScale7=this.cScale7||l(this.primaryColor,{h:150}),this.cScale8=this.cScale8||l(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||l(this.primaryColor,{h:270}),this.cScale10=this.cScale10||l(this.primaryColor,{h:300}),this.cScale11=this.cScale11||l(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},z=m(t=>{let e=new R;return e.calculate(t),e},"getThemeVariables"),q=class{static{m(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,p.A)(this.primaryColor,16),this.tertiaryColor=l(this.primaryColor,{h:-160}),this.primaryBorderColor=u(this.background),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.lineColor=u(this.background),this.textColor=u(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,p.A)(u("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,h.A)(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=(0,d.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,d.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,h.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,h.A)(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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,p.A)(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=(0,p.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,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=(0,p.A)(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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=l(this.primaryColor,{h:64}),this.fillType3=l(this.secondaryColor,{h:64}),this.fillType4=l(this.primaryColor,{h:-64}),this.fillType5=l(this.secondaryColor,{h:-64}),this.fillType6=l(this.primaryColor,{h:128}),this.fillType7=l(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||l(this.primaryColor,{h:30}),this.cScale4=this.cScale4||l(this.primaryColor,{h:60}),this.cScale5=this.cScale5||l(this.primaryColor,{h:90}),this.cScale6=this.cScale6||l(this.primaryColor,{h:120}),this.cScale7=this.cScale7||l(this.primaryColor,{h:150}),this.cScale8=this.cScale8||l(this.primaryColor,{h:210}),this.cScale9=this.cScale9||l(this.primaryColor,{h:270}),this.cScale10=this.cScale10||l(this.primaryColor,{h:300}),this.cScale11=this.cScale11||l(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=m(t=>{let e=new q;return e.calculate(t),e},"getThemeVariables"),P=class{static{m(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=l(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=l(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.lineColor=u(this.background),this.textColor=u(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="rgba(232,232,232, 0.8)",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="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="#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=(0,h.A)(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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",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||l(this.primaryColor,{h:30}),this.cScale4=this.cScale4||l(this.primaryColor,{h:60}),this.cScale5=this.cScale5||l(this.primaryColor,{h:90}),this.cScale6=this.cScale6||l(this.primaryColor,{h:120}),this.cScale7=this.cScale7||l(this.primaryColor,{h:150}),this.cScale8=this.cScale8||l(this.primaryColor,{h:210}),this.cScale9=this.cScale9||l(this.primaryColor,{h:270}),this.cScale10=this.cScale10||l(this.primaryColor,{h:300}),this.cScale11=this.cScale11||l(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,d.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,d.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},K=m(t=>{let e=new P;return e.calculate(t),e},"getThemeVariables"),j=class{static{m(this,"Theme")}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=(0,p.A)("#cde498",10),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.primaryColor),this.lineColor=u(this.background),this.textColor=u(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="calculated",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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,d.A)(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.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||l(this.primaryColor,{h:30}),this.cScale4=this.cScale4||l(this.primaryColor,{h:60}),this.cScale5=this.cScale5||l(this.primaryColor,{h:90}),this.cScale6=this.cScale6||l(this.primaryColor,{h:120}),this.cScale7=this.cScale7||l(this.primaryColor,{h:150}),this.cScale8=this.cScale8||l(this.primaryColor,{h:210}),this.cScale9=this.cScale9||l(this.primaryColor,{h:270}),this.cScale10=this.cScale10||l(this.primaryColor,{h:300}),this.cScale11=this.cScale11||l(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,d.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,d.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},W=m(t=>{let e=new j;return e.calculate(t),e},"getThemeVariables"),U=class{static{m(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,p.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=l(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=u(this.primaryColor),this.secondaryTextColor=u(this.secondaryColor),this.tertiaryTextColor=u(this.tertiaryColor),this.lineColor=u(this.background),this.textColor=u(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=this.actorBorder,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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,p.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,p.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},H={base:{getThemeVariables:z},dark:{getThemeVariables:N},default:{getThemeVariables:K},forest:{getThemeVariables:W},neutral:{getThemeVariables:m(t=>{let e=new U;return e.calculate(t),e},"getThemeVariables")}},Y={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,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,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},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,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,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{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},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,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},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,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,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"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},G={...Y,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:H.default.getThemeVariables(),sequence:{...Y.sequence,messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:m(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:m(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...Y.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Y.c4,useWidth:void 0,personFont:m(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:m(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:m(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:m(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:m(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:m(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:m(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:m(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:m(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:m(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:m(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:m(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:m(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:m(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:m(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:m(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:m(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:m(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:m(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:m(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:m(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Y.pie,useWidth:984},xyChart:{...Y.xyChart,useWidth:void 0},requirement:{...Y.requirement,useWidth:void 0},packet:{...Y.packet}},Z=m((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Z(t[i],"")]:[...r,e+i],[]),"keyify"),V=new Set(Z(G,"")),X=G,Q=m(t=>{if(C.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t){if(Array.isArray(t)){t.forEach(t=>Q(t));return}for(let e of Object.keys(t)){if(C.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!V.has(e)||null==t[e]){C.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){C.debug("sanitizing object",e),Q(t[e]);continue}for(let r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(C.debug("sanitizing css option",e),t[e]=J(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}C.debug("After sanitization",t)}},"sanitizeDirective"),J=m(t=>{let e=0,r=0;for(let i of t){if(e{let r=$({},t),i={};for(let t of e)tu(t),i=$(i,t);if(r=$(r,i),i.theme&&i.theme in H){let t=$({},n),e=$(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in H&&(r.themeVariables=H[r.theme].getThemeVariables(e))}return tm(ti=r),ti},"updateCurrentConfig"),ta=m(t=>(te=$({},tt),te=$(te,t),t.theme&&H[t.theme]&&(te.themeVariables=H[t.theme].getThemeVariables(t.themeVariables)),tn(te,tr),te),"setSiteConfig"),to=m(t=>{n=$({},t)},"saveConfigFromInitialize"),ts=m(t=>(te=$(te,t),tn(te,tr),te),"updateSiteConfig"),tl=m(()=>$({},te),"getSiteConfig"),th=m(t=>(tm(t),$(ti,t),tc()),"setConfig"),tc=m(()=>$({},ti),"getConfig"),tu=m(t=>{t&&(["secure",...te.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(C.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&tu(t[e])}))},"sanitize"),td=m(t=>{Q(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),tr.push(t),tn(te,tr)},"addDirective"),tp=m((t=te)=>{tn(t,tr=[])},"reset"),tf={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},tg={},ty=m(t=>{tg[t]||(C.warn(tf[t]),tg[t]=!0)},"issueWarning"),tm=m(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ty("LAZY_LOAD_DEPRECATED")},"checkConfig"),tx=//gi,tb=m(t=>t?tM(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),tC=(i=!1,()=>{i||(tk(),i=!0)});function tk(){let t="data-temp-href-target";g.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),g.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}m(tk,"setupDompurifyHooks");var t_=m(t=>(tC(),g.sanitize(t)),"removeScript"),tw=m((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;"antiscript"===r||"strict"===r?t=t_(t):"loose"!==r&&(t=tB(t=(t=(t=tM(t)).replace(//g,">")).replace(/=/g,"=")))}return t},"sanitizeMore"),tv=m((t,e)=>t?t=e.dompurifyConfig?g.sanitize(tw(t,e),e.dompurifyConfig).toString():g.sanitize(tw(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),tT=m((t,e)=>"string"==typeof t?tv(t,e):t.flat().map(t=>tv(t,e)),"sanitizeTextOrArray"),tA=m(t=>tx.test(t),"hasBreaks"),tS=m(t=>t.split(tx),"splitBreaks"),tB=m(t=>t.replace(/#br#/g,"
    "),"placeholderToBreak"),tM=m(t=>t.replace(tx,"#br#"),"breakToPlaceholder"),tL=m(t=>{let e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replaceAll(/\(/g,"\\(")).replaceAll(/\)/g,"\\)")),e},"getUrl"),tF=m(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),tE=m(function(...t){return Math.max(...t.filter(t=>!isNaN(t)))},"getMax"),t$=m(function(...t){return Math.min(...t.filter(t=>!isNaN(t)))},"getMin"),tO=m(function(t){let e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1),"countOccurrence"),tD=m((t,e)=>{let r=tI(t,"~"),i=tI(e,"~");return 1===r&&1===i},"shouldCombineSets"),tR=m(t=>{let e=tI(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),tz=m(()=>void 0!==window.MathMLElement,"isMathMLSupported"),tq=/\$\$(.*)\$\$/g,tN=m(t=>(t.match(tq)?.length??0)>0,"hasKatex"),tP=m(async(t,e)=>{t=await tK(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";let i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);let n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),tK=m(async(t,e)=>{if(!tN(t))return t;if(!(tz()||e.legacyMathML||e.forceLegacyMathML))return t.replace(tq,"MathML is unsupported in this environment.");let{default:i}=await r.e(33076).then(r.bind(r,33076)),n=e.forceLegacyMathML||!tz()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(tx).map(t=>tN(t)?`
    ${t}
    `:`
    ${t}
    `).join("").replace(tq,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),tj={getRows:tb,sanitizeText:tv,sanitizeTextOrArray:tT,hasBreaks:tA,splitBreaks:tS,lineBreakRegex:tx,removeScript:t_,getUrl:tL,evaluate:tF,getMax:tE,getMin:t$},tW=m(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),tU=m(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},"calculateSvgSizeAttrs"),tH=m(function(t,e,r,i){tW(t,tU(e,r,i))},"configureSvgSize"),tY=m(function(t,e,r,i){let n=e.node().getBBox(),a=n.width,o=n.height;C.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;C.info(`Graph bounds: ${s}x${l}`,t),s=a+2*r,l=o+2*r,C.info(`Calculated bounds: ${s}x${l}`),tH(e,l,s,i);let h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),tG={},tZ=m((t,e,r)=>{let i="";return t in tG&&tG[t]?i=tG[t](r):C.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: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .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}; } & p { margin: 0 } ${i} ${e} `},"getStyles"),tV=m((t,e)=>{void 0!==e&&(tG[t]=e)},"addStylesForDiagram"),tX=tZ,tQ={};x(tQ,{clear:()=>t3,getAccDescription:()=>t8,getAccTitle:()=>t6,getDiagramTitle:()=>t7,setAccDescription:()=>t4,setAccTitle:()=>t5,setDiagramTitle:()=>t9});var tJ="",t0="",t1="",t2=m(t=>tv(t,tc()),"sanitizeText"),t3=m(()=>{tJ="",t1="",t0=""},"clear"),t5=m(t=>{tJ=t2(t).replace(/^\s+/g,"")},"setAccTitle"),t6=m(()=>tJ,"getAccTitle"),t4=m(t=>{t1=t2(t).replace(/\n\s+/g,"\n")},"setAccDescription"),t8=m(()=>t1,"getAccDescription"),t9=m(t=>{t0=t2(t)},"setDiagramTitle"),t7=m(()=>t0,"getDiagramTitle"),et=tc,ee=th,er=tt,ei=m(t=>tv(t,et()),"sanitizeText"),en=tY,ea=m(()=>tQ,"getCommonDb"),eo={},es=m((t,e,r)=>{eo[t]&&C.warn(`Diagram with id ${t} already registered. Overwriting.`),eo[t]=e,r&&L(t,r),tV(t,e.styles),e.injectUtils?.(C,k,et,ei,en,ea(),()=>{})},"registerDiagram"),el=m(t=>{if(t in eo)return eo[t];throw new eh(t)},"getDiagram"),eh=class extends Error{static{m(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},26873:(t,e,r)=>{"use strict";r.d(e,{r:()=>i});var i="11.2.1"},93510:(t,e,r)=>{"use strict";r.d(e,{IU:()=>tg,gh:()=>tk,nA:()=>e_,U:()=>tf,Jo:()=>tE,jP:()=>tw,on:()=>eC,Zk:()=>tK,g0:()=>tP,T_:()=>tT,U_:()=>ew,U7:()=>ek,lC:()=>tj});var i=r(16470),n=r(27923),a=r(67027),o=r(72912),s=r(89601);function l(t,e,r){if(t&&t.length){let[i,n]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(let e of t){let[t,r]=e;e[0]=(t-i)*o-(r-n)*s+i,e[1]=(t-i)*s+(r-n)*o+n}}}function h(t,e){var r;let i=e.hachureAngle+90,n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=n),function(t,e,r,i=1){let n=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,o=[0,0];if(r)for(let t of a)l(t,o,r);let s=function(t,e,r){let i=[];for(let e of t){var n,a;let t=[...e];n=t[0],a=t[t.length-1],n[0]===a[0]&&n[1]===a[1]||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}let o=[];e=Math.max(e,.1);let s=[];for(let t of i)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!s.length)return o;let l=[],h=s[0].ymin,c=0;for(;l.length||s.length;){if(s.length){let t=-1;for(let e=0;eh);e++)t=e;s.splice(0,t+1).forEach(t=>{l.push({s:h,edge:t})})}if((l=l.filter(t=>!(t.edge.ymax<=h))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||c%e==0)&&l.length>1)for(let t=0;t=l.length)break;let r=l[t].edge,i=l[e].edge;o.push([[Math.round(r.x),h],[Math.round(i.x),h]])}h+=r,l.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),c++}return o}(a,n,i);if(r){for(let t of a)l(t,o,-r);!function(t,e,r){let i=[];t.forEach(t=>i.push(...t)),l(i,e,r)}(s,o,-r)}return s}(t,n,i,a||1)}class c{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let r=h(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){let r=[];for(let i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function u(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class d extends c{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth);let i=h(t,Object.assign({},e,{hachureGap:r=Math.max(r,.1)})),n=Math.PI/180*e.hachureAngle,a=[],o=.5*r*Math.cos(n),s=.5*r*Math.sin(n);for(let[t,e]of i)u([t,e])&&a.push([[t[0]-o,t[1]+s],[...e]],[[t[0]+o,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class p extends c{fillPolygons(t,e){let r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class f{constructor(t){this.helper=t}fillPolygons(t,e){let r=h(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){let r=[],i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let a=i/4;for(let o of t){let t=u(o),s=Math.ceil(t/i)-1,l=t-s*i,h=(o[0][0]+o[1][0])/2-i/4,c=Math.min(o[0][1],o[1][1]);for(let t=0;t{let a=u(t),o=Math.floor(a/(r+i)),s=(a+i-o*(r+i))/2,l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);let c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t{let n=Math.round(u(t)/(2*e)),a=t[0],o=t[1];a[0]>o[0]&&(a=t[1],o=t[0]);let s=Math.atan((o[1]-a[1])/(o[0]-a[0]));for(let t=0;ti%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{let t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{let t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=n}return a}function _(t){let e=[],r="",i=0,n=0,a=0,o=0,s=0,l=0;for(let{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,n]=c,[a,o]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],n=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,n]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,n]});break;case"V":n=c[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-s),a=n+(n-l)):(t=i,a=n),e.push({key:"C",data:[t,a,...c]}),s=c[0],l=c[1],i=c[2],n=c[3];break}case"T":{let[t,a]=c,o=0,h=0;"Q"===r||"T"===r?(o=i+(i-s),h=n+(n-l)):(o=i,h=n);let u=i+2*(o-i)/3,d=n+2*(h-n)/3,p=t+2*(o-t)/3,f=a+2*(h-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=h,i=t,n=a;break}case"Q":{let[t,r,a,o]=c,h=i+2*(t-i)/3,u=n+2*(r-n)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[h,u,d,p,a,o]}),s=t,l=r,i=a,n=o;break}case"A":{let t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],o=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,h,l,h]}),i=l,n=h):(i!==l||n!==h)&&((function t(e,r,i,n,a,o,s,l,h,c){let u=Math.PI*s/180,d=[],p=0,f=0,g=0,y=0;if(c)[p,f,g,y]=c;else{[e,r]=w(e,r,-u),[i,n]=w(i,n,-u);let t=(e-i)/2,s=(r-n)/2,c=t*t/(a*a)+s*s/(o*o);c>1&&(a*=c=Math.sqrt(c),o*=c);let d=a*a,m=o*o,x=(l===h?-1:1)*Math.sqrt(Math.abs((d*m-d*s*s-m*t*t)/(d*s*s+m*t*t)));g=x*a*s/o+(e+i)/2,y=-(x*o)*t/a+(r+n)/2,p=Math.asin(parseFloat(((r-y)/o).toFixed(9))),f=Math.asin(parseFloat(((n-y)/o).toFixed(9))),ef&&(p-=2*Math.PI),!h&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){let e=f,r=i,l=n;d=t(i=g+a*Math.cos(f=h&&f>p?p+120*Math.PI/180*1:p+-(120*Math.PI/180*1)),n=y+o*Math.sin(f),r,l,a,o,s,0,h,[f,e,g,y])}m=f-p;let x=Math.cos(p),b=Math.cos(f),C=Math.tan(m/4),k=4/3*a*C,_=4/3*o*C,v=[e,r],T=[e+k*Math.sin(p),r-_*x],A=[i+k*Math.sin(f),n-_*b],S=[i,n];if(T[0]=2*v[0]-T[0],T[1]=2*v[1]-T[1],c)return[T,A,S].concat(d);{d=[T,A,S].concat(d);let t=[];for(let e=0;e2){let n=[];for(let e=0;e2*Math.PI&&(u=0,d=2*Math.PI);let p=Math.min(2*Math.PI/l.curveStepCount/2,(d-u)/2),f=j(p,t,e,h,c,u,d,1,l);if(!l.disableMultiStroke){let r=j(p,t,e,h,c,u,d,1.5,l);f.push(...r)}return o&&(s?f.push(...z(t,e,t+h*Math.cos(u),e+c*Math.sin(u),l),...z(t,e,t+h*Math.cos(d),e+c*Math.sin(d),l)):f.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+h*Math.cos(u),e+c*Math.sin(u)]})),{type:"path",ops:f}}function F(t,e){let r=_(k(C(t))),i=[],n=[0,0],a=[0,0];for(let{key:t,data:o}of r)switch(t){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...z(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{let[t,r,n,s,l,h]=o;i.push(...function(t,e,r,i,n,a,o,s){let l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],c=[0,0],u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let p=0;p2){r.push({op:"move",data:[i[0][0]+R(t,e),i[0][1]+R(t,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);let u=c/2,d=.2+.2*I(n),p=n.bowing*n.maxRandomnessOffset*(i-e)/200,f=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=R(p,n,h),f=R(f,n,h);let g=[],y=()=>R(u,n,h),m=()=>R(c,n,h),x=n.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:R(c,n,h)),e+(x?0:R(c,n,h))]})),o?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(i-e)*d+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(i-e)*d+m(),r+(x?0:m()),i+(x?0:m())]}),g}function N(t,e,r){if(!t.length)return[];let i=[];i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]),i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]);for(let n=1;n3){let a=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2l&&(l=e,h=i)}return Math.sqrt(l)>i?(Y(t,e,h+1,i,a),Y(t,h,r,i,a)):(a.length||a.push(o),a.push(s)),a}function G(t,e=.15,r){let i=[],n=(t.length-1)/3;for(let r=0;r1&&a.push(t):a.push(t),a.push(e[r+3])}else{let n=e[r+0],o=e[r+1],s=e[r+2],l=e[r+3],h=H(n,o,.5),c=H(o,s,.5),u=H(s,l,.5),d=H(h,c,.5),p=H(c,u,.5),f=H(d,p,.5);t([n,h,d,f],0,i,a),t([f,p,u,l],0,i,a)}return a}(t,3*r,e,i);return r&&r>0?Y(i,0,i.length,r):i}let Z="none";class V{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(2147483648*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){let a=this._o(n);return this._d("line",[T(t,e,r,i,a)],a)}rectangle(t,e,r,i,n){let a=this._o(n),o=[],s=A([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,a);if(a.fill){let n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?o.push(E([n],a)):o.push($([n],a))}return a.stroke!==Z&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,i,n){let a=this._o(n),o=[],s=B(r,i,a),l=M(t,e,a,s);if(a.fill){if("solid"===a.fillStyle){let r=M(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push($([l.estimatedPoints],a))}return a.stroke!==Z&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,r,i){let n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){let r=this._o(e);return this._d("linearPath",[A(t,!1,r)],r)}arc(t,e,r,i,n,a,o=!1,s){let l=this._o(s),h=[],c=L(t,e,r,i,n,a,o,!0,l);if(o&&l.fill){if("solid"===l.fillStyle){let o=Object.assign({},l);o.disableMultiStroke=!0;let s=L(t,e,r,i,n,a,!0,!1,o);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,n,a,o){let s=Math.abs(r/2),l=Math.abs(i/2);s+=R(.01*s,o),l+=R(.01*l,o);let h=n,c=a;for(;h<0;)h+=2*Math.PI,c+=2*Math.PI;c-h>2*Math.PI&&(h=0,c=2*Math.PI);let u=(c-h)/o.curveStepCount,d=[];for(let r=h;r<=c;r+=u)d.push([t+s*Math.cos(r),e+l*Math.sin(r)]);return d.push([t+s*Math.cos(c),e+l*Math.sin(c)]),d.push([t,e]),$([d],o)}(t,e,r,i,n,a,l))}return l.stroke!==Z&&h.push(c),this._d("arc",h,l)}curve(t,e){let r=this._o(e),i=[],n=S(t,r);if(r.fill&&r.fill!==Z){if("solid"===r.fillStyle){let e=S(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let i of"number"==typeof t[0][0]?[t]:t)i.length<3?e.push(...i):3===i.length?e.push(...G(W([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...G(W(i),10,(1+r.roughness)/2));e.length&&i.push($([e],r))}}return r.stroke!==Z&&i.push(n),this._d("curve",i,r)}polygon(t,e){let r=this._o(e),i=[],n=A(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(E([t],r)):i.push($([t],r))),r.stroke!==Z&&i.push(n),this._d("polygon",i,r)}path(t,e){let r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=r.fill&&"transparent"!==r.fill&&r.fill!==Z,a=r.stroke!==Z,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){let i=_(k(C(t))),n=[],a=[],o=[0,0],s=[],l=()=>{s.length>=4&&a.push(...G(s,1)),s=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(let{key:t,data:e}of i)switch(t){case"M":h(),o=[e[0],e[1]],a.push(o);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!s.length){let t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(h(),!r)return n;let c=[];for(let t of n){let e=Y(t,0,t.length,r);e.length&&c.push(e)}return c}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=F(t,r);if(n){if("solid"===r.fillStyle){if(1===s.length){let e=F(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(E(s,r))}else i.push($(s,r))}return a&&(o?s.forEach(t=>{i.push(A(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(let i of t.ops){let t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){let e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Z};break;case"fillPath":e={d:this.opsToPath(t),stroke:Z,strokeWidth:0,fill:r.fill||Z};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||Z,strokeWidth:r,fill:Z}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}let X="http://www.w3.org/2000/svg";class Q{constructor(t,e){this.svg=t,this.gen=new V(e)}draw(t){let e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(X,"g"),a=t.options.fixedDecimalPlaceDigits;for(let o of e){let e=null;switch(o.type){case"path":(e=i.createElementNS(X,"path")).setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":(e=i.createElementNS(X,"path")).setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);let n=t.createElementNS(X,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){let a=this.gen.line(t,e,r,i,n);return this.draw(a)}rectangle(t,e,r,i,n){let a=this.gen.rectangle(t,e,r,i,n);return this.draw(a)}ellipse(t,e,r,i,n){let a=this.gen.ellipse(t,e,r,i,n);return this.draw(a)}circle(t,e,r,i){let n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){let r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){let r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,a,o=!1,s){let l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l)}curve(t,e){let r=this.gen.curve(t,e);return this.draw(r)}path(t,e){let r=this.gen.path(t,e);return this.draw(r)}}var J={svg:(t,e)=>new Q(t,e)},tt=(0,o.K2)((t,e)=>{var r,i,n=t.x,a=t.y,o=e.x-n,s=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(o)*h?(s<0&&(h=-h),r=0===s?0:h*o/s,i=h):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:n+r,y:a+i}},"intersectRect");function te(t,e){e&&t.attr("style",e)}async function tr(t){let e=(0,s.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label;t.label&&(0,o.Wi)(t.label)&&(i=await (0,o.VJ)(t.label.replace(o.Y2.lineBreakRegex,"\n"),(0,o.D7)()));let n=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),te(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,o.K2)(te,"applyStyle"),(0,o.K2)(tr,"addHtmlLabel");var ti=(0,o.K2)(async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),(0,o._3)((0,o.D7)().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),o.Rm.info("vertexText"+n);let t={isNode:i,label:(0,a.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e?e.replace("fill:","color:"):e};return await tr(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof n?n.split(/\\n|\n|/gi):Array.isArray(n)?n:[]){let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}},"createLabel"),tn=(0,o.K2)((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),ta=(0,o.K2)(t=>{let{handDrawnSeed:e}=(0,o.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),to=(0,o.K2)(t=>{let e=ts([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),ts=(0,o.K2)(t=>{let e=new Map;return t.forEach(t=>{let[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),tl=(0,o.K2)(t=>{let{stylesArray:e}=to(t),r=[],i=[],n=[],a=[];return e.forEach(t=>{let e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),th=(0,o.K2)((t,e)=>{let{themeVariables:r,handDrawnSeed:i}=(0,o.D7)(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=to(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,stroke:s.get("stroke")||n,seed:i,strokeWidth:1.3},e)},"userNodeOverrides"),tc=(0,o.K2)(async(t,e)=>{let r;o.Rm.info("Creating subgraph rect for ",e.id,e);let a=(0,o.D7)(),{themeVariables:l,handDrawnSeed:h}=a,{clusterBkg:c,clusterBorder:u}=l,{labelStyles:d,nodeStyles:p,borderStyles:f,backgroundStyles:g}=tl(e),y=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),m=(0,o._3)(a.flowchart.htmlLabels),x=y.insert("g").attr("class","cluster-label "),b=await (0,n.GZ)(x,e.label,{style:e.labelStyle,useHtmlLabels:m,isNode:!0}),C=b.getBBox();if((0,o._3)(a.flowchart.htmlLabels)){let t=b.children[0],e=(0,s.Ltv)(b);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}let k=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;let _=e.height,w=e.x-k/2,v=e.y-_/2;if(o.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=J.svg(y),i=th(e,{roughness:.7,fill:c,stroke:u,fillWeight:3,seed:h}),n=t.path(tn(w,v,k,_,0),i);(r=y.insert(()=>(o.Rm.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",f.join(";")),r.select("path").attr("style",g.join(";").replace("fill","stroke"))}else(r=y.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",w).attr("y",v).attr("width",k).attr("height",_);let{subGraphTitleTopMargin:T}=(0,i.O)(a);if(x.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+T})`),d){let t=x.select("span");t&&t.attr("style",d)}let A=r.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=C.height-e.padding/2,e.intersect=function(t){return tt(e,t)},{cluster:y,labelBBox:C}},"rect"),tu=(0,o.K2)((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");let o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return tt(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),td={rect:tc,squareRect:tc,roundedWithTitle:(0,o.K2)(async(t,e)=>{let r;let i=(0,o.D7)(),{themeVariables:n,handDrawnSeed:a}=i,{altBackground:l,compositeBackground:h,compositeTitleBackground:c,nodeBorder:u}=n,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label"),g=d.append("rect"),y=f.node().appendChild(await ti(e.label,e.labelStyle,void 0,!0)),m=y.getBBox();if((0,o._3)(i.flowchart.htmlLabels)){let t=y.children[0],e=(0,s.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let x=0*e.padding,b=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+x;e.width<=m.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;let C=e.height+x,k=e.height+x-m.height-6,_=e.x-b/2,w=e.y-C/2;e.width=b;let v=e.y-e.height/2-x/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),i=J.svg(d),n=e.rx||e.ry?i.path(tn(_,w,b,C,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:u,seed:a}):i.rectangle(_,w,b,C,{seed:a});r=d.insert(()=>n,":first-child");let o=i.rectangle(_,v,b,k,{fill:t?l:h,fillStyle:t?"hachure":"solid",stroke:u,seed:a});r=d.insert(()=>n,":first-child"),g=d.insert(()=>o)}else(r=p.insert("rect",":first-child")).attr("class","outer").attr("x",_).attr("y",w).attr("width",b).attr("height",C).attr("data-look",e.look),g.attr("class","inner").attr("x",_).attr("y",v).attr("width",b).attr("height",k);f.attr("transform",`translate(${e.x-m.width/2}, ${w+1-((0,o._3)(i.flowchart.htmlLabels)?0:3)})`);let T=r.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return tt(e,t)},{cluster:d,labelBBox:m}},"roundedWithTitle"),noteGroup:tu,divider:(0,o.K2)((t,e)=>{let r;let{themeVariables:i,handDrawnSeed:n}=(0,o.D7)(),{nodeBorder:a}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),h=0*e.padding,c=e.width+h;e.diff=-e.padding;let u=e.height+h,d=e.x-c/2,p=e.y-u/2;if(e.width=c,"handDrawn"===e.look){let t=J.svg(s).rectangle(d,p,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});r=s.insert(()=>t,":first-child")}else(r=l.insert("rect",":first-child")).attr("class","divider").attr("x",d).attr("y",p).attr("width",c).attr("height",u).attr("data-look",e.look);let f=r.node().getBBox();return e.height=f.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return tt(e,t)},{cluster:s,labelBBox:{}}},"divider")},tp=new Map,tf=(0,o.K2)(async(t,e)=>{let r=e.shape||"rect",i=await td[r](t,e);return tp.set(e.id,i),i},"insertCluster"),tg=(0,o.K2)(()=>{tp=new Map},"clear"),ty=(0,o.K2)((t,e,r,i,n)=>{e.arrowTypeStart&&tx(t,"start",e.arrowTypeStart,r,i,n),e.arrowTypeEnd&&tx(t,"end",e.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),tm={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},tx=(0,o.K2)((t,e,r,i,n,a)=>{let s=tm[r];if(!s){o.Rm.warn(`Unknown arrow type: ${r}`);return}t.attr(`marker-${e}`,`url(${i}#${n}_${a}-${s}${"start"===e?"Start":"End"})`)},"addEdgeMarker"),tb=new Map,tC=new Map,tk=(0,o.K2)(()=>{tb.clear(),tC.clear()},"clear"),t_=(0,o.K2)(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),tw=(0,o.K2)(async(t,e)=>{let r,i=(0,o._3)((0,o.D7)().flowchart.htmlLabels),a=await (0,n.GZ)(t,e.label,{style:t_(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1});o.Rm.info("abc82",e,e.labelType);let l=t.insert("g").attr("class","edgeLabel"),h=l.insert("g").attr("class","label");h.node().appendChild(a);let c=a.getBBox();if(i){let t=a.children[0],e=(0,s.Ltv)(a);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(h.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),tb.set(e.id,l),e.width=c.width,e.height=c.height,e.startLabelLeft){let i=await ti(e.startLabelLeft,t_(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");r=a.node().appendChild(i);let o=i.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),tC.get(e.id)||tC.set(e.id,{}),tC.get(e.id).startLeft=n,tv(r,e.startLabelLeft)}if(e.startLabelRight){let i=await ti(e.startLabelRight,t_(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");r=n.node().appendChild(i),a.node().appendChild(i);let o=i.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),tC.get(e.id)||tC.set(e.id,{}),tC.get(e.id).startRight=n,tv(r,e.startLabelRight)}if(e.endLabelLeft){let i=await ti(e.endLabelLeft,t_(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");r=a.node().appendChild(i);let o=i.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.node().appendChild(i),tC.get(e.id)||tC.set(e.id,{}),tC.get(e.id).endLeft=n,tv(r,e.endLabelLeft)}if(e.endLabelRight){let i=await ti(e.endLabelRight,t_(e.labelStyle)),n=t.insert("g").attr("class","edgeTerminals"),a=n.insert("g").attr("class","inner");r=a.node().appendChild(i);let o=i.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.node().appendChild(i),tC.get(e.id)||tC.set(e.id,{}),tC.get(e.id).endRight=n,tv(r,e.endLabelRight)}return a},"insertEdgeLabel");function tv(t,e){(0,o.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,o.K2)(tv,"setTerminalWidth");var tT=(0,o.K2)((t,e)=>{o.Rm.debug("Moving label abc88 ",t.id,t.label,tb.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=(0,o.D7)(),{subGraphTitleTotalMargin:s}=(0,i.O)(n);if(t.label){let i=tb.get(t.id),n=t.x,l=t.y;if(r){let i=a._K.calcLabelPosition(r);o.Rm.debug("Moving label "+t.label+" from (",n,",",l,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,l=i.y)}i.attr("transform",`translate(${n}, ${l+s/2})`)}if(t.startLabelLeft){let e=tC.get(t.id).startLeft,i=t.x,n=t.y;if(r){let e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){let e=tC.get(t.id).startRight,i=t.x,n=t.y;if(r){let e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){let e=tC.get(t.id).endLeft,i=t.x,n=t.y;if(r){let e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){let e=tC.get(t.id).endRight,i=t.x,n=t.y;if(r){let e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}},"positionEdgeLabel"),tA=(0,o.K2)((t,e)=>{let r=t.x,i=t.y,n=Math.abs(e.x-r),a=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return n>=o||a>=s},"outsideNode"),tS=(0,o.K2)((t,e,r)=>{o.Rm.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,n=t.y,a=Math.abs(i-r.x),s=t.width/2,l=r.xMath.abs(i-e.x)*h){let t=r.y{o.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(t=>{if(o.Rm.info("abc88 checking point",t,e),tA(e,t)||n)o.Rm.warn("abc88 outside",t,i),i=t,n||r.push(t);else{let a=tS(e,i,t);o.Rm.debug("abc88 inside",t,i,a),o.Rm.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?o.Rm.warn("abc88 no intersect",a,r):r.push(a),n=!0}}),o.Rm.debug("returning points",r),r},"cutPathAtIntersect");function tM(t){let e=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5?(e.push(a),r.push(i)):n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,o.K2)(tM,"extractCornerPoints");var tL=(0,o.K2)(function(t,e,r){let i=e.x-t.x,n=e.y-t.y,a=r/Math.sqrt(i*i+n*n);return{x:e.x-a*i,y:e.y-a*n}},"findAdjacentPoint"),tF=(0,o.K2)(function(t){let{cornerPointPositions:e}=tM(t),r=[];for(let i=0;i10&&Math.abs(n.y-e.y)>=10?(o.Rm.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y)),d=a.x===s.x?{x:h<0?s.x-5+u:s.x+5-u,y:c<0?s.y-u:s.y+u}:{x:h<0?s.x-u:s.x+u,y:c<0?s.y-5+u:s.y+5-u}):o.Rm.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y)),r.push(d,l)}else r.push(t[i]);return r},"fixCorners"),tE=(0,o.K2)(function(t,e,r,n,a,l,h){let c,u;let{handDrawnSeed:d}=(0,o.D7)(),p=e.points,f=!1;l.intersect&&a.intersect&&((p=p.slice(1,e.points.length-1)).unshift(a.intersect(p[0])),o.Rm.debug("Last point APA12",e.start,"-->",e.end,p[p.length-1],l,l.intersect(p[p.length-1])),p.push(l.intersect(p[p.length-1]))),e.toCluster&&(o.Rm.info("to cluster abc88",r.get(e.toCluster)),p=tB(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(o.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(p,null,2)),p=tB(p.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let g=p.filter(t=>!Number.isNaN(t.y)),y=(g=tF(g))[g.length-1];if(g.length>1){y=g[g.length-1];let t=g[g.length-2],e=(y.x-t.x)/2,r=(y.y-t.y)/2,i={x:t.x+e,y:t.y+r};g.splice(-1,0,i)}let m=s.qrM;e.curve&&(m=e.curve);let{x,y:b}=(0,i.R)(e),C=(0,s.n8j)().x(x).y(b).curve(m);switch(e.thickness){case"normal":default:c="edge-thickness-normal";break;case"thick":c="edge-thickness-thick";break;case"invisible":c="edge-thickness-invisible"}switch(e.pattern){case"solid":default:c+=" edge-pattern-solid";break;case"dotted":c+=" edge-pattern-dotted";break;case"dashed":c+=" edge-pattern-dashed"}let k=C(g),_=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){let r=J.svg(t);Object.assign([],g);let i=r.path(k,{roughness:.3,seed:d});c+=" transition";let n=(u=(0,s.Ltv)(i).select("path").attr("id",e.id).attr("class"," "+c+(e.classes?" "+e.classes:"")).attr("style",_?_.reduce((t,e)=>t+";"+e,""):"")).attr("d");u.attr("d",n),t.node().appendChild(u.node())}else u=t.append("path").attr("d",k).attr("id",e.id).attr("class"," "+c+(e.classes?" "+e.classes:"")).attr("style",_?_.reduce((t,e)=>t+";"+e,""):"");let w="";((0,o.D7)().flowchart.arrowMarkerAbsolute||(0,o.D7)().state.arrowMarkerAbsolute)&&(w=(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),o.Rm.info("arrowTypeStart",e.arrowTypeStart),o.Rm.info("arrowTypeEnd",e.arrowTypeEnd),ty(u,e,w,h,n);let v={};return f&&(v.updatedPath=p),v.originalPath=e.points,v},"insertEdge"),t$=(0,o.K2)((t,e,r,i)=>{e.forEach(e=>{tN[e](t,r,i)})},"insertMarkers"),tO=(0,o.K2)((t,e,r)=>{o.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),tI=(0,o.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),tD=(0,o.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),tR=(0,o.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),tz=(0,o.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),tq=(0,o.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),tN={extension:tO,composition:tI,aggregation:tD,dependency:tR,lollipop:tz,point:tq,circle:(0,o.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,o.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,o.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},tP=t$,tK=(0,o.K2)(async(t,e,r)=>{let i,l,h;let c=e.useHtmlLabels||(0,o._3)((0,o.D7)().flowchart.htmlLabels);i=r||"node default";let u=t.insert("g").attr("class",i).attr("id",e.domId||e.id),d=u.insert("g").attr("class","label").attr("style",e.labelStyle);l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let p=(h=await (0,n.GZ)(d,(0,o.jZ)((0,a.Sm)(l),(0,o.D7)()),{useHtmlLabels:c,width:e.width||(0,o.D7)().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle})).getBBox(),f=e.padding/2;if((0,o._3)((0,o.D7)().flowchart.htmlLabels)){let t=h.children[0],e=(0,s.Ltv)(h),r=t.getElementsByTagName("img");if(r){let t=""===l.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt((0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";r(e)}(0,o.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return c?d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):d.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:u,bbox:p,halfPadding:f,label:d}},"labelHelper"),tj=(0,o.K2)((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),tW=(0,o.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function tU(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),h=Math.abs(e*r*o/l);i.x0}function tZ(t,e,r){let i=t.x,n=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,h=n-t.height/2-s;for(let i=0;i1&&a.sort(function(t,e){let i=t.x-r.x,n=t.y-r.y,a=Math.sqrt(i*i+n*n),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return a{let i;let{labelStyles:n,nodeStyles:a}=tl(e);e.labelStyle=n;let{shapeSvg:o,bbox:s}=await tK(t,e,tW(e)),l=Math.max(s.width+2*r.labelPaddingX,e?.width||0),h=Math.max(s.height+2*r.labelPaddingY,e?.height||0),c=-l/2,u=-h/2,{rx:d,ry:p}=e,{cssStyles:f}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===e.look){let t=J.svg(o),r=th(e,{}),n=d||p?t.path(tn(c,u,l,h,d||0),r):t.rectangle(c,u,l,h,r);(i=o.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",f)}else(i=o.insert("rect",":first-child")).attr("class","basic label-container").attr("style",a).attr("rx",d).attr("data-id","abc").attr("data-et","node").attr("ry",p).attr("x",c).attr("y",u).attr("width",l).attr("height",h);return tj(e,i),e.intersect=function(t){return tt(e,t)},o},"drawRect"),tX=(0,o.K2)(async(t,e)=>tV(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state"),tQ=(0,o.K2)(async(t,e)=>{let r={rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tV(t,e,r)},"roundedRect"),tJ=(0,o.K2)(async(t,e)=>{let r={rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tV(t,e,r)},"squareRect"),t0=(0,o.K2)((t,e)=>{let r;let{themeVariables:i}=(0,o.D7)(),{lineColor:n}=i,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=J.svg(a).circle(0,0,14,ta(n));r=a.insert(()=>t)}else r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),tj(e,r),e.intersect=function(t){return tH(e,7,t)},a},"stateStart"),t1=(0,o.K2)((t,e)=>{let r,i;let{themeVariables:n}=(0,o.D7)(),{lineColor:a}=n,s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=J.svg(s),e=t.circle(0,0,14,{...ta(a),roughness:.5}),n=t.circle(0,0,5,{...ta(a),fillStyle:"solid"});r=s.insert(()=>e),i=s.insert(()=>n)}else i=s.insert("circle",":first-child"),(r=s.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return tj(e,r),e.intersect=function(t){return tH(e,7,t)},s},"stateEnd"),t2=(0,o.K2)((t,e,r)=>{let i;let{themeVariables:n}=(0,o.D7)(),{lineColor:a}=n,s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),l=70,h=10;"LR"===r&&(l=10,h=70);let c=-1*l/2,u=-1*h/2;if("handDrawn"===e.look){let t=J.svg(s).rectangle(c,u,l,h,ta(a));i=s.insert(()=>t)}else i=s.append("rect").attr("x",c).attr("y",u).attr("width",l).attr("height",h).attr("class","fork-join");tj(e,i);let d=0,p=0,f=10;return e.height&&(d=e.height),e.width&&(p=e.width),e.padding&&(f=e.padding),e.height=d+f/2,e.width=p+f/2,e.intersect=function(t){return tt(e,t)},s},"forkJoin"),t3=(0,o.K2)((t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{themeVariables:a}=(0,o.D7)(),{lineColor:s}=a,l=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];if("handDrawn"===e.look){let t=J.svg(l),e=h.map(function(t){return[t.x,t.y]}),i=t.polygon(e,ta(s));r=l.insert(()=>i)}else r=l.insert("polygon",":first-child").attr("points",h.map(function(t){return t.x+","+t.y}).join(" "));return r.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return tH(e,14,t)},l},"choice"),t5=(0,o.K2)(async(t,e)=>{let r;let{themeVariables:i,handDrawnSeed:n}=(0,o.D7)(),{noteBorderColor:a,noteBkgColor:s}=i;e.useHtmlLabels||(e.centerLabel=!0);let{shapeSvg:l,bbox:h}=await tK(t,e,"node "+e.cssClasses);o.Rm.info("Classes = ",e.cssClasses);let{cssStyles:c}=e,u=h.width+e.padding,d=h.height+e.padding,p=-u/2,f=-d/2;if("handDrawn"===e.look){let t=J.svg(l).rectangle(p,f,u,d,{roughness:.7,fill:s,fillWeight:3,seed:n,stroke:a});(r=l.insert(()=>t,":first-child")).attr("class","basic label-container").attr("style",c)}else(r=l.insert("rect",":first-child")).attr("rx",e.rx).attr("ry",e.ry).attr("x",p).attr("y",f).attr("width",u).attr("height",d);return tj(e,r),e.intersect=function(t){return tt(e,t)},l},"note"),t6=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.height+e.padding,l=o.width+s/4+e.padding,{cssStyles:h}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=tn(-l/2,-s/2,l,s,s/2),o=t.path(n,i);(r=a.insert(()=>o,":first-child")).attr("class","basic label-container").attr("style",h)}else(r=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return tj(e,r),e.intersect=function(t){return tt(e,t)},a},"stadium"),t4=(0,o.K2)(async(t,e)=>{let r,i,n;let{labelStyles:a,nodeStyles:l}=tl(e);e.labelStyle=a,r=e.cssClasses?"node "+e.cssClasses:"node default";let h=t.insert("g").attr("class",r).attr("id",e.domId||e.id),c=h.insert("g"),u=h.insert("g").attr("class","label").attr("style",l),d=e.description,p=e.label,f=u.node().appendChild(await ti(p,e.labelStyle,!0,!0)),g={width:0,height:0};if((0,o._3)(o.D7()?.flowchart?.htmlLabels)){let t=f.children[0],e=(0,s.Ltv)(f);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}o.Rm.info("Text 2",d);let y=d||[],m=f.getBBox(),x=u.node().appendChild(await ti(y.join?y.join("
    "):y,e.labelStyle,!0,!0)),b=x.children[0],C=(0,s.Ltv)(x);g=b.getBoundingClientRect(),C.attr("width",g.width),C.attr("height",g.height);let k=(e.padding||0)/2;(0,s.Ltv)(x).attr("transform","translate( "+(g.width>m.width?0:(m.width-g.width)/2)+", "+(m.height+k+5)+")"),(0,s.Ltv)(f).attr("transform","translate( "+(g.width(o.Rm.debug("Rough node insert CXC",a),s),":first-child"),i=h.insert(()=>(o.Rm.debug("Rough node insert CXC",a),a),":first-child")}else i=c.insert("rect",":first-child"),n=c.insert("line"),i.attr("class","outer title-state").attr("style",l).attr("x",-g.width/2-k).attr("y",-g.height/2-k).attr("width",g.width+(e.padding||0)).attr("height",g.height+(e.padding||0)),n.attr("class","divider").attr("x1",-g.width/2-k).attr("x2",g.width/2+k).attr("y1",-g.height/2-k+m.height+k).attr("y2",-g.height/2-k+m.height+k);return tj(e,i),e.intersect=function(t){return tt(e,t)},h},"rectWithTitle");function t8(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,o.K2)(t8,"insertPolygonShape");var t9=(0,o.K2)(async(t,e)=>{let{labelStyles:r,nodeStyles:i}=tl(e);e.labelStyle=r;let{shapeSvg:n,bbox:a}=await tK(t,e,tW(e)),o=(e?.padding||0)/2,s=a.width+e.padding,l=a.height+e.padding,h=-a.width/2-o,c=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){let t=J.svg(n),r=th(e,{}),i=t.rectangle(h-8,c,s+16,l,r),a=t.line(h,c,h,c+l,r),o=t.line(h+s,c,h+s,c+l,r);n.insert(()=>a,":first-child"),n.insert(()=>o,":first-child");let u=n.insert(()=>i,":first-child"),{cssStyles:d}=e;u.attr("class","basic label-container").attr("style",d),tj(e,u)}else{let t=t8(n,s,l,u);i&&t.attr("style",i),tj(e,t)}return e.intersect=function(t){return tZ(e,u,t)},n},"subroutine"),t7=(0,o.K2)((t,e,r,i,n,a)=>`M${t},${e+a} a${n},${a} 0,0,0 ${r},0 a${n},${a} 0,0,0 ${-r},0 l0,${i} a${n},${a} 0,0,0 ${r},0 l0,${-i}`,"createCylinderPathD"),et=(0,o.K2)((t,e,r,i,n,a)=>`M${t},${e+a} M${t+r},${e+a} a${n},${a} 0,0,0 ${-r},0 l0,${i} a${n},${a} 0,0,0 ${r},0 l0,${-i}`,"createOuterCylinderPathD"),ee=(0,o.K2)((t,e,r,i,n,a)=>`M${t-r/2},${-i/2} a${n},${a} 0,0,0 ${r},0`,"createInnerCylinderPathD"),er=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.width+e.padding,l=s/2,h=l/(2.5+s/50),c=o.height+h+e.padding,{cssStyles:u}=e;if("handDrawn"===e.look){let t=J.svg(a),i=et(0,0,s,c,l,h),n=ee(0,h,s,c,l,h),o=t.path(i,th(e,{})),d=t.path(n,th(e,{fill:"none"}));r=a.insert(()=>d,":first-child"),(r=a.insert(()=>o,":first-child")).attr("class","basic label-container"),u&&r.attr("style",u)}else{let t=t7(0,0,s,c,l,h);r=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",u).attr("style",n)}return r.attr("label-offset-y",h),r.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),tj(e,r),e.intersect=function(t){let r=tt(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let n=h*h*(1-i*i/(l*l));n>0&&(n=Math.sqrt(n)),n=h-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a},"cylinder"),ei=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:l}=await tK(t,e,tW(e)),h=s.width/2+l,{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=t.circle(0,0,2*h,i);(r=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",c)}else r=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0);return tj(e,r),e.intersect=function(t){return o.Rm.info("Circle intersect",e,h,t),tH(e,h,t)},a},"circle"),en=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:l}=await tK(t,e,tW(e)),h=s.width/2+l+5,c=s.width/2+l,{cssStyles:u}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{roughness:.2,strokeWidth:2.5}),n=th(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*h,i),s=t.circle(0,0,2*c,n);(r=a.insert("g",":first-child")).attr("class",e.cssClasses).attr("style",u),r.node()?.appendChild(o),r.node()?.appendChild(s)}else{let t=(r=a.insert("g",":first-child")).insert("circle",":first-child"),e=r.insert("circle");r.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return tj(e,r),e.intersect=function(t){return o.Rm.info("DoubleCircle intersect",e,h,t),tH(e,h,t)},a},"doublecircle"),ea=(0,o.K2)((t,e,r,i)=>`M${t-i/2},${e} L${t+r},${e} L${t+r},${e-i} L${t-i/2},${e-i} L${t},${e-i/2} Z`,"createPolygonPathD"),eo=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=ea(0,0,s,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),c&&r.attr("style",c)}else r=t8(a,s,l,h);return n&&r.attr("style",n),e.width=s+l,e.height=l,tj(e,r),e.intersect=function(t){return tZ(e,h,t)},a},"rect_left_inv_arrow"),es=(0,o.K2)((t,e,r)=>`M${t+r/2},${e} L${t+r},${e-r/2} L${t+r/2},${e-r} L${t},${e-r/2} Z`,"createDecisionBoxPathD"),el=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:s}=await tK(t,e,tW(e)),l=s.width+e.padding+(s.height+e.padding),h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=es(0,0,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),c&&r.attr("style",c)}else r=t8(a,l,l,h);return n&&r.attr("style",n),tj(e,r),e.intersect=function(t){return o.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",tZ(e,h,t)),tZ(e,h,t)},a},"question"),eh=(0,o.K2)((t,e,r,i,n)=>`M${t+n},${e} L${t+r-n},${e} L${t+r},${e-i/2} L${t+r-n},${e-i} L${t+n},${e-i} L${t},${e-i/2} Z`,"createHexagonPathD"),ec=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.height+e.padding,l=s/4,h=o.width+2*l+e.padding,c=[{x:l,y:0},{x:h-l,y:0},{x:h,y:-s/2},{x:h-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=eh(0,0,h,s,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${s/2})`),u&&r.attr("style",u)}else r=t8(a,h,s,c);return n&&r.attr("style",n),e.width=h,e.height=s,tj(e,r),e.intersect=function(t){return tZ(e,c,t)},a},"hexagon"),eu=(0,o.K2)((t,e,r,i)=>`M${t-2*i/6},${e} L${t+r-i/6},${e} L${t+r+2*i/6},${e-i} L${t+i/6},${e-i} Z`,"createLeanRightPathD"),ed=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=eu(0,0,s,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),c&&r.attr("style",c)}else r=t8(a,s,l,h);return n&&r.attr("style",n),e.width=s,e.height=l,tj(e,r),e.intersect=function(t){return tZ(e,h,t)},a},"lean_right"),ep=(0,o.K2)((t,e,r,i)=>`M${t+2*i/6},${e} L${t+r+i/6},${e} L${t+r-2*i/6},${e-i} L${t-i/6},${e-i} Z`,"createLeanLeftPathD"),ef=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=ep(0,0,s,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),c&&r.attr("style",c)}else r=t8(a,s,l,h);return n&&r.attr("style",n),e.width=s,e.height=l,tj(e,r),e.intersect=function(t){return tZ(e,h,t)},a},"lean_left"),eg=(0,o.K2)((t,e,r,i)=>`M${t-2*i/6},${e} L${t+r+2*i/6},${e} L${t+r-i/6},${e-i} L${t+i/6},${e-i} Z`,"createTrapezoidPathD"),ey=(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=eg(0,0,s,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),c&&r.attr("style",c)}else r=t8(a,s,l,h);return n&&r.attr("style",n),e.width=s,e.height=l,tj(e,r),e.intersect=function(t){return tZ(e,h,t)},a},"trapezoid"),em=(0,o.K2)((t,e,r,i)=>`M${t+i/6},${e} L${t+r-i/6},${e} L${t+r+2*i/6},${e-i} L${t-2*i/6},${e-i} Z`,"createInvertedTrapezoidPathD"),ex={state:tX,stateStart:t0,stateEnd:t1,fork:t2,join:t2,choice:t3,note:t5,roundedRect:tQ,rectWithTitle:t4,squareRect:tJ,stadium:t6,subroutine:t9,cylinder:er,circle:ei,doublecircle:en,odd:eo,diamond:el,hexagon:ec,lean_right:ed,lean_left:ef,trapezoid:ey,inv_trapezoid:(0,o.K2)(async(t,e)=>{let r;let{labelStyles:i,nodeStyles:n}=tl(e);e.labelStyle=i;let{shapeSvg:a,bbox:o}=await tK(t,e,tW(e)),s=o.width+e.padding,l=o.height+e.padding,h=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=J.svg(a),i=th(e,{}),n=em(0,0,s,l),o=t.path(n,i);r=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),c&&r.attr("style",c)}else r=t8(a,s,l,h);return n&&r.attr("style",n),e.width=s,e.height=l,tj(e,r),e.intersect=function(t){return tZ(e,h,t)},a},"inv_trapezoid"),labelRect:(0,o.K2)(async(t,e)=>{let{shapeSvg:r}=await tK(t,e,"label"),i=r.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),tj(e,i),e.intersect=function(t){return tt(e,t)},r},"labelRect")},eb=new Map,eC=(0,o.K2)(async(t,e,r)=>{let i,n;if("rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),e.link){let a;"sandbox"===(0,o.D7)().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),n=await ex[e.shape](i,e,r)}else i=n=await ex[e.shape](t,e,r);return e.tooltip&&n.attr("title",e.tooltip),eb.set(e.id,i),e.haveCallback&&eb.get(e.id).attr("class",eb.get(e.id).attr("class")+" clickable"),i},"insertNode"),ek=(0,o.K2)((t,e)=>{eb.set(e.id,t)},"setNodeElem"),e_=(0,o.K2)(()=>{eb.clear()},"clear"),ew=(0,o.K2)(t=>{let e=eb.get(t.id);o.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},57014:(t,e,r)=>{"use strict";r.d(e,{XX:()=>h,q7:()=>c,sO:()=>l});var i=r(93510),n=r(67027),a=r(72912),o={common:a.Y2,getConfig:a.zj,insertCluster:i.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:i.on,interpolateToCurve:n.Ib,labelHelper:i.Zk,log:a.Rm,positionEdgeLabel:i.T_},s={},l=(0,a.K2)(t=>{for(let e of t)s[e.name]=e},"registerLayoutLoaders");(0,a.K2)(()=>{l([{name:"dagre",loader:(0,a.K2)(async()=>await Promise.all([r.e(34166),r.e(62628),r.e(93422)]).then(r.bind(r,93422)),"loader")}])},"registerDefaultLayoutLoaders")();var h=(0,a.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in s))throw Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=s[t.layoutAlgorithm];return(await r.loader()).render(t,e,o,{algorithm:r.algorithm})},"render"),c=(0,a.K2)((t="",{fallback:e="dagre"}={})=>{if(t in s)return t;if(e in s)return a.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},7293:(t,e,r)=>{"use strict";r.d(e,{A:()=>nf});var i,n=r(90492),a=r(57014);r(93510),r(16470),r(27923);var o=r(67027),s=r(26873),l=r(93491),h=r(72912),c=r(97597),u=r(89601),d="comm",p="rule",f="decl",g=Math.abs,y=String.fromCharCode;function m(t,e,r){return t.replace(e,r)}function x(t,e){return 0|t.charCodeAt(e)}function b(t,e,r){return t.slice(e,r)}function C(t){return t.length}function k(t,e){return e.push(t),t}function _(t,e){for(var r="",i=0;i0?f[_]+" "+w:m(w,/&\f/g,f[_])).trim())&&(l[k++]=v);return L(t,e,r,0===n?p:s,l,h,c,u)}function D(t,e,r,i,n){return L(t,e,r,f,b(t,0,i),b(t,i+1,-1),i,n)}var R=r(31234),z=r(77083),q={id:"c4",detector:(0,h.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.K2)(async()=>{let{diagram:t}=await r.e(5423).then(r.bind(r,5423));return{id:"c4",diagram:t}},"loader")},N="flowchart",P=(0,h.K2)((t,e)=>e?.flowchart?.defaultRenderer!=="dagre-wrapper"&&e?.flowchart?.defaultRenderer!=="elk"&&/^\s*graph/.test(t),"detector"),K=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(82648),r.e(32699)]).then(r.bind(r,32699));return{id:N,diagram:t}},"loader"),j={id:N,detector:P,loader:K},W="flowchart-v2",U=(0,h.K2)((t,e)=>e?.flowchart?.defaultRenderer!=="dagre-d3"&&(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),!!/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"||/^\s*flowchart/.test(t)),"detector"),H=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(82648),r.e(32699)]).then(r.bind(r,32699));return{id:W,diagram:t}},"loader"),Y={id:W,detector:U,loader:H},G={id:"er",detector:(0,h.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(62628),r.e(95366)]).then(r.bind(r,95366));return{id:"er",diagram:t}},"loader")},Z="gitGraph",V=(0,h.K2)(t=>/^\s*gitGraph/.test(t),"detector"),X=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(5165),r.e(89701)]).then(r.bind(r,89701));return{id:Z,diagram:t}},"loader"),Q={id:Z,detector:V,loader:X},J="gantt",tt=(0,h.K2)(t=>/^\s*gantt/.test(t),"detector"),te=(0,h.K2)(async()=>{let{diagram:t}=await r.e(99671).then(r.bind(r,99671));return{id:J,diagram:t}},"loader"),tr={id:J,detector:tt,loader:te},ti="info",tn=(0,h.K2)(t=>/^\s*info/.test(t),"detector"),ta=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(5165),r.e(23952)]).then(r.bind(r,23952));return{id:ti,diagram:t}},"loader"),to={id:ti,detector:tn,loader:ta},ts={id:"pie",detector:(0,h.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(5165),r.e(64039)]).then(r.bind(r,86420));return{id:"pie",diagram:t}},"loader")},tl="quadrantChart",th=(0,h.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),tc=(0,h.K2)(async()=>{let{diagram:t}=await r.e(33746).then(r.bind(r,33746));return{id:tl,diagram:t}},"loader"),tu={id:tl,detector:th,loader:tc},td="xychart",tp=(0,h.K2)(t=>/^\s*xychart-beta/.test(t),"detector"),tf=(0,h.K2)(async()=>{let{diagram:t}=await r.e(3313).then(r.bind(r,3313));return{id:td,diagram:t}},"loader"),tg={id:td,detector:tp,loader:tf},ty="requirement",tm=(0,h.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),tx=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(62628),r.e(13682)]).then(r.bind(r,13682));return{id:ty,diagram:t}},"loader"),tb={id:ty,detector:tm,loader:tx},tC="sequence",tk=(0,h.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),t_=(0,h.K2)(async()=>{let{diagram:t}=await r.e(18681).then(r.bind(r,18681));return{id:tC,diagram:t}},"loader"),tw={id:tC,detector:tk,loader:t_},tv="class",tT=(0,h.K2)((t,e)=>e?.class?.defaultRenderer!=="dagre-wrapper"&&/^\s*classDiagram/.test(t),"detector"),tA=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(62628),r.e(30102),r.e(93951)]).then(r.bind(r,93951));return{id:tv,diagram:t}},"loader"),tS={id:tv,detector:tT,loader:tA},tB="classDiagram",tM=(0,h.K2)((t,e)=>!!/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"||/^\s*classDiagram-v2/.test(t),"detector"),tL=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(62628),r.e(82648),r.e(30102),r.e(96720),r.e(94228)]).then(r.bind(r,94228));return{id:tB,diagram:t}},"loader"),tF={id:tB,detector:tM,loader:tL},tE="state",t$=(0,h.K2)((t,e)=>e?.state?.defaultRenderer!=="dagre-wrapper"&&/^\s*stateDiagram/.test(t),"detector"),tO=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(62628),r.e(82648),r.e(56160),r.e(6473)]).then(r.bind(r,6473));return{id:tE,diagram:t}},"loader"),tI={id:tE,detector:t$,loader:tO},tD="stateDiagram",tR=(0,h.K2)((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),tz=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(82648),r.e(56160),r.e(2805)]).then(r.bind(r,2805));return{id:tD,diagram:t}},"loader"),tq={id:tD,detector:tR,loader:tz},tN="journey",tP=(0,h.K2)(t=>/^\s*journey/.test(t),"detector"),tK=(0,h.K2)(async()=>{let{diagram:t}=await r.e(38561).then(r.bind(r,38561));return{id:tN,diagram:t}},"loader"),tj={id:tN,detector:tP,loader:tK},tW={draw:(0,h.K2)((t,e,r)=>{h.Rm.debug("rendering svg for syntax error\n");let i=(0,l.D)(e),n=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,h.a$)(i,100,512,!0),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}`)},"draw")},tU={db:{},renderer:tW,parser:{parse:(0,h.K2)(()=>{},"parse")}},tH="flowchart-elk",tY=(0,h.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk")&&(e.layout="elk",!0),"detector"),tG=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(82648),r.e(32699)]).then(r.bind(r,32699));return{id:tH,diagram:t}},"loader"),tZ={id:tH,detector:tY,loader:tG},tV="timeline",tX=(0,h.K2)(t=>/^\s*timeline/.test(t),"detector"),tQ=(0,h.K2)(async()=>{let{diagram:t}=await r.e(5781).then(r.bind(r,5781));return{id:tV,diagram:t}},"loader"),tJ={id:tV,detector:tX,loader:tQ},t0="mindmap",t1=(0,h.K2)(t=>/^\s*mindmap/.test(t),"detector"),t2=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(60359),r.e(61210)]).then(r.bind(r,61210));return{id:t0,diagram:t}},"loader"),t3={id:t0,detector:t1,loader:t2},t5="sankey",t6=(0,h.K2)(t=>/^\s*sankey-beta/.test(t),"detector"),t4=(0,h.K2)(async()=>{let{diagram:t}=await r.e(46240).then(r.bind(r,46240));return{id:t5,diagram:t}},"loader"),t8={id:t5,detector:t6,loader:t4},t9="packet",t7=(0,h.K2)(t=>/^\s*packet-beta/.test(t),"detector"),et=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(5165),r.e(81598)]).then(r.bind(r,81598));return{id:t9,diagram:t}},"loader"),ee={id:t9,detector:t7,loader:et},er="block",ei=(0,h.K2)(t=>/^\s*block-beta/.test(t),"detector"),en=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(82648),r.e(96720),r.e(96026)]).then(r.bind(r,73645));return{id:er,diagram:t}},"loader"),ea={id:er,detector:ei,loader:en},eo="architecture",es=(0,h.K2)(t=>/^\s*architecture/.test(t),"detector"),el=(0,h.K2)(async()=>{let{diagram:t}=await Promise.all([r.e(34166),r.e(5165),r.e(60359),r.e(2172)]).then(r.bind(r,2172));return{id:eo,diagram:t}},"loader"),eh={id:eo,detector:es,loader:el},ec=!1,eu=(0,h.K2)(()=>{ec||(ec=!0,(0,h.Js)("error",tU,t=>"error"===t.toLowerCase().trim()),(0,h.Js)("---",{db:{clear:(0,h.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.K2)(()=>{},"draw")},parser:{parse:(0,h.K2)(()=>{throw 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")},"parse")},init:(0,h.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,h.Xd)(q,tF,tS,G,tr,to,ts,tb,tw,tZ,Y,j,t3,tJ,Q,tq,tI,tj,tu,t8,ee,tg,ea,eh))},"addDiagrams"),ed=(0,h.K2)(async()=>{h.Rm.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(h.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,h.Gs)(t)}catch{try{let{diagram:t,id:i}=await r();(0,h.Js)(i,t,e)}catch(e){throw h.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete h.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){for(let e of(h.Rm.error(`Failed to load ${t.length} external diagrams`),t))h.Rm.error(e);throw Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ep(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ef(t,e,r,i){if(void 0!==t.insert){if(r){let e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){let r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,h.K2)(ep,"setA11yDiagramInfo"),(0,h.K2)(ef,"addSVGa11yTitleDescription");var eg=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,h.K2)(this,"Diagram")}static async fromText(e,r={}){let i=(0,h.zj)(),n=(0,h.Ch)(e,i);e=(0,o.C4)(e)+"\n";try{(0,h.Gs)(n)}catch{let t=(0,h.J$)(n);if(!t)throw new h.C0(`Diagram ${n} not found.`);let{id:e,diagram:r}=await t();(0,h.Js)(e,r)}let{db:a,parser:s,renderer:l,init:c}=(0,h.Gs)(n);return s.parser&&(s.parser.yy=a),a.clear?.(),c?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(n,e,a,s,l)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ey=[],em=(0,h.K2)(()=>{ey.forEach(t=>{t()}),ey=[]},"attachFunctions"),ex=(0,h.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function eb(t){return null==t}function eC(t){return"object"==typeof t&&null!==t}function ek(t,e){var r,i="";for(r=0;rs&&(e=i-s+(a=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:i-e+a.length}}function eS(t,e){return ew.repeat(" ",e-t.length)+t}function eB(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],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 o,s,l,h="",c=Math.min(t.line+e.linesAfter,n.length).toString().length,u=e.maxLength-(e.indent+c+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=eA(t.buffer,i[a-s],n[a-s],t.position-(i[a]-i[a-s]),u),h=ew.repeat(" ",e.indent)+eS((t.line-s+1).toString(),c)+" | "+l.str+"\n"+h;for(l=eA(t.buffer,i[a],n[a],t.position,u),h+=ew.repeat(" ",e.indent)+eS((t.line+1).toString(),c)+" | "+l.str+"\n"+ew.repeat("-",e.indent+c+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=n.length);s++)l=eA(t.buffer,i[a+s],n[a+s],t.position-(i[a]-i[a+s]),u),h+=ew.repeat(" ",e.indent)+eS((t.line+s+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,h.K2)(ev,"formatError"),(0,h.K2)(eT,"YAMLException$1"),eT.prototype=Object.create(Error.prototype),eT.prototype.constructor=eT,eT.prototype.toString=(0,h.K2)(function(t){return this.name+": "+ev(this,t)},"toString"),(0,h.K2)(eA,"getLine"),(0,h.K2)(eS,"padStart"),(0,h.K2)(eB,"makeSnippet");var eM=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],eL=["scalar","sequence","mapping"];function eF(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function eE(t,e){if(Object.keys(e=e||{}).forEach(function(e){if(-1===eM.indexOf(e))throw new eT('Unknown option "'+e+'" 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(t){return t},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=eF(e.styleAliases||null),-1===eL.indexOf(this.kind))throw new eT('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function e$(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function eO(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,h.K2)(i,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,h.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,h.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,h.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),eQ=RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function eJ(t){return!!(null!==t&&eQ.test(t)&&"_"!==t[t.length-1])}function e0(t){var e,r;return(r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e)?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,h.K2)(eJ,"resolveYamlFloat"),(0,h.K2)(e0,"constructYamlFloat");var e1=/^[-+]?[0-9]+e/;function e2(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(ew.isNegativeZero(t))return"-0.0";return r=t.toString(10),e1.test(r)?r.replace("e",".e"):r}function e3(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ew.isNegativeZero(t))}(0,h.K2)(e2,"representYamlFloat"),(0,h.K2)(e3,"isFloat");var e5=new eE("tag:yaml.org,2002:float",{kind:"scalar",resolve:eJ,construct:e0,predicate:e3,represent:e2,defaultStyle:"lowercase"}),e6=eD.extend({implicit:[eN,eW,eX,e5]}),e4=RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),e8=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 e9(t){return null!==t&&(null!==e4.exec(t)||null!==e8.exec(t))}function e7(t){var e,r,i,n,a,o,s,l,h=0,c=null;if(null===(e=e4.exec(t))&&(e=e8.exec(t)),null===e)throw 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(a=+e[4],o=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=(60*+e[10]+ +(e[11]||0))*6e4,"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,n,a,o,s,h)),c&&l.setTime(l.getTime()-c),l}function rt(t){return t.toISOString()}(0,h.K2)(e9,"resolveYamlTimestamp"),(0,h.K2)(e7,"constructYamlTimestamp"),(0,h.K2)(rt,"representYamlTimestamp");var re=new eE("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:e9,construct:e7,instanceOf:Date,represent:rt});function rr(t){return"<<"===t||null===t}(0,h.K2)(rr,"resolveYamlMerge");var ri=new eE("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rr}),rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ra(t){if(null===t)return!1;var e,r,i=0,n=t.length;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function ro(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,a=0,o=[];for(e=0;e>16&255),o.push(a>>8&255),o.push(255&a)),a=a<<6|rn.indexOf(i.charAt(e));return 0==(r=n%4*6)?(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)):18===r?(o.push(a>>10&255),o.push(a>>2&255)):12===r&&o.push(a>>4&255),new Uint8Array(o)}function rs(t){var e,r,i="",n=0,a=t.length;for(e=0;e>18&63]+rn[n>>12&63]+rn[n>>6&63]+rn[63&n]),n=(n<<8)+t[e];return 0==(r=a%3)?i+=rn[n>>18&63]+rn[n>>12&63]+rn[n>>6&63]+rn[63&n]:2===r?i+=rn[n>>10&63]+rn[n>>4&63]+rn[n<<2&63]+rn[64]:1===r&&(i+=rn[n>>2&63]+rn[n<<4&63]+rn[64]+rn[64]),i}function rl(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,h.K2)(ra,"resolveYamlBinary"),(0,h.K2)(ro,"constructYamlBinary"),(0,h.K2)(rs,"representYamlBinary"),(0,h.K2)(rl,"isBinary");var rh=new eE("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ra,construct:ro,predicate:rl,represent:rs}),rc=Object.prototype.hasOwnProperty,ru=Object.prototype.toString;function rd(t){if(null===t)return!0;var e,r,i,n,a,o=[];for(e=0,r=t.length;e>10)+55296,(t-65536&1023)+56320)}(0,h.K2)(rL,"_class"),(0,h.K2)(rF,"is_EOL"),(0,h.K2)(rE,"is_WHITE_SPACE"),(0,h.K2)(r$,"is_WS_OR_EOL"),(0,h.K2)(rO,"is_FLOW_INDICATOR"),(0,h.K2)(rI,"fromHexCode"),(0,h.K2)(rD,"escapedHexLen"),(0,h.K2)(rR,"fromDecimalCode"),(0,h.K2)(rz,"simpleEscapeSequence"),(0,h.K2)(rq,"charFromCodepoint");var rN=Array(256),rP=Array(256);for(i=0;i<256;i++)rN[i]=rz(i)?1:0,rP[i]=rz(i);function rK(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||rw,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 rj(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=eB(r),new eT(e,r)}function rW(t,e){throw rj(t,e)}function rU(t,e){t.onWarning&&t.onWarning.call(null,rj(t,e))}(0,h.K2)(rK,"State$1"),(0,h.K2)(rj,"generateError"),(0,h.K2)(rW,"throwError"),(0,h.K2)(rU,"throwWarning");var rH={YAML:(0,h.K2)(function(t,e,r){var i,n,a;null!==t.version&&rW(t,"duplication of %YAML directive"),1!==r.length&&rW(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&rW(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),a=parseInt(i[2],10),1!==n&&rW(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&rU(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,h.K2)(function(t,e,r){var i,n;2!==r.length&&rW(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],rB.test(i)||rW(t,"ill-formed tag handle (first argument) of the TAG directive"),rv.call(t.tagMap,i)&&rW(t,'there is a previously declared suffix for "'+i+'" tag handle'),rM.test(n)||rW(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(e){rW(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n},"handleTagDirective")};function rY(t,e,r,i){var n,a,o,s;if(e1&&(t.result+=ew.repeat("\n",e-1))}function r0(t,e,r){var i,n,a,o,s,l,h,c,u=t.kind,d=t.result;if(r$(c=t.input.charCodeAt(t.position))||rO(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c||(63===c||45===c)&&(r$(i=t.input.charCodeAt(t.position+1))||r&&rO(i)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,o=!1;0!==c;){if(58===c){if(r$(i=t.input.charCodeAt(t.position+1))||r&&rO(i))break}else if(35===c){if(r$(t.input.charCodeAt(t.position-1)))break}else if(t.position===t.lineStart&&rQ(t)||r&&rO(c))break;else if(rF(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,rX(t,!1,-1),t.lineIndent>=e){o=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=h;break}o&&(rY(t,n,a,!1),rJ(t,t.line-s),n=a=t.position,o=!1),rE(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return rY(t,n,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function r1(t,e){var r,i,n;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(rY(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,n=t.position}else rF(r)?(rY(t,i,n,!0),rJ(t,rX(t,!1,e)),i=n=t.position):t.position===t.lineStart&&rQ(t)?rW(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);rW(t,"unexpected end of the stream within a single quoted scalar")}function r2(t,e){var r,i,n,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return rY(t,r,t.position,!0),t.position++,!0;if(92===s){if(rY(t,r,t.position,!0),rF(s=t.input.charCodeAt(++t.position)))rX(t,!1,e);else if(s<256&&rN[s])t.result+=rP[s],t.position++;else if((o=rD(s))>0){for(n=o,a=0;n>0;n--)(o=rI(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:rW(t,"expected hexadecimal character");t.result+=rq(a),t.position++}else rW(t,"unknown escape sequence");r=i=t.position}else rF(s)?(rY(t,r,i,!0),rJ(t,rX(t,!1,e)),r=i=t.position):t.position===t.lineStart&&rQ(t)?rW(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}rW(t,"unexpected end of the stream within a double quoted scalar")}function r3(t,e){var r,i,n,a,o,s,l,h,c,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,h=!1,a=[];else{if(123!==p)return!1;o=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(rX(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;f?44===p&&rW(t,"expected the node content, but found ','"):rW(t,"missed comma between flow collection entries"),u=c=d=null,s=l=!1,63===p&&r$(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,rX(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,it(t,e,1,!1,!0),u=t.tag,c=t.result,rX(t,!0,e),p=t.input.charCodeAt(t.position),(l||t.line===r)&&58===p&&(s=!0,p=t.input.charCodeAt(++t.position),rX(t,!0,e),it(t,e,1,!1,!0),d=t.result),h?rZ(t,a,m,u,c,d,r,i,n):s?a.push(rZ(t,null,m,u,c,d,r,i,n)):a.push(c),rX(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}rW(t,"unexpected end of the stream within a flow collection")}function r5(t,e){var r,i,n,a,o=1,s=!1,l=!1,h=e,c=0,u=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:rW(t,"repeat of a chomping mode identifier");else if((n=rR(a))>=0)0===n?rW(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?rW(t,"repeat of an indentation width identifier"):(h=e+n-1,l=!0);else break;if(rE(a)){do a=t.input.charCodeAt(++t.position);while(rE(a))if(35===a)do a=t.input.charCodeAt(++t.position);while(!rF(a)&&0!==a)}for(;0!==a;){for(rV(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndenth&&(h=t.lineIndent),rF(a)){c++;continue}if(t.lineIndente)&&0!==i)rW(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(o=t.line,s=t.lineStart,l=t.position),it(t,e,4,!0,n)&&(m?g=t.result:y=t.result),m||(rZ(t,d,p,f,g,y,o,s,l),f=g=y=null),rX(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)rW(t,"bad indentation of a mapping entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&rW(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):rW(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ie(t){var e,r,i,n,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(rX(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0)&&37===n);){for(o=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!r$(n);)n=t.input.charCodeAt(++t.position);for(r=t.input.slice(e,t.position),i=[],r.length<1&&rW(t,"directive name must not be less than one character in length");0!==n;){for(;rE(n);)n=t.input.charCodeAt(++t.position);if(35===n){do n=t.input.charCodeAt(++t.position);while(0!==n&&!rF(n))break}if(rF(n))break;for(e=t.position;0!==n&&!r$(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&rV(t),rv.call(rH,r)?rH[r](t,r,i):rU(t,'unknown document directive "'+r+'"')}if(rX(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,rX(t,!0,-1)):o&&rW(t,"directives end mark is expected"),it(t,t.lineIndent-1,4,!1,!0),rX(t,!0,-1),t.checkLineBreaks&&rA.test(t.input.slice(a,t.position))&&rU(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&rQ(t)){46===t.input.charCodeAt(t.position)&&(t.position+=3,rX(t,!0,-1));return}t.position=55296&&i<=56319&&e+1=56320&&r<=57343?(i-55296)*1024+r-56320+65536:i}function iv(t){return/^\n* /.test(t)}function iT(t,e,r,i,n,a,o,s){var l,h=0,c=null,u=!1,d=!1,p=-1!==i,f=-1,g=ik(iw(t,0))&&i_(iw(t,t.length-1));if(e||o)for(l=0;l=65536?l+=2:l++){if(!ix(h=iw(t,l)))return 5;g=g&&iC(h,c,s),c=h}else{for(l=0;l=65536?l+=2:l++){if(10===(h=iw(t,l)))u=!0,p&&(d=d||l-f-1>i&&" "!==t[f+1],f=l);else if(!ix(h))return 5;g=g&&iC(h,c,s),c=h}d=d||p&&l-f-1>i&&" "!==t[f+1]}return u||d?r>9&&iv(t)?5:o?2===a?5:2:d?4:3:!g||o||n(t)?2===a?5:2:1}function iA(t,e,r,i,n){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==il.indexOf(e)||ih.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),o=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return iy(t,e)}switch((0,h.K2)(l,"testAmbiguity"),iT(e,s,t.indent,o,l,t.quotingType,t.forceQuotes&&!i,n)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+iS(e,t.indent)+iB(ip(e,a));case 4:return">"+iS(e,t.indent)+iB(ip(iM(e,o),a));case 5:return'"'+iF(e)+'"';default:throw new eT("impossible error: invalid scalar style")}}()}function iS(t,e){var r=iv(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function iB(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function iM(t,e){for(var r,i,n,a=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,iL(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];n=a.exec(t);){var l=n[1],h=n[2];i=" "===h[0],o+=l+(s||i||""===h?"":"\n")+iL(h,e),s=i}return o}function iL(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,a=0,o=0,s=0,l="";r=n.exec(t);)(s=r.index)-a>e&&(i=o>a?o:s,l+="\n"+t.slice(a,i),a=i+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function iF(t){for(var e,r="",i=0,n=0;n=65536?n+=2:n++)!(e=is[i=iw(t,n)])&&ix(i)?(r+=t[n],i>=65536&&(r+=t[n+1])):r+=e||iu(i);return r}function iE(t,e,r){var i,n,a,o="",s=t.tag;for(i=0,n=r.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),iR(t,e,o,!1,!1)&&(s+=t.dump,l+=s));t.tag=h,t.dump="{"+l+"}"}function iI(t,e,r,i){var n,a,o,s,l,h,c="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new eT("sortKeys must be a boolean or a function");for(n=0,a=d.length;n1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=ig(t,e)),iR(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,c+=h));t.tag=u,t.dump=c||"{}"}function iD(t,e,r){var i,n,a,o,s,l;for(a=0,o=(n=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');t.dump=i}return!0}return!1}function iR(t,e,r,i,n,a,o){t.tag=null,t.dump=r,iD(t,r,!1)||iD(t,r,!0);var s=ia.call(t.dump),l=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var h,c,u,d="[object Object]"===s||"[object Array]"===s;if(d&&(u=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(n=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(d&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===s)i&&0!==Object.keys(t.dump).length?(iI(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(iO(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===s)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?i$(t,e-1,t.dump,n):i$(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(iE(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object String]"===s)"?"!==t.tag&&iA(t,t.dump,e,a,l);else{if("[object Undefined]"===s||t.skipInvalid)return!1;throw new eT("unacceptable kind of an object to dump "+s)}null!==t.tag&&"?"!==t.tag&&(h=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),h="!"===t.tag[0]?"!"+h:"tag:yaml.org,2002:"===h.slice(0,18)?"!!"+h.slice(18):"!<"+h+">",t.dump=h+" "+t.dump)}return!0}function iz(t,e){var r,i,n=[],a=[];for(iq(t,n,a),r=0,i=a.length;rt.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ij=(0,h.K2)(t=>{let{text:e,metadata:r}=iP(t),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:e}},"processFrontmatter"),iW=(0,h.K2)(t=>{let e=o._K.detectInit(t)??{},r=o._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):r?.type==="wrap"&&(e.wrap=!0),{text:(0,o.vU)(t),directive:e}},"processDirectives");function iU(t){let e=ij(iK(t)),r=iW(e.text),i=(0,o.$t)(e.config,r.directive);return{code:t=ex(r.text),title:e.title,config:i}}function iH(t){return btoa(Array.from(new TextEncoder().encode(t),t=>String.fromCodePoint(t)).join(""))}(0,h.K2)(iU,"preprocessDiagram"),(0,h.K2)(iH,"toBase64");var iY=["foreignobject"],iG=["dominant-baseline"];function iZ(t){let e=iU(t);return(0,h.cL)(),(0,h.xA)(e.config??{}),e}async function iV(t,e){eu();try{let{code:e,config:r}=iZ(t);return{diagramType:(await i8(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,h.K2)(iZ,"processAndSetConfigs"),(0,h.K2)(iV,"parse");var iX=(0,h.K2)((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),iQ=(0,h.K2)((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=` ${t.themeCSS}`),void 0!==t.fontFamily&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let i=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,z.A)(t.styles)||i.forEach(e=>{r+=iX(t.id,e,t.styles)}),(0,z.A)(t.textStyles)||(r+=iX(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),iJ=(0,h.K2)((t,e,r,i)=>{var n,a,o;let s=iQ(t,r),l=(0,h.tM)(e,s,t.themeVariables);return _((o=function t(e,r,i,n,a,o,s,l,h){for(var c,u,p,f=0,_=0,w=s,A=0,R=0,z=0,q=1,N=1,P=1,K=0,j="",W=a,U=o,H=n,Y=j;N;)switch(z=K,K=F()){case 40:if(108!=z&&58==x(Y,w-1)){-1!=(u=Y+=m(O(K),"&","&\f"),p=g(f?l[f-1]:0),u.indexOf("&\f",p))&&(P=-1);break}case 34:case 39:case 91:Y+=O(K);break;case 9:case 10:case 13:case 32:Y+=function(t){for(;B=E();)if(B<33)F();else break;return $(t)>2||$(B)>3?"":" "}(z);break;case 92:Y+=function(t,e){for(var r;--e&&F()&&!(B<48)&&!(B>102)&&(!(B>57)||!(B<65))&&(!(B>70)||!(B<97)););return r=S+(e<6&&32==E()&&32==F()),b(M,t,r)}(S-1,7);continue;case 47:switch(E()){case 42:case 47:k(L(c=function(t,e){for(;F();)if(t+B===57)break;else if(t+B===84&&47===E())break;return"/*"+b(M,e,S-1)+"*"+y(47===t?t:F())}(F(),S),r,i,d,y(B),b(c,2,-2),0,h),h),(5==$(z||1)||5==$(E()||1))&&C(Y)&&" "!==b(Y,-1,void 0)&&(Y+=" ");break;default:Y+="/"}break;case 123*q:l[f++]=C(Y)*P;case 125*q:case 59:case 0:switch(K){case 0:case 125:N=0;case 59+_:-1==P&&(Y=m(Y,/\f/g,"")),R>0&&(C(Y)-w||0===q&&47===z)&&k(R>32?D(Y+";",n,i,w-1,h):D(m(Y," ","")+";",n,i,w-2,h),h);break;case 59:Y+=";";default:if(k(H=I(Y,r,i,f,_,a,l,j,W=[],U=[],w,o),o),123===K){if(0===_)t(Y,r,H,H,W,o,w,l,U);else switch(99===A&&110===x(Y,3)?100:A){case 100:case 108:case 109:case 115:t(e,H,H,n&&k(I(e,H,H,0,0,a,l,j,a,W=[],w,U),U),a,U,w,l,n?W:U);break;default:t(Y,H,H,H,[""],U,0,l,U)}}}f=_=R=0,q=P=1,j=Y="",w=s;break;case 58:w=1+C(Y),R=z;default:if(q<1){if(123==K)--q;else if(125==K&&0==q++&&125==(B=S>0?x(M,--S):0,T--,10===B&&(T=1,v--),B))continue}switch(Y+=y(K),K*q){case 38:P=_>0?1:(Y+="\f",-1);break;case 44:l[f++]=(C(Y)-1)*P,P=1;break;case 64:45===E()&&(Y+=O(F())),A=E(),_=w=C(j=Y+=function(t){for(;!$(E());)F();return b(M,t,S)}(S)),K++;break;case 45:45===z&&2==C(Y)&&(q=0)}}return o}("",null,null,null,[""],(a=n=`${i}{${l}}`,v=T=1,A=C(M=a),S=0,n=[]),0,[0],n),M="",o),w)},"createUserStyles"),i0=(0,h.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=(0,o.Sm)(i)).replace(/
    /g,"
    ")},"cleanUpSvgCode"),i1=(0,h.K2)((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%",i=iH(`${t}`);return``},"putIntoIFrame"),i2=(0,h.K2)((t,e,r,i,n)=>{let a=t.append("div");a.attr("id",r),i&&a.attr("style",i);let o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function i3(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.K2)(i3,"sandboxedIframe");var i5=(0,h.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),i6=(0,h.K2)(async function(t,e,r){let i,n;eu();let a=iZ(e);e=a.code;let o=(0,h.zj)();h.Rm.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let l="#"+t,c="i"+t,d="#"+c,p="d"+t,f="#"+p,g=(0,h.K2)(()=>{let t=m?d:f,e=(0,u.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements"),y=(0,u.Ltv)("body"),m="sandbox"===o.securityLevel,x="loose"===o.securityLevel,b=o.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),m){let t=i3((0,u.Ltv)(r),c);(y=(0,u.Ltv)(t.nodes()[0].contentDocument.body)).node().style.margin=0}else y=(0,u.Ltv)(r);i2(y,t,p,`font-family: ${b}`,"http://www.w3.org/1999/xlink")}else{if(i5(document,t,p,c),m){let t=i3((0,u.Ltv)("body"),c);(y=(0,u.Ltv)(t.nodes()[0].contentDocument.body)).node().style.margin=0}else y=(0,u.Ltv)("body");i2(y,t,p)}try{i=await eg.fromText(e,{title:a.title})}catch(t){if(o.suppressErrorRendering)throw g(),t;i=await eg.fromText("error"),n=t}let C=y.select(f).node(),k=i.type,_=C.firstChild,w=_.firstChild,v=iJ(o,k,i.renderer.getClasses?.(e,i),l),T=document.createElement("style");T.innerHTML=v,_.insertBefore(T,w);try{await i.renderer.draw(e,t,s.r,i)}catch(r){throw o.suppressErrorRendering?g():tW.draw(e,t,s.r),r}i9(k,y.select(`${f} svg`),i.db.getAccTitle?.(),i.db.getAccDescription?.()),y.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let A=y.select(f).node().innerHTML;if(h.Rm.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),A=i0(A,m,(0,h._3)(o.arrowMarkerAbsolute)),m?A=i1(A,y.select(f+" svg").node()):x||(A=R.sanitize(A,{ADD_TAGS:iY,ADD_ATTR:iG})),em(),n)throw n;return g(),{diagramType:k,svg:A,bindFunctions:i.db.bindFunctions}},"render");function i4(t={}){let e=(0,h.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,h.wZ)(e),e?.theme&&e.theme in h.H$?e.themeVariables=h.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=h.H$.default.getThemeVariables(e.themeVariables));let r="object"==typeof e?(0,h.UU)(e):(0,h.Q2)();(0,h.He)(r.logLevel),eu()}(0,h.K2)(i4,"initialize");var i8=(0,h.K2)((t,e={})=>{let{code:r}=iU(t);return eg.fromText(r,e)},"getDiagramFromText");function i9(t,e,r,i){ep(e,t),ef(e,r,i,e.attr("id"))}(0,h.K2)(i9,"addA11yInfo");var i7=Object.freeze({render:i6,parse:iV,getDiagramFromText:i8,initialize:i4,getConfig:h.zj,setConfig:h.Nk,getSiteConfig:h.Q2,updateSiteConfig:h.B6,reset:(0,h.K2)(()=>{(0,h.cL)()},"reset"),globalReset:(0,h.K2)(()=>{(0,h.cL)(h.sb)},"globalReset"),defaultConfig:h.sb});(0,h.He)((0,h.zj)().logLevel),(0,h.cL)((0,h.zj)());var nt=(0,h.K2)((t,e,r)=>{h.Rm.warn(t),(0,o.dq)(t)?(r&&r(t.str,t.hash),e.push({...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}))},"handleError"),ne=(0,h.K2)(async function(t={querySelector:".mermaid"}){try{await nr(t)}catch(e){if((0,o.dq)(e)&&h.Rm.error(e.str),np.parseError&&np.parseError(e),!t.suppressErrors)throw h.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),nr=(0,h.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i,n;let a=i7.getConfig();if(h.Rm.debug(`${t?"":"No "}Callback function found`),r)i=r;else if(e)i=document.querySelectorAll(e);else throw Error("Nodes and querySelector are both undefined");h.Rm.debug(`Found ${i.length} diagrams`),a?.startOnLoad!==void 0&&(h.Rm.debug("Start On Load: "+a?.startOnLoad),i7.updateSiteConfig({startOnLoad:a?.startOnLoad}));let s=new o._K.InitIDGenerator(a.deterministicIds,a.deterministicIDSeed),l=[];for(let e of Array.from(i)){if(h.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");let r=`mermaid-${s.next()}`;n=e.innerHTML,n=(0,c.T)(o._K.entityDecode(n)).trim().replace(//gi,"
    ");let i=o._K.detectInit(n);i&&h.Rm.debug("Detected early reinit: ",i);try{let{svg:i,bindFunctions:a}=await nd(r,n,e);e.innerHTML=i,t&&await t(r),a&&a(e)}catch(t){nt(t,l,np.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),ni=(0,h.K2)(function(t){i7.initialize(t)},"initialize"),nn=(0,h.K2)(async function(t,e,r){h.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&ni(t);let i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ne(i)},"init"),na=(0,h.K2)(async(t,{lazyLoad:e=!0}={})=>{eu(),(0,h.Xd)(...t),!1===e&&await ed()},"registerExternalDiagrams"),no=(0,h.K2)(function(){if(np.startOnLoad){let{startOnLoad:t}=i7.getConfig();t&&np.run().catch(t=>h.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",no,!1);var ns=(0,h.K2)(function(t){np.parseError=t},"setParseErrorHandler"),nl=[],nh=!1,nc=(0,h.K2)(async()=>{if(!nh){for(nh=!0;nl.length>0;){let t=nl.shift();if(t)try{await t()}catch(t){h.Rm.error("Error executing queue",t)}}nh=!1}},"executeQueue"),nu=(0,h.K2)(async(t,e)=>new Promise((r,i)=>{let n=(0,h.K2)(()=>new Promise((n,a)=>{i7.parse(t,e).then(t=>{n(t),r(t)},t=>{h.Rm.error("Error parsing",t),np.parseError?.(t),a(t),i(t)})}),"performCall");nl.push(n),nc().catch(i)}),"parse"),nd=(0,h.K2)((t,e,r)=>new Promise((i,n)=>{let a=(0,h.K2)(()=>new Promise((a,o)=>{i7.render(t,e,r).then(t=>{a(t),i(t)},t=>{h.Rm.error("Error parsing",t),np.parseError?.(t),o(t),n(t)})}),"performCall");nl.push(a),nc().catch(n)}),"render"),np={startOnLoad:!0,mermaidAPI:i7,parse:nu,render:nd,init:nn,run:ne,registerExternalDiagrams:na,registerLayoutLoaders:a.sO,initialize:ni,parseError:void 0,contentLoaded:no,setParseErrorHandler:ns,detectType:h.Ch,registerIconPacks:n.pC},nf=np}}]);