Files
mermaid-live-editor/_app/immutable/chunks/state.Ctxf--Md.js
T
2024-05-21 07:12:37 +00:00

110 lines
399 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__fileDeps=["./c4Diagram-ae766693.RvEES-NC.js","./svgDrawCommon-5e1cfd1d.pozgFIeC.js","./flowDiagram-b222e15a.B-f_vF-z.js","./flowDb-c1833063.BGGCUiQ-.js","./graph.oHerAG6A.js","./layout.DWTmgS8B.js","./styles-483fbfea.YZVHWjoK.js","./index-01f381cb.DI3V0v3B.js","./clone.BFBLiy4G.js","./edges-066a5561.BnpWTPha.js","./createText-ca0c5216.Dc-DFA02.js","./line.DmV4Ly5w.js","./array.BKyUJesY.js","./path.CbwjOpE9.js","./channel.BEcBKecD.js","./flowDiagram-v2-13329dc7.CFNrJn-F.js","./erDiagram-09d1c15f.zbUkJIFX.js","./ganttDiagram-b62c793e.t-lErHZr.js","./linear.dsDqF1Zp.js","./init.Gi6I4Gst.js","./pieDiagram-bb1d19e5.D_A8JDJI.js","./arc.Ds4gVDvy.js","./ordinal.BYWQX77i.js","./quadrantDiagram-c759a472.CiAdg45z.js","./xychartDiagram-f11f50a6.CfpOz-1V.js","./requirementDiagram-87253d64.Cxx8iCbW.js","./sequenceDiagram-6894f283.DWD6NMPb.js","./classDiagram-fb54d2a0.D61QWN4L.js","./styles-b83b31c9.K4qvRWcF.js","./classDiagram-v2-a2b738ad.Vntt9iuI.js","./stateDiagram-5dee940d.BXqLYkfk.js","./styles-0784dbeb.Cb0t4FtR.js","./stateDiagram-v2-1992cada.CmXvqvSE.js","./journeyDiagram-6625b456.CbVUl4RQ.js","./flowchart-elk-definition-ae0efee6.26INoDor.js","./timeline-definition-bf702344.Ci-ncL3e.js","./mindmap-definition-307c710a.Dl9XQUP7.js","./sankeyDiagram-707fac0f.BFW6pdLv.js","./Tableau10.B-NsZVaP.js","./blockDiagram-9f4a6865.CadkeS7Y.js","./zenuml-definition-ddfc84a5.Be5qecV5.js","./preload-helper.D6kgxu3v.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
import{w as writable,d as derived}from"./index.DJMR7htW.js";import{_ as __vitePreload}from"./preload-helper.D6kgxu3v.js";import{T as get_store_value}from"./scheduler.DwsPIhql.js";const defaultLoading={loading:!1},loadingStateStore=writable(defaultLoading),initLoading=async(t,e)=>{loadingStateStore.set({loading:!0,message:t});const r=await e;return loadingStateStore.set({loading:!1}),r};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bundle={};(function(exports){(()=>{var __webpack_modules__={607:(module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0});var serializer_1=__webpack_require__(810),deserializer_1=__webpack_require__(496),Module;typeof process<"u"&&process.release&&process.release.name==="node"&&(Module=eval("require")("module"));var ESSerializer=function(){function t(){}return t.throwErrorIfInNonNodeEnvironment=function(){if(!Module)throw new Error("Cannot intercept require in non-Node environment.")},t.interceptRequire=function(){this.isRequireIntercepted||(this.isRequireIntercepted=!0,this.throwErrorIfInNonNodeEnvironment(),t.originRequire=Module.prototype.require,Module.prototype.require=function(){var e=t.originRequire.apply(this,arguments),r=e.name;return t.requiredClasses[r]||(t.requiredClasses[r]=e),e})},t.stopInterceptRequire=function(){this.throwErrorIfInNonNodeEnvironment(),Module.prototype.require=t.originRequire,this.isRequireIntercepted=!1},t.isInterceptingRequire=function(){return this.isRequireIntercepted},t.getRequiredClasses=function(){return this.requiredClasses},t.clearRequiredClasses=function(){this.requiredClasses={}},t.registerClass=function(e){this.registeredClasses.push(e)},t.registerClasses=function(e){this.registeredClasses=this.registeredClasses.concat(e)},t.clearRegisteredClasses=function(){this.registeredClasses=[]},t.serialize=function(e,r){return r===void 0&&(r={}),JSON.stringify(serializer_1.getSerializeValueWithClassName(e,r))},t.deserialize=function(e,r,o){return r===void 0&&(r=[]),o===void 0&&(o={}),deserializer_1.deserializeFromParsedObj(JSON.parse(e),Object.values(this.requiredClasses).concat(this.registeredClasses).concat(r),o)},t.originRequire=null,t.isRequireIntercepted=!1,t.requiredClasses={},t.registeredClasses=[],t}();module.exports=ESSerializer},917:function(t,e){var r=this&&this.__spreadArrays||function(){for(var D=0,L=0,R=arguments.length;L<R;L++)D+=arguments[L].length;var z=Array(D),U=0;for(L=0;L<R;L++)for(var W=arguments[L],H=0,Y=W.length;H<Y;H++,U++)z[U]=W[H];return z};Object.defineProperty(e,"__esModule",{value:!0}),e.TO_STRING_FIELD=e.TIMESTAMP_FIELD=e.OPTIONS_FIELD=e.CLASS_NAME_FIELD=e.BOOLEAN_FIELD=e.ARRAY_FIELD=e.BUILTIN_TYPE_UNDEFINED=e.BUILTIN_TYPE_NOT_FINITE=e.BUILTIN_TYPE_BIG_INT=e.BUILTIN_CLASS_AGGREGATE_ERROR=e.BUILTIN_CLASS_URI_ERROR=e.BUILTIN_CLASS_TYPE_ERROR=e.BUILTIN_CLASS_SYNTAX_ERROR=e.BUILTIN_CLASS_REFERENCE_ERROR=e.BUILTIN_CLASS_RANGE_ERROR=e.BUILTIN_CLASS_EVAL_ERROR=e.BUILTIN_CLASS_ERROR=e.BUILTIN_CLASS_STRING=e.BUILTIN_CLASS_SET=e.BUILTIN_CLASS_REGEXP=e.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=e.BUILTIN_CLASS_INTL_PLURALRULES=e.BUILTIN_CLASS_INTL_NUMBERFORMAT=e.BUILTIN_CLASS_INTL_LOCALE=e.BUILTIN_CLASS_INTL_LISTFORMAT=e.BUILTIN_CLASS_INTL_DATETIMEFORMAT=e.BUILTIN_CLASS_INTL_COLLATOR=e.BUILTIN_CLASS_DATE=e.BUILTIN_CLASS_DATAVIEW=e.BUILTIN_CLASS_BOOLEAN=e.BUILTIN_CLASS_SHAREDARRAYBUFFER=e.BUILTIN_CLASS_ARRAYBUFFER=e.BUILTIN_CLASS_BIGUINT64ARRAY=e.BUILTIN_CLASS_BIGINT64ARRAY=e.BUILTIN_CLASS_FLOAT64ARRAY=e.BUILTIN_CLASS_FLOAT32ARRAY=e.BUILTIN_CLASS_UINT32ARRAY=e.BUILTIN_CLASS_INT32ARRAY=e.BUILTIN_CLASS_UINT16ARRAY=e.BUILTIN_CLASS_INT16ARRAY=e.BUILTIN_CLASS_UINT8CLAMPEDARRAY=e.BUILTIN_CLASS_UINT8ARRAY=e.BUILTIN_CLASS_INT8ARRAY=e.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=e.ALL_BUILTIN_INTLS=e.ALL_BUILTIN_ERRORS=e.ALL_BUILTIN_ARRAYS=e.ESSERIALIZER_NULL=void 0,e.ESSERIALIZER_NULL="__ESSERIALIZER_NULL__",e.ARRAY_FIELD="ess_arr",e.BOOLEAN_FIELD="ess_bool",e.CLASS_NAME_FIELD="ess_cn",e.OPTIONS_FIELD="ess_opt",e.TIMESTAMP_FIELD="ess_ts",e.TO_STRING_FIELD="ess_str";var o="Int8Array";e.BUILTIN_CLASS_INT8ARRAY=o;var n="Uint8Array";e.BUILTIN_CLASS_UINT8ARRAY=n;var a="Uint8ClampedArray";e.BUILTIN_CLASS_UINT8CLAMPEDARRAY=a;var s="Int16Array";e.BUILTIN_CLASS_INT16ARRAY=s;var l="Uint16Array";e.BUILTIN_CLASS_UINT16ARRAY=l;var h="Int32Array";e.BUILTIN_CLASS_INT32ARRAY=h;var c="Uint32Array";e.BUILTIN_CLASS_UINT32ARRAY=c;var d="Float32Array";e.BUILTIN_CLASS_FLOAT32ARRAY=d;var g="Float64Array";e.BUILTIN_CLASS_FLOAT64ARRAY=g;var u="BigInt64Array";e.BUILTIN_CLASS_BIGINT64ARRAY=u;var f="BigUint64Array";e.BUILTIN_CLASS_BIGUINT64ARRAY=f,e.BUILTIN_CLASS_ARRAYBUFFER="ArrayBuffer",e.BUILTIN_CLASS_SHAREDARRAYBUFFER="SharedArrayBuffer",e.BUILTIN_CLASS_BOOLEAN="Boolean",e.BUILTIN_CLASS_DATAVIEW="DataView",e.BUILTIN_CLASS_DATE="Date";var p="Collator";e.BUILTIN_CLASS_INTL_COLLATOR=p;var T="DateTimeFormat";e.BUILTIN_CLASS_INTL_DATETIMEFORMAT=T;var w="ListFormat";e.BUILTIN_CLASS_INTL_LISTFORMAT=w,e.BUILTIN_CLASS_INTL_LOCALE="Locale";var y="NumberFormat";e.BUILTIN_CLASS_INTL_NUMBERFORMAT=y;var m="PluralRules";e.BUILTIN_CLASS_INTL_PLURALRULES=m;var C="RelativeTimeFormat";e.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT=C,e.BUILTIN_CLASS_REGEXP="RegExp",e.BUILTIN_CLASS_SET="Set";var b="String";e.BUILTIN_CLASS_STRING=b;var B="Error";e.BUILTIN_CLASS_ERROR=B;var O="EvalError";e.BUILTIN_CLASS_EVAL_ERROR=O;var x="RangeError";e.BUILTIN_CLASS_RANGE_ERROR=x;var F="ReferenceError";e.BUILTIN_CLASS_REFERENCE_ERROR=F;var S="SyntaxError";e.BUILTIN_CLASS_SYNTAX_ERROR=S;var E="TypeError";e.BUILTIN_CLASS_TYPE_ERROR=E;var k="URIError";e.BUILTIN_CLASS_URI_ERROR=k;var P="AggregateError";e.BUILTIN_CLASS_AGGREGATE_ERROR=P,e.BUILTIN_TYPE_BIG_INT="BI",e.BUILTIN_TYPE_NOT_FINITE="NF",e.BUILTIN_TYPE_UNDEFINED="UD";var j=[o,n,a,s,l,h,c,d,g,u,f];e.ALL_BUILTIN_ARRAYS=j;var N=[B,O,x,F,S,E,k,P];e.ALL_BUILTIN_ERRORS=N;var I=[p,T,w,y,m,C];e.ALL_BUILTIN_INTLS=I;var A=r([b],j);e.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED=A},496:function(t,e,r){var o=this&&this.__spreadArrays||function(){for(var y=0,m=0,C=arguments.length;m<C;m++)y+=arguments[m].length;var b=Array(y),B=0;for(m=0;m<C;m++)for(var O=arguments[m],x=0,F=O.length;x<F;x++,B++)b[B]=O[x];return b};Object.defineProperty(e,"__esModule",{value:!0}),e.getParentClassName=e.getClassMappingFromClassArray=e.deserializeFromParsedObjWithClassMapping=e.deserializeFromParsedObj=void 0;var n=r(821),a=r(917),s=/^\s*class\s+/;function l(y,m,C){if(C===void 0&&(C={}),n.notObject(y))return y;if(Array.isArray(y))return h(y,m);var b=y[a.CLASS_NAME_FIELD],B=function(F,S,E){switch(F){case a.BUILTIN_CLASS_INT8ARRAY:return c(S[a.ARRAY_FIELD],Int8Array);case a.BUILTIN_CLASS_UINT8ARRAY:return c(S[a.ARRAY_FIELD],Uint8Array);case a.BUILTIN_CLASS_UINT8CLAMPEDARRAY:return c(S[a.ARRAY_FIELD],Uint8ClampedArray);case a.BUILTIN_CLASS_INT16ARRAY:return c(S[a.ARRAY_FIELD],Int16Array);case a.BUILTIN_CLASS_UINT16ARRAY:return c(S[a.ARRAY_FIELD],Uint16Array);case a.BUILTIN_CLASS_INT32ARRAY:return c(S[a.ARRAY_FIELD],Int32Array);case a.BUILTIN_CLASS_UINT32ARRAY:return c(S[a.ARRAY_FIELD],Uint32Array);case a.BUILTIN_CLASS_FLOAT32ARRAY:return c(S[a.ARRAY_FIELD],Float32Array);case a.BUILTIN_CLASS_FLOAT64ARRAY:return c(S[a.ARRAY_FIELD],Float64Array);case a.BUILTIN_CLASS_BIGINT64ARRAY:return d(S[a.ARRAY_FIELD],BigInt64Array);case a.BUILTIN_CLASS_BIGUINT64ARRAY:return d(S[a.ARRAY_FIELD],BigUint64Array);case a.BUILTIN_TYPE_BIG_INT:return g(S[a.TO_STRING_FIELD]);case a.BUILTIN_TYPE_UNDEFINED:return;case a.BUILTIN_TYPE_NOT_FINITE:return n.getValueFromToStringResult(S[a.TO_STRING_FIELD]);case a.BUILTIN_CLASS_ARRAYBUFFER:return k=S[a.ARRAY_FIELD],new Uint8Array(k).buffer;case a.BUILTIN_CLASS_SHAREDARRAYBUFFER:return function(P){var j=new SharedArrayBuffer(P.length),N=new Uint8Array(j);return P.forEach(function(I,A){N[A]=I}),j}(S[a.ARRAY_FIELD]);case a.BUILTIN_CLASS_BOOLEAN:return function(P){return new Boolean(P[a.BOOLEAN_FIELD])}(S);case a.BUILTIN_CLASS_DATAVIEW:return function(P){return new DataView(new Uint8Array(P).buffer)}(S[a.ARRAY_FIELD]);case a.BUILTIN_CLASS_DATE:return function(P){return typeof P[a.TIMESTAMP_FIELD]=="number"?new Date(P[a.TIMESTAMP_FIELD]):null}(S);case a.BUILTIN_CLASS_INTL_COLLATOR:return u(S,Intl.Collator);case a.BUILTIN_CLASS_INTL_DATETIMEFORMAT:return u(S,Intl.DateTimeFormat);case a.BUILTIN_CLASS_INTL_LISTFORMAT:return u(S,Intl.ListFormat);case a.BUILTIN_CLASS_INTL_LOCALE:return new Intl.Locale(S[a.TO_STRING_FIELD]);case a.BUILTIN_CLASS_INTL_NUMBERFORMAT:return u(S,Intl.NumberFormat);case a.BUILTIN_CLASS_INTL_PLURALRULES:return u(S,Intl.PluralRules);case a.BUILTIN_CLASS_INTL_RELATIVETIMEFORMAT:return u(S,Intl.RelativeTimeFormat);case a.BUILTIN_CLASS_REGEXP:return function(P){var j=P[a.TO_STRING_FIELD],N=j.lastIndexOf("/");return new RegExp(j.substring(1,N),j.substring(N+1))}(S);case a.BUILTIN_CLASS_SET:return function(P,j){return new Set(h(P[a.ARRAY_FIELD],j))}(S,E);case a.BUILTIN_CLASS_STRING:return function(P){return new String(P[a.TO_STRING_FIELD])}(S);case a.BUILTIN_CLASS_ERROR:return f(S,Error);case a.BUILTIN_CLASS_EVAL_ERROR:return f(S,EvalError);case a.BUILTIN_CLASS_RANGE_ERROR:return f(S,RangeError);case a.BUILTIN_CLASS_REFERENCE_ERROR:return f(S,ReferenceError);case a.BUILTIN_CLASS_SYNTAX_ERROR:return f(S,SyntaxError);case a.BUILTIN_CLASS_TYPE_ERROR:return f(S,TypeError);case a.BUILTIN_CLASS_URI_ERROR:return f(S,URIError);case a.BUILTIN_CLASS_AGGREGATE_ERROR:return f(S,AggregateError);default:return a.ESSERIALIZER_NULL}var k}(b,y,m);if(B!==a.ESSERIALIZER_NULL)return B;if(b&&!m[b])throw new Error("Class "+b+" not found");var O=[];C.fieldsForConstructorParameters&&(O=C.fieldsForConstructorParameters.map(function(F){return F in y?y[F]:{}}));var x=function(F,S){if(!F)return{};for(var E,k=Math.max(F.length-S.length,0),P=[{},0,"",null],j=P.shift();!E&&j!==void 0;)E=p(F,S.concat(Array.from(Array(k),function(){return j}))),j=k===0?void 0:P.shift();return E||(E={},Object.setPrototypeOf(E,F?F.prototype:Object.prototype)),E}(m[b],O);return function(F,S,E,k){for(var P in S){var j=S[P];if(!k.ignoreProperties||!k.ignoreProperties.includes(P))if(k.rawProperties&&k.rawProperties.includes(P))F[P]=JSON.stringify(j);else{var N=Object.getOwnPropertyDescriptor(F,P);I=j,A=N,P===a.CLASS_NAME_FIELD||A&&(typeof A.set=="function"||A.writable===!1&&typeof I!="object")||(N&&N.writable===!1&&typeof j=="object"?T(F[P],j,E):F[P]=l(j,E))}}var I,A;return F}(x,y,m,C)}function h(y,m){return y.map(function(C){return l(C,m)})}function c(y,m){return new m(y)}function d(y,m){return new m(y.map(function(C){return g(C[a.TO_STRING_FIELD])}))}function g(y){return BigInt(y)}function u(y,m){var C=y[a.OPTIONS_FIELD],b=C.locale;return delete C.locale,new m(b,C)}function f(y,m){var C;return delete(C=y.message?new m(y.message):new m).stack,y.name&&(C.name=y.name),y.stack&&(C.stack=y.stack),m===AggregateError&&(C.errors=l(y.errors,{})),C}function p(y,m){var C;try{if(s.test(y.toString()))C=new(y.bind.apply(y,o([void 0],m)));else{var b=y.prototype.constructor;b.name==="Object"&&(b=y),C=Object.create(b.prototype),b.call(C,m)}}catch{C=null}return C}function T(y,m,C){for(var b in m){var B=Object.getOwnPropertyDescriptor(y,b);B&&B.writable!==!0&&typeof B.set!="function"||(y[b]=l(m[b],C))}}function w(y){y===void 0&&(y=[]);var m={};return y.forEach(function(C){if(n.isClass(C)){var b=C.name,B=m[b];B&&B!==C&&console.warn("WARNING: Found class definition with the same name: "+b),m[b]=C}}),m}e.deserializeFromParsedObj=function(y,m,C){return l(y,w(m),C)},e.deserializeFromParsedObjWithClassMapping=l,e.getClassMappingFromClassArray=w,e.getParentClassName=function(y){return y.prototype.__proto__.constructor.name}},821:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isClass=e.notObject=e.getValueFromToStringResult=void 0,e.notObject=function(r){return r===null||typeof r!="object"},e.getValueFromToStringResult=function(r){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN;default:return null}},e.isClass=function(r){if(function(o){return[Date].indexOf(o)>=0}(r))return!0;try{Reflect.construct(String,[],r)}catch{return!1}return!0}},810:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSerializeValueWithClassName=void 0;var o=r(917),n=r(821);function a(l,h){h===void 0&&(h={});var c=function(u){var f,p,T;return u===void 0?((f={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_UNDEFINED,f):typeof u!="number"||isFinite(u)?typeof u=="bigint"?((T={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_BIG_INT,T[o.TO_STRING_FIELD]=u.toString(),T):n.notObject(u)?u:o.ESSERIALIZER_NULL:((p={})[o.CLASS_NAME_FIELD]=o.BUILTIN_TYPE_NOT_FINITE,p[o.TO_STRING_FIELD]=u.toString(),p)}(l);if(c!==o.ESSERIALIZER_NULL)return c;if(Array.isArray(l))return s(l);var d={};if(!function(u){var f=u.__proto__.constructor.name;return o.CLASSNAMES_WHOSE_ENUMERABLE_PROPERTIES_SHOULD_BE_IGNORED.includes(f)}(l)){if(h.ignoreProperties&&h.ignoreProperties.forEach(function(u){delete l[u]}),h.interceptProperties)for(var g in h.interceptProperties)l[g]=h.interceptProperties[g].call(l,l[g]);(function(u,f){for(var p in u)typeof u[p]!="function"&&(f[p]=a(u[p]))})(l,d)}return function(u,f){var p=u.__proto__.constructor.name;return p==="Object"&&(p=u.constructor.name),p!=="Object"&&(f[o.CLASS_NAME_FIELD]=p,p===o.BUILTIN_CLASS_ARRAYBUFFER||p===o.BUILTIN_CLASS_SHAREDARRAYBUFFER?f[o.ARRAY_FIELD]=s(Array.from(new Uint8Array(u))):p===o.BUILTIN_CLASS_BOOLEAN?f[o.BOOLEAN_FIELD]=u.valueOf():p===o.BUILTIN_CLASS_DATAVIEW?f[o.ARRAY_FIELD]=s(Array.from(new Uint8Array(u.buffer))):p===o.BUILTIN_CLASS_DATE?f[o.TIMESTAMP_FIELD]=u.getTime():p===o.BUILTIN_CLASS_INTL_LOCALE||p===o.BUILTIN_CLASS_REGEXP?f[o.TO_STRING_FIELD]=u.toString():p===o.BUILTIN_CLASS_SET?f[o.ARRAY_FIELD]=s(Array.from(u)):p===o.BUILTIN_CLASS_STRING?f[o.TO_STRING_FIELD]=u.toString():o.ALL_BUILTIN_ARRAYS.includes(p)?f[o.ARRAY_FIELD]=s(Array.from(u)):o.ALL_BUILTIN_ERRORS.includes(p)?function(T,w,y){T.name!=="Error"&&(w.name=T.name),T.message&&(w.message=T.message),T.stack&&(w.stack=T.stack),y===o.BUILTIN_CLASS_AGGREGATE_ERROR&&(w.errors=a(T.errors))}(u,f,p):o.ALL_BUILTIN_INTLS.includes(p)&&(f[o.OPTIONS_FIELD]=u.resolvedOptions())),f}(l,d)}function s(l){return l.map(function(h){return a(h)})}e.getSerializeValueWithClassName=a}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(e!==void 0)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__(607),__webpack_export_target__=exports;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})()})(bundle);const ESSerializer=getDefaultExportFromCjs(bundle),alreadyWarnFor=[],warnStorageNotFound=t=>{const e=typeof process<"u"&&!0;if(!alreadyWarnFor.includes(t)&&!e){let r=`Unable to find the ${t}. No data will be persisted.`;typeof window>"u"&&(r+=`
Are you running on a server? Most of storages are not available while running on a server.`),console.warn(r),alreadyWarnFor.push(t)}},serialize$1=t=>ESSerializer.serialize(t),deserialize=t=>{if(t!=="undefined"){if(t!=null){try{return ESSerializer.deserialize(t)}catch{}try{return JSON.parse(t)}catch{}}return t}};function persist(t,e,r){const o=e.getValue(r);return o!==null&&t.set(o),"addListener"in e&&e.addListener(r,n=>{t.set(n)}),t.subscribe(n=>{e.setValue(r,n)}),{...t,delete(){e.deleteValue(r)}}}function getBrowserStorage(t,e=!1){const r=[],o=s=>{const l=s.key;if(s.storageArea===t)for(const{listener:h}of r.filter(({key:c})=>c===l))h(deserialize(s.newValue))},n=()=>{e&&typeof window<"u"&&window.addEventListener&&window.addEventListener("storage",o)},a=()=>{e&&typeof window<"u"&&window.removeEventListener&&window.removeEventListener("storage",o)};return{addListener(s,l){r.push({key:s,listener:l}),r.length===1&&n()},removeListener(s,l){const h=r.indexOf({key:s,listener:l});h!==-1&&r.splice(h,1),r.length===0&&a()},getValue(s){const l=t.getItem(s);return deserialize(l)},deleteValue(s){t.removeItem(s)},setValue(s,l){t.setItem(s,serialize$1(l))}}}function localStorage(t=!1){return typeof window<"u"&&window.localStorage?getBrowserStorage(window.localStorage,t):(warnStorageNotFound("window.localStorage"),noopStorage())}function noopStorage(){return{getValue(){return null},deleteValue(){},setValue(){}}}var define_import_meta_env_default={MERMAID_DOMAIN:"mermaid.live",MERMAID_ANALYTICS_URL:"https://p.mermaid.live",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const env={rendererUrl:define_import_meta_env_default.MERMAID_RENDERER_URL??"https://mermaid.ink",krokiRendererUrl:define_import_meta_env_default.MERMAID_KROKI_RENDERER_URL??"https://kroki.io",analyticsUrl:"https://p.mermaid.live",domain:"mermaid.live"};let plausible;const initAnalytics=async()=>{if(!plausible)try{const{default:t}=await __vitePreload(()=>import("./index.B6CSiJCz.js"),[],import.meta.url);plausible=t({domain:env.domain,hashMode:!1,apiHost:env.analyticsUrl})}catch(t){console.log(t),console.info("Analytics blocked ;)")}},detectType$1=t=>{const e=["classDiagram","erDiagram","flowChart","gantt","gitGraph","graph","journey","pie","stateDiagram","quadrantChart","mindmap"],r=t.replaceAll(/^\s*%%.*\n/g,`
`).trimStart().split(" ")[0].toLowerCase();return e.find(n=>r.includes(n.toLowerCase()))},countLines=t=>{var e;return(((e=t.match(/\n/g))==null?void 0:e.length)??0)+1},saveStatistics=(t,e)=>{const r=detectType$1(t);if(!r)return;const o=countLines(t),n=getBucket(o),a=getBucket(e);logEvent("render",{graphType:r,length:o,lengthBucket:n,renderTimeMsBucket:a})},getBucket=t=>t<10?"0-10":t<25?"10-25":t<50?"25-50":t<100?"50-100":t<200?"100-200":t<500?"200-500":t<700?"500-700":t<1e3?"700-1000":t<1500?"1000-1500":t<2500?"1500-2500":t<4500?"2500-4500":t<7e3?"4500-7000":t<1e4?"7000-10000":"10000+",minutesToMilliSeconds=t=>t*6e4,defaultDelay=minutesToMilliSeconds(1),delaysPerEvent={render:minutesToMilliSeconds(5),panZoom:minutesToMilliSeconds(10),copyClipboard:defaultDelay,download:defaultDelay,copyMarkdown:defaultDelay,loadGist:defaultDelay,loadSampleDiagram:defaultDelay,renderDiagram:defaultDelay,history:defaultDelay,migration:defaultDelay,themeChange:defaultDelay,bannerClick:defaultDelay,version:defaultDelay},timeouts=new Map,logEvent=(t,e)=>{if(!plausible)return;const r=e?JSON.stringify({name:t,data:e}):t;timeouts.has(r)?clearTimeout(timeouts.get(r)):plausible.trackEvent(t,{props:e},{url:window.location.origin+window.location.pathname}),timeouts.set(r,window.setTimeout(()=>timeouts.delete(r),delaysPerEvent[t]))};var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$1=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root$1.Symbol,objectProto$c=Object.prototype,hasOwnProperty$a=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(t){var e=hasOwnProperty$a.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var o=!0}catch{}var n=nativeObjectToString$1.call(t);return o&&(e?t[symToStringTag$1]=r:delete t[symToStringTag$1]),n}var objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString(t){return nativeObjectToString.call(t)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}function isObjectLike(t){return t!=null&&typeof t=="object"}var symbolTag="[object Symbol]";function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&baseGetTag(t)==symbolTag}var isArray=Array.isArray,reWhitespace=/\s/;function trimmedEndIndex(t){for(var e=t.length;e--&&reWhitespace.test(t.charAt(e)););return e}var reTrimStart=/^\s+/;function baseTrim(t){return t&&t.slice(0,trimmedEndIndex(t)+1).replace(reTrimStart,"")}function isObject$1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(t){if(typeof t=="number")return t;if(isSymbol(t))return NAN;if(isObject$1(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject$1(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=baseTrim(t);var r=reIsBinary.test(t);return r||reIsOctal.test(t)?freeParseInt(t.slice(2),r?2:8):reIsBadHex.test(t)?NAN:+t}function identity$1(t){return t}var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(t){if(!isObject$1(t))return!1;var e=baseGetTag(t);return e==funcTag$1||e==genTag||e==asyncTag||e==proxyTag}var coreJsData=root$1["__core-js_shared__"],maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function isMasked(t){return!!maskSrcKey&&maskSrcKey in t}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(t){if(t!=null){try{return funcToString$2.call(t)}catch{}try{return t+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$a=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$9=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(t){if(!isObject$1(t)||isMasked(t))return!1;var e=isFunction(t)?reIsNative:reIsHostCtor;return e.test(toSource(t))}function getValue(t,e){return t==null?void 0:t[e]}function getNative(t,e){var r=getValue(t,e);return baseIsNative(r)?r:void 0}var WeakMap=getNative(root$1,"WeakMap"),objectCreate=Object.create,baseCreate=function(){function t(){}return function(e){if(!isObject$1(e))return{};if(objectCreate)return objectCreate(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function apply$1(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)}function copyArray(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(t){var e=0,r=0;return function(){var o=nativeNow(),n=HOT_SPAN-(o-r);if(r=o,n>0){if(++e>=HOT_COUNT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function constant$2(t){return function(){return t}}var defineProperty=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch{}}(),baseSetToString=defineProperty?function(t,e){return defineProperty(t,"toString",{configurable:!0,enumerable:!1,value:constant$2(e),writable:!0})}:identity$1,setToString=shortOut(baseSetToString),MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(t,e){var r=typeof t;return e=e??MAX_SAFE_INTEGER$1,!!e&&(r=="number"||r!="symbol"&&reIsUint.test(t))&&t>-1&&t%1==0&&t<e}function baseAssignValue(t,e,r){e=="__proto__"&&defineProperty?defineProperty(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function eq(t,e){return t===e||t!==t&&e!==e}var objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function assignValue(t,e,r){var o=t[e];(!(hasOwnProperty$8.call(t,e)&&eq(o,r))||r===void 0&&!(e in t))&&baseAssignValue(t,e,r)}function copyObject(t,e,r,o){var n=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var l=e[a],h=void 0;h===void 0&&(h=t[l]),n?baseAssignValue(r,l,h):assignValue(r,l,h)}return r}var nativeMax$1=Math.max;function overRest(t,e,r){return e=nativeMax$1(e===void 0?t.length-1:e,0),function(){for(var o=arguments,n=-1,a=nativeMax$1(o.length-e,0),s=Array(a);++n<a;)s[n]=o[e+n];n=-1;for(var l=Array(e+1);++n<e;)l[n]=o[n];return l[e]=r(s),apply$1(t,this,l)}}function baseRest(t,e){return setToString(overRest(t,e,identity$1),t+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isIterateeCall(t,e,r){if(!isObject$1(r))return!1;var o=typeof e;return(o=="number"?isArrayLike(r)&&isIndex(e,r.length):o=="string"&&e in r)?eq(r[e],t):!1}function createAssigner(t){return baseRest(function(e,r){var o=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(n--,a):void 0,s&&isIterateeCall(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),e=Object(e);++o<n;){var l=r[o];l&&t(e,l,o,a)}return e})}var objectProto$8=Object.prototype;function isPrototype(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||objectProto$8;return t===r}function baseTimes(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o}var argsTag$1="[object Arguments]";function baseIsArguments(t){return isObjectLike(t)&&baseGetTag(t)==argsTag$1}var objectProto$7=Object.prototype,hasOwnProperty$7=objectProto$7.hasOwnProperty,propertyIsEnumerable=objectProto$7.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike(t)&&hasOwnProperty$7.call(t,"callee")&&!propertyIsEnumerable.call(t,"callee")};function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$2=moduleExports$2?root$1.Buffer:void 0,nativeIsBuffer=Buffer$2?Buffer$2.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray(t){return isObjectLike(t)&&isLength(t.length)&&!!typedArrayTags[baseGetTag(t)]}function baseUnary(t){return function(e){return t(e)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{var t=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return t||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function arrayLikeKeys(t,e){var r=isArray(t),o=!r&&isArguments(t),n=!r&&!o&&isBuffer(t),a=!r&&!o&&!n&&isTypedArray(t),s=r||o||n||a,l=s?baseTimes(t.length,String):[],h=l.length;for(var c in t)(e||hasOwnProperty$6.call(t,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||isIndex(c,h)))&&l.push(c);return l}function overArg(t,e){return function(r){return t(e(r))}}var nativeKeys=overArg(Object.keys,Object),objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function baseKeys(t){if(!isPrototype(t))return nativeKeys(t);var e=[];for(var r in Object(t))hasOwnProperty$5.call(t,r)&&r!="constructor"&&e.push(r);return e}function nativeKeysIn(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function baseKeysIn(t){if(!isObject$1(t))return nativeKeysIn(t);var e=isPrototype(t),r=[];for(var o in t)o=="constructor"&&(e||!hasOwnProperty$4.call(t,o))||r.push(o);return r}function keysIn(t){return isArrayLike(t)?arrayLikeKeys(t,!0):baseKeysIn(t)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function hashGet(t){var e=this.__data__;if(nativeCreate){var r=e[t];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$3.call(e,t)?e[t]:void 0}var objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function hashHas(t){var e=this.__data__;return nativeCreate?e[t]!==void 0:hasOwnProperty$2.call(e,t)}var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nativeCreate&&e===void 0?HASH_UNDEFINED:e,this}function Hash(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Hash.prototype.clear=hashClear;Hash.prototype.delete=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(t,e){for(var r=t.length;r--;)if(eq(t[r][0],e))return r;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(t){var e=this.__data__,r=assocIndexOf(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():splice.call(e,r,1),--this.size,!0}function listCacheGet(t){var e=this.__data__,r=assocIndexOf(e,t);return r<0?void 0:e[r][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,e){var r=this.__data__,o=assocIndexOf(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}function ListCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype.delete=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root$1,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function getMapData(t,e){var r=t.__data__;return isKeyable(e)?r[typeof e=="string"?"string":"hash"]:r.map}function mapCacheDelete(t){var e=getMapData(this,t).delete(t);return this.size-=e?1:0,e}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,e){var r=getMapData(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}function MapCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype.delete=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$1="Expected a function";function memoize(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var r=function(){var o=arguments,n=e?e.apply(this,o):o[0],a=r.cache;if(a.has(n))return a.get(n);var s=t.apply(this,o);return r.cache=a.set(n,s)||a,s};return r.cache=new(memoize.Cache||MapCache),r}memoize.Cache=MapCache;var getPrototype=overArg(Object.getPrototypeOf,Object),objectTag$1="[object Object]",funcProto=Function.prototype,objectProto$1=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$1=objectProto$1.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject(t){if(!isObjectLike(t)||baseGetTag(t)!=objectTag$1)return!1;var e=getPrototype(t);if(e===null)return!0;var r=hasOwnProperty$1.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&funcToString.call(r)==objectCtorString}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function stackGet(t){return this.__data__.get(t)}function stackHas(t){return this.__data__.has(t)}var LARGE_ARRAY_SIZE=200;function stackSet(t,e){var r=this.__data__;if(r instanceof ListCache){var o=r.__data__;if(!Map$1||o.length<LARGE_ARRAY_SIZE-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new MapCache(o)}return r.set(t,e),this.size=r.size,this}function Stack(t){var e=this.__data__=new ListCache(t);this.size=e.size}Stack.prototype.clear=stackClear;Stack.prototype.delete=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer$1=moduleExports?root$1.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(t,e){if(e)return t.slice();var r=t.length,o=allocUnsafe?allocUnsafe(r):new t.constructor(r);return t.copy(o),o}var DataView$1=getNative(root$1,"DataView"),Promise$1=getNative(root$1,"Promise"),Set$1=getNative(root$1,"Set"),mapTag$1="[object Map]",objectTag="[object Object]",promiseTag="[object Promise]",setTag$1="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap),getTag=baseGetTag;(DataView$1&&getTag(new DataView$1(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag(new Map$1)!=mapTag$1||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$1||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(t){var e=baseGetTag(t),r=e==objectTag?t.constructor:void 0,o=r?toSource(r):"";if(o)switch(o){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag$1;case promiseCtorString:return promiseTag;case setCtorString:return setTag$1;case weakMapCtorString:return weakMapTag}return e});var Uint8Array$1=root$1.Uint8Array;function cloneArrayBuffer(t){var e=new t.constructor(t.byteLength);return new Uint8Array$1(e).set(new Uint8Array$1(t)),e}function cloneTypedArray(t,e){var r=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function initCloneObject(t){return typeof t.constructor=="function"&&!isPrototype(t)?baseCreate(getPrototype(t)):{}}function createBaseFor(t){return function(e,r,o){for(var n=-1,a=Object(e),s=o(e),l=s.length;l--;){var h=s[++n];if(r(a[h],h,a)===!1)break}return e}}var baseFor=createBaseFor(),now$1=function(){return root$1.Date.now()},FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(t,e,r){var o,n,a,s,l,h,c=0,d=!1,g=!1,u=!0;if(typeof t!="function")throw new TypeError(FUNC_ERROR_TEXT);e=toNumber(e)||0,isObject$1(r)&&(d=!!r.leading,g="maxWait"in r,a=g?nativeMax(toNumber(r.maxWait)||0,e):a,u="trailing"in r?!!r.trailing:u);function f(O){var x=o,F=n;return o=n=void 0,c=O,s=t.apply(F,x),s}function p(O){return c=O,l=setTimeout(y,e),d?f(O):s}function T(O){var x=O-h,F=O-c,S=e-x;return g?nativeMin(S,a-F):S}function w(O){var x=O-h,F=O-c;return h===void 0||x>=e||x<0||g&&F>=a}function y(){var O=now$1();if(w(O))return m(O);l=setTimeout(y,T(O))}function m(O){return l=void 0,u&&o?f(O):(o=n=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,o=h=n=l=void 0}function b(){return l===void 0?s:m(now$1())}function B(){var O=now$1(),x=w(O);if(o=arguments,n=this,h=O,x){if(l===void 0)return p(h);if(g)return clearTimeout(l),l=setTimeout(y,e),f(h)}return l===void 0&&(l=setTimeout(y,e)),s}return B.cancel=C,B.flush=b,B}function assignMergeValue(t,e,r){(r!==void 0&&!eq(t[e],r)||r===void 0&&!(e in t))&&baseAssignValue(t,e,r)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function safeGet(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function toPlainObject(t){return copyObject(t,keysIn(t))}function baseMergeDeep(t,e,r,o,n,a,s){var l=safeGet(t,r),h=safeGet(e,r),c=s.get(h);if(c){assignMergeValue(t,r,c);return}var d=a?a(l,h,r+"",t,e,s):void 0,g=d===void 0;if(g){var u=isArray(h),f=!u&&isBuffer(h),p=!u&&!f&&isTypedArray(h);d=h,u||f||p?isArray(l)?d=l:isArrayLikeObject(l)?d=copyArray(l):f?(g=!1,d=cloneBuffer(h,!0)):p?(g=!1,d=cloneTypedArray(h,!0)):d=[]:isPlainObject(h)||isArguments(h)?(d=l,isArguments(l)?d=toPlainObject(l):(!isObject$1(l)||isFunction(l))&&(d=initCloneObject(h))):g=!1}g&&(s.set(h,d),n(d,h,o,a,s),s.delete(h)),assignMergeValue(t,r,d)}function baseMerge(t,e,r,o,n){t!==e&&baseFor(e,function(a,s){if(n||(n=new Stack),isObject$1(a))baseMergeDeep(t,e,s,r,baseMerge,o,n);else{var l=o?o(safeGet(t,s),a,s+"",t,e,n):void 0;l===void 0&&(l=a),assignMergeValue(t,s,l)}},keysIn)}var mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(t){if(t==null)return!0;if(isArrayLike(t)&&(isArray(t)||typeof t=="string"||typeof t.splice=="function"||isBuffer(t)||isTypedArray(t)||isArguments(t)))return!t.length;var e=getTag(t);if(e==mapTag||e==setTag)return!t.size;if(isPrototype(t))return!baseKeys(t).length;for(var r in t)if(hasOwnProperty.call(t,r))return!1;return!0}var merge$1=createAssigner(function(t,e,r){baseMerge(t,e,r)});function dedent(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=Array.from(typeof t=="string"?[t]:t);o[o.length-1]=o[o.length-1].replace(/\r?\n([\t ]*)$/,"");var n=o.reduce(function(l,h){var c=h.match(/\n([\t ]+|(?!\s).)/g);return c?l.concat(c.map(function(d){var g,u;return(u=(g=d.match(/[\t ]/g))===null||g===void 0?void 0:g.length)!==null&&u!==void 0?u:0})):l},[]);if(n.length){var a=new RegExp(`
[ ]{`+Math.min.apply(Math,n)+"}","g");o=o.map(function(l){return l.replace(a,`
`)})}o[0]=o[0].replace(/^\r?\n/,"");var s=o[0];return e.forEach(function(l,h){var c=s.match(/(?:^|\n)( *)$/),d=c?c[1]:"",g=l;typeof l=="string"&&l.includes(`
`)&&(g=String(l).split(`
`).map(function(u,f){return f===0?u:""+d+u}).join(`
`)),s+=g+o[h+1]}),s}var dayjs_min={exports:{}};(function(t,e){(function(r,o){t.exports=o()})(commonjsGlobal,function(){var r=1e3,o=6e4,n=36e5,a="millisecond",s="second",l="minute",h="hour",c="day",d="week",g="month",u="quarter",f="year",p="date",T="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,m={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(N){var I=["th","st","nd","rd"],A=N%100;return"["+N+(I[(A-20)%10]||I[A]||I[0])+"]"}},C=function(N,I,A){var D=String(N);return!D||D.length>=I?N:""+Array(I+1-D.length).join(A)+N},b={s:C,z:function(N){var I=-N.utcOffset(),A=Math.abs(I),D=Math.floor(A/60),L=A%60;return(I<=0?"+":"-")+C(D,2,"0")+":"+C(L,2,"0")},m:function N(I,A){if(I.date()<A.date())return-N(A,I);var D=12*(A.year()-I.year())+(A.month()-I.month()),L=I.clone().add(D,g),R=A-L<0,z=I.clone().add(D+(R?-1:1),g);return+(-(D+(A-L)/(R?L-z:z-L))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:g,y:f,w:d,d:c,D:p,h,m:l,s,ms:a,Q:u}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},B="en",O={};O[B]=m;var x="$isDayjsObject",F=function(N){return N instanceof P||!(!N||!N[x])},S=function N(I,A,D){var L;if(!I)return B;if(typeof I=="string"){var R=I.toLowerCase();O[R]&&(L=R),A&&(O[R]=A,L=R);var z=I.split("-");if(!L&&z.length>1)return N(z[0])}else{var U=I.name;O[U]=I,L=U}return!D&&L&&(B=L),L||!D&&B},E=function(N,I){if(F(N))return N.clone();var A=typeof I=="object"?I:{};return A.date=N,A.args=arguments,new P(A)},k=b;k.l=S,k.i=F,k.w=function(N,I){return E(N,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var P=function(){function N(A){this.$L=S(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[x]=!0}var I=N.prototype;return I.parse=function(A){this.$d=function(D){var L=D.date,R=D.utc;if(L===null)return new Date(NaN);if(k.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var z=L.match(w);if(z){var U=z[2]-1||0,W=(z[7]||"0").substring(0,3);return R?new Date(Date.UTC(z[1],U,z[3]||1,z[4]||0,z[5]||0,z[6]||0,W)):new Date(z[1],U,z[3]||1,z[4]||0,z[5]||0,z[6]||0,W)}}return new Date(L)}(A),this.init()},I.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},I.$utils=function(){return k},I.isValid=function(){return this.$d.toString()!==T},I.isSame=function(A,D){var L=E(A);return this.startOf(D)<=L&&L<=this.endOf(D)},I.isAfter=function(A,D){return E(A)<this.startOf(D)},I.isBefore=function(A,D){return this.endOf(D)<E(A)},I.$g=function(A,D,L){return k.u(A)?this[D]:this.set(L,A)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(A,D){var L=this,R=!!k.u(D)||D,z=k.p(A),U=function(et,G){var J=k.w(L.$u?Date.UTC(L.$y,G,et):new Date(L.$y,G,et),L);return R?J:J.endOf(c)},W=function(et,G){return k.w(L.toDate()[et].apply(L.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(G)),L)},H=this.$W,Y=this.$M,K=this.$D,it="set"+(this.$u?"UTC":"");switch(z){case f:return R?U(1,0):U(31,11);case g:return R?U(1,Y):U(0,Y+1);case d:var tt=this.$locale().weekStart||0,st=(H<tt?H+7:H)-tt;return U(R?K-st:K+(6-st),Y);case c:case p:return W(it+"Hours",0);case h:return W(it+"Minutes",1);case l:return W(it+"Seconds",2);case s:return W(it+"Milliseconds",3);default:return this.clone()}},I.endOf=function(A){return this.startOf(A,!1)},I.$set=function(A,D){var L,R=k.p(A),z="set"+(this.$u?"UTC":""),U=(L={},L[c]=z+"Date",L[p]=z+"Date",L[g]=z+"Month",L[f]=z+"FullYear",L[h]=z+"Hours",L[l]=z+"Minutes",L[s]=z+"Seconds",L[a]=z+"Milliseconds",L)[R],W=R===c?this.$D+(D-this.$W):D;if(R===g||R===f){var H=this.clone().set(p,1);H.$d[U](W),H.init(),this.$d=H.set(p,Math.min(this.$D,H.daysInMonth())).$d}else U&&this.$d[U](W);return this.init(),this},I.set=function(A,D){return this.clone().$set(A,D)},I.get=function(A){return this[k.p(A)]()},I.add=function(A,D){var L,R=this;A=Number(A);var z=k.p(D),U=function(Y){var K=E(R);return k.w(K.date(K.date()+Math.round(Y*A)),R)};if(z===g)return this.set(g,this.$M+A);if(z===f)return this.set(f,this.$y+A);if(z===c)return U(1);if(z===d)return U(7);var W=(L={},L[l]=o,L[h]=n,L[s]=r,L)[z]||1,H=this.$d.getTime()+A*W;return k.w(H,this)},I.subtract=function(A,D){return this.add(-1*A,D)},I.format=function(A){var D=this,L=this.$locale();if(!this.isValid())return L.invalidDate||T;var R=A||"YYYY-MM-DDTHH:mm:ssZ",z=k.z(this),U=this.$H,W=this.$m,H=this.$M,Y=L.weekdays,K=L.months,it=L.meridiem,tt=function(G,J,ot,lt){return G&&(G[J]||G(D,R))||ot[J].slice(0,lt)},st=function(G){return k.s(U%12||12,G,"0")},et=it||function(G,J,ot){var lt=G<12?"AM":"PM";return ot?lt.toLowerCase():lt};return R.replace(y,function(G,J){return J||function(ot){switch(ot){case"YY":return String(D.$y).slice(-2);case"YYYY":return k.s(D.$y,4,"0");case"M":return H+1;case"MM":return k.s(H+1,2,"0");case"MMM":return tt(L.monthsShort,H,K,3);case"MMMM":return tt(K,H);case"D":return D.$D;case"DD":return k.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return tt(L.weekdaysMin,D.$W,Y,2);case"ddd":return tt(L.weekdaysShort,D.$W,Y,3);case"dddd":return Y[D.$W];case"H":return String(U);case"HH":return k.s(U,2,"0");case"h":return st(1);case"hh":return st(2);case"a":return et(U,W,!0);case"A":return et(U,W,!1);case"m":return String(W);case"mm":return k.s(W,2,"0");case"s":return String(D.$s);case"ss":return k.s(D.$s,2,"0");case"SSS":return k.s(D.$ms,3,"0");case"Z":return z}return null}(G)||z.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(A,D,L){var R,z=this,U=k.p(D),W=E(A),H=(W.utcOffset()-this.utcOffset())*o,Y=this-W,K=function(){return k.m(z,W)};switch(U){case f:R=K()/12;break;case g:R=K();break;case u:R=K()/3;break;case d:R=(Y-H)/6048e5;break;case c:R=(Y-H)/864e5;break;case h:R=Y/n;break;case l:R=Y/o;break;case s:R=Y/r;break;default:R=Y}return L?R:k.a(R)},I.daysInMonth=function(){return this.endOf(g).$D},I.$locale=function(){return O[this.$L]},I.locale=function(A,D){if(!A)return this.$L;var L=this.clone(),R=S(A,D,!0);return R&&(L.$L=R),L},I.clone=function(){return k.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},N}(),j=P.prototype;return E.prototype=j,[["$ms",a],["$s",s],["$m",l],["$H",h],["$W",c],["$M",g],["$y",f],["$D",p]].forEach(function(N){j[N[1]]=function(I){return this.$g(I,N[0],N[1])}}),E.extend=function(N,I){return N.$i||(N(I,P,E),N.$i=!0),E},E.locale=S,E.isDayjs=F,E.unix=function(N){return E(1e3*N)},E.en=O[B],E.Ls=O,E.p={},E})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var dist$1={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=t.BLANK_URL=void 0;var e=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,o=/&(newline|tab);/gi,n=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^.+(:|&colon;)/gim,s=[".","/"];t.BLANK_URL="about:blank";function l(d){return s.indexOf(d[0])>-1}function h(d){var g=d.replace(n,"");return g.replace(r,function(u,f){return String.fromCharCode(f)})}function c(d){if(!d)return t.BLANK_URL;var g=h(d).replace(o,"").replace(n,"").trim();if(!g)return t.BLANK_URL;if(l(g))return g;var u=g.match(a);if(!u)return g;var f=u[0];return e.test(f)?t.BLANK_URL:g}t.sanitizeUrl=c})(dist$1);var noop$1={value:()=>{}};function dispatch(){for(var t=0,e=arguments.length,r={},o;t<e;++t){if(!(o=arguments[t]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new Dispatch(r)}function Dispatch(t){this._=t}function parseTypenames$1(t,e){return t.trim().split(/^|\s+/).map(function(r){var o="",n=r.indexOf(".");if(n>=0&&(o=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(t,e){var r=this._,o=parseTypenames$1(t+"",r),n,a=-1,s=o.length;if(arguments.length<2){for(;++a<s;)if((n=(t=o[a]).type)&&(n=get$1(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)r[n]=set$2(r[n],t.name,e);else if(e==null)for(n in r)r[n]=set$2(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Dispatch(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),o=0,n,a;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],o=0,n=a.length;o<n;++o)a[o].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],n=0,a=o.length;n<a;++n)o[n].value.apply(e,r)}};function get$1(t,e){for(var r=0,o=t.length,n;r<o;++r)if((n=t[r]).name===e)return n.value}function set$2(t,e,r){for(var o=0,n=t.length;o<n;++o)if(t[o].name===e){t[o]=noop$1,t=t.slice(0,o).concat(t.slice(o+1));break}return r!=null&&t.push({name:e,value:r}),t}var xhtml="http://www.w3.org/1999/xhtml";const namespaces={svg:"http://www.w3.org/2000/svg",xhtml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function namespace(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),namespaces.hasOwnProperty(e)?{space:namespaces[e],local:t}:t}function creatorInherit(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===xhtml&&e.documentElement.namespaceURI===xhtml?e.createElement(t):e.createElementNS(r,t)}}function creatorFixed(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function creator(t){var e=namespace(t);return(e.local?creatorFixed:creatorInherit)(e)}function none(){}function selector(t){return t==null?none:function(){return this.querySelector(t)}}function selection_select(t){typeof t!="function"&&(t=selector(t));for(var e=this._groups,r=e.length,o=new Array(r),n=0;n<r;++n)for(var a=e[n],s=a.length,l=o[n]=new Array(s),h,c,d=0;d<s;++d)(h=a[d])&&(c=t.call(h,h.__data__,d,a))&&("__data__"in h&&(c.__data__=h.__data__),l[d]=c);return new Selection$1(o,this._parents)}function array(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function empty(){return[]}function selectorAll(t){return t==null?empty:function(){return this.querySelectorAll(t)}}function arrayAll(t){return function(){return array(t.apply(this,arguments))}}function selection_selectAll(t){typeof t=="function"?t=arrayAll(t):t=selectorAll(t);for(var e=this._groups,r=e.length,o=[],n=[],a=0;a<r;++a)for(var s=e[a],l=s.length,h,c=0;c<l;++c)(h=s[c])&&(o.push(t.call(h,h.__data__,c,s)),n.push(h));return new Selection$1(o,n)}function matcher(t){return function(){return this.matches(t)}}function childMatcher(t){return function(e){return e.matches(t)}}var find=Array.prototype.find;function childFind(t){return function(){return find.call(this.children,t)}}function childFirst(){return this.firstElementChild}function selection_selectChild(t){return this.select(t==null?childFirst:childFind(typeof t=="function"?t:childMatcher(t)))}var filter=Array.prototype.filter;function children(){return Array.from(this.children)}function childrenFilter(t){return function(){return filter.call(this.children,t)}}function selection_selectChildren(t){return this.selectAll(t==null?children:childrenFilter(typeof t=="function"?t:childMatcher(t)))}function selection_filter(t){typeof t!="function"&&(t=matcher(t));for(var e=this._groups,r=e.length,o=new Array(r),n=0;n<r;++n)for(var a=e[n],s=a.length,l=o[n]=[],h,c=0;c<s;++c)(h=a[c])&&t.call(h,h.__data__,c,a)&&l.push(h);return new Selection$1(o,this._parents)}function sparse(t){return new Array(t.length)}function selection_enter(){return new Selection$1(this._enter||this._groups.map(sparse),this._parents)}function EnterNode(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}EnterNode.prototype={constructor:EnterNode,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function constant$1(t){return function(){return t}}function bindIndex(t,e,r,o,n,a){for(var s=0,l,h=e.length,c=a.length;s<c;++s)(l=e[s])?(l.__data__=a[s],o[s]=l):r[s]=new EnterNode(t,a[s]);for(;s<h;++s)(l=e[s])&&(n[s]=l)}function bindKey(t,e,r,o,n,a,s){var l,h,c=new Map,d=e.length,g=a.length,u=new Array(d),f;for(l=0;l<d;++l)(h=e[l])&&(u[l]=f=s.call(h,h.__data__,l,e)+"",c.has(f)?n[l]=h:c.set(f,h));for(l=0;l<g;++l)f=s.call(t,a[l],l,a)+"",(h=c.get(f))?(o[l]=h,h.__data__=a[l],c.delete(f)):r[l]=new EnterNode(t,a[l]);for(l=0;l<d;++l)(h=e[l])&&c.get(u[l])===h&&(n[l]=h)}function datum(t){return t.__data__}function selection_data(t,e){if(!arguments.length)return Array.from(this,datum);var r=e?bindKey:bindIndex,o=this._parents,n=this._groups;typeof t!="function"&&(t=constant$1(t));for(var a=n.length,s=new Array(a),l=new Array(a),h=new Array(a),c=0;c<a;++c){var d=o[c],g=n[c],u=g.length,f=arraylike(t.call(d,d&&d.__data__,c,o)),p=f.length,T=l[c]=new Array(p),w=s[c]=new Array(p),y=h[c]=new Array(u);r(d,g,T,w,y,f,e);for(var m=0,C=0,b,B;m<p;++m)if(b=T[m]){for(m>=C&&(C=m+1);!(B=w[C])&&++C<p;);b._next=B||null}}return s=new Selection$1(s,o),s._enter=l,s._exit=h,s}function arraylike(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function selection_exit(){return new Selection$1(this._exit||this._groups.map(sparse),this._parents)}function selection_join(t,e,r){var o=this.enter(),n=this,a=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?a.remove():r(a),o&&n?o.merge(n).order():n}function selection_merge(t){for(var e=t.selection?t.selection():t,r=this._groups,o=e._groups,n=r.length,a=o.length,s=Math.min(n,a),l=new Array(n),h=0;h<s;++h)for(var c=r[h],d=o[h],g=c.length,u=l[h]=new Array(g),f,p=0;p<g;++p)(f=c[p]||d[p])&&(u[p]=f);for(;h<n;++h)l[h]=r[h];return new Selection$1(l,this._parents)}function selection_order(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var o=t[e],n=o.length-1,a=o[n],s;--n>=0;)(s=o[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function selection_sort(t){t||(t=ascending);function e(g,u){return g&&u?t(g.__data__,u.__data__):!g-!u}for(var r=this._groups,o=r.length,n=new Array(o),a=0;a<o;++a){for(var s=r[a],l=s.length,h=n[a]=new Array(l),c,d=0;d<l;++d)(c=s[d])&&(h[d]=c);h.sort(e)}return new Selection$1(n,this._parents).order()}function ascending(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function selection_call(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var o=t[e],n=0,a=o.length;n<a;++n){var s=o[n];if(s)return s}return null}function selection_size(){let t=0;for(const e of this)++t;return t}function selection_empty(){return!this.node()}function selection_each(t){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var n=e[r],a=0,s=n.length,l;a<s;++a)(l=n[a])&&t.call(l,l.__data__,a,n);return this}function attrRemove$1(t){return function(){this.removeAttribute(t)}}function attrRemoveNS$1(t){return function(){this.removeAttributeNS(t.space,t.local)}}function attrConstant$1(t,e){return function(){this.setAttribute(t,e)}}function attrConstantNS$1(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function attrFunction$1(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function attrFunctionNS$1(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function selection_attr(t,e){var r=namespace(t);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((e==null?r.local?attrRemoveNS$1:attrRemove$1:typeof e=="function"?r.local?attrFunctionNS$1:attrFunction$1:r.local?attrConstantNS$1:attrConstant$1)(r,e))}function defaultView(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function styleRemove$1(t){return function(){this.style.removeProperty(t)}}function styleConstant$1(t,e,r){return function(){this.style.setProperty(t,e,r)}}function styleFunction$1(t,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,r)}}function selection_style(t,e,r){return arguments.length>1?this.each((e==null?styleRemove$1:typeof e=="function"?styleFunction$1:styleConstant$1)(t,e,r??"")):styleValue(this.node(),t)}function styleValue(t,e){return t.style.getPropertyValue(e)||defaultView(t).getComputedStyle(t,null).getPropertyValue(e)}function propertyRemove(t){return function(){delete this[t]}}function propertyConstant(t,e){return function(){this[t]=e}}function propertyFunction(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function selection_property(t,e){return arguments.length>1?this.each((e==null?propertyRemove:typeof e=="function"?propertyFunction:propertyConstant)(t,e)):this.node()[t]}function classArray(t){return t.trim().split(/^|\s+/)}function classList(t){return t.classList||new ClassList(t)}function ClassList(t){this._node=t,this._names=classArray(t.getAttribute("class")||"")}ClassList.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function classedAdd(t,e){for(var r=classList(t),o=-1,n=e.length;++o<n;)r.add(e[o])}function classedRemove(t,e){for(var r=classList(t),o=-1,n=e.length;++o<n;)r.remove(e[o])}function classedTrue(t){return function(){classedAdd(this,t)}}function classedFalse(t){return function(){classedRemove(this,t)}}function classedFunction(t,e){return function(){(e.apply(this,arguments)?classedAdd:classedRemove)(this,t)}}function selection_classed(t,e){var r=classArray(t+"");if(arguments.length<2){for(var o=classList(this.node()),n=-1,a=r.length;++n<a;)if(!o.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?classedFunction:e?classedTrue:classedFalse)(r,e))}function textRemove(){this.textContent=""}function textConstant$1(t){return function(){this.textContent=t}}function textFunction$1(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function selection_text(t){return arguments.length?this.each(t==null?textRemove:(typeof t=="function"?textFunction$1:textConstant$1)(t)):this.node().textContent}function htmlRemove(){this.innerHTML=""}function htmlConstant(t){return function(){this.innerHTML=t}}function htmlFunction(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function selection_html(t){return arguments.length?this.each(t==null?htmlRemove:(typeof t=="function"?htmlFunction:htmlConstant)(t)):this.node().innerHTML}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function selection_raise(){return this.each(raise)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function selection_lower(){return this.each(lower)}function selection_append(t){var e=typeof t=="function"?t:creator(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function constantNull(){return null}function selection_insert(t,e){var r=typeof t=="function"?t:creator(t),o=e==null?constantNull:typeof e=="function"?e:selector(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function remove(){var t=this.parentNode;t&&t.removeChild(this)}function selection_remove(){return this.each(remove)}function selection_cloneShallow(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function selection_cloneDeep(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function selection_clone(t){return this.select(t?selection_cloneDeep:selection_cloneShallow)}function selection_datum(t){return arguments.length?this.property("__data__",t):this.node().__data__}function contextListener(t){return function(e){t.call(this,e,this.__data__)}}function parseTypenames(t){return t.trim().split(/^|\s+/).map(function(e){var r="",o=e.indexOf(".");return o>=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function onRemove(t){return function(){var e=this.__on;if(e){for(var r=0,o=-1,n=e.length,a;r<n;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++o]=a;++o?e.length=o:delete this.__on}}}function onAdd(t,e,r){return function(){var o=this.__on,n,a=contextListener(e);if(o){for(var s=0,l=o.length;s<l;++s)if((n=o[s]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=e;return}}this.addEventListener(t.type,a,r),n={type:t.type,name:t.name,value:e,listener:a,options:r},o?o.push(n):this.__on=[n]}}function selection_on(t,e,r){var o=parseTypenames(t+""),n,a=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var h=0,c=l.length,d;h<c;++h)for(n=0,d=l[h];n<a;++n)if((s=o[n]).type===d.type&&s.name===d.name)return d.value}return}for(l=e?onAdd:onRemove,n=0;n<a;++n)this.each(l(o[n],e,r));return this}function dispatchEvent(t,e,r){var o=defaultView(t),n=o.CustomEvent;typeof n=="function"?n=new n(e,r):(n=o.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function dispatchConstant(t,e){return function(){return dispatchEvent(this,t,e)}}function dispatchFunction(t,e){return function(){return dispatchEvent(this,t,e.apply(this,arguments))}}function selection_dispatch(t,e){return this.each((typeof e=="function"?dispatchFunction:dispatchConstant)(t,e))}function*selection_iterator(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var o=t[e],n=0,a=o.length,s;n<a;++n)(s=o[n])&&(yield s)}var root=[null];function Selection$1(t,e){this._groups=t,this._parents=e}function selection(){return new Selection$1([[document.documentElement]],root)}function selection_selection(){return this}Selection$1.prototype=selection.prototype={constructor:Selection$1,select:selection_select,selectAll:selection_selectAll,selectChild:selection_selectChild,selectChildren:selection_selectChildren,filter:selection_filter,data:selection_data,enter:selection_enter,exit:selection_exit,join:selection_join,merge:selection_merge,selection:selection_selection,order:selection_order,sort:selection_sort,call:selection_call,nodes:selection_nodes,node:selection_node,size:selection_size,empty:selection_empty,each:selection_each,attr:selection_attr,style:selection_style,property:selection_property,classed:selection_classed,text:selection_text,html:selection_html,raise:selection_raise,lower:selection_lower,append:selection_append,insert:selection_insert,remove:selection_remove,clone:selection_clone,datum:selection_datum,on:selection_on,dispatch:selection_dispatch,[Symbol.iterator]:selection_iterator};function select(t){return typeof t=="string"?new Selection$1([[document.querySelector(t)]],[document.documentElement]):new Selection$1([[t]],root)}function define(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function extend$1(t,e){var r=Object.create(t.prototype);for(var o in e)r[o]=e[o];return r}function Color$1(){}var darker=.7,brighter=1/darker,reI="\\s*([+-]?\\d+)\\s*",reN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",reP="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",reHex=/^#([0-9a-f]{3,8})$/,reRgbInteger=new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),reRgbPercent=new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),reRgbaInteger=new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),reRgbaPercent=new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),reHslPercent=new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),reHslaPercent=new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`),named={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};define(Color$1,color,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:color_formatHex8,formatHsl:color_formatHsl,formatRgb:color_formatRgb,toString:color_formatRgb});function color_formatHex(){return this.rgb().formatHex()}function color_formatHex8(){return this.rgb().formatHex8()}function color_formatHsl(){return hslConvert(this).formatHsl()}function color_formatRgb(){return this.rgb().formatRgb()}function color(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=reHex.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?rgbn(e):r===3?new Rgb(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?rgba$1(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?rgba$1(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=reRgbInteger.exec(t))?new Rgb(e[1],e[2],e[3],1):(e=reRgbPercent.exec(t))?new Rgb(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=reRgbaInteger.exec(t))?rgba$1(e[1],e[2],e[3],e[4]):(e=reRgbaPercent.exec(t))?rgba$1(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=reHslPercent.exec(t))?hsla(e[1],e[2]/100,e[3]/100,1):(e=reHslaPercent.exec(t))?hsla(e[1],e[2]/100,e[3]/100,e[4]):named.hasOwnProperty(t)?rgbn(named[t]):t==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(t){return new Rgb(t>>16&255,t>>8&255,t&255,1)}function rgba$1(t,e,r,o){return o<=0&&(t=e=r=NaN),new Rgb(t,e,r,o)}function rgbConvert(t){return t instanceof Color$1||(t=color(t)),t?(t=t.rgb(),new Rgb(t.r,t.g,t.b,t.opacity)):new Rgb}function rgb(t,e,r,o){return arguments.length===1?rgbConvert(t):new Rgb(t,e,r,o??1)}function Rgb(t,e,r,o){this.r=+t,this.g=+e,this.b=+r,this.opacity=+o}define(Rgb,rgb,extend$1(Color$1,{brighter(t){return t=t==null?brighter:Math.pow(brighter,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?darker:Math.pow(darker,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(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:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const t=clampa(this.opacity);return`${t===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${t===1?")":`, ${t})`}`}function clampa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function clampi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hex(t){return t=clampi(t),(t<16?"0":"")+t.toString(16)}function hsla(t,e,r,o){return o<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Hsl(t,e,r,o)}function hslConvert(t){if(t instanceof Hsl)return new Hsl(t.h,t.s,t.l,t.opacity);if(t instanceof Color$1||(t=color(t)),!t)return new Hsl;if(t instanceof Hsl)return t;t=t.rgb();var e=t.r/255,r=t.g/255,o=t.b/255,n=Math.min(e,r,o),a=Math.max(e,r,o),s=NaN,l=a-n,h=(a+n)/2;return l?(e===a?s=(r-o)/l+(r<o)*6:r===a?s=(o-e)/l+2:s=(e-r)/l+4,l/=h<.5?a+n:2-a-n,s*=60):l=h>0&&h<1?0:s,new Hsl(s,l,h,t.opacity)}function hsl(t,e,r,o){return arguments.length===1?hslConvert(t):new Hsl(t,e,r,o??1)}function Hsl(t,e,r,o){this.h=+t,this.s=+e,this.l=+r,this.opacity=+o}define(Hsl,hsl,extend$1(Color$1,{brighter(t){return t=t==null?brighter:Math.pow(brighter,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?darker:Math.pow(darker,t),new Hsl(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,o=r+(r<.5?r:1-r)*e,n=2*r-o;return new Rgb(hsl2rgb(t>=240?t-240:t+120,n,o),hsl2rgb(t,n,o),hsl2rgb(t<120?t+240:t-120,n,o),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=clampa(this.opacity);return`${t===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${t===1?")":`, ${t})`}`}}));function clamph(t){return t=(t||0)%360,t<0?t+360:t}function clampt(t){return Math.max(0,Math.min(1,t||0))}function hsl2rgb(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const constant=t=>()=>t;function linear(t,e){return function(r){return t+r*e}}function exponential(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(o){return Math.pow(t+o*e,r)}}function hue(t,e){var r=e-t;return r?linear(t,r>180||r<-180?r-360*Math.round(r/360):r):constant(isNaN(t)?e:t)}function gamma(t){return(t=+t)==1?nogamma:function(e,r){return r-e?exponential(e,r,t):constant(isNaN(e)?r:e)}}function nogamma(t,e){var r=e-t;return r?linear(t,r):constant(isNaN(t)?e:t)}const interpolateRgb=function t(e){var r=gamma(e);function o(n,a){var s=r((n=rgb(n)).r,(a=rgb(a)).r),l=r(n.g,a.g),h=r(n.b,a.b),c=nogamma(n.opacity,a.opacity);return function(d){return n.r=s(d),n.g=l(d),n.b=h(d),n.opacity=c(d),n+""}}return o.gamma=t,o}(1);function interpolateNumber(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var reA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,reB=new RegExp(reA.source,"g");function zero$2(t){return function(){return t}}function one(t){return function(e){return t(e)+""}}function interpolateString(t,e){var r=reA.lastIndex=reB.lastIndex=0,o,n,a,s=-1,l=[],h=[];for(t=t+"",e=e+"";(o=reA.exec(t))&&(n=reB.exec(e));)(a=n.index)>r&&(a=e.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(o=o[0])===(n=n[0])?l[s]?l[s]+=n:l[++s]=n:(l[++s]=null,h.push({i:s,x:interpolateNumber(o,n)})),r=reB.lastIndex;return r<e.length&&(a=e.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?h[0]?one(h[0].x):zero$2(e):(e=h.length,function(c){for(var d=0,g;d<e;++d)l[(g=h[d]).i]=g.x(c);return l.join("")})}var degrees=180/Math.PI,identity={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(t,e,r,o,n,a){var s,l,h;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(h=t*r+e*o)&&(r-=t*h,o-=e*h),(l=Math.sqrt(r*r+o*o))&&(r/=l,o/=l,h/=l),t*o<e*r&&(t=-t,e=-e,h=-h,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(e,t)*degrees,skewX:Math.atan(h)*degrees,scaleX:s,scaleY:l}}var svgNode;function parseCss(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?identity:decompose(e.a,e.b,e.c,e.d,e.e,e.f)}function parseSvg(t){return t==null||(svgNode||(svgNode=document.createElementNS("http://www.w3.org/2000/svg","g")),svgNode.setAttribute("transform",t),!(t=svgNode.transform.baseVal.consolidate()))?identity:(t=t.matrix,decompose(t.a,t.b,t.c,t.d,t.e,t.f))}function interpolateTransform(t,e,r,o){function n(c){return c.length?c.pop()+" ":""}function a(c,d,g,u,f,p){if(c!==g||d!==u){var T=f.push("translate(",null,e,null,r);p.push({i:T-4,x:interpolateNumber(c,g)},{i:T-2,x:interpolateNumber(d,u)})}else(g||u)&&f.push("translate("+g+e+u+r)}function s(c,d,g,u){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),u.push({i:g.push(n(g)+"rotate(",null,o)-2,x:interpolateNumber(c,d)})):d&&g.push(n(g)+"rotate("+d+o)}function l(c,d,g,u){c!==d?u.push({i:g.push(n(g)+"skewX(",null,o)-2,x:interpolateNumber(c,d)}):d&&g.push(n(g)+"skewX("+d+o)}function h(c,d,g,u,f,p){if(c!==g||d!==u){var T=f.push(n(f)+"scale(",null,",",null,")");p.push({i:T-4,x:interpolateNumber(c,g)},{i:T-2,x:interpolateNumber(d,u)})}else(g!==1||u!==1)&&f.push(n(f)+"scale("+g+","+u+")")}return function(c,d){var g=[],u=[];return c=t(c),d=t(d),a(c.translateX,c.translateY,d.translateX,d.translateY,g,u),s(c.rotate,d.rotate,g,u),l(c.skewX,d.skewX,g,u),h(c.scaleX,c.scaleY,d.scaleX,d.scaleY,g,u),c=d=null,function(f){for(var p=-1,T=u.length,w;++p<T;)g[(w=u[p]).i]=w.x(f);return g.join("")}}}var interpolateTransformCss=interpolateTransform(parseCss,"px, ","px)","deg)"),interpolateTransformSvg=interpolateTransform(parseSvg,", ",")",")"),frame=0,timeout$1=0,interval=0,pokeDelay=1e3,taskHead,taskTail,clockLast=0,clockNow=0,clockSkew=0,clock=typeof performance=="object"&&performance.now?performance:Date,setFrame=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function now(){return clockNow||(setFrame(clearNow),clockNow=clock.now()+clockSkew)}function clearNow(){clockNow=0}function Timer(){this._call=this._time=this._next=null}Timer.prototype=timer.prototype={constructor:Timer,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?now():+r)+(e==null?0:+e),!this._next&&taskTail!==this&&(taskTail?taskTail._next=this:taskHead=this,taskTail=this),this._call=t,this._time=r,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}};function timer(t,e,r){var o=new Timer;return o.restart(t,e,r),o}function timerFlush(){now(),++frame;for(var t=taskHead,e;t;)(e=clockNow-t._time)>=0&&t._call.call(void 0,e),t=t._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var t=clock.now(),e=t-clockLast;e>pokeDelay&&(clockSkew-=e,clockLast=t)}function nap(){for(var t,e=taskHead,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:taskHead=r);taskTail=t,sleep(o)}function sleep(t){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var e=t-clockNow;e>24?(t<1/0&&(timeout$1=setTimeout(wake,t-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(t,e,r){var o=new Timer;return e=e==null?0:+e,o.restart(n=>{o.stop(),t(n+e)},e,r),o}var emptyOn=dispatch("start","end","cancel","interrupt"),emptyTween=[],CREATED=0,SCHEDULED=1,STARTING=2,STARTED=3,RUNNING=4,ENDING=5,ENDED=6;function schedule(t,e,r,o,n,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;create$1(t,r,{name:e,index:o,group:n,on:emptyOn,tween:emptyTween,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:CREATED})}function init$2(t,e){var r=get(t,e);if(r.state>CREATED)throw new Error("too late; already scheduled");return r}function set$1(t,e){var r=get(t,e);if(r.state>STARTED)throw new Error("too late; already running");return r}function get(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function create$1(t,e,r){var o=t.__transition,n;o[e]=r,r.timer=timer(a,0,r.time);function a(c){r.state=SCHEDULED,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var d,g,u,f;if(r.state!==SCHEDULED)return h();for(d in o)if(f=o[d],f.name===r.name){if(f.state===STARTED)return timeout(s);f.state===RUNNING?(f.state=ENDED,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete o[d]):+d<e&&(f.state=ENDED,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete o[d])}if(timeout(function(){r.state===STARTED&&(r.state=RUNNING,r.timer.restart(l,r.delay,r.time),l(c))}),r.state=STARTING,r.on.call("start",t,t.__data__,r.index,r.group),r.state===STARTING){for(r.state=STARTED,n=new Array(u=r.tween.length),d=0,g=-1;d<u;++d)(f=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(n[++g]=f);n.length=g+1}}function l(c){for(var d=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(h),r.state=ENDING,1),g=-1,u=n.length;++g<u;)n[g].call(t,d);r.state===ENDING&&(r.on.call("end",t,t.__data__,r.index,r.group),h())}function h(){r.state=ENDED,r.timer.stop(),delete o[e];for(var c in o)return;delete t.__transition}}function interrupt(t,e){var r=t.__transition,o,n,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((o=r[s]).name!==e){a=!1;continue}n=o.state>STARTING&&o.state<ENDING,o.state=ENDED,o.timer.stop(),o.on.call(n?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete r[s]}a&&delete t.__transition}}function selection_interrupt(t){return this.each(function(){interrupt(this,t)})}function tweenRemove(t,e){var r,o;return function(){var n=set$1(this,t),a=n.tween;if(a!==r){o=r=a;for(var s=0,l=o.length;s<l;++s)if(o[s].name===e){o=o.slice(),o.splice(s,1);break}}n.tween=o}}function tweenFunction(t,e,r){var o,n;if(typeof r!="function")throw new Error;return function(){var a=set$1(this,t),s=a.tween;if(s!==o){n=(o=s).slice();for(var l={name:e,value:r},h=0,c=n.length;h<c;++h)if(n[h].name===e){n[h]=l;break}h===c&&n.push(l)}a.tween=n}}function transition_tween(t,e){var r=this._id;if(t+="",arguments.length<2){for(var o=get(this.node(),r).tween,n=0,a=o.length,s;n<a;++n)if((s=o[n]).name===t)return s.value;return null}return this.each((e==null?tweenRemove:tweenFunction)(r,t,e))}function tweenValue(t,e,r){var o=t._id;return t.each(function(){var n=set$1(this,o);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return get(n,o).value[e]}}function interpolate(t,e){var r;return(typeof e=="number"?interpolateNumber:e instanceof color?interpolateRgb:(r=color(e))?(e=r,interpolateRgb):interpolateString)(t,e)}function attrRemove(t){return function(){this.removeAttribute(t)}}function attrRemoveNS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function attrConstant(t,e,r){var o,n=r+"",a;return function(){var s=this.getAttribute(t);return s===n?null:s===o?a:a=e(o=s,r)}}function attrConstantNS(t,e,r){var o,n=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===n?null:s===o?a:a=e(o=s,r)}}function attrFunction(t,e,r){var o,n,a;return function(){var s,l=r(this),h;return l==null?void this.removeAttribute(t):(s=this.getAttribute(t),h=l+"",s===h?null:s===o&&h===n?a:(n=h,a=e(o=s,l)))}}function attrFunctionNS(t,e,r){var o,n,a;return function(){var s,l=r(this),h;return l==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),h=l+"",s===h?null:s===o&&h===n?a:(n=h,a=e(o=s,l)))}}function transition_attr(t,e){var r=namespace(t),o=r==="transform"?interpolateTransformSvg:interpolate;return this.attrTween(t,typeof e=="function"?(r.local?attrFunctionNS:attrFunction)(r,o,tweenValue(this,"attr."+t,e)):e==null?(r.local?attrRemoveNS:attrRemove)(r):(r.local?attrConstantNS:attrConstant)(r,o,e))}function attrInterpolate(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function attrInterpolateNS(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function attrTweenNS(t,e){var r,o;function n(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&attrInterpolateNS(t,a)),r}return n._value=e,n}function attrTween(t,e){var r,o;function n(){var a=e.apply(this,arguments);return a!==o&&(r=(o=a)&&attrInterpolate(t,a)),r}return n._value=e,n}function transition_attrTween(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var o=namespace(t);return this.tween(r,(o.local?attrTweenNS:attrTween)(o,e))}function delayFunction(t,e){return function(){init$2(this,t).delay=+e.apply(this,arguments)}}function delayConstant(t,e){return e=+e,function(){init$2(this,t).delay=e}}function transition_delay(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?delayFunction:delayConstant)(e,t)):get(this.node(),e).delay}function durationFunction(t,e){return function(){set$1(this,t).duration=+e.apply(this,arguments)}}function durationConstant(t,e){return e=+e,function(){set$1(this,t).duration=e}}function transition_duration(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?durationFunction:durationConstant)(e,t)):get(this.node(),e).duration}function easeConstant(t,e){if(typeof e!="function")throw new Error;return function(){set$1(this,t).ease=e}}function transition_ease(t){var e=this._id;return arguments.length?this.each(easeConstant(e,t)):get(this.node(),e).ease}function easeVarying(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;set$1(this,t).ease=r}}function transition_easeVarying(t){if(typeof t!="function")throw new Error;return this.each(easeVarying(this._id,t))}function transition_filter(t){typeof t!="function"&&(t=matcher(t));for(var e=this._groups,r=e.length,o=new Array(r),n=0;n<r;++n)for(var a=e[n],s=a.length,l=o[n]=[],h,c=0;c<s;++c)(h=a[c])&&t.call(h,h.__data__,c,a)&&l.push(h);return new Transition(o,this._parents,this._name,this._id)}function transition_merge(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,o=e.length,n=r.length,a=Math.min(o,n),s=new Array(o),l=0;l<a;++l)for(var h=e[l],c=r[l],d=h.length,g=s[l]=new Array(d),u,f=0;f<d;++f)(u=h[f]||c[f])&&(g[f]=u);for(;l<o;++l)s[l]=e[l];return new Transition(s,this._parents,this._name,this._id)}function start(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function onFunction(t,e,r){var o,n,a=start(e)?init$2:set$1;return function(){var s=a(this,t),l=s.on;l!==o&&(n=(o=l).copy()).on(e,r),s.on=n}}function transition_on(t,e){var r=this._id;return arguments.length<2?get(this.node(),r).on.on(t):this.each(onFunction(r,t,e))}function removeFunction(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(t){var e=this._name,r=this._id;typeof t!="function"&&(t=selector(t));for(var o=this._groups,n=o.length,a=new Array(n),s=0;s<n;++s)for(var l=o[s],h=l.length,c=a[s]=new Array(h),d,g,u=0;u<h;++u)(d=l[u])&&(g=t.call(d,d.__data__,u,l))&&("__data__"in d&&(g.__data__=d.__data__),c[u]=g,schedule(c[u],e,r,u,c,get(d,r)));return new Transition(a,this._parents,e,r)}function transition_selectAll(t){var e=this._name,r=this._id;typeof t!="function"&&(t=selectorAll(t));for(var o=this._groups,n=o.length,a=[],s=[],l=0;l<n;++l)for(var h=o[l],c=h.length,d,g=0;g<c;++g)if(d=h[g]){for(var u=t.call(d,d.__data__,g,h),f,p=get(d,r),T=0,w=u.length;T<w;++T)(f=u[T])&&schedule(f,e,r,T,u,p);a.push(u),s.push(d)}return new Transition(a,s,e,r)}var Selection=selection.prototype.constructor;function transition_selection(){return new Selection(this._groups,this._parents)}function styleNull(t,e){var r,o,n;return function(){var a=styleValue(this,t),s=(this.style.removeProperty(t),styleValue(this,t));return a===s?null:a===r&&s===o?n:n=e(r=a,o=s)}}function styleRemove(t){return function(){this.style.removeProperty(t)}}function styleConstant(t,e,r){var o,n=r+"",a;return function(){var s=styleValue(this,t);return s===n?null:s===o?a:a=e(o=s,r)}}function styleFunction(t,e,r){var o,n,a;return function(){var s=styleValue(this,t),l=r(this),h=l+"";return l==null&&(h=l=(this.style.removeProperty(t),styleValue(this,t))),s===h?null:s===o&&h===n?a:(n=h,a=e(o=s,l))}}function styleMaybeRemove(t,e){var r,o,n,a="style."+e,s="end."+a,l;return function(){var h=set$1(this,t),c=h.on,d=h.value[a]==null?l||(l=styleRemove(e)):void 0;(c!==r||n!==d)&&(o=(r=c).copy()).on(s,n=d),h.on=o}}function transition_style(t,e,r){var o=(t+="")=="transform"?interpolateTransformCss:interpolate;return e==null?this.styleTween(t,styleNull(t,o)).on("end.style."+t,styleRemove(t)):typeof e=="function"?this.styleTween(t,styleFunction(t,o,tweenValue(this,"style."+t,e))).each(styleMaybeRemove(this._id,t)):this.styleTween(t,styleConstant(t,o,e),r).on("end.style."+t,null)}function styleInterpolate(t,e,r){return function(o){this.style.setProperty(t,e.call(this,o),r)}}function styleTween(t,e,r){var o,n;function a(){var s=e.apply(this,arguments);return s!==n&&(o=(n=s)&&styleInterpolate(t,s,r)),o}return a._value=e,a}function transition_styleTween(t,e,r){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,styleTween(t,e,r??""))}function textConstant(t){return function(){this.textContent=t}}function textFunction(t){return function(){var e=t(this);this.textContent=e??""}}function transition_text(t){return this.tween("text",typeof t=="function"?textFunction(tweenValue(this,"text",t)):textConstant(t==null?"":t+""))}function textInterpolate(t){return function(e){this.textContent=t.call(this,e)}}function textTween(t){var e,r;function o(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&textInterpolate(n)),e}return o._value=t,o}function transition_textTween(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,textTween(t))}function transition_transition(){for(var t=this._name,e=this._id,r=newId(),o=this._groups,n=o.length,a=0;a<n;++a)for(var s=o[a],l=s.length,h,c=0;c<l;++c)if(h=s[c]){var d=get(h,e);schedule(h,t,r,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Transition(o,this._parents,t,r)}function transition_end(){var t,e,r=this,o=r._id,n=r.size();return new Promise(function(a,s){var l={value:s},h={value:function(){--n===0&&a()}};r.each(function(){var c=set$1(this,o),d=c.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(h)),c.on=e}),n===0&&a()})}var id$n=0;function Transition(t,e,r,o){this._groups=t,this._parents=e,this._name=r,this._id=o}function newId(){return++id$n}var selection_prototype=selection.prototype;Transition.prototype={constructor:Transition,select:transition_select,selectAll:transition_selectAll,selectChild:selection_prototype.selectChild,selectChildren:selection_prototype.selectChildren,filter:transition_filter,merge:transition_merge,selection:transition_selection,transition:transition_transition,call:selection_prototype.call,nodes:selection_prototype.nodes,node:selection_prototype.node,size:selection_prototype.size,empty:selection_prototype.empty,each:selection_prototype.each,on:transition_on,attr:transition_attr,attrTween:transition_attrTween,style:transition_style,styleTween:transition_styleTween,text:transition_text,textTween:transition_textTween,remove:transition_remove,tween:transition_tween,delay:transition_delay,duration:transition_duration,ease:transition_ease,easeVarying:transition_easeVarying,end:transition_end,[Symbol.iterator]:selection_prototype[Symbol.iterator]};function cubicInOut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var defaultTiming={time:null,delay:0,duration:250,ease:cubicInOut};function inherit(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function selection_transition(t){var e,r;t instanceof Transition?(e=t._id,t=t._name):(e=newId(),(r=defaultTiming).time=now(),t=t==null?null:t+"");for(var o=this._groups,n=o.length,a=0;a<n;++a)for(var s=o[a],l=s.length,h,c=0;c<l;++c)(h=s[c])&&schedule(h,t,e,c,s,r||inherit(h,e));return new Transition(o,this._parents,t,e)}selection.prototype.interrupt=selection_interrupt;selection.prototype.transition=selection_transition;const abs$1=Math.abs,atan2=Math.atan2,cos=Math.cos,max=Math.max,min=Math.min,sin=Math.sin,sqrt=Math.sqrt,epsilon=1e-12,pi=Math.PI,halfPi=pi/2,tau=2*pi;function acos(t){return t>1?0:t<-1?pi:Math.acos(t)}function asin(t){return t>=1?halfPi:t<=-1?-halfPi:Math.asin(t)}function Linear(t){this._context=t}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function curveLinear(t){return new Linear(t)}class Bump{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function bumpX(t){return new Bump(t,!0)}function bumpY(t){return new Bump(t,!1)}function noop(){}function point$3(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 Basis(t){this._context=t}Basis.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:point$3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$3(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function curveBasis(t){return new Basis(t)}function BasisClosed(t){this._context=t}BasisClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:point$3(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function curveBasisClosed(t){return new BasisClosed(t)}function BasisOpen(t){this._context=t}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,o=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,o):this._context.moveTo(r,o);break;case 3:this._point=4;default:point$3(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function curveBasisOpen(t){return new BasisOpen(t)}function Bundle(t,e){this._basis=new Basis(t),this._beta=e}Bundle.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 o=t[0],n=e[0],a=t[r]-o,s=e[r]-n,l=-1,h;++l<=r;)h=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+h*a),this._beta*e[l]+(1-this._beta)*(n+h*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const curveBundle=function t(e){function r(o){return e===1?new Basis(o):new Bundle(o,e)}return r.beta=function(o){return t(+o)},r}(.85);function point$2(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 Cardinal(t,e){this._context=t,this._k=(1-e)/6}Cardinal.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:point$2(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:point$2(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCardinal=function t(e){function r(o){return new Cardinal(o,e)}return r.tension=function(o){return t(+o)},r}(0);function CardinalClosed(t,e){this._context=t,this._k=(1-e)/6}CardinalClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:point$2(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCardinalClosed=function t(e){function r(o){return new CardinalClosed(o,e)}return r.tension=function(o){return t(+o)},r}(0);function CardinalOpen(t,e){this._context=t,this._k=(1-e)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:point$2(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCardinalOpen=function t(e){function r(o){return new CardinalOpen(o,e)}return r.tension=function(o){return t(+o)},r}(0);function point$1(t,e,r){var o=t._x1,n=t._y1,a=t._x2,s=t._y2;if(t._l01_a>epsilon){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);o=(o*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,n=(n*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>epsilon){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/d,s=(s*c+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(o,n,a,s,t._x2,t._y2)}function CatmullRom(t,e){this._context=t,this._alpha=e}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,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:point$1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCatmullRom=function t(e){function r(o){return e?new CatmullRom(o,e):new Cardinal(o,0)}return r.alpha=function(o){return t(+o)},r}(.5);function CatmullRomClosed(t,e){this._context=t,this._alpha=e}CatmullRomClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,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:point$1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCatmullRomClosed=function t(e){function r(o){return e?new CatmullRomClosed(o,e):new CardinalClosed(o,0)}return r.alpha=function(o){return t(+o)},r}(.5);function CatmullRomOpen(t,e){this._context=t,this._alpha=e}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+o*o,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:point$1(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const curveCatmullRomOpen=function t(e){function r(o){return e?new CatmullRomOpen(o,e):new CardinalOpen(o,0)}return r.alpha=function(o){return t(+o)},r}(.5);function LinearClosed(t){this._context=t}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function curveLinearClosed(t){return new LinearClosed(t)}function sign(t){return t<0?-1:1}function slope3(t,e,r){var o=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(o||n<0&&-0),s=(r-t._y1)/(n||o<0&&-0),l=(a*n+s*o)/(o+n);return(sign(a)+sign(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function slope2(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function point(t,e,r){var o=t._x0,n=t._y0,a=t._x1,s=t._y1,l=(a-o)/3;t._context.bezierCurveTo(o+l,n+l*e,a-l,s-l*r,a,s)}function MonotoneX(t){this._context=t}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,point(this,slope2(this,r=slope3(this,t,e)),r);break;default:point(this,this._t0,r=slope3(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function MonotoneY(t){this._context=new ReflectContext(t)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(t,e){MonotoneX.prototype.point.call(this,e,t)};function ReflectContext(t){this._context=t}ReflectContext.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,o,n,a){this._context.bezierCurveTo(e,t,o,r,a,n)}};function monotoneX(t){return new MonotoneX(t)}function monotoneY(t){return new MonotoneY(t)}function Natural(t){this._context=t}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var o=controlPoints(t),n=controlPoints(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(o[0][a],n[0][a],o[1][a],n[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function controlPoints(t){var e,r=t.length-1,o,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)o=n[e]/a[e-1],a[e]-=o,s[e]-=o*s[e-1];for(n[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)n[e]=(s[e]-n[e+1])/a[e];for(a[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-n[e+1];return[n,a]}function curveNatural(t){return new Natural(t)}function Step(t,e){this._context=t,this._t=e}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function curveStep(t){return new Step(t,.5)}function stepBefore(t){return new Step(t,0)}function stepAfter(t){return new Step(t,1)}function Transform(t,e,r){this.k=t,this.x=e,this.y=r}Transform.prototype={constructor:Transform,scale:function(t){return t===1?this:new Transform(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Transform(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+")"}};Transform.prototype;/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries,setPrototypeOf,isFrozen,getPrototypeOf,getOwnPropertyDescriptor}=Object;let{freeze,seal,create}=Object,{apply,construct}=typeof Reflect<"u"&&Reflect;apply||(apply=function(e,r,o){return e.apply(r,o)});freeze||(freeze=function(e){return e});seal||(seal=function(e){return e});construct||(construct=function(e,r){return new e(...r)});const arrayForEach=unapply(Array.prototype.forEach),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(t){return function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];return apply(t,e,o)}}function unconstruct(t){return function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return construct(t,r)}}function addToSet(t,e,r){var o;r=(o=r)!==null&&o!==void 0?o:stringToLowerCase,setPrototypeOf&&setPrototypeOf(t,null);let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const s=r(a);s!==a&&(isFrozen(e)||(e[n]=s),a=s)}t[a]=!0}return t}function clone(t){const e=create(null);for(const[r,o]of entries(t))e[r]=o;return e}function lookupGetter(t,e){for(;t!==null;){const o=getOwnPropertyDescriptor(t,e);if(o){if(o.get)return unapply(o.get);if(typeof o.value=="function")return unapply(o.value)}t=getPrototypeOf(t)}function r(o){return console.warn("fallback value for",o),null}return r}const html$1=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),svg$1=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mathMl$1=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=freeze(["#text"]),html=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),svg=freeze(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mathMl=freeze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ERB_EXPR=seal(/<%[\w\W]*|[\w\W]*%>/gm),TMPLIT_EXPR=seal(/\${[\w\W]*}/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i);var EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME});const getGlobal=()=>typeof window>"u"?null:window,_createTrustedTypesPolicy=function t(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(o=r.getAttribute(n));const a="dompurify"+(o?"#"+o:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function createDOMPurify(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const e=M=>createDOMPurify(M);if(e.version="3.0.5",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;const r=t.document,o=r.currentScript;let{document:n}=t;const{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:c,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:u,trustedTypes:f}=t,p=h.prototype,T=lookupGetter(p,"cloneNode"),w=lookupGetter(p,"nextSibling"),y=lookupGetter(p,"childNodes"),m=lookupGetter(p,"parentNode");if(typeof s=="function"){const M=n.createElement("template");M.content&&M.content.ownerDocument&&(n=M.content.ownerDocument)}let C,b="";const{implementation:B,createNodeIterator:O,createDocumentFragment:x,getElementsByTagName:F}=n,{importNode:S}=r;let E={};e.isSupported=typeof entries=="function"&&typeof m=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:k,ERB_EXPR:P,TMPLIT_EXPR:j,DATA_ATTR:N,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:D}=EXPRESSIONS;let{IS_ALLOWED_URI:L}=EXPRESSIONS,R=null;const z=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let U=null;const W=addToSet({},[...html,...svg,...mathMl,...xml]);let H=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,K=null,it=!0,tt=!0,st=!1,et=!0,G=!1,J=!1,ot=!1,lt=!1,dt=!1,mt=!1,yt=!1,Bt=!0,Rt=!1;const Zt="user-content-";let xt=!0,pt=!1,ut={},ft=null;const $t=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ot=null;const Ft=addToSet({},["audio","video","img","source","image","track"]);let St=null;const Nt=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",Ct="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let gt=nt,vt=!1,Et=null;const Gt=addToSet({},[bt,Ct,nt],stringToString);let ct;const Vt=["application/xhtml+xml","text/html"],Xt="text/html";let V,_t=null;const Kt=n.createElement("form"),Dt=function(_){return _ instanceof RegExp||_ instanceof Function},At=function(_){if(!(_t&&_t===_)){if((!_||typeof _!="object")&&(_={}),_=clone(_),ct=Vt.indexOf(_.PARSER_MEDIA_TYPE)===-1?ct=Xt:ct=_.PARSER_MEDIA_TYPE,V=ct==="application/xhtml+xml"?stringToString:stringToLowerCase,R="ALLOWED_TAGS"in _?addToSet({},_.ALLOWED_TAGS,V):z,U="ALLOWED_ATTR"in _?addToSet({},_.ALLOWED_ATTR,V):W,Et="ALLOWED_NAMESPACES"in _?addToSet({},_.ALLOWED_NAMESPACES,stringToString):Gt,St="ADD_URI_SAFE_ATTR"in _?addToSet(clone(Nt),_.ADD_URI_SAFE_ATTR,V):Nt,Ot="ADD_DATA_URI_TAGS"in _?addToSet(clone(Ft),_.ADD_DATA_URI_TAGS,V):Ft,ft="FORBID_CONTENTS"in _?addToSet({},_.FORBID_CONTENTS,V):$t,Y="FORBID_TAGS"in _?addToSet({},_.FORBID_TAGS,V):{},K="FORBID_ATTR"in _?addToSet({},_.FORBID_ATTR,V):{},ut="USE_PROFILES"in _?_.USE_PROFILES:!1,it=_.ALLOW_ARIA_ATTR!==!1,tt=_.ALLOW_DATA_ATTR!==!1,st=_.ALLOW_UNKNOWN_PROTOCOLS||!1,et=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=_.SAFE_FOR_TEMPLATES||!1,J=_.WHOLE_DOCUMENT||!1,dt=_.RETURN_DOM||!1,mt=_.RETURN_DOM_FRAGMENT||!1,yt=_.RETURN_TRUSTED_TYPE||!1,lt=_.FORCE_BODY||!1,Bt=_.SANITIZE_DOM!==!1,Rt=_.SANITIZE_NAMED_PROPS||!1,xt=_.KEEP_CONTENT!==!1,pt=_.IN_PLACE||!1,L=_.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,gt=_.NAMESPACE||nt,H=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Dt(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Dt(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),G&&(tt=!1),mt&&(dt=!0),ut&&(R=addToSet({},[...text]),U=[],ut.html===!0&&(addToSet(R,html$1),addToSet(U,html)),ut.svg===!0&&(addToSet(R,svg$1),addToSet(U,svg),addToSet(U,xml)),ut.svgFilters===!0&&(addToSet(R,svgFilters),addToSet(U,svg),addToSet(U,xml)),ut.mathMl===!0&&(addToSet(R,mathMl$1),addToSet(U,mathMl),addToSet(U,xml))),_.ADD_TAGS&&(R===z&&(R=clone(R)),addToSet(R,_.ADD_TAGS,V)),_.ADD_ATTR&&(U===W&&(U=clone(U)),addToSet(U,_.ADD_ATTR,V)),_.ADD_URI_SAFE_ATTR&&addToSet(St,_.ADD_URI_SAFE_ATTR,V),_.FORBID_CONTENTS&&(ft===$t&&(ft=clone(ft)),addToSet(ft,_.FORBID_CONTENTS,V)),xt&&(R["#text"]=!0),J&&addToSet(R,["html","head","body"]),R.table&&(addToSet(R,["tbody"]),delete Y.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=_.TRUSTED_TYPES_POLICY,b=C.createHTML("")}else C===void 0&&(C=_createTrustedTypesPolicy(f,o)),C!==null&&typeof b=="string"&&(b=C.createHTML(""));freeze&&freeze(_),_t=_}},Mt=addToSet({},["mi","mo","mn","ms","mtext"]),Pt=addToSet({},["foreignobject","desc","title","annotation-xml"]),Jt=addToSet({},["title","style","font","a","script"]),Tt=addToSet({},svg$1);addToSet(Tt,svgFilters),addToSet(Tt,svgDisallowed);const kt=addToSet({},mathMl$1);addToSet(kt,mathMlDisallowed);const Qt=function(_){let v=m(_);(!v||!v.tagName)&&(v={namespaceURI:gt,tagName:"template"});const $=stringToLowerCase(_.tagName),q=stringToLowerCase(v.tagName);return Et[_.namespaceURI]?_.namespaceURI===Ct?v.namespaceURI===nt?$==="svg":v.namespaceURI===bt?$==="svg"&&(q==="annotation-xml"||Mt[q]):!!Tt[$]:_.namespaceURI===bt?v.namespaceURI===nt?$==="math":v.namespaceURI===Ct?$==="math"&&Pt[q]:!!kt[$]:_.namespaceURI===nt?v.namespaceURI===Ct&&!Pt[q]||v.namespaceURI===bt&&!Mt[q]?!1:!kt[$]&&(Jt[$]||!Tt[$]):!!(ct==="application/xhtml+xml"&&Et[_.namespaceURI]):!1},ht=function(_){arrayPush(e.removed,{element:_});try{_.parentNode.removeChild(_)}catch{_.remove()}},Lt=function(_,v){try{arrayPush(e.removed,{attribute:v.getAttributeNode(_),from:v})}catch{arrayPush(e.removed,{attribute:null,from:v})}if(v.removeAttribute(_),_==="is"&&!U[_])if(dt||mt)try{ht(v)}catch{}else try{v.setAttribute(_,"")}catch{}},Ut=function(_){let v,$;if(lt)_="<remove></remove>"+_;else{const Q=stringMatch(_,/^[\r\n\t ]+/);$=Q&&Q[0]}ct==="application/xhtml+xml"&&gt===nt&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const q=C?C.createHTML(_):_;if(gt===nt)try{v=new u().parseFromString(q,ct)}catch{}if(!v||!v.documentElement){v=B.createDocument(gt,"template",null);try{v.documentElement.innerHTML=vt?b:q}catch{}}const X=v.body||v.documentElement;return _&&$&&X.insertBefore(n.createTextNode($),X.childNodes[0]||null),gt===nt?F.call(v,J?"html":"body")[0]:J?v.documentElement:X},zt=function(_){return O.call(_.ownerDocument||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},te=function(_){return _ instanceof g&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof d)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},wt=function(_){return typeof l=="object"?_ instanceof l:_&&typeof _=="object"&&typeof _.nodeType=="number"&&typeof _.nodeName=="string"},at=function(_,v,$){E[_]&&arrayForEach(E[_],q=>{q.call(e,v,$,_t)})},Ht=function(_){let v;if(at("beforeSanitizeElements",_,null),te(_))return ht(_),!0;const $=V(_.nodeName);if(at("uponSanitizeElement",_,{tagName:$,allowedTags:R}),_.hasChildNodes()&&!wt(_.firstElementChild)&&(!wt(_.content)||!wt(_.content.firstElementChild))&&regExpTest(/<[/\w]/g,_.innerHTML)&&regExpTest(/<[/\w]/g,_.textContent))return ht(_),!0;if(!R[$]||Y[$]){if(!Y[$]&&qt($)&&(H.tagNameCheck instanceof RegExp&&regExpTest(H.tagNameCheck,$)||H.tagNameCheck instanceof Function&&H.tagNameCheck($)))return!1;if(xt&&!ft[$]){const q=m(_)||_.parentNode,X=y(_)||_.childNodes;if(X&&q){const Q=X.length;for(let Z=Q-1;Z>=0;--Z)q.insertBefore(T(X[Z],!0),w(_))}}return ht(_),!0}return _ instanceof h&&!Qt(_)||($==="noscript"||$==="noembed"||$==="noframes")&&regExpTest(/<\/no(script|embed|frames)/i,_.innerHTML)?(ht(_),!0):(G&&_.nodeType===3&&(v=_.textContent,v=stringReplace(v,k," "),v=stringReplace(v,P," "),v=stringReplace(v,j," "),_.textContent!==v&&(arrayPush(e.removed,{element:_.cloneNode()}),_.textContent=v)),at("afterSanitizeElements",_,null),!1)},jt=function(_,v,$){if(Bt&&(v==="id"||v==="name")&&($ in n||$ in Kt))return!1;if(!(tt&&!K[v]&&regExpTest(N,v))){if(!(it&&regExpTest(I,v))){if(!U[v]||K[v]){if(!(qt(_)&&(H.tagNameCheck instanceof RegExp&&regExpTest(H.tagNameCheck,_)||H.tagNameCheck instanceof Function&&H.tagNameCheck(_))&&(H.attributeNameCheck instanceof RegExp&&regExpTest(H.attributeNameCheck,v)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(v))||v==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&regExpTest(H.tagNameCheck,$)||H.tagNameCheck instanceof Function&&H.tagNameCheck($))))return!1}else if(!St[v]){if(!regExpTest(L,stringReplace($,D,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&_!=="script"&&stringIndexOf($,"data:")===0&&Ot[_])){if(!(st&&!regExpTest(A,stringReplace($,D,"")))){if($)return!1}}}}}}return!0},qt=function(_){return _.indexOf("-")>0},Wt=function(_){let v,$,q,X;at("beforeSanitizeAttributes",_,null);const{attributes:Q}=_;if(!Q)return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};for(X=Q.length;X--;){v=Q[X];const{name:rt,namespaceURI:It}=v;if($=rt==="value"?v.value:stringTrim(v.value),q=V(rt),Z.attrName=q,Z.attrValue=$,Z.keepAttr=!0,Z.forceKeepAttr=void 0,at("uponSanitizeAttribute",_,Z),$=Z.attrValue,Z.forceKeepAttr||(Lt(rt,_),!Z.keepAttr))continue;if(!et&&regExpTest(/\/>/i,$)){Lt(rt,_);continue}G&&($=stringReplace($,k," "),$=stringReplace($,P," "),$=stringReplace($,j," "));const Yt=V(_.nodeName);if(jt(Yt,q,$)){if(Rt&&(q==="id"||q==="name")&&(Lt(rt,_),$=Zt+$),C&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!It)switch(f.getAttributeType(Yt,q)){case"TrustedHTML":{$=C.createHTML($);break}case"TrustedScriptURL":{$=C.createScriptURL($);break}}try{It?_.setAttributeNS(It,rt,$):_.setAttribute(rt,$),arrayPop(e.removed)}catch{}}}at("afterSanitizeAttributes",_,null)},ee=function M(_){let v;const $=zt(_);for(at("beforeSanitizeShadowDOM",_,null);v=$.nextNode();)at("uponSanitizeShadowNode",v,null),!Ht(v)&&(v.content instanceof a&&M(v.content),Wt(v));at("afterSanitizeShadowDOM",_,null)};return e.sanitize=function(M){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v,$,q,X;if(vt=!M,vt&&(M="<!-->"),typeof M!="string"&&!wt(M))if(typeof M.toString=="function"){if(M=M.toString(),typeof M!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!e.isSupported)return M;if(ot||At(_),e.removed=[],typeof M=="string"&&(pt=!1),pt){if(M.nodeName){const rt=V(M.nodeName);if(!R[rt]||Y[rt])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(M instanceof l)v=Ut("<!---->"),$=v.ownerDocument.importNode(M,!0),$.nodeType===1&&$.nodeName==="BODY"||$.nodeName==="HTML"?v=$:v.appendChild($);else{if(!dt&&!G&&!J&&M.indexOf("<")===-1)return C&&yt?C.createHTML(M):M;if(v=Ut(M),!v)return dt?null:yt?b:""}v&&lt&&ht(v.firstChild);const Q=zt(pt?M:v);for(;q=Q.nextNode();)Ht(q)||(q.content instanceof a&&ee(q.content),Wt(q));if(pt)return M;if(dt){if(mt)for(X=x.call(v.ownerDocument);v.firstChild;)X.appendChild(v.firstChild);else X=v;return(U.shadowroot||U.shadowrootmode)&&(X=S.call(r,X,!0)),X}let Z=J?v.outerHTML:v.innerHTML;return J&&R["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&regExpTest(DOCTYPE_NAME,v.ownerDocument.doctype.name)&&(Z="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
`+Z),G&&(Z=stringReplace(Z,k," "),Z=stringReplace(Z,P," "),Z=stringReplace(Z,j," ")),C&&yt?C.createHTML(Z):Z},e.setConfig=function(M){At(M),ot=!0},e.clearConfig=function(){_t=null,ot=!1},e.isValidAttribute=function(M,_,v){_t||At({});const $=V(M),q=V(_);return jt($,q,v)},e.addHook=function(M,_){typeof _=="function"&&(E[M]=E[M]||[],arrayPush(E[M],_))},e.removeHook=function(M){if(E[M])return arrayPop(E[M])},e.removeHooks=function(M){E[M]&&(E[M]=[])},e.removeAllHooks=function(){E={}},e}var purify=createDOMPurify();const Channel={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=>{const 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<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,a=2*r-n;switch(o){case"r":return Channel.hue2rgb(a,n,t+1/3)*255;case"g":return Channel.hue2rgb(a,n,t)*255;case"b":return Channel.hue2rgb(a,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},o)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),s=(n+a)/2;if(o==="l")return s*100;if(n===a)return 0;const l=n-a,h=s>.5?l/(2-n-a):l/(n+a);if(o==="s")return h*100;switch(n){case t:return((e-r)/l+(e<r?6:0))*60;case e:return((r-t)/l+2)*60;case r:return((t-e)/l+4)*60;default:return-1}}},Lang={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Unit={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Utils={channel:Channel,lang:Lang,unit:Unit},DEC2HEX={};for(let t=0;t<=255;t++)DEC2HEX[t]=Utils.unit.dec2hex(t);const TYPE$2={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE$2.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=TYPE$2.ALL}is(e){return this.type===e}}class Channels{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Type}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=TYPE$2.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:o,l:n}=e;r===void 0&&(e.h=Utils.channel.rgb2hsl(e,"h")),o===void 0&&(e.s=Utils.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=Utils.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:o,b:n}=e;r===void 0&&(e.r=Utils.channel.hsl2rgb(e,"r")),o===void 0&&(e.g=Utils.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=Utils.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(TYPE$2.HSL)&&r!==void 0?r:(this._ensureHSL(),Utils.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(TYPE$2.HSL)&&r!==void 0?r:(this._ensureHSL(),Utils.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(TYPE$2.HSL)&&r!==void 0?r:(this._ensureHSL(),Utils.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(TYPE$2.RGB)&&r!==void 0?r:(this._ensureRGB(),Utils.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(TYPE$2.RGB)&&r!==void 0?r:(this._ensureRGB(),Utils.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(TYPE$2.RGB)&&r!==void 0?r:(this._ensureRGB(),Utils.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(TYPE$2.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(TYPE$2.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(TYPE$2.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(TYPE$2.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(TYPE$2.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(TYPE$2.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const channels=new Channels({r:0,g:0,b:0,a:0},"transparent"),Hex={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Hex.re);if(!e)return;const r=e[1],o=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,l=s?1:17,h=s?8:4,c=a?0:-1,d=s?255:15;return channels.set({r:(o>>h*(c+3)&d)*l,g:(o>>h*(c+2)&d)*l,b:(o>>h*(c+1)&d)*l,a:a?(o&d)*l/255:1},t)},stringify:t=>{const{r:e,g:r,b:o,a:n}=t;return n<1?`#${DEC2HEX[Math.round(e)]}${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(o)]}${DEC2HEX[Math.round(n*255)]}`:`#${DEC2HEX[Math.round(e)]}${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(o)]}`}},HSL={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=>{const e=t.match(HSL.hueRe);if(e){const[,r,o]=e;switch(o){case"grad":return Utils.channel.clamp.h(parseFloat(r)*.9);case"rad":return Utils.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Utils.channel.clamp.h(parseFloat(r)*360)}}return Utils.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(HSL.re);if(!r)return;const[,o,n,a,s,l]=r;return channels.set({h:HSL._hue2deg(o),s:Utils.channel.clamp.s(parseFloat(n)),l:Utils.channel.clamp.l(parseFloat(a)),a:s?Utils.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:o,a:n}=t;return n<1?`hsla(${Utils.lang.round(e)}, ${Utils.lang.round(r)}%, ${Utils.lang.round(o)}%, ${n})`:`hsl(${Utils.lang.round(e)}, ${Utils.lang.round(r)}%, ${Utils.lang.round(o)}%)`}},Keyword={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();const e=Keyword.colors[t];if(e)return Hex.parse(e)},stringify:t=>{const e=Hex.stringify(t);for(const r in Keyword.colors)if(Keyword.colors[r]===e)return r}},RGB={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=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(RGB.re);if(!r)return;const[,o,n,a,s,l,h,c,d]=r;return channels.set({r:Utils.channel.clamp.r(n?parseFloat(o)*2.55:parseFloat(o)),g:Utils.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:Utils.channel.clamp.b(h?parseFloat(l)*2.55:parseFloat(l)),a:c?Utils.channel.clamp.a(d?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:o,a:n}=t;return n<1?`rgba(${Utils.lang.round(e)}, ${Utils.lang.round(r)}, ${Utils.lang.round(o)}, ${Utils.lang.round(n)})`:`rgb(${Utils.lang.round(e)}, ${Utils.lang.round(r)}, ${Utils.lang.round(o)})`}},Color={format:{keyword:Keyword,hex:Hex,rgb:RGB,rgba:RGB,hsl:HSL,hsla:HSL},parse:t=>{if(typeof t!="string")return t;const e=Hex.parse(t)||RGB.parse(t)||HSL.parse(t)||Keyword.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(TYPE$2.HSL)||t.data.r===void 0?HSL.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?RGB.stringify(t):Hex.stringify(t)},change=(t,e)=>{const r=Color.parse(t);for(const o in e)r[o]=Utils.channel.clamp[o](e[o]);return Color.stringify(r)},rgba=(t,e,r=0,o=1)=>{if(typeof t!="number")return change(t,{a:e});const n=channels.set({r:Utils.channel.clamp.r(t),g:Utils.channel.clamp.g(e),b:Utils.channel.clamp.b(r),a:Utils.channel.clamp.a(o)});return Color.stringify(n)},luminance=t=>{const{r:e,g:r,b:o}=Color.parse(t),n=.2126*Utils.channel.toLinear(e)+.7152*Utils.channel.toLinear(r)+.0722*Utils.channel.toLinear(o);return Utils.lang.round(n)},isLight=t=>luminance(t)>=.5,isDark=t=>!isLight(t),adjustChannel=(t,e,r)=>{const o=Color.parse(t),n=o[e],a=Utils.channel.clamp[e](n+r);return n!==a&&(o[e]=a),Color.stringify(o)},lighten=(t,e)=>adjustChannel(t,"l",e),darken=(t,e)=>adjustChannel(t,"l",-e),adjust=(t,e)=>{const r=Color.parse(t),o={};for(const n in e)e[n]&&(o[n]=r[n]+e[n]);return change(t,o)},mix=(t,e,r=50)=>{const{r:o,g:n,b:a,a:s}=Color.parse(t),{r:l,g:h,b:c,a:d}=Color.parse(e),g=r/100,u=g*2-1,f=s-d,T=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,w=1-T,y=o*T+l*w,m=n*T+h*w,C=a*T+c*w,b=s*g+d*(1-g);return rgba(y,m,C,b)},invert=(t,e=100)=>{const r=Color.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,mix(r,t,e)};var COMMENT$1="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode;function trim(t){return t.trim()}function replace(t,e,r){return t.replace(e,r)}function indexof(t,e){return t.indexOf(e)}function charat(t,e){return t.charCodeAt(e)|0}function substr(t,e,r){return t.slice(e,r)}function strlen(t){return t.length}function sizeof(t){return t.length}function append(t,e){return e.push(t),t}var line=1,column=1,length=0,position=0,character=0,characters="";function node(t,e,r,o,n,a,s,l){return{value:t,root:e,parent:r,type:o,props:n,children:a,line,column,length:s,return:"",siblings:l}}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(t,e){return substr(characters,t,e)}function token(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(t){return line=column=1,length=strlen(characters=t),position=0,[]}function dealloc(t){return characters="",t}function delimit(t){return trim(slice(position-1,delimiter(t===91?t+2:t===40?t+1:t)))}function whitespace(t){for(;(character=peek())&&character<33;)next();return token(t)>2||token(character)>3?"":" "}function escaping(t,e){for(;--e&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(t,caret()+(e<6&&peek()==32&&next()==32))}function delimiter(t){for(;next();)switch(character){case t:return position;case 34:case 39:t!==34&&t!==39&&delimiter(character);break;case 40:t===41&&delimiter(t);break;case 92:next();break}return position}function commenter(t,e){for(;next()&&t+character!==57;)if(t+character===84&&peek()===47)break;return"/*"+slice(e,position-1)+"*"+from(t===47?t:next())}function identifier(t){for(;!token(peek());)next();return slice(t,position)}function compile(t){return dealloc(parse$3("",null,null,null,[""],t=alloc(t),0,[0],t))}function parse$3(t,e,r,o,n,a,s,l,h){for(var c=0,d=0,g=s,u=0,f=0,p=0,T=1,w=1,y=1,m=0,C="",b=n,B=a,O=o,x=C;w;)switch(p=m,m=next()){case 40:if(p!=108&&charat(x,g-1)==58){indexof(x+=replace(delimit(m),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:x+=delimit(m);break;case 9:case 10:case 13:case 32:x+=whitespace(p);break;case 92:x+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),e,r,h),h);break;default:x+="/"}break;case 123*T:l[c++]=strlen(x)*y;case 125*T:case 59:case 0:switch(m){case 0:case 125:w=0;case 59+d:y==-1&&(x=replace(x,/\f/g,"")),f>0&&strlen(x)-g&&append(f>32?declaration(x+";",o,r,g-1,h):declaration(replace(x," ","")+";",o,r,g-2,h),h);break;case 59:x+=";";default:if(append(O=ruleset(x,e,r,c,d,n,l,C,b=[],B=[],g,a),a),m===123)if(d===0)parse$3(x,e,O,O,b,a,g,l,B);else switch(u===99&&charat(x,3)===110?100:u){case 100:case 108:case 109:case 115:parse$3(t,O,O,o&&append(ruleset(t,O,O,0,0,n,l,C,n,b=[],g,B),B),n,B,g,l,o?b:B);break;default:parse$3(x,O,O,O,[""],B,0,l,B)}}c=d=f=0,T=y=1,C=x="",g=s;break;case 58:g=1+strlen(x),f=p;default:if(T<1){if(m==123)--T;else if(m==125&&T++==0&&prev()==125)continue}switch(x+=from(m),m*T){case 38:y=d>0?1:(x+="\f",-1);break;case 44:l[c++]=(strlen(x)-1)*y,y=1;break;case 64:peek()===45&&(x+=delimit(next())),u=peek(),d=g=strlen(C=x+=identifier(caret())),m++;break;case 45:p===45&&strlen(x)==2&&(T=0)}}return a}function ruleset(t,e,r,o,n,a,s,l,h,c,d,g){for(var u=n-1,f=n===0?a:[""],p=sizeof(f),T=0,w=0,y=0;T<o;++T)for(var m=0,C=substr(t,u+1,u=abs(w=s[T])),b=t;m<p;++m)(b=trim(w>0?f[m]+" "+C:replace(C,/&\f/g,f[m])))&&(h[y++]=b);return node(t,e,r,n===0?RULESET:l,h,c,d,g)}function comment(t,e,r,o){return node(t,e,r,COMMENT$1,from(char()),substr(t,2,-2),0,o)}function declaration(t,e,r,o,n){return node(t,e,r,DECLARATION,substr(t,0,o),substr(t,o+1,-1),o,n)}function serialize(t,e){for(var r="",o=0;o<t.length;o++)r+=e(t[o],o,t,e)||"";return r}function stringify(t,e,r,o){switch(t.type){case LAYER:if(t.children.length)break;case IMPORT:case DECLARATION:return t.return=t.return||t.value;case COMMENT$1:return"";case KEYFRAMES:return t.return=t.value+"{"+serialize(t.children,o)+"}";case RULESET:if(!strlen(t.value=t.props.join(",")))return""}return strlen(r=serialize(t.children,o))?t.return=t.value+"{"+r+"}":""}const LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log$1={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},setLogLevel$1=function(t="fatal"){let e=LEVELS.fatal;typeof t=="string"?(t=t.toLowerCase(),t in LEVELS&&(e=LEVELS[t])):typeof t=="number"&&(e=t),log$1.trace=()=>{},log$1.debug=()=>{},log$1.info=()=>{},log$1.warn=()=>{},log$1.error=()=>{},log$1.fatal=()=>{},e<=LEVELS.fatal&&(log$1.fatal=console.error?console.error.bind(console,format("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",format("FATAL"))),e<=LEVELS.error&&(log$1.error=console.error?console.error.bind(console,format("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",format("ERROR"))),e<=LEVELS.warn&&(log$1.warn=console.warn?console.warn.bind(console,format("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",format("WARN"))),e<=LEVELS.info&&(log$1.info=console.info?console.info.bind(console,format("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",format("INFO"))),e<=LEVELS.debug&&(log$1.debug=console.debug?console.debug.bind(console,format("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("DEBUG"))),e<=LEVELS.trace&&(log$1.trace=console.debug?console.debug.bind(console,format("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",format("TRACE")))},format=t=>`%c${dayjs().format("ss.SSS")} : ${t} : `,lineBreakRegex=/<br\s*\/?>/gi,getRows=t=>t?breakToPlaceholder(t).replace(/\\n/g,"#br#").split("#br#"):[""],setupDompurifyHooksIfNotSetup=(()=>{let t=!1;return()=>{t||(setupDompurifyHooks(),t=!0)}})();function setupDompurifyHooks(){const t="data-temp-href-target";purify.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")||"")}),purify.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)||""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}const removeScript=t=>(setupDompurifyHooksIfNotSetup(),purify.sanitize(t)),sanitizeMore=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const o=e.securityLevel;o==="antiscript"||o==="strict"?t=removeScript(t):o!=="loose"&&(t=breakToPlaceholder(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=placeholderToBreak(t))}return t},sanitizeText$2=(t,e)=>t&&(e.dompurifyConfig?t=purify.sanitize(sanitizeMore(t,e),e.dompurifyConfig).toString():t=purify.sanitize(sanitizeMore(t,e),{FORBID_TAGS:["style"]}).toString(),t),sanitizeTextOrArray=(t,e)=>typeof t=="string"?sanitizeText$2(t,e):t.flat().map(r=>sanitizeText$2(r,e)),hasBreaks=t=>lineBreakRegex.test(t),splitBreaks=t=>t.split(lineBreakRegex),placeholderToBreak=t=>t.replace(/#br#/g,"<br/>"),breakToPlaceholder=t=>t.replace(lineBreakRegex,"#br#"),getUrl=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),getMax=function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},getMin=function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},parseGenericTypes=function(t){const e=t.split(/(,)/),r=[];for(let o=0;o<e.length;o++){let n=e[o];if(n===","&&o>0&&o+1<e.length){const a=e[o-1],s=e[o+1];shouldCombineSets(a,s)&&(n=a+","+s,o++,r.pop())}r.push(processSet(n))}return r.join("")},countOccurrence=(t,e)=>Math.max(0,t.split(e).length-1),shouldCombineSets=(t,e)=>{const r=countOccurrence(t,"~"),o=countOccurrence(e,"~");return r===1&&o===1},processSet=t=>{const e=countOccurrence(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const o=[...t];let n=o.indexOf("~"),a=o.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)o[n]="<",o[a]=">",n=o.indexOf("~"),a=o.lastIndexOf("~");return r&&o.unshift("~"),o.join("")},isMathMLSupported=()=>window.MathMLElement!==void 0,katexRegex=/\$\$(.*)\$\$/g,hasKatex=t=>{var e;return(((e=t.match(katexRegex))==null?void 0:e.length)??0)>0},calculateMathMLDimensions=async(t,e)=>{t=await renderKatex(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const o=document.querySelector("body");o==null||o.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},renderKatex=async(t,e)=>{if(!hasKatex(t))return t;if(!isMathMLSupported()&&!e.legacyMathML)return t.replace(katexRegex,"MathML is unsupported in this environment.");const{default:r}=await __vitePreload(()=>import("./katex.TTlFrSdt.js"),[],import.meta.url);return t.split(lineBreakRegex).map(o=>hasKatex(o)?`
<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">
${o}
</div>
`:`<div>${o}</div>`).join("").replace(katexRegex,(o,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:isMathMLSupported()?"mathml":"htmlAndMathml"}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},common$1={getRows,sanitizeText:sanitizeText$2,sanitizeTextOrArray,hasBreaks,splitBreaks,lineBreakRegex,removeScript,getUrl,evaluate,getMax,getMin},mkBorder=(t,e)=>e?adjust(t,{s:-40,l:10}):adjust(t,{s:-40,l:-10}),oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2";let Theme$4=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var e,r,o,n,a,s,l,h,c,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(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?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||darken(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert(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||lighten(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||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.darkMode)for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=darken(this["cScale"+f],75);else for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScale"+f]=darken(this["cScale"+f],25);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleInv"+f]=this["cScaleInv"+f]||invert(this["cScale"+f]);for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this.darkMode?this["cScalePeer"+f]=this["cScalePeer"+f]||lighten(this["cScale"+f],10):this["cScalePeer"+f]=this["cScalePeer"+f]||darken(this["cScale"+f],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let f=0;f<this.THEME_COLOR_LIMIT;f++)this["cScaleLabel"+f]=this["cScaleLabel"+f]||this.scaleLabelColor;const u=this.darkMode?-4:-1;for(let f=0;f<5;f++)this["surface"+f]=this["surface"+f]||adjust(this.mainBkg,{h:180,s:-15,l:u*(5+f*3)}),this["surfacePeer"+f]=this["surfacePeer"+f]||adjust(this.mainBkg,{h:180,s:-15,l:u*(8+f*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||adjust(this.primaryColor,{h:64}),this.fillType3=this.fillType3||adjust(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||adjust(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||adjust(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||adjust(this.primaryColor,{h:128}),this.fillType7=this.fillType7||adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-10}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(o=>{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$4=t=>{const e=new Theme$4;return e.calculate(t),e};let Theme$3=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten(this.primaryColor,16),this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=invert(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten(invert("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=rgba(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=darken("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=darken(this.sectionBkgColor,10),this.taskBorderColor=rgba(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=rgba(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,r,o,n,a,s,l,h,c,d,g;this.secondBkg=lighten(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=lighten(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=lighten(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(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||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330});for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||invert(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScalePeer"+u]=this["cScalePeer"+u]||lighten(this["cScale"+u],10);for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||adjust(this.mainBkg,{h:30,s:-30,l:-(-10+u*4)}),this["surfacePeer"+u]=this["surfacePeer"+u]||adjust(this.mainBkg,{h:30,s:-30,l:-(-7+u*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["pie"+u]=this["cScale"+u];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=lighten(this.secondaryColor,20),this.git1=lighten(this.pie2||this.secondaryColor,20),this.git2=lighten(this.pie3||this.tertiaryColor,20),this.git3=lighten(this.pie4||adjust(this.primaryColor,{h:-30}),20),this.git4=lighten(this.pie5||adjust(this.primaryColor,{h:-60}),20),this.git5=lighten(this.pie6||adjust(this.primaryColor,{h:-90}),10),this.git6=lighten(this.pie7||adjust(this.primaryColor,{h:60}),10),this.git7=lighten(this.pie8||adjust(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lighten(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lighten(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(o=>{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$3=t=>{const e=new Theme$3;return e.calculate(t),e};let Theme$2=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=adjust(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=rgba(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,r,o,n,a,s,l,h,c,d,g;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken(this.tertiaryColor,40);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=darken(this["cScale"+u],10),this["cScalePeer"+u]=this["cScalePeer"+u]||darken(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||adjust(this["cScale"+u],{h:180});for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||adjust(this.mainBkg,{h:30,l:-(5+u*5)}),this["surfacePeer"+u]=this["surfacePeer"+u]||adjust(this.mainBkg,{h:30,l:-(7+u*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||invert(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||invert(this.labelTextColor);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=lighten(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||adjust(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||adjust(this.primaryColor,{l:-10}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||darken(invert(this.git0),25),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(o=>{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$2=t=>{const e=new Theme$2;return e.calculate(t),e};let Theme$1=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=lighten("#cde498",10),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.primaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,o,n,a,s,l,h,c,d,g;this.actorBorder=darken(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken(this.tertiaryColor,40);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=darken(this["cScale"+u],10),this["cScalePeer"+u]=this["cScalePeer"+u]||darken(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||adjust(this["cScale"+u],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||adjust(this.mainBkg,{h:30,s:-30,l:-(5+u*5)}),this["surfacePeer"+u]=this["surfacePeer"+u]||adjust(this.mainBkg,{h:30,s:-30,l:-(8+u*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||adjust(this.primaryColor,{l:-30}),this.pie5=this.pie5||adjust(this.secondaryColor,{l:-30}),this.pie6=this.pie6||adjust(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||adjust(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||adjust(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||adjust(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||adjust(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||adjust(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||adjust(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||adjust(this.primaryColor,{h:-30}),this.git4=this.git4||adjust(this.primaryColor,{h:-60}),this.git5=this.git5||adjust(this.primaryColor,{h:-90}),this.git6=this.git6||adjust(this.primaryColor,{h:60}),this.git7=this.git7||adjust(this.primaryColor,{h:120}),this.darkMode?(this.git0=lighten(this.git0,25),this.git1=lighten(this.git1,25),this.git2=lighten(this.git2,25),this.git3=lighten(this.git3,25),this.git4=lighten(this.git4,25),this.git5=lighten(this.git5,25),this.git6=lighten(this.git6,25),this.git7=lighten(this.git7,25)):(this.git0=darken(this.git0,25),this.git1=darken(this.git1,25),this.git2=darken(this.git2,25),this.git3=darken(this.git3,25),this.git4=darken(this.git4,25),this.git5=darken(this.git5,25),this.git6=darken(this.git6,25),this.git7=darken(this.git7,25)),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||invert(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||invert(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(o=>{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}};const getThemeVariables$1=t=>{const e=new Theme$1;return e.calculate(t),e};class Theme5{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=lighten(this.contrast,55),this.background="#ffffff",this.tertiaryColor=adjust(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert(this.primaryColor),this.secondaryTextColor=invert(this.secondaryColor),this.tertiaryTextColor=invert(this.tertiaryColor),this.lineColor=invert(this.background),this.textColor=invert(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,o,n,a,s,l,h,c,d,g;this.secondBkg=lighten(this.contrast,55),this.border2=this.contrast,this.actorBorder=lighten(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||invert(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||lighten(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||darken(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||adjust(this.mainBkg,{l:-(5+u*5)}),this["surfacePeer"+u]=this["surfacePeer"+u]||adjust(this.mainBkg,{l:-(8+u*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=lighten(this.contrast,30),this.sectionBkgColor2=lighten(this.contrast,30),this.taskBorderColor=darken(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=lighten(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=darken(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust(this.primaryColor,{h:64}),this.fillType3=adjust(this.secondaryColor,{h:64}),this.fillType4=adjust(this.primaryColor,{h:-64}),this.fillType5=adjust(this.secondaryColor,{h:-64}),this.fillType6=adjust(this.primaryColor,{h:128}),this.fillType7=adjust(this.secondaryColor,{h:128});for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["pie"+u]=this["cScale"+u];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||adjust(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||adjust(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||adjust(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||adjust(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||adjust(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||adjust(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||isDark(this.quadrant1Fill)?lighten(this.quadrant1Fill):darken(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=darken(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||adjust(this.primaryColor,{h:-30}),this.git4=this.pie5||adjust(this.primaryColor,{h:-60}),this.git5=this.pie6||adjust(this.primaryColor,{h:-90}),this.git6=this.pie7||adjust(this.primaryColor,{h:60}),this.git7=this.pie8||adjust(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||invert(this.git0),this.gitInv1=this.gitInv1||invert(this.git1),this.gitInv2=this.gitInv2||invert(this.git2),this.gitInv3=this.gitInv3||invert(this.git3),this.gitInv4=this.gitInv4||invert(this.git4),this.gitInv5=this.gitInv5||invert(this.git5),this.gitInv6=this.gitInv6||invert(this.git6),this.gitInv7=this.gitInv7||invert(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oldAttributeBackgroundColorOdd,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||oldAttributeBackgroundColorEven}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(o=>{this[o]=e[o]}),this.updateColors(),r.forEach(o=>{this[o]=e[o]})}}const getThemeVariables=t=>{const e=new Theme5;return e.calculate(t),e},theme={base:{getThemeVariables:getThemeVariables$4},dark:{getThemeVariables:getThemeVariables$3},default:{getThemeVariables:getThemeVariables$2},forest:{getThemeVariables:getThemeVariables$1},neutral:{getThemeVariables}},defaultConfigJson={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},theme:"default",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","maxEdges"],legacyMathML:!1,deterministicIds:!1,fontSize:16},config={...defaultConfigJson,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:theme.default.getThemeVariables(),sequence:{...defaultConfigJson.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...defaultConfigJson.gantt,tickInterval:void 0,useWidth:void 0},c4:{...defaultConfigJson.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...defaultConfigJson.pie,useWidth:984},xyChart:{...defaultConfigJson.xyChart,useWidth:void 0},requirement:{...defaultConfigJson.requirement,useWidth:void 0},gitGraph:{...defaultConfigJson.gitGraph,useMaxWidth:!1},sankey:{...defaultConfigJson.sankey,useMaxWidth:!1}},keyify=(t,e="")=>Object.keys(t).reduce((r,o)=>Array.isArray(t[o])?r:typeof t[o]=="object"&&t[o]!==null?[...r,e+o,...keyify(t[o],"")]:[...r,e+o],[]),configKeys=new Set(keyify(config,"")),defaultConfig$2=config,sanitizeDirective=t=>{if(log$1.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>sanitizeDirective(e));return}for(const e of Object.keys(t)){if(log$1.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!configKeys.has(e)||t[e]==null){log$1.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){log$1.debug("sanitizing object",e),sanitizeDirective(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const o of r)e.includes(o)&&(log$1.debug("sanitizing css option",e),t[e]=sanitizeCss(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}log$1.debug("After sanitization",t)}},sanitizeCss=t=>{let e=0,r=0;for(const o of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";o==="{"?e++:o==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},frontMatterRegex=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,directiveRegex=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,anyCommentRegex=/\s*%%.*\n/gm;class UnknownDiagramError extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const detectors={},detectType=function(t,e){t=t.replace(frontMatterRegex,"").replace(directiveRegex,"").replace(anyCommentRegex,`
`);for(const[r,{detector:o}]of Object.entries(detectors))if(o(t,e))return r;throw new UnknownDiagramError(`No diagram type detected matching given configuration for text: ${t}`)},registerLazyLoadedDiagrams=(...t)=>{for(const{id:e,detector:r,loader:o}of t)addDetector(e,r,o)},addDetector=(t,e,r)=>{detectors[t]?log$1.error(`Detector with key ${t} already exists`):detectors[t]={detector:e,loader:r},log$1.debug(`Detector with key ${t} added${r?" with loader":""}`)},getDiagramLoader=t=>detectors[t].loader,assignWithDepth=(t,e,{depth:r=2,clobber:o=!1}={})=>{const n={depth:r,clobber:o};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>assignWithDepth(t,a,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=assignWithDepth(t[a],e[a],{depth:r-1,clobber:o})):(o||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},assignWithDepth$1=assignWithDepth,ZERO_WIDTH_SPACE="",d3CurveTypes={curveBasis,curveBasisClosed,curveBasisOpen,curveBumpX:bumpX,curveBumpY:bumpY,curveBundle,curveCardinalClosed,curveCardinalOpen,curveCardinal,curveCatmullRomClosed,curveCatmullRomOpen,curveCatmullRom,curveLinear,curveLinearClosed,curveMonotoneX:monotoneX,curveMonotoneY:monotoneY,curveNatural,curveStep,curveStepAfter:stepAfter,curveStepBefore:stepBefore},directiveWithoutOpen=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,detectInit=function(t,e){const r=detectDirective(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const s=r.map(l=>l.args);sanitizeDirective(s),o=assignWithDepth$1(o,[...s])}else o=r.args;if(!o)return;let n=detectType(t,e);const a="config";return o[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),o[n]=o[a],delete o[a]),o},detectDirective=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),log$1.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let o;const n=[];for(;(o=directiveRegex.exec(t))!==null;)if(o.index===directiveRegex.lastIndex&&directiveRegex.lastIndex++,o&&!e||e&&o[1]&&o[1].match(e)||e&&o[2]&&o[2].match(e)){const a=o[1]?o[1]:o[2],s=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:t,args:null}:n.length===1?n[0]:n}catch(r){return log$1.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},removeDirectives=function(t){return t.replace(directiveRegex,"")},isSubstringInArray=function(t,e){for(const[r,o]of e.entries())if(o.match(t))return r;return-1};function interpolateToCurve(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return d3CurveTypes[r]??e}function formatUrl(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?dist$1.sanitizeUrl(r):r}const runFunc=(t,...e)=>{const r=t.split("."),o=r.length-1,n=r[o];let a=window;for(let s=0;s<o;s++)if(a=a[r[s]],!a){log$1.error(`Function name: ${t} not found in window`);return}a[n](...e)};function distance(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function traverseEdge(t){let e,r=0;t.forEach(n=>{r+=distance(n,e),e=n});const o=r/2;return calculatePoint(t,o)}function calcLabelPosition(t){return t.length===1?t[0]:traverseEdge(t)}const roundNumber=(t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},calculatePoint=(t,e)=>{let r,o=e;for(const n of t){if(r){const a=distance(n,r);if(a<o)o-=a;else{const s=o/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:roundNumber((1-s)*r.x+s*n.x,5),y:roundNumber((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},calcCardinalityPosition=(t,e,r)=>{log$1.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=calculatePoint(e,25),a=t?10:5,s=Math.atan2(e[0].y-n.y,e[0].x-n.x),l={x:0,y:0};return l.x=Math.sin(s)*a+(e[0].x+n.x)/2,l.y=-Math.cos(s)*a+(e[0].y+n.y)/2,l};function calcTerminalLabelPosition(t,e,r){const o=structuredClone(r);log$1.info("our points",o),e!=="start_left"&&e!=="start_right"&&o.reverse();const n=25+t,a=calculatePoint(o,n),s=10+t*.5,l=Math.atan2(o[0].y-a.y,o[0].x-a.x),h={x:0,y:0};return e==="start_left"?(h.x=Math.sin(l+Math.PI)*s+(o[0].x+a.x)/2,h.y=-Math.cos(l+Math.PI)*s+(o[0].y+a.y)/2):e==="end_right"?(h.x=Math.sin(l-Math.PI)*s+(o[0].x+a.x)/2-5,h.y=-Math.cos(l-Math.PI)*s+(o[0].y+a.y)/2-5):e==="end_left"?(h.x=Math.sin(l)*s+(o[0].x+a.x)/2-5,h.y=-Math.cos(l)*s+(o[0].y+a.y)/2-5):(h.x=Math.sin(l)*s+(o[0].x+a.x)/2,h.y=-Math.cos(l)*s+(o[0].y+a.y)/2),h}function getStylesFromArray(t){let e="",r="";for(const o of t)o!==void 0&&(o.startsWith("color:")||o.startsWith("text-align:")?r=r+o+";":e=e+o+";");return{style:e,labelStyle:r}}let cnt=0;const generateId=()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt);function makeRandomHex(t){let e="";const r="0123456789abcdef",o=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*o));return e}const random=t=>makeRandomHex(t.length),getTextObj=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:""}},drawSimpleText=function(t,e){const r=e.text.replace(common$1.lineBreakRegex," "),[,o]=parseFontSize(e.fontSize),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",o),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),n},wrapLabel=memoize((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),common$1.lineBreakRegex.test(t)))return t;const o=t.split(" "),n=[];let a="";return o.forEach((s,l)=>{const h=calculateTextWidth(`${s} `,r),c=calculateTextWidth(a,r);if(h>e){const{hyphenatedStrings:u,remainingWord:f}=breakString(s,e,"-",r);n.push(a,...u),a=f}else c+h>=e?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===o.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),breakString=memoize((t,e,r="-",o)=>{o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},o);const n=[...t],a=[];let s="";return n.forEach((l,h)=>{const c=`${s}${l}`;if(calculateTextWidth(c,o)>=e){const g=h+1,u=n.length===g,f=`${c}${r}`;a.push(u?c:f),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",o)=>`${t}${e}${r}${o.fontSize}${o.fontWeight}${o.fontFamily}`);function calculateTextHeight(t,e){return calculateTextDimensions(t,e).height}function calculateTextWidth(t,e){return calculateTextDimensions(t,e).width}const calculateTextDimensions=memoize((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,a]=parseFontSize(r),s=["sans-serif",o],l=t.split(common$1.lineBreakRegex),h=[],c=select("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const d=c.append("svg");for(const u of s){let f=0;const p={width:0,height:0,lineHeight:0};for(const T of l){const w=getTextObj();w.text=T||ZERO_WIDTH_SPACE;const y=drawSimpleText(d,w).style("font-size",a).style("font-weight",n).style("font-family",u),m=(y._groups||y)[0][0].getBBox();if(m.width===0&&m.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,m.width)),f=Math.round(m.height),p.height+=f,p.lineHeight=Math.round(Math.max(p.lineHeight,f))}h.push(p)}d.remove();const g=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[g]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`);class InitIDGenerator{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}}let decoder;const entityDecode=function(t){return decoder=decoder||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),decoder.innerHTML=t,unescape(decoder.textContent)};function isDetailedError(t){return"str"in t}const insertTitle=(t,e,r,o)=>{var n;if(!o)return;const a=(n=t.node())==null?void 0:n.getBBox();a&&t.append("text").text(o).attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},parseFontSize=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]};function cleanAndMerge(t,e){return merge$1({},t,e)}const utils={assignWithDepth:assignWithDepth$1,wrapLabel,calculateTextHeight,calculateTextWidth,calculateTextDimensions,cleanAndMerge,detectInit,detectDirective,isSubstringInArray,interpolateToCurve,calcLabelPosition,calcCardinalityPosition,calcTerminalLabelPosition,formatUrl,getStylesFromArray,generateId,random,runFunc,entityDecode,insertTitle,parseFontSize,InitIDGenerator},encodeEntities=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const o=r.substring(1,r.length-1);return/^\+?\d+$/.test(o)?"fl°°"+o+"¶ß":"fl°"+o+"¶ß"}),e},decodeEntities=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},version="10.9.1",defaultConfig$1=Object.freeze(defaultConfig$2);let siteConfig=assignWithDepth$1({},defaultConfig$1),configFromInitialize,directives=[],currentConfig=assignWithDepth$1({},defaultConfig$1);const updateCurrentConfig=(t,e)=>{let r=assignWithDepth$1({},t),o={};for(const n of e)sanitize(n),o=assignWithDepth$1(o,n);if(r=assignWithDepth$1(r,o),o.theme&&o.theme in theme){const n=assignWithDepth$1({},configFromInitialize),a=assignWithDepth$1(n.themeVariables||{},o.themeVariables);r.theme&&r.theme in theme&&(r.themeVariables=theme[r.theme].getThemeVariables(a))}return currentConfig=r,checkConfig(currentConfig),currentConfig},setSiteConfig=t=>(siteConfig=assignWithDepth$1({},defaultConfig$1),siteConfig=assignWithDepth$1(siteConfig,t),t.theme&&theme[t.theme]&&(siteConfig.themeVariables=theme[t.theme].getThemeVariables(t.themeVariables)),updateCurrentConfig(siteConfig,directives),siteConfig),saveConfigFromInitialize=t=>{configFromInitialize=assignWithDepth$1({},t)},updateSiteConfig=t=>(siteConfig=assignWithDepth$1(siteConfig,t),updateCurrentConfig(siteConfig,directives),siteConfig),getSiteConfig=()=>assignWithDepth$1({},siteConfig),setConfig$1=t=>(checkConfig(t),assignWithDepth$1(currentConfig,t),getConfig$1()),getConfig$1=()=>assignWithDepth$1({},currentConfig),sanitize=t=>{t&&(["secure",...siteConfig.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(log$1.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&sanitize(t[e])}))},addDirective=t=>{sanitizeDirective(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),directives.push(t),updateCurrentConfig(siteConfig,directives)},reset=(t=siteConfig)=>{directives=[],updateCurrentConfig(t,directives)},ConfigWarning={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},issuedWarnings={},issueWarning=t=>{issuedWarnings[t]||(log$1.warn(ConfigWarning[t]),issuedWarnings[t]=!0)},checkConfig=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&issueWarning("LAZY_LOAD_DEPRECATED")},id$l="c4",detector$l=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),loader$m=async()=>{const{diagram:t}=await __vitePreload(()=>import("./c4Diagram-ae766693.RvEES-NC.js"),__vite__mapDeps([0,1]),import.meta.url);return{id:id$l,diagram:t}},plugin$j={id:id$l,detector:detector$l,loader:loader$m},c4=plugin$j,id$k="flowchart",detector$k=(t,e)=>{var r,o;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},loader$l=async()=>{const{diagram:t}=await __vitePreload(()=>import("./flowDiagram-b222e15a.B-f_vF-z.js"),__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url);return{id:id$k,diagram:t}},plugin$i={id:id$k,detector:detector$k,loader:loader$l},flowchart=plugin$i,id$j="flowchart-v2",detector$j=(t,e)=>{var r,o,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((o=e==null?void 0:e.flowchart)==null?void 0:o.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},loader$k=async()=>{const{diagram:t}=await __vitePreload(()=>import("./flowDiagram-v2-13329dc7.CFNrJn-F.js"),__vite__mapDeps([15,3,6,4,7,5,8,9,10,11,12,13,14]),import.meta.url);return{id:id$j,diagram:t}},plugin$h={id:id$j,detector:detector$j,loader:loader$k},flowchartV2=plugin$h,id$i="er",detector$i=t=>/^\s*erDiagram/.test(t),loader$j=async()=>{const{diagram:t}=await __vitePreload(()=>import("./erDiagram-09d1c15f.zbUkJIFX.js"),__vite__mapDeps([16,4,5,11,12,13]),import.meta.url);return{id:id$i,diagram:t}},plugin$g={id:id$i,detector:detector$i,loader:loader$j},er=plugin$g,id$h="gitGraph",detector$h=t=>/^\s*gitGraph/.test(t),loader$i=async()=>{const{diagram:t}=await __vitePreload(()=>import("./gitGraphDiagram-942e62fe.sNmYCYU-.js"),[],import.meta.url);return{id:id$h,diagram:t}},plugin$f={id:id$h,detector:detector$h,loader:loader$i},git=plugin$f,id$g="gantt",detector$g=t=>/^\s*gantt/.test(t),loader$h=async()=>{const{diagram:t}=await __vitePreload(()=>import("./ganttDiagram-b62c793e.t-lErHZr.js"),__vite__mapDeps([17,18,19]),import.meta.url);return{id:id$g,diagram:t}},plugin$e={id:id$g,detector:detector$g,loader:loader$h},gantt=plugin$e,id$f="info",detector$f=t=>/^\s*info/.test(t),loader$g=async()=>{const{diagram:t}=await __vitePreload(()=>import("./infoDiagram-94cd232f.D3P-LZ-n.js"),[],import.meta.url);return{id:id$f,diagram:t}},info={id:id$f,detector:detector$f,loader:loader$g},id$e="pie",detector$e=t=>/^\s*pie/.test(t),loader$f=async()=>{const{diagram:t}=await __vitePreload(()=>import("./pieDiagram-bb1d19e5.D_A8JDJI.js"),__vite__mapDeps([20,21,13,22,19,12]),import.meta.url);return{id:id$e,diagram:t}},pie={id:id$e,detector:detector$e,loader:loader$f},id$d="quadrantChart",detector$d=t=>/^\s*quadrantChart/.test(t),loader$e=async()=>{const{diagram:t}=await __vitePreload(()=>import("./quadrantDiagram-c759a472.CiAdg45z.js"),__vite__mapDeps([23,18,19]),import.meta.url);return{id:id$d,diagram:t}},plugin$d={id:id$d,detector:detector$d,loader:loader$e},quadrantChart=plugin$d,id$c="xychart",detector$c=t=>/^\s*xychart-beta/.test(t),loader$d=async()=>{const{diagram:t}=await __vitePreload(()=>import("./xychartDiagram-f11f50a6.CfpOz-1V.js"),__vite__mapDeps([24,10,19,22,18,11,12,13]),import.meta.url);return{id:id$c,diagram:t}},plugin$c={id:id$c,detector:detector$c,loader:loader$d},xychart=plugin$c,id$b="requirement",detector$b=t=>/^\s*requirement(Diagram)?/.test(t),loader$c=async()=>{const{diagram:t}=await __vitePreload(()=>import("./requirementDiagram-87253d64.Cxx8iCbW.js"),__vite__mapDeps([25,4,5,11,12,13]),import.meta.url);return{id:id$b,diagram:t}},plugin$b={id:id$b,detector:detector$b,loader:loader$c},requirement=plugin$b,id$a="sequence",detector$a=t=>/^\s*sequenceDiagram/.test(t),loader$b=async()=>{const{diagram:t}=await __vitePreload(()=>import("./sequenceDiagram-6894f283.DWD6NMPb.js"),__vite__mapDeps([26,1]),import.meta.url);return{id:id$a,diagram:t}},plugin$a={id:id$a,detector:detector$a,loader:loader$b},sequence=plugin$a,id$9="class",detector$9=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},loader$a=async()=>{const{diagram:t}=await __vitePreload(()=>import("./classDiagram-fb54d2a0.D61QWN4L.js"),__vite__mapDeps([27,28,4,5,11,12,13]),import.meta.url);return{id:id$9,diagram:t}},plugin$9={id:id$9,detector:detector$9,loader:loader$a},classDiagram=plugin$9,id$8="classDiagram",detector$8=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},loader$9=async()=>{const{diagram:t}=await __vitePreload(()=>import("./classDiagram-v2-a2b738ad.Vntt9iuI.js"),__vite__mapDeps([29,28,4,7,5,8,9,10,11,12,13]),import.meta.url);return{id:id$8,diagram:t}},plugin$8={id:id$8,detector:detector$8,loader:loader$9},classDiagramV2=plugin$8,id$7="state",detector$7=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},loader$8=async()=>{const{diagram:t}=await __vitePreload(()=>import("./stateDiagram-5dee940d.BXqLYkfk.js"),__vite__mapDeps([30,31,4,5,11,12,13]),import.meta.url);return{id:id$7,diagram:t}},plugin$7={id:id$7,detector:detector$7,loader:loader$8},state=plugin$7,id$6="stateDiagram",detector$6=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},loader$7=async()=>{const{diagram:t}=await __vitePreload(()=>import("./stateDiagram-v2-1992cada.CmXvqvSE.js"),__vite__mapDeps([32,31,4,7,5,8,9,10,11,12,13]),import.meta.url);return{id:id$6,diagram:t}},plugin$6={id:id$6,detector:detector$6,loader:loader$7},stateV2=plugin$6,id$5="journey",detector$5=t=>/^\s*journey/.test(t),loader$6=async()=>{const{diagram:t}=await __vitePreload(()=>import("./journeyDiagram-6625b456.CbVUl4RQ.js"),__vite__mapDeps([33,1,21,13]),import.meta.url);return{id:id$5,diagram:t}},plugin$5={id:id$5,detector:detector$5,loader:loader$6},journey=plugin$5,d3Attrs=function(t,e){for(let r of e)t.attr(r[0],r[1])},calculateSvgSizeAttrs=function(t,e,r){let o=new Map;return r?(o.set("width","100%"),o.set("style",`max-width: ${e}px;`)):(o.set("height",t),o.set("width",e)),o},configureSvgSize=function(t,e,r,o){const n=calculateSvgSizeAttrs(e,r,o);d3Attrs(t,n)},setupGraphViewbox$1=function(t,e,r,o){const n=e.node().getBBox(),a=n.width,s=n.height;log$1.info(`SVG bounds: ${a}x${s}`,n);let l=0,h=0;log$1.info(`Graph bounds: ${l}x${h}`,t),l=a+r*2,h=s+r*2,log$1.info(`Calculated bounds: ${l}x${h}`),configureSvgSize(e,h,l,o);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)},themes={},getStyles=(t,e,r)=>{let o="";return t in themes&&themes[t]?o=themes[t](r):log$1.warn(`No theme found for ${t}`),` & {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 2px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${o}
${e}
`},addStylesForDiagram=(t,e)=>{e!==void 0&&(themes[t]=e)},getStyles$1=getStyles;let accTitle="",diagramTitle="",accDescription="";const sanitizeText$1=t=>sanitizeText$2(t,getConfig$1()),clear=()=>{accTitle="",accDescription="",diagramTitle=""},setAccTitle=t=>{accTitle=sanitizeText$1(t).replace(/^\s+/g,"")},getAccTitle=()=>accTitle,setAccDescription=t=>{accDescription=sanitizeText$1(t).replace(/\n\s+/g,`
`)},getAccDescription=()=>accDescription,setDiagramTitle=t=>{diagramTitle=sanitizeText$1(t)},getDiagramTitle=()=>diagramTitle,commonDb=Object.freeze(Object.defineProperty({__proto__:null,clear,getAccDescription,getAccTitle,getDiagramTitle,setAccDescription,setAccTitle,setDiagramTitle},Symbol.toStringTag,{value:"Module"})),log=log$1,setLogLevel=setLogLevel$1,getConfig=getConfig$1,setConfig=setConfig$1,defaultConfig=defaultConfig$1,sanitizeText=t=>sanitizeText$2(t,getConfig()),setupGraphViewbox=setupGraphViewbox$1,getCommonDb=()=>commonDb,diagrams={},registerDiagram=(t,e,r)=>{var o;if(diagrams[t])throw new Error(`Diagram ${t} already registered.`);diagrams[t]=e,r&&addDetector(t,r),addStylesForDiagram(t,e.styles),(o=e.injectUtils)==null||o.call(e,log,setLogLevel,getConfig,sanitizeText,setupGraphViewbox,getCommonDb(),()=>{})},getDiagram=t=>{if(t in diagrams)return diagrams[t];throw new DiagramNotFoundError(t)};class DiagramNotFoundError extends Error{constructor(e){super(`Diagram ${e} not found.`)}}const selectSvgElement=t=>{var e;const{securityLevel:r}=getConfig();let o=select("body");if(r==="sandbox"){const s=((e=select(`#i${t}`).node())==null?void 0:e.contentDocument)??document;o=select(s.body)}return o.select(`#${t}`)},draw=(t,e,r)=>{log$1.debug(`rendering svg for syntax error
`);const o=selectSvgElement(e),n=o.append("g");o.attr("viewBox","0 0 2412 512"),configureSvgSize(o,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}`)},renderer={draw},errorRenderer=renderer,diagram={db:{},renderer,parser:{parser:{yy:{}},parse:()=>{}}},errorDiagram=diagram,id$4="flowchart-elk",detector$4=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},loader$5=async()=>{const{diagram:t}=await __vitePreload(()=>import("./flowchart-elk-definition-ae0efee6.26INoDor.js"),__vite__mapDeps([34,3,9,10,11,12,13]),import.meta.url);return{id:id$4,diagram:t}},plugin$4={id:id$4,detector:detector$4,loader:loader$5},flowchartElk=plugin$4,id$3="timeline",detector$3=t=>/^\s*timeline/.test(t),loader$4=async()=>{const{diagram:t}=await __vitePreload(()=>import("./timeline-definition-bf702344.Ci-ncL3e.js"),__vite__mapDeps([35,21,13]),import.meta.url);return{id:id$3,diagram:t}},plugin$3={id:id$3,detector:detector$3,loader:loader$4},timeline=plugin$3,id$2="mindmap",detector$2=t=>/^\s*mindmap/.test(t),loader$3=async()=>{const{diagram:t}=await __vitePreload(()=>import("./mindmap-definition-307c710a.Dl9XQUP7.js"),__vite__mapDeps([36,10]),import.meta.url);return{id:id$2,diagram:t}},plugin$2={id:id$2,detector:detector$2,loader:loader$3},mindmap=plugin$2,id$1="sankey",detector$1=t=>/^\s*sankey-beta/.test(t),loader$2=async()=>{const{diagram:t}=await __vitePreload(()=>import("./sankeyDiagram-707fac0f.BFW6pdLv.js"),__vite__mapDeps([37,22,19,38]),import.meta.url);return{id:id$1,diagram:t}},plugin$1={id:id$1,detector:detector$1,loader:loader$2},sankey=plugin$1,id$m="block",detector$m=t=>/^\s*block-beta/.test(t),loader$1=async()=>{const{diagram:t}=await __vitePreload(()=>import("./blockDiagram-9f4a6865.CadkeS7Y.js"),__vite__mapDeps([39,8,4,9,10,11,12,13,22,19,14,38]),import.meta.url);return{id:id$m,diagram:t}},plugin$k={id:id$m,detector:detector$m,loader:loader$1},block=plugin$k;let hasLoadedDiagrams=!1;const addDiagrams=()=>{hasLoadedDiagrams||(hasLoadedDiagrams=!0,registerDiagram("error",errorDiagram,t=>t.toLowerCase().trim()==="error"),registerDiagram("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),registerLazyLoadedDiagrams(c4,classDiagramV2,classDiagram,er,gantt,info,pie,requirement,sequence,flowchartElk,flowchartV2,flowchart,mindmap,timeline,git,stateV2,state,journey,quadrantChart,sankey,xychart,block))};class Diagram{constructor(e,r={}){this.text=e,this.metadata=r,this.type="graph",this.text=encodeEntities(e),this.text+=`
`;const o=getConfig$1();try{this.type=detectType(e,o)}catch(a){this.type="error",this.detectError=a}const n=getDiagram(this.type);log$1.debug("Type "+this.type),this.db=n.db,this.renderer=n.renderer,this.parser=n.parser,this.parser.parser.yy=this.db,this.init=n.init,this.parse()}parse(){var e,r,o,n,a;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e);const s=getConfig$1();(o=this.init)==null||o.call(this,s),this.metadata.title&&((a=(n=this.db).setDiagramTitle)==null||a.call(n,this.metadata.title)),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}}const getDiagramFromText$1=async(t,e={})=>{const r=detectType(t,getConfig$1());try{getDiagram(r)}catch{const n=getDiagramLoader(r);if(!n)throw new UnknownDiagramError(`Diagram ${r} not found.`);const{id:a,diagram:s}=await n();registerDiagram(a,s)}return new Diagram(t,e)};let interactionFunctions=[];const attachFunctions=()=>{interactionFunctions.forEach(t=>{t()}),interactionFunctions=[]},SVG_ROLE="graphics-document document";function setA11yDiagramInfo(t,e){t.attr("role",SVG_ROLE),e!==""&&t.attr("aria-roledescription",e)}function addSVGa11yTitleDescription(t,e,r,o){if(t.insert!==void 0){if(r){const n=`chart-desc-${o}`;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n=`chart-title-${o}`;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}const cleanupComments=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(t){return typeof t>"u"||t===null}function isObject(t){return typeof t=="object"&&t!==null}function toArray(t){return Array.isArray(t)?t:isNothing(t)?[]:[t]}function extend(t,e){var r,o,n,a;if(e)for(a=Object.keys(e),r=0,o=a.length;r<o;r+=1)n=a[r],t[n]=e[n];return t}function repeat(t,e){var r="",o;for(o=0;o<e;o+=1)r+=t;return r}function isNegativeZero(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common$2={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(t,e){var r="",o=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),o+" "+r):o}function YAMLException$1(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}YAMLException$1.prototype=Object.create(Error.prototype);YAMLException$1.prototype.constructor=YAMLException$1;YAMLException$1.prototype.toString=function t(e){return this.name+": "+formatError(this,e)};var exception=YAMLException$1;function getLine(t,e,r,o,n){var a="",s="",l=Math.floor(n/2)-1;return o-e>l&&(a=" ... ",e=o-l+a.length),r-o>l&&(s=" ...",r=o+l-s.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:o-e+a.length}}function padStart(t,e){return common$2.repeat(" ",e-t.length)+t}function makeSnippet(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],n=[],a,s=-1;a=r.exec(t.buffer);)n.push(a.index),o.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var l="",h,c,d=Math.min(t.line+e.linesAfter,n.length).toString().length,g=e.maxLength-(e.indent+d+3);for(h=1;h<=e.linesBefore&&!(s-h<0);h++)c=getLine(t.buffer,o[s-h],n[s-h],t.position-(o[s]-o[s-h]),g),l=common$2.repeat(" ",e.indent)+padStart((t.line-h+1).toString(),d)+" | "+c.str+`
`+l;for(c=getLine(t.buffer,o[s],n[s],t.position,g),l+=common$2.repeat(" ",e.indent)+padStart((t.line+1).toString(),d)+" | "+c.str+`
`,l+=common$2.repeat("-",e.indent+d+3+c.pos)+`^
`,h=1;h<=e.linesAfter&&!(s+h>=n.length);h++)c=getLine(t.buffer,o[s+h],n[s+h],t.position-(o[s]-o[s+h]),g),l+=common$2.repeat(" ",e.indent)+padStart((t.line+h+1).toString(),d)+" | "+c.str+`
`;return l.replace(/\n$/,"")}var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function Type$1(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(r)===-1)throw new exception('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=compileStyleAliases(e.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var type=Type$1;function compileList(t,e){var r=[];return t[e].forEach(function(o){var n=r.length;r.forEach(function(a,s){a.tag===o.tag&&a.kind===o.kind&&a.multi===o.multi&&(n=s)}),r[n]=o}),r}function compileMap(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function o(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function Schema$1(t){return this.extend(t)}Schema$1.prototype.extend=function t(e){var r=[],o=[];if(e instanceof type)o.push(e);else if(Array.isArray(e))o=o.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(o=o.concat(e.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(a){if(!(a instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Schema$1.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(o),n.compiledImplicit=compileList(n,"implicit"),n.compiledExplicit=compileList(n,"explicit"),n.compiledTypeMap=compileMap(n.compiledImplicit,n.compiledExplicit),n};var schema=Schema$1,str=new type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),seq=new type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),map=new type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),failsafe=new schema({explicit:[str,seq,map]});function resolveYamlNull(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function constructYamlNull(){return null}function isNull(t){return t===null}var _null=new type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function resolveYamlBoolean(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function constructYamlBoolean(t){return t==="true"||t==="True"||t==="TRUE"}function isBoolean(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var bool=new type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function isOctCode(t){return 48<=t&&t<=55}function isDecCode(t){return 48<=t&&t<=57}function resolveYamlInteger(t){if(t===null)return!1;var e=t.length,r=0,o=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;o=!0}return o&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!isHexCode(t.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!isOctCode(t.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!isDecCode(t.charCodeAt(r)))return!1;o=!0}return!(!o||n==="_")}function constructYamlInteger(t){var e=t,r=1,o;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),o=e[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),e=e.slice(1),o=e[0]),e==="0")return 0;if(o==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function isInteger(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!common$2.isNegativeZero(t)}var int=new type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(t){return!(t===null||!YAML_FLOAT_PATTERN.test(t)||t[t.length-1]==="_")}function constructYamlFloat(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(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(common$2.isNegativeZero(t))return"-0.0";return r=t.toString(10),SCIENTIFIC_WITHOUT_DOT.test(r)?r.replace("e",".e"):r}function isFloat(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||common$2.isNegativeZero(t))}var float=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json=failsafe.extend({implicit:[_null,bool,int,float]}),core=json,YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(t){return t===null?!1:YAML_DATE_REGEXP.exec(t)!==null||YAML_TIMESTAMP_REGEXP.exec(t)!==null}function constructYamlTimestamp(t){var e,r,o,n,a,s,l,h=0,c=null,d,g,u;if(e=YAML_DATE_REGEXP.exec(t),e===null&&(e=YAML_TIMESTAMP_REGEXP.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],o=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,o,n));if(a=+e[4],s=+e[5],l=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(d=+e[10],g=+(e[11]||0),c=(d*60+g)*6e4,e[9]==="-"&&(c=-c)),u=new Date(Date.UTC(r,o,n,a,s,l,h)),c&&u.setTime(u.getTime()-c),u}function representYamlTimestamp(t){return t.toISOString()}var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(t){return t==="<<"||t===null}var merge=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function resolveYamlBinary(t){if(t===null)return!1;var e,r,o=0,n=t.length,a=BASE64_MAP;for(r=0;r<n;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function constructYamlBinary(t){var e,r,o=t.replace(/[\r\n=]/g,""),n=o.length,a=BASE64_MAP,s=0,l=[];for(e=0;e<n;e++)e%4===0&&e&&(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|a.indexOf(o.charAt(e));return r=n%4*6,r===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):r===18?(l.push(s>>10&255),l.push(s>>2&255)):r===12&&l.push(s>>4&255),new Uint8Array(l)}function representYamlBinary(t){var e="",r=0,o,n,a=t.length,s=BASE64_MAP;for(o=0;o<a;o++)o%3===0&&o&&(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[o];return n=a%3,n===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):n===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):n===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function isBinary(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var binary=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(t){if(t===null)return!0;var e=[],r,o,n,a,s,l=t;for(r=0,o=l.length;r<o;r+=1){if(n=l[r],s=!1,_toString$2.call(n)!=="[object Object]")return!1;for(a in n)if(_hasOwnProperty$3.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}function constructYamlOmap(t){return t!==null?t:[]}var omap=new type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString$1=Object.prototype.toString;function resolveYamlPairs(t){if(t===null)return!0;var e,r,o,n,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(o=s[e],_toString$1.call(o)!=="[object Object]"||(n=Object.keys(o),n.length!==1))return!1;a[e]=[n[0],o[n[0]]]}return!0}function constructYamlPairs(t){if(t===null)return[];var e,r,o,n,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)o=s[e],n=Object.keys(o),a[e]=[n[0],o[n[0]]];return a}var pairs=new type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty$2=Object.prototype.hasOwnProperty;function resolveYamlSet(t){if(t===null)return!0;var e,r=t;for(e in r)if(_hasOwnProperty$2.call(r,e)&&r[e]!==null)return!1;return!0}function constructYamlSet(t){return t!==null?t:{}}var set=new type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core.extend({implicit:[timestamp,merge],explicit:[binary,omap,pairs,set]}),_hasOwnProperty$1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(t){return Object.prototype.toString.call(t)}function is_EOL(t){return t===10||t===13}function is_WHITE_SPACE(t){return t===9||t===32}function is_WS_OR_EOL(t){return t===9||t===32||t===10||t===13}function is_FLOW_INDICATOR(t){return t===44||t===91||t===93||t===123||t===125}function fromHexCode(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function escapedHexLen(t){return t===120?2:t===117?4:t===85?8:0}function fromDecimalCode(t){return 48<=t&&t<=57?t-48:-1}function simpleEscapeSequence(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function charFromCodepoint(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(var i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);function State$1(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||_default,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 generateError(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=snippet(r),new exception(e,r)}function throwError(t,e){throw generateError(t,e)}function throwWarning(t,e){t.onWarning&&t.onWarning.call(null,generateError(t,e))}var directiveHandlers={YAML:function t(e,r,o){var n,a,s;e.version!==null&&throwError(e,"duplication of %YAML directive"),o.length!==1&&throwError(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),n===null&&throwError(e,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&throwError(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&throwWarning(e,"unsupported YAML version of the document")},TAG:function t(e,r,o){var n,a;o.length!==2&&throwError(e,"TAG directive accepts exactly two arguments"),n=o[0],a=o[1],PATTERN_TAG_HANDLE.test(n)||throwError(e,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$1.call(e.tagMap,n)&&throwError(e,'there is a previously declared suffix for "'+n+'" tag handle'),PATTERN_TAG_URI.test(a)||throwError(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{throwError(e,"tag prefix is malformed: "+a)}e.tagMap[n]=a}};function captureSegment(t,e,r,o){var n,a,s,l;if(e<r){if(l=t.input.slice(e,r),o)for(n=0,a=l.length;n<a;n+=1)s=l.charCodeAt(n),s===9||32<=s&&s<=1114111||throwError(t,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(l)&&throwError(t,"the stream contains non-printable characters");t.result+=l}}function mergeMappings(t,e,r,o){var n,a,s,l;for(common$2.isObject(r)||throwError(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,l=n.length;s<l;s+=1)a=n[s],_hasOwnProperty$1.call(e,a)||(e[a]=r[a],o[a]=!0)}function storeMappingPair(t,e,r,o,n,a,s,l,h){var c,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,d=n.length;c<d;c+=1)Array.isArray(n[c])&&throwError(t,"nested arrays are not supported inside keys"),typeof n=="object"&&_class(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&_class(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,d=a.length;c<d;c+=1)mergeMappings(t,e,a[c],r);else mergeMappings(t,e,a,r);else!t.json&&!_hasOwnProperty$1.call(r,n)&&_hasOwnProperty$1.call(e,n)&&(t.line=s||t.line,t.lineStart=l||t.lineStart,t.position=h||t.position,throwError(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[n]=a,delete r[n];return e}function readLineBreak(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):throwError(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function skipSeparationSpace(t,e,r){for(var o=0,n=t.input.charCodeAt(t.position);n!==0;){for(;is_WHITE_SPACE(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(is_EOL(n))for(readLineBreak(t),n=t.input.charCodeAt(t.position),o++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&throwWarning(t,"deficient indentation"),o}function testDocumentSeparator(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||is_WS_OR_EOL(r)))}function writeFoldedLines(t,e){e===1?t.result+=" ":e>1&&(t.result+=common$2.repeat(`
`,e-1))}function readPlainScalar(t,e,r){var o,n,a,s,l,h,c,d,g=t.kind,u=t.result,f;if(f=t.input.charCodeAt(t.position),is_WS_OR_EOL(f)||is_FLOW_INDICATOR(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=t.input.charCodeAt(t.position+1),is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,l=!1;f!==0;){if(f===58){if(n=t.input.charCodeAt(t.position+1),is_WS_OR_EOL(n)||r&&is_FLOW_INDICATOR(n))break}else if(f===35){if(o=t.input.charCodeAt(t.position-1),is_WS_OR_EOL(o))break}else{if(t.position===t.lineStart&&testDocumentSeparator(t)||r&&is_FLOW_INDICATOR(f))break;if(is_EOL(f))if(h=t.line,c=t.lineStart,d=t.lineIndent,skipSeparationSpace(t,!1,-1),t.lineIndent>=e){l=!0,f=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=h,t.lineStart=c,t.lineIndent=d;break}}l&&(captureSegment(t,a,s,!1),writeFoldedLines(t,t.line-h),a=s=t.position,l=!1),is_WHITE_SPACE(f)||(s=t.position+1),f=t.input.charCodeAt(++t.position)}return captureSegment(t,a,s,!1),t.result?!0:(t.kind=g,t.result=u,!1)}function readSingleQuotedScalar(t,e){var r,o,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(captureSegment(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,n=t.position;else return!0;else is_EOL(r)?(captureSegment(t,o,n,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),o=n=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);throwError(t,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(t,e){var r,o,n,a,s,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return captureSegment(t,r,t.position,!0),t.position++,!0;if(l===92){if(captureSegment(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),is_EOL(l))skipSeparationSpace(t,!1,e);else if(l<256&&simpleEscapeCheck[l])t.result+=simpleEscapeMap[l],t.position++;else if((s=escapedHexLen(l))>0){for(n=s,a=0;n>0;n--)l=t.input.charCodeAt(++t.position),(s=fromHexCode(l))>=0?a=(a<<4)+s:throwError(t,"expected hexadecimal character");t.result+=charFromCodepoint(a),t.position++}else throwError(t,"unknown escape sequence");r=o=t.position}else is_EOL(l)?(captureSegment(t,r,o,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),r=o=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}throwError(t,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(t,e){var r=!0,o,n,a,s=t.tag,l,h=t.anchor,c,d,g,u,f,p=Object.create(null),T,w,y,m;if(m=t.input.charCodeAt(t.position),m===91)d=93,f=!1,l=[];else if(m===123)d=125,f=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),m=t.input.charCodeAt(++t.position);m!==0;){if(skipSeparationSpace(t,!0,e),m=t.input.charCodeAt(t.position),m===d)return t.position++,t.tag=s,t.anchor=h,t.kind=f?"mapping":"sequence",t.result=l,!0;r?m===44&&throwError(t,"expected the node content, but found ','"):throwError(t,"missed comma between flow collection entries"),w=T=y=null,g=u=!1,m===63&&(c=t.input.charCodeAt(t.position+1),is_WS_OR_EOL(c)&&(g=u=!0,t.position++,skipSeparationSpace(t,!0,e))),o=t.line,n=t.lineStart,a=t.position,composeNode(t,e,CONTEXT_FLOW_IN,!1,!0),w=t.tag,T=t.result,skipSeparationSpace(t,!0,e),m=t.input.charCodeAt(t.position),(u||t.line===o)&&m===58&&(g=!0,m=t.input.charCodeAt(++t.position),skipSeparationSpace(t,!0,e),composeNode(t,e,CONTEXT_FLOW_IN,!1,!0),y=t.result),f?storeMappingPair(t,l,p,w,T,y,o,n,a):g?l.push(storeMappingPair(t,null,p,w,T,y,o,n,a)):l.push(T),skipSeparationSpace(t,!0,e),m=t.input.charCodeAt(t.position),m===44?(r=!0,m=t.input.charCodeAt(++t.position)):r=!1}throwError(t,"unexpected end of the stream within a flow collection")}function readBlockScalar(t,e){var r,o,n=CHOMPING_CLIP,a=!1,s=!1,l=e,h=0,c=!1,d,g;if(g=t.input.charCodeAt(t.position),g===124)o=!1;else if(g===62)o=!0;else return!1;for(t.kind="scalar",t.result="";g!==0;)if(g=t.input.charCodeAt(++t.position),g===43||g===45)CHOMPING_CLIP===n?n=g===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(t,"repeat of a chomping mode identifier");else if((d=fromDecimalCode(g))>=0)d===0?throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?throwError(t,"repeat of an indentation width identifier"):(l=e+d-1,s=!0);else break;if(is_WHITE_SPACE(g)){do g=t.input.charCodeAt(++t.position);while(is_WHITE_SPACE(g));if(g===35)do g=t.input.charCodeAt(++t.position);while(!is_EOL(g)&&g!==0)}for(;g!==0;){for(readLineBreak(t),t.lineIndent=0,g=t.input.charCodeAt(t.position);(!s||t.lineIndent<l)&&g===32;)t.lineIndent++,g=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>l&&(l=t.lineIndent),is_EOL(g)){h++;continue}if(t.lineIndent<l){n===CHOMPING_KEEP?t.result+=common$2.repeat(`
`,a?1+h:h):n===CHOMPING_CLIP&&a&&(t.result+=`
`);break}for(o?is_WHITE_SPACE(g)?(c=!0,t.result+=common$2.repeat(`
`,a?1+h:h)):c?(c=!1,t.result+=common$2.repeat(`
`,h+1)):h===0?a&&(t.result+=" "):t.result+=common$2.repeat(`
`,h):t.result+=common$2.repeat(`
`,a?1+h:h),a=!0,s=!0,h=0,r=t.position;!is_EOL(g)&&g!==0;)g=t.input.charCodeAt(++t.position);captureSegment(t,r,t.position,!1)}return!0}function readBlockSequence(t,e){var r,o=t.tag,n=t.anchor,a=[],s,l=!1,h;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),h=t.input.charCodeAt(t.position);h!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,throwError(t,"tab characters must not be used in indentation")),!(h!==45||(s=t.input.charCodeAt(t.position+1),!is_WS_OR_EOL(s))));){if(l=!0,t.position++,skipSeparationSpace(t,!0,-1)&&t.lineIndent<=e){a.push(null),h=t.input.charCodeAt(t.position);continue}if(r=t.line,composeNode(t,e,CONTEXT_BLOCK_IN,!1,!0),a.push(t.result),skipSeparationSpace(t,!0,-1),h=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&h!==0)throwError(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return l?(t.tag=o,t.anchor=n,t.kind="sequence",t.result=a,!0):!1}function readBlockMapping(t,e,r){var o,n,a,s,l,h,c=t.tag,d=t.anchor,g={},u=Object.create(null),f=null,p=null,T=null,w=!1,y=!1,m;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=g),m=t.input.charCodeAt(t.position);m!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,throwError(t,"tab characters must not be used in indentation")),o=t.input.charCodeAt(t.position+1),a=t.line,(m===63||m===58)&&is_WS_OR_EOL(o))m===63?(w&&(storeMappingPair(t,g,u,f,p,null,s,l,h),f=p=T=null),y=!0,w=!0,n=!0):w?(w=!1,n=!0):throwError(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,m=o;else{if(s=t.line,l=t.lineStart,h=t.position,!composeNode(t,r,CONTEXT_FLOW_OUT,!1,!0))break;if(t.line===a){for(m=t.input.charCodeAt(t.position);is_WHITE_SPACE(m);)m=t.input.charCodeAt(++t.position);if(m===58)m=t.input.charCodeAt(++t.position),is_WS_OR_EOL(m)||throwError(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(storeMappingPair(t,g,u,f,p,null,s,l,h),f=p=T=null),y=!0,w=!1,n=!1,f=t.tag,p=t.result;else if(y)throwError(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=d,!0}else if(y)throwError(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=d,!0}if((t.line===a||t.lineIndent>e)&&(w&&(s=t.line,l=t.lineStart,h=t.position),composeNode(t,e,CONTEXT_BLOCK_OUT,!0,n)&&(w?p=t.result:T=t.result),w||(storeMappingPair(t,g,u,f,p,T,s,l,h),f=p=T=null),skipSeparationSpace(t,!0,-1),m=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&m!==0)throwError(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&storeMappingPair(t,g,u,f,p,null,s,l,h),y&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=g),y}function readTagProperty(t){var e,r=!1,o=!1,n,a,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&throwError(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(r=!0,s=t.input.charCodeAt(++t.position)):s===33?(o=!0,n="!!",s=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(a=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):throwError(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!is_WS_OR_EOL(s);)s===33&&(o?throwError(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),PATTERN_TAG_HANDLE.test(n)||throwError(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),PATTERN_FLOW_INDICATORS.test(a)&&throwError(t,"tag suffix cannot contain flow indicator characters")}a&&!PATTERN_TAG_URI.test(a)&&throwError(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{throwError(t,"tag name is malformed: "+a)}return r?t.tag=a:_hasOwnProperty$1.call(t.tagMap,n)?t.tag=t.tagMap[n]+a:n==="!"?t.tag="!"+a:n==="!!"?t.tag="tag:yaml.org,2002:"+a:throwError(t,'undeclared tag handle "'+n+'"'),!0}function readAnchorProperty(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&throwError(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&throwError(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function readAlias(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!is_WS_OR_EOL(o)&&!is_FLOW_INDICATOR(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&throwError(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),_hasOwnProperty$1.call(t.anchorMap,r)||throwError(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],skipSeparationSpace(t,!0,-1),!0}function composeNode(t,e,r,o,n){var a,s,l,h=1,c=!1,d=!1,g,u,f,p,T,w;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=l=CONTEXT_BLOCK_OUT===r||CONTEXT_BLOCK_IN===r,o&&skipSeparationSpace(t,!0,-1)&&(c=!0,t.lineIndent>e?h=1:t.lineIndent===e?h=0:t.lineIndent<e&&(h=-1)),h===1)for(;readTagProperty(t)||readAnchorProperty(t);)skipSeparationSpace(t,!0,-1)?(c=!0,l=a,t.lineIndent>e?h=1:t.lineIndent===e?h=0:t.lineIndent<e&&(h=-1)):l=!1;if(l&&(l=c||n),(h===1||CONTEXT_BLOCK_OUT===r)&&(CONTEXT_FLOW_IN===r||CONTEXT_FLOW_OUT===r?T=e:T=e+1,w=t.position-t.lineStart,h===1?l&&(readBlockSequence(t,w)||readBlockMapping(t,w,T))||readFlowCollection(t,T)?d=!0:(s&&readBlockScalar(t,T)||readSingleQuotedScalar(t,T)||readDoubleQuotedScalar(t,T)?d=!0:readAlias(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&throwError(t,"alias node should not have any properties")):readPlainScalar(t,T,CONTEXT_FLOW_IN===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):h===0&&(d=l&&readBlockSequence(t,w))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&throwError(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),g=0,u=t.implicitTypes.length;g<u;g+=1)if(p=t.implicitTypes[g],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(_hasOwnProperty$1.call(t.typeMap[t.kind||"fallback"],t.tag))p=t.typeMap[t.kind||"fallback"][t.tag];else for(p=null,f=t.typeMap.multi[t.kind||"fallback"],g=0,u=f.length;g<u;g+=1)if(t.tag.slice(0,f[g].tag.length)===f[g].tag){p=f[g];break}p||throwError(t,"unknown tag !<"+t.tag+">"),t.result!==null&&p.kind!==t.kind&&throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function readDocument(t){var e=t.position,r,o,n,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(skipSeparationSpace(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!is_WS_OR_EOL(s);)s=t.input.charCodeAt(++t.position);for(o=t.input.slice(r,t.position),n=[],o.length<1&&throwError(t,"directive name must not be less than one character in length");s!==0;){for(;is_WHITE_SPACE(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!is_EOL(s));break}if(is_EOL(s))break;for(r=t.position;s!==0&&!is_WS_OR_EOL(s);)s=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}s!==0&&readLineBreak(t),_hasOwnProperty$1.call(directiveHandlers,o)?directiveHandlers[o](t,o,n):throwWarning(t,'unknown document directive "'+o+'"')}if(skipSeparationSpace(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,skipSeparationSpace(t,!0,-1)):a&&throwError(t,"directives end mark is expected"),composeNode(t,t.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(t,!0,-1),t.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(t.input.slice(e,t.position))&&throwWarning(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&testDocumentSeparator(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,skipSeparationSpace(t,!0,-1));return}if(t.position<t.length-1)throwError(t,"end of the stream or a document separator is expected");else return}function loadDocuments(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new State$1(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,throwError(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)readDocument(r);return r.documents}function loadAll$1(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=loadDocuments(t,r);if(typeof e!="function")return o;for(var n=0,a=o.length;n<a;n+=1)e(o[n])}function load$1(t,e){var r=loadDocuments(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new exception("expected a single document in the stream, but found more")}}var loadAll_1=loadAll$1,load_1=load$1,loader$n={loadAll:loadAll_1,load:load_1},JSON_SCHEMA=json,load=loader$n.load;function extractFrontMatter(t){const e=t.match(frontMatterRegex);if(!e)return{text:t,metadata:{}};let r=load(e[1],{schema:JSON_SCHEMA})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const o={};return r.displayMode&&(o.displayMode=r.displayMode.toString()),r.title&&(o.title=r.title.toString()),r.config&&(o.config=r.config),{text:t.slice(e[0].length),metadata:o}}const cleanupText=t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(e,r,o)=>"<"+r+o.replace(/="([^"]*)"/g,"='$1'")+">"),processFrontmatter=t=>{const{text:e,metadata:r}=extractFrontMatter(t),{displayMode:o,title:n,config:a={}}=r;return o&&(a.gantt||(a.gantt={}),a.gantt.displayMode=o),{title:n,config:a,text:e}},processDirectives=t=>{const e=utils.detectInit(t)??{},r=utils.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:o})=>{}):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:removeDirectives(t),directive:e}};function preprocessDiagram(t){const e=cleanupText(t),r=processFrontmatter(e),o=processDirectives(r.text),n=cleanAndMerge(r.config,o.directive);return t=cleanupComments(o.text),{code:t,title:r.title,config:n}}const MAX_TEXTLENGTH=5e4,MAX_TEXTLENGTH_EXCEEDED_MSG="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",SECURITY_LVL_SANDBOX="sandbox",SECURITY_LVL_LOOSE="loose",XMLNS_SVG_STD="http://www.w3.org/2000/svg",XMLNS_XLINK_STD="http://www.w3.org/1999/xlink",XMLNS_XHTML_STD="http://www.w3.org/1999/xhtml",IFRAME_WIDTH="100%",IFRAME_HEIGHT="100%",IFRAME_STYLES="border:0;margin:0;",IFRAME_BODY_STYLE="margin:0",IFRAME_SANDBOX_OPTS="allow-top-navigation-by-user-activation allow-popups",IFRAME_NOT_SUPPORTED_MSG='The "iframe" tag is not supported by your browser.',DOMPURIFY_TAGS=["foreignobject"],DOMPURIFY_ATTR=["dominant-baseline"];function processAndSetConfigs(t){const e=preprocessDiagram(t);return reset(),addDirective(e.config??{}),e}async function parse$1(t,e){addDiagrams(),t=processAndSetConfigs(t).code;try{await getDiagramFromText(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}const cssImportantStyles=(t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,createCssStyles=(t,e={})=>{var r;let o="";if(t.themeCSS!==void 0&&(o+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(o+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(o+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!isEmpty(e)){const l=t.htmlLabels||((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const h in e){const c=e[h];isEmpty(c.styles)||l.forEach(d=>{o+=cssImportantStyles(c.id,d,c.styles)}),isEmpty(c.textStyles)||(o+=cssImportantStyles(c.id,"tspan",c.textStyles))}}return o},createUserStyles=(t,e,r,o)=>{const n=createCssStyles(t,r),a=getStyles$1(e,n,t.themeVariables);return serialize(compile(`${o}{${a}}`),stringify)},cleanUpSvgCode=(t="",e,r)=>{let o=t;return!r&&!e&&(o=o.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),o=decodeEntities(o),o=o.replace(/<br>/g,"<br/>"),o},putIntoIFrame=(t="",e)=>{var r,o;const n=(o=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&o.height?e.viewBox.baseVal.height+"px":IFRAME_HEIGHT,a=btoa('<body style="'+IFRAME_BODY_STYLE+'">'+t+"</body>");return`<iframe style="width:${IFRAME_WIDTH};height:${n};${IFRAME_STYLES}" src="data:text/html;base64,${a}" sandbox="${IFRAME_SANDBOX_OPTS}">
${IFRAME_NOT_SUPPORTED_MSG}
</iframe>`},appendDivSvgG=(t,e,r,o,n)=>{const a=t.append("div");a.attr("id",r),o&&a.attr("style",o);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",XMLNS_SVG_STD);return n&&s.attr("xmlns:xlink",n),s.append("g"),t};function sandboxedIframe(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const removeExistingElements=(t,e,r,o)=>{var n,a,s;(n=t.getElementById(e))==null||n.remove(),(a=t.getElementById(r))==null||a.remove(),(s=t.getElementById(o))==null||s.remove()},render$1=async function(t,e,r){var o,n,a,s,l,h;addDiagrams();const c=processAndSetConfigs(e);e=c.code;const d=getConfig$1();log$1.debug(d),e.length>((d==null?void 0:d.maxTextSize)??MAX_TEXTLENGTH)&&(e=MAX_TEXTLENGTH_EXCEEDED_MSG);const g="#"+t,u="i"+t,f="#"+u,p="d"+t,T="#"+p;let w=select("body");const y=d.securityLevel===SECURITY_LVL_SANDBOX,m=d.securityLevel===SECURITY_LVL_LOOSE,C=d.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),y){const R=sandboxedIframe(select(r),u);w=select(R.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=select(r);appendDivSvgG(w,t,p,`font-family: ${C}`,XMLNS_XLINK_STD)}else{if(removeExistingElements(document,t,p,u),y){const R=sandboxedIframe(select("body"),u);w=select(R.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=select("body");appendDivSvgG(w,t,p)}let b,B;try{b=await getDiagramFromText(e,{title:c.title})}catch(R){b=new Diagram("error"),B=R}const O=w.select(T).node(),x=b.type,F=O.firstChild,S=F.firstChild,E=(n=(o=b.renderer).getClasses)==null?void 0:n.call(o,e,b),k=createUserStyles(d,x,E,g),P=document.createElement("style");P.innerHTML=k,F.insertBefore(P,S);try{await b.renderer.draw(e,t,version,b)}catch(R){throw errorRenderer.draw(e,t,version),R}const j=w.select(`${T} svg`),N=(s=(a=b.db).getAccTitle)==null?void 0:s.call(a),I=(h=(l=b.db).getAccDescription)==null?void 0:h.call(l);addA11yInfo(x,j,N,I),w.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",XMLNS_XHTML_STD);let A=w.select(T).node().innerHTML;if(log$1.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),A=cleanUpSvgCode(A,y,evaluate(d.arrowMarkerAbsolute)),y){const R=w.select(T+" svg").node();A=putIntoIFrame(A,R)}else m||(A=purify.sanitize(A,{ADD_TAGS:DOMPURIFY_TAGS,ADD_ATTR:DOMPURIFY_ATTR}));if(attachFunctions(),B)throw B;const L=select(y?f:T).node();return L&&"remove"in L&&L.remove(),{svg:A,bindFunctions:b.db.bindFunctions}};function initialize$1(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),saveConfigFromInitialize(t),t!=null&&t.theme&&t.theme in theme?t.themeVariables=theme[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=theme.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?setSiteConfig(t):getSiteConfig();setLogLevel$1(r.logLevel),addDiagrams()}const getDiagramFromText=(t,e={})=>{const{code:r}=preprocessDiagram(t);return getDiagramFromText$1(r,e)};function addA11yInfo(t,e,r,o){setA11yDiagramInfo(e,t),addSVGa11yTitleDescription(e,r,o,e.attr("id"))}const mermaidAPI=Object.freeze({render:render$1,parse:parse$1,getDiagramFromText,initialize:initialize$1,getConfig:getConfig$1,setConfig:setConfig$1,getSiteConfig,updateSiteConfig,reset:()=>{reset()},globalReset:()=>{reset(defaultConfig$1)},defaultConfig:defaultConfig$1});setLogLevel$1(getConfig$1().logLevel);reset(getConfig$1());const loadRegisteredDiagrams=async()=>{log$1.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(detectors).map(async([r,{detector:o,loader:n}])=>{if(n)try{getDiagram(r)}catch{try{const{diagram:s,id:l}=await n();registerDiagram(l,s,o)}catch(s){throw log$1.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete detectors[r],s}}}))).filter(r=>r.status==="rejected");if(e.length>0){log$1.error(`Failed to load ${e.length} external diagrams`);for(const r of e)log$1.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},handleError=(t,e,r)=>{log$1.warn(t),isDetailedError(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}))},run=async function(t={querySelector:".mermaid"}){try{await runThrowsErrors(t)}catch(e){if(isDetailedError(e)&&log$1.error(e.str),mermaid.parseError&&mermaid.parseError(e),!t.suppressErrors)throw log$1.error("Use the suppressErrors option to suppress these errors"),e}},runThrowsErrors=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const o=mermaidAPI.getConfig();log$1.debug(`${t?"":"No "}Callback function found`);let n;if(r)n=r;else if(e)n=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");log$1.debug(`Found ${n.length} diagrams`),(o==null?void 0:o.startOnLoad)!==void 0&&(log$1.debug("Start On Load: "+(o==null?void 0:o.startOnLoad)),mermaidAPI.updateSiteConfig({startOnLoad:o==null?void 0:o.startOnLoad}));const a=new utils.InitIDGenerator(o.deterministicIds,o.deterministicIDSeed);let s;const l=[];for(const h of Array.from(n)){log$1.info("Rendering diagram: "+h.id);/*! Check if previously processed */if(h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=h.innerHTML,s=dedent(utils.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=utils.detectInit(s);d&&log$1.debug("Detected early reinit: ",d);try{const{svg:g,bindFunctions:u}=await render$2(c,s,h);h.innerHTML=g,t&&await t(c),u&&u(h)}catch(g){handleError(g,l,mermaid.parseError)}}if(l.length>0)throw l[0]},initialize=function(t){mermaidAPI.initialize(t)},init$1=async function(t,e,r){log$1.warn("mermaid.init is deprecated. Please use run instead."),t&&initialize(t);const o={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?o.querySelector=e:e&&(e instanceof HTMLElement?o.nodes=[e]:o.nodes=e),await run(o)},registerExternalDiagrams=async(t,{lazyLoad:e=!0}={})=>{registerLazyLoadedDiagrams(...t),e===!1&&await loadRegisteredDiagrams()},contentLoaded=function(){if(mermaid.startOnLoad){const{startOnLoad:t}=mermaidAPI.getConfig();t&&mermaid.run().catch(e=>log$1.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*!
* Wait for document loaded before starting the execution
*/window.addEventListener("load",contentLoaded,!1)}const setParseErrorHandler=function(t){mermaid.parseError=t},executionQueue=[];let executionQueueRunning=!1;const executeQueue=async()=>{if(!executionQueueRunning){for(executionQueueRunning=!0;executionQueue.length>0;){const t=executionQueue.shift();if(t)try{await t()}catch(e){log$1.error("Error executing queue",e)}}executionQueueRunning=!1}},parse$2=async(t,e)=>new Promise((r,o)=>{const n=()=>new Promise((a,s)=>{mermaidAPI.parse(t,e).then(l=>{a(l),r(l)},l=>{var h;log$1.error("Error parsing",l),(h=mermaid.parseError)==null||h.call(mermaid,l),s(l),o(l)})});executionQueue.push(n),executeQueue().catch(o)}),render$2=(t,e,r)=>new Promise((o,n)=>{const a=()=>new Promise((s,l)=>{mermaidAPI.render(t,e,r).then(h=>{s(h),o(h)},h=>{var c;log$1.error("Error parsing",h),(c=mermaid.parseError)==null||c.call(mermaid,h),l(h),n(h)})});executionQueue.push(a),executeQueue().catch(n)}),mermaid={startOnLoad:!0,mermaidAPI,parse:parse$2,render:render$2,init:init$1,run,registerExternalDiagrams,initialize,parseError:void 0,contentLoaded,setParseErrorHandler,detectType},id="zenuml",detector=t=>/^\s*zenuml/.test(t),loader=async()=>{const{diagram:t}=await __vitePreload(()=>import("./zenuml-definition-ddfc84a5.Be5qecV5.js").then(e=>e.z),__vite__mapDeps([40,41]),import.meta.url);return{id,diagram:t}},plugin={id,detector,loader},init=mermaid.registerExternalDiagrams([plugin]),render=async(t,e,r)=>(await init,mermaid.initialize(t),await mermaid.render(r,e)),parse=async t=>await mermaid.parse(t);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(t){let e=t.length;for(;--e>=0;)t[e]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(t,e,r,o,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=o,this.max_length=n,this.has_stree=t&&t.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const d_code=t=>t<256?_dist_code[t]:_dist_code[256+(t>>>7)],put_short=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},send_bits=(t,e,r)=>{t.bi_valid>Buf_size-r?(t.bi_buf|=e<<t.bi_valid&65535,put_short(t,t.bi_buf),t.bi_buf=e>>Buf_size-t.bi_valid,t.bi_valid+=r-Buf_size):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},send_code=(t,e,r)=>{send_bits(t,r[e*2],r[e*2+1])},bi_reverse=(t,e)=>{let r=0;do r|=t&1,t>>>=1,r<<=1;while(--e>0);return r>>>1},bi_flush=t=>{t.bi_valid===16?(put_short(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},gen_bitlen=(t,e)=>{const r=e.dyn_tree,o=e.max_code,n=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,h=e.stat_desc.max_length;let c,d,g,u,f,p,T=0;for(u=0;u<=MAX_BITS$1;u++)t.bl_count[u]=0;for(r[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;c<HEAP_SIZE$1;c++)d=t.heap[c],u=r[r[d*2+1]*2+1]+1,u>h&&(u=h,T++),r[d*2+1]=u,!(d>o)&&(t.bl_count[u]++,f=0,d>=l&&(f=s[d-l]),p=r[d*2],t.opt_len+=p*(u+f),a&&(t.static_len+=p*(n[d*2+1]+f)));if(T!==0){do{for(u=h-1;t.bl_count[u]===0;)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[h]--,T-=2}while(T>0);for(u=h;u!==0;u--)for(d=t.bl_count[u];d!==0;)g=t.heap[--c],!(g>o)&&(r[g*2+1]!==u&&(t.opt_len+=(u-r[g*2+1])*r[g*2],r[g*2+1]=u),d--)}},gen_codes=(t,e,r)=>{const o=new Array(MAX_BITS$1+1);let n=0,a,s;for(a=1;a<=MAX_BITS$1;a++)n=n+r[a-1]<<1,o[a]=n;for(s=0;s<=e;s++){let l=t[s*2+1];l!==0&&(t[s*2]=bi_reverse(o[l]++,l))}},tr_static_init=()=>{let t,e,r,o,n;const a=new Array(MAX_BITS$1+1);for(r=0,o=0;o<LENGTH_CODES$1-1;o++)for(base_length[o]=r,t=0;t<1<<extra_lbits[o];t++)_length_code[r++]=o;for(_length_code[r-1]=o,n=0,o=0;o<16;o++)for(base_dist[o]=n,t=0;t<1<<extra_dbits[o];t++)_dist_code[n++]=o;for(n>>=7;o<D_CODES$1;o++)for(base_dist[o]=n<<7,t=0;t<1<<extra_dbits[o]-7;t++)_dist_code[256+n++]=o;for(e=0;e<=MAX_BITS$1;e++)a[e]=0;for(t=0;t<=143;)static_ltree[t*2+1]=8,t++,a[8]++;for(;t<=255;)static_ltree[t*2+1]=9,t++,a[9]++;for(;t<=279;)static_ltree[t*2+1]=7,t++,a[7]++;for(;t<=287;)static_ltree[t*2+1]=8,t++,a[8]++;for(gen_codes(static_ltree,L_CODES$1+1,a),t=0;t<D_CODES$1;t++)static_dtree[t*2+1]=5,static_dtree[t*2]=bi_reverse(t,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=t=>{let e;for(e=0;e<L_CODES$1;e++)t.dyn_ltree[e*2]=0;for(e=0;e<D_CODES$1;e++)t.dyn_dtree[e*2]=0;for(e=0;e<BL_CODES$1;e++)t.bl_tree[e*2]=0;t.dyn_ltree[END_BLOCK*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},bi_windup=t=>{t.bi_valid>8?put_short(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},smaller=(t,e,r,o)=>{const n=e*2,a=r*2;return t[n]<t[a]||t[n]===t[a]&&o[e]<=o[r]},pqdownheap=(t,e,r)=>{const o=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&smaller(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!smaller(e,o,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=o},compress_block=(t,e,r)=>{let o,n,a=0,s,l;if(t.sym_next!==0)do o=t.pending_buf[t.sym_buf+a++]&255,o+=(t.pending_buf[t.sym_buf+a++]&255)<<8,n=t.pending_buf[t.sym_buf+a++],o===0?send_code(t,n,e):(s=_length_code[n],send_code(t,s+LITERALS$1+1,e),l=extra_lbits[s],l!==0&&(n-=base_length[s],send_bits(t,n,l)),o--,s=d_code(o),send_code(t,s,r),l=extra_dbits[s],l!==0&&(o-=base_dist[s],send_bits(t,o,l)));while(a<t.sym_next);send_code(t,END_BLOCK,e)},build_tree=(t,e)=>{const r=e.dyn_tree,o=e.stat_desc.static_tree,n=e.stat_desc.has_stree,a=e.stat_desc.elems;let s,l,h=-1,c;for(t.heap_len=0,t.heap_max=HEAP_SIZE$1,s=0;s<a;s++)r[s*2]!==0?(t.heap[++t.heap_len]=h=s,t.depth[s]=0):r[s*2+1]=0;for(;t.heap_len<2;)c=t.heap[++t.heap_len]=h<2?++h:0,r[c*2]=1,t.depth[c]=0,t.opt_len--,n&&(t.static_len-=o[c*2+1]);for(e.max_code=h,s=t.heap_len>>1;s>=1;s--)pqdownheap(t,r,s);c=a;do s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],pqdownheap(t,r,1),l=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=l,r[c*2]=r[s*2]+r[l*2],t.depth[c]=(t.depth[s]>=t.depth[l]?t.depth[s]:t.depth[l])+1,r[s*2+1]=r[l*2+1]=c,t.heap[1]=c++,pqdownheap(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],gen_bitlen(t,e),gen_codes(r,h,t.bl_count)},scan_tree=(t,e,r)=>{let o,n=-1,a,s=e[0*2+1],l=0,h=7,c=4;for(s===0&&(h=138,c=3),e[(r+1)*2+1]=65535,o=0;o<=r;o++)a=s,s=e[(o+1)*2+1],!(++l<h&&a===s)&&(l<c?t.bl_tree[a*2]+=l:a!==0?(a!==n&&t.bl_tree[a*2]++,t.bl_tree[REP_3_6*2]++):l<=10?t.bl_tree[REPZ_3_10*2]++:t.bl_tree[REPZ_11_138*2]++,l=0,n=a,s===0?(h=138,c=3):a===s?(h=6,c=3):(h=7,c=4))},send_tree=(t,e,r)=>{let o,n=-1,a,s=e[0*2+1],l=0,h=7,c=4;for(s===0&&(h=138,c=3),o=0;o<=r;o++)if(a=s,s=e[(o+1)*2+1],!(++l<h&&a===s)){if(l<c)do send_code(t,a,t.bl_tree);while(--l!==0);else a!==0?(a!==n&&(send_code(t,a,t.bl_tree),l--),send_code(t,REP_3_6,t.bl_tree),send_bits(t,l-3,2)):l<=10?(send_code(t,REPZ_3_10,t.bl_tree),send_bits(t,l-3,3)):(send_code(t,REPZ_11_138,t.bl_tree),send_bits(t,l-11,7));l=0,n=a,s===0?(h=138,c=3):a===s?(h=6,c=3):(h=7,c=4)}},build_bl_tree=t=>{let e;for(scan_tree(t,t.dyn_ltree,t.l_desc.max_code),scan_tree(t,t.dyn_dtree,t.d_desc.max_code),build_tree(t,t.bl_desc),e=BL_CODES$1-1;e>=3&&t.bl_tree[bl_order[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},send_all_trees=(t,e,r,o)=>{let n;for(send_bits(t,e-257,5),send_bits(t,r-1,5),send_bits(t,o-4,4),n=0;n<o;n++)send_bits(t,t.bl_tree[bl_order[n]*2+1],3);send_tree(t,t.dyn_ltree,e-1),send_tree(t,t.dyn_dtree,r-1)},detect_data_type=t=>{let e=4093624447,r;for(r=0;r<=31;r++,e>>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return Z_BINARY;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return Z_TEXT;for(r=32;r<LITERALS$1;r++)if(t.dyn_ltree[r*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=t=>{static_init_done||(tr_static_init(),static_init_done=!0),t.l_desc=new TreeDesc(t.dyn_ltree,static_l_desc),t.d_desc=new TreeDesc(t.dyn_dtree,static_d_desc),t.bl_desc=new TreeDesc(t.bl_tree,static_bl_desc),t.bi_buf=0,t.bi_valid=0,init_block(t)},_tr_stored_block$1=(t,e,r,o)=>{send_bits(t,(STORED_BLOCK<<1)+(o?1:0),3),bi_windup(t),put_short(t,r),put_short(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r},_tr_align$1=t=>{send_bits(t,STATIC_TREES<<1,3),send_code(t,END_BLOCK,static_ltree),bi_flush(t)},_tr_flush_block$1=(t,e,r,o)=>{let n,a,s=0;t.level>0?(t.strm.data_type===Z_UNKNOWN$1&&(t.strm.data_type=detect_data_type(t)),build_tree(t,t.l_desc),build_tree(t,t.d_desc),s=build_bl_tree(t),n=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&e!==-1?_tr_stored_block$1(t,e,r,o):t.strategy===Z_FIXED$1||a===n?(send_bits(t,(STATIC_TREES<<1)+(o?1:0),3),compress_block(t,static_ltree,static_dtree)):(send_bits(t,(DYN_TREES<<1)+(o?1:0),3),send_all_trees(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),compress_block(t,t.dyn_ltree,t.dyn_dtree)),init_block(t),o&&bi_windup(t)},_tr_tally$1=(t,e,r)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(_length_code[r]+LITERALS$1+1)*2]++,t.dyn_dtree[d_code(e)*2]++),t.sym_next===t.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(t,e,r,o)=>{let n=t&65535|0,a=t>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do n=n+e[o++]|0,a=a+n|0;while(--s);n%=65521,a%=65521}return n|a<<16|0};var adler32_1=adler32;const makeTable=()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var o=0;o<8;o++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e},crcTable=new Uint32Array(makeTable()),crc32=(t,e,r,o)=>{const n=crcTable,a=o+r;t^=-1;for(let s=o;s<a;s++)t=t>>>8^n[(t^e[s])&255];return t^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(t,e)=>(t.msg=messages[e],e),rank=t=>t*2-(t>4?9:0),zero=t=>{let e=t.length;for(;--e>=0;)t[e]=0},slide_hash=t=>{let e,r,o,n=t.w_size;e=t.hash_size,o=e;do r=t.head[--o],t.head[o]=r>=n?r-n:0;while(--e);e=n,o=e;do r=t.prev[--o],t.prev[o]=r>=n?r-n:0;while(--e)};let HASH_ZLIB=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask,HASH=HASH_ZLIB;const flush_pending=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))},flush_block_only=(t,e)=>{_tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,flush_pending(t.strm)},put_byte=(t,e)=>{t.pending_buf[t.pending++]=e},putShortMSB=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},read_buf=(t,e,r,o)=>{let n=t.avail_in;return n>o&&(n=o),n===0?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),r),t.state.wrap===1?t.adler=adler32_1(t.adler,e,n,r):t.state.wrap===2&&(t.adler=crc32_1(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},longest_match=(t,e)=>{let r=t.max_chain_length,o=t.strstart,n,a,s=t.prev_length,l=t.nice_match;const h=t.strstart>t.w_size-MIN_LOOKAHEAD?t.strstart-(t.w_size-MIN_LOOKAHEAD):0,c=t.window,d=t.w_mask,g=t.prev,u=t.strstart+MAX_MATCH;let f=c[o+s-1],p=c[o+s];t.prev_length>=t.good_match&&(r>>=2),l>t.lookahead&&(l=t.lookahead);do if(n=e,!(c[n+s]!==p||c[n+s-1]!==f||c[n]!==c[o]||c[++n]!==c[o+1])){o+=2,n++;do;while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<u);if(a=MAX_MATCH-(u-o),o=u-MAX_MATCH,a>s){if(t.match_start=e,s=a,a>=l)break;f=c[o+s-1],p=c[o+s]}}while((e=g[e&d])>h&&--r!==0);return s<=t.lookahead?s:t.lookahead},fill_window=t=>{const e=t.w_size;let r,o,n;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-MIN_LOOKAHEAD)&&(t.window.set(t.window.subarray(e,e+e-o),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),slide_hash(t),o+=e),t.strm.avail_in===0)break;if(r=read_buf(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=MIN_MATCH)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=HASH(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=HASH(t,t.ins_h,t.window[n+MIN_MATCH-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<MIN_MATCH)););}while(t.lookahead<MIN_LOOKAHEAD&&t.strm.avail_in!==0)},deflate_stored=(t,e)=>{let r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o,n,a,s=0,l=t.strm.avail_in;do{if(o=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a||(a=t.strm.avail_out-a,n=t.strstart-t.block_start,o>n+t.strm.avail_in&&(o=n+t.strm.avail_in),o>a&&(o=a),o<r&&(o===0&&e!==Z_FINISH$3||e===Z_NO_FLUSH$2||o!==n+t.strm.avail_in)))break;s=e===Z_FINISH$3&&o===n+t.strm.avail_in?1:0,_tr_stored_block(t,0,0,s),t.pending_buf[t.pending-4]=o,t.pending_buf[t.pending-3]=o>>8,t.pending_buf[t.pending-2]=~o,t.pending_buf[t.pending-1]=~o>>8,flush_pending(t.strm),n&&(n>o&&(n=o),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,o-=n),o&&(read_buf(t.strm,t.strm.output,t.strm.next_out,o),t.strm.next_out+=o,t.strm.avail_out-=o,t.strm.total_out+=o)}while(s===0);return l-=t.strm.avail_in,l&&(l>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=l&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-l,t.strm.next_in),t.strstart),t.strstart+=l,t.insert+=l>t.w_size-t.insert?t.w_size-t.insert:l),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?BS_FINISH_DONE:e!==Z_NO_FLUSH$2&&e!==Z_FINISH$3&&t.strm.avail_in===0&&t.strstart===t.block_start?BS_BLOCK_DONE:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(read_buf(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,r=a>t.w_size?t.w_size:a,n=t.strstart-t.block_start,(n>=r||(n||e===Z_FINISH$3)&&e!==Z_NO_FLUSH$2&&t.strm.avail_in===0&&n<=a)&&(o=n>a?a:n,s=e===Z_FINISH$3&&t.strm.avail_in===0&&o===n?1:0,_tr_stored_block(t,t.block_start,o,s),t.block_start+=o,flush_pending(t.strm)),s?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(t,e)=>{let r,o;for(;;){if(t.lookahead<MIN_LOOKAHEAD){if(fill_window(t),t.lookahead<MIN_LOOKAHEAD&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(t.lookahead===0)break}if(r=0,t.lookahead>=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),r!==0&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r)),t.match_length>=MIN_MATCH)if(o=_tr_tally(t,t.strstart-t.match_start,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=MIN_MATCH){t.match_length--;do t.strstart++,t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+1]);else o=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(o&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}return t.insert=t.strstart<MIN_MATCH-1?t.strstart:MIN_MATCH-1,e===Z_FINISH$3?(flush_block_only(t,!0),t.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),t.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(t,e)=>{let r,o,n;for(;;){if(t.lookahead<MIN_LOOKAHEAD){if(fill_window(t),t.lookahead<MIN_LOOKAHEAD&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(t.lookahead===0)break}if(r=0,t.lookahead>=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=MIN_MATCH-1,r!==0&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r),t.match_length<=5&&(t.strategy===Z_FILTERED||t.match_length===MIN_MATCH&&t.strstart-t.match_start>4096)&&(t.match_length=MIN_MATCH-1)),t.prev_length>=MIN_MATCH&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-MIN_MATCH,o=_tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-MIN_MATCH),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=MIN_MATCH-1,t.strstart++,o&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}else if(t.match_available){if(o=_tr_tally(t,0,t.window[t.strstart-1]),o&&flush_block_only(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return BS_NEED_MORE}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(o=_tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<MIN_MATCH-1?t.strstart:MIN_MATCH-1,e===Z_FINISH$3?(flush_block_only(t,!0),t.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),t.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(t,e)=>{let r,o,n,a;const s=t.window;for(;;){if(t.lookahead<=MAX_MATCH){if(fill_window(t),t.lookahead<=MAX_MATCH&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=MIN_MATCH&&t.strstart>0&&(n=t.strstart-1,o=s[n],o===s[++n]&&o===s[++n]&&o===s[++n])){a=t.strstart+MAX_MATCH;do;while(o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&o===s[++n]&&n<a);t.match_length=MAX_MATCH-(a-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=MIN_MATCH?(r=_tr_tally(t,1,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),t.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),t.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(t,e)=>{let r;for(;;){if(t.lookahead===0&&(fill_window(t),t.lookahead===0)){if(e===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(t.match_length=0,r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(flush_block_only(t,!1),t.strm.avail_out===0))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),t.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),t.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(t,e,r,o,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=o,this.func=n}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=t=>{t.window_size=2*t.w_size,zero(t.head),t.max_lazy_match=configuration_table[t.level].max_lazy,t.good_match=configuration_table[t.level].good_length,t.nice_match=configuration_table[t.level].nice_length,t.max_chain_length=configuration_table[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=MIN_MATCH-1,t.match_available=0,t.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==INIT_STATE&&e.status!==GZIP_STATE&&e.status!==EXTRA_STATE&&e.status!==NAME_STATE&&e.status!==COMMENT_STATE&&e.status!==HCRC_STATE&&e.status!==BUSY_STATE&&e.status!==FINISH_STATE?1:0},deflateResetKeep=t=>{if(deflateStateCheck(t))return err(t,Z_STREAM_ERROR$2);t.total_in=t.total_out=0,t.data_type=Z_UNKNOWN;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?GZIP_STATE:e.wrap?INIT_STATE:BUSY_STATE,t.adler=e.wrap===2?0:1,e.last_flush=-2,_tr_init(e),Z_OK$3},deflateReset=t=>{const e=deflateResetKeep(t);return e===Z_OK$3&&lm_init(t.state),e},deflateSetHeader=(t,e)=>deflateStateCheck(t)||t.state.wrap!==2?Z_STREAM_ERROR$2:(t.state.gzhead=e,Z_OK$3),deflateInit2=(t,e,r,o,n,a)=>{if(!t)return Z_STREAM_ERROR$2;let s=1;if(e===Z_DEFAULT_COMPRESSION$1&&(e=6),o<0?(s=0,o=-o):o>15&&(s=2,o-=16),n<1||n>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||o<8||o>15||e<0||e>9||a<0||a>Z_FIXED||o===8&&s!==1)return err(t,Z_STREAM_ERROR$2);o===8&&(o=9);const l=new DeflateState;return t.state=l,l.strm=t,l.status=INIT_STATE,l.wrap=s,l.gzhead=null,l.w_bits=o,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+MIN_MATCH-1)/MIN_MATCH),l.window=new Uint8Array(l.w_size*2),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=(l.lit_bufsize-1)*3,l.level=e,l.strategy=a,l.method=r,deflateReset(t)},deflateInit=(t,e)=>deflateInit2(t,e,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(t,e)=>{if(deflateStateCheck(t)||e>Z_BLOCK$1||e<0)return t?err(t,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const r=t.state;if(!t.output||t.avail_in!==0&&!t.input||r.status===FINISH_STATE&&e!==Z_FINISH$3)return err(t,t.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const o=r.last_flush;if(r.last_flush=e,r.pending!==0){if(flush_pending(t),t.avail_out===0)return r.last_flush=-1,Z_OK$3}else if(t.avail_in===0&&rank(e)<=rank(o)&&e!==Z_FINISH$3)return err(t,Z_BUF_ERROR$1);if(r.status===FINISH_STATE&&t.avail_in!==0)return err(t,Z_BUF_ERROR$1);if(r.status===INIT_STATE&&r.wrap===0&&(r.status=BUSY_STATE),r.status===INIT_STATE){let n=Z_DEFLATED$2+(r.w_bits-8<<4)<<8,a=-1;if(r.strategy>=Z_HUFFMAN_ONLY||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,n|=a<<6,r.strstart!==0&&(n|=PRESET_DICT),n+=31-n%31,putShortMSB(r,n),r.strstart!==0&&(putShortMSB(r,t.adler>>>16),putShortMSB(r,t.adler&65535)),t.adler=1,r.status=BUSY_STATE,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===GZIP_STATE){if(t.adler=0,put_byte(r,31),put_byte(r,139),put_byte(r,8),r.gzhead)put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),put_byte(r,r.gzhead.time&255),put_byte(r,r.gzhead.time>>8&255),put_byte(r,r.gzhead.time>>16&255),put_byte(r,r.gzhead.time>>24&255),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(put_byte(r,r.gzhead.extra.length&255),put_byte(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=EXTRA_STATE;else if(put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,r.level===9?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,OS_CODE),r.status=BUSY_STATE,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(r.status===EXTRA_STATE){if(r.gzhead.extra){let n=r.pending,a=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+a>r.pending_buf_size;){let l=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+l),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex+=l,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0,a-=l}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+a),r.pending),r.pending+=a,r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=NAME_STATE}if(r.status===NAME_STATE){if(r.gzhead.name){let n=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,put_byte(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=COMMENT_STATE}if(r.status===COMMENT_STATE){if(r.gzhead.comment){let n=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n)),flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3;n=0}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,put_byte(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>n&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-n,n))}r.status=HCRC_STATE}if(r.status===HCRC_STATE){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(flush_pending(t),r.pending!==0))return r.last_flush=-1,Z_OK$3;put_byte(r,t.adler&255),put_byte(r,t.adler>>8&255),t.adler=0}if(r.status=BUSY_STATE,flush_pending(t),r.pending!==0)return r.last_flush=-1,Z_OK$3}if(t.avail_in!==0||r.lookahead!==0||e!==Z_NO_FLUSH$2&&r.status!==FINISH_STATE){let n=r.level===0?deflate_stored(r,e):r.strategy===Z_HUFFMAN_ONLY?deflate_huff(r,e):r.strategy===Z_RLE?deflate_rle(r,e):configuration_table[r.level].func(r,e);if((n===BS_FINISH_STARTED||n===BS_FINISH_DONE)&&(r.status=FINISH_STATE),n===BS_NEED_MORE||n===BS_FINISH_STARTED)return t.avail_out===0&&(r.last_flush=-1),Z_OK$3;if(n===BS_BLOCK_DONE&&(e===Z_PARTIAL_FLUSH?_tr_align(r):e!==Z_BLOCK$1&&(_tr_stored_block(r,0,0,!1),e===Z_FULL_FLUSH$1&&(zero(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),flush_pending(t),t.avail_out===0))return r.last_flush=-1,Z_OK$3}return e!==Z_FINISH$3?Z_OK$3:r.wrap<=0?Z_STREAM_END$3:(r.wrap===2?(put_byte(r,t.adler&255),put_byte(r,t.adler>>8&255),put_byte(r,t.adler>>16&255),put_byte(r,t.adler>>24&255),put_byte(r,t.total_in&255),put_byte(r,t.total_in>>8&255),put_byte(r,t.total_in>>16&255),put_byte(r,t.total_in>>24&255)):(putShortMSB(r,t.adler>>>16),putShortMSB(r,t.adler&65535)),flush_pending(t),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=t=>{if(deflateStateCheck(t))return Z_STREAM_ERROR$2;const e=t.state.status;return t.state=null,e===BUSY_STATE?err(t,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(t,e)=>{let r=e.length;if(deflateStateCheck(t))return Z_STREAM_ERROR$2;const o=t.state,n=o.wrap;if(n===2||n===1&&o.status!==INIT_STATE||o.lookahead)return Z_STREAM_ERROR$2;if(n===1&&(t.adler=adler32_1(t.adler,e,r,0)),o.wrap=0,r>=o.w_size){n===0&&(zero(o.head),o.strstart=0,o.block_start=0,o.insert=0);let h=new Uint8Array(o.w_size);h.set(e.subarray(r-o.w_size,r),0),e=h,r=o.w_size}const a=t.avail_in,s=t.next_in,l=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,fill_window(o);o.lookahead>=MIN_MATCH;){let h=o.strstart,c=o.lookahead-(MIN_MATCH-1);do o.ins_h=HASH(o,o.ins_h,o.window[h+MIN_MATCH-1]),o.prev[h&o.w_mask]=o.head[o.ins_h],o.head[o.ins_h]=h,h++;while(--c);o.strstart=h,o.lookahead=MIN_MATCH-1,fill_window(o)}return o.strstart+=o.lookahead,o.block_start=o.strstart,o.insert=o.lookahead,o.lookahead=0,o.match_length=o.prev_length=MIN_MATCH-1,o.match_available=0,t.next_in=s,t.input=l,t.avail_in=a,o.wrap=n,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(const o in r)_has(r,o)&&(t[o]=r[o])}}return t},flattenChunks=t=>{let e=0;for(let o=0,n=t.length;o<n;o++)e+=t[o].length;const r=new Uint8Array(e);for(let o=0,n=0,a=t.length;o<a;o++){let s=t[o];r.set(s,n),n+=s.length}return r},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let t=0;t<256;t++)_utf8len[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,r,o,n,a,s=t.length,l=0;for(n=0;n<s;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<s&&(o=t.charCodeAt(n+1),(o&64512)===56320&&(r=65536+(r-55296<<10)+(o-56320),n++)),l+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(l),a=0,n=0;a<l;n++)r=t.charCodeAt(n),(r&64512)===55296&&n+1<s&&(o=t.charCodeAt(n+1),(o&64512)===56320&&(r=65536+(r-55296<<10)+(o-56320),n++)),r<128?e[a++]=r:r<2048?(e[a++]=192|r>>>6,e[a++]=128|r&63):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|r&63):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|r&63);return e};const buf2binstring=(t,e)=>{if(e<65534&&t.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let o=0;o<e;o++)r+=String.fromCharCode(t[o]);return r};var buf2string=(t,e)=>{const r=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let o,n;const a=new Array(r*2);for(n=0,o=0;o<r;){let s=t[o++];if(s<128){a[n++]=s;continue}let l=_utf8len[s];if(l>4){a[n++]=65533,o+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&o<r;)s=s<<6|t[o++]&63,l--;if(l>1){a[n++]=65533;continue}s<65536?a[n++]=s:(s-=65536,a[n++]=55296|s>>10&1023,a[n++]=56320|s&1023)}return buf2binstring(a,n)},utf8border=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let r=e-1;for(;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+_utf8len[t[r]]>e?r:e},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(t){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=deflate_1$2.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Z_OK$2)throw new Error(messages[r]);if(e.header&&deflate_1$2.deflateSetHeader(this.strm,e.header),e.dictionary){let o;if(typeof e.dictionary=="string"?o=strings.string2buf(e.dictionary):toString$1.call(e.dictionary)==="[object ArrayBuffer]"?o=new Uint8Array(e.dictionary):o=e.dictionary,r=deflate_1$2.deflateSetDictionary(this.strm,o),r!==Z_OK$2)throw new Error(messages[r]);this._dict_set=!0}}Deflate$1.prototype.push=function(t,e){const r=this.strm,o=this.options.chunkSize;let n,a;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof t=="string"?r.input=strings.string2buf(t):toString$1.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),(a===Z_SYNC_FLUSH||a===Z_FULL_FLUSH)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(n=deflate_1$2.deflate(r,a),n===Z_STREAM_END$2)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=deflate_1$2.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Z_OK$2;if(r.avail_out===0){this.onData(r.output);continue}if(a>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};Deflate$1.prototype.onData=function(t){this.chunks.push(t)};Deflate$1.prototype.onEnd=function(t){t===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function deflate$1(t,e){const r=new Deflate$1(e);if(r.push(t,!0),r.err)throw r.msg||messages[r.err];return r.result}function deflateRaw$1(t,e){return e=e||{},e.raw=!0,deflate$1(t,e)}function gzip$1(t,e){return e=e||{},e.gzip=!0,deflate$1(t,e)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,constants$1=constants$2,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1,constants:constants$1};const BAD$1=16209,TYPE$1=16191;var inffast=function t(e,r){let o,n,a,s,l,h,c,d,g,u,f,p,T,w,y,m,C,b,B,O,x,F,S,E;const k=e.state;o=e.next_in,S=e.input,n=o+(e.avail_in-5),a=e.next_out,E=e.output,s=a-(r-e.avail_out),l=a+(e.avail_out-257),h=k.dmax,c=k.wsize,d=k.whave,g=k.wnext,u=k.window,f=k.hold,p=k.bits,T=k.lencode,w=k.distcode,y=(1<<k.lenbits)-1,m=(1<<k.distbits)-1;t:do{p<15&&(f+=S[o++]<<p,p+=8,f+=S[o++]<<p,p+=8),C=T[f&y];e:for(;;){if(b=C>>>24,f>>>=b,p-=b,b=C>>>16&255,b===0)E[a++]=C&65535;else if(b&16){B=C&65535,b&=15,b&&(p<b&&(f+=S[o++]<<p,p+=8),B+=f&(1<<b)-1,f>>>=b,p-=b),p<15&&(f+=S[o++]<<p,p+=8,f+=S[o++]<<p,p+=8),C=w[f&m];r:for(;;){if(b=C>>>24,f>>>=b,p-=b,b=C>>>16&255,b&16){if(O=C&65535,b&=15,p<b&&(f+=S[o++]<<p,p+=8,p<b&&(f+=S[o++]<<p,p+=8)),O+=f&(1<<b)-1,O>h){e.msg="invalid distance too far back",k.mode=BAD$1;break t}if(f>>>=b,p-=b,b=a-s,O>b){if(b=O-b,b>d&&k.sane){e.msg="invalid distance too far back",k.mode=BAD$1;break t}if(x=0,F=u,g===0){if(x+=c-b,b<B){B-=b;do E[a++]=u[x++];while(--b);x=a-O,F=E}}else if(g<b){if(x+=c+g-b,b-=g,b<B){B-=b;do E[a++]=u[x++];while(--b);if(x=0,g<B){b=g,B-=b;do E[a++]=u[x++];while(--b);x=a-O,F=E}}}else if(x+=g-b,b<B){B-=b;do E[a++]=u[x++];while(--b);x=a-O,F=E}for(;B>2;)E[a++]=F[x++],E[a++]=F[x++],E[a++]=F[x++],B-=3;B&&(E[a++]=F[x++],B>1&&(E[a++]=F[x++]))}else{x=a-O;do E[a++]=E[x++],E[a++]=E[x++],E[a++]=E[x++],B-=3;while(B>2);B&&(E[a++]=E[x++],B>1&&(E[a++]=E[x++]))}}else if(b&64){e.msg="invalid distance code",k.mode=BAD$1;break t}else{C=w[(C&65535)+(f&(1<<b)-1)];continue r}break}}else if(b&64)if(b&32){k.mode=TYPE$1;break t}else{e.msg="invalid literal/length code",k.mode=BAD$1;break t}else{C=T[(C&65535)+(f&(1<<b)-1)];continue e}break}}while(o<n&&a<l);B=p>>3,o-=B,p-=B<<3,f&=(1<<p)-1,e.next_in=o,e.next_out=a,e.avail_in=o<n?5+(n-o):5-(o-n),e.avail_out=a<l?257+(l-a):257-(a-l),k.hold=f,k.bits=p};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(t,e,r,o,n,a,s,l)=>{const h=l.bits;let c=0,d=0,g=0,u=0,f=0,p=0,T=0,w=0,y=0,m=0,C,b,B,O,x,F=null,S;const E=new Uint16Array(MAXBITS+1),k=new Uint16Array(MAXBITS+1);let P=null,j,N,I;for(c=0;c<=MAXBITS;c++)E[c]=0;for(d=0;d<o;d++)E[e[r+d]]++;for(f=h,u=MAXBITS;u>=1&&E[u]===0;u--);if(f>u&&(f=u),u===0)return n[a++]=1<<24|64<<16|0,n[a++]=1<<24|64<<16|0,l.bits=1,0;for(g=1;g<u&&E[g]===0;g++);for(f<g&&(f=g),w=1,c=1;c<=MAXBITS;c++)if(w<<=1,w-=E[c],w<0)return-1;if(w>0&&(t===CODES$1||u!==1))return-1;for(k[1]=0,c=1;c<MAXBITS;c++)k[c+1]=k[c]+E[c];for(d=0;d<o;d++)e[r+d]!==0&&(s[k[e[r+d]]++]=d);if(t===CODES$1?(F=P=s,S=20):t===LENS$1?(F=lbase,P=lext,S=257):(F=dbase,P=dext,S=0),m=0,d=0,c=g,x=a,p=f,T=0,B=-1,y=1<<f,O=y-1,t===LENS$1&&y>ENOUGH_LENS$1||t===DISTS$1&&y>ENOUGH_DISTS$1)return 1;for(;;){j=c-T,s[d]+1<S?(N=0,I=s[d]):s[d]>=S?(N=P[s[d]-S],I=F[s[d]-S]):(N=96,I=0),C=1<<c-T,b=1<<p,g=b;do b-=C,n[x+(m>>T)+b]=j<<24|N<<16|I|0;while(b!==0);for(C=1<<c-1;m&C;)C>>=1;if(C!==0?(m&=C-1,m+=C):m=0,d++,--E[c]===0){if(c===u)break;c=e[r+s[d]]}if(c>f&&(m&O)!==B){for(T===0&&(T=f),x+=g,p=c-T,w=1<<p;p+T<u&&(w-=E[p+T],!(w<=0));)p++,w<<=1;if(y+=1<<p,t===LENS$1&&y>ENOUGH_LENS$1||t===DISTS$1&&y>ENOUGH_DISTS$1)return 1;B=m&O,n[B]=f<<24|p<<16|x-a|0}}return m!==0&&(n[x+m]=c-T<<24|64<<16|0),l.bits=f,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<HEAD||e.mode>SYNC?1:0},inflateResetKeep=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=HEAD,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(ENOUGH_LENS),e.distcode=e.distdyn=new Int32Array(ENOUGH_DISTS),e.sane=1,e.back=-1,Z_OK$1},inflateReset=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,inflateResetKeep(t)},inflateReset2=(t,e)=>{let r;if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const o=t.state;return e<0?(r=0,e=-e):(r=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Z_STREAM_ERROR$1:(o.window!==null&&o.wbits!==e&&(o.window=null),o.wrap=r,o.wbits=e,inflateReset(t))},inflateInit2=(t,e)=>{if(!t)return Z_STREAM_ERROR$1;const r=new InflateState;t.state=r,r.strm=t,r.window=null,r.mode=HEAD;const o=inflateReset2(t,e);return o!==Z_OK$1&&(t.state=null),o},inflateInit=t=>inflateInit2(t,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=t=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(inftrees(LENS,t.lens,0,288,lenfix,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;inftrees(DISTS,t.lens,0,32,distfix,0,t.work,{bits:5}),virgin=!1}t.lencode=lenfix,t.lenbits=9,t.distcode=distfix,t.distbits=5},updatewindow=(t,e,r,o)=>{let n;const a=t.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),o>=a.wsize?(a.window.set(e.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>o&&(n=o),a.window.set(e.subarray(r-o,r-o+n),a.wnext),o-=n,o?(a.window.set(e.subarray(r-o,r),0),a.wnext=o,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0},inflate$2=(t,e)=>{let r,o,n,a,s,l,h,c,d,g,u,f,p,T,w=0,y,m,C,b,B,O,x,F;const S=new Uint8Array(4);let E,k;const P=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(t)||!t.output||!t.input&&t.avail_in!==0)return Z_STREAM_ERROR$1;r=t.state,r.mode===TYPE&&(r.mode=TYPEDO),s=t.next_out,n=t.output,h=t.avail_out,a=t.next_in,o=t.input,l=t.avail_in,c=r.hold,d=r.bits,g=l,u=h,F=Z_OK$1;t:for(;;)switch(r.mode){case HEAD:if(r.wrap===0){r.mode=TYPEDO;break}for(;d<16;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(r.wrap&2&&c===35615){r.wbits===0&&(r.wbits=15),r.check=0,S[0]=c&255,S[1]=c>>>8&255,r.check=crc32_1(r.check,S,2,0),c=0,d=0,r.mode=FLAGS;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=BAD;break}if((c&15)!==Z_DEFLATED){t.msg="unknown compression method",r.mode=BAD;break}if(c>>>=4,d-=4,x=(c&15)+8,r.wbits===0&&(r.wbits=x),x>15||x>r.wbits){t.msg="invalid window size",r.mode=BAD;break}r.dmax=1<<r.wbits,r.flags=0,t.adler=r.check=1,r.mode=c&512?DICTID:TYPE,c=0,d=0;break;case FLAGS:for(;d<16;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(r.flags=c,(r.flags&255)!==Z_DEFLATED){t.msg="unknown compression method",r.mode=BAD;break}if(r.flags&57344){t.msg="unknown header flags set",r.mode=BAD;break}r.head&&(r.head.text=c>>8&1),r.flags&512&&r.wrap&4&&(S[0]=c&255,S[1]=c>>>8&255,r.check=crc32_1(r.check,S,2,0)),c=0,d=0,r.mode=TIME;case TIME:for(;d<32;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}r.head&&(r.head.time=c),r.flags&512&&r.wrap&4&&(S[0]=c&255,S[1]=c>>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,r.check=crc32_1(r.check,S,4,0)),c=0,d=0,r.mode=OS;case OS:for(;d<16;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}r.head&&(r.head.xflags=c&255,r.head.os=c>>8),r.flags&512&&r.wrap&4&&(S[0]=c&255,S[1]=c>>>8&255,r.check=crc32_1(r.check,S,2,0)),c=0,d=0,r.mode=EXLEN;case EXLEN:if(r.flags&1024){for(;d<16;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}r.length=c,r.head&&(r.head.extra_len=c),r.flags&512&&r.wrap&4&&(S[0]=c&255,S[1]=c>>>8&255,r.check=crc32_1(r.check,S,2,0)),c=0,d=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(r.flags&1024&&(f=r.length,f>l&&(f=l),f&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(o.subarray(a,a+f),x)),r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,o,f,a)),l-=f,a+=f,r.length-=f),r.length))break t;r.length=0,r.mode=NAME;case NAME:if(r.flags&2048){if(l===0)break t;f=0;do x=o[a+f++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x));while(x&&f<l);if(r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,o,f,a)),l-=f,a+=f,x)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=COMMENT;case COMMENT:if(r.flags&4096){if(l===0)break t;f=0;do x=o[a+f++],r.head&&x&&r.length<65536&&(r.head.comment+=String.fromCharCode(x));while(x&&f<l);if(r.flags&512&&r.wrap&4&&(r.check=crc32_1(r.check,o,f,a)),l-=f,a+=f,x)break t}else r.head&&(r.head.comment=null);r.mode=HCRC;case HCRC:if(r.flags&512){for(;d<16;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(r.wrap&4&&c!==(r.check&65535)){t.msg="header crc mismatch",r.mode=BAD;break}c=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;d<32;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}t.adler=r.check=zswap32(c),c=0,d=0,r.mode=DICT;case DICT:if(r.havedict===0)return t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=l,r.hold=c,r.bits=d,Z_NEED_DICT$1;t.adler=r.check=1,r.mode=TYPE;case TYPE:if(e===Z_BLOCK||e===Z_TREES)break t;case TYPEDO:if(r.last){c>>>=d&7,d-=d&7,r.mode=CHECK;break}for(;d<3;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}switch(r.last=c&1,c>>>=1,d-=1,c&3){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,e===Z_TREES){c>>>=2,d-=2;break t}break;case 2:r.mode=TABLE;break;case 3:t.msg="invalid block type",r.mode=BAD}c>>>=2,d-=2;break;case STORED:for(c>>>=d&7,d-=d&7;d<32;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=c&65535,c=0,d=0,r.mode=COPY_,e===Z_TREES)break t;case COPY_:r.mode=COPY;case COPY:if(f=r.length,f){if(f>l&&(f=l),f>h&&(f=h),f===0)break t;n.set(o.subarray(a,a+f),s),l-=f,a+=f,h-=f,s+=f,r.length-=f;break}r.mode=TYPE;break;case TABLE:for(;d<14;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(r.nlen=(c&31)+257,c>>>=5,d-=5,r.ndist=(c&31)+1,c>>>=5,d-=5,r.ncode=(c&15)+4,c>>>=4,d-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have<r.ncode;){for(;d<3;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}r.lens[P[r.have++]]=c&7,c>>>=3,d-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,E={bits:r.lenbits},F=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,E),r.lenbits=E.bits,F){t.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have<r.nlen+r.ndist;){for(;w=r.lencode[c&(1<<r.lenbits)-1],y=w>>>24,m=w>>>16&255,C=w&65535,!(y<=d);){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(C<16)c>>>=y,d-=y,r.lens[r.have++]=C;else{if(C===16){for(k=y+2;d<k;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(c>>>=y,d-=y,r.have===0){t.msg="invalid bit length repeat",r.mode=BAD;break}x=r.lens[r.have-1],f=3+(c&3),c>>>=2,d-=2}else if(C===17){for(k=y+3;d<k;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}c>>>=y,d-=y,x=0,f=3+(c&7),c>>>=3,d-=3}else{for(k=y+7;d<k;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}c>>>=y,d-=y,x=0,f=11+(c&127),c>>>=7,d-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=BAD;break}for(;f--;)r.lens[r.have++]=x}}if(r.mode===BAD)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,E={bits:r.lenbits},F=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,E),r.lenbits=E.bits,F){t.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,E={bits:r.distbits},F=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,E),r.distbits=E.bits,F){t.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,e===Z_TREES)break t;case LEN_:r.mode=LEN;case LEN:if(l>=6&&h>=258){t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=l,r.hold=c,r.bits=d,inffast(t,u),s=t.next_out,n=t.output,h=t.avail_out,a=t.next_in,o=t.input,l=t.avail_in,c=r.hold,d=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;w=r.lencode[c&(1<<r.lenbits)-1],y=w>>>24,m=w>>>16&255,C=w&65535,!(y<=d);){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(m&&!(m&240)){for(b=y,B=m,O=C;w=r.lencode[O+((c&(1<<b+B)-1)>>b)],y=w>>>24,m=w>>>16&255,C=w&65535,!(b+y<=d);){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}c>>>=b,d-=b,r.back+=b}if(c>>>=y,d-=y,r.back+=y,r.length=C,m===0){r.mode=LIT;break}if(m&32){r.back=-1,r.mode=TYPE;break}if(m&64){t.msg="invalid literal/length code",r.mode=BAD;break}r.extra=m&15,r.mode=LENEXT;case LENEXT:if(r.extra){for(k=r.extra;d<k;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;w=r.distcode[c&(1<<r.distbits)-1],y=w>>>24,m=w>>>16&255,C=w&65535,!(y<=d);){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(!(m&240)){for(b=y,B=m,O=C;w=r.distcode[O+((c&(1<<b+B)-1)>>b)],y=w>>>24,m=w>>>16&255,C=w&65535,!(b+y<=d);){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}c>>>=b,d-=b,r.back+=b}if(c>>>=y,d-=y,r.back+=y,m&64){t.msg="invalid distance code",r.mode=BAD;break}r.offset=C,r.extra=m&15,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(k=r.extra;d<k;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(h===0)break t;if(f=u-h,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=BAD;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),T=r.window}else T=n,p=s-r.offset,f=r.length;f>h&&(f=h),h-=f,r.length-=f;do n[s++]=T[p++];while(--f);r.length===0&&(r.mode=LEN);break;case LIT:if(h===0)break t;n[s++]=r.length,h--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;d<32;){if(l===0)break t;l--,c|=o[a++]<<d,d+=8}if(u-=h,t.total_out+=u,r.total+=u,r.wrap&4&&u&&(t.adler=r.check=r.flags?crc32_1(r.check,n,u,s-u):adler32_1(r.check,n,u,s-u)),u=h,r.wrap&4&&(r.flags?c:zswap32(c))!==r.check){t.msg="incorrect data check",r.mode=BAD;break}c=0,d=0}r.mode=LENGTH;case LENGTH:if(r.wrap&&r.flags){for(;d<32;){if(l===0)break t;l--,c+=o[a++]<<d,d+=8}if(r.wrap&4&&c!==(r.total&4294967295)){t.msg="incorrect length check",r.mode=BAD;break}c=0,d=0}r.mode=DONE;case DONE:F=Z_STREAM_END$1;break t;case BAD:F=Z_DATA_ERROR$1;break t;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=l,r.hold=c,r.bits=d,(r.wsize||u!==t.avail_out&&r.mode<BAD&&(r.mode<CHECK||e!==Z_FINISH$1))&&updatewindow(t,t.output,t.next_out,u-t.avail_out),g-=t.avail_in,u-=t.avail_out,t.total_in+=g,t.total_out+=u,r.total+=u,r.wrap&4&&u&&(t.adler=r.check=r.flags?crc32_1(r.check,n,u,t.next_out-u):adler32_1(r.check,n,u,t.next_out-u)),t.data_type=r.bits+(r.last?64:0)+(r.mode===TYPE?128:0)+(r.mode===LEN_||r.mode===COPY_?256:0),(g===0&&u===0||e===Z_FINISH$1)&&F===Z_OK$1&&(F=Z_BUF_ERROR),F},inflateEnd=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;let e=t.state;return e.window&&(e.window=null),t.state=null,Z_OK$1},inflateGetHeader=(t,e)=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const r=t.state;return r.wrap&2?(r.head=e,e.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(t,e)=>{const r=e.length;let o,n,a;return inflateStateCheck(t)||(o=t.state,o.wrap!==0&&o.mode!==DICT)?Z_STREAM_ERROR$1:o.mode===DICT&&(n=1,n=adler32_1(n,e,r,0),n!==o.check)?Z_DATA_ERROR$1:(a=updatewindow(t,e,r,r),a?(o.mode=MEM,Z_MEM_ERROR$1):(o.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(t){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=inflate_1$2.inflateInit2(this.strm,e.windowBits);if(r!==Z_OK)throw new Error(messages[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=strings.string2buf(e.dictionary):toString.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,e.dictionary),r!==Z_OK)))throw new Error(messages[r])}Inflate$1.prototype.push=function(t,e){const r=this.strm,o=this.options.chunkSize,n=this.options.dictionary;let a,s,l;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?Z_FINISH:Z_NO_FLUSH,toString.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),a=inflate_1$2.inflate(r,s),a===Z_NEED_DICT&&n&&(a=inflate_1$2.inflateSetDictionary(r,n),a===Z_OK?a=inflate_1$2.inflate(r,s):a===Z_DATA_ERROR&&(a=Z_NEED_DICT));r.avail_in>0&&a===Z_STREAM_END&&r.state.wrap>0&&t[r.next_in]!==0;)inflate_1$2.inflateReset(r),a=inflate_1$2.inflate(r,s);switch(a){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(a),this.ended=!0,!1}if(l=r.avail_out,r.next_out&&(r.avail_out===0||a===Z_STREAM_END))if(this.options.to==="string"){let h=strings.utf8border(r.output,r.next_out),c=r.next_out-h,d=strings.buf2string(r.output,h);r.next_out=c,r.avail_out=o-c,c&&r.output.set(r.output.subarray(h,h+c),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(a===Z_OK&&l===0)){if(a===Z_STREAM_END)return a=inflate_1$2.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};Inflate$1.prototype.onData=function(t){this.chunks.push(t)};Inflate$1.prototype.onEnd=function(t){t===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function inflate$1(t,e){const r=new Inflate$1(e);if(r.push(t),r.err)throw r.msg||messages[r.err];return r.result}function inflateRaw$1(t,e){return e=e||{},e.raw=!0,inflate$1(t,e)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var deflate_1=deflate,inflate_1=inflate;const _hasBuffer=typeof Buffer=="function",_TD=typeof TextDecoder=="function"?new TextDecoder:void 0,_TE=typeof TextEncoder=="function"?new TextEncoder:void 0,b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(t=>{let e={};return t.forEach((r,o)=>e[r]=o),e})(b64chs),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),_mkUriSafe=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),_tidyB64=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),btoaPolyfill=t=>{let e,r,o,n,a="";const s=t.length%3;for(let l=0;l<t.length;){if((r=t.charCodeAt(l++))>255||(o=t.charCodeAt(l++))>255||(n=t.charCodeAt(l++))>255)throw new TypeError("invalid character found");e=r<<16|o<<8|n,a+=b64chs[e>>18&63]+b64chs[e>>12&63]+b64chs[e>>6&63]+b64chs[e&63]}return s?a.slice(0,s-3)+"===".substring(s):a},_btoa=typeof btoa=="function"?t=>btoa(t):_hasBuffer?t=>Buffer.from(t,"binary").toString("base64"):btoaPolyfill,_fromUint8Array=_hasBuffer?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let o=0,n=t.length;o<n;o+=4096)r.push(_fromCC.apply(null,t.subarray(o,o+4096)));return _btoa(r.join(""))},fromUint8Array=(t,e=!1)=>e?_mkUriSafe(_fromUint8Array(t)):_fromUint8Array(t),cb_utob=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?_fromCC(192|e>>>6)+_fromCC(128|e&63):_fromCC(224|e>>>12&15)+_fromCC(128|e>>>6&63)+_fromCC(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return _fromCC(240|e>>>18&7)+_fromCC(128|e>>>12&63)+_fromCC(128|e>>>6&63)+_fromCC(128|e&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=t=>t.replace(re_utob,cb_utob),_encode=_hasBuffer?t=>Buffer.from(t,"utf8").toString("base64"):_TE?t=>_fromUint8Array(_TE.encode(t)):t=>_btoa(utob(t)),encode=(t,e=!1)=>e?_mkUriSafe(_encode(t)):_encode(t),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return _fromCC((r>>>10)+55296)+_fromCC((r&1023)+56320);case 3:return _fromCC((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return _fromCC((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},btou=t=>t.replace(re_btou,cb_btou),atobPolyfill=t=>{if(t=t.replace(/\s+/g,""),!b64re.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",o,n;for(let a=0;a<t.length;)e=b64tab[t.charAt(a++)]<<18|b64tab[t.charAt(a++)]<<12|(o=b64tab[t.charAt(a++)])<<6|(n=b64tab[t.charAt(a++)]),r+=o===64?_fromCC(e>>16&255):n===64?_fromCC(e>>16&255,e>>8&255):_fromCC(e>>16&255,e>>8&255,e&255);return r},_atob=typeof atob=="function"?t=>atob(_tidyB64(t)):_hasBuffer?t=>Buffer.from(t,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?t=>_U8Afrom(Buffer.from(t,"base64")):t=>_U8Afrom(_atob(t).split("").map(e=>e.charCodeAt(0))),toUint8Array=t=>_toUint8Array(_unURI(t)),_decode=_hasBuffer?t=>Buffer.from(t,"base64").toString("utf8"):_TD?t=>_TD.decode(_toUint8Array(t)):t=>btou(_atob(t)),_unURI=t=>_tidyB64(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),decode=t=>_decode(_unURI(t)),base64Serde={serialize:t=>encode(t,!0),deserialize:t=>decode(t)},pakoSerde={serialize:t=>{const e=new TextEncoder().encode(t),r=deflate_1(e,{level:9});return fromUint8Array(r,!0)},deserialize:t=>{const e=toUint8Array(t);return inflate_1(e,{to:"string"})}},serdes={base64:base64Serde,pako:pakoSerde},serializeState=(t,e="pako")=>{if(!(e in serdes))throw new Error(`Unknown serde type: ${e}`);const r=JSON.stringify(t),o=serdes[e].serialize(r);return`${e}:${o}`},deserializeState=t=>{let e,r;if(t.includes(":")){let n;if([n,r]=t.split(":"),n in serdes)e=n;else throw new Error(`Unknown serde type: ${n}`)}else e="base64",r=t;const o=serdes[e].deserialize(r);return JSON.parse(o)};var dist={},words={};(function(t){var e=commonjsGlobal&&commonjsGlobal.__values||function(o){var n=typeof Symbol=="function"&&Symbol.iterator,a=n&&o[n],s=0;if(a)return a.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&s>=o.length&&(o=void 0),{value:o&&o[s++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.getWordsByCategory=t.wordList=void 0,t.wordList={noun:[{word:"accountant",categories:["profession"]},{word:"ability",categories:["thing"]},{word:"accident",categories:["thing"]},{word:"account",categories:["thing"]},{word:"action",categories:["thing"]},{word:"activity",categories:["thing"]},{word:"actor",categories:["profession"]},{word:"ad",categories:["media"]},{word:"addition",categories:["thing"]},{word:"address",categories:["thing"]},{word:"adult",categories:["people"]},{word:"advantage",categories:["thing"]},{word:"advertisement",categories:["media"]},{word:"afternoon",categories:["time"]},{word:"agency",categories:["thing"]},{word:"agent",categories:["people"]},{word:"air",categories:["thing"]},{word:"airline",categories:["transportation"]},{word:"airplane",categories:["transportation"]},{word:"airport",categories:["transportation","place"]},{word:"alarm",categories:["thing"]},{word:"alligator",categories:["animals"]},{word:"ambulance",categories:["health"]},{word:"analyst",categories:["profession"]},{word:"angle",categories:["thing"]},{word:"animal",categories:["animals"]},{word:"answer",categories:["thing"]},{word:"apartment",categories:["place"]},{word:"apple",categories:["food"]},{word:"application",categories:["thing"]},{word:"appointment",categories:["thing"]},{word:"architect",categories:["profession"]},{word:"argument",categories:["thing"]},{word:"area",categories:["thing"]},{word:"arm",categories:["thing"]},{word:"army",categories:["thing"]},{word:"art",categories:["thing"]},{word:"article",categories:["thing"]},{word:"artist",categories:["profession"]},{word:"australia",categories:["place"]},{word:"author",categories:["profession"]},{word:"autumn",categories:["time"]},{word:"baby",categories:["people","family"]},{word:"baker",categories:["profession"]},{word:"balloon",categories:["thing"]},{word:"banana",categories:["food"]},{word:"barista",categories:["profession"]},{word:"battery",categories:["thing"]},{word:"beach",categories:["place"]},{word:"bear",categories:["animals"]},{word:"beard",categories:["thing"]},{word:"bed",categories:["thing"]},{word:"belgium",categories:["place"]},{word:"bird",categories:["animals"]},{word:"bit",categories:["thing","technology"]},{word:"book",categories:["thing","education"]},{word:"boots",categories:["thing"]},{word:"boy",categories:["people"]},{word:"branch",categories:["thing"]},{word:"breakfast",categories:["thing"]},{word:"brother",categories:["family"]},{word:"businessperson",categories:["people","business"]},{word:"butcher",categories:["profession"]},{word:"byte",categories:["thing","technology"]},{word:"camera",categories:["thing"]},{word:"candle",categories:["thing"]},{word:"car",categories:["transportation"]},{word:"caravan",categories:["transportation"]},{word:"carpenter",categories:["profession"]},{word:"carpet",categories:["thing"]},{word:"cartoon",categories:["media"]},{word:"cat",categories:["animals"]},{word:"chef",categories:["profession"]},{word:"child",categories:["people","family"]},{word:"china",categories:["place"]},{word:"church",categories:["religion"]},{word:"city",categories:["place"]},{word:"coat",categories:["thing"]},{word:"coffeeshop",categories:["place"]},{word:"computer",categories:["thing","technology"]},{word:"continent",categories:["place"]},{word:"controller",categories:["thing","technology"]},{word:"country",categories:["place"]},{word:"cpu",categories:["thing","technology"]},{word:"crayon",categories:["thing"]},{word:"cricket",categories:["animals"]},{word:"crowd",categories:["people"]},{word:"daughter",categories:["family"]},{word:"dawn",categories:["time"]},{word:"daybreak",categories:["time"]},{word:"death",categories:["thing"]},{word:"denmark",categories:["place"]},{word:"dentist",categories:["profession"]},{word:"diamond",categories:["thing"]},{word:"dinner",categories:["food"]},{word:"disease",categories:["thing"]},{word:"doctor",categories:["profession"]},{word:"dog",categories:["animals"]},{word:"dream",categories:["thing"]},{word:"dress",categories:["thing"]},{word:"dusk",categories:["time"]},{word:"easter",categories:["religion"]},{word:"egg",categories:["food"]},{word:"eggplant",categories:["food"]},{word:"egypt",categories:["place"]},{word:"electrician",categories:["profession"]},{word:"elephant",categories:["animals"]},{word:"energy",categories:["thing"]},{word:"engine",categories:["transportation"]},{word:"engineer",categories:["profession"]},{word:"england",categories:["place"]},{word:"eve",categories:["time"]},{word:"evening",categories:["time"]},{word:"eventide",categories:["time"]},{word:"exabyte",categories:["thing","technology"]},{word:"eye",categories:["thing"]},{word:"fall",categories:["time"]},{word:"family",categories:["family"]},{word:"farmer",categories:["profession"]},{word:"father",categories:["people","family"]},{word:"finland",categories:["place"]},{word:"fireman",categories:["profession"]},{word:"fish",categories:["animals"]},{word:"flag",categories:["thing"]},{word:"florist",categories:["profession"]},{word:"flower",categories:["thing"]},{word:"football",categories:["sports"]},{word:"forest",categories:["place"]},{word:"fountain",categories:["thing"]},{word:"france",categories:["place"]},{word:"furniture",categories:["thing"]},{word:"garage",categories:["place"]},{word:"garden",categories:["food"]},{word:"gas",categories:["transportation"]},{word:"ghost",categories:["thing"]},{word:"gigabyte",categories:["thing","technology"]},{word:"girl",categories:["people"]},{word:"glass",categories:["thing"]},{word:"gold",categories:["thing"]},{word:"gpu",categories:["thing","technology"]},{word:"grandmother",categories:["people","family"]},{word:"grass",categories:["thing"]},{word:"greece",categories:["place"]},{word:"guitar",categories:["thing"]},{word:"hair",categories:["thing"]},{word:"hairdresser",categories:["profession"]},{word:"hamburger",categories:["food"]},{word:"helicopter",categories:["transportation"]},{word:"helmet",categories:["thing"]},{word:"holiday",categories:["thing"]},{word:"honey",categories:["food"]},{word:"horse",categories:["animals"]},{word:"hospital",categories:["place"]},{word:"house",categories:["place"]},{word:"hydrogen",categories:["science"]},{word:"ice",categories:["science"]},{word:"insect",categories:["animals"]},{word:"insurance",categories:["thing"]},{word:"intern",categories:["profession"]},{word:"iron",categories:["science"]},{word:"island",categories:["place"]},{word:"jackal",categories:["animals"]},{word:"jelly",categories:["food"]},{word:"jewellery",categories:["thing"]},{word:"jordan",categories:["place"]},{word:"journalist",categories:["profession"]},{word:"joystick",categories:["thing","technology"]},{word:"judge",categories:["profession"]},{word:"juice",categories:["food"]},{word:"kangaroo",categories:["animals"]},{word:"keyboard",categories:["thing","technology"]},{word:"kilobyte",categories:["thing","technology"]},{word:"king",categories:["people"]},{word:"kitchen",categories:["place"]},{word:"kite",categories:["thing"]},{word:"knife",categories:["thing"]},{word:"lamp",categories:["thing"]},{word:"laptop",categories:["thing","technology"]},{word:"lawyer",categories:["profession"]},{word:"leather",categories:["thing"]},{word:"librarian",categories:["profession"]},{word:"library",categories:["place"]},{word:"lifeguard",categories:["profession"]},{word:"lighter",categories:["thing"]},{word:"lion",categories:["animals"]},{word:"lizard",categories:["animals"]},{word:"lock",categories:["thing"]},{word:"london",categories:["place"]},{word:"lunch",categories:["food"]},{word:"machine",categories:["science"]},{word:"magazine",categories:["media"]},{word:"magician",categories:["people"]},{word:"man",categories:["people"]},{word:"manchester",categories:["place"]},{word:"market",categories:["place"]},{word:"match",categories:["thing"]},{word:"mechanic",categories:["profession"]},{word:"megabyte",categories:["thing","technology"]},{word:"memory",categories:["thing","technology"]},{word:"microphone",categories:["thing"]},{word:"midnight",categories:["time"]},{word:"minister",categories:["people","religion"]},{word:"monitor",categories:["thing","technology"]},{word:"monkey",categories:["animals"]},{word:"morn",categories:["time"]},{word:"morning",categories:["time"]},{word:"mother",categories:["people","family"]},{word:"motherboard",categories:["thing","technology"]},{word:"motorcycle",categories:["transportation"]},{word:"mouse",categories:["thing","technology","animals"]},{word:"musician",categories:["profession"]},{word:"nail",categories:["thing"]},{word:"napkin",categories:["thing"]},{word:"needle",categories:["thing"]},{word:"nest",categories:["thing"]},{word:"nigeria",categories:["place"]},{word:"night",categories:["time"]},{word:"nightfall",categories:["time"]},{word:"noon",categories:["time"]},{word:"notebook",categories:["thing"]},{word:"nurse",categories:["profession"]},{word:"ocean",categories:["place"]},{word:"oil",categories:["thing"]},{word:"optician",categories:["profession"]},{word:"orange",categories:["food"]},{word:"oxygen",categories:["science"]},{word:"oyster",categories:["animals"]},{word:"pager",categories:["thing","technology"]},{word:"painter",categories:["profession"]},{word:"painting",categories:["media"]},{word:"park",categories:["place"]},{word:"parrot",categories:["animals"]},{word:"pencil",categories:["thing","education"]},{word:"petabyte",categories:["thing","technology"]},{word:"pharmacist",categories:["profession"]},{word:"photographer",categories:["profession"]},{word:"piano",categories:["thing"]},{word:"pillow",categories:["thing"]},{word:"pilot",categories:["profession"]},{word:"pizza",categories:["food"]},{word:"planet",categories:["science"]},{word:"plastic",categories:["thing"]},{word:"plumber",categories:["profession"]},{word:"policeman",categories:["profession"]},{word:"portugal",categories:["place"]},{word:"postman",categories:["profession"]},{word:"potato",categories:["food"]},{word:"printer",categories:["thing","technology"]},{word:"processor",categories:["thing","technology"]},{word:"psychiatrist",categories:["profession"]},{word:"queen",categories:["people"]},{word:"quill",categories:["thing"]},{word:"rain",categories:["thing"]},{word:"rainbow",categories:["science"]},{word:"raincoat",categories:["thing"]},{word:"ram",categories:["thing","technology"]},{word:"receptionist",categories:["profession"]},{word:"refrigerator",categories:["food"]},{word:"restaurant",categories:["place"]},{word:"river",categories:["thing"]},{word:"rocket",categories:["science"]},{word:"room",categories:["place"]},{word:"rose",categories:["thing"]},{word:"russia",categories:["place"]},{word:"salesclerk",categories:["people","business"]},{word:"salesmen",categories:["profession"]},{word:"sandwich",categories:["food"]},{word:"school",categories:["education"]},{word:"scientist",categories:["profession"]},{word:"scooter",categories:["transportation"]},{word:"secretary",categories:["profession"]},{word:"shampoo",categories:["thing"]},{word:"shoe",categories:["thing"]},{word:"smartphone",categories:["thing","technology"]},{word:"soccer",categories:["sports"]},{word:"solstice",categories:["time"]},{word:"spoon",categories:["thing"]},{word:"spring",categories:["time"]},{word:"state",categories:["place"]},{word:"stone",categories:["thing"]},{word:"student",categories:["people","education"]},{word:"sugar",categories:["food"]},{word:"summer",categories:["time"]},{word:"sundown",categories:["time"]},{word:"sunset",categories:["time"]},{word:"sweden",categories:["place"]},{word:"table",categories:["thing"]},{word:"tailor",categories:["profession"]},{word:"teacher",categories:["people","education","profession"]},{word:"teenager",categories:["people","family"]},{word:"telephone",categories:["thing"]},{word:"television",categories:["media"]},{word:"tent",categories:["thing"]},{word:"terabyte",categories:["thing","technology"]},{word:"thailand",categories:["place"]},{word:"tiger",categories:["animals"]},{word:"toddler",categories:["people","family"]},{word:"tomato",categories:["food"]},{word:"toothbrush",categories:["thing"]},{word:"traffic",categories:["thing"]},{word:"train",categories:["transportation"]},{word:"translator",categories:["profession"]},{word:"truck",categories:["thing","transportation"]},{word:"twilight",categories:["time"]},{word:"uganda",categories:["place"]},{word:"umbrella",categories:["thing"]},{word:"van",categories:["transportation"]},{word:"vase",categories:["thing"]},{word:"vegetable",categories:["food"]},{word:"vr",categories:["thing","technology"]},{word:"vulture",categories:["animals"]},{word:"waiter",categories:["profession"]},{word:"waitress",categories:["profession"]},{word:"wall",categories:["thing"]},{word:"whale",categories:["animals"]},{word:"window",categories:["thing"]},{word:"winter",categories:["time"]},{word:"wire",categories:["thing"]},{word:"wolf",categories:["animals"]},{word:"woman",categories:["people"]},{word:"xylophone",categories:["thing"]},{word:"yacht",categories:["transportation"]},{word:"yak",categories:["animals"]},{word:"yottabyte",categories:["thing","technology"]},{word:"zebra",categories:["animals"]},{word:"zettabyte",categories:["thing","technology"]},{word:"zoo",categories:["animals"]}],adjective:[{word:"abandoned",categories:["condition"]},{word:"abiding",categories:["personality"]},{word:"able",categories:["condition"]},{word:"abrasive",categories:["condition","personality"]},{word:"abnormal",categories:["condition"]},{word:"absurd",categories:["condition"]},{word:"abundant",categories:["quantity"]},{word:"acceptable",categories:["condition"]},{word:"acidic",categories:["taste"]},{word:"acoustic",categories:["sounds"]},{word:"acrid",categories:["condition"]},{word:"adamant",categories:["personality"]},{word:"adorable",categories:["personality"]},{word:"adventurous",categories:["personality"]},{word:"aggressive",categories:["personality"]},{word:"agitated",categories:["personality"]},{word:"agreeable",categories:["personality"]},{word:"alert",categories:["condition"]},{word:"alive",categories:["condition"]},{word:"aloof",categories:["personality"]},{word:"ambitious",categories:["personality"]},{word:"ancient",categories:["time"]},{word:"angry",categories:["personality"]},{word:"annoyed",categories:["personality"]},{word:"antsy",categories:["personality"]},{word:"anxious",categories:["personality"]},{word:"appalling",categories:["personality"]},{word:"appetizing",categories:["taste"]},{word:"apprehensive",categories:["personality"]},{word:"arrogant",categories:["personality"]},{word:"ashamed",categories:["personality"]},{word:"astonishing",categories:["personality"]},{word:"attractive",categories:["appearance"]},{word:"average",categories:["appearance"]},{word:"bad",categories:["condition"]},{word:"bald",categories:["appearance"]},{word:"bashful",categories:["personality"]},{word:"beautiful",categories:["appearance"]},{word:"beefy",categories:["appearance"]},{word:"belligerent",categories:["personality"]},{word:"bent",categories:["condition"]},{word:"best",categories:["condition"]},{word:"better",categories:["condition"]},{word:"bewildered",categories:["personality"]},{word:"big",categories:["size"]},{word:"billions",categories:["quantity"]},{word:"billowy",categories:["appearance"]},{word:"bitter",categories:["taste"]},{word:"black",categories:["color"]},{word:"bland",categories:["taste"]},{word:"blue",categories:["color"]},{word:"blushing",categories:["appearance"]},{word:"bored",categories:["personality"]},{word:"boring",categories:["personality"]},{word:"boundless",categories:["personality"]},{word:"brainy",categories:["personality"]},{word:"brash",categories:["personality"]},{word:"brave",categories:["personality"]},{word:"breezy",categories:["touch"]},{word:"brief",categories:["time"]},{word:"bright",categories:["appearance"]},{word:"broad",categories:["shapes"]},{word:"broken",categories:["condition"]},{word:"brown",categories:["color"]},{word:"bulky",categories:["appearance"]},{word:"bumpy",categories:["touch"]},{word:"burly",categories:["appearance"]},{word:"busy",categories:["personality"]},{word:"cagey",categories:["personality"]},{word:"calm",categories:["personality"]},{word:"callous",categories:["personality"]},{word:"careful",categories:["condition"]},{word:"chilly",categories:["touch"]},{word:"chubby",categories:["appearance"]},{word:"clean",categories:["appearance"]},{word:"clever",categories:["condition"]},{word:"clumsy",categories:["personality"]},{word:"cold",categories:["touch"]},{word:"colossal",categories:["size"]},{word:"cool",categories:["touch"]},{word:"crashing",categories:["sounds"]},{word:"creamy",categories:["taste"]},{word:"crooked",categories:["shapes"]},{word:"cuddly",categories:["touch"]},{word:"curved",categories:["shapes"]},{word:"damaged",categories:["touch"]},{word:"damp",categories:["touch"]},{word:"dazzling",categories:["appearance"]},{word:"dead",categories:["condition"]},{word:"deafening",categories:["sounds"]},{word:"deep",categories:["shapes"]},{word:"defeated",categories:["personality"]},{word:"delicious",categories:["taste"]},{word:"delightful",categories:["personality"]},{word:"dirty",categories:["touch"]},{word:"disgusting",categories:["taste"]},{word:"drab",categories:["appearance"]},{word:"dry",categories:["touch"]},{word:"eager",categories:["personality"]},{word:"early",categories:["time"]},{word:"easy",categories:["condition"]},{word:"echoing",categories:["sounds"]},{word:"elegant",categories:["appearance"]},{word:"embarrassed",categories:["personality"]},{word:"enough",categories:["quantity"]},{word:"faint",categories:["sounds"]},{word:"faithful",categories:["personality"]},{word:"famous",categories:["condition"]},{word:"fancy",categories:["appearance"]},{word:"fast",categories:["time"]},{word:"fat",categories:["size"]},{word:"few",categories:["quantity"]},{word:"fierce",categories:["personality"]},{word:"fit",categories:["appearance"]},{word:"flabby",categories:["appearance"]},{word:"flaky",categories:["touch"]},{word:"flat",categories:["shapes"]},{word:"fluffy",categories:["touch"]},{word:"freezing",categories:["touch"]},{word:"fresh",categories:["taste"]},{word:"full",categories:["quantity"]},{word:"future",categories:["time"]},{word:"gentle",categories:["personality"]},{word:"gifted",categories:["condition"]},{word:"gigantic",categories:["size"]},{word:"glamorous",categories:["appearance"]},{word:"gorgeous",categories:["appearance"]},{word:"gray",categories:["color"]},{word:"greasy",categories:["touch","taste"]},{word:"great",categories:["size"]},{word:"green",categories:["color"]},{word:"grumpy",categories:["personality"]},{word:"hallowed",categories:["condition"]},{word:"handsome",categories:["appearance"]},{word:"happy",categories:["personality"]},{word:"harsh",categories:["sounds"]},{word:"helpful",categories:["condition"]},{word:"helpless",categories:["personality"]},{word:"high",categories:["shapes"]},{word:"hissing",categories:["sounds"]},{word:"hollow",categories:["shapes"]},{word:"hot",categories:["touch","taste"]},{word:"howling",categories:["sounds"]},{word:"huge",categories:["size"]},{word:"hundreds",categories:["quantity"]},{word:"icy",categories:["touch"]},{word:"immense",categories:["size"]},{word:"important",categories:["condition"]},{word:"incalculable",categories:["quantity"]},{word:"inexpensive",categories:["condition"]},{word:"itchy",categories:["personality"]},{word:"jealous",categories:["personality"]},{word:"jolly",categories:["personality"]},{word:"juicy",categories:["taste"]},{word:"kind",categories:["personality"]},{word:"large",categories:["size"]},{word:"late",categories:["time"]},{word:"lazy",categories:["personality"]},{word:"lemon",categories:["color"]},{word:"limited",categories:["quantity"]},{word:"little",categories:["size","quantity"]},{word:"lively",categories:["personality"]},{word:"long",categories:["time","appearance"]},{word:"loose",categories:["touch"]},{word:"loud",categories:["sounds"]},{word:"low",categories:["shapes"]},{word:"magnificent",categories:["appearance"]},{word:"mammoth",categories:["size"]},{word:"mango",categories:["color"]},{word:"many",categories:["quantity"]},{word:"massive",categories:["size"]},{word:"mealy",categories:["condition"]},{word:"melodic",categories:["sounds"]},{word:"melted",categories:["touch"]},{word:"microscopic",categories:["size"]},{word:"millions",categories:["quantity"]},{word:"miniature",categories:["size"]},{word:"modern",categories:["time"]},{word:"moldy",categories:["taste"]},{word:"most",categories:["quantity"]},{word:"muscular",categories:["appearance"]},{word:"mushy",categories:["condition"]},{word:"mysterious",categories:["personality"]},{word:"narrow",categories:["shapes"]},{word:"nervous",categories:["personality"]},{word:"nice",categories:["personality"]},{word:"noisy",categories:["sounds"]},{word:"numerous",categories:["quantity"]},{word:"nutritious",categories:["taste"]},{word:"nutty",categories:["taste"]},{word:"obedient",categories:["personality"]},{word:"obnoxious",categories:["personality"]},{word:"odd",categories:["condition"]},{word:"old",categories:["time"]},{word:"orange",categories:["color"]},{word:"panicky",categories:["personality"]},{word:"petite",categories:["size"]},{word:"pitiful",categories:["personality"]},{word:"plain",categories:["appearance"]},{word:"plump",categories:["appearance"]},{word:"polite",categories:["personality"]},{word:"poor",categories:["condition"]},{word:"powerful",categories:["condition"]},{word:"prehistoric",categories:["time"]},{word:"prickly",categories:["touch"]},{word:"proud",categories:["personality"]},{word:"puny",categories:["size"]},{word:"purple",categories:["color"]},{word:"purring",categories:["sounds"]},{word:"putrid",categories:["taste"]},{word:"quaint",categories:["appearance"]},{word:"quick",categories:["time"]},{word:"quiet",categories:["sounds"]},{word:"rancid",categories:["taste"]},{word:"rapid",categories:["time"]},{word:"rapping",categories:["sounds"]},{word:"raspy",categories:["sounds"]},{word:"red",categories:["color"]},{word:"refined",categories:["shapes"]},{word:"repulsive",categories:["personality"]},{word:"rhythmic",categories:["sounds"]},{word:"rich",categories:["condition"]},{word:"ripe",categories:["taste"]},{word:"rotten",categories:["taste"]},{word:"rough",categories:["touch"]},{word:"round",categories:["shapes"]},{word:"salmon",categories:["color"]},{word:"salty",categories:["taste"]},{word:"savory",categories:["taste"]},{word:"scarce",categories:["quantity"]},{word:"scary",categories:["personality"]},{word:"scrawny",categories:["size"]},{word:"screeching",categories:["sounds"]},{word:"scruffy",categories:["appearance"]},{word:"shaggy",categories:["touch"]},{word:"shallow",categories:["shapes"]},{word:"shapely",categories:["appearance"]},{word:"sharp",categories:["touch"]},{word:"short",categories:["size","appearance","time"]},{word:"shrilling",categories:["sounds"]},{word:"shy",categories:["condition"]},{word:"silly",categories:["personality"]},{word:"skinny",categories:["appearance","shapes"]},{word:"slimy",categories:["touch"]},{word:"slow",categories:["time"]},{word:"small",categories:["size"]},{word:"some",categories:["quantity"]},{word:"sour",categories:["taste"]},{word:"sparse",categories:["quantity"]},{word:"spicy",categories:["taste"]},{word:"spoiled",categories:["taste"]},{word:"square",categories:["shapes"]},{word:"squeaking",categories:["sounds"]},{word:"stale",categories:["taste"]},{word:"steep",categories:["shapes"]},{word:"sticky",categories:["touch"]},{word:"stocky",categories:["appearance"]},{word:"straight",categories:["shapes"]},{word:"strong",categories:["touch"]},{word:"substantial",categories:["quantity"]},{word:"sweet",categories:["taste"]},{word:"swift",categories:["time"]},{word:"tall",categories:["size"]},{word:"tangy",categories:["taste"]},{word:"tart",categories:["taste"]},{word:"tasteless",categories:["taste"]},{word:"tasty",categories:["taste"]},{word:"teeny",categories:["size"]},{word:"tender",categories:["condition"]},{word:"thankful",categories:["personality"]},{word:"thoughtless",categories:["personality"]},{word:"thousands",categories:["quantity"]},{word:"thundering",categories:["sounds"]},{word:"tight",categories:["touch"]},{word:"tinkling",categories:["sounds"]},{word:"tiny",categories:["size"]},{word:"ugly",categories:["appearance"]},{word:"uneven",categories:["touch"]},{word:"unimportant",categories:["condition"]},{word:"uninterested",categories:["condition"]},{word:"unkempt",categories:["appearance"]},{word:"unsightly",categories:["appearance"]},{word:"uptight",categories:["personality"]},{word:"vast",categories:["condition"]},{word:"victorious",categories:["personality"]},{word:"wailing",categories:["sounds"]},{word:"warm",categories:["touch"]},{word:"weak",categories:["touch"]},{word:"wet",categories:["touch"]},{word:"whining",categories:["sounds"]},{word:"whispering",categories:["sounds"]},{word:"white",categories:["color"]},{word:"wide",categories:["shapes"]},{word:"witty",categories:["personality"]},{word:"wonderful",categories:["personality"]},{word:"wooden",categories:["touch"]},{word:"worried",categories:["personality"]},{word:"wrong",categories:["condition"]},{word:"yellow",categories:["color"]},{word:"young",categories:["time"]},{word:"yummy",categories:["taste"]},{word:"zealous",categories:["personality"]}]};function r(o,n){var a,s;n===void 0&&(n=[]);var l=new Set(n),h=[];try{for(var c=e(t.wordList[o]),d=c.next();!d.done;d=c.next()){var g=d.value;(n.length===0||g.categories.some(function(u){return l.has(u)}))&&h.push(g.word)}}catch(u){a={error:u}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}return h}t.getWordsByCategory=r})(words);var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},__assign.apply(this,arguments)};Object.defineProperty(dist,"__esModule",{value:!0});dist.totalUniqueSlugs=generateSlug_1=dist.generateSlug=void 0;var words_1=words,DEFAULT_NUMBER_OF_WORDS=3;function generateSlug(t,e){for(var r=t||DEFAULT_NUMBER_OF_WORDS,o={partsOfSpeech:getDefaultPartsOfSpeech(r),categories:{},format:"kebab"},n=__assign(__assign({},o),e),a=[],s=0;s<r;s++){var l=n.partsOfSpeech[s],h=words_1.getWordsByCategory(n.partsOfSpeech[s],n.categories[l]),c=h[Math.floor(Math.random()*h.length)];a.push(c)}return formatter(a,n.format)}var generateSlug_1=dist.generateSlug=generateSlug;function getDefaultPartsOfSpeech(t){for(var e=[],r=0;r<t-1;r++)e.push("adjective");return e.push("noun"),e}function formatter(t,e){return e==="kebab"?t.join("-").toLowerCase():e==="camel"?t.map(function(r,o){return o===0?r.toLowerCase():r[0].toUpperCase()+r.slice(1).toLowerCase()}).join(""):e==="lower"?t.join(" ").toLowerCase():e==="sentence"?t.map(function(r,o){return o===0?r[0].toUpperCase()+r.slice(1).toLowerCase():r}).join(" "):t.map(function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()}).join(" ")}function totalUniqueSlugs(t,e){for(var r,o,n=words_1.getWordsByCategory("adjective",(r=e==null?void 0:e.categories)===null||r===void 0?void 0:r.adjective).length,a=words_1.getWordsByCategory("noun",(o=e==null?void 0:e.categories)===null||o===void 0?void 0:o.noun).length,s={adjective:n,noun:a},l=t||DEFAULT_NUMBER_OF_WORDS,h=(e==null?void 0:e.partsOfSpeech)||getDefaultPartsOfSpeech(l),c=1,d=0;d<l;d++)c*=s[h[d]];return c}dist.totalUniqueSlugs=totalUniqueSlugs;let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let t=0;t<256;++t)byteToHex.push((t+256).toString(16).slice(1));function unsafeStringify(t,e=0){return byteToHex[t[e+0]]+byteToHex[t[e+1]]+byteToHex[t[e+2]]+byteToHex[t[e+3]]+"-"+byteToHex[t[e+4]]+byteToHex[t[e+5]]+"-"+byteToHex[t[e+6]]+byteToHex[t[e+7]]+"-"+byteToHex[t[e+8]]+byteToHex[t[e+9]]+"-"+byteToHex[t[e+10]]+byteToHex[t[e+11]]+byteToHex[t[e+12]]+byteToHex[t[e+13]]+byteToHex[t[e+14]]+byteToHex[t[e+15]]}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(t,e,r){if(native.randomUUID&&!e&&!t)return native.randomUUID();t=t||{};const o=t.random||(t.rng||rng)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,unsafeStringify(o)}const MAX_AUTO_HISTORY_LENGTH=30,historyModeStore=persist(writable("manual"),localStorage(),"autoHistoryMode"),autoHistoryStore=persist(writable([]),localStorage(),"autoHistoryStore"),manualHistoryStore=persist(writable([]),localStorage(),"manualHistoryStore"),loaderHistoryStore=writable([]),historyStore=derived([historyModeStore,autoHistoryStore,manualHistoryStore,loaderHistoryStore],([t,e,r,o],n)=>{switch(t){case"auto":{n(e);break}case"manual":{n(r);break}case"loader":{n(o);break}default:n(e)}}),addHistoryEntry=t=>{const e={...t,id:v4()};if(e.type==="loader"){loaderHistoryStore.update(r=>[e,...r]);return}e.name||(e.name=generateSlug_1(2)),e.type==="auto"&&autoHistoryStore.update(r=>(r.length>=MAX_AUTO_HISTORY_LENGTH&&(r=r.slice(0,MAX_AUTO_HISTORY_LENGTH-1)),[e,...r])),manualHistoryStore.update(r=>[e,...r]),logEvent("history",{action:"save"})},clearHistoryData=t=>{(get_store_value(historyModeStore)==="auto"?autoHistoryStore:manualHistoryStore).update(e=>(get_store_value(historyModeStore)!=="loader"&&(e=e.filter(({id:r})=>t&&r!=t),logEvent("history",{action:"clear",type:t?"single":"all"})),e))},getPreviousState=t=>{const e=get_store_value(t?autoHistoryStore:manualHistoryStore);return e.length>0?JSON.stringify(e[0].state):""},restoreHistory=t=>{const e=t.filter(o=>validateEntry(o)),r=t.length-e.length;if(r>0&&(console.error(`${r} invalid history entries were removed.`),console.error(t)),e.length>0){let o=0;(e[0].type==="auto"?autoHistoryStore:manualHistoryStore).update(n=>{const a=new Set(n.map(({id:h})=>h)),s=e.filter(({id:h})=>!a.has(h));o=s.length;const l=[...n,...s];return l.sort((h,c)=>c.time-h.time),l}),alert(`${o} entries restored. ${r} invalid, ${e.length-o} duplicates.`),logEvent("history",{action:"restore",success:o,invalid:r,duplicates:e.length-o})}else alert("No valid entries found.")},setIDs=t=>{for(const e of t)e.id||(e.id=v4());return t},injectHistoryIDs=()=>{autoHistoryStore.update(setIDs),manualHistoryStore.update(setIDs)},validateEntry=t=>t.type&&t.state&&t.time&&!0,codeFileName="code.mmd",configFileName="config.json",isValidGist=t=>codeFileName in t,getFileContent=async t=>t.truncated?await fetchText(t.raw_url):t.content,getGistData=async t=>{const e=t.split("github.com").pop();if(!e)throw new Error("Invalid GitHub URL"+t);const[r,o,n,a]=e.split("/"),{html_url:s,files:l,history:h}=await fetchJSON(`https://api.github.com/gists/${n}${a?"/"+a:""}`);if(isValidGist(l)){const c=await getFileContent(l[codeFileName]);let d="{}";configFileName in l&&(d=await getFileContent(l[configFileName]));const g=h[0];return{url:`${s}/${g.version}`,code:c,config:d,author:g.user.login,time:new Date(g.committed_at).getTime(),version:g.version.slice(-7)}}else throw new Error("Invalid gist provided")},getStateFromGist=(t,e=t.url)=>{const r={...defaultState,code:t.code,loader:{type:"gist",config:{url:e}}};return t.config&&(r.mermaid=t.config),r},loadGistData=async t=>{const e=t.split("github.com").pop();if(!e)throw new Error("Invalid GitHub URL"+t);const[r,o,n,a]=e.split("/"),{history:s}=await fetchJSON(`https://api.github.com/gists/${n}${a?"/"+a:""}`),l=[];for(const d of s)try{const g=await getGistData(d.url);l.push(g)}catch(g){console.error(g)}if(l.length===0)throw new Error("Invalid gist provided");l.reverse();const h=l.at(-1);if(!h)throw new Error("Invalid gist provided");const c=getStateFromGist(h,t);for(const d of l)addHistoryEntry({state:getStateFromGist(d),time:d.time,type:"loader",url:d.url,name:`${d.author} v${d.version}`});return c},loaders={gist:loadGistData},loadDataFromUrl=async()=>{const t=new URLSearchParams(window.location.search);let e=defaultState,r=!1;const o=t.get("code")??void 0,n=t.get("config")??void 0;let a;const s=n?await fetchText(n):defaultState.mermaid;if(o&&(a=await fetchText(o),r=!0),a){if(!o)throw new Error("Code URL is not defined");e={code:a,mermaid:s,loader:{type:"files",config:{codeURL:o,configURL:n}}}}else for(const[l,h]of t.entries())if(l in loaders)try{e=await loaders[l](h),r=!0;break}catch(c){console.error(c)}r&&updateCodeStore({...e,autoSync:!0,updateDiagram:!0})},migrations={injectHistoryIDs},migrationStore=persist(writable({version:-1}),localStorage(),"migrations"),applyMigrations=()=>{const{version:t}=get_store_value(migrationStore),e=Object.entries(migrations);if(t!==e.length-1){console.log(`Current migration version: v${t}. Migrating to v${e.length-1}.`);for(let r=t+1;r<e.length;r++){const[o,n]=e[r];console.log(`Applying migration ${r}: ${o}.`),n(),logEvent("migration",{key:o}),migrationStore.set({version:r})}logEvent("migration",{status:"complete",from:t,to:e.length-1})}},loadStateFromURL=()=>{loadState(window.location.hash.slice(1))},syncDiagram=()=>{updateCodeStore({updateDiagram:!0})},initHandler=async()=>{applyMigrations(),loadStateFromURL(),await initLoading("Loading Gist...",loadDataFromUrl().catch(console.error)),syncDiagram(),initURLSubscription(),await initAnalytics(),plausible==null||plausible.trackPageview({url:window.location.origin+window.location.pathname})},isMac=navigator.platform.toUpperCase().includes("MAC"),cmdKey=isMac?"Cmd":"Ctrl";let count=0;const errorDebug=(t=1e3)=>{if(count+=1,count>t){console.log(count,t);debugger}},formatJSON=t=>JSON.stringify(t,void 0,2),fetchJSON=async t=>(await fetch(t)).json(),fetchText=async t=>(await fetch(t)).text(),defaultState={code:`flowchart TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,mermaid:formatJSON({theme:"default"}),autoSync:!0,updateDiagram:!0},urlParseFailedState=`flowchart TD
A[Loading URL failed. We can try to figure out why.] -->|Decode JSON| B(Please check the console to see the JSON and error details.)
B --> C{Is the JSON correct?}
C -->|Yes| D(Please Click here to Raise an issue in github.<br/>Including the broken link in the issue <br/> will speed up the fix.)
C -->|No| E{Did someone <br/>send you this link?}
E -->|Yes| F[Ask them to send <br/>you the complete link]
E -->|No| G{Did you copy <br/> the complete URL?}
G --> |Yes| D
G --> |"No :("| H(Try using the Timeline tab in History <br/>from same browser you used to create the diagram.)
click D href "https://github.com/mermaid-js/mermaid-live-editor/issues/new?assignees=&labels=bug&template=bug_report.md&title=Broken%20link" "Raise issue"`,inputStateStore=persist(writable(defaultState),localStorage(),"codeStore"),currentState=(()=>{const t=get_store_value(inputStateStore);return{...t,serialized:serializeState(t),errorMarkers:[],error:void 0,editorMode:t.editorMode??"code"}})(),processState=async t=>{const e={...t,serialized:"",errorMarkers:[],error:void 0,editorMode:t.editorMode??"code"};try{e.serialized=serializeState(t),await parse(t.code),JSON.parse(t.mermaid)}catch(r){if(e.error=r,errorDebug(),console.error(r),"hash"in r)try{const{loc:{first_line:o,last_line:n,first_column:a,last_column:s}}=r.hash,l={severity:8,startLineNumber:o,startColumn:a,endLineNumber:n,endColumn:s+1,message:r.str};e.errorMarkers=[l]}catch(o){console.error("Error without line helper",o)}}return e},stateStore=derived([inputStateStore],([t],e)=>{processState(t).then(e)},currentState),loadState=t=>{let e;console.log(`Loading '${t}'`);try{e=deserializeState(t);const r=typeof e.mermaid=="string"?JSON.parse(e.mermaid):e.mermaid;r.securityLevel&&r.securityLevel!=="strict"&&confirm(`Removing "securityLevel":"${r.securityLevel}" from the config for safety.
Click Cancel if you trust the source of this Diagram.`)&&delete r.securityLevel,e.mermaid=formatJSON(r)}catch(r){e=get_store_value(inputStateStore),t&&(console.error("Init error",r),e.code=urlParseFailedState,e.mermaid=defaultState.mermaid)}updateCodeStore(e)},updateCodeStore=t=>{inputStateStore.update(e=>({...e,...t}))},updateCode=(t,{updateDiagram:e=!1,resetPanZoom:r=!1}={})=>{errorDebug(),inputStateStore.update(o=>(r&&(o.pan=void 0,o.zoom=void 0),{...o,code:t,updateDiagram:e}))},updateConfig=t=>{inputStateStore.update(e=>({...e,mermaid:t}))},toggleDarkTheme=t=>{inputStateStore.update(e=>{const r=JSON.parse(e.mermaid);return(!r.theme||["dark","default"].includes(r.theme))&&(r.theme=t?"dark":"default"),{...e,mermaid:formatJSON(r)}})},initURLSubscription=()=>{const t=debounce(e=>{history.replaceState(void 0,"",`#${e}`)},250);stateStore.subscribe(({serialized:e})=>{t(e)})},getStateString=()=>JSON.stringify(get_store_value(inputStateStore));export{tau as $,selectSvgElement as A,getThemeVariables$2 as B,defaultConfig$2 as C,hasKatex as D,calculateMathMLDimensions as E,renderKatex as F,getConfig$1 as G,parseFontSize as H,curveBasis as I,parseGenericTypes as J,setupGraphViewbox$1 as K,getStylesFromArray as L,interpolateToCurve as M,curveLinear as N,generateId as O,lineBreakRegex as P,defaultConfig as Q,commonDb as R,isDark as S,lighten as T,darken as U,pi as V,cos as W,sin as X,halfPi as Y,ZERO_WIDTH_SPACE as Z,epsilon as _,logEvent as a,arrayLikeKeys as a$,sqrt as a0,min as a1,abs$1 as a2,atan2 as a3,asin as a4,acos as a5,max as a6,rgba as a7,Utils as a8,Color as a9,dayjs as aA,constant as aB,interpolateNumber as aC,color as aD,interpolateRgb as aE,interpolateString as aF,dedent as aG,toNumber as aH,setToString as aI,overRest as aJ,baseRest as aK,isIterateeCall as aL,keysIn as aM,eq as aN,isArrayLike as aO,isArray as aP,baseFor as aQ,baseAssignValue as aR,isSymbol as aS,identity$1 as aT,isObject$1 as aU,isIndex as aV,assignValue as aW,baseUnary as aX,constant$2 as aY,merge$1 as aZ,Symbol$1 as a_,evaluate as aa,decodeEntities as ab,cleanAndMerge as ac,loadingStateStore as ad,toggleDarkTheme as ae,Selection$1 as af,root as ag,array as ah,isPlainObject as ai,isFunction as aj,commonjsGlobal as ak,getDefaultExportFromCjs as al,debounce as am,stateStore as an,inputStateStore as ao,render as ap,saveStatistics as aq,cmdKey as ar,updateCodeStore as as,define as at,extend$1 as au,Rgb as av,Color$1 as aw,rgbConvert as ax,nogamma as ay,hue as az,getAccDescription as b,baseKeys as b0,memoize as b1,isArguments as b2,copyObject as b3,getPrototype as b4,cloneArrayBuffer as b5,cloneTypedArray as b6,isObjectLike as b7,getTag as b8,nodeUtil as b9,addHistoryEntry as bA,clearHistoryData as bB,copyArray as ba,isBuffer as bb,cloneBuffer as bc,initCloneObject as bd,Stack as be,MapCache as bf,Uint8Array$1 as bg,isTypedArray as bh,isLength as bi,Set$1 as bj,isArrayLikeObject as bk,isEmpty as bl,errorDebug as bm,syncDiagram as bn,updateCode as bo,updateConfig as bp,plausible as bq,pakoSerde as br,env as bs,encode as bt,historyStore as bu,historyModeStore as bv,loaderHistoryStore as bw,restoreHistory as bx,getStateString as by,getPreviousState as bz,setAccDescription as c,getConfig as d,sanitizeText$2 as e,assignWithDepth$1 as f,getAccTitle as g,calculateTextWidth as h,initHandler as i,select as j,log$1 as k,localStorage as l,configureSvgSize as m,common$1 as n,calculateTextHeight as o,persist as p,dist$1 as q,setConfig as r,setAccTitle as s,setDiagramTitle as t,getDiagramTitle as u,clear as v,wrapLabel as w,utils as x,setupGraphViewbox as y,random as z};